handsontable 0.0.0-next-ffdf116-20240926 → 0.0.0-next-517ec9c-20240930

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of handsontable might be problematic. Click here for more details.

@@ -25,14 +25,14 @@
25
25
  * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
26
26
  * USE OR INABILITY TO USE THIS SOFTWARE.
27
27
  *
28
- * Version: 0.0.0-next-ffdf116-20240926
29
- * Release date: 30/07/2024 (built at 26/09/2024 10:53:15)
28
+ * Version: 0.0.0-next-517ec9c-20240930
29
+ * Release date: 30/07/2024 (built at 30/09/2024 11:07:42)
30
30
  */
31
31
  !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("dompurify"),require("@handsontable/pikaday"),require("moment"),require("numbro")):"function"==typeof define&&define.amd?define("Handsontable",["dompurify","@handsontable/pikaday","moment","numbro"],t):"object"==typeof exports?exports.Handsontable=t(require("dompurify"),require("@handsontable/pikaday"),require("moment"),require("numbro")):e.Handsontable=t(e.DOMPurify,e.Pikaday,e.moment,e.numbro)}("undefined"!=typeof self?self:this,((e,t,o,s)=>(()=>{var n={17728:()=>{},32779:(e,t)=>{"use strict";t.__esModule=!0,t.parse=function(e){const t=[[""]];if(0===e.length)return t;let i,r=0,l=0;for(;e.length>0&&i!==e.length;)if(i=e.length,e.match(n))e=e.replace(n,""),r+=1,t[l][r]="";else if(e.match(o))e=e.replace(o,""),r=0,l+=1,t[l]=[""];else{let o="";if(e.startsWith('"')){let t=0,s=!0;for(;s;){const n=e.slice(0,1);'"'===n&&(t+=1),o+=n,(0===(e=e.slice(1)).length||e.match(/^[\t\r\n]/)&&t%2==0)&&(s=!1)}o=o.replace(/^"/,"").replace(/"$/,"").replace(/["]*/g,(e=>new Array(Math.floor(e.length/2)).fill('"').join("")))}else{const t=e.match(s);o=t?t[0]:"",e=e.slice(o.length)}t[l][r]=o}return t},t.stringify=function(e){let t,o,s,n,i,r="";for(t=0,o=e.length;t<o;t+=1){for(n=e[t].length,s=0;s<n;s+=1)s>0&&(r+="\t"),i=e[t][s],"string"==typeof i?i.indexOf("\n")>-1?r+=`"${i.replace(/"/g,'""')}"`:r+=i:r+=null==i?"":i;t!==o-1&&(r+="\n")}return r};const o=/^(\r\n|\n\r|\r|\n)/,s=/^[^\t\r\n]+/,n=/^\t/},55518:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(32779);t.parse=s.parse,t.stringify=s.stringify},45060:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(95913),o(12587);var n=s(o(85707));t.FullyVisibleColumnsCalculationType=class{constructor(){(0,n.default)(this,"count",0),(0,n.default)(this,"startColumn",null),(0,n.default)(this,"endColumn",null),(0,n.default)(this,"startPosition",null),(0,n.default)(this,"isVisibleInTrimmingContainer",!1)}initialize(){}process(e,t){const{totalCalculatedWidth:o,zeroBasedScrollOffset:s,viewportWidth:n,columnWidth:i}=t;o>=s&&o+i<=s+(s>0?n+1:n)&&(null!==this.startColumn&&void 0!==this.startColumn||(this.startColumn=e),this.endColumn=e)}finalize(e){var t;const{scrollOffset:o,viewportWidth:s,inlineStartOffset:n,zeroBasedScrollOffset:i,totalColumns:r,needReverse:l,startPositions:a,columnWidth:h}=e;if(this.endColumn===r-1&&l)for(this.startColumn=this.endColumn;this.startColumn>0;){const e=a[this.endColumn]+h-a[this.startColumn-1];if(e<=s&&(this.startColumn-=1),e>=s)break}this.startPosition=null!==(t=a[this.startColumn])&&void 0!==t?t:null;const c=o+s-(i>0?s+1:s),u=null===this.startColumn?0:e.getColumnWidth(this.startColumn);c<-1*n||o>a.at(-1)||-1*o-s>-1*u?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,r<this.endColumn&&(this.endColumn=r-1),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)}}},41322:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(95913),o(12587);var n=s(o(85707));t.FullyVisibleRowsCalculationType=class{constructor(){(0,n.default)(this,"count",0),(0,n.default)(this,"startRow",null),(0,n.default)(this,"endRow",null),(0,n.default)(this,"startPosition",null),(0,n.default)(this,"isVisibleInTrimmingContainer",!1)}initialize(){}process(e,t){const{totalCalculatedHeight:o,zeroBasedScrollOffset:s,innerViewportHeight:n,rowHeight:i}=t;o>=s&&o+i<=n&&(null===this.startRow&&(this.startRow=e),this.endRow=e)}finalize(e){var t;const{scrollOffset:o,viewportHeight:s,horizontalScrollbarHeight:n,totalRows:i,needReverse:r,startPositions:l,rowHeight:a}=e;if(this.endRow===i-1&&r)for(this.startRow=this.endRow;this.startRow>0;){const e=l[this.endRow]+a-l[this.startRow-1];if(e<=s-n&&(this.startRow-=1),e>=s-n)break}this.startPosition=null!==(t=l[this.startRow])&&void 0!==t?t:null;o+s-n<(null===this.startRow?0:e.getRowHeight(this.startRow))||o>l.at(-1)?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,i<this.endRow&&(this.endRow=i-1),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}}},77970:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(95913),o(12587);var n=s(o(85707));t.PartiallyVisibleColumnsCalculationType=class{constructor(){(0,n.default)(this,"count",0),(0,n.default)(this,"startColumn",null),(0,n.default)(this,"endColumn",null),(0,n.default)(this,"startPosition",null),(0,n.default)(this,"isVisibleInTrimmingContainer",!1)}initialize(){}process(e,t){const{totalCalculatedWidth:o,zeroBasedScrollOffset:s,viewportWidth:n}=t;o<=s&&(this.startColumn=e);o>=s&&o<=s+(s>0?n+1:n)&&(null!==this.startColumn&&void 0!==this.startColumn||(this.startColumn=e)),this.endColumn=e}finalize(e){var t;const{scrollOffset:o,viewportWidth:s,inlineStartOffset:n,zeroBasedScrollOffset:i,totalColumns:r,needReverse:l,startPositions:a,columnWidth:h}=e;if(this.endColumn===r-1&&l)for(this.startColumn=this.endColumn;this.startColumn>0;){const e=a[this.endColumn]+h-a[this.startColumn-1];if(this.startColumn-=1,e>s)break}this.startPosition=null!==(t=a[this.startColumn])&&void 0!==t?t:null;o+s-(i>0?s+1:s)<-1*n||o>a.at(-1)+h||-1*o-s>0?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,r<this.endColumn&&(this.endColumn=r-1),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)}}},20788:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(95913),o(12587);var n=s(o(85707));t.PartiallyVisibleRowsCalculationType=class{constructor(){(0,n.default)(this,"count",0),(0,n.default)(this,"startRow",null),(0,n.default)(this,"endRow",null),(0,n.default)(this,"startPosition",null),(0,n.default)(this,"isVisibleInTrimmingContainer",!1)}initialize(){}process(e,t){const{totalCalculatedHeight:o,zeroBasedScrollOffset:s,innerViewportHeight:n}=t;o<=s&&(this.startRow=e),o>=s&&o<=n&&null===this.startRow&&(this.startRow=e),this.endRow=e}finalize(e){var t;const{scrollOffset:o,viewportHeight:s,horizontalScrollbarHeight:n,totalRows:i,needReverse:r,startPositions:l,rowHeight:a}=e;if(this.endRow===i-1&&r)for(this.startRow=this.endRow;this.startRow>0;){const e=l[this.endRow]+a-l[this.startRow-1];if(this.startRow-=1,e>=s-n)break}this.startPosition=null!==(t=l[this.startRow])&&void 0!==t?t:null;o+s-n<0||o>l.at(-1)+a?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,i<this.endRow&&(this.endRow=i-1),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}}},6782:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707));t.RenderedAllColumnsCalculationType=class{constructor(){(0,n.default)(this,"count",0),(0,n.default)(this,"startColumn",0),(0,n.default)(this,"endColumn",0),(0,n.default)(this,"startPosition",0),(0,n.default)(this,"isVisibleInTrimmingContainer",!0)}initialize(e){let{totalColumns:t}=e;this.count=t,this.endColumn=this.count-1}process(){}finalize(){}}},78128:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707));t.RenderedAllRowsCalculationType=class{constructor(){(0,n.default)(this,"count",0),(0,n.default)(this,"startRow",0),(0,n.default)(this,"endRow",0),(0,n.default)(this,"startPosition",0),(0,n.default)(this,"isVisibleInTrimmingContainer",!0)}initialize(e){let{totalRows:t}=e;this.count=t,this.endRow=this.count-1}process(){}finalize(){}}},98081:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(77970);class n extends s.PartiallyVisibleColumnsCalculationType{finalize(e){var t;super.finalize(e);const{overrideFn:o,totalColumns:s,startPositions:n}=e;null!==this.startColumn&&"function"==typeof o&&o(this),this.startColumn<0&&(this.startColumn=0),this.startPosition=null!==(t=n[this.startColumn])&&void 0!==t?t:null,s<this.endColumn&&(this.endColumn=s-1),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)}}t.RenderedColumnsCalculationType=n},51681:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(20788);class n extends s.PartiallyVisibleRowsCalculationType{finalize(e){var t;super.finalize(e);const{overrideFn:o,totalRows:s,startPositions:n}=e;null!==this.startRow&&"function"==typeof o&&o(this),this.startRow<0&&(this.startRow=0),this.startPosition=null!==(t=n[this.startRow])&&void 0!==t?t:null,s<this.endRow&&(this.endRow=s-1),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}}t.RenderedRowsCalculationType=n},26679:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(45060);t.FullyVisibleColumnsCalculationType=s.FullyVisibleColumnsCalculationType;var n=o(41322);t.FullyVisibleRowsCalculationType=n.FullyVisibleRowsCalculationType;var i=o(77970);t.PartiallyVisibleColumnsCalculationType=i.PartiallyVisibleColumnsCalculationType;var r=o(20788);t.PartiallyVisibleRowsCalculationType=r.PartiallyVisibleRowsCalculationType;var l=o(6782);t.RenderedAllColumnsCalculationType=l.RenderedAllColumnsCalculationType;var a=o(78128);t.RenderedAllRowsCalculationType=a.RenderedAllRowsCalculationType;var h=o(98081);t.RenderedColumnsCalculationType=h.RenderedColumnsCalculationType;var c=o(51681);t.RenderedRowsCalculationType=c.RenderedRowsCalculationType;var u=o(54886);t.ViewportColumnsCalculator=u.ViewportColumnsCalculator,t.DEFAULT_COLUMN_WIDTH=u.DEFAULT_WIDTH;var d=o(46616);t.ViewportRowsCalculator=d.ViewportRowsCalculator,t.DEFAULT_ROW_HEIGHT=d.DEFAULT_HEIGHT},81568:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707));t.ViewportBaseCalculator=class{constructor(e){(0,n.default)(this,"calculationTypes",[]),(0,n.default)(this,"calculationResults",new Map),this.calculationTypes=e}_initialize(e){this.calculationTypes.forEach((t=>{let[o,s]=t;this.calculationResults.set(o,s),s.initialize(e)}))}_process(e,t){this.calculationTypes.forEach((o=>{let[,s]=o;return s.process(e,t)}))}_finalize(e){this.calculationTypes.forEach((t=>{let[,o]=t;return o.finalize(e)}))}getResultsFor(e){return this.calculationResults.get(e)}}},54886:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(15724);var n=s(o(85707)),i=o(81568);const r=t.DEFAULT_WIDTH=50;class l extends i.ViewportBaseCalculator{constructor(e){let{calculationTypes:t,viewportWidth:o,scrollOffset:s,totalColumns:i,columnWidthFn:r,overrideFn:l,inlineStartOffset:a}=e;super(t),(0,n.default)(this,"viewportWidth",0),(0,n.default)(this,"scrollOffset",0),(0,n.default)(this,"zeroBasedScrollOffset",0),(0,n.default)(this,"totalColumns",0),(0,n.default)(this,"columnWidthFn",null),(0,n.default)(this,"columnWidth",0),(0,n.default)(this,"overrideFn",null),(0,n.default)(this,"inlineStartOffset",0),(0,n.default)(this,"totalCalculatedWidth",0),(0,n.default)(this,"startPositions",[]),(0,n.default)(this,"needReverse",!0),this.viewportWidth=o,this.scrollOffset=s,this.zeroBasedScrollOffset=Math.max(s,0),this.totalColumns=i,this.columnWidthFn=r,this.overrideFn=l,this.inlineStartOffset=a,this.calculate()}calculate(){this._initialize(this);for(let e=0;e<this.totalColumns;e++)if(this.columnWidth=this.getColumnWidth(e),this._process(e,this),this.startPositions.push(this.totalCalculatedWidth),this.totalCalculatedWidth+=this.columnWidth,this.totalCalculatedWidth>=this.zeroBasedScrollOffset+this.viewportWidth){this.needReverse=!1;break}this._finalize(this)}getColumnWidth(e){const t=this.columnWidthFn(e);return isNaN(t)?r:t}}t.ViewportColumnsCalculator=l},46616:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(15724);var n=s(o(85707)),i=o(81568);const r=t.DEFAULT_HEIGHT=23;class l extends i.ViewportBaseCalculator{constructor(e){let{calculationTypes:t,viewportHeight:o,scrollOffset:s,totalRows:i,rowHeightFn:r,overrideFn:l,horizontalScrollbarHeight:a}=e;super(t),(0,n.default)(this,"viewportHeight",0),(0,n.default)(this,"scrollOffset",0),(0,n.default)(this,"zeroBasedScrollOffset",0),(0,n.default)(this,"totalRows",0),(0,n.default)(this,"rowHeightFn",null),(0,n.default)(this,"rowHeight",0),(0,n.default)(this,"overrideFn",null),(0,n.default)(this,"horizontalScrollbarHeight",0),(0,n.default)(this,"innerViewportHeight",0),(0,n.default)(this,"totalCalculatedHeight",0),(0,n.default)(this,"startPositions",[]),(0,n.default)(this,"needReverse",!0),this.viewportHeight=o,this.scrollOffset=s,this.zeroBasedScrollOffset=Math.max(s,0),this.totalRows=i,this.rowHeightFn=r,this.overrideFn=l,this.horizontalScrollbarHeight=null!=a?a:0,this.innerViewportHeight=this.zeroBasedScrollOffset+this.viewportHeight-this.horizontalScrollbarHeight,this.calculate()}calculate(){this._initialize(this);for(let e=0;e<this.totalRows;e++)if(this.rowHeight=this.getRowHeight(e),this._process(e,this),this.startPositions.push(this.totalCalculatedHeight),this.totalCalculatedHeight+=this.rowHeight,this.totalCalculatedHeight>=this.innerViewportHeight){this.needReverse=!1;break}this._finalize(this)}getRowHeight(e){const t=this.rowHeightFn(e);return isNaN(t)?r:t}}t.ViewportRowsCalculator=l},28537:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=s(o(85707));function i(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function r(e,t){return e.get(a(e,t))}function l(e,t,o){return e.set(a(e,t),o),o}function a(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var h=new WeakMap;class c{constructor(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(0,n.default)(this,"row",null),(0,n.default)(this,"col",null),i(this,h,!1),l(h,this,o),void 0!==e&&void 0!==t&&(this.row=e,this.col=t)}isValid(e){const{countRows:t,countCols:o,countRowHeaders:s,countColHeaders:n}={countRows:0,countCols:0,countRowHeaders:0,countColHeaders:0,...e};return!(!Number.isInteger(this.row)||!Number.isInteger(this.col))&&(!(this.row<-n||this.col<-s)&&!(this.row>=t||this.col>=o))}isEqual(e){return e===this||this.row===e.row&&this.col===e.col}isHeader(){return!this.isCell()}isCell(){return this.row>=0&&this.col>=0}isRtl(){return r(h,this)}isSouthEastOf(e){return this.row>=e.row&&(r(h,this)?this.col<=e.col:this.col>=e.col)}isNorthWestOf(e){return this.row<=e.row&&(r(h,this)?this.col>=e.col:this.col<=e.col)}isSouthWestOf(e){return this.row>=e.row&&(r(h,this)?this.col>=e.col:this.col<=e.col)}isNorthEastOf(e){return this.row<=e.row&&(r(h,this)?this.col<=e.col:this.col>=e.col)}normalize(){return this.row=null===this.row?this.row:Math.max(this.row,0),this.col=null===this.col?this.col:Math.max(this.col,0),this}assign(e){return Number.isInteger(null==e?void 0:e.row)&&(this.row=e.row),Number.isInteger(null==e?void 0:e.col)&&(this.col=e.col),e instanceof c&&l(h,this,e.isRtl()),this}clone(){return new c(this.row,this.col,r(h,this))}toObject(){return{row:this.row,col:this.col}}}t.default=c},30422:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=s(o(28537));function r(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function l(e,t){return e.get(a(e,t))}function a(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var h=new WeakMap;class c{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];var i,l,c;(0,n.default)(this,"highlight",null),(0,n.default)(this,"from",null),(0,n.default)(this,"to",null),r(this,h,!1),this.highlight=e.clone(),this.from=t.clone(),this.to=o.clone(),l=this,c=s,(i=h).set(a(i,l),c)}setHighlight(e){return this.highlight=e.clone(),this}setFrom(e){return this.from=e.clone(),this}setTo(e){return this.to=e.clone(),this}isValid(e){return this.from.isValid(e)&&this.to.isValid(e)}isSingle(){return this.isSingleCell()||this.isSingleHeader()}isSingleCell(){return this.from.row>=0&&this.from.row===this.to.row&&this.from.col>=0&&this.from.col===this.to.col}isSingleHeader(){return(this.from.row<0||this.from.col<0)&&this.from.row===this.to.row&&this.from.col===this.to.col}isHeader(){return!(!this.from.isHeader()||!this.to.isHeader())||(this.from.col<0&&this.to.col<0||this.from.row<0&&this.to.row<0)}containsHeaders(){return this.from.isHeader()||this.to.isHeader()}getOuterHeight(){return Math.max(this.from.row,this.to.row)-Math.min(this.from.row,this.to.row)+1}getOuterWidth(){return Math.max(this.from.col,this.to.col)-Math.min(this.from.col,this.to.col)+1}getHeight(){if(this.from.row<0&&this.to.row<0)return 0;const e=Math.max(this.from.row,0),t=Math.max(this.to.row,0);return Math.max(e,t)-Math.min(e,t)+1}getWidth(){if(this.from.col<0&&this.to.col<0)return 0;const e=Math.max(this.from.col,0),t=Math.max(this.to.col,0);return Math.max(e,t)-Math.min(e,t)+1}getCellsCount(){return this.getWidth()*this.getHeight()}includes(e){const{row:t,col:o}=e,s=this.getOuterTopStartCorner(),n=this.getOuterBottomEndCorner();return s.row<=t&&n.row>=t&&s.col<=o&&n.col>=o}includesRange(e){return this.includes(e.getOuterTopStartCorner())&&this.includes(e.getOuterBottomEndCorner())}isEqual(e){return Math.min(this.from.row,this.to.row)===Math.min(e.from.row,e.to.row)&&Math.max(this.from.row,this.to.row)===Math.max(e.from.row,e.to.row)&&Math.min(this.from.col,this.to.col)===Math.min(e.from.col,e.to.col)&&Math.max(this.from.col,this.to.col)===Math.max(e.from.col,e.to.col)}overlaps(e){return e.isSouthEastOf(this.getOuterTopLeftCorner())&&e.isNorthWestOf(this.getOuterBottomRightCorner())}isSouthEastOf(e){return this.getOuterTopLeftCorner().isSouthEastOf(e)||this.getOuterBottomRightCorner().isSouthEastOf(e)}isNorthWestOf(e){return this.getOuterTopLeftCorner().isNorthWestOf(e)||this.getOuterBottomRightCorner().isNorthWestOf(e)}isOverlappingHorizontally(e){return this.getOuterTopEndCorner().col>=e.getOuterTopStartCorner().col&&this.getOuterTopEndCorner().col<=e.getOuterTopEndCorner().col||this.getOuterTopStartCorner().col<=e.getOuterTopEndCorner().col&&this.getOuterTopStartCorner().col>=e.getOuterTopStartCorner().col}isOverlappingVertically(e){return this.getOuterBottomStartCorner().row>=e.getOuterTopRightCorner().row&&this.getOuterBottomStartCorner().row<=e.getOuterBottomStartCorner().row||this.getOuterTopEndCorner().row<=e.getOuterBottomStartCorner().row&&this.getOuterTopEndCorner().row>=e.getOuterTopRightCorner().row}expand(e){const t=this.getOuterTopStartCorner(),o=this.getOuterBottomEndCorner();return(e.row<t.row||e.col<t.col||e.row>o.row||e.col>o.col)&&(this.from=this._createCellCoords(Math.min(t.row,e.row),Math.min(t.col,e.col)),this.to=this._createCellCoords(Math.max(o.row,e.row),Math.max(o.col,e.col)),!0)}expandByRange(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.includesRange(e)||!this.overlaps(e))return!1;const o=this.getOuterTopStartCorner(),s=this.getOuterBottomEndCorner(),n=this.getDirection(),i=e.getOuterTopStartCorner(),r=e.getOuterBottomEndCorner(),l=Math.min(o.row,i.row),a=Math.min(o.col,i.col),h=Math.max(s.row,r.row),c=Math.max(s.col,r.col),u=this._createCellCoords(l,a),d=this._createCellCoords(h,c);return this.from=u,this.to=d,this.setDirection(n),t&&(this.highlight.row===this.getOuterBottomRightCorner().row&&"N-S"===this.getVerticalDirection()&&this.flipDirectionVertically(),this.highlight.col===this.getOuterTopRightCorner().col&&"W-E"===this.getHorizontalDirection()&&this.flipDirectionHorizontally()),!0}getDirection(){return this.from.isNorthWestOf(this.to)?"NW-SE":this.from.isNorthEastOf(this.to)?"NE-SW":this.from.isSouthEastOf(this.to)?"SE-NW":this.from.isSouthWestOf(this.to)?"SW-NE":void 0}setDirection(e){switch(e){case"NW-SE":[this.from,this.to]=[this.getOuterTopLeftCorner(),this.getOuterBottomRightCorner()];break;case"NE-SW":[this.from,this.to]=[this.getOuterTopRightCorner(),this.getOuterBottomLeftCorner()];break;case"SE-NW":[this.from,this.to]=[this.getOuterBottomRightCorner(),this.getOuterTopLeftCorner()];break;case"SW-NE":[this.from,this.to]=[this.getOuterBottomLeftCorner(),this.getOuterTopRightCorner()]}}getVerticalDirection(){return["NE-SW","NW-SE"].indexOf(this.getDirection())>-1?"N-S":"S-N"}getHorizontalDirection(){return["NW-SE","SW-NE"].indexOf(this.getDirection())>-1?"W-E":"E-W"}flipDirectionVertically(){switch(this.getDirection()){case"NW-SE":this.setDirection("SW-NE");break;case"NE-SW":this.setDirection("SE-NW");break;case"SE-NW":this.setDirection("NE-SW");break;case"SW-NE":this.setDirection("NW-SE")}}flipDirectionHorizontally(){switch(this.getDirection()){case"NW-SE":this.setDirection("NE-SW");break;case"NE-SW":this.setDirection("NW-SE");break;case"SE-NW":this.setDirection("SW-NE");break;case"SW-NE":this.setDirection("SE-NW")}}getTopStartCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col)).normalize()}getTopLeftCorner(){return l(h,this)?this.getTopEndCorner():this.getTopStartCorner()}getBottomEndCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col)).normalize()}getBottomRightCorner(){return l(h,this)?this.getBottomStartCorner():this.getBottomEndCorner()}getTopEndCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col)).normalize()}getTopRightCorner(){return l(h,this)?this.getTopStartCorner():this.getTopEndCorner()}getBottomStartCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.min(this.from.col,this.to.col)).normalize()}getBottomLeftCorner(){return l(h,this)?this.getBottomEndCorner():this.getBottomStartCorner()}getOuterTopStartCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}getOuterTopLeftCorner(){return l(h,this)?this.getOuterTopEndCorner():this.getOuterTopStartCorner()}getOuterBottomEndCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}getOuterBottomRightCorner(){return l(h,this)?this.getOuterBottomStartCorner():this.getOuterBottomEndCorner()}getOuterTopEndCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}getOuterTopRightCorner(){return l(h,this)?this.getOuterTopStartCorner():this.getOuterTopEndCorner()}getOuterBottomStartCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}getOuterBottomLeftCorner(){return l(h,this)?this.getOuterBottomEndCorner():this.getOuterBottomStartCorner()}isCorner(e){return e.isEqual(this.getOuterTopLeftCorner())||e.isEqual(this.getOuterTopRightCorner())||e.isEqual(this.getOuterBottomLeftCorner())||e.isEqual(this.getOuterBottomRightCorner())}getOppositeCorner(e){return e instanceof i.default&&(e.isEqual(this.getOuterBottomEndCorner())?this.getOuterTopStartCorner():e.isEqual(this.getOuterTopStartCorner())?this.getOuterBottomEndCorner():e.isEqual(this.getOuterTopEndCorner())?this.getOuterBottomStartCorner():e.isEqual(this.getOuterBottomStartCorner())?this.getOuterTopEndCorner():void 0)}getBordersSharedWith(e){if(!this.includesRange(e))return[];const t=Math.min(this.from.row,this.to.row),o=Math.max(this.from.row,this.to.row),s=Math.min(this.from.col,this.to.col),n=Math.max(this.from.col,this.to.col),i=Math.min(e.from.row,e.to.row),r=Math.max(e.from.row,e.to.row),a=Math.min(e.from.col,e.to.col),c=Math.max(e.from.col,e.to.col),u=[];return t===i&&u.push("top"),n===c&&u.push(l(h,this)?"left":"right"),o===r&&u.push("bottom"),s===a&&u.push(l(h,this)?"right":"left"),u}getInner(){const e=this.getOuterTopStartCorner(),t=this.getOuterBottomEndCorner(),o=[];for(let s=e.row;s<=t.row;s++)for(let n=e.col;n<=t.col;n++)this.from.row===s&&this.from.col===n||this.to.row===s&&this.to.col===n||o.push(this._createCellCoords(s,n));return o}getAll(){const e=this.getOuterTopStartCorner(),t=this.getOuterBottomEndCorner(),o=[];for(let s=e.row;s<=t.row;s++)for(let n=e.col;n<=t.col;n++)e.row===s&&e.col===n?o.push(e):t.row===s&&t.col===n?o.push(t):o.push(this._createCellCoords(s,n));return o}forAll(e){const t=this.getOuterTopStartCorner(),o=this.getOuterBottomEndCorner();for(let s=t.row;s<=o.row;s++)for(let n=t.col;n<=o.col;n++){if(!1===e(s,n))return}}clone(){return new c(this.highlight,this.from,this.to,l(h,this))}toObject(){return{from:this.from.toObject(),to:this.to.toObject()}}_createCellCoords(e,t){return new i.default(e,t,l(h,this))}}t.default=c},25192:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(15724);var n=s(o(85707)),i=o(9893),r=o(59777),l=s(o(82629)),a=s(o(61677)),h=s(o(28537)),c=s(o(30422));t.default=class{get eventManager(){return new l.default(this)}constructor(e,t){(0,n.default)(this,"wtTable",void 0),(0,n.default)(this,"wtScroll",void 0),(0,n.default)(this,"wtViewport",void 0),(0,n.default)(this,"wtOverlays",void 0),(0,n.default)(this,"selectionManager",void 0),(0,n.default)(this,"wtEvent",void 0),(0,n.default)(this,"guid",`wt_${(0,r.randomString)()}`),(0,n.default)(this,"drawInterrupted",!1),(0,n.default)(this,"drawn",!1),(0,n.default)(this,"domBindings",void 0),(0,n.default)(this,"wtSettings",void 0),this.domBindings={rootTable:e,rootDocument:e.ownerDocument,rootWindow:e.ownerDocument.defaultView},this.wtSettings=t,this.wtScroll=new a.default(this.createScrollDao())}findOriginalHeaders(){const e=[];if(this.wtTable.THEAD.childNodes.length&&this.wtTable.THEAD.childNodes[0].childNodes.length){for(let t=0,o=this.wtTable.THEAD.childNodes[0].childNodes.length;t<o;t++)e.push(this.wtTable.THEAD.childNodes[0].childNodes[t].innerHTML);this.wtSettings.getSetting("columnHeaders").length||this.wtSettings.update("columnHeaders",[function(t,o){(0,i.fastInnerText)(o,e[t])}])}}createCellCoords(e,t){return new h.default(e,t,this.wtSettings.getSetting("rtlMode"))}createCellRange(e,t,o){return new c.default(e,t,o,this.wtSettings.getSetting("rtlMode"))}draw(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.drawInterrupted=!1,this.wtTable.isVisible()?this.wtTable.draw(e):this.drawInterrupted=!0,this}getCell(e){if(!(arguments.length>1&&void 0!==arguments[1]&&arguments[1]))return this.wtTable.getCell(e);const t=this.wtSettings.getSetting("totalRows"),o=this.wtSettings.getSetting("fixedRowsTop"),s=this.wtSettings.getSetting("fixedRowsBottom"),n=this.wtSettings.getSetting("fixedColumnsStart");if(e.row<o&&e.col<n)return this.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.getCell(e);if(e.row<o)return this.wtOverlays.topOverlay.clone.wtTable.getCell(e);if(e.col<n&&e.row>=t-s){if(this.wtOverlays.bottomInlineStartCornerOverlay&&this.wtOverlays.bottomInlineStartCornerOverlay.clone)return this.wtOverlays.bottomInlineStartCornerOverlay.clone.wtTable.getCell(e)}else{if(e.col<n)return this.wtOverlays.inlineStartOverlay.clone.wtTable.getCell(e);if(e.row<t&&e.row>=t-s&&this.wtOverlays.bottomOverlay&&this.wtOverlays.bottomOverlay.clone)return this.wtOverlays.bottomOverlay.clone.wtTable.getCell(e)}return this.wtTable.getCell(e)}scrollViewport(e,t,o,s,n){return!(e.col<0||e.row<0)&&this.wtScroll.scrollViewport(e,t,o,s,n)}scrollViewportHorizontally(e,t,o){return!(e<0)&&this.wtScroll.scrollViewportHorizontally(e,t,o)}scrollViewportVertically(e,t,o){return!(e<0)&&this.wtScroll.scrollViewportVertically(e,t,o)}getViewport(){return[this.wtTable.getFirstVisibleRow(),this.wtTable.getFirstVisibleColumn(),this.wtTable.getLastVisibleRow(),this.wtTable.getLastVisibleColumn()]}destroy(){this.wtOverlays.destroy(),this.wtEvent.destroy()}createScrollDao(){const e=this;return{get drawn(){return e.drawn},get topOverlay(){return e.wtOverlays.topOverlay},get inlineStartOverlay(){return e.wtOverlays.inlineStartOverlay},get wtTable(){return e.wtTable},get wtViewport(){return e.wtViewport},get wtSettings(){return e.wtSettings},get rootWindow(){return e.domBindings.rootWindow},get totalRows(){return e.wtSettings.getSetting("totalRows")},get totalColumns(){return e.wtSettings.getSetting("totalColumns")},get fixedRowsTop(){return e.wtSettings.getSetting("fixedRowsTop")},get fixedRowsBottom(){return e.wtSettings.getSetting("fixedRowsBottom")},get fixedColumnsStart(){return e.wtSettings.getSetting("fixedColumnsStart")}}}getTableDao(){const e=this;return{get wot(){return e},get parentTableOffset(){return e.cloneSource.wtTable.tableOffset},get cloneSource(){return e.cloneSource},get workspaceWidth(){return e.wtViewport.getWorkspaceWidth()},get wtViewport(){return e.wtViewport},get wtOverlays(){return e.wtOverlays},get selectionManager(){return e.selectionManager},get drawn(){return e.drawn},set drawn(t){e.drawn=t},get wtTable(){return e.wtTable},get startColumnRendered(){return e.wtViewport.columnsRenderCalculator.startColumn},get startColumnVisible(){return e.wtViewport.columnsVisibleCalculator.startColumn},get startColumnPartiallyVisible(){return e.wtViewport.columnsPartiallyVisibleCalculator.startColumn},get endColumnRendered(){return e.wtViewport.columnsRenderCalculator.endColumn},get endColumnVisible(){return e.wtViewport.columnsVisibleCalculator.endColumn},get endColumnPartiallyVisible(){return e.wtViewport.columnsPartiallyVisibleCalculator.endColumn},get countColumnsRendered(){return e.wtViewport.columnsRenderCalculator.count},get countColumnsVisible(){return e.wtViewport.columnsVisibleCalculator.count},get startRowRendered(){return e.wtViewport.rowsRenderCalculator.startRow},get startRowVisible(){return e.wtViewport.rowsVisibleCalculator.startRow},get startRowPartiallyVisible(){return e.wtViewport.rowsPartiallyVisibleCalculator.startRow},get endRowRendered(){return e.wtViewport.rowsRenderCalculator.endRow},get endRowVisible(){return e.wtViewport.rowsVisibleCalculator.endRow},get endRowPartiallyVisible(){return e.wtViewport.rowsPartiallyVisibleCalculator.endRow},get countRowsRendered(){return e.wtViewport.rowsRenderCalculator.count},get countRowsVisible(){return e.wtViewport.rowsVisibleCalculator.count},get columnHeaders(){return e.wtSettings.getSetting("columnHeaders")},get rowHeaders(){return e.wtSettings.getSetting("rowHeaders")}}}}},7861:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707)),i=s(o(41906)),r=s(o(25192));class l extends r.default{constructor(e,t,o){super(e,t),(0,n.default)(this,"cloneSource",void 0),(0,n.default)(this,"cloneOverlay",void 0);const s=this.wtSettings.getSetting("facade",this);this.cloneSource=o.source,this.cloneOverlay=o.overlay,this.wtTable=this.cloneOverlay.createTable(this.getTableDao(),s,this.domBindings,this.wtSettings),this.wtViewport=o.viewport,this.selectionManager=o.selectionManager,this.wtEvent=new i.default(s,this.domBindings,this.wtSettings,this.eventManager,this.wtTable,this.selectionManager,o.event),this.findOriginalHeaders()}}t.default=l},82881:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(15724);var n=s(o(41906)),i=s(o(85737)),r=o(34009),l=s(o(47241)),a=s(o(26235)),h=s(o(85690)),c=s(o(25192)),u=o(42492),d=o(13911),g=o(9893);class f extends c.default{constructor(e,t){super(e,new l.default(t));const o=this.wtSettings.getSetting("facade",this);this.wtTable=new a.default(this.getTableDao(),o,this.domBindings,this.wtSettings),this.wtViewport=new h.default(this.getViewportDao(),this.domBindings,this.wtSettings,this.eventManager,this.wtTable),this.selectionManager=new u.SelectionManager(this.wtSettings.getSetting("selections")),this.wtEvent=new n.default(o,this.domBindings,this.wtSettings,this.eventManager,this.wtTable,this.selectionManager),this.wtOverlays=new i.default(this,o,this.domBindings,this.wtSettings,this.eventManager,this.wtTable),this.exportSettingsAsClassNames(),this.findOriginalHeaders()}exportSettingsAsClassNames(){const e=[],t=[];(0,d.objectEach)({rowHeaders:"htRowHeaders",columnHeaders:"htColumnHeaders"},((o,s)=>{this.wtSettings.getSetting(s).length&&t.push(o),e.push(o)})),(0,g.removeClass)(this.wtTable.wtRootElement.parentNode,e),(0,g.addClass)(this.wtTable.wtRootElement.parentNode,t)}getOverlayByName(e){var t;if(!r.CLONE_TYPES.includes(e))return null;const o=e.replace(/_([a-z])/g,(e=>e[1].toUpperCase()));return null!==(t=this.wtOverlays[`${o}Overlay`])&&void 0!==t?t:null}getViewportDao(){const e=this;return{get wot(){return e},get topOverlayTrimmingContainer(){return e.wtOverlays.topOverlay.trimmingContainer},get inlineStartOverlayTrimmingContainer(){return e.wtOverlays.inlineStartOverlay.trimmingContainer},get topScrollPosition(){return e.wtOverlays.topOverlay.getScrollPosition()},get topParentOffset(){return e.wtOverlays.topOverlay.getTableParentOffset()},get inlineStartScrollPosition(){return e.wtOverlays.inlineStartOverlay.getScrollPosition()},get inlineStartParentOffset(){return e.wtOverlays.inlineStartOverlay.getTableParentOffset()},get topOverlay(){return e.wtOverlays.topOverlay},get inlineStartOverlay(){return e.wtOverlays.inlineStartOverlay},get bottomOverlay(){return e.wtOverlays.bottomOverlay}}}}t.default=f},41906:(e,t,o)=>{"use strict";t.__esModule=!0,o(67834);var s=o(9893),n=o(78832),i=o(93980),r=o(28890),l=o(38893);function a(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function h(e,t){return e.get(u(e,t))}function c(e,t,o){return e.set(u(e,t),o),o}function u(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var d=new WeakMap,g=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,w=new WeakMap,C=new WeakMap,v=new WeakMap,y=new WeakMap,E=new WeakMap;t.default=class{constructor(e,t,o,s,n,i){let r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;a(this,d,void 0),a(this,g,void 0),a(this,f,void 0),a(this,p,void 0),a(this,m,void 0),a(this,w,void 0),a(this,C,void 0),a(this,v,void 0),a(this,y,[null,null]),a(this,E,[null,null]),c(d,this,o),c(g,this,t),c(f,this,n),c(p,this,i),c(m,this,r),c(w,this,s),c(C,this,e),this.registerEvents()}registerEvents(){h(w,this).addEventListener(h(f,this).holder,"contextmenu",(e=>this.onContextMenu(e))),h(w,this).addEventListener(h(f,this).TABLE,"mouseover",(e=>this.onMouseOver(e))),h(w,this).addEventListener(h(f,this).TABLE,"mouseout",(e=>this.onMouseOut(e)));const e=()=>{h(w,this).addEventListener(h(f,this).holder,"touchstart",(e=>this.onTouchStart(e))),h(w,this).addEventListener(h(f,this).holder,"touchend",(e=>this.onTouchEnd(e))),this.momentumScrolling||(this.momentumScrolling={}),h(w,this).addEventListener(h(f,this).holder,"scroll",(()=>{clearTimeout(this.momentumScrolling._timeout),this.momentumScrolling.ongoing||h(d,this).getSetting("onBeforeTouchScroll"),this.momentumScrolling.ongoing=!0,this.momentumScrolling._timeout=setTimeout((()=>{this.touchApplied||(this.momentumScrolling.ongoing=!1,h(d,this).getSetting("onAfterMomentumScroll"))}),200)}))},t=()=>{h(w,this).addEventListener(h(f,this).holder,"mouseup",(e=>this.onMouseUp(e))),h(w,this).addEventListener(h(f,this).holder,"mousedown",(e=>this.onMouseDown(e)))};(0,r.isMobileBrowser)()?e():((0,i.isTouchSupported)()&&e(),t())}selectedCellWasTouched(e){const t=this.parentCell(e).coords;if(h(v,this)&&t){const[e,o]=[t.row,h(v,this).from.row],[s,n]=[t.col,h(v,this).from.col];return e===o&&s===n}return!1}parentCell(e){const t={},o=h(f,this).TABLE,n=(0,s.closestDown)(e,["TD","TH"],o);return n?(t.coords=h(f,this).getCoords(n),t.TD=n):(0,s.hasClass)(e,"wtBorder")&&(0,s.hasClass)(e,"current")?(t.coords=h(p,this).getFocusSelection().cellRange.highlight,t.TD=h(f,this).getCell(t.coords)):(0,s.hasClass)(e,"wtBorder")&&(0,s.hasClass)(e,"area")&&h(p,this).getAreaSelection().cellRange&&(t.coords=h(p,this).getAreaSelection().cellRange.to,t.TD=h(f,this).getCell(t.coords)),t}onMouseDown(e){const t=h(g,this).rootDocument.activeElement,o=(0,n.partial)(s.getParent,e.target),i=e.target;if(!["TD","TH"].includes(t.nodeName)&&(i===t||o(0)===t||o(1)===t))return;const r=this.parentCell(i);(0,s.hasClass)(i,"corner")?h(d,this).getSetting("onCellCornerMouseDown",e,i):r.TD&&h(d,this).has("onCellMouseDown")&&this.callListener("onCellMouseDown",e,r.coords,r.TD),(0===e.button||this.touchApplied)&&r.TD&&(h(E,this)[0]=r.TD,clearTimeout(h(y,this)[0]),h(y,this)[0]=setTimeout((()=>{h(E,this)[0]=null}),1e3))}onContextMenu(e){if(h(d,this).has("onCellContextMenu")){const t=this.parentCell(e.target);t.TD&&this.callListener("onCellContextMenu",e,t.coords,t.TD)}}onMouseOver(e){if(!h(d,this).has("onCellMouseOver"))return;const t=h(f,this).TABLE,o=(0,s.closestDown)(e.target,["TD","TH"],t),n=h(m,this)||this;o&&o!==n.lastMouseOver&&(0,s.isChildOf)(o,t)&&(n.lastMouseOver=o,this.callListener("onCellMouseOver",e,h(f,this).getCoords(o),o))}onMouseOut(e){if(!h(d,this).has("onCellMouseOut"))return;const t=h(f,this).TABLE,o=(0,s.closestDown)(e.target,["TD","TH"],t),n=(0,s.closestDown)(e.relatedTarget,["TD","TH"],t),i=h(m,this)||this;o&&o!==n&&(0,s.isChildOf)(o,t)&&(this.callListener("onCellMouseOut",e,h(f,this).getCoords(o),o),null===n&&(i.lastMouseOver=null))}onMouseUp(e){const t=this.parentCell(e.target);t.TD&&h(d,this).has("onCellMouseUp")&&this.callListener("onCellMouseUp",e,t.coords,t.TD),(0===e.button||this.touchApplied)&&(t.TD===h(E,this)[0]&&t.TD===h(E,this)[1]?((0,s.hasClass)(e.target,"corner")?this.callListener("onCellCornerDblClick",e,t.coords,t.TD):this.callListener("onCellDblClick",e,t.coords,t.TD),h(E,this)[0]=null,h(E,this)[1]=null):t.TD===h(E,this)[0]&&(h(E,this)[1]=t.TD,clearTimeout(h(y,this)[1]),h(y,this)[1]=setTimeout((()=>{h(E,this)[1]=null}),500)))}onTouchStart(e){c(v,this,h(p,this).getFocusSelection().cellRange),this.touchApplied=!0,this.onMouseDown(e)}onTouchEnd(e){var t;const o=e.target,s=null===(t=this.parentCell(o))||void 0===t?void 0:t.coords,n=(0,l.isDefined)(s)&&s.row>=0&&s.col>=0;if(e.cancelable&&n&&h(d,this).getSetting("isDataViewInstance")){const t=["A","BUTTON","INPUT"];(0,r.isIOS)()&&((0,r.isChromeWebKit)()||(0,r.isFirefoxWebKit)())&&this.selectedCellWasTouched(o)&&!t.includes(o.tagName)?e.preventDefault():this.selectedCellWasTouched(o)||e.preventDefault()}this.onMouseUp(e),this.touchApplied=!1}callListener(e,t,o,s){const n=h(d,this).getSettingPure(e);n&&n(t,o,s,h(C,this).call(this))}destroy(){clearTimeout(h(y,this)[0]),clearTimeout(h(y,this)[1]),h(w,this).destroy()}}},56718:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(82881)),i=s(o(25192));class r{constructor(e){e instanceof i.default?this._wot=e:this._initFromSettings(e)}_initFromSettings(e){e.facade=e=>{const t=new r(e);return()=>t},this._wot=new n.default(e.table,e)}get guid(){return this._wot.guid}get rootDocument(){return this._wot.domBindings.rootDocument}get rootWindow(){return this._wot.domBindings.rootWindow}get wtSettings(){return this._wot.wtSettings}get cloneSource(){return this._wot.cloneSource}get cloneOverlay(){return this._wot.cloneOverlay}get selectionManager(){return this._wot.selectionManager}get wtViewport(){return this._wot.wtViewport}get wtOverlays(){return this._wot.wtOverlays}get wtTable(){return this._wot.wtTable}get wtEvent(){return this._wot.wtEvent}get wtScroll(){return this._wot.wtScroll}get drawn(){return this._wot.drawn}set drawn(e){this._wot.drawn=e}get drawInterrupted(){return this._wot.drawInterrupted}set drawInterrupted(e){this._wot.drawInterrupted=e}get lastMouseOver(){return this._wot.lastMouseOver}set lastMouseOver(e){this._wot.lastMouseOver=e}get momentumScrolling(){return this._wot.momentumScrolling}set momentumScrolling(e){this._wot.momentumScrolling=e}get touchApplied(){return this._wot.touchApplied}set touchApplied(e){this._wot.touchApplied=e}get domBindings(){return this._wot.domBindings}get eventListeners(){return this._wot.eventListeners}set eventListeners(e){this._wot.eventListeners=e}get eventManager(){return this._wot.eventManager}createCellCoords(e,t){return this._wot.createCellCoords(e,t)}createCellRange(e,t,o){return this._wot.createCellRange(e,t,o)}draw(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._wot.draw(e),this}getCell(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this._wot.getCell(e,t)}scrollViewport(e,t,o,s,n){return this._wot.scrollViewport(e,t,o,s,n)}scrollViewportHorizontally(e,t,o){return this._wot.scrollViewportHorizontally(e,t,o)}scrollViewportVertically(e,t,o){return this._wot.scrollViewportVertically(e,t,o)}getViewport(){return this._wot.getViewport()}getOverlayName(){return this._wot.cloneOverlay?this._wot.cloneOverlay.type:"master"}getOverlayByName(e){return this._wot.getOverlayByName(e)}exportSettingsAsClassNames(){return this._wot.exportSettingsAsClassNames()}update(e,t){return this._wot.wtSettings.update(e,t),this}getSetting(e,t,o,s,n){return this._wot.wtSettings.getSetting(e,t,o,s,n)}hasSetting(e){return this._wot.wtSettings.hasSetting(e)}destroy(){this._wot.destroy()}}t.default=r},16979:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707));t.default=class{constructor(e,t,o){(0,n.default)(this,"offset",void 0),(0,n.default)(this,"total",void 0),(0,n.default)(this,"countTH",void 0),this.offset=e,this.total=t,this.countTH=o}offsetted(e){return e+this.offset}unOffsetted(e){return e-this.offset}renderedToSource(e){return this.offsetted(e)}sourceToRendered(e){return this.unOffsetted(e)}offsettedTH(e){return e-this.countTH}unOffsettedTH(e){return e+this.countTH}visibleRowHeadedColumnToSourceColumn(e){return this.renderedToSource(this.offsettedTH(e))}sourceColumnToVisibleRowHeadedColumn(e){return this.unOffsettedTH(this.sourceToRendered(e))}}},39277:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707));t.default=class{constructor(e,t,o){(0,n.default)(this,"offset",void 0),(0,n.default)(this,"total",void 0),(0,n.default)(this,"countTH",void 0),this.offset=e,this.total=t,this.countTH=o}offsetted(e){return e+this.offset}unOffsetted(e){return e-this.offset}renderedToSource(e){return this.offsetted(e)}sourceToRendered(e){return this.unOffsetted(e)}offsettedTH(e){return e-this.countTH}unOffsettedTH(e){return e+this.countTH}visibleColHeadedRowToSourceRow(e){return this.renderedToSource(this.offsettedTH(e))}sourceRowToVisibleColHeadedRow(e){return this.unOffsettedTH(this.sourceToRendered(e))}}},90:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=o(26679);t.ViewportColumnsCalculator=n.ViewportColumnsCalculator,t.ViewportRowsCalculator=n.ViewportRowsCalculator,t.DEFAULT_ROW_HEIGHT=n.DEFAULT_ROW_HEIGHT,t.DEFAULT_COLUMN_WIDTH=n.DEFAULT_COLUMN_WIDTH;var i=s(o(28537));t.CellCoords=i.default;var r=s(o(30422));t.CellRange=r.default;var l=s(o(56718));t.default=l.default,t.Core=l.default;var a=o(98779);t.Selection=a.Selection,t.HIGHLIGHT_ACTIVE_HEADER_TYPE=a.ACTIVE_HEADER_TYPE,t.HIGHLIGHT_AREA_TYPE=a.AREA_TYPE,t.HIGHLIGHT_FOCUS_TYPE=a.FOCUS_TYPE,t.HIGHLIGHT_FILL_TYPE=a.FILL_TYPE,t.HIGHLIGHT_HEADER_TYPE=a.HEADER_TYPE,t.HIGHLIGHT_ROW_TYPE=a.ROW_TYPE,t.HIGHLIGHT_COLUMN_TYPE=a.COLUMN_TYPE,t.HIGHLIGHT_CUSTOM_SELECTION_TYPE=a.CUSTOM_SELECTION_TYPE;var h=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=d(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(20524));t.Renderer=h;var c=o(21682);t.OrderView=c.OrderView,t.SharedOrderView=c.SharedOrderView;var u=o(82629);function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(d=function(e){return e?o:t})(e)}t.getListenersCounter=u.getListenersCounter},85821:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=s(o(85707)),i=o(9893),r=o(13911),l=o(83119),a=o(90368),h=s(o(7861)),c=o(92692);t.Overlay=class{constructor(e,t,o,s,l){(0,n.default)(this,"wtSettings",null),(0,r.defineGetter)(this,"wot",e,{writable:!1}),this.domBindings=l,this.facadeGetter=t,this.wtSettings=s;const{TABLE:a,hider:h,spreader:c,holder:u,wtRootElement:d}=this.wot.wtTable;this.instance=this.wot,this.type=o,this.mainTableScrollableElement=null,this.TABLE=a,this.hider=h,this.spreader=c,this.holder=u,this.wtRootElement=d,this.trimmingContainer=(0,i.getTrimmingContainer)(this.hider.parentNode.parentNode),this.needFullRender=this.shouldBeRendered(),this.clone=this.makeClone()}hasRenderingStateChanged(){return this.needFullRender!==this.shouldBeRendered()}updateStateOfRendering(e){"before"===e&&this.shouldBeRendered()?this.needFullRender=!0:"after"!==e||this.shouldBeRendered()||(this.needFullRender=!1)}shouldBeRendered(){return!0}updateTrimmingContainer(){this.trimmingContainer=(0,i.getTrimmingContainer)(this.hider.parentNode.parentNode)}updateMainScrollableElement(){const{wtTable:e}=this.wot,{rootWindow:t}=this.domBindings;"hidden"===t.getComputedStyle(e.wtRootElement.parentNode).getPropertyValue("overflow")?this.mainTableScrollableElement=this.wot.wtTable.holder:this.mainTableScrollableElement=(0,i.getScrollableElement)(e.TABLE)}getRelativeCellPosition(e,t,o){if(!1===this.clone.wtTable.holder.contains(e))return void(0,l.warn)(`The provided element is not a child of the ${this.type} overlay`);const s=this.mainTableScrollableElement===this.domBindings.rootWindow,n=o<this.wtSettings.getSetting("fixedColumnsStart"),i=t<this.wtSettings.getSetting("fixedRowsTop"),r=t>=this.wtSettings.getSetting("totalRows")-this.wtSettings.getSetting("fixedRowsBottom"),a=this.clone.wtTable.spreader,h={start:this.getRelativeStartPosition(a),top:a.offsetTop},c={start:this.getRelativeStartPosition(e),top:e.offsetTop};let u=null;return u=s?this.getRelativeCellPositionWithinWindow(i,n,c,h):this.getRelativeCellPositionWithinHolder(i,r,n,c,h),u}getRelativeStartPosition(e){return this.isRtl()?e.offsetParent.offsetWidth-e.offsetLeft-e.offsetWidth:e.offsetLeft}getRelativeCellPositionWithinWindow(e,t,o,s){const n=this.wot.wtTable.wtRootElement.getBoundingClientRect();let r=0,l=0;if(t){let e=n.left;this.isRtl()&&(e=this.domBindings.rootWindow.innerWidth-(n.left+n.width+(0,i.getScrollbarWidth)())),r=e<=0?-1*e:0}else r=s.start;if(e){l=this.clone.wtTable.TABLE.getBoundingClientRect().top-n.top}else l=s.top;return{start:o.start+r,top:o.top+l}}getRelativeCellPositionWithinHolder(e,t,o,s,n){const i=this.wot.wtOverlays.inlineStartOverlay.getScrollPosition(),r=this.wot.wtOverlays.topOverlay.getScrollPosition();let l=0,a=0;if(o||(l=i-n.start),t){const e=this.wot.wtTable.wtRootElement.getBoundingClientRect();a=-1*this.clone.wtTable.TABLE.getBoundingClientRect().top+e.top}else e||(a=r-n.top);return{start:s.start-l,top:s.top-a}}makeClone(){if(-1===a.CLONE_TYPES.indexOf(this.type))throw new Error(`Clone type "${this.type}" is not supported.`);const{wtTable:e,wtSettings:t}=this.wot,{rootDocument:o,rootWindow:s}=this.domBindings,n=o.createElement("div"),r=o.createElement("table"),l=e.wtRootElement.parentNode;n.className=`${a.CLONE_CLASS_NAMES.get(this.type)} handsontable`,n.setAttribute("dir",this.isRtl()?"rtl":"ltr"),n.style.position="absolute",n.style.top=0,n.style.overflow="visible",this.isRtl()?n.style.right=0:n.style.left=0,t.getSetting("ariaTags")&&(0,i.setAttribute)(n,[(0,c.A11Y_PRESENTATION)()]),r.className=e.TABLE.className;e.TABLE.getAttribute("role")&&r.setAttribute("role",e.TABLE.getAttribute("role")),n.appendChild(r),l.appendChild(n);const u=this.wtSettings.getSetting("preventOverflow");return!0===u||"horizontal"===u&&this.type===a.CLONE_TOP||"vertical"===u&&this.type===a.CLONE_INLINE_START?this.mainTableScrollableElement=s:"hidden"===s.getComputedStyle(l).getPropertyValue("overflow")?this.mainTableScrollableElement=e.holder:this.mainTableScrollableElement=(0,i.getScrollableElement)(e.TABLE),new h.default(r,this.wtSettings,{source:this.wot,overlay:this,viewport:this.wot.wtViewport,event:this.wot.wtEvent,selectionManager:this.wot.selectionManager})}refresh(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.needFullRender&&this.clone.draw(e)}reset(){const e=this.clone.wtTable.holder,t=this.clone.wtTable.hider;[e.style,t.style,e.parentNode.style].forEach((e=>{e.width="",e.height=""}))}isRtl(){return this.wtSettings.getSetting("rtlMode")}destroy(){this.clone.eventManager.destroy()}}},60810:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=s(o(85707)),i=o(9893),r=s(o(31542)),l=o(85821),a=o(90368);class h extends l.Overlay{constructor(e,t,o,s){super(e,t,a.CLONE_BOTTOM,o,s),(0,n.default)(this,"cachedFixedRowsBottom",-1),this.cachedFixedRowsBottom=this.wtSettings.getSetting("fixedRowsBottom")}createTable(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return new r.default(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderBottomOverlay")}resetFixedPosition(){if(!this.needFullRender||!this.shouldBeRendered()||!this.wot.wtTable.holder.parentNode)return!1;const{rootWindow:e}=this.domBindings,t=this.clone.wtTable.holder.parentNode;t.style.top="";let o=0;const s=this.wtSettings.getSetting("preventOverflow");this.trimmingContainer!==e||s&&"vertical"===s?(o=this.getScrollPosition(),this.repositionOverlay()):(o=this.getOverlayOffset(),t.style.bottom=`${o}px`);const n=this.adjustHeaderBordersPosition(o);return this.adjustElementsSize(),n}repositionOverlay(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:o}=this.domBindings,s=this.clone.wtTable.holder.parentNode;let n=0;t.hasVerticalScroll()||(n+=t.getWorkspaceHeight()-e.getTotalHeight()),t.hasVerticalScroll()&&t.hasHorizontalScroll()&&(n+=(0,i.getScrollbarWidth)(o)),s.style.bottom=`${n}px`}setScrollPosition(e){const{rootWindow:t}=this.domBindings;let o=!1;return this.mainTableScrollableElement===t?(t.scrollTo((0,i.getWindowScrollLeft)(t),e),o=!0):this.mainTableScrollableElement.scrollTop!==e&&(this.mainTableScrollableElement.scrollTop=e,o=!0),o}onScroll(){this.wtSettings.getSetting("onScrollHorizontally")}sumCellSizes(e,t){const{wtTable:o,wtSettings:s}=this.wot,n=s.getSetting("defaultRowHeight");let i=e,r=0;for(;i<t;){const e=o.getRowHeight(i);r+=void 0===e?n:e,i+=1}return r}adjustElementsSize(){this.updateTrimmingContainer(),this.needFullRender&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:o,rootWindow:s}=this.domBindings,n=(0,i.getScrollbarWidth)(o),r=this.clone.wtTable.holder.parentNode.style,l=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==s||"horizontal"===l){let o=t.getWorkspaceWidth();this.wot.wtOverlays.hasScrollbarRight&&(o-=n),o=Math.min(o,e.wtRootElement.scrollWidth),r.width=`${o}px`}else r.width="";this.clone.wtTable.holder.style.width=r.width;let a=(0,i.outerHeight)(this.clone.wtTable.TABLE);this.wot.wtTable.hasDefinedSize()||(a=0),r.height=`${a}px`}adjustRootChildrenSize(){const{holder:e}=this.clone.wtTable;this.clone.wtTable.hider.style.width=this.hider.style.width,e.style.width=e.parentNode.style.width,e.style.height=e.parentNode.style.height}applyToDOM(){const e=this.wtSettings.getSetting("totalRows");if("number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition)this.spreader.style.top=`${this.wot.wtViewport.rowsRenderCalculator.startPosition}px`;else{if(0!==e)throw new Error("Incorrect value of the rowsRenderCalculator");this.spreader.style.top="0"}this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){const e=this.isRtl()?"right":"left",{spreader:t}=this.clone.wtTable;"number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition?t.style[e]=`${this.wot.wtViewport.columnsRenderCalculator.startPosition}px`:t.style[e]=""}scrollTo(e,t){let o=this.getTableParentOffset();const s=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder;let n=0;t&&s.offsetHeight!==s.clientHeight&&(n=(0,i.getScrollbarWidth)(this.domBindings.rootDocument)),t?(o+=this.sumCellSizes(0,e+1),o-=this.wot.wtViewport.getViewportHeight(),o+=1):o+=this.sumCellSizes(this.wtSettings.getSetting("fixedRowsBottom"),e),o+=n,this.setScrollPosition(o)}getTableParentOffset(){return this.mainTableScrollableElement===this.domBindings.rootWindow?this.wot.wtTable.holderOffset.top:0}getScrollPosition(){return(0,i.getScrollTop)(this.mainTableScrollableElement,this.domBindings.rootWindow)}getOverlayOffset(){const{rootWindow:e}=this.domBindings,t=this.wtSettings.getSetting("preventOverflow");let o=0;if(this.trimmingContainer===e&&(!t||"vertical"!==t)){const e=this.wot.wtTable.getTotalHeight(),t=e-this.clone.wtTable.getTotalHeight(),s=this.domBindings.rootDocument.documentElement.clientHeight;o=Math.max(this.getTableParentOffset()-this.getScrollPosition()-s+e,0),o>t&&(o=0)}return o}adjustHeaderBordersPosition(e){const t=this.wtSettings.getSetting("fixedRowsBottom"),o=this.cachedFixedRowsBottom!==t,s=this.wtSettings.getSetting("columnHeaders");let n=!1;if((o||0===t)&&s.length>0){const t=this.wot.wtTable.holder.parentNode,o=(0,i.hasClass)(t,"innerBorderBottom");this.cachedFixedRowsBottom=this.wtSettings.getSetting("fixedRowsBottom"),e||0===this.wtSettings.getSetting("totalRows")?((0,i.addClass)(t,"innerBorderBottom"),n=!o):((0,i.removeClass)(t,"innerBorderBottom"),n=o)}return n}}t.BottomOverlay=h},89130:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=o(9893),i=s(o(93638)),r=o(85821),l=o(90368);class a extends r.Overlay{constructor(e,t,o,s,n,i){super(e,t,l.CLONE_BOTTOM_INLINE_START_CORNER,o,s),this.bottomOverlay=n,this.inlineStartOverlay=i}createTable(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return new i.default(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderBottomOverlay")&&this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){const{wot:e}=this;if(this.updateTrimmingContainer(),!e.wtTable.holder.parentNode)return!1;const t=this.clone.wtTable.holder.parentNode;if(t.style.top="",this.trimmingContainer===this.domBindings.rootWindow){const e=this.inlineStartOverlay.getOverlayOffset(),o=this.bottomOverlay.getOverlayOffset();t.style[this.isRtl()?"right":"left"]=`${e}px`,t.style.bottom=`${o}px`}else(0,n.resetCssTransform)(t),this.repositionOverlay();let o=(0,n.outerHeight)(this.clone.wtTable.TABLE);const s=(0,n.outerWidth)(this.clone.wtTable.TABLE);return this.wot.wtTable.hasDefinedSize()||(o=0),t.style.height=`${o}px`,t.style.width=`${s}px`,!1}repositionOverlay(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:o}=this.domBindings,s=this.clone.wtTable.holder.parentNode;let i=0;t.hasVerticalScroll()||(i+=t.getWorkspaceHeight()-e.getTotalHeight()),t.hasVerticalScroll()&&t.hasHorizontalScroll()&&(i+=(0,n.getScrollbarWidth)(o)),s.style.bottom=`${i}px`}}t.BottomInlineStartCornerOverlay=a},90368:(e,t)=>{"use strict";t.__esModule=!0;const o=t.CLONE_TOP="top",s=t.CLONE_BOTTOM="bottom",n=t.CLONE_INLINE_START="inline_start",i=t.CLONE_TOP_INLINE_START_CORNER="top_inline_start_corner",r=t.CLONE_BOTTOM_INLINE_START_CORNER="bottom_inline_start_corner";t.CLONE_TYPES=[o,s,n,i,r],t.CLONE_CLASS_NAMES=new Map([[o,`ht_clone_${o}`],[s,`ht_clone_${s}`],[n,`ht_clone_${n} ht_clone_left`],[i,`ht_clone_${i} ht_clone_top_left_corner`],[r,`ht_clone_${r} ht_clone_bottom_left_corner`]])},34009:(e,t,o)=>{"use strict";t.__esModule=!0;var s={BottomInlineStartCornerOverlay:!0,BottomOverlay:!0,InlineStartOverlay:!0,Overlay:!0,TopInlineStartCornerOverlay:!0,TopOverlay:!0},n=o(89130);t.BottomInlineStartCornerOverlay=n.BottomInlineStartCornerOverlay;var i=o(60810);t.BottomOverlay=i.BottomOverlay;var r=o(7110);t.InlineStartOverlay=r.InlineStartOverlay;var l=o(85821);t.Overlay=l.Overlay;var a=o(51718);t.TopInlineStartCornerOverlay=a.TopInlineStartCornerOverlay;var h=o(1686);t.TopOverlay=h.TopOverlay;var c=o(90368);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===c[e]||(t[e]=c[e]))}))},7110:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=o(9893),i=s(o(14658)),r=o(85821),l=o(98779),a=o(90368);class h extends r.Overlay{constructor(e,t,o,s){super(e,t,a.CLONE_INLINE_START,o,s)}createTable(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return new i.default(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){const{wtTable:e}=this.wot;if(!this.needFullRender||!this.shouldBeRendered()||!e.holder.parentNode)return!1;const{rootWindow:t}=this.domBindings,o=this.clone.wtTable.holder.parentNode,s=this.wtSettings.getSetting("preventOverflow");let i=0;this.trimmingContainer!==t||s&&"horizontal"===s?(i=this.getScrollPosition(),(0,n.resetCssTransform)(o)):(i=this.getOverlayOffset()*(this.isRtl()?-1:1),(0,n.setOverlayPosition)(o,`${i}px`,"0px"));const r=this.adjustHeaderBordersPosition(i);return this.adjustElementsSize(),r}setScrollPosition(e){const{rootWindow:t}=this.domBindings;let o=!1;return this.isRtl()&&(e=-e),this.mainTableScrollableElement===t&&t.scrollX!==e?(t.scrollTo(e,(0,n.getWindowScrollTop)(t)),o=!0):this.mainTableScrollableElement.scrollLeft!==e&&(this.mainTableScrollableElement.scrollLeft=e,o=!0),o}onScroll(){this.wtSettings.getSetting("onScrollVertically")}sumCellSizes(e,t){const o=this.wtSettings.getSetting("defaultColumnWidth");let s=e,n=0;for(;s<t;)n+=this.wot.wtTable.getStretchedColumnWidth(s)||o,s+=1;return n}adjustElementsSize(){this.updateTrimmingContainer(),this.needFullRender&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:e}=this.wot,{rootDocument:t,rootWindow:o}=this.domBindings,s=(0,n.getScrollbarWidth)(t),i=this.clone.wtTable.holder.parentNode.style,r=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==o||"vertical"===r){let t=this.wot.wtViewport.getWorkspaceHeight();this.wot.wtOverlays.hasScrollbarBottom&&(t-=s),t=Math.min(t,e.wtRootElement.scrollHeight),i.height=`${t}px`}else i.height="";this.clone.wtTable.holder.style.height=i.height;const l=(0,n.outerWidth)(this.clone.wtTable.TABLE);i.width=`${l}px`}adjustRootChildrenSize(){const{holder:e}=this.clone.wtTable,t=this.wot.selectionManager.getFocusSelection()?parseInt(l.CORNER_DEFAULT_STYLE.width,10)/2:0;this.clone.wtTable.hider.style.height=this.hider.style.height,e.style.height=e.parentNode.style.height,e.style.width=`${parseInt(e.parentNode.style.width,10)+t}px`}applyToDOM(){const e=this.wtSettings.getSetting("totalColumns"),t=this.isRtl()?"right":"left";if("number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition)this.spreader.style[t]=`${this.wot.wtViewport.columnsRenderCalculator.startPosition}px`;else{if(0!==e)throw new Error("Incorrect value of the columnsRenderCalculator");this.spreader.style[t]="0"}this.isRtl()?this.spreader.style.left="":this.spreader.style.right="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){"number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition?this.clone.wtTable.spreader.style.top=`${this.wot.wtViewport.rowsRenderCalculator.startPosition}px`:this.clone.wtTable.spreader.style.top=""}scrollTo(e,t){const{wtSettings:o}=this,s=o.getSetting("rowHeaders"),i=o.getSetting("fixedColumnsStart"),r=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder,l=0===i&&s.length>0&&!(0,n.hasClass)(r.parentNode,"innerBorderInlineStart")?1:0;let a=this.getTableParentOffset(),h=0;if(t){this.wot.wtTable.getColumnWidth(e)>this.wot.wtViewport.getViewportWidth()&&(t=!1)}return t&&r.offsetWidth!==r.clientWidth&&(h=(0,n.getScrollbarWidth)(this.domBindings.rootDocument)),t?(a+=this.sumCellSizes(0,e+1),a-=this.wot.wtViewport.getViewportWidth(),a+=l):a+=this.sumCellSizes(this.wtSettings.getSetting("fixedColumnsStart"),e),a+=h,(0,n.getMaximumScrollLeft)(this.mainTableScrollableElement)===a-l&&l>0&&this.wot.wtOverlays.expandHiderHorizontallyBy(l),this.setScrollPosition(a)}getTableParentOffset(){let e=0;return this.wtSettings.getSetting("preventOverflow")||this.trimmingContainer!==this.domBindings.rootWindow||(e=this.wot.wtTable.holderOffset.left),e}getScrollPosition(){return Math.abs((0,n.getScrollLeft)(this.mainTableScrollableElement,this.domBindings.rootWindow))}getOverlayOffset(){const{rootWindow:e}=this.domBindings,t=this.wtSettings.getSetting("preventOverflow");let o=0;if(this.trimmingContainer===e&&(!t||"horizontal"!==t)){o=this.isRtl()?Math.abs(Math.min(this.getTableParentOffset()-this.getScrollPosition(),0)):Math.max(this.getScrollPosition()-this.getTableParentOffset(),0);o>this.wot.wtTable.getTotalWidth()-this.clone.wtTable.getTotalWidth()&&(o=0)}return o}adjustHeaderBordersPosition(e){const{wtSettings:t}=this,o=this.wot.wtTable.holder.parentNode,s=t.getSetting("rowHeaders"),i=t.getSetting("fixedColumnsStart"),r=t.getSetting("totalRows"),l="vertical"===t.getSetting("preventOverflow");r?(0,n.removeClass)(o,"emptyRows"):(0,n.addClass)(o,"emptyRows");let a=!1;if(!l)if(i&&!s.length)(0,n.addClass)(o,"innerBorderLeft innerBorderInlineStart");else if(!i&&s.length){const t=(0,n.hasClass)(o,"innerBorderInlineStart");e?((0,n.addClass)(o,"innerBorderLeft innerBorderInlineStart"),a=!t):((0,n.removeClass)(o,"innerBorderLeft innerBorderInlineStart"),a=t)}return a}}t.InlineStartOverlay=h},1686:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=s(o(85707)),i=o(9893),r=s(o(61234)),l=o(85821),a=o(98779),h=o(90368);class c extends l.Overlay{constructor(e,t,o,s){super(e,t,h.CLONE_TOP,o,s),(0,n.default)(this,"cachedFixedRowsTop",-1),this.cachedFixedRowsTop=this.wtSettings.getSetting("fixedRowsTop")}createTable(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return new r.default(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderTopOverlay")}resetFixedPosition(){if(!this.needFullRender||!this.shouldBeRendered()||!this.wot.wtTable.holder.parentNode)return!1;const e=this.clone.wtTable.holder.parentNode,{rootWindow:t}=this.domBindings,o=this.wtSettings.getSetting("preventOverflow");let s=0,n=!1;if(this.trimmingContainer!==t||o&&"vertical"===o)s=this.getScrollPosition(),(0,i.resetCssTransform)(e);else{const{wtTable:t}=this.wot,o=t.hider.getBoundingClientRect();n=Math.ceil(o.bottom)===e.offsetHeight,s=this.getOverlayOffset(),(0,i.setOverlayPosition)(e,"0px",`${s}px`)}const r=this.adjustHeaderBordersPosition(s,n);return this.adjustElementsSize(),r}setScrollPosition(e){const t=this.domBindings.rootWindow;let o=!1;return this.mainTableScrollableElement===t&&t.scrollY!==e?(t.scrollTo((0,i.getWindowScrollLeft)(t),e),o=!0):this.mainTableScrollableElement.scrollTop!==e&&(this.mainTableScrollableElement.scrollTop=e,o=!0),o}onScroll(){this.wtSettings.getSetting("onScrollHorizontally")}sumCellSizes(e,t){const o=this.wtSettings.getSetting("defaultRowHeight");let s=e,n=0;for(;s<t;){const e=this.wot.wtTable.getRowHeight(s);n+=void 0===e?o:e,s+=1}return n}adjustElementsSize(){this.updateTrimmingContainer(),this.needFullRender&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:e}=this.wot,{rootDocument:t,rootWindow:o}=this.domBindings,s=(0,i.getScrollbarWidth)(t),n=this.clone.wtTable.holder.parentNode.style,r=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==o||"horizontal"===r){let t=this.wot.wtViewport.getWorkspaceWidth();this.wot.wtOverlays.hasScrollbarRight&&(t-=s),t=Math.min(t,e.wtRootElement.scrollWidth),n.width=`${t}px`}else n.width="";this.clone.wtTable.holder.style.width=n.width;let l=(0,i.outerHeight)(this.clone.wtTable.TABLE);this.wot.wtTable.hasDefinedSize()||(l=0),n.height=`${l}px`}adjustRootChildrenSize(){const{holder:e}=this.clone.wtTable,t=this.wot.selectionManager.getFocusSelection()?parseInt(a.CORNER_DEFAULT_STYLE.height,10)/2:0;this.clone.wtTable.hider.style.width=this.hider.style.width,e.style.width=e.parentNode.style.width,e.style.height=`${parseInt(e.parentNode.style.height,10)+t}px`}applyToDOM(){const e=this.wtSettings.getSetting("totalRows");if("number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition)this.spreader.style.top=`${this.wot.wtViewport.rowsRenderCalculator.startPosition}px`;else{if(0!==e)throw new Error("Incorrect value of the rowsRenderCalculator");this.spreader.style.top="0"}this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){const e=this.isRtl()?"right":"left",{spreader:t}=this.clone.wtTable;"number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition?t.style[e]=`${this.wot.wtViewport.columnsRenderCalculator.startPosition}px`:t.style[e]=""}scrollTo(e,t){const{wot:o,wtSettings:s}=this,n=(o.cloneSource?o.cloneSource:o).wtTable.holder,r=s.getSetting("columnHeaders"),l=0===s.getSetting("fixedRowsTop")&&r.length>0&&!(0,i.hasClass)(n.parentNode,"innerBorderTop")?1:0;let a=this.getTableParentOffset(),h=0;if(t){this.wot.wtTable.getRowHeight(e)>this.wot.wtViewport.getViewportHeight()&&(t=!1)}if(t&&n.offsetHeight!==n.clientHeight&&(h=(0,i.getScrollbarWidth)(this.domBindings.rootDocument)),t){const t=s.getSetting("fixedRowsBottom"),n=s.getSetting("totalRows");a+=this.sumCellSizes(0,e+1),a-=o.wtViewport.getViewportHeight()-this.sumCellSizes(n-t,n),a+=1,a+=l}else a+=this.sumCellSizes(s.getSetting("fixedRowsTop"),e);return a+=h,(0,i.getMaximumScrollTop)(this.mainTableScrollableElement)===a-l&&l>0&&this.wot.wtOverlays.expandHiderVerticallyBy(l),this.setScrollPosition(a)}getTableParentOffset(){return this.mainTableScrollableElement===this.domBindings.rootWindow?this.wot.wtTable.holderOffset.top:0}getScrollPosition(){return(0,i.getScrollTop)(this.mainTableScrollableElement,this.domBindings.rootWindow)}getOverlayOffset(){const{rootWindow:e}=this.domBindings,t=this.wtSettings.getSetting("preventOverflow");let o=0;if(this.trimmingContainer===e&&(!t||"vertical"!==t)){const e=this.wot.wtTable.getTotalHeight()-this.clone.wtTable.getTotalHeight();o=Math.max(this.getScrollPosition()-this.getTableParentOffset(),0),o>e&&(o=0)}return o}adjustHeaderBordersPosition(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{wtSettings:o}=this,s=this.wot.wtTable.holder.parentNode,n=o.getSetting("totalColumns"),r="horizontal"===o.getSetting("preventOverflow");n?(0,i.removeClass)(s,"emptyColumns"):(0,i.addClass)(s,"emptyColumns");let l=!1;if(!t&&!r){const t=o.getSetting("fixedRowsTop"),n=this.cachedFixedRowsTop!==t,r=o.getSetting("columnHeaders");if((n||0===t)&&r.length>0){const t=(0,i.hasClass)(s,"innerBorderTop");this.cachedFixedRowsTop=o.getSetting("fixedRowsTop"),e||0===o.getSetting("totalRows")?((0,i.addClass)(s,"innerBorderTop"),l=!t):((0,i.removeClass)(s,"innerBorderTop"),l=t)}}return l}}t.TopOverlay=c},51718:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707)),i=o(9893),r=s(o(60882)),l=o(85821),a=o(90368);class h extends l.Overlay{constructor(e,t,o,s,i,r){super(e,t,a.CLONE_TOP_INLINE_START_CORNER,o,s),(0,n.default)(this,"topOverlay",void 0),(0,n.default)(this,"inlineStartOverlay",void 0),this.topOverlay=i,this.inlineStartOverlay=r}createTable(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return new r.default(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderTopOverlay")&&this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){if(this.updateTrimmingContainer(),!this.wot.wtTable.holder.parentNode)return!1;const e=this.clone.wtTable.holder.parentNode;if(this.trimmingContainer===this.domBindings.rootWindow){const t=this.inlineStartOverlay.getOverlayOffset()*(this.isRtl()?-1:1),o=this.topOverlay.getOverlayOffset();(0,i.setOverlayPosition)(e,`${t}px`,`${o}px`)}else(0,i.resetCssTransform)(e);let t=(0,i.outerHeight)(this.clone.wtTable.TABLE);const o=(0,i.outerWidth)(this.clone.wtTable.TABLE);return this.wot.wtTable.hasDefinedSize()||(t=0),e.style.height=`${t}px`,e.style.width=`${o}px`,!1}}t.TopInlineStartCornerOverlay=h},85737:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(9893),r=o(93980),l=o(9175),a=o(71257),h=o(28890),c=o(83119),u=o(34009);function d(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function g(e,t,o){return e.set(p(e,t),o),o}function f(e,t){return e.get(p(e,t))}function p(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var m=new WeakMap,w=new WeakMap,C=new WeakMap,v=new WeakMap;t.default=class{constructor(e,t,o,s,l,a){(0,n.default)(this,"wot",null),d(this,m,[]),(0,n.default)(this,"topOverlay",null),(0,n.default)(this,"bottomOverlay",null),(0,n.default)(this,"inlineStartOverlay",null),(0,n.default)(this,"topInlineStartCornerOverlay",null),(0,n.default)(this,"bottomInlineStartCornerOverlay",null),(0,n.default)(this,"browserLineHeight",void 0),(0,n.default)(this,"wtSettings",null),d(this,w,!1),d(this,C,0),d(this,v,null),(0,n.default)(this,"resizeObserver",new ResizeObserver((e=>{(0,r.requestAnimationFrame)((()=>{Array.isArray(e)&&e.length&&(g(C,this,f(C,this)+1),100===f(C,this)&&((0,c.warn)("The ResizeObserver callback was fired too many times in direct succession.\nThis may be due to an infinite loop caused by setting a dynamic height/width (for example, with the `dvh` units) to a Handsontable container's parent. \nThe observer will be disconnected."),this.resizeObserver.disconnect()),null!==f(v,this)&&clearTimeout(f(v,this)),g(v,this,setTimeout((()=>{g(C,this,0)}),100)),this.wtSettings.getSetting("onContainerElementResize"))}))}))),this.wot=e,this.wtSettings=s,this.domBindings=o,this.facadeGetter=t,this.wtTable=a;const{rootDocument:h,rootWindow:u}=this.domBindings;this.instance=this.wot,this.eventManager=l,this.scrollbarSize=(0,i.getScrollbarWidth)(h);const p="hidden"===u.getComputedStyle(a.wtRootElement.parentNode).getPropertyValue("overflow");this.scrollableElement=p?a.holder:(0,i.getScrollableElement)(a.TABLE),this.initOverlays(),this.hasScrollbarBottom=!1,this.hasScrollbarRight=!1,this.destroyed=!1,this.keyPressed=!1,this.spreaderLastSize={width:null,height:null},this.verticalScrolling=!1,this.horizontalScrolling=!1,this.initBrowserLineHeight(),this.registerListeners(),this.lastScrollX=u.scrollX,this.lastScrollY=u.scrollY}getOverlays(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=[...f(m,this)];return e&&t.push(this.wtTable),t}initBrowserLineHeight(){const{rootWindow:e,rootDocument:t}=this.domBindings,o=e.getComputedStyle(t.body),s=parseInt(o.lineHeight,10),n=1.2*parseInt(o.fontSize,10);this.browserLineHeight=s||n}initOverlays(){const e=[this.wot,this.facadeGetter,this.wtSettings,this.domBindings];this.topOverlay=new u.TopOverlay(...e),this.bottomOverlay=new u.BottomOverlay(...e),this.inlineStartOverlay=new u.InlineStartOverlay(...e),this.topInlineStartCornerOverlay=new u.TopInlineStartCornerOverlay(...e,this.topOverlay,this.inlineStartOverlay),this.bottomInlineStartCornerOverlay=new u.BottomInlineStartCornerOverlay(...e,this.bottomOverlay,this.inlineStartOverlay),g(m,this,[this.topOverlay,this.bottomOverlay,this.inlineStartOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay])}beforeDraw(){g(w,this,f(m,this).reduce(((e,t)=>t.hasRenderingStateChanged()||e),!1)),f(m,this).forEach((e=>e.updateStateOfRendering("before")))}afterDraw(){this.syncScrollWithMaster(),f(m,this).forEach((e=>{const t=e.hasRenderingStateChanged();e.updateStateOfRendering("after"),t&&!e.needFullRender&&e.reset()}))}refreshAll(){this.wot.drawn&&(this.wtTable.holder.parentNode?(this.wot.draw(!0),this.verticalScrolling&&this.inlineStartOverlay.onScroll(),this.horizontalScrolling&&this.topOverlay.onScroll(),this.verticalScrolling=!1,this.horizontalScrolling=!1):this.destroy())}registerListeners(){const{rootDocument:e,rootWindow:t}=this.domBindings,{mainTableScrollableElement:o}=this.topOverlay,{mainTableScrollableElement:s}=this.inlineStartOverlay;this.eventManager.addEventListener(e.documentElement,"keydown",(e=>this.onKeyDown(e))),this.eventManager.addEventListener(e.documentElement,"keyup",(()=>this.onKeyUp())),this.eventManager.addEventListener(e,"visibilitychange",(()=>this.onKeyUp())),this.eventManager.addEventListener(o,"scroll",(e=>this.onTableScroll(e)),{passive:!0}),o!==s&&this.eventManager.addEventListener(s,"scroll",(e=>this.onTableScroll(e)),{passive:!0});const n=t.devicePixelRatio&&t.devicePixelRatio>1,i=this.scrollableElement===t,r=this.wtSettings.getSetting("preventWheel"),l={passive:i};(r||n||!(0,h.isChrome)())&&this.eventManager.addEventListener(this.wtTable.wtRootElement,"wheel",(e=>this.onCloneWheel(e,r)),l);let a;[this.topOverlay,this.bottomOverlay,this.inlineStartOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay].forEach((e=>{if(e&&e.needFullRender){const{holder:t}=e.clone.wtTable;this.eventManager.addEventListener(t,"wheel",(e=>this.onCloneWheel(e,r)),l)}})),this.eventManager.addEventListener(t,"resize",(()=>{clearTimeout(a),a=setTimeout((()=>{this.wtSettings.getSetting("onWindowResize"),g(C,this,0)}),200)})),i||this.resizeObserver.observe(this.wtTable.wtRootElement.parentElement)}deregisterListeners(){this.eventManager.clearEvents(!0)}onTableScroll(e){const t=this.domBindings.rootWindow,o=this.inlineStartOverlay.mainTableScrollableElement,s=this.topOverlay.mainTableScrollableElement,n=e.target;this.keyPressed&&(s!==t&&n!==t&&!e.target.contains(s)||o!==t&&n!==t&&!e.target.contains(o))||this.syncScrollPositions(e)}onCloneWheel(e,t){const{rootWindow:o}=this.domBindings,s=this.inlineStartOverlay.mainTableScrollableElement,n=this.topOverlay.mainTableScrollableElement,i=e.target,r=n!==o&&i!==o&&!i.contains(n),l=s!==o&&i!==o&&!i.contains(s);if(this.keyPressed&&(r||l)||this.scrollableElement===o)return;const a=this.translateMouseWheelToScroll(e);(t||this.scrollableElement!==o&&a)&&e.preventDefault()}onKeyDown(e){this.keyPressed=(0,a.isKey)(e.keyCode,"ARROW_UP|ARROW_RIGHT|ARROW_DOWN|ARROW_LEFT")}onKeyUp(){this.keyPressed=!1}translateMouseWheelToScroll(e){let t=isNaN(e.deltaY)?-1*e.wheelDeltaY:e.deltaY,o=isNaN(e.deltaX)?-1*e.wheelDeltaX:e.deltaX;1===e.deltaMode&&(o+=o*this.browserLineHeight,t+=t*this.browserLineHeight);const s=this.scrollVertically(t),n=this.scrollHorizontally(o);return s||n}scrollVertically(e){const t=this.scrollableElement.scrollTop;return this.scrollableElement.scrollTop+=e,t!==this.scrollableElement.scrollTop}scrollHorizontally(e){const t=this.scrollableElement.scrollLeft;return this.scrollableElement.scrollLeft+=e,t!==this.scrollableElement.scrollLeft}syncScrollPositions(){if(this.destroyed)return;const{rootWindow:e}=this.domBindings,t=this.topOverlay.clone.wtTable.holder,o=this.inlineStartOverlay.clone.wtTable.holder,[s,n]=[this.scrollableElement.scrollLeft,this.scrollableElement.scrollTop];if(this.horizontalScrolling=t.scrollLeft!==s||this.lastScrollX!==e.scrollX,this.verticalScrolling=o.scrollTop!==n||this.lastScrollY!==e.scrollY,this.lastScrollX=e.scrollX,this.lastScrollY=e.scrollY,this.horizontalScrolling){t.scrollLeft=s;const e=this.bottomOverlay.needFullRender?this.bottomOverlay.clone.wtTable.holder:null;e&&(e.scrollLeft=s)}this.verticalScrolling&&(o.scrollTop=n),this.refreshAll()}syncScrollWithMaster(){if(!f(w,this))return;const e=this.topOverlay.mainTableScrollableElement,{scrollLeft:t,scrollTop:o}=e;this.topOverlay.needFullRender&&(this.topOverlay.clone.wtTable.holder.scrollLeft=t),this.bottomOverlay.needFullRender&&(this.bottomOverlay.clone.wtTable.holder.scrollLeft=t),this.inlineStartOverlay.needFullRender&&(this.inlineStartOverlay.clone.wtTable.holder.scrollTop=o),g(w,this,!1)}updateMainScrollableElements(){this.deregisterListeners(),this.inlineStartOverlay.updateMainScrollableElement(),this.topOverlay.updateMainScrollableElement(),this.bottomOverlay.needFullRender&&this.bottomOverlay.updateMainScrollableElement();const{wtTable:e}=this,{rootWindow:t}=this.domBindings;"hidden"===t.getComputedStyle(e.wtRootElement.parentNode).getPropertyValue("overflow")?this.scrollableElement=e.holder:this.scrollableElement=(0,i.getScrollableElement)(e.TABLE),this.registerListeners()}destroy(){this.resizeObserver.disconnect(),this.eventManager.destroy(),this.topOverlay.destroy(),this.bottomOverlay.clone&&this.bottomOverlay.destroy(),this.inlineStartOverlay.destroy(),this.topInlineStartCornerOverlay&&this.topInlineStartCornerOverlay.destroy(),this.bottomInlineStartCornerOverlay&&this.bottomInlineStartCornerOverlay.clone&&this.bottomInlineStartCornerOverlay.destroy(),this.destroyed=!0}refresh(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateLastSpreaderSize()&&this.adjustElementsSize(),this.bottomOverlay.clone&&this.bottomOverlay.refresh(e),this.inlineStartOverlay.refresh(e),this.topOverlay.refresh(e),this.topInlineStartCornerOverlay&&this.topInlineStartCornerOverlay.refresh(e),this.bottomInlineStartCornerOverlay&&this.bottomInlineStartCornerOverlay.clone&&this.bottomInlineStartCornerOverlay.refresh(e)}updateLastSpreaderSize(){const e=this.wtTable.spreader,t=e.clientWidth,o=e.clientHeight,s=t!==this.spreaderLastSize.width||o!==this.spreaderLastSize.height;return s&&(this.spreaderLastSize.width=t,this.spreaderLastSize.height=o),s}adjustElementsSize(){const{wtViewport:e}=this.wot,{wtTable:t}=this,{rootWindow:o}=this.domBindings,s=this.scrollableElement===o,n=this.wtSettings.getSetting("totalColumns"),i=this.wtSettings.getSetting("totalRows"),r=e.getRowHeaderWidth(),l=e.getColumnHeaderHeight()+this.topOverlay.sumCellSizes(0,i)+1,a=r+this.inlineStartOverlay.sumCellSizes(0,n),h=t.hider.style,c=(()=>!s&&this.scrollableElement.scrollTop>Math.max(0,l-t.holder.clientHeight))()?1:0,u=(()=>!s&&this.scrollableElement.scrollLeft>Math.max(0,a-t.holder.clientWidth))()?1:0;if(h.width=`${a+u}px`,h.height=`${l+c}px`,this.scrollbarSize>0){const{scrollHeight:e,scrollWidth:o}=t.wtRootElement,{scrollHeight:s,scrollWidth:n}=t.holder;this.hasScrollbarRight=e<s,this.hasScrollbarBottom=o<n,this.hasScrollbarRight&&t.hider.scrollWidth+this.scrollbarSize>o?this.hasScrollbarBottom=!0:this.hasScrollbarBottom&&t.hider.scrollHeight+this.scrollbarSize>e&&(this.hasScrollbarRight=!0)}this.topOverlay.adjustElementsSize(),this.inlineStartOverlay.adjustElementsSize(),this.bottomOverlay.adjustElementsSize()}expandHiderVerticallyBy(e){const{wtTable:t}=this;t.hider.style.height=`${parseInt(t.hider.style.height,10)+e}px`}expandHiderHorizontallyBy(e){const{wtTable:t}=this;t.hider.style.width=`${parseInt(t.hider.style.width,10)+e}px`}applyToDOM(){this.wtTable.isVisible()&&(this.topOverlay.applyToDOM(),this.bottomOverlay.clone&&this.bottomOverlay.applyToDOM(),this.inlineStartOverlay.applyToDOM())}getParentOverlay(e){if(!e)return null;const t=[this.topOverlay,this.inlineStartOverlay,this.bottomOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay];let o=null;return(0,l.arrayEach)(t,(t=>{t&&t.clone&&t.clone.wtTable.TABLE.contains(e)&&(o=t.clone)})),o}syncOverlayTableClassNames(){const e=this.wtTable.TABLE,t=[this.topOverlay,this.inlineStartOverlay,this.bottomOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay];(0,l.arrayEach)(t,(t=>{t&&(t.clone.wtTable.TABLE.className=e.className)}))}}},77140:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707)),i=s(o(42715));t.default=class{constructor(e,t){(0,n.default)(this,"nodesPool",null),(0,n.default)(this,"nodeType",void 0),(0,n.default)(this,"rootNode",void 0),(0,n.default)(this,"table",null),(0,n.default)(this,"renderedNodes",0),this.nodesPool="string"==typeof e?new i.default(e):null,this.nodeType=e,this.rootNode=t}setTable(e){this.nodesPool&&this.nodesPool.setRootDocument(e.rootDocument),this.table=e}adjust(){}render(){}}},83553:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707)),i=o(9893),r=o(21682),l=s(o(77140)),a=o(92692);class h extends l.default{constructor(){super("TD"),(0,n.default)(this,"orderViews",new WeakMap),(0,n.default)(this,"sourceRowIndex",0)}obtainOrderView(e){let t;return this.orderViews.has(e)?t=this.orderViews.get(e):(t=new r.SharedOrderView(e,(e=>this.nodesPool.obtain(this.sourceRowIndex,e)),this.nodeType),this.orderViews.set(e,t)),t}render(){const{rowsToRender:e,columnsToRender:t,rows:o,rowHeaders:s}=this.table;for(let l=0;l<e;l++){const e=this.table.renderedRowToSource(l),h=o.getRenderedNode(l);this.sourceRowIndex=e;const c=this.obtainOrderView(h),u=s.obtainOrderView(h);c.prependView(u).setSize(t).setOffset(this.table.renderedColumnToSource(0)).start();for(let o=0;o<t;o++){c.render();const t=c.getCurrentNode(),s=this.table.renderedColumnToSource(o);var n,r;if((0,i.hasClass)(t,"hide")||(t.className=""),t.removeAttribute("style"),t.removeAttribute("dir"),(0,i.removeAttribute)(t,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.cellRenderer(e,s,t),this.table.isAriaEnabled())(0,i.setAttribute)(t,[...t.hasAttribute("role")?[]:[(0,a.A11Y_GRIDCELL)()],(0,a.A11Y_TABINDEX)(-1),(0,a.A11Y_COLINDEX)(s+(null!==(n=null===(r=this.table.rowUtils)||void 0===r||null===(r=r.dataAccessObject)||void 0===r?void 0:r.rowHeaders.length)&&void 0!==n?n:0)+1)])}c.end()}}}t.default=h},73827:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(77140)),i=o(83119),r=o(28927),l=o(9893);let a=!1;class h extends n.default{constructor(e){super(null,e)}adjust(){const{columnsToRender:e,rowHeadersCount:t}=this.table,o=e+t;for(;this.renderedNodes<o;)this.rootNode.appendChild(this.table.rootDocument.createElement("col")),this.renderedNodes+=1;for(;this.renderedNodes>o;)this.rootNode.removeChild(this.rootNode.lastChild),this.renderedNodes-=1}render(){this.adjust();const{columnsToRender:e,rowHeadersCount:t}=this.table;!a&&e>1e3&&(a=!0,(0,i.warn)(r.toSingleLine`Performance tip: Handsontable rendered more than 1000 visible columns.\x20
32
32
  Consider limiting the number of rendered columns by specifying the table width and/or\x20
33
33
  turning off the "renderAllColumns" option.`));for(let e=0;e<t;e++){const t=this.table.renderedColumnToSource(e),o=this.table.columnUtils.getHeaderWidth(t);this.rootNode.childNodes[e].style.width=`${o}px`}for(let o=0;o<e;o++){const e=this.table.renderedColumnToSource(o),s=this.table.columnUtils.getStretchedColumnWidth(e);this.rootNode.childNodes[o+t].style.width=`${s}px`}const o=this.rootNode.firstChild;o&&(0,l.addClass)(o,"rowHeader")}}t.default=h},85680:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=o(9893),i=s(o(77140)),r=o(92692);class l extends i.default{constructor(e){super(null,e)}adjust(){const{columnHeadersCount:e,rowHeadersCount:t}=this.table;let o=this.rootNode.firstChild;if(e){const{columnsToRender:s}=this.table,n=s+t;for(let t=0,s=e;t<s;t++){for(o=this.rootNode.childNodes[t],o||(o=this.table.rootDocument.createElement("tr"),this.rootNode.appendChild(o)),this.renderedNodes=o.childNodes.length;this.renderedNodes<n;)o.appendChild(this.table.rootDocument.createElement("th")),this.renderedNodes+=1;for(;this.renderedNodes>n;)o.removeChild(o.lastChild),this.renderedNodes-=1}const i=this.rootNode.childNodes.length;if(i>e)for(let t=e;t<i;t++)this.rootNode.removeChild(this.rootNode.lastChild)}else o&&(0,n.empty)(o)}render(){const{columnHeadersCount:e}=this.table;this.table.isAriaEnabled()&&(0,n.setAttribute)(this.rootNode,[(0,r.A11Y_ROWGROUP)()]);for(let t=0;t<e;t+=1){const{columnHeaderFunctions:e,columnsToRender:o,rowHeadersCount:s}=this.table,i=this.rootNode.childNodes[t];this.table.isAriaEnabled()&&(0,n.setAttribute)(i,[(0,r.A11Y_ROW)(),(0,r.A11Y_ROWINDEX)(t+1)]);for(let l=-1*s;l<o;l+=1){const o=this.table.renderedColumnToSource(l),a=i.childNodes[l+s];a.className="",a.removeAttribute("style"),(0,n.removeAttribute)(a,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.isAriaEnabled()&&(0,n.setAttribute)(a,[(0,r.A11Y_COLINDEX)(l+1+this.table.rowHeadersCount),(0,r.A11Y_TABINDEX)(-1),(0,r.A11Y_COLUMNHEADER)(),...l>=0?[(0,r.A11Y_SCOPE_COL)()]:[(0,r.A11Y_ROW)()]]),e[t](o,a,t)}}}}t.default=l},20524:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(14348));t.RowHeadersRenderer=n.default;var i=s(o(85680));t.ColumnHeadersRenderer=i.default;var r=s(o(73827));t.ColGroupRenderer=r.default;var l=s(o(88371));t.RowsRenderer=l.default;var a=s(o(83553));t.CellsRenderer=a.default;var h=s(o(67016));t.TableRenderer=h.default;t.Renderer=class{constructor(){let{TABLE:e,THEAD:t,COLGROUP:o,TBODY:s,rowUtils:c,columnUtils:u,cellRenderer:d}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.renderer=new h.default(e,{cellRenderer:d}),this.renderer.setRenderers({rowHeaders:new n.default,columnHeaders:new i.default(t),colGroup:new r.default(o),rows:new l.default(s),cells:new a.default}),this.renderer.setAxisUtils(c,u)}setActiveOverlayName(e){return this.renderer.setActiveOverlayName(e),this}setFilters(e,t){return this.renderer.setFilters(e,t),this}setViewportSize(e,t){return this.renderer.setViewportSize(e,t),this}setHeaderContentRenderers(e,t){return this.renderer.setHeaderContentRenderers(e,t),this}adjust(){this.renderer.adjust()}render(){this.renderer.render()}}},14348:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707)),i=o(21682),r=s(o(77140)),l=o(9893),a=o(92692);class h extends r.default{constructor(){super("TH"),(0,n.default)(this,"orderViews",new WeakMap),(0,n.default)(this,"sourceRowIndex",0)}obtainOrderView(e){let t;return this.orderViews.has(e)?t=this.orderViews.get(e):(t=new i.SharedOrderView(e,(e=>this.nodesPool.obtain(this.sourceRowIndex,e)),this.nodeType),this.orderViews.set(e,t)),t}render(){const{rowsToRender:e,rowHeaderFunctions:t,rowHeadersCount:o,rows:s,cells:n}=this.table;for(let i=0;i<e;i++){const e=this.table.renderedRowToSource(i),r=s.getRenderedNode(i);this.sourceRowIndex=e;const h=this.obtainOrderView(r),c=n.obtainOrderView(r);h.appendView(c).setSize(o).setOffset(this.table.renderedColumnToSource(0)).start();for(let s=0;s<o;s++){h.render();const o=h.getCurrentNode();o.className="",o.removeAttribute("style"),(0,l.removeAttribute)(o,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.isAriaEnabled()&&(0,l.setAttribute)(o,[(0,a.A11Y_ROWHEADER)(),(0,a.A11Y_SCOPE_ROW)(),(0,a.A11Y_COLINDEX)(s+1),(0,a.A11Y_TABINDEX)(-1)]),t[s](e,o,s)}h.end()}}}t.default=h},88371:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707)),i=s(o(77140)),r=o(83119),l=o(28927),a=o(21682),h=o(9893),c=o(92692);const u="ht__row_even",d="ht__row_odd";let g=!1;class f extends i.default{constructor(e){super("TR",e),(0,n.default)(this,"orderView",void 0),this.orderView=new a.OrderView(e,(e=>this.nodesPool.obtain(e)),this.nodeType)}getRenderedNode(e){return this.orderView.getNode(e)}render(){const{rowsToRender:e}=this.table;!g&&e>1e3&&(g=!0,(0,r.warn)(l.toSingleLine`Performance tip: Handsontable rendered more than 1000 visible rows.\x20
34
34
  Consider limiting the number of rendered rows by specifying the table height and/or\x20
35
- turning off the "renderAllRows" option.`)),this.table.isAriaEnabled()&&(0,h.setAttribute)(this.rootNode,[(0,c.A11Y_ROWGROUP)()]),this.orderView.setSize(e).setOffset(this.table.renderedRowToSource(0)).start();for(let s=0;s<e;s++){this.orderView.render();const e=this.orderView.getCurrentNode(),n=this.table.renderedRowToSource(s);var t,o;if(this.table.isAriaEnabled())(0,h.setAttribute)(e,[(0,c.A11Y_ROW)(),(0,c.A11Y_ROWINDEX)(n+(null!==(t=null===(o=this.table.rowUtils)||void 0===o||null===(o=o.dataAccessObject)||void 0===o?void 0:o.columnHeaders.length)&&void 0!==t?t:0)+1)]);(0,h.removeClass)(e,[u,d]),(n+1)%2==0?(0,h.addClass)(e,u):(0,h.addClass)(e,d)}this.orderView.end()}}t.default=f},67016:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707));t.default=class{constructor(e){let{cellRenderer:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,n.default)(this,"rootNode",void 0),(0,n.default)(this,"rootDocument",void 0),(0,n.default)(this,"rowHeaders",null),(0,n.default)(this,"columnHeaders",null),(0,n.default)(this,"colGroup",null),(0,n.default)(this,"rows",null),(0,n.default)(this,"cells",null),(0,n.default)(this,"rowFilter",null),(0,n.default)(this,"columnFilter",null),(0,n.default)(this,"rowUtils",null),(0,n.default)(this,"columnUtils",null),(0,n.default)(this,"rowsToRender",0),(0,n.default)(this,"columnsToRender",0),(0,n.default)(this,"rowHeaderFunctions",[]),(0,n.default)(this,"rowHeadersCount",0),(0,n.default)(this,"columnHeaderFunctions",[]),(0,n.default)(this,"columnHeadersCount",0),(0,n.default)(this,"cellRenderer",void 0),(0,n.default)(this,"activeOverlayName",void 0),this.rootNode=e,this.rootDocument=this.rootNode.ownerDocument,this.cellRenderer=t}setActiveOverlayName(e){this.activeOverlayName=e}setAxisUtils(e,t){this.rowUtils=e,this.columnUtils=t}setViewportSize(e,t){this.rowsToRender=e,this.columnsToRender=t}setFilters(e,t){this.rowFilter=e,this.columnFilter=t}setHeaderContentRenderers(e,t){this.rowHeaderFunctions=e,this.rowHeadersCount=e.length,this.columnHeaderFunctions=t,this.columnHeadersCount=t.length}setRenderers(){let{rowHeaders:e,columnHeaders:t,colGroup:o,rows:s,cells:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.setTable(this),t.setTable(this),o.setTable(this),s.setTable(this),n.setTable(this),this.rowHeaders=e,this.columnHeaders=t,this.colGroup=o,this.rows=s,this.cells=n}renderedRowToSource(e){return this.rowFilter.renderedToSource(e)}renderedColumnToSource(e){return this.columnFilter.renderedToSource(e)}isAriaEnabled(){return this.rowUtils.wtSettings.getSetting("ariaTags")}render(){this.colGroup.adjust(),this.columnHeaders.adjust(),this.rows.adjust(),this.rowHeaders.adjust(),this.columnHeaders.render(),this.rows.render(),this.rowHeaders.render(),this.cells.render(),this.columnUtils.calculateWidths(),this.colGroup.render();const{rowsToRender:e,rows:t}=this;for(let o=0;o<e;o++){const e=t.getRenderedNode(o);if(e.firstChild){const t=this.renderedRowToSource(o),s=this.rowUtils.getHeightByOverlayName(t,this.activeOverlayName);e.firstChild.style.height=s?s-1+"px":""}}}}},61677:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=s(o(85707)),i=o(9893);function r(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function l(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var a=new WeakSet;function h(e){const{wtSettings:t,inlineStartOverlay:o,wtTable:s,wtViewport:n,totalColumns:r,rootWindow:l}=this.dataAccessObject;if(o.mainTableScrollableElement===l){let a=null;if(t.getSetting("rtlMode")){const e=s.TABLE.getBoundingClientRect(),t=this.dataAccessObject.rootWindow.document.documentElement.offsetWidth;a=Math.abs(e.right-t)}else{a=(0,i.offset)(s.wtRootElement).left}const h=Math.abs((0,i.getScrollLeft)(l,l));if(a>h){const t=(0,i.innerWidth)(l);let s=n.getRowHeaderWidth();for(let n=1;n<=r;n++)if(s+=o.sumCellSizes(n-1,n),a+s-h>=t){e=n-2;break}}}return e}function c(e){const{topOverlay:t,wtTable:o,wtViewport:s,totalRows:n,rootWindow:r}=this.dataAccessObject;if(t.mainTableScrollableElement===r){const l=(0,i.offset)(o.wtRootElement),a=(0,i.getScrollTop)(r,r);if(l.top>a){const o=(0,i.innerHeight)(r);let h=s.getColumnHeaderHeight();for(let s=1;s<=n;s++)if(h+=t.sumCellSizes(s-1,s),l.top+h-a>=o){e=s-2;break}}}return e}t.default=class{constructor(e){r(this,a),(0,n.default)(this,"dataAccessObject",void 0),this.dataAccessObject=e}scrollViewport(e,t,o,s,n){const i=this.scrollViewportHorizontally(e.col,o,n),r=this.scrollViewportVertically(e.row,t,s);return i||r}scrollViewportHorizontally(e,t,o){const{drawn:s,totalColumns:n}=this.dataAccessObject;if(!s||!Number.isInteger(e)||e<0||e>n)return!1;const i=void 0===t&&void 0===o,{fixedColumnsStart:r,inlineStartOverlay:l}=this.dataAccessObject;if(i&&e<r)return!1;if(e=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollHorizontally",e),!Number.isInteger(e)||e<0||e>n)return!1;const a=this.getFirstVisibleColumn(),h=this.getLastVisibleColumn();let c=!1;return(i&&(e<a||e>h)||!i)&&(c=l.scrollTo(e,i?e>=this.getLastPartiallyVisibleColumn():t)),c}scrollViewportVertically(e,t,o){const{drawn:s,totalRows:n}=this.dataAccessObject;if(!s||!Number.isInteger(e)||e<0||e>n)return!1;const i=void 0===t&&void 0===o,{fixedRowsBottom:r,fixedRowsTop:l,topOverlay:a}=this.dataAccessObject;if(i&&(e<l||e>n-r-1))return!1;if(e=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollVertically",e),!Number.isInteger(e)||e<0||e>n)return!1;const h=this.getFirstVisibleRow(),c=this.getLastVisibleRow();let u=!1;return(i&&(e<h||e>c)||!i)&&(u=a.scrollTo(e,i?e>=this.getLastPartiallyVisibleRow():o)),u}getFirstVisibleRow(){return this.dataAccessObject.wtTable.getFirstVisibleRow()}getLastVisibleRow(){return l(a,this,c).call(this,this.dataAccessObject.wtTable.getLastVisibleRow())}getFirstPartiallyVisibleRow(){return this.dataAccessObject.wtTable.getFirstPartiallyVisibleRow()}getLastPartiallyVisibleRow(){return l(a,this,c).call(this,this.dataAccessObject.wtTable.getLastPartiallyVisibleRow())}getFirstVisibleColumn(){return this.dataAccessObject.wtTable.getFirstVisibleColumn()}getLastVisibleColumn(){return l(a,this,h).call(this,this.dataAccessObject.wtTable.getLastVisibleColumn())}getFirstPartiallyVisibleColumn(){return this.dataAccessObject.wtTable.getFirstPartiallyVisibleColumn()}getLastPartiallyVisibleColumn(){return l(a,this,h).call(this,this.dataAccessObject.wtTable.getLastPartiallyVisibleColumn())}}},15934:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(9893),n=o(79729),i=o(13911),r=o(28890),l=o(30563);t.default=class{constructor(e,t){t&&(this.eventManager=e.eventManager,this.instance=e,this.wot=e,this.settings=t,this.mouseDown=!1,this.main=null,this.top=null,this.bottom=null,this.start=null,this.end=null,this.topStyle=null,this.bottomStyle=null,this.startStyle=null,this.endStyle=null,this.cornerDefaultStyle=l.CORNER_DEFAULT_STYLE,this.cornerCenterPointOffset=-parseInt(this.cornerDefaultStyle.width,10)/2,this.corner=null,this.cornerStyle=null,this.createBorders(t),this.registerListeners())}registerListeners(){const e=this.wot.rootDocument.body;this.eventManager.addEventListener(e,"mousedown",(()=>this.onMouseDown())),this.eventManager.addEventListener(e,"mouseup",(()=>this.onMouseUp()));for(let e=0,t=this.main.childNodes.length;e<t;e++){const t=this.main.childNodes[e];this.eventManager.addEventListener(t,"mouseenter",(t=>this.onMouseEnter(t,this.main.childNodes[e])))}}onMouseDown(){this.mouseDown=!0}onMouseUp(){this.mouseDown=!1}onMouseEnter(e,t){if(!this.mouseDown||!this.wot.getSetting("hideBorderOnMouseDownOver"))return;e.preventDefault(),(0,n.stopImmediatePropagation)(e);const o=this,s=this.wot.rootDocument.body,i=t.getBoundingClientRect();t.style.display="none",this.eventManager.addEventListener(s,"mousemove",(function e(n){var r;((r=n).clientY<Math.floor(i.top)||r.clientY>Math.ceil(i.top+i.height)||r.clientX<Math.floor(i.left)||r.clientX>Math.ceil(i.left+i.width))&&(o.eventManager.removeEventListener(s,"mousemove",e),t.style.display="block")}))}createBorders(e){const{rootDocument:t}=this.wot;this.main=t.createElement("div");const o=["top","start","bottom","end","corner"];let s=this.main.style;s.position="absolute",s.top=0,s.left=0;for(let n=0;n<5;n++){const i=o[n],r=t.createElement("div");r.className=`wtBorder ${this.settings.className||""}`,this.settings[i]&&this.settings[i].hide&&(r.className+=" hidden"),s=r.style,s.backgroundColor=this.settings[i]&&this.settings[i].color?this.settings[i].color:e.border.color,s.height=this.settings[i]&&this.settings[i].width?`${this.settings[i].width}px`:`${e.border.width}px`,s.width=this.settings[i]&&this.settings[i].width?`${this.settings[i].width}px`:`${e.border.width}px`,this.main.appendChild(r)}this.top=this.main.childNodes[0],this.start=this.main.childNodes[1],this.bottom=this.main.childNodes[2],this.end=this.main.childNodes[3],this.topStyle=this.top.style,this.startStyle=this.start.style,this.bottomStyle=this.bottom.style,this.endStyle=this.end.style,this.corner=this.main.childNodes[4],this.corner.className+=" corner",this.cornerStyle=this.corner.style,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.height=this.cornerDefaultStyle.height,this.cornerStyle.border=[this.cornerDefaultStyle.borderWidth,this.cornerDefaultStyle.borderStyle,this.cornerDefaultStyle.borderColor].join(" "),(0,r.isMobileBrowser)()&&this.instance.getSetting("isDataViewInstance")&&this.createMultipleSelectorHandles(),this.disappear();const{wtTable:n}=this.wot;let i=n.bordersHolder;i||(i=t.createElement("div"),i.className="htBorders",n.bordersHolder=i,n.spreader.appendChild(i)),i.appendChild(this.main)}createMultipleSelectorHandles(){const{rootDocument:e}=this.wot;this.selectionHandles={top:e.createElement("DIV"),topHitArea:e.createElement("DIV"),bottom:e.createElement("DIV"),bottomHitArea:e.createElement("DIV")};this.selectionHandles.top.className="topSelectionHandle topLeftSelectionHandle",this.selectionHandles.topHitArea.className="topSelectionHandle-HitArea topLeftSelectionHandle-HitArea",this.selectionHandles.bottom.className="bottomSelectionHandle bottomRightSelectionHandle",this.selectionHandles.bottomHitArea.className="bottomSelectionHandle-HitArea bottomRightSelectionHandle-HitArea",this.selectionHandles.styles={top:this.selectionHandles.top.style,topHitArea:this.selectionHandles.topHitArea.style,bottom:this.selectionHandles.bottom.style,bottomHitArea:this.selectionHandles.bottomHitArea.style};const t={position:"absolute",height:"40px",width:"40px","border-radius":`${parseInt(40/1.5,10)}px`};(0,i.objectEach)(t,((e,t)=>{this.selectionHandles.styles.bottomHitArea[t]=e,this.selectionHandles.styles.topHitArea[t]=e}));const o={position:"absolute",height:"10px",width:"10px","border-radius":`${parseInt(10/1.5,10)}px`,background:"#F5F5FF",border:"1px solid #4285c8"};(0,i.objectEach)(o,((e,t)=>{this.selectionHandles.styles.bottom[t]=e,this.selectionHandles.styles.top[t]=e})),this.main.appendChild(this.selectionHandles.top),this.main.appendChild(this.selectionHandles.bottom),this.main.appendChild(this.selectionHandles.topHitArea),this.main.appendChild(this.selectionHandles.bottomHitArea)}isPartRange(e,t){const o=this.wot.selectionManager.getAreaSelection();return!(!o.cellRange||e===o.cellRange.to.row&&t===o.cellRange.to.col)}updateMultipleSelectionHandlesPosition(e,t,o,s,n,i){const r=this.wot.wtSettings.getSetting("rtlMode")?"right":"left",{top:l,topHitArea:a,bottom:h,bottomHitArea:c}=this.selectionHandles.styles,u=parseInt(l.borderWidth,10),d=parseInt(l.width,10),g=parseInt(a.width,10),f=this.wot.wtTable.getWidth(),p=this.wot.wtTable.getHeight();l.top=`${parseInt(o-d-1,10)}px`,l[r]=`${parseInt(s-d-1,10)}px`,a.top=`${parseInt(o-g/4*3,10)}px`,a[r]=`${parseInt(s-g/4*3,10)}px`;const m=Math.min(parseInt(s+n,10),f-d-2*u),w=Math.min(parseInt(s+n-g/4,10),f-g-2*u);h[r]=`${m}px`,c[r]=`${w}px`;const C=Math.min(parseInt(o+i,10),p-d-2*u),v=Math.min(parseInt(o+i-g/4,10),p-g-2*u);h.top=`${C}px`,c.top=`${v}px`,this.settings.border.cornerVisible&&this.settings.border.cornerVisible()?(l.display="block",a.display="block",this.isPartRange(e,t)?(h.display="none",c.display="none"):(h.display="block",c.display="block")):(l.display="none",h.display="none",a.display="none",c.display="none"),e===this.wot.wtSettings.getSetting("fixedRowsTop")||t===this.wot.wtSettings.getSetting("fixedColumnsStart")?(l.zIndex="9999",a.zIndex="9999"):(l.zIndex="",a.zIndex="")}appear(e){if(this.disabled)return;const{wtTable:t,rootDocument:o,rootWindow:n}=this.wot;let i,l,a,h,c,u;const d=t.getRenderedRowsCount();for(let o=0;o<d;o+=1){const s=t.rowFilter.renderedToSource(o);if(s>=e[0]&&s<=e[2]){i=s,c=e[0];break}}for(let o=d-1;o>=0;o-=1){const s=t.rowFilter.renderedToSource(o);if(s>=e[0]&&s<=e[2]){l=s;break}}const g=t.getRenderedColumnsCount();for(let o=0;o<g;o+=1){const s=t.columnFilter.renderedToSource(o);if(s>=e[1]&&s<=e[3]){a=s,u=e[1];break}}for(let o=g-1;o>=0;o-=1){const s=t.columnFilter.renderedToSource(o);if(s>=e[1]&&s<=e[3]){h=s;break}}if(void 0===i||void 0===a)return void this.disappear();let f=t.getCell(this.wot.createCellCoords(i,a));const p=i!==l||a!==h,m=p?t.getCell(this.wot.createCellCoords(l,h)):f,w=(0,s.offset)(f),C=p?(0,s.offset)(m):w,v=(0,s.offset)(t.TABLE),y=(0,s.outerWidth)(t.TABLE),E=w.top,S=w.left,R=this.wot.wtSettings.getSetting("rtlMode");let b=0,_=0;if(R){const e=(0,s.outerWidth)(f),t=n.innerWidth-v.left-y;_=S+e-C.left,b=n.innerWidth-S-e-t-1}else _=C.left+(0,s.outerWidth)(m)-S,b=S-v.left-1;if(this.isEntireColumnSelected(i,l)){const e=this.getDimensionsFromHeader("columns",a,h,c,v);let t=null;e&&([t,b,_]=e),t&&(f=t)}let T=E-v.top-1,M=C.top+(0,s.outerHeight)(m)-E;if(this.isEntireRowSelected(a,h)){const e=this.getDimensionsFromHeader("rows",i,l,u,v);let t=null;e&&([t,T,M]=e),t&&(f=t)}const O=n.getComputedStyle(f);parseInt(O.borderTopWidth,10)>0&&(T+=1,M=M>0?M-1:0),parseInt(O[R?"borderRightWidth":"borderLeftWidth"],10)>0&&(b+=1,_=_>0?_-1:0);const I=R?"right":"left";this.topStyle.top=`${T}px`,this.topStyle[I]=`${b}px`,this.topStyle.width=`${_}px`,this.topStyle.display="block",this.startStyle.top=`${T}px`,this.startStyle[I]=`${b}px`,this.startStyle.height=`${M}px`,this.startStyle.display="block";const N=Math.floor(this.settings.border.width/2);this.bottomStyle.top=T+M-N+"px",this.bottomStyle[I]=`${b}px`,this.bottomStyle.width=`${_}px`,this.bottomStyle.display="block",this.endStyle.top=`${T}px`,this.endStyle[I]=b+_-N+"px",this.endStyle.height=`${M+1}px`,this.endStyle.display="block";let A=this.settings.border.cornerVisible;A="function"==typeof A?A(this.settings.layerLevel):A;const P=this.wot.getSetting("onModifyGetCellCoords",l,h);let[x,H]=[l,h];if(P&&Array.isArray(P)&&([,,x,H]=P),(0,r.isMobileBrowser)()||!A||this.isPartRange(x,H))this.cornerStyle.display="none";else{this.cornerStyle.top=T+M+this.cornerCenterPointOffset-1+"px",this.cornerStyle[I]=b+_+this.cornerCenterPointOffset-1+"px",this.cornerStyle.borderRightWidth=this.cornerDefaultStyle.borderWidth,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.display="none";let e=(0,s.getTrimmingContainer)(t.TABLE);const i=e===n;i&&(e=o.documentElement);const r=parseInt(this.cornerDefaultStyle.width,10)/2,a=parseInt(this.cornerDefaultStyle.height,10)/2;if(h===this.wot.getSetting("totalColumns")-1){const t=i?m.getBoundingClientRect().left:m.offsetLeft;let o=!1,n=0;R?(n=t-parseInt(this.cornerDefaultStyle.width,10)/2,o=n<0):(n=t+(0,s.outerWidth)(m)+parseInt(this.cornerDefaultStyle.width,10)/2,o=n>=(0,s.innerWidth)(e)),o&&(this.cornerStyle[I]=`${Math.floor(b+_+this.cornerCenterPointOffset-r)}px`,this.cornerStyle[R?"borderLeftWidth":"borderRightWidth"]=0)}if(l===this.wot.getSetting("totalRows")-1){(i?m.getBoundingClientRect().top:m.offsetTop)+(0,s.outerHeight)(m)+parseInt(this.cornerDefaultStyle.height,10)/2>=(0,s.innerHeight)(e)&&(this.cornerStyle.top=`${Math.floor(T+M+this.cornerCenterPointOffset-a)}px`,this.cornerStyle.borderBottomWidth=0)}this.cornerStyle.display="block"}(0,r.isMobileBrowser)()&&this.instance.getSetting("isDataViewInstance")&&this.updateMultipleSelectionHandlesPosition(l,h,T,b,_,M)}isEntireColumnSelected(e,t){return e===this.wot.wtTable.getFirstRenderedRow()&&t===this.wot.wtTable.getLastRenderedRow()}isEntireRowSelected(e,t){return e===this.wot.wtTable.getFirstRenderedColumn()&&t===this.wot.wtTable.getLastRenderedColumn()}getDimensionsFromHeader(e,t,o,n,i){const{wtTable:r}=this.wot,l=r.wtRootElement.parentNode;let a=null,h=null,c=null,u=null,d=null,g=null,f=null,p=null;switch(e){case"rows":a=function(){return r.getRowHeader(...arguments)},h=function(){return(0,s.outerHeight)(...arguments)},c="ht__selection--rows",g="top";break;case"columns":a=function(){return r.getColumnHeader(...arguments)},h=function(){return(0,s.outerWidth)(...arguments)},c="ht__selection--columns",g="left"}if(l.classList.contains(c)){const e=this.wot.getSetting("columnHeaders").length;if(f=a(t,e-n),p=a(o,e-n),!f||!p)return!1;const r=(0,s.offset)(f),l=(0,s.offset)(p);return f&&p&&(u=r[g]-i[g]-1,d=l[g]+h(p)-r[g]),[f,u,d]}return!1}changeBorderStyle(e,t){const o=this[e].style,n=t[e];!n||n.hide?(0,s.addClass)(this[e],"hidden"):((0,s.hasClass)(this[e],"hidden")&&(0,s.removeClass)(this[e],"hidden"),o.backgroundColor=n.color,"top"!==e&&"bottom"!==e||(o.height=`${n.width}px`),"start"!==e&&"end"!==e||(o.width=`${n.width}px`))}changeBorderToDefaultStyle(e){const t=1,o="#000",s=this[e].style;s.backgroundColor=o,s.width=`${t}px`,s.height=`${t}px`}toggleHiddenClass(e,t){this.changeBorderToDefaultStyle(e),t?(0,s.addClass)(this[e],"hidden"):(0,s.removeClass)(this[e],"hidden")}disappear(){this.topStyle.display="none",this.bottomStyle.display="none",this.startStyle.display="none",this.endStyle.display="none",this.cornerStyle.display="none",(0,r.isMobileBrowser)()&&this.instance.getSetting("isDataViewInstance")&&(this.selectionHandles.styles.top.display="none",this.selectionHandles.styles.topHitArea.display="none",this.selectionHandles.styles.bottom.display="none",this.selectionHandles.styles.bottomHitArea.display="none")}destroy(){this.eventManager.destroyWithOwnEventsOnly(),this.main.parentNode.removeChild(this.main)}}},30563:(e,t)=>{"use strict";t.__esModule=!0;t.CORNER_DEFAULT_STYLE=Object.freeze({width:"6px",height:"6px",borderWidth:"1px",borderStyle:"solid",borderColor:"#FFF"})},30782:(e,t)=>{"use strict";t.__esModule=!0;t.ACTIVE_HEADER_TYPE="active-header",t.HEADER_TYPE="header",t.AREA_TYPE="area",t.FOCUS_TYPE="focus",t.FILL_TYPE="fill",t.ROW_TYPE="row",t.COLUMN_TYPE="column",t.CUSTOM_SELECTION_TYPE="custom-selection"},98779:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n={SelectionManager:!0,Selection:!0},i=s(o(8313));t.Selection=i.default;var r=o(30782);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===r[e]||(t[e]=r[e]))}));var l=o(30563);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===l[e]||(t[e]=l[e]))}));var a=o(42492);t.SelectionManager=a.SelectionManager},42492:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724),o(25352),o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var n=o(9893),i=o(51785),r=s(o(15934));function l(e,t,o){a(e,t),t.set(e,o)}function a(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function h(e,t){return e.get(u(e,t))}function c(e,t,o){return e.set(u(e,t),o),o}function u(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var d=new WeakMap,g=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,w=new WeakMap,C=new WeakSet;function v(){const e=h(p,this).get(h(d,this)),t=h(d,this).wtSettings.getSetting("onBeforeRemoveCellClassNames");if(Array.isArray(t))for(let o=0;o<t.length;o++)e.add(t[o]);e.forEach((e=>{var t,o;const s=h(d,this).wtTable.TABLE.querySelectorAll(`.${e}`);let i=[];Array.isArray(null===(t=h(g,this).options)||void 0===t?void 0:t.cellAttributes)&&(i=h(g,this).options.cellAttributes.map((e=>e[0]))),Array.isArray(null===(o=h(g,this).options)||void 0===o?void 0:o.headerAttributes)&&(i=[...i,...h(g,this).options.headerAttributes.map((e=>e[0]))]);for(let t=0,o=s.length;t<o;t++)(0,n.removeClass)(s[t],e),(0,n.removeAttribute)(s[t],i)})),e.clear()}t.SelectionManager=class{constructor(e){var t,o;a(t=this,o=C),o.add(t),l(this,d,void 0),l(this,g,void 0),l(this,f,new i.SelectionScanner),l(this,p,new WeakMap),l(this,m,new WeakSet),l(this,w,new Map),c(g,this,e)}setActiveOverlay(e){return c(d,this,e),h(f,this).setActiveOverlay(h(d,this)),h(p,this).has(h(d,this))||h(p,this).set(h(d,this),new Set),this}getFocusSelection(){return null!==h(g,this)?h(g,this).getFocus():null}getAreaSelection(){return null!==h(g,this)?h(g,this).createLayeredArea():null}getBorderInstance(e){if(!e.settings.border)return null;if(h(w,this).has(e)){const t=h(w,this).get(e);if(t.has(h(d,this)))return t.get(h(d,this));const o=new r.default(h(d,this),e.settings);return t.set(h(d,this),o),o}const t=new r.default(h(d,this),e.settings);return h(w,this).set(e,new Map([[h(d,this),t]])),t}getBorderInstances(e){var t,o;return Array.from(null!==(t=null===(o=h(w,this).get(e))||void 0===o?void 0:o.values())&&void 0!==t?t:[])}destroyBorders(e){h(w,this).get(e).forEach((e=>e.destroy())),h(w,this).delete(e)}render(e){if(null===h(g,this))return;e&&u(C,this,v).call(this);const t=Array.from(h(g,this)),o=new Map,s=new Map;for(let e=0;e<t.length;e++){const n=t[e],{className:i,headerAttributes:r,createLayers:l,selectionType:a}=n.settings;h(m,this).has(n)||(h(m,this).add(n),n.addLocalHook("destroy",(()=>this.destroyBorders(n))));const c=this.getBorderInstance(n);if(n.isEmpty()){null==c||c.disappear();continue}if(i){h(f,this).setActiveSelection(n).scan().forEach((e=>{if(o.has(e)){const t=o.get(e);t.has(i)&&!0===l?t.set(i,t.get(i)+1):t.set(i,1)}else o.set(e,new Map([[i,1]]));r&&(s.has(e)||s.set(e,[]),"TH"===e.nodeName&&s.get(e).push(...r))}))}const u=n.getCorners();h(d,this).getSetting("onBeforeDrawBorders",u,a),null==c||c.appear(u)}o.forEach(((e,t)=>{var o;const s=Array.from(e).map((e=>{let[t,o]=e;return 1===o?t:[t,...Array.from({length:o-1},((e,o)=>`${t}-${o+1}`))]})).flat();s.forEach((e=>h(p,this).get(h(d,this)).add(e))),(0,n.addClass)(t,s),"TD"===t.nodeName&&Array.isArray(null===(o=h(g,this).options)||void 0===o?void 0:o.cellAttributes)&&(0,n.setAttribute)(t,h(g,this).options.cellAttributes)})),Array.from(s.keys()).forEach((e=>{(0,n.setAttribute)(e,[...s.get(e)])}))}}},51785:(e,t,o)=>{"use strict";t.__esModule=!0,o(67834),o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var s=o(9893);function n(e,t,o){i(e,t),t.set(e,o)}function i(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function r(e,t){return e.get(a(e,t))}function l(e,t,o){return e.set(a(e,t),o),o}function a(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var h=new WeakMap,c=new WeakMap,u=new WeakSet;function d(e){const{wtTable:t}=r(c,this),o=t.getRenderedRowsCount(),s=t.getRenderedColumnsCount();for(let n=0;n<o;n+=1){const o=t.rowFilter.renderedToSource(n);for(let n=0;n<s;n+=1)e(o,t.columnFilter.renderedToSource(n))}}t.SelectionScanner=class{constructor(){var e,t;i(e=this,t=u),t.add(e),n(this,h,void 0),n(this,c,void 0)}setActiveOverlay(e){return l(c,this,e),this}setActiveSelection(e){return l(h,this,e),this}scan(){const e=r(h,this).settings.selectionType,t=new Set;return"active-header"===e?(this.scanColumnsInHeadersRange((e=>t.add(e))),this.scanRowsInHeadersRange((e=>t.add(e)))):"area"===e?this.scanCellsRange((e=>t.add(e))):"focus"===e?(this.scanColumnsInHeadersRange((e=>t.add(e))),this.scanRowsInHeadersRange((e=>t.add(e))),this.scanCellsRange((e=>t.add(e)))):"fill"===e?this.scanCellsRange((e=>t.add(e))):"header"===e?(this.scanColumnsInHeadersRange((e=>t.add(e))),this.scanRowsInHeadersRange((e=>t.add(e)))):"row"===e?(this.scanRowsInHeadersRange((e=>t.add(e))),this.scanRowsInCellsRange((e=>t.add(e)))):"column"===e&&(this.scanColumnsInHeadersRange((e=>t.add(e))),this.scanColumnsInCellsRange((e=>t.add(e)))),t}scanColumnsInHeadersRange(e){const[t,o,s,n]=r(h,this).getCorners(),{wtTable:i}=r(c,this),l=i.getRenderedColumnsCount(),a=i.getColumnHeadersCount();let u=0;for(let d=-i.getRowHeadersCount();d<l;d++){const l=i.columnFilter.renderedToSource(d);if(!(l<o||l>n)){for(let d=-a;d<0;d++){if(d<t||d>s)continue;const g=d+a;let f=i.getColumnHeader(l,g);const p=r(c,this).getSetting("onBeforeHighlightingColumnHeader",l,g,{selectionType:r(h,this).settings.selectionType,columnCursor:u,selectionWidth:n-o+1});null!==p&&(p!==l&&(f=i.getColumnHeader(p,g)),e(f))}u+=1}}}scanRowsInHeadersRange(e){const[t,o,s,n]=r(h,this).getCorners(),{wtTable:i}=r(c,this),l=i.getRenderedRowsCount(),a=i.getRowHeadersCount();let u=0;for(let d=-i.getColumnHeadersCount();d<l;d++){const l=i.rowFilter.renderedToSource(d);if(!(l<t||l>s)){for(let d=-a;d<0;d++){if(d<o||d>n)continue;const g=d+a;let f=i.getRowHeader(l,g);const p=r(c,this).getSetting("onBeforeHighlightingRowHeader",l,g,{selectionType:r(h,this).settings.selectionType,rowCursor:u,selectionHeight:s-t+1});null!==p&&(p!==l&&(f=i.getRowHeader(p,g)),e(f))}u+=1}}}scanCellsRange(e){const[t,o,n,i]=r(h,this).getCorners(),{wtTable:l}=r(c,this);a(u,this,d).call(this,((a,u)=>{if(a>=t&&a<=n&&u>=o&&u<=i){const t=l.getCell(r(c,this).createCellCoords(a,u)),o=r(c,this).getSetting("onAfterDrawSelection",a,u,r(h,this).settings.layerLevel);"string"==typeof o&&(0,s.addClass)(t,o),e(t)}}))}scanRowsInCellsRange(e){const[t,,o]=r(h,this).getCorners(),{wtTable:s}=r(c,this);a(u,this,d).call(this,((n,i)=>{if(n>=t&&n<=o){const t=s.getCell(r(c,this).createCellCoords(n,i));e(t)}}))}scanColumnsInCellsRange(e){const[,t,,o]=r(h,this).getCorners(),{wtTable:s}=r(c,this);a(u,this,d).call(this,((n,i)=>{if(i>=t&&i<=o){const t=s.getCell(r(c,this).createCellCoords(n,i));e(t)}}))}}},8313:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=o(13911),i=s(o(63870));class r{constructor(e,t){this.settings=e,this.cellRange=t||null}isEmpty(){return null===this.cellRange}add(e){return this.isEmpty()?this.cellRange=this.settings.createCellRange(e):this.cellRange.expand(e),this}replace(e,t){if(!this.isEmpty()){if(this.cellRange.from.isEqual(e))return this.cellRange.from=t,!0;if(this.cellRange.to.isEqual(e))return this.cellRange.to=t,!0}return!1}clear(){return this.cellRange=null,this}getCorners(){const e=this.cellRange.getOuterTopStartCorner(),t=this.cellRange.getOuterBottomEndCorner();return[e.row,e.col,t.row,t.col]}destroy(){this.runLocalHooks("destroy")}}(0,n.mixin)(r,i.default);t.default=r},47241:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=s(o(85707)),i=o(9893),r=o(13911);t.default=class{constructor(e){(0,n.default)(this,"settings",{}),(0,n.default)(this,"defaults",Object.freeze(this.getDefaults())),(0,r.objectEach)(this.defaults,((t,o)=>{if(void 0!==e[o])this.settings[o]=e[o];else{if(void 0===t)throw new Error(`A required setting "${o}" was not provided`);this.settings[o]=t}}))}getDefaults(){return{facade:void 0,table:void 0,isDataViewInstance:!0,externalRowCalculator:!1,stretchH:"none",currentRowClassName:null,currentColumnClassName:null,preventOverflow:()=>!1,preventWheel:!1,data:void 0,freezeOverlays:!1,fixedColumnsStart:0,fixedRowsTop:0,fixedRowsBottom:0,shouldRenderInlineStartOverlay:()=>this.getSetting("fixedColumnsStart")>0||this.getSetting("rowHeaders").length>0,shouldRenderTopOverlay:()=>this.getSetting("fixedRowsTop")>0||this.getSetting("columnHeaders").length>0,shouldRenderBottomOverlay:()=>this.getSetting("fixedRowsBottom")>0,minSpareRows:0,rowHeaders:()=>[],columnHeaders:()=>[],totalRows:void 0,totalColumns:void 0,cellRenderer:(e,t,o)=>{const s=this.getSetting("data",e,t);(0,i.fastInnerText)(o,null==s?"":s)},columnWidth(){},rowHeight(){},rowHeightByOverlayName(){},defaultRowHeight:23,defaultColumnWidth:50,selections:null,hideBorderOnMouseDownOver:!1,viewportRowCalculatorOverride:null,viewportColumnCalculatorOverride:null,onCellMouseDown:null,onCellContextMenu:null,onCellMouseOver:null,onCellMouseOut:null,onCellMouseUp:null,onCellDblClick:null,onCellCornerMouseDown:null,onCellCornerDblClick:null,beforeDraw:null,onDraw:null,onBeforeRemoveCellClassNames:null,onAfterDrawSelection:null,onBeforeDrawBorders:null,onBeforeViewportScrollHorizontally:e=>e,onBeforeViewportScrollVertically:e=>e,onScrollHorizontally:null,onScrollVertically:null,onBeforeTouchScroll:null,onAfterMomentumScroll:null,onBeforeStretchingColumnWidth:e=>e,onModifyRowHeaderWidth:null,onModifyGetCellCoords:null,onBeforeHighlightingRowHeader:e=>e,onBeforeHighlightingColumnHeader:e=>e,onWindowResize:null,onContainerElementResize:null,renderAllColumns:!1,renderAllRows:!1,groups:!1,rowHeaderWidth:null,columnHeaderHeight:null,headerClassName:null,rtlMode:!1,ariaTags:!0}}update(e,t){return void 0===t?(0,r.objectEach)(e,((e,t)=>{this.settings[t]=e})):this.settings[e]=t,this}getSetting(e,t,o,s,n){return"function"==typeof this.settings[e]?this.settings[e](t,o,s,n):void 0!==t&&Array.isArray(this.settings[e])?this.settings[e][t]:this.settings[e]}getSettingPure(e){return this.settings[e]}has(e){return!!this.settings[e]}}},63646:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(9893),r=o(78832),l=s(o(16979)),a=s(o(39277)),h=o(20524),c=s(o(87736)),u=s(o(46372)),d=o(34009),g=o(92692);t.default=class{constructor(e,t,o,s,r){(0,n.default)(this,"wtSettings",null),(0,n.default)(this,"domBindings",void 0),(0,n.default)(this,"TBODY",null),(0,n.default)(this,"THEAD",null),(0,n.default)(this,"COLGROUP",null),(0,n.default)(this,"hasTableHeight",!0),(0,n.default)(this,"hasTableWidth",!0),(0,n.default)(this,"isTableVisible",!1),(0,n.default)(this,"tableOffset",0),(0,n.default)(this,"holderOffset",0),this.domBindings=o,this.isMaster="master"===r,this.name=r,this.dataAccessObject=e,this.facadeGetter=t,this.wtSettings=s,this.instance=this.dataAccessObject.wot,this.wot=this.dataAccessObject.wot,this.TABLE=o.rootTable,(0,i.removeTextNodes)(this.TABLE),this.spreader=this.createSpreader(this.TABLE),this.hider=this.createHider(this.spreader),this.holder=this.createHolder(this.hider),this.wtRootElement=this.holder.parentNode,this.isMaster&&this.alignOverlaysWithTrimmingContainer(),this.fixTableDomTree(),this.rowFilter=null,this.columnFilter=null,this.correctHeaderWidth=!1;const l=this.wtSettings.getSettingPure("rowHeaderWidth");this.wtSettings.update("rowHeaderWidth",(()=>this._modifyRowHeaderWidth(l))),this.rowUtils=new u.default(this.dataAccessObject,this.wtSettings),this.columnUtils=new c.default(this.dataAccessObject,this.wtSettings),this.tableRenderer=new h.Renderer({TABLE:this.TABLE,THEAD:this.THEAD,COLGROUP:this.COLGROUP,TBODY:this.TBODY,rowUtils:this.rowUtils,columnUtils:this.columnUtils,cellRenderer:this.wtSettings.getSettingPure("cellRenderer")})}is(e){return this.name===e}fixTableDomTree(){const e=this.domBindings.rootDocument;this.TBODY=this.TABLE.querySelector("tbody"),this.TBODY||(this.TBODY=e.createElement("tbody"),this.TABLE.appendChild(this.TBODY)),this.THEAD=this.TABLE.querySelector("thead"),this.THEAD||(this.THEAD=e.createElement("thead"),this.TABLE.insertBefore(this.THEAD,this.TBODY)),this.COLGROUP=this.TABLE.querySelector("colgroup"),this.COLGROUP||(this.COLGROUP=e.createElement("colgroup"),this.TABLE.insertBefore(this.COLGROUP,this.THEAD))}createSpreader(e){const t=e.parentNode;let o;return t&&t.nodeType===Node.ELEMENT_NODE&&(0,i.hasClass)(t,"wtHolder")||(o=this.domBindings.rootDocument.createElement("div"),o.className="wtSpreader",t&&t.insertBefore(o,e),o.appendChild(e)),o.style.position="relative",this.wtSettings.getSetting("ariaTags")&&(0,i.setAttribute)(o,[(0,g.A11Y_PRESENTATION)()]),o}createHider(e){const t=e.parentNode;let o;return t&&t.nodeType===Node.ELEMENT_NODE&&(0,i.hasClass)(t,"wtHolder")||(o=this.domBindings.rootDocument.createElement("div"),o.className="wtHider",t&&t.insertBefore(o,e),o.appendChild(e)),this.wtSettings.getSetting("ariaTags")&&(0,i.setAttribute)(o,[(0,g.A11Y_PRESENTATION)()]),o}createHolder(e){const t=e.parentNode;let o;return t&&t.nodeType===Node.ELEMENT_NODE&&(0,i.hasClass)(t,"wtHolder")||(o=this.domBindings.rootDocument.createElement("div"),o.style.position="relative",o.className="wtHolder",t&&t.insertBefore(o,e),this.isMaster&&(o.parentNode.className+="ht_master handsontable",o.parentNode.setAttribute("dir",this.wtSettings.getSettingPure("rtlMode")?"rtl":"ltr"),this.wtSettings.getSetting("ariaTags")&&(0,i.setAttribute)(o.parentNode,[(0,g.A11Y_PRESENTATION)()])),o.appendChild(e)),this.wtSettings.getSetting("ariaTags")&&(0,i.setAttribute)(o,[(0,g.A11Y_PRESENTATION)()]),o}draw(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{wtSettings:t}=this,{wtOverlays:o,wtViewport:s}=this.dataAccessObject,n=t.getSetting("totalRows"),r=t.getSetting("totalColumns"),h=t.getSetting("rowHeaders"),c=h.length,u=t.getSetting("columnHeaders"),g=u.length;let f=e;if(this.isMaster&&(o.beforeDraw(),this.holderOffset=(0,i.offset)(this.holder),f=s.createCalculators(f),c&&!t.getSetting("fixedColumnsStart"))){const e=o.inlineStartOverlay.getScrollPosition(),t=this.correctHeaderWidth;this.correctHeaderWidth=0!==e,t!==this.correctHeaderWidth&&(f=!1)}if(f)this.isMaster&&o.refresh(!0);else{this.isMaster?this.tableOffset=(0,i.offset)(this.TABLE):this.tableOffset=this.dataAccessObject.parentTableOffset;const e=n>0?this.getFirstRenderedRow():0,t=r>0?this.getFirstRenderedColumn():0;this.rowFilter=new a.default(e,n,g),this.columnFilter=new l.default(t,r,c);let f=!0;if(this.isMaster){this.alignOverlaysWithTrimmingContainer();const e={};this.wtSettings.getSetting("beforeDraw",!0,e),f=!0!==e.skipRender}if(f){let e;if(this.tableRenderer.setHeaderContentRenderers(h,u),(this.is(d.CLONE_BOTTOM)||this.is(d.CLONE_BOTTOM_INLINE_START_CORNER))&&this.tableRenderer.setHeaderContentRenderers(h,[]),this.resetOversizedRows(),this.tableRenderer.setActiveOverlayName(this.name).setViewportSize(this.getRenderedRowsCount(),this.getRenderedColumnsCount()).setFilters(this.rowFilter,this.columnFilter).render(),this.isMaster&&(e=this.dataAccessObject.workspaceWidth,s.containerWidth=null,this.markOversizedColumnHeaders()),this.adjustColumnHeaderHeights(),(this.isMaster||this.is(d.CLONE_BOTTOM))&&this.markOversizedRows(),this.isMaster){this.wtSettings.getSetting("externalRowCalculator")||s.createVisibleCalculators(),o.refresh(!1),o.applyToDOM();const t=(0,i.outerWidth)(this.hider),n=(0,i.outerWidth)(this.TABLE);0!==t&&n!==t&&(this.columnUtils.calculateWidths(),this.tableRenderer.renderer.colGroup.render()),e!==s.getWorkspaceWidth()&&(s.containerWidth=null,this.columnUtils.calculateWidths(),this.tableRenderer.renderer.colGroup.render()),this.wtSettings.getSetting("onDraw",!0)}else this.is(d.CLONE_BOTTOM)&&this.dataAccessObject.cloneSource.wtOverlays.adjustElementsSize()}}let p=!1;return this.isMaster&&(p=o.topOverlay.resetFixedPosition(),o.bottomOverlay.clone&&(p=o.bottomOverlay.resetFixedPosition()||p),p=o.inlineStartOverlay.resetFixedPosition()||p,o.topInlineStartCornerOverlay&&o.topInlineStartCornerOverlay.resetFixedPosition(),o.bottomInlineStartCornerOverlay&&o.bottomInlineStartCornerOverlay.clone&&o.bottomInlineStartCornerOverlay.resetFixedPosition()),p?(o.refreshAll(),o.adjustElementsSize()):this.dataAccessObject.selectionManager.setActiveOverlay(this.facadeGetter()).render(f),this.isMaster&&o.afterDraw(),this.dataAccessObject.drawn=!0,this}markIfOversizedColumnHeader(e){const t=this.columnFilter.renderedToSource(e);let o=this.wtSettings.getSetting("columnHeaders").length;const s=this.wtSettings.getSetting("defaultRowHeight");let n,r,l;const a=this.wtSettings.getSetting("columnHeaderHeight")||[];for(;o;)o-=1,n=this.getColumnHeaderHeight(o),r=this.getColumnHeader(t,o),r&&(l=(0,i.innerHeight)(r),(!n&&s<l||n<l)&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=l),Array.isArray(a)?null!==a[o]&&void 0!==a[o]&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=a[o]):isNaN(a)||(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=a),this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]<(a[o]||a)&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=a[o]||a))}adjustColumnHeaderHeights(){const{wtSettings:e}=this,t=this.THEAD.childNodes,o=this.dataAccessObject.wtViewport.oversizedColumnHeaders;for(let s=0,n=e.getSetting("columnHeaders").length;s<n;s++)if(o[s]){if(!t[s]||0===t[s].childNodes.length)return;t[s].childNodes[0].style.height=`${o[s]}px`}}resetOversizedRows(){const{wtSettings:e}=this,{wtViewport:t}=this.dataAccessObject;if((this.isMaster||this.is(d.CLONE_BOTTOM))&&!e.getSetting("externalRowCalculator")){const e=this.getRenderedRowsCount();for(let o=0;o<e;o++){const e=this.rowFilter.renderedToSource(o);t.oversizedRows&&t.oversizedRows[e]&&(t.oversizedRows[e]=void 0)}}}getCell(e){let t=e.row,o=e.col;const s=this.wtSettings.getSetting("onModifyGetCellCoords",t,o);if(s&&Array.isArray(s)&&([t,o]=s),this.isRowBeforeRenderedRows(t))return-1;if(this.isRowAfterRenderedRows(t))return-2;if(this.isColumnBeforeRenderedColumns(o))return-3;if(this.isColumnAfterRenderedColumns(o))return-4;const n=this.getRow(t);if(!n&&t>=0)throw new Error("TR was expected to be rendered but is not");const i=n.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(o)];if(!i&&o>=0)throw new Error("TD or TH was expected to be rendered but is not");return i}getRow(e){let t=null,o=null;var s,n;e<0?(t=null===(s=this.rowFilter)||void 0===s?void 0:s.sourceRowToVisibleColHeadedRow(e),o=this.THEAD):(t=null===(n=this.rowFilter)||void 0===n?void 0:n.sourceToRendered(e),o=this.TBODY);return void 0!==t&&void 0!==o&&(!(o.childNodes.length<t+1)&&o.childNodes[t])}getColumnHeader(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const o=this.THEAD.childNodes[t];return null==o?void 0:o.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e)]}getColumnHeaders(e){const t=[],o=this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e);return this.THEAD.childNodes.forEach((e=>{const s=e.childNodes[o];s&&t.push(s)})),t}getRowHeader(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(t>=this.wtSettings.getSetting("rowHeaders").length)return;const o=this.rowFilter.sourceToRendered(e),s=o<0?this.rowFilter.sourceRowToVisibleColHeadedRow(e):o,n=(o<0?this.THEAD:this.TBODY).childNodes[s];return null==n?void 0:n.childNodes[t]}getRowHeaders(e){const t=[],o=this.wtSettings.getSetting("rowHeaders").length;for(let s=0;s<o;s++){const o=this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)],n=null==o?void 0:o.childNodes[s];n&&t.push(n)}return t}getCoords(e){let t=e;if("TD"!==t.nodeName&&"TH"!==t.nodeName&&(t=(0,i.closest)(t,["TD","TH"])),null===t)return null;const o=t.parentNode,s=o.parentNode;let n=(0,i.index)(o),r=t.cellIndex;if((0,i.overlayContainsElement)(d.CLONE_TOP_INLINE_START_CORNER,t,this.wtRootElement)||(0,i.overlayContainsElement)(d.CLONE_TOP,t,this.wtRootElement))"THEAD"===s.nodeName&&(n-=s.childNodes.length);else if((0,i.overlayContainsElement)(d.CLONE_BOTTOM_INLINE_START_CORNER,t,this.wtRootElement)||(0,i.overlayContainsElement)(d.CLONE_BOTTOM,t,this.wtRootElement)){n=this.wtSettings.getSetting("totalRows")-s.childNodes.length+n}else n=s===this.THEAD?this.rowFilter.visibleColHeadedRowToSourceRow(n):this.rowFilter.renderedToSource(n);return r=(0,i.overlayContainsElement)(d.CLONE_TOP_INLINE_START_CORNER,t,this.wtRootElement)||(0,i.overlayContainsElement)(d.CLONE_INLINE_START,t,this.wtRootElement)||(0,i.overlayContainsElement)(d.CLONE_BOTTOM_INLINE_START_CORNER,t,this.wtRootElement)?this.columnFilter.offsettedTH(r):this.columnFilter.visibleRowHeadedColumnToSourceColumn(r),this.wot.createCellCoords(n,r)}markOversizedRows(){if(this.wtSettings.getSetting("externalRowCalculator"))return;let e=this.TBODY.childNodes.length;let t,o,s,n,r;if(e*this.wtSettings.getSetting("defaultRowHeight")!==(0,i.innerHeight)(this.TBODY)-1||this.wtSettings.getSetting("fixedRowsBottom"))for(;e;)e-=1,s=this.rowFilter.renderedToSource(e),t=this.getRowHeight(s),n=this.getTrForRow(s),r=n.querySelector("th"),o=r?(0,i.innerHeight)(r):(0,i.innerHeight)(n)-1,(!t&&this.wtSettings.getSetting("defaultRowHeight")<o||t<o)&&(o+=1,this.dataAccessObject.wtViewport.oversizedRows[s]=o)}getTrForRow(e){return this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)]}isColumnHeaderRendered(e){if(e>=0)return!1;const t=this.wtSettings.getSetting("rowHeaders").length;return Math.abs(e)<=t}isRowHeaderRendered(e){if(e>=0)return!1;const t=this.wtSettings.getSetting("columnHeaders").length;return Math.abs(e)<=t}isRowBeforeRenderedRows(e){const t=this.getFirstRenderedRow();return e<0&&t<=0?!this.isRowHeaderRendered(e):e<t}isRowAfterRenderedRows(e){return e>this.getLastRenderedRow()}isColumnBeforeRenderedColumns(e){const t=this.getFirstRenderedColumn();return e<0&&t<=0?!this.isColumnHeaderRendered(e):e<t}isColumnAfterRenderedColumns(e){return this.columnFilter&&e>this.getLastRenderedColumn()}isColumnAfterViewport(e){return this.columnFilter&&e>this.getLastVisibleColumn()}isRowAfterViewport(e){return this.rowFilter&&e>this.getLastVisibleRow()}isColumnBeforeViewport(e){return this.columnFilter&&this.columnFilter.sourceToRendered(e)<0&&e>=0}isLastRowFullyVisible(){return this.getLastVisibleRow()===this.getLastRenderedRow()}isLastColumnFullyVisible(){return this.getLastVisibleColumn()===this.getLastRenderedColumn()}allRowsInViewport(){return this.wtSettings.getSetting("totalRows")===this.getVisibleRowsCount()}allColumnsInViewport(){return this.wtSettings.getSetting("totalColumns")===this.getVisibleColumnsCount()}getRowHeight(e){return this.rowUtils.getHeight(e)}getColumnHeaderHeight(e){return this.columnUtils.getHeaderHeight(e)}getColumnWidth(e){return this.columnUtils.getWidth(e)}getStretchedColumnWidth(e){return this.columnUtils.getStretchedColumnWidth(e)}hasDefinedSize(){return this.hasTableHeight&&this.hasTableWidth}getWidth(){return(0,i.outerWidth)(this.TABLE)}getHeight(){return(0,i.outerHeight)(this.TABLE)}getTotalWidth(){const e=(0,i.outerWidth)(this.hider);return 0!==e?e:this.getWidth()}getTotalHeight(){const e=(0,i.outerHeight)(this.hider);return 0!==e?e:this.getHeight()}isVisible(){return(0,i.isVisible)(this.TABLE)}_modifyRowHeaderWidth(e){let t=(0,r.isFunction)(e)?e():null;return Array.isArray(t)?(t=[...t],t[t.length-1]=this._correctRowHeaderWidth(t[t.length-1])):t=this._correctRowHeaderWidth(t),t}_correctRowHeaderWidth(e){let t=e;return"number"!=typeof e&&(t=this.wtSettings.getSetting("defaultColumnWidth")),this.correctHeaderWidth&&(t+=1),t}}},31542:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(63646)),i=s(o(58166)),r=s(o(17800)),l=o(13911),a=o(34009);class h extends n.default{constructor(e,t,o,s){super(e,t,o,s,a.CLONE_BOTTOM)}}(0,l.mixin)(h,i.default),(0,l.mixin)(h,r.default);t.default=h},93638:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(63646)),i=s(o(58166)),r=s(o(85449)),l=o(13911),a=o(34009);class h extends n.default{constructor(e,t,o,s){super(e,t,o,s,a.CLONE_BOTTOM_INLINE_START_CORNER)}}(0,l.mixin)(h,i.default),(0,l.mixin)(h,r.default);t.default=h},14658:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(63646)),i=s(o(95374)),r=s(o(85449)),l=o(13911),a=o(34009);class h extends n.default{constructor(e,t,o,s){super(e,t,o,s,a.CLONE_INLINE_START)}}(0,l.mixin)(h,i.default),(0,l.mixin)(h,r.default);t.default=h},26235:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=o(9893),i=s(o(63646)),r=s(o(95374)),l=s(o(17800)),a=o(13911);class h extends i.default{constructor(e,t,o,s){super(e,t,o,s,"master")}alignOverlaysWithTrimmingContainer(){const e=(0,n.getTrimmingContainer)(this.wtRootElement),{rootWindow:t}=this.domBindings;if(e===t){this.wtSettings.getSetting("preventOverflow")||(this.holder.style.overflow="visible",this.wtRootElement.style.overflow="visible")}else{const o=e.parentElement,s=(0,n.getStyle)(e,"height",t),i=(0,n.getStyle)(e,"overflow",t),r=this.holder.style,{scrollWidth:l,scrollHeight:a}=e;let h=e.offsetWidth,c=e.offsetHeight;if(o&&["auto","hidden","scroll"].includes(i)){const s=e.cloneNode(!1);s.style.overflow="auto",s.style.position="absolute",e.nextElementSibling?o.insertBefore(s,e.nextElementSibling):o.appendChild(s);const n=parseInt(t.getComputedStyle(s).height,10);o.removeChild(s),0===n&&(c=0)}c=Math.min(c,a),r.height="auto"===s?"auto":`${c}px`,h=Math.min(h,l),r.width=`${h}px`,r.overflow="",this.hasTableHeight="auto"===r.height||c>0,this.hasTableWidth=h>0}this.isTableVisible=(0,n.isVisible)(this.TABLE)}markOversizedColumnHeaders(){const{wtSettings:e}=this,{wtViewport:t}=this.dataAccessObject,o="master",s=e.getSetting("columnHeaders").length;if(s&&!t.hasOversizedColumnHeadersMarked[o]){const n=e.getSetting("rowHeaders").length,i=this.getRenderedColumnsCount();for(let e=0;e<s;e++)for(let e=-1*n;e<i;e++)this.markIfOversizedColumnHeader(e);t.hasOversizedColumnHeadersMarked[o]=!0}}}(0,a.mixin)(h,r.default),(0,a.mixin)(h,l.default);t.default=h},17800:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(13911);const n={getFirstRenderedColumn(){const e=this.dataAccessObject.startColumnRendered;return null===e?-1:e},getFirstVisibleColumn(){const e=this.dataAccessObject.startColumnVisible;return null===e?-1:e},getFirstPartiallyVisibleColumn(){const e=this.dataAccessObject.startColumnPartiallyVisible;return null===e?-1:e},getLastRenderedColumn(){const e=this.dataAccessObject.endColumnRendered;return null===e?-1:e},getLastVisibleColumn(){const e=this.dataAccessObject.endColumnVisible;return null===e?-1:e},getLastPartiallyVisibleColumn(){const e=this.dataAccessObject.endColumnPartiallyVisible;return null===e?-1:e},getRenderedColumnsCount(){return this.dataAccessObject.countColumnsRendered},getVisibleColumnsCount(){return this.dataAccessObject.countColumnsVisible},getRowHeadersCount(){return this.dataAccessObject.rowHeaders.length}};(0,s.defineGetter)(n,"MIXIN_NAME","calculatedColumns",{writable:!1,enumerable:!1});t.default=n},95374:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(13911);const n={getFirstRenderedRow(){const e=this.dataAccessObject.startRowRendered;return null===e?-1:e},getFirstVisibleRow(){const e=this.dataAccessObject.startRowVisible;return null===e?-1:e},getFirstPartiallyVisibleRow(){const e=this.dataAccessObject.startRowPartiallyVisible;return null===e?-1:e},getLastRenderedRow(){const e=this.dataAccessObject.endRowRendered;return null===e?-1:e},getLastVisibleRow(){const e=this.dataAccessObject.endRowVisible;return null===e?-1:e},getLastPartiallyVisibleRow(){const e=this.dataAccessObject.endRowPartiallyVisible;return null===e?-1:e},getRenderedRowsCount(){return this.dataAccessObject.countRowsRendered},getVisibleRowsCount(){return this.dataAccessObject.countRowsVisible},getColumnHeadersCount(){return this.dataAccessObject.columnHeaders.length}};(0,s.defineGetter)(n,"MIXIN_NAME","calculatedRows",{writable:!1,enumerable:!1});t.default=n},85449:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(13911);const n={getFirstRenderedColumn(){return 0===this.wtSettings.getSetting("totalColumns")?-1:0},getFirstVisibleColumn(){return this.getFirstRenderedColumn()},getFirstPartiallyVisibleColumn(){return this.getFirstRenderedColumn()},getLastRenderedColumn(){return this.getRenderedColumnsCount()-1},getLastVisibleColumn(){return this.getLastRenderedColumn()},getLastPartiallyVisibleColumn(){return this.getLastRenderedColumn()},getRenderedColumnsCount(){const e=this.wtSettings.getSetting("totalColumns");return Math.min(this.wtSettings.getSetting("fixedColumnsStart"),e)},getVisibleColumnsCount(){return this.getRenderedColumnsCount()},getRowHeadersCount(){return this.dataAccessObject.rowHeaders.length}};(0,s.defineGetter)(n,"MIXIN_NAME","stickyColumnsStart",{writable:!1,enumerable:!1});t.default=n},58166:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(13911);const n={getFirstRenderedRow(){const e=this.wtSettings.getSetting("totalRows"),t=this.wtSettings.getSetting("fixedRowsBottom"),o=e-t;return 0===e||0===t?-1:o<0?0:o},getFirstVisibleRow(){return this.getFirstRenderedRow()},getFirstPartiallyVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return this.wtSettings.getSetting("totalRows")-1},getLastVisibleRow(){return this.getLastRenderedRow()},getLastPartiallyVisibleRow(){return this.getLastRenderedRow()},getRenderedRowsCount(){const e=this.wtSettings.getSetting("totalRows");return Math.min(this.wtSettings.getSetting("fixedRowsBottom"),e)},getVisibleRowsCount(){return this.getRenderedRowsCount()},getColumnHeadersCount:()=>0};(0,s.defineGetter)(n,"MIXIN_NAME","stickyRowsBottom",{writable:!1,enumerable:!1});t.default=n},61138:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(13911);const n={getFirstRenderedRow(){return 0===this.wtSettings.getSetting("totalRows")?-1:0},getFirstVisibleRow(){return this.getFirstRenderedRow()},getFirstPartiallyVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return this.getRenderedRowsCount()-1},getLastVisibleRow(){return this.getLastRenderedRow()},getLastPartiallyVisibleRow(){return this.getLastRenderedRow()},getRenderedRowsCount(){const e=this.wtSettings.getSetting("totalRows");return Math.min(this.wtSettings.getSetting("fixedRowsTop"),e)},getVisibleRowsCount(){return this.getRenderedRowsCount()},getColumnHeadersCount(){return this.dataAccessObject.columnHeaders.length}};(0,s.defineGetter)(n,"MIXIN_NAME","stickyRowsTop",{writable:!1,enumerable:!1});t.default=n},61234:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(63646)),i=s(o(61138)),r=s(o(17800)),l=o(13911),a=o(34009);class h extends n.default{constructor(e,t,o,s){super(e,t,o,s,a.CLONE_TOP)}}(0,l.mixin)(h,i.default),(0,l.mixin)(h,r.default);t.default=h},60882:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(63646)),i=s(o(61138)),r=s(o(85449)),l=o(13911),a=o(34009);class h extends n.default{constructor(e,t,o,s){super(e,t,o,s,a.CLONE_TOP_INLINE_START_CORNER)}}(0,l.mixin)(h,i.default),(0,l.mixin)(h,r.default);t.default=h},87736:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707)),i=o(9893),r=o(61311);t.default=class{constructor(e,t){(0,n.default)(this,"dataAccessObject",void 0),(0,n.default)(this,"wtSettings",void 0),(0,n.default)(this,"headerWidths",new Map),(0,n.default)(this,"stretching",void 0),this.dataAccessObject=e,this.wtSettings=t,this.stretching=new r.ColumnStretching({totalColumns:()=>this.wtSettings.getSetting("totalColumns"),stretchMode:()=>this.wtSettings.getSetting("stretchH"),stretchingColumnWidthFn:(e,t)=>this.wtSettings.getSetting("onBeforeStretchingColumnWidth",e,t),columnWidthFn:e=>this.dataAccessObject.wtTable.getColumnWidth(e)})}getWidth(e){return this.wtSettings.getSetting("columnWidth",e)||this.wtSettings.getSetting("defaultColumnWidth")}getStretchedColumnWidth(e){let t=this.getWidth(e);const o=this.stretching.getStretchedColumnWidth(e,t);return o&&(t=o),t}getHeaderHeight(e){let t=this.wtSettings.getSetting("defaultRowHeight");const o=this.dataAccessObject.wtViewport.oversizedColumnHeaders[e];return void 0!==o&&(t=t?Math.max(t,o):o),t}getHeaderWidth(e){return this.headerWidths.get(this.dataAccessObject.wtTable.columnFilter.sourceToRendered(e))}refreshStretching(){const{wtTable:e,wtViewport:t,cloneSource:o}=this.dataAccessObject,s=o?o.wtTable.holder:e.holder,n=s.offsetHeight<s.scrollHeight?(0,i.getScrollbarWidth)():0;this.stretching.refreshStretching(t.getViewportWidth()-n)}calculateWidths(){const{wtSettings:e}=this;let t=e.getSetting("rowHeaderWidth");if(this.refreshStretching(),t=e.getSetting("onModifyRowHeaderWidth",t),null!=t){const o=e.getSetting("rowHeaders").length,s=e.getSetting("defaultColumnWidth");for(let e=0;e<o;e++){let o=Array.isArray(t)?t[e]:t;o=null==o?s:o,this.headerWidths.set(e,o)}}}}},61311:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=s(o(85707)),i=o(26679);function r(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function l(e,t){return e.get(h(e,t))}function a(e,t,o){return e.set(h(e,t),o),o}function h(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var c=new WeakMap,u=new WeakMap,d=new WeakMap,g=new WeakMap,f=new WeakMap;t.ColumnStretching=class{constructor(e){let{totalColumns:t,stretchMode:o,stretchingColumnWidthFn:s,columnWidthFn:i}=e;(0,n.default)(this,"stretchAllRatio",0),(0,n.default)(this,"stretchLastWidth",0),(0,n.default)(this,"stretchAllColumnsWidth",[]),r(this,c,0),(0,n.default)(this,"needVerifyLastColumnWidth",!0),r(this,u,(()=>0)),r(this,d,(e=>e)),r(this,g,(e=>e)),r(this,f,(()=>"none")),a(u,this,t),a(f,this,o),a(d,this,null!=s?s:l(d,this)),a(g,this,null!=i?i:l(g,this))}refreshStretching(e){if("none"===l(f,this).call(this))return;this.stretchAllRatio=0,this.stretchAllColumnsWidth=[],this.needVerifyLastColumnWidth=!0,this.stretchLastWidth=0,a(c,this,e);let t=0;for(let o=0;o<l(u,this).call(this);o++){const s=this._getColumnWidth(o),n=l(d,this).call(this,void 0,o);"number"==typeof n?e-=n:t+=s}const o=e-t;if("all"===l(f,this).call(this)&&o>0)this.stretchAllRatio=e/t,this.stretchAllColumnsWidth=[],this.needVerifyLastColumnWidth=!0;else if("last"===l(f,this).call(this)&&e!==1/0){const e=this._getColumnWidth(l(u,this).call(this)-1),t=o+e;this.stretchLastWidth=t>=0?t:e}}getStretchedColumnWidth(e,t){let o=null;return"all"===l(f,this).call(this)&&0!==this.stretchAllRatio?o=this._getStretchedAllColumnWidth(e,t):"last"===l(f,this).call(this)&&0!==this.stretchLastWidth&&(o=this._getStretchedLastColumnWidth(e)),o}_getStretchedAllColumnWidth(e,t){let o=0;if(!this.stretchAllColumnsWidth[e]){const o=Math.round(t*this.stretchAllRatio),s=l(d,this).call(this,o,e);this.stretchAllColumnsWidth[e]=void 0===s?o:isNaN(s)?this._getColumnWidth(e):s}if(this.stretchAllColumnsWidth.length===l(u,this).call(this)&&this.needVerifyLastColumnWidth){this.needVerifyLastColumnWidth=!1;for(let e=0;e<this.stretchAllColumnsWidth.length;e++)o+=this.stretchAllColumnsWidth[e];o!==l(c,this)&&(this.stretchAllColumnsWidth[this.stretchAllColumnsWidth.length-1]+=l(c,this)-o)}return this.stretchAllColumnsWidth[e]}_getStretchedLastColumnWidth(e){return e===l(u,this).call(this)-1?this.stretchLastWidth:null}_getColumnWidth(e){let t=l(g,this).call(this,e);return isNaN(t)&&(t=i.DEFAULT_COLUMN_WIDTH),t}}},42715:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707));t.default=class{constructor(e){(0,n.default)(this,"nodeType",void 0),this.nodeType=e.toUpperCase()}setRootDocument(e){this.rootDocument=e}obtain(){return this.rootDocument.createElement(this.nodeType)}}},60739:(e,t)=>{"use strict";t.__esModule=!0;t.WORKING_SPACE_ALL=0,t.WORKING_SPACE_TOP=1,t.WORKING_SPACE_BOTTOM=2},21682:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(23225));t.OrderView=n.default;var i=s(o(47664));t.SharedOrderView=i.default},47664:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(23225));class i extends n.default{prependView(e){return this.sizeSet.prepend(e.sizeSet),e.sizeSet.append(this.sizeSet),this}appendView(e){return this.sizeSet.append(e.sizeSet),e.sizeSet.prepend(this.sizeSet),this}}t.default=i},23225:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(15724);var n=s(o(85707)),i=o(60739),r=s(o(83638));t.default=class{constructor(e,t,o){(0,n.default)(this,"rootNode",void 0),(0,n.default)(this,"nodesPool",void 0),(0,n.default)(this,"sizeSet",new r.default),(0,n.default)(this,"childNodeType",void 0),(0,n.default)(this,"visualIndex",0),(0,n.default)(this,"collectedNodes",[]),this.rootNode=e,this.nodesPool=t,this.childNodeType=o.toUpperCase()}setSize(e){return this.sizeSet.setSize(e),this}setOffset(e){return this.sizeSet.setOffset(e),this}isSharedViewSet(){return this.sizeSet.isShared()}getNode(e){return e<this.collectedNodes.length?this.collectedNodes[e]:null}getCurrentNode(){const e=this.collectedNodes.length;return e>0?this.collectedNodes[e-1]:null}getRenderedChildCount(){const{rootNode:e,sizeSet:t}=this;let o=0;if(this.isSharedViewSet()){let s=e.firstElementChild;for(;s;){if(s.tagName===this.childNodeType)o+=1;else if(t.isPlaceOn(i.WORKING_SPACE_TOP))break;s=s.nextElementSibling}}else o=e.childElementCount;return o}start(){this.collectedNodes.length=0,this.visualIndex=0;const{rootNode:e,sizeSet:t}=this,o=this.isSharedViewSet(),{nextSize:s}=t.getViewSize();let n=this.getRenderedChildCount();for(;n<s;){const s=this.nodesPool();!o||o&&t.isPlaceOn(i.WORKING_SPACE_BOTTOM)?e.appendChild(s):e.insertBefore(s,e.firstChild),n+=1}const r=o&&t.isPlaceOn(i.WORKING_SPACE_TOP);for(;n>s;)e.removeChild(r?e.firstChild:e.lastChild),n-=1}render(){const{rootNode:e,sizeSet:t}=this;let o=this.visualIndex;this.isSharedViewSet()&&t.isPlaceOn(i.WORKING_SPACE_BOTTOM)&&(o+=t.sharedSize.nextSize);let s=e.childNodes[o];if(s.tagName!==this.childNodeType){const t=this.nodesPool();e.replaceChild(t,s),s=t}this.collectedNodes.push(s),this.visualIndex+=1}end(){}}},92820:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707));t.default=class{constructor(){(0,n.default)(this,"currentSize",0),(0,n.default)(this,"nextSize",0),(0,n.default)(this,"currentOffset",0),(0,n.default)(this,"nextOffset",0)}setSize(e){this.currentSize=this.nextSize,this.nextSize=e}setOffset(e){this.currentOffset=this.nextOffset,this.nextOffset=e}}},83638:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707)),i=s(o(92820)),r=o(60739);t.default=class{constructor(){(0,n.default)(this,"size",new i.default),(0,n.default)(this,"workingSpace",r.WORKING_SPACE_ALL),(0,n.default)(this,"sharedSize",null)}setSize(e){this.size.setSize(e)}setOffset(e){this.size.setOffset(e)}getViewSize(){return this.size}isShared(){return this.sharedSize instanceof i.default}isPlaceOn(e){return this.workingSpace===e}append(e){this.workingSpace=r.WORKING_SPACE_TOP,e.workingSpace=r.WORKING_SPACE_BOTTOM,this.sharedSize=e.getViewSize()}prepend(e){this.workingSpace=r.WORKING_SPACE_BOTTOM,e.workingSpace=r.WORKING_SPACE_TOP,this.sharedSize=e.getViewSize()}}},46372:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707));t.default=class{constructor(e,t){(0,n.default)(this,"dataAccessObject",void 0),(0,n.default)(this,"wtSettings",void 0),this.dataAccessObject=e,this.wtSettings=t}getHeight(e){let t=this.wtSettings.getSetting("rowHeight",e);const o=this.dataAccessObject.wtViewport.oversizedRows[e];return void 0!==o&&(t=void 0===t?o:Math.max(t,o)),t}getHeightByOverlayName(e,t){let o=this.wtSettings.getSetting("rowHeightByOverlayName",e,t);const s=this.dataAccessObject.wtViewport.oversizedRows[e];return void 0!==s&&(o=void 0===o?s:Math.max(o,s)),o}}},85690:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(9893),n=o(13911),i=o(26679);t.default=class{constructor(e,t,o,s,n){this.dataAccessObject=e,this.wot=e.wot,this.instance=this.wot,this.domBindings=t,this.wtSettings=o,this.wtTable=n,this.oversizedRows=[],this.oversizedColumnHeaders=[],this.hasOversizedColumnHeadersMarked={},this.clientHeight=0,this.containerWidth=NaN,this.rowHeaderWidth=NaN,this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,this.rowsCalculatorTypes=new Map([["rendered",()=>this.wtSettings.getSetting("renderAllRows")?new i.RenderedAllRowsCalculationType:new i.RenderedRowsCalculationType],["fullyVisible",()=>new i.FullyVisibleRowsCalculationType],["partiallyVisible",()=>new i.PartiallyVisibleRowsCalculationType]]),this.columnsCalculatorTypes=new Map([["rendered",()=>this.wtSettings.getSetting("renderAllColumns")?new i.RenderedAllColumnsCalculationType:new i.RenderedColumnsCalculationType],["fullyVisible",()=>new i.FullyVisibleColumnsCalculationType],["partiallyVisible",()=>new i.PartiallyVisibleColumnsCalculationType]]),this.eventManager=s,this.eventManager.addEventListener(this.domBindings.rootWindow,"resize",(()=>{this.clientHeight=this.getWorkspaceHeight()}))}getWorkspaceHeight(){const e=this.domBindings.rootDocument,t=this.dataAccessObject.topOverlayTrimmingContainer;let o=0;if(t===this.domBindings.rootWindow)o=e.documentElement.clientHeight;else{o=(0,s.outerHeight)(t)>0&&t.clientHeight>0?t.clientHeight:1/0}return o}getWorkspaceWidth(){const{wtSettings:e}=this,{rootDocument:t,rootWindow:o}=this.domBindings,n=this.dataAccessObject.inlineStartOverlayTrimmingContainer,i=t.documentElement.offsetWidth,r=e.getSetting("totalColumns"),l=e.getSetting("preventOverflow"),a=e.getSetting("rtlMode"),h=this.wtTable.TABLE.getBoundingClientRect(),c=i-(a?h.right-i:h.left);let u,d;if(l)return(0,s.outerWidth)(this.wtTable.wtRootElement);if(u=e.getSetting("freezeOverlays")?Math.min(c,i):Math.min(this.getContainerFillWidth(),c,i),n===o&&r>0&&this.sumColumnWidths(0,r-1)>u)return t.documentElement.clientWidth;if(n!==o&&(d=(0,s.getStyle)(this.dataAccessObject.inlineStartOverlayTrimmingContainer,"overflow",o),"scroll"===d||"hidden"===d||"auto"===d))return Math.max(u,n.clientWidth);const g=e.getSetting("stretchH");return"none"!==g&&g?u:Math.max(u,(0,s.outerWidth)(this.wtTable.TABLE))}hasVerticalScroll(){return this.wtTable.hider.offsetHeight>this.getWorkspaceHeight()}hasHorizontalScroll(){return this.wtTable.hider.offsetWidth>this.getWorkspaceWidth()}sumColumnWidths(e,t){let o=0,s=e;for(;s<t;)o+=this.wtTable.getColumnWidth(s),s+=1;return o}getContainerFillWidth(){if(this.containerWidth)return this.containerWidth;const e=this.wtTable.holder,t=this.domBindings.rootDocument.createElement("div");t.style.width="100%",t.style.height="1px",e.appendChild(t);const o=t.offsetWidth;return this.containerWidth=o,e.removeChild(t),o}getWorkspaceOffset(){return(0,s.offset)(this.wtTable.TABLE)}getColumnHeaderHeight(){return this.wtSettings.getSetting("columnHeaders").length?isNaN(this.columnHeaderHeight)&&(this.columnHeaderHeight=(0,s.outerHeight)(this.wtTable.THEAD)):this.columnHeaderHeight=0,this.columnHeaderHeight}getViewportHeight(){let e=this.getWorkspaceHeight();if(e===1/0)return e;const t=this.getColumnHeaderHeight();return t>0&&(e-=t),e}getRowHeaderWidth(){const e=this.wtSettings.getSetting("rowHeaderWidth"),t=this.wtSettings.getSetting("rowHeaders");if(e){this.rowHeaderWidth=0;for(let o=0,s=t.length;o<s;o++)this.rowHeaderWidth+=e[o]||e}if(isNaN(this.rowHeaderWidth))if(t.length){let e=this.wtTable.TABLE.querySelector("TH");this.rowHeaderWidth=0;for(let o=0,n=t.length;o<n;o++)e?(this.rowHeaderWidth+=(0,s.outerWidth)(e),e=e.nextSibling):this.rowHeaderWidth+=50}else this.rowHeaderWidth=0;return this.rowHeaderWidth=this.wtSettings.getSetting("onModifyRowHeaderWidth",this.rowHeaderWidth)||this.rowHeaderWidth,this.rowHeaderWidth}getViewportWidth(){const e=this.getWorkspaceWidth();if(e===1/0)return e;const t=this.getRowHeaderWidth();return t>0?e-t:e}createRowsCalculator(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["rendered","fullyVisible","partiallyVisible"];const{wtSettings:t,wtTable:o}=this;let n,r,l=this.getViewportHeight();this.rowHeaderWidth=NaN;let a=this.dataAccessObject.topScrollPosition-this.dataAccessObject.topParentOffset;const h=t.getSetting("fixedRowsTop"),c=t.getSetting("fixedRowsBottom"),u=t.getSetting("totalRows");return h&&a>=0&&(r=this.dataAccessObject.topOverlay.sumCellSizes(0,h),a+=r,l-=r),c&&this.dataAccessObject.bottomOverlay.clone&&(r=this.dataAccessObject.bottomOverlay.sumCellSizes(u-c,u),l-=r),n=o.holder.clientHeight===o.holder.offsetHeight?0:(0,s.getScrollbarWidth)(this.domBindings.rootDocument),new i.ViewportRowsCalculator({calculationTypes:e.map((e=>[e,this.rowsCalculatorTypes.get(e)()])),viewportHeight:l,scrollOffset:a,totalRows:t.getSetting("totalRows"),rowHeightFn:e=>o.getRowHeight(e),overrideFn:t.getSettingPure("viewportRowCalculatorOverride"),horizontalScrollbarHeight:n})}createColumnsCalculator(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["rendered","fullyVisible","partiallyVisible"];const{wtSettings:t,wtTable:o}=this;let n=this.getViewportWidth(),r=Math.abs(this.dataAccessObject.inlineStartScrollPosition)-this.dataAccessObject.inlineStartParentOffset;this.columnHeaderHeight=NaN;const l=t.getSetting("fixedColumnsStart");if(l&&r>=0){const e=this.dataAccessObject.inlineStartOverlay.sumCellSizes(0,l);r+=e,n-=e}return o.holder.clientWidth!==o.holder.offsetWidth&&(n-=(0,s.getScrollbarWidth)(this.domBindings.rootDocument)),new i.ViewportColumnsCalculator({calculationTypes:e.map((e=>[e,this.columnsCalculatorTypes.get(e)()])),viewportWidth:n,scrollOffset:r,totalColumns:t.getSetting("totalColumns"),columnWidthFn:e=>o.getColumnWidth(e),overrideFn:t.getSettingPure("viewportColumnCalculatorOverride"),inlineStartOffset:this.dataAccessObject.inlineStartParentOffset})}createCalculators(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{wtSettings:t}=this,o=this.createRowsCalculator(),s=this.createColumnsCalculator();if(e&&!t.getSetting("renderAllRows")){const t=o.getResultsFor("fullyVisible");e=this.areAllProposedVisibleRowsAlreadyRendered(t)}if(e&&!t.getSetting("renderAllColumns")){const t=s.getResultsFor("fullyVisible");e=this.areAllProposedVisibleColumnsAlreadyRendered(t)}return e||(this.rowsRenderCalculator=o.getResultsFor("rendered"),this.columnsRenderCalculator=s.getResultsFor("rendered")),this.rowsVisibleCalculator=o.getResultsFor("fullyVisible"),this.columnsVisibleCalculator=s.getResultsFor("fullyVisible"),this.rowsPartiallyVisibleCalculator=o.getResultsFor("partiallyVisible"),this.columnsPartiallyVisibleCalculator=s.getResultsFor("partiallyVisible"),e}createVisibleCalculators(){const e=this.createRowsCalculator(["fullyVisible","partiallyVisible"]),t=this.createColumnsCalculator(["fullyVisible","partiallyVisible"]);this.rowsVisibleCalculator=e.getResultsFor("fullyVisible"),this.columnsVisibleCalculator=t.getResultsFor("fullyVisible"),this.rowsPartiallyVisibleCalculator=e.getResultsFor("partiallyVisible"),this.columnsPartiallyVisibleCalculator=t.getResultsFor("partiallyVisible")}areAllProposedVisibleRowsAlreadyRendered(e){if(!this.rowsVisibleCalculator)return!1;let{startRow:t,endRow:o}=e;if(null===t&&null===o){if(!e.isVisibleInTrimmingContainer)return!0;t=this.rowsPartiallyVisibleCalculator.startRow,o=this.rowsPartiallyVisibleCalculator.endRow}const{startRow:s,endRow:n}=this.rowsRenderCalculator;return!(t<s||t===s&&t>0)&&!(o>n||o===n&&o<this.wtSettings.getSetting("totalRows")-1)}areAllProposedVisibleColumnsAlreadyRendered(e){if(!this.columnsVisibleCalculator)return!1;let{startColumn:t,endColumn:o}=e;if(null===t&&null===o){if(!e.isVisibleInTrimmingContainer)return!0;t=this.columnsPartiallyVisibleCalculator.startColumn,o=this.columnsPartiallyVisibleCalculator.endColumn}const{startColumn:s,endColumn:n}=this.columnsRenderCalculator;return!(t<s||t===s&&t>0)&&!(o>n||o===n&&o<this.wtSettings.getSetting("totalColumns")-1)}resetHasOversizedColumnHeadersMarked(){(0,n.objectEach)(this.hasOversizedColumnHeadersMarked,((e,t,o)=>{o[t]=void 0}))}}},38715:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(6254),o(20512),o(23844),o(38594);var n=s(o(87789)),i=o(11015),r=o(71757),l=s(o(56937)),a=o(74174),h=o(34299),c=o(49676),u=o(52618),d=o(90);function g(e,t){const o=new n.default(e,t||{},i.rootInstanceSymbol);return o.init(),o}t.CellCoords=d.CellCoords,t.CellRange=d.CellRange,(0,h.registerCellType)(c.TextCellType),g.editors={BaseEditor:u.BaseEditor},g.Core=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new n.default(e,t,i.rootInstanceSymbol)},g.DefaultSettings=(0,r.metaSchemaFactory)(),g.hooks=l.default.getSingleton(),g.CellCoords=d.CellCoords,g.CellRange=d.CellRange,g.packageName="handsontable",g.buildDate="26/09/2024 10:53:15",g.version="0.0.0-next-ffdf116-20240926",g.languages={dictionaryKeys:a.dictionaryKeys,getLanguageDictionary:a.getLanguageDictionary,getLanguagesDictionaries:a.getLanguagesDictionaries,registerLanguageDictionary:a.registerLanguageDictionary,getTranslatedPhrase:a.getTranslatedPhrase};t.default=g},16531:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(80115),n=o(80827),i=o(93307);const r=t.CELL_TYPE="autocomplete";t.AutocompleteCellType={CELL_TYPE:r,editor:s.AutocompleteEditor,renderer:n.autocompleteRenderer,validator:i.autocompleteValidator}},95211:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(16531);t.AutocompleteCellType=s.AutocompleteCellType,t.CELL_TYPE=s.CELL_TYPE},29529:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(39626),n=o(80730);const i=t.CELL_TYPE="checkbox";t.CheckboxCellType={CELL_TYPE:i,editor:s.CheckboxEditor,renderer:n.checkboxRenderer}},55286:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(29529);t.CELL_TYPE=s.CELL_TYPE,t.CheckboxCellType=s.CheckboxCellType},40395:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(59127),n=o(48075),i=o(70323);const r=t.CELL_TYPE="date";t.DateCellType={CELL_TYPE:r,editor:s.DateEditor,renderer:n.dateRenderer,validator:i.dateValidator}},15347:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(40395);t.CELL_TYPE=s.CELL_TYPE,t.DateCellType=s.DateCellType},85769:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(50486),n=o(82070),i=o(7628);const r=t.CELL_TYPE="dropdown";t.DropdownCellType={CELL_TYPE:r,editor:s.DropdownEditor,renderer:n.dropdownRenderer,validator:i.dropdownValidator}},98614:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(85769);t.CELL_TYPE=s.CELL_TYPE,t.DropdownCellType=s.DropdownCellType},63297:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(56138),n=o(8218);const i=t.CELL_TYPE="handsontable";t.HandsontableCellType={CELL_TYPE:i,editor:s.HandsontableEditor,renderer:n.handsontableRenderer}},37334:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(63297);t.CELL_TYPE=s.CELL_TYPE,t.HandsontableCellType=s.HandsontableCellType},10426:(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllCellTypes=function(){(0,g.registerCellType)(s.AutocompleteCellType),(0,g.registerCellType)(n.CheckboxCellType),(0,g.registerCellType)(i.DateCellType),(0,g.registerCellType)(r.DropdownCellType),(0,g.registerCellType)(l.HandsontableCellType),(0,g.registerCellType)(a.NumericCellType),(0,g.registerCellType)(h.PasswordCellType),(0,g.registerCellType)(c.SelectCellType),(0,g.registerCellType)(u.TextCellType),(0,g.registerCellType)(d.TimeCellType)};var s=o(95211);t.AutocompleteCellType=s.AutocompleteCellType,t.AUTOCOMPLETE_TYPE=s.CELL_TYPE;var n=o(55286);t.CheckboxCellType=n.CheckboxCellType,t.CHECKBOX_TYPE=n.CELL_TYPE;var i=o(15347);t.DateCellType=i.DateCellType,t.DATE_TYPE=i.CELL_TYPE;var r=o(98614);t.DropdownCellType=r.DropdownCellType,t.DROPDOWN_TYPE=r.CELL_TYPE;var l=o(37334);t.HandsontableCellType=l.HandsontableCellType,t.HANDSONTABLE_TYPE=l.CELL_TYPE;var a=o(85506);t.NumericCellType=a.NumericCellType,t.NUMERIC_TYPE=a.CELL_TYPE;var h=o(1774);t.PasswordCellType=h.PasswordCellType,t.PASSWORD_TYPE=h.CELL_TYPE;var c=o(85183);t.SelectCellType=c.SelectCellType,t.SELECT_TYPE=c.CELL_TYPE;var u=o(49676);t.TextCellType=u.TextCellType,t.TEXT_TYPE=u.CELL_TYPE;var d=o(37574);t.TimeCellType=d.TimeCellType,t.TIME_TYPE=d.CELL_TYPE;var g=o(34299);t.registerCellType=g.registerCellType,t.getCellType=g.getCellType,t.getRegisteredCellTypeNames=g.getRegisteredCellTypeNames,t.getRegisteredCellTypes=g.getRegisteredCellTypes,t.hasCellType=g.hasCellType},85506:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(78625);t.CELL_TYPE=s.CELL_TYPE,t.NumericCellType=s.NumericCellType},78625:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(33972),n=o(89760),i=o(66640);const r=t.CELL_TYPE="numeric";t.NumericCellType={CELL_TYPE:r,editor:s.NumericEditor,renderer:n.numericRenderer,validator:i.numericValidator,dataType:"number"}},1774:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(2401);t.CELL_TYPE=s.CELL_TYPE,t.PasswordCellType=s.PasswordCellType},2401:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(46138),n=o(15074);const i=t.CELL_TYPE="password";t.PasswordCellType={CELL_TYPE:i,editor:s.PasswordEditor,renderer:n.passwordRenderer,copyable:!1}},34299:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.getCellType=function(e){if(!c(e))throw Error(`You declared cell type "${e}" as a string that is not mapped to a known object.\n Cell type must be an object or a string mapped to an object registered by\n "Handsontable.cellTypes.registerCellType" method`);return h(e)},t.registerCellType=function(e,t){"string"!=typeof e&&(e=(t=e).CELL_TYPE);const{editor:o,renderer:s,validator:n}=t;o&&(0,i.registerEditor)(e,o);s&&(0,r.registerRenderer)(e,s);n&&(0,l.registerValidator)(e,n);a(e,t)},o(67834);var n=s(o(71263)),i=o(84558),r=o(44288),l=o(51255);const{register:a,getItem:h,hasItem:c,getNames:u,getValues:d}=(0,n.default)("cellTypes");t.getRegisteredCellTypes=d,t.getRegisteredCellTypeNames=u,t.hasCellType=c},85183:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(9771);t.CELL_TYPE=s.CELL_TYPE,t.SelectCellType=s.SelectCellType},9771:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(7507),n=o(31151);const i=t.CELL_TYPE="select";t.SelectCellType={CELL_TYPE:i,editor:s.SelectEditor,renderer:n.selectRenderer}},49676:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(18645);t.CELL_TYPE=s.CELL_TYPE,t.TextCellType=s.TextCellType},18645:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(64952),n=o(36748);const i=t.CELL_TYPE="text";t.TextCellType={CELL_TYPE:i,editor:s.TextEditor,renderer:n.textRenderer}},37574:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(4385);t.CELL_TYPE=s.CELL_TYPE,t.TimeCellType=s.TimeCellType},4385:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(14902),n=o(19698),i=o(51284);const r=t.CELL_TYPE="time";t.TimeCellType={CELL_TYPE:r,editor:s.TimeEditor,renderer:n.timeRenderer,validator:i.timeValidator}},87789:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.default=function(e,t){var o,s=this;let k=arguments.length>2&&void 0!==arguments[2]&&arguments[2],V=this;const F=new h.default(V);let W,B,U,j,Y,z,G=!0;(0,b.hasValidParameter)(k)&&(0,b.registerAsRootInstance)(this);this.rootElement=e,this.rootDocument=e.ownerDocument,this.rootWindow=this.rootDocument.defaultView,this.isDestroyed=!1,this.renderSuspendedCounter=0,this.executionSuspendedCounter=0;const $=null!==(o=null==t?void 0:t.layoutDirection)&&void 0!==o?o:"inherit",K=["rtl","ltr"].includes($)?$:this.rootWindow.getComputedStyle(this.rootElement).direction;this.rootElement.setAttribute("dir",K),this.isRtl=function(){return"rtl"===K},this.isLtr=function(){return!V.isRtl()},this.getDirectionFactor=function(){return V.isLtr()?1:-1},t.language=(0,M.getValidLanguageCode)(t.language);const X=new N.MetaManager(V,t,[N.DynamicCellMetaMod,N.ExtendMetaPropertiesMod]),q=X.getTableMeta(),Q=X.getGlobalMeta(),J=(0,P.createUniqueMap)();this.container=this.rootDocument.createElement("div"),this.renderCall=!1,e.insertBefore(this.container,e.firstChild),(0,b.isRootInstance)(this)&&(0,r._injectProductInfo)(t.licenseKey,e);this.guid=`ht_${(0,C.randomString)()}`,L.set(this.guid,this),this.columnIndexMapper=new R.IndexMapper,this.rowIndexMapper=new R.IndexMapper,this.columnIndexMapper.addLocalHook("indexesSequenceChange",(e=>{V.runHooks("afterColumnSequenceChange",e)})),this.rowIndexMapper.addLocalHook("indexesSequenceChange",(e=>{V.runHooks("afterRowSequenceChange",e)})),B=new E.default(V),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid);let Z=new I.Selection(q,{rowIndexMapper:V.rowIndexMapper,columnIndexMapper:V.columnIndexMapper,countCols:()=>V.countCols(),countRows:()=>V.countRows(),propToCol:e=>W.propToCol(e),isEditorOpened:()=>!!V.getActiveEditor()&&V.getActiveEditor().isOpened(),countRenderableColumns:()=>this.view.countRenderableColumns(),countRenderableRows:()=>this.view.countRenderableRows(),countRowHeaders:()=>this.countRowHeaders(),countColHeaders:()=>this.countColHeaders(),countRenderableRowsInRange:function(){return s.view.countRenderableRowsInRange(...arguments)},countRenderableColumnsInRange:function(){return s.view.countRenderableColumnsInRange(...arguments)},getShortcutManager:()=>V.getShortcutManager(),createCellCoords:(e,t)=>V._createCellCoords(e,t),createCellRange:(e,t,o)=>V._createCellRange(e,t,o),visualToRenderableCoords:e=>{const{row:t,col:o}=e;return V._createCellCoords(t>=0?V.rowIndexMapper.getRenderableFromVisualIndex(t):t,o>=0?V.columnIndexMapper.getRenderableFromVisualIndex(o):o)},renderableToVisualCoords:e=>{const{row:t,col:o}=e;return V._createCellCoords(t>=0?V.rowIndexMapper.getVisualFromRenderableIndex(t):t,o>=0?V.columnIndexMapper.getVisualFromRenderableIndex(o):o)},findFirstNonHiddenRenderableRow:(e,t)=>{const o=t>e?1:-1,s=Math.min(e,t),n=Math.max(e,t),i=V.rowIndexMapper.getNearestNotHiddenIndex(e,o);return null===i||1===o&&i>n||-1===o&&i<s?null:i>=0?V.rowIndexMapper.getRenderableFromVisualIndex(i):i},findFirstNonHiddenRenderableColumn:(e,t)=>{const o=t>e?1:-1,s=Math.min(e,t),n=Math.max(e,t),i=V.columnIndexMapper.getNearestNotHiddenIndex(e,o);return null===i||1===o&&i>n||-1===o&&i<s?null:i>=0?V.columnIndexMapper.getRenderableFromVisualIndex(i):i},isDisabledCellSelection:(e,t)=>e<0||t<0?V.getSettings().disableVisualSelection:V.getCellMeta(e,t).disableVisualSelection});this.selection=Z;const ee=e=>{let{hiddenIndexesChanged:t}=e;t&&this.selection.commit()};function te(e){const t=(0,O.normalizeLanguageCode)(e);(0,M.hasLanguageDictionary)(t)?(V.runHooks("beforeLanguageChange",t),Q.language=t,V.runHooks("afterLanguageChange",t)):(0,O.warnUserAboutLanguageRegistration)(e)}function oe(e,t){const o="className"===e?V.rootElement:V.table;if(G)(0,n.addClass)(o,t);else{let s=[],i=[];Q[e]&&(s=Array.isArray(Q[e])?Q[e]:(0,d.stringToArray)(Q[e])),t&&(i=Array.isArray(t)?t:(0,d.stringToArray)(t));const r=(0,d.getDifferenceOfArrays)(s,i),l=(0,d.getDifferenceOfArrays)(i,s);r.length&&(0,n.removeClass)(o,r),l.length&&(0,n.addClass)(o,l)}Q[e]=t}function se(){let e=!1;return{validatorsInQueue:0,valid:!0,addValidatorToQueue(){this.validatorsInQueue+=1,e=!1},removeValidatorFormQueue(){this.validatorsInQueue=this.validatorsInQueue-1<0?0:this.validatorsInQueue-1,this.checkIfQueueIsEmpty()},onQueueEmpty(){},checkIfQueueIsEmpty(){0===this.validatorsInQueue&&!1===e&&(e=!0,this.onQueueEmpty(this.valid))}}}function ne(e){const t=e.replace(",",".");return!1===isNaN(parseFloat(t))?parseFloat(t):e}function ie(e,t,o){if(!e.length)return void o();const s=V.getActiveEditor(),n=new se;let i=!0;n.onQueueEmpty=()=>{s&&i&&s.cancelChanges(),o()};for(let o=e.length-1;o>=0;o--){const[s,r,,l]=e[o],a=W.propToCol(r);let h;h=Number.isInteger(a)?V.getCellMeta(s,a):{...Object.getPrototypeOf(q),...q},"numeric"===h.type&&"string"==typeof l&&(0,v.isNumericLike)(l)&&(e[o][3]=ne(l)),V.getCellValidator(h)&&(n.addValidatorToQueue(),V.validateCell(e[o][3],h,function(t,o){return function(s){if("boolean"!=typeof s)throw new Error("Validation error: result is not boolean");!1===s&&!1===o.allowInvalid&&(i=!1,e.splice(t,1),o.valid=!0),n.removeValidatorFormQueue()}}(o,h),t))}n.checkIfQueueIsEmpty()}function re(e,t){for(let o=e.length-1;o>=0;o--){let s=!1;if(null!==e[o]){if(null!==e[o][2]&&void 0!==e[o][2]||null!==e[o][3]&&void 0!==e[o][3]){if(q.allowInsertRow)for(;e[o][0]>V.countRows()-1;){const{delta:e}=W.createRow(void 0,void 0,{source:t});if(0===e){s=!0;break}}if("array"===V.dataType&&(!q.columns||0===q.columns.length)&&q.allowInsertColumn)for(;W.propToCol(e[o][1])>V.countCols()-1;){const{delta:e}=W.createCol(void 0,void 0,{source:t});if(0===e){s=!0;break}}s||W.set(e[o][0],e[o][1],e[o][3])}}else e.splice(o,1)}const o=e.length>0;if(V.forceFullRender=!0,o){U.adjustRowsAndCols(),V.runHooks("beforeChangeRender",e,t),j.closeEditor(),V.view.render(),j.prepareEditor(),V.view.adjustElementsSize(),V.runHooks("afterChange",e,t||"edit");const o=V.getActiveEditor();o&&(0,r.isDefined)(o.refreshValue)&&o.refreshValue()}else V.view.render()}function le(e,t,o){return Array.isArray(e)?e:[[e,t,o]]}function ae(e,t){const o=V.getActiveEditor(),s=V.runHooks("beforeChange",e,t||"edit"),n=e.filter((e=>null!==e));return!1===s||0===n.length?(o&&o.cancelChanges(),[]):n}this.columnIndexMapper.addLocalHook("cacheUpdated",ee),this.rowIndexMapper.addLocalHook("cacheUpdated",ee),this.selection.addLocalHook("afterSetRangeEnd",((e,t)=>{const o=(0,c.createObjectPropListener)(!1),s=this.selection.getSelectedRange(),{from:i,to:r}=s.current(),l=s.size()-1;this.runHooks("afterSelection",i.row,i.col,r.row,r.col,o,l),this.runHooks("afterSelectionByProp",i.row,V.colToProp(i.col),r.row,V.colToProp(r.col),o,l),t&&(!o.isTouched()||o.isTouched()&&!o.value)&&z.scrollTo(e);const a=Z.isSelectedByRowHeader(),h=Z.isSelectedByColumnHeader();a&&h?(0,n.addClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]):a?((0,n.removeClass)(this.rootElement,"ht__selection--columns"),(0,n.addClass)(this.rootElement,"ht__selection--rows")):h?((0,n.removeClass)(this.rootElement,"ht__selection--rows"),(0,n.addClass)(this.rootElement,"ht__selection--columns")):(0,n.removeClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]),"shift"!==Z.getSelectionSource()&&j.closeEditor(null),V.view.render(),j.prepareEditor()})),this.selection.addLocalHook("beforeSetFocus",(e=>{this.runHooks("beforeSelectionFocusSet",e.row,e.col)})),this.selection.addLocalHook("afterSetFocus",(e=>{const t=(0,c.createObjectPropListener)(!1);this.runHooks("afterSelectionFocusSet",e.row,e.col,t),(!t.isTouched()||t.isTouched()&&!t.value)&&z.scrollTo(e),j.closeEditor(),V.view.render(),j.prepareEditor()})),this.selection.addLocalHook("afterSelectionFinished",(e=>{const t=e.length-1,{from:o,to:s}=e[t];this.runHooks("afterSelectionEnd",o.row,o.col,s.row,s.col,t),this.runHooks("afterSelectionEndByProp",o.row,V.colToProp(o.col),s.row,V.colToProp(s.col),t)})),this.selection.addLocalHook("afterIsMultipleSelection",(e=>{const t=this.runHooks("afterIsMultipleSelection",e.value);e.value&&(e.value=t)})),this.selection.addLocalHook("afterDeselect",(()=>{j.closeEditor(),V.view.render(),(0,n.removeClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]),this.runHooks("afterDeselect")})),this.selection.addLocalHook("beforeHighlightSet",(()=>this.runHooks("beforeSelectionHighlightSet"))).addLocalHook("beforeSetRangeStart",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeSetRangeStart",...t)})).addLocalHook("beforeSetRangeStartOnly",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeSetRangeStartOnly",...t)})).addLocalHook("beforeSetRangeEnd",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeSetRangeEnd",...t)})).addLocalHook("beforeSelectColumns",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeSelectColumns",...t)})).addLocalHook("afterSelectColumns",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("afterSelectColumns",...t)})).addLocalHook("beforeSelectRows",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeSelectRows",...t)})).addLocalHook("afterSelectRows",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("afterSelectRows",...t)})).addLocalHook("beforeModifyTransformStart",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("modifyTransformStart",...t)})).addLocalHook("afterModifyTransformStart",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("afterModifyTransformStart",...t)})).addLocalHook("beforeModifyTransformFocus",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("modifyTransformFocus",...t)})).addLocalHook("afterModifyTransformFocus",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("afterModifyTransformFocus",...t)})).addLocalHook("beforeModifyTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("modifyTransformEnd",...t)})).addLocalHook("afterModifyTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("afterModifyTransformEnd",...t)})).addLocalHook("beforeRowWrap",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeRowWrap",...t)})).addLocalHook("beforeColumnWrap",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeColumnWrap",...t)})).addLocalHook("insertRowRequire",(e=>this.alter("insert_row_above",e,1,"auto"))).addLocalHook("insertColRequire",(e=>this.alter("insert_col_start",e,1,"auto"))),U={alter(e,t){var o,s;let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3?arguments[3]:void 0,l=arguments.length>4?arguments[4]:void 0;const a=e=>{if(0===e.length)return[];const t=[...e];t.sort(((e,t)=>{let[o]=e,[s]=t;return o===s?0:o>s?1:-1}));return(0,d.arrayReduce)(t,((e,t)=>{let[o,s]=t;const n=e[e.length-1],[i,r]=n,l=i+r;if(o<=l){const e=Math.max(s-(l-o),0);n[1]+=e}else e.push([o,s]);return e}),[t[0]])};switch(e){case"insert_row_below":case"insert_row_above":const l=V.countSourceRows();if(q.maxRows===l)return;const h="insert_row_below"===e?"below":"above";t=null!==(o=t)&&void 0!==o?o:"below"===h?l:0;const{delta:c,startPhysicalIndex:u}=W.createRow(t,n,{source:i,mode:h});Z.shiftRows(V.toVisualRow(u),c);break;case"insert_col_start":case"insert_col_end":const g="insert_col_end"===e?"end":"start";t=null!==(s=t)&&void 0!==s?s:"end"===g?V.countSourceCols():0;const{delta:f,startPhysicalIndex:p}=W.createCol(t,n,{source:i,mode:g});if(f){if(Array.isArray(q.colHeaders)){const e=[V.toVisualColumn(p),0];e.length+=f,Array.prototype.splice.apply(q.colHeaders,e)}Z.shiftColumns(V.toVisualColumn(p),f)}break;case"remove_row":const m=e=>{let t=0;(0,d.arrayEach)(e,(e=>{let[o,s]=e;const n=(0,r.isEmpty)(o)?V.countRows()-1:Math.max(o-t,0);Number.isInteger(o)&&(o=Math.max(o-t,0));if(!W.removeRow(o,s,i))return;if(Z.isSelected()){const{row:e}=V.getSelectedRangeLast().highlight;e>=o&&e<=o+s-1&&j.closeEditor(!0)}const l=V.countRows();0===l?Z.deselect():"ContextMenu.removeRow"===i?Z.refresh():Z.shiftRows(o,-s);const a=q.fixedRowsTop;a>=n+1&&(q.fixedRowsTop-=Math.min(s,a-n));const h=q.fixedRowsBottom;h&&n>=l-h&&(q.fixedRowsBottom-=Math.min(s,h)),t+=s}))};Array.isArray(t)?m(a(t)):m([[t,n]]);break;case"remove_col":const w=e=>{let t=0;(0,d.arrayEach)(e,(e=>{let[o,s]=e;const n=(0,r.isEmpty)(o)?V.countCols()-1:Math.max(o-t,0);let l=V.toPhysicalColumn(n);Number.isInteger(o)&&(o=Math.max(o-t,0));if(!W.removeCol(o,s,i))return;if(Z.isSelected()){const{col:e}=V.getSelectedRangeLast().highlight;e>=o&&e<=o+s-1&&j.closeEditor(!0)}0===V.countCols()?Z.deselect():"ContextMenu.removeColumn"===i?Z.refresh():Z.shiftColumns(o,-s);const a=q.fixedColumnsStart;a>=n+1&&(q.fixedColumnsStart-=Math.min(s,a-n)),Array.isArray(q.colHeaders)&&(void 0===l&&(l=-1),q.colHeaders.splice(l,s)),t+=s}))};Array.isArray(t)?w(a(t)):w([[t,n]]);break;default:throw new Error(`There is no such action "${e}"`)}V.view.render(),l||U.adjustRowsAndCols()},adjustRowsAndCols(){const e=q.minRows,t=q.minSpareRows,o=q.minCols,s=q.minSpareCols;if(e){const t=V.countRows();t<e&&W.createRow(t,e-t,{source:"auto"})}if(t){const e=V.countEmptyRows(!0);if(e<t){const o=t-e,s=Math.min(o,q.maxRows-V.countSourceRows());W.createRow(V.countRows(),s,{source:"auto"})}}{let e;(o||s)&&(e=V.countEmptyCols(!0));let t=V.countCols();if(o&&!q.columns&&t<o){const s=o-t;e+=s,W.createCol(t,s,{source:"auto"})}if(s&&!q.columns&&"array"===V.dataType&&e<s){t=V.countCols();const o=s-e,n=Math.min(o,q.maxCols-t);W.createCol(t,n,{source:"auto"})}}V.view&&V.view.adjustElementsSize()},populateFromArray(e,t,o,s,n){let i,r,l,a;const h=[],u={},g=[],f=e.row,p=e.col;if(r=t.length,0===r)return!1;let m=0,w=0;switch((0,c.isObject)(o)&&(m=o.col-p+1,w=o.row-f+1),n){case"shift_down":const n=(0,d.pivot)(t),C=n.length,v=Math.max(C,m),y=V.getData().slice(f),E=(0,d.pivot)(y).slice(p,p+v);for(l=0;l<v;l+=1)if(l<C){for(i=0,r=n[l].length;i<w-r;i+=1)n[l].push(n[l][i%r]);l<E.length?g.push(n[l].concat(E[l])):g.push(n[l].concat(new Array(y.length).fill(null)))}else g.push(n[l%C].concat(E[l]));V.populateFromArray(f,p,(0,d.pivot)(g));break;case"shift_right":const S=t.length,R=Math.max(S,w),b=V.getData().slice(f).map((e=>e.slice(p)));for(i=0;i<R;i+=1)if(i<S){for(l=0,a=t[i].length;l<m-a;l+=1)t[i].push(t[i][l%a]);if(i<b.length)for(let e=0;e<b[i].length;e+=1)t[i].push(b[i][e]);else t[i].push(...new Array(b[0].length).fill(null))}else t.push(t[i%r].slice(0,R).concat(b[i]));V.populateFromArray(f,p,t);break;default:u.row=e.row,u.col=e.col;let _,T=0,M=0,O=!0;const I=function(e){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const s=t[e%t.length];return null!==o?s[o%s.length]:s},N=t.length,A=o?o.row-e.row+1:0;for(r=o?A:Math.max(N,A),i=0;i<r&&!(o&&u.row>o.row&&A>N||!q.allowInsertRow&&u.row>V.countRows()-1||u.row>=q.maxRows);i++){const t=i-T,n=I(t).length,d=o?o.col-e.col+1:0;if(a=o?d:Math.max(n,d),u.col=e.col,_=V.getCellMeta(u.row,u.col),"CopyPaste.paste"!==s&&"Autofill.fill"!==s||!_.skipRowOnPaste){for(M=0,l=0;l<a&&!(o&&u.col>o.col&&d>n||!q.allowInsertColumn&&u.col>V.countCols()-1||u.col>=q.maxCols);l++){if(_=V.getCellMeta(u.row,u.col),("CopyPaste.paste"===s||"Autofill.fill"===s)&&_.skipColumnOnPaste){M+=1,u.col+=1,a+=1;continue}if(_.readOnly&&"UndoRedo.undo"!==s){u.col+=1;continue}let e=I(t,l-M),o=V.getDataAtCell(u.row,u.col);if(null!==e&&"object"==typeof e)if(Array.isArray(e)&&null===o&&(o=[]),null===o||"object"!=typeof o)O=!1;else{const t=(0,c.duckSchema)(Array.isArray(o)?o:o[0]||o),s=(0,c.duckSchema)(Array.isArray(e)?e:e[0]||e);(0,c.isObjectEqual)(t,s)||Array.isArray(t)&&Array.isArray(s)?e=(0,c.deepClone)(e):O=!1}else null!==o&&"object"==typeof o&&(O=!1);O&&h.push([u.row,u.col,e]),O=!0,u.col+=1}u.row+=1}else T+=1,u.row+=1,r+=1}V.setDataAtCell(h,null,null,s||"populateFromArray")}}},this.init=function(){B.setData(q.data),V.runHooks("beforeInit"),((0,l.isMobileBrowser)()||(0,l.isIpadOS)())&&(0,n.addClass)(V.rootElement,"mobile"),this.updateSettings(q,!0),this.view=new y.default(this),j=a.default.getInstance(V,q,Z),z=(0,A.createViewportScroller)(V),Y=new u.FocusManager(V),(0,b.isRootInstance)(this)&&(0,A.installFocusCatcher)(V),V.runHooks("init"),this.forceFullRender=!0,this.view.render(),G&&null===V.rootElement.offsetParent&&(0,n.observeVisibilityChangeOnce)(V.rootElement,(()=>{V.view._wt.wtOverlays.updateLastSpreaderSize(),V.render(),V.view.adjustElementsSize()})),"object"==typeof G&&(V.runHooks("afterChange",G[0],G[1]),G=!1),V.runHooks("afterInit")},this._createCellCoords=function(e,t){return V.view._wt.createCellCoords(e,t)},this._createCellRange=function(e,t,o){return V.view._wt.createCellRange(e,t,o)},this.validateCell=function(e,t,o,s){let n=V.getCellValidator(t);function l(e){if(!(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])||!0===t.hidden)return void o(e);const s=t.visualCol,n=t.visualRow,i=V.getCell(n,s,!0);if(i&&"TH"!==i.nodeName){const e=V.rowIndexMapper.getRenderableFromVisualIndex(n),t=V.columnIndexMapper.getRenderableFromVisualIndex(s);V.view._wt.getSetting("cellRenderer",e,t,i)}o(e)}var a;(0,r.isRegExp)(n)&&(a=n,n=function(e,t){t(a.test(e))}),(0,i.isFunction)(n)?(e=V.runHooks("beforeValidate",e,t.visualRow,t.prop,s),V._registerImmediate((()=>{n.call(t,e,(o=>{V&&(o=V.runHooks("afterValidate",o,e,t.visualRow,t.prop,s),t.valid=o,l(o),V.runHooks("postAfterValidate",o,e,t.visualRow,t.prop,s))}))}))):V._registerImmediate((()=>{t.valid=!0,l(t.valid,!1)}))},this.setDataAtCell=function(e,t,o,s){const n=le(e,t,o),i=[];let r,l,a,h=s;for(r=0,l=n.length;r<l;r++){if("object"!=typeof n[r])throw new Error("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter");if("number"!=typeof n[r][1])throw new Error("Method `setDataAtCell` accepts row and column number as its parameters. If you want to use object property name, use method `setDataAtRowProp`");a=n[r][1]>=this.countCols()?n[r][1]:W.colToProp(n[r][1]),i.push([n[r][0],a,B.getAtCell(this.toPhysicalRow(n[r][0]),n[r][1]),n[r][2]])}h||"object"!=typeof e||(h=t);const c=ae(i,s);V.runHooks("afterSetDataAtCell",c,h),ie(c,h,(()=>{re(c,h)}))},this.setDataAtRowProp=function(e,t,o,s){const n=le(e,t,o),i=[];let r,l,a=s;for(r=0,l=n.length;r<l;r++)i.push([n[r][0],n[r][1],B.getAtCell(this.toPhysicalRow(n[r][0]),n[r][1]),n[r][2]]);a||"object"!=typeof e||(a=t);const h=ae(i,s);V.runHooks("afterSetDataAtRowProp",h,a),ie(h,a,(()=>{re(h,a)}))},this.listen=function(){V&&!V.isListening()&&(L.forEach((e=>{V!==e&&e.unlisten()})),D=V.guid,V.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(D=null,V.runHooks("afterUnlisten"))},this.isListening=function(){return D===V.guid},this.destroyEditor=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];j.closeEditor(e),V.view.render(),t&&Z.isSelected()&&j.prepareEditor()},this.populateFromArray=function(e,t,o,s,n,i,r){if("object"!=typeof o||"object"!=typeof o[0])throw new Error("populateFromArray parameter `input` must be an array of arrays");const l="number"==typeof s?V._createCellCoords(s,n):null;return U.populateFromArray(V._createCellCoords(e,t),o,l,i,r)},this.spliceCol=function(e,t,o){for(var s=arguments.length,n=new Array(s>3?s-3:0),i=3;i<s;i++)n[i-3]=arguments[i];return W.spliceCol(e,t,o,...n)},this.spliceRow=function(e,t,o){for(var s=arguments.length,n=new Array(s>3?s-3:0),i=3;i<s;i++)n[i-3]=arguments[i];return W.spliceRow(e,t,o,...n)},this.getSelected=function(){if(Z.isSelected())return(0,d.arrayMap)(Z.getSelectedRange(),(e=>{let{from:t,to:o}=e;return[t.row,t.col,o.row,o.col]}))},this.getSelectedLast=function(){const e=this.getSelected();let t;return e&&e.length>0&&(t=e[e.length-1]),t},this.getSelectedRange=function(){if(Z.isSelected())return Array.from(Z.getSelectedRange())},this.getSelectedRangeLast=function(){const e=this.getSelectedRange();let t;return e&&e.length>0&&(t=e[e.length-1]),t},this.emptySelectedCells=function(e){if(!Z.isSelected()||0===this.countRows()||0===this.countCols())return;const t=[];(0,d.arrayEach)(Z.getSelectedRange(),(e=>{if(e.isSingleHeader())return;const o=e.getTopStartCorner(),s=e.getBottomEndCorner();(0,v.rangeEach)(o.row,s.row,(e=>{(0,v.rangeEach)(o.col,s.col,(o=>{this.getCellMeta(e,o).readOnly||t.push([e,o,null])}))}))})),t.length>0&&this.setDataAtCell(t,e)},this.isRenderSuspended=function(){return this.renderSuspendedCounter>0},this.suspendRender=function(){this.renderSuspendedCounter+=1},this.resumeRender=function(){const e=this.renderSuspendedCounter-1;this.renderSuspendedCounter=Math.max(e,0),this.isRenderSuspended()||e!==this.renderSuspendedCounter||(this.renderCall?this.render():V.view.render())},this.render=function(){this.view&&(this.renderCall=!0,this.forceFullRender=!0,this.isRenderSuspended()||V.view.render())},this.batchRender=function(e){this.suspendRender();const t=e();return this.resumeRender(),t},this.isExecutionSuspended=function(){return this.executionSuspendedCounter>0},this.suspendExecution=function(){this.executionSuspendedCounter+=1,this.columnIndexMapper.suspendOperations(),this.rowIndexMapper.suspendOperations()},this.resumeExecution=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.executionSuspendedCounter-1;this.executionSuspendedCounter=Math.max(t,0),(!this.isExecutionSuspended()&&t===this.executionSuspendedCounter||e)&&(this.columnIndexMapper.resumeOperations(),this.rowIndexMapper.resumeOperations())},this.batchExecution=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.suspendExecution();const o=e();return this.resumeExecution(t),o},this.batch=function(e){this.suspendRender(),this.suspendExecution();const t=e();return this.resumeExecution(),this.resumeRender(),t},this.refreshDimensions=function(){if(!V.view)return;const{width:e,height:t}=V.view.getLastSize(),{width:o,height:s}=V.rootElement.getBoundingClientRect(),n=o!==e||s!==t;!1===V.runHooks("beforeRefreshDimensions",{width:e,height:t},{width:o,height:s},n)||((n||V.view._wt.wtOverlays.scrollableElement===V.rootWindow)&&(V.view.setLastSize(o,s),V.render()),V.runHooks("afterRefreshDimensions",{width:e,height:t},{width:o,height:s},n))},this.updateData=function(e,t){(0,N.replaceData)(e,(e=>{W=e}),(e=>{W=e,V.columnIndexMapper.fitToLength(this.getInitialColumnCount()),V.rowIndexMapper.fitToLength(this.countSourceRows()),U.adjustRowsAndCols(),Z.refresh()}),{hotInstance:V,dataMap:W,dataSource:B,internalSource:"updateData",source:t,metaManager:X,firstRun:G})},this.loadData=function(e,t){(0,N.replaceData)(e,(e=>{W=e}),(()=>{X.clearCellsCache(),V.initIndexMappers(),U.adjustRowsAndCols(),Z.refresh(),G&&(G=[null,"loadData"])}),{hotInstance:V,dataMap:W,dataSource:B,internalSource:"loadData",source:t,metaManager:X,firstRun:G})},this.getInitialColumnCount=function(){const e=q.columns;let t=0;if(Array.isArray(e))t=e.length;else if((0,i.isFunction)(e))if("array"===V.dataType){const o=this.countSourceCols();for(let s=0;s<o;s+=1)e(s)&&(t+=1)}else"object"!==V.dataType&&"function"!==V.dataType||(t=W.colToPropCache.length);else if((0,r.isDefined)(q.dataSchema)){const e=W.getSchema();t=Array.isArray(e)?e.length:(0,c.deepObjectSize)(e)}else t=this.countSourceCols();return t},this.initIndexMappers=function(){this.columnIndexMapper.initToLength(this.getInitialColumnCount()),this.rowIndexMapper.initToLength(this.countSourceRows())},this.getData=function(e,t,o,s){return(0,r.isUndefined)(e)?W.getAll():W.getRange(V._createCellCoords(e,t),V._createCellCoords(o,s),W.DESTINATION_RENDERER)},this.getCopyableText=function(e,t,o,s){return W.getCopyableText(V._createCellCoords(e,t),V._createCellCoords(o,s))},this.getCopyableData=function(e,t){return W.getCopyable(e,W.colToProp(t))},this.getSchema=function(){return W.getSchema()},this.updateSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=(G?V.loadData:V.updateData).bind(this);let s,n,l=!1;if((0,r.isDefined)(e.rows))throw new Error('The "rows" setting is no longer supported. Do you mean startRows, minRows or maxRows?');if((0,r.isDefined)(e.cols))throw new Error('The "cols" setting is no longer supported. Do you mean startCols, minCols or maxCols?');if((0,r.isDefined)(e.ganttChart))throw new Error('Since 8.0.0 the "ganttChart" setting is no longer supported.');for(s in e)"data"===s||("language"===s?te(e.language):"className"===s?oe("className",e.className):"tableClassName"===s&&V.table?(oe("tableClassName",e.tableClassName),V.view._wt.wtOverlays.syncOverlayTableClassNames()):T.default.getSingleton().isRegistered(s)||T.default.getSingleton().isDeprecated(s)?((0,i.isFunction)(e[s])||Array.isArray(e[s]))&&(e[s].initialHook=!0,V.addHook(s,e[s])):!t&&(0,c.hasOwnProperty)(e,s)&&(Q[s]=e[s]));void 0===e.data&&void 0===q.data?o(null,"updateSettings"):void 0!==e.data?o(e.data,"updateSettings"):void 0!==e.columns&&(W.createMap(),V.initIndexMappers());const a=V.countCols(),h=q.columns;if(h&&(0,i.isFunction)(h)&&(l=!0),void 0===e.cell&&void 0===e.cells&&void 0===e.columns||X.clearCache(),a>0)for(s=0,n=0;s<a;s++){if(h){const e=l?h(s):h[n];e&&X.updateColumnMeta(n,e)}n+=1}(0,r.isDefined)(e.cell)&&(0,c.objectEach)(e.cell,(e=>{V.setCellMetaObject(e.row,e.col,e)})),V.runHooks("afterCellMetaReset");let u=V.rootElement.style.height;""!==u&&(u=parseInt(V.rootElement.style.height,10));let d=e.height;if((0,i.isFunction)(d)&&(d=d()),t){V.rootElement.getAttribute("style")&&V.rootElement.setAttribute("data-initialstyle",V.rootElement.getAttribute("style"))}if(null===d){const e=V.rootElement.getAttribute("data-initialstyle");e&&(e.indexOf("height")>-1||e.indexOf("overflow")>-1)?V.rootElement.setAttribute("style",e):(V.rootElement.style.height="",V.rootElement.style.overflow="")}else void 0!==d&&(V.rootElement.style.height=isNaN(d)?`${d}`:`${d}px`,V.rootElement.style.overflow="hidden");if(void 0!==e.width){let t=e.width;(0,i.isFunction)(t)&&(t=t()),V.rootElement.style.width=isNaN(t)?`${t}`:`${t}px`}t||(V.view&&(V.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked(),V.view._wt.exportSettingsAsClassNames()),V.runHooks("afterUpdateSettings",e)),U.adjustRowsAndCols(),V.view&&!G&&(V.forceFullRender=!0,V.view.render(),V.view._wt.wtOverlays.adjustElementsSize()),t||!V.view||""!==u&&""!==d&&void 0!==d||u===d||V.view._wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){const e=V.getSelectedLast();if(q.getValue){if((0,i.isFunction)(q.getValue))return q.getValue.call(V);if(e)return V.getData()[e[0][0]][q.getValue]}else if(e)return V.getDataAtCell(e[0],e[1])},this.getSettings=function(){return q},this.clear=function(){this.selectAll(),this.emptySelectedCells()},this.alter=function(e,t,o,s,n){U.alter(e,t,o,s,n)},this.getCell=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=t,n=e;if(t>=0){if(this.columnIndexMapper.isHidden(this.toPhysicalColumn(t)))return null;s=this.columnIndexMapper.getRenderableFromVisualIndex(t)}if(e>=0){if(this.rowIndexMapper.isHidden(this.toPhysicalRow(e)))return null;n=this.rowIndexMapper.getRenderableFromVisualIndex(e)}return null===n||null===s||void 0===n||void 0===s?null:V.view.getCellAtCoords(V._createCellCoords(n,s),o)},this.getCoords=function(e){const t=this.view._wt.wtTable.getCoords(e);if(null===t)return null;const{row:o,col:s}=t;let n=o,i=s;return o>=0&&(n=this.rowIndexMapper.getVisualFromRenderableIndex(o)),s>=0&&(i=this.columnIndexMapper.getVisualFromRenderableIndex(s)),V._createCellCoords(n,i)},this.colToProp=function(e){return W.colToProp(e)},this.propToCol=function(e){return W.propToCol(e)},this.toVisualRow=e=>this.rowIndexMapper.getVisualFromPhysicalIndex(e),this.toVisualColumn=e=>this.columnIndexMapper.getVisualFromPhysicalIndex(e),this.toPhysicalRow=e=>this.rowIndexMapper.getPhysicalFromVisualIndex(e),this.toPhysicalColumn=e=>this.columnIndexMapper.getPhysicalFromVisualIndex(e),this.getDataAtCell=function(e,t){return W.get(e,W.colToProp(t))},this.getDataAtRowProp=function(e,t){return W.get(e,t)},this.getDataAtCol=function(e){const t=[],o=W.getRange(V._createCellCoords(0,e),V._createCellCoords(q.data.length-1,e),W.DESTINATION_RENDERER);for(let e=0;e<o.length;e+=1)for(let s=0;s<o[e].length;s+=1)t.push(o[e][s]);return t},this.getDataAtProp=function(e){const t=[],o=W.getRange(V._createCellCoords(0,W.propToCol(e)),V._createCellCoords(q.data.length-1,W.propToCol(e)),W.DESTINATION_RENDERER);for(let e=0;e<o.length;e+=1)for(let s=0;s<o[e].length;s+=1)t.push(o[e][s]);return t},this.getSourceData=function(e,t,o,s){let n;return n=void 0===e?B.getData():B.getByRange(V._createCellCoords(e,t),V._createCellCoords(o,s)),n},this.getSourceDataArray=function(e,t,o,s){let n;return n=void 0===e?B.getData(!0):B.getByRange(V._createCellCoords(e,t),V._createCellCoords(o,s),!0),n},this.getSourceDataAtCol=function(e){return B.getAtColumn(e)},this.setSourceDataAtCell=function(e,t,o,s){const n=le(e,t,o),i=this.hasHook("afterSetSourceDataAtCell"),l=[];i&&(0,d.arrayEach)(n,(e=>{let[t,o,s]=e;l.push([t,o,B.getAtCell(t,o),s])})),(0,d.arrayEach)(n,(e=>{let[t,o,s]=e;B.setAtCell(t,o,s)})),i&&this.runHooks("afterSetSourceDataAtCell",l,s),this.render();const a=V.getActiveEditor();a&&(0,r.isDefined)(a.refreshValue)&&a.refreshValue()},this.getSourceDataAtRow=function(e){return B.getAtRow(e)},this.getSourceDataAtCell=function(e,t){return B.getAtCell(e,t)},this.getDataAtRow=function(e){return W.getRange(V._createCellCoords(e,0),V._createCellCoords(e,this.countCols()-1),W.DESTINATION_RENDERER)[0]||[]},this.getDataType=function(e,t,o,s){const n=void 0===e?[0,0,this.countRows(),this.countCols()]:[e,t,o,s],[i,r]=n;let[,,l,a]=n,h=null,c=null;void 0===l&&(l=i),void 0===a&&(a=r);let u="mixed";return(0,v.rangeEach)(Math.max(Math.min(i,l),0),Math.max(i,l),(e=>{let t=!0;return(0,v.rangeEach)(Math.max(Math.min(r,a),0),Math.max(r,a),(o=>{const s=this.getCellMeta(e,o);return c=s.type,h?t=h===c:h=c,t})),u=t?c:"mixed",t})),u},this.removeCellMeta=function(e,t,o){const[s,n]=[this.toPhysicalRow(e),this.toPhysicalColumn(t)];let i=X.getCellMetaKeyValue(s,n,o);!1!==V.runHooks("beforeRemoveCellMeta",e,t,o,i)&&(X.removeCellMeta(s,n,o),V.runHooks("afterRemoveCellMeta",e,t,o,i)),i=null},this.spliceCellsMeta=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(var o=arguments.length,s=new Array(o>2?o-2:0),n=2;n<o;n++)s[n-2]=arguments[n];if(s.length>0&&!Array.isArray(s[0]))throw new Error("The 3rd argument (cellMetaRows) has to be passed as an array of cell meta objects array.");t>0&&X.removeRow(this.toPhysicalRow(e),t),s.length>0&&(0,d.arrayEach)(s.reverse(),(t=>{X.createRow(this.toPhysicalRow(e)),(0,d.arrayEach)(t,((t,o)=>this.setCellMetaObject(e,o,t)))})),V.render()},this.setCellMetaObject=function(e,t,o){"object"==typeof o&&(0,c.objectEach)(o,((o,s)=>{this.setCellMeta(e,t,s,o)}))},this.setCellMeta=function(e,t,o,s){if(!1===V.runHooks("beforeSetCellMeta",e,t,o,s))return;let n=e,i=t;e<this.countRows()&&(n=this.toPhysicalRow(e)),t<this.countCols()&&(i=this.toPhysicalColumn(t)),X.setCellMeta(n,i,o,s),V.runHooks("afterSetCellMeta",e,t,o,s)},this.getCellsMeta=function(){return X.getCellsMeta()},this.getCellMeta=function(e,t){let o=this.toPhysicalRow(e),s=this.toPhysicalColumn(t);return null===o&&(o=e),null===s&&(s=t),X.getCellMeta(o,s,{visualRow:e,visualColumn:t})},this.getColumnMeta=function(e){return X.getColumnMeta(this.toPhysicalColumn(e))},this.getCellMetaAtRow=function(e){return X.getCellsMetaAtRow(e)},this.isColumnModificationAllowed=function(){return!("object"===V.dataType||q.columns)},this.getCellRenderer=function(e,t){const o="number"==typeof e?V.getCellMeta(e,t).renderer:e.renderer;return"string"==typeof o?(0,p.getRenderer)(o):(0,r.isUndefined)(o)?(0,p.getRenderer)("text"):o},this.getCellEditor=function(e,t){const o="number"==typeof e?V.getCellMeta(e,t).editor:e.editor;return"string"==typeof o?(0,m.getEditor)(o):(0,r.isUndefined)(o)?(0,m.getEditor)("text"):o},this.getCellValidator=function(e,t){const o="number"==typeof e?V.getCellMeta(e,t).validator:e.validator;return"string"==typeof o?(0,w.getValidator)(o):o},this.validateCells=function(e){this._validateCells(e)},this.validateRows=function(e,t){if(!Array.isArray(e))throw new Error("validateRows parameter `rows` must be an array");this._validateCells(t,e)},this.validateColumns=function(e,t){if(!Array.isArray(e))throw new Error("validateColumns parameter `columns` must be an array");this._validateCells(t,void 0,e)},this._validateCells=function(e,t,o){const s=new se;e&&(s.onQueueEmpty=e);let n=V.countRows()-1;for(;n>=0;){if(void 0!==t&&-1===t.indexOf(n)){n-=1;continue}let e=V.countCols()-1;for(;e>=0;)void 0===o||-1!==o.indexOf(e)?(s.addValidatorToQueue(),V.validateCell(V.getDataAtCell(n,e),V.getCellMeta(n,e),(e=>{if("boolean"!=typeof e)throw new Error("Validation error: result is not boolean");!1===e&&(s.valid=!1),s.removeValidatorFormQueue()}),"validateCells"),e-=1):e-=1;n-=1}s.checkIfQueueIsEmpty()},this.getRowHeader=function(e){let t=q.rowHeaders,o=e;return void 0!==o&&(o=V.runHooks("modifyRowHeader",o)),void 0===o?(t=[],(0,v.rangeEach)(V.countRows()-1,(e=>{t.push(V.getRowHeader(e))}))):Array.isArray(t)&&void 0!==t[o]?t=t[o]:(0,i.isFunction)(t)?t=t(o):t&&"string"!=typeof t&&"number"!=typeof t&&(t=o+1),t},this.hasRowHeaders=function(){return!!q.rowHeaders},this.hasColHeaders=function(){if(void 0!==q.colHeaders&&null!==q.colHeaders)return!!q.colHeaders;for(let e=0,t=V.countCols();e<t;e++)if(V.getColHeader(e))return!0;return!1},this.getColHeader=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;const o=V.runHooks("modifyColHeader",e);if(void 0===o){const e=[],t=V.countCols();for(let o=0;o<t;o++)e.push(V.getColHeader(o));return e}let s=q.colHeaders;const n=V.toPhysicalColumn(o),r=function(e){const t=[],o=V.countCols();let s=0;for(;s<o;s++)(0,i.isFunction)(q.columns)&&q.columns(s)&&t.push(s);return t[e]}(n);return!1===q.colHeaders?s=null:q.columns&&(0,i.isFunction)(q.columns)&&q.columns(r)&&q.columns(r).title?s=q.columns(r).title:q.columns&&q.columns[n]&&q.columns[n].title?s=q.columns[n].title:Array.isArray(q.colHeaders)&&void 0!==q.colHeaders[n]?s=q.colHeaders[n]:(0,i.isFunction)(q.colHeaders)?s=q.colHeaders(n):q.colHeaders&&"string"!=typeof q.colHeaders&&"number"!=typeof q.colHeaders&&(s=(0,S.spreadsheetColumnLabel)(o)),s=V.runHooks("modifyColumnHeaderValue",s,e,t),s},this._getColWidthFromSettings=function(e){let t;if(e>=0){t=V.getCellMeta(0,e).width}if(void 0!==t&&t!==q.width||(t=q.colWidths),null!=t){switch(typeof t){case"object":t=t[e];break;case"function":t=t(e)}"string"==typeof t&&(t=parseInt(t,10))}return t},this.getColWidth=function(e){let t=V._getColWidthFromSettings(e);return t=V.runHooks("modifyColWidth",t,e),void 0===t&&(t=_.DEFAULT_COLUMN_WIDTH),t},this._getRowHeightFromSettings=function(e){let t=q.rowHeights;if(null!=t){switch(typeof t){case"object":t=t[e];break;case"function":t=t(e)}"string"==typeof t&&(t=parseInt(t,10))}return t},this.getRowHeight=function(e){let t=V._getRowHeightFromSettings(e);return t=V.runHooks("modifyRowHeight",t,e),t},this.countSourceRows=function(){return B.countRows()},this.countSourceCols=function(){return B.countFirstRowKeys()},this.countRows=function(){return W.getLength()},this.countCols=function(){const e=q.maxCols,t=this.columnIndexMapper.getNotTrimmedIndexesLength();return Math.min(e,t)},this.countRenderedRows=function(){return V.view._wt.drawn?V.view._wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return V.view._wt.drawn?V.view._wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return V.view._wt.drawn?V.view._wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return V.view._wt.drawn?V.view._wt.wtTable.getVisibleColumnsCount():-1},this.countRowHeaders=function(){return this.view.getRowHeadersCount()},this.countColHeaders=function(){return this.view.getColumnHeadersCount()},this.countEmptyRows=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return(0,v.rangeEachReverse)(V.countRows()-1,(o=>{if(V.isEmptyRow(o))t+=1;else if(!0===e)return!1})),t},this.countEmptyCols=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return(0,v.rangeEachReverse)(V.countCols()-1,(o=>{if(V.isEmptyCol(o))t+=1;else if(!0===e)return!1})),t},this.isEmptyRow=function(e){return q.isEmptyRow.call(V,e)},this.isEmptyCol=function(e){return q.isEmptyCol.call(V,e)},this.selectCell=function(e,t,o,s){let n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];return!(0,r.isUndefined)(e)&&!(0,r.isUndefined)(t)&&this.selectCells([[e,t,o,s]],n,i)},this.selectCells=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[[]],t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];!1===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&z.suspend();const o=Z.selectCells(e);return o&&t&&V.listen(),z.resume(),o},this.selectColumns=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,o=arguments.length>2?arguments[2]:void 0;return Z.selectColumns(e,t,o)},this.selectRows=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,o=arguments.length>2?arguments[2]:void 0;return Z.selectRows(e,t,o)},this.deselectCell=function(){Z.deselect()},this.selectAll=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,o=arguments.length>2?arguments[2]:void 0;z.skipNextScrollCycle(),Z.selectAll(e,t,o)};const he=(e,t)=>e.getNearestNotHiddenIndex(t,1,!0);this.scrollViewportTo=function(e){var t,o;"number"==typeof e&&(e={row:arguments[0],col:arguments[1],verticalSnap:arguments[2]?"bottom":"top",horizontalSnap:arguments[3]?"end":"start",considerHiddenIndexes:null===(o=arguments[4])||void 0===o||o});const{row:s,col:n,verticalSnap:i,horizontalSnap:r,considerHiddenIndexes:l}=null!==(t=e)&&void 0!==t?t:{};let a,h,c,u;void 0!==i&&(a="top"===i,h=!a),void 0!==r&&(c="start"===r,u=!c);let d=s,g=n;if(void 0===l||l){const e=Number.isInteger(s)&&s>=0,t=Number.isInteger(n)&&n>=0,o=e?he(this.rowIndexMapper,s):void 0,i=t?he(this.columnIndexMapper,n):void 0;if(null===o||null===i)return!1;d=e?V.rowIndexMapper.getRenderableFromVisualIndex(o):s,g=t?V.columnIndexMapper.getRenderableFromVisualIndex(i):n}const f=Number.isInteger(d),p=Number.isInteger(g);return f&&d>=0&&p&&g>=0?V.view.scrollViewport(V._createCellCoords(d,g),a,u,h,c):f&&d>=0&&(p&&g<0||!p)?V.view.scrollViewportVertically(d,a,h):!!(p&&g>=0&&(f&&d<0||!f))&&V.view.scrollViewportHorizontally(g,u,c)},this.scrollToFocusedCell=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:()=>{};if(!this.selection.isSelected())return;this.addHookOnce("afterScroll",e);const{highlight:t}=this.getSelectedRangeLast();this.scrollViewportTo(t.toObject())?this.view.render():(this.removeHook("afterScroll",e),this._registerImmediate((()=>e())))},this.destroy=function(){if(V._clearTimeouts(),V._clearImmediates(),V.view&&V.view.destroy(),B&&B.destroy(),B=null,this.getShortcutManager().destroy(),X.clearCache(),L.delete(this.guid),(0,b.isRootInstance)(V)){const e=this.rootDocument.querySelector(".hot-display-license-info");e&&e.parentNode.removeChild(e)}(0,n.empty)(V.rootElement),F.destroy(),j&&j.destroy(),V.batchExecution((()=>{V.rowIndexMapper.unregisterAll(),V.columnIndexMapper.unregisterAll(),J.getItems().forEach((e=>{let[,t]=e;t.destroy()})),J.clear(),V.runHooks("afterDestroy")}),!0),T.default.getSingleton().destroy(V),(0,c.objectEach)(V,((e,t,o)=>{var s;(0,i.isFunction)(e)?o[t]=(s=t,()=>{throw new Error(`The "${s}" method cannot be called because this Handsontable instance has been destroyed`)}):"guid"!==t&&(o[t]=null)})),V.isDestroyed=!0,W&&W.destroy(),W=null,U=null,Z=null,j=null,V=null},this.getActiveEditor=function(){return j.getActiveEditor()},this.getFirstRenderedVisibleRow=function(){return V.view.getFirstRenderedVisibleRow()},this.getLastRenderedVisibleRow=function(){return V.view.getLastRenderedVisibleRow()},this.getFirstRenderedVisibleColumn=function(){return V.view.getFirstRenderedVisibleColumn()},this.getLastRenderedVisibleColumn=function(){return V.view.getLastRenderedVisibleColumn()},this.getFirstFullyVisibleRow=function(){return V.view.getFirstFullyVisibleRow()},this.getLastFullyVisibleRow=function(){return V.view.getLastFullyVisibleRow()},this.getFirstFullyVisibleColumn=function(){return V.view.getFirstFullyVisibleColumn()},this.getLastFullyVisibleColumn=function(){return V.view.getLastFullyVisibleColumn()},this.getFirstPartiallyVisibleRow=function(){return V.view.getFirstPartiallyVisibleRow()},this.getLastPartiallyVisibleRow=function(){return V.view.getLastPartiallyVisibleRow()},this.getFirstPartiallyVisibleColumn=function(){return V.view.getFirstPartiallyVisibleColumn()},this.getLastPartiallyVisibleColumn=function(){return V.view.getLastPartiallyVisibleColumn()},this.getPlugin=function(e){const t=(0,C.toUpperCaseFirst)(e);return"UndoRedo"===t?this.undoRedo:J.getItem(t)},this.getPluginName=function(e){return e===this.undoRedo?this.undoRedo.constructor.PLUGIN_KEY:J.getId(e)},this.getInstance=function(){return V},this.addHook=function(e,t,o){T.default.getSingleton().add(e,t,V,o)},this.hasHook=function(e){return T.default.getSingleton().has(e,V)||T.default.getSingleton().has(e)},this.addHookOnce=function(e,t,o){T.default.getSingleton().once(e,t,V,o)},this.removeHook=function(e,t){T.default.getSingleton().remove(e,t,V)},this.runHooks=function(e,t,o,s,n,i,r){return T.default.getSingleton().run(V,e,t,o,s,n,i,r)},this.getTranslatedPhrase=function(e,t){return(0,M.getTranslatedPhrase)(q.language,e,t)},this.toHTML=()=>(0,g.instanceToHTML)(this),this.toTableElement=()=>{const e=this.rootDocument.createElement("div");return e.insertAdjacentHTML("afterbegin",(0,g.instanceToHTML)(this)),e.firstElementChild},this.timeouts=[],this._registerTimeout=function(e){let t=e;"function"==typeof t&&(t=setTimeout(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)),this.timeouts.push(t)},this._clearTimeouts=function(){(0,d.arrayEach)(this.timeouts,(e=>{clearTimeout(e)}))},this.immediates=[],this._registerImmediate=function(e){this.immediates.push(setImmediate(e))},this._clearImmediates=function(){(0,d.arrayEach)(this.immediates,(e=>{clearImmediate(e)}))},this._getEditorManager=function(){return j},this.isRtl=function(){return"rtl"===V.rootWindow.getComputedStyle(V.rootElement).direction},this.isLtr=function(){return!V.isRtl()},this.getDirectionFactor=function(){return V.isLtr()?1:-1};const ce=(0,x.createShortcutManager)({handleEvent:()=>V.isListening(),beforeKeyDown:e=>this.runHooks("beforeKeyDown",e),afterKeyDown:e=>{this.isDestroyed||V.runHooks("afterDocumentKeyDown",e)},ownerWindow:this.rootWindow});this.addHook("beforeOnCellMouseDown",(e=>{!1===e.ctrlKey&&!1===e.metaKey&&ce.releasePressedKeys()})),this.getShortcutManager=function(){return ce},this.getFocusManager=function(){return Y},(0,f.getPluginsNames)().forEach((e=>{const t=(0,f.getPlugin)(e);J.addItem(e,new t(this))})),(0,H.registerAllShortcutContexts)(V),ce.setActiveContextName("grid"),T.default.getSingleton().run(V,"construct")},o(67834),o(15724),o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371),o(71766);var n=o(9893),i=o(78832),r=o(38893),l=o(28890),a=s(o(18344)),h=s(o(82629)),c=o(13911),u=o(26505),d=o(9175),g=o(74737),f=o(90532),p=o(44288),m=o(84558),w=o(51255),C=o(59777),v=o(87485),y=s(o(66801)),E=s(o(12248)),S=o(56216),R=o(93969),b=o(11015),_=o(90),T=s(o(56937)),M=o(74174),O=o(75032),I=o(73497),N=o(71757),A=o(48246),P=o(84134),x=o(57660),H=o(37947);let D=null;const L=new Map;new Set},63745:(e,t,o)=>{"use strict";t.__esModule=!0,t.installFocusDetector=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=e.rootElement,s=i(e),n=i(e);return s.addEventListener("focus",(()=>null==t?void 0:t.onFocusFromTop())),n.addEventListener("focus",(()=>null==t?void 0:t.onFocusFromBottom())),o.firstChild.before(s),o.lastChild.after(n),{activate(){e._registerTimeout((()=>{s.tabIndex=0,n.tabIndex=0}),10)},deactivate(){e._registerTimeout((()=>{s.tabIndex=-1,n.tabIndex=-1}),10)}}};var s=o(9893),n=o(92692);function i(e){const t=e.rootDocument.createElement("input");return t.type="text",t.classList.add("htFocusCatcher"),e.getSettings().ariaTags&&(0,s.setAttribute)(t,[(0,n.A11Y_PRESENTATION)(),(0,n.A11Y_HIDDEN)()]),t}},71563:(e,t,o)=>{"use strict";t.__esModule=!0,t.installFocusCatcher=function(e){const t=function(e){return t=>{if(!t)return null;const o=i(e),s=r(e);return t.col<o.col&&(t.col=o.col),t.col>s.col&&(t.col=s.col),t.row<o.row&&(t.row=o.row),t.row>s.row&&(t.row=s.row),t}}(e);let o;const{activate:l,deactivate:a}=(0,n.installFocusDetector)(e,{onFocusFromTop(){var s;const n=null!==(s=t(o))&&void 0!==s?s:i(e);n&&(e.runHooks("modifyFocusOnTabNavigation","from_above",n),e.selectCell(n.row,n.col)),e.listen()},onFocusFromBottom(){var s;const n=null!==(s=t(o))&&void 0!==s?s:r(e);n&&(e.runHooks("modifyFocusOnTabNavigation","from_below",n),e.selectCell(n.row,n.col)),e.listen()}}),h={wrapped:!1,flipped:!1};let c=!0,u=!1,d=!1;e.addHook("afterListen",(()=>a())),e.addHook("afterUnlisten",(()=>l())),e.addHook("afterSelection",((t,s,n,i,r)=>{var l;(u&&(h.wrapped&&h.flipped||d)&&(d=!1,r.value=!0),c)&&(o=null===(l=e.getSelectedRangeLast())||void 0===l?void 0:l.highlight)})),e.addHook("beforeRowWrap",((e,t,o)=>{h.wrapped=!0,h.flipped=o}));const g={keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:s.GRID_GROUP,group:"focusCatcher"};e.getShortcutManager().getContext("grid").addShortcuts([{...g,callback:()=>{const{tabNavigation:t}=e.getSettings();u=!0,e.getSelectedRangeLast()&&!t&&(c=!1),t||(d=!0)},position:"before"},{...g,callback:t=>{const{tabNavigation:s,autoWrapRow:n}=e.getSettings();if(u=!1,c=!0,!s||!e.selection.isSelected()||n&&h.wrapped&&h.flipped||!n&&h.wrapped)return n&&h.wrapped&&h.flipped&&(o=t.shiftKey?i(e):r(e)),h.wrapped=!1,h.flipped=!1,e.deselectCell(),e.unlisten(),!1;t.preventDefault()},position:"after"}])};var s=o(37947),n=o(63745);function i(e){const{rowIndexMapper:t,columnIndexMapper:o}=e,{navigableHeaders:s}=e.getSettings();let n=s&&e.countColHeaders()>0?-e.countColHeaders():0,i=s&&e.countRowHeaders()>0?-e.countRowHeaders():0;return 0===n&&(n=t.getVisualFromRenderableIndex(n)),0===i&&(i=o.getVisualFromRenderableIndex(i)),null===n||null===i?null:e._createCellCoords(n,i)}function r(e){var t,o;const{rowIndexMapper:s,columnIndexMapper:n}=e,{navigableHeaders:i}=e.getSettings();let r=s.getRenderableIndexesLength()-1,l=n.getRenderableIndexesLength()-1;if(r<0){if(!i||0===e.countColHeaders())return null;r=-1}if(l<0){if(!i||0===e.countColHeaders())return null;l=-1}return e._createCellCoords(null!==(t=s.getVisualFromRenderableIndex(r))&&void 0!==t?t:r,null!==(o=n.getVisualFromRenderableIndex(l))&&void 0!==o?o:l)}},48246:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(71563);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||(t[e]=s[e]))}));var n=o(44428);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||(t[e]=n[e]))}))},44428:(e,t,o)=>{"use strict";t.__esModule=!0,t.createViewportScroller=function(e){const{selection:t}=e;let o=!1,c=!1;return{resume(){c=!1},suspend(){c=!0},skipNextScrollCycle(){o=!0},scrollTo(u){var d;if(o||c)return void(o=!1);let g;t.isFocusSelectionChanged()?g=(0,i.focusScrollStrategy)(e):t.isSelectedByCorner()?g=(0,n.cornerHeaderScrollStrategy)(e):t.isSelectedByRowHeader()?g=(0,a.rowHeaderScrollStrategy)(e):t.isSelectedByColumnHeader()?g=(0,s.columnHeaderScrollStrategy)(e):1===t.getSelectedRange().size()&&t.isMultiple()?g=(0,r.multipleScrollStrategy)(e):1!==t.getSelectedRange().size()||t.isMultiple()?t.getSelectedRange().size()>1&&(g=(0,l.noncontiguousScrollStrategy)(e)):g=(0,h.singleScrollStrategy)(e),null===(d=g)||void 0===d||d(u)}}};var s=o(9635),n=o(5696),i=o(88948),r=o(29980),l=o(3011),a=o(44745),h=o(8248)},9635:(e,t)=>{"use strict";t.__esModule=!0,t.columnHeaderScrollStrategy=function(e){return t=>{let{col:o}=t;e.scrollViewportTo({col:o})}}},5696:(e,t)=>{"use strict";t.__esModule=!0,t.cornerHeaderScrollStrategy=function(){return()=>{}}},88948:(e,t)=>{"use strict";t.__esModule=!0,t.focusScrollStrategy=function(e){return t=>{e.scrollViewportTo(t.toObject())}}},29980:(e,t)=>{"use strict";t.__esModule=!0,t.multipleScrollStrategy=function(e){return t=>{e.scrollViewportTo(t.toObject())}}},3011:(e,t)=>{"use strict";t.__esModule=!0,t.noncontiguousScrollStrategy=function(e){return t=>{e.scrollViewportTo(t.toObject())}}},44745:(e,t)=>{"use strict";t.__esModule=!0,t.rowHeaderScrollStrategy=function(e){return t=>{let{row:o}=t;e.scrollViewportTo({row:o})}}},8248:(e,t)=>{"use strict";t.__esModule=!0,t.singleScrollStrategy=function(e){return t=>{const o=e.selection.getSelectionSource(),{row:s,col:n}=t;if(s<0&&n>=0)e.scrollViewportTo({col:n});else if(n<0&&s>=0)e.scrollViewportTo({row:s});else{if("mouse"===o&&(n===e.view.getLastPartiallyVisibleColumn()||s===e.view.getLastPartiallyVisibleRow()))return;e.scrollViewportTo({row:s,col:n})}}}},87727:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(55518),r=o(56216),l=o(13911),a=o(9175),h=o(87485),c=o(38893);class u{static get DESTINATION_RENDERER(){return 1}static get DESTINATION_CLIPBOARD_GENERATOR(){return 2}constructor(e,t,o){(0,n.default)(this,"hot",void 0),(0,n.default)(this,"metaManager",void 0),(0,n.default)(this,"tableMeta",void 0),(0,n.default)(this,"dataSource",void 0),(0,n.default)(this,"duckSchema",void 0),(0,n.default)(this,"colToPropCache",void 0),(0,n.default)(this,"propToColCache",void 0),this.hot=e,this.metaManager=o,this.tableMeta=o.getTableMeta(),this.dataSource=t,this.duckSchema=this.createDuckSchema(),this.createMap()}createMap(){const e=this.getSchema();if(void 0===e)throw new Error("trying to create `columns` definition but you didn't provide `schema` nor `data`");const t=this.tableMeta.columns;let o;if(this.colToPropCache=[],this.propToColCache=new Map,t){let s=0,n=0,i=!1;if("function"==typeof t){const t=(0,l.deepObjectSize)(e);s=t>0?t:this.countFirstRowKeys(),i=!0}else{const e=this.tableMeta.maxCols;s=Math.min(e,t.length)}for(o=0;o<s;o++){const e=i?t(o):t[o];if((0,l.isObject)(e)){if(void 0!==e.data){const t=i?n:o;this.colToPropCache[t]=e.data,this.propToColCache.set(e.data,t)}n+=1}}}else this.recursiveDuckColumns(e)}countFirstRowKeys(){return(0,r.countFirstRowKeys)(this.dataSource)}recursiveDuckColumns(e,t,o){let s,n=t,i=o;return void 0===n&&(n=0,i=""),"object"!=typeof e||Array.isArray(e)||(0,l.objectEach)(e,((e,t)=>{null===e?(s=i+t,this.colToPropCache.push(s),this.propToColCache.set(s,n),n+=1):n=this.recursiveDuckColumns(e,n,`${t}.`)})),n}colToProp(e){if(!1===Number.isInteger(e))return e;const t=this.hot.toPhysicalColumn(e);return null===t?e:this.colToPropCache&&(0,c.isDefined)(this.colToPropCache[t])?this.colToPropCache[t]:t}propToCol(e){const t=this.propToColCache.get(e);if((0,c.isDefined)(t))return this.hot.toVisualColumn(t);const o=this.hot.toVisualColumn(e);return null===o?e:o}getSchema(){const e=this.tableMeta.dataSchema;return e?"function"==typeof e?e():e:this.duckSchema}createDuckSchema(){return this.dataSource&&this.dataSource[0]?(0,l.duckSchema)(this.dataSource[0]):{}}refreshDuckSchema(){this.duckSchema=this.createDuckSchema()}createRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{source:o,mode:s="above"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=this.hot.countSourceRows();let i=n,r=0,a=e;("number"!=typeof a||a>=n)&&(a=n),a<this.hot.countRows()&&(i=this.hot.toPhysicalRow(a));if(!1===this.hot.runHooks("beforeCreateRow",a,t,o)||null===i)return{delta:0};const c=this.tableMeta.maxRows,u=this.getSchema().length,d=[];for(;r<t&&n+r<c;){let e=null;"array"===this.hot.dataType?this.tableMeta.dataSchema?e=(0,l.deepClone)(this.getSchema()):(e=[],(0,h.rangeEach)(u-1,(()=>e.push(null)))):"function"===this.hot.dataType?e=this.tableMeta.dataSchema(a+r):(e={},(0,l.deepExtend)(e,this.getSchema())),d.push(e),r+=1}this.hot.rowIndexMapper.insertIndexes(a,r),"below"===s&&(i=Math.min(i+1,n)),this.spliceData(i,0,d);const g=this.hot.toVisualRow(i);return this.hot.countSourceRows()===d.length&&this.hot.columnIndexMapper.initToLength(this.hot.getInitialColumnCount()),r>0&&(null==e?this.metaManager.createRow(null,r):"auto"!==o&&this.metaManager.createRow(i,t)),this.hot.runHooks("afterCreateRow",g,r,o),this.hot.forceFullRender=!0,{delta:r,startPhysicalIndex:i}}createCol(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{source:o,mode:s="start"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!this.hot.isColumnModificationAllowed())throw new Error("Cannot create new column. When data source in an object, you can only have as much columns as defined in first data row, data schema or in the 'columns' setting.If you want to be able to add new columns, you have to use array datasource.");const n=this.dataSource,i=this.tableMeta.maxCols,r=this.hot.countSourceCols();let l=e;("number"!=typeof l||l>=r)&&(l=r);if(!1===this.hot.runHooks("beforeCreateCol",l,t,o))return{delta:0};let a=r;l<this.hot.countCols()&&(a=this.hot.toPhysicalColumn(l));const h=this.hot.countSourceRows();let c=this.hot.countCols(),u=0,d=a;"end"===s&&(d=Math.min(d+1,r));const g=d;for(;u<t&&c<i;){if("number"!=typeof l||l>=c)if(h>0)for(let e=0;e<h;e+=1)void 0===n[e]&&(n[e]=[]),n[e].push(null);else n.push([null]);else for(let e=0;e<h;e++)n[e].splice(d,0,null);u+=1,d+=1,c+=1}this.hot.columnIndexMapper.insertIndexes(l,u),u>0&&(null==e?this.metaManager.createColumn(null,u):"auto"!==o&&this.metaManager.createColumn(g,t));const f=this.hot.toVisualColumn(g);return this.hot.runHooks("afterCreateCol",f,u,o),this.hot.forceFullRender=!0,this.refreshDuckSchema(),{delta:u,startPhysicalIndex:g}}removeRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2?arguments[2]:void 0,s=Number.isInteger(e)?e:-t;const n=this.visualRowsToPhysical(s,t),i=this.hot.countSourceRows();s=(i+s)%i;if(!1===this.hot.runHooks("beforeRemoveRow",s,n.length,n,o))return!1;const r=n.length;if(this.filterData(s,r,n),s<this.hot.countRows()){this.hot.rowIndexMapper.removeIndexes(n);const e=(0,c.isDefined)(this.tableMeta.columns)||(0,c.isDefined)(this.tableMeta.dataSchema);0===this.hot.rowIndexMapper.getNotTrimmedIndexesLength()&&!1===e&&this.hot.columnIndexMapper.setIndexesSequence([])}return n.slice(0).sort(((e,t)=>t-e)).forEach((e=>{this.metaManager.removeRow(e,1)})),this.hot.runHooks("afterRemoveRow",s,r,n,o),this.hot.forceFullRender=!0,!0}removeCol(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2?arguments[2]:void 0;if("object"===this.hot.dataType||this.tableMeta.columns)throw new Error("cannot remove column with object data source or columns option specified");let s="number"!=typeof e?-t:e;s=(this.hot.countCols()+s)%this.hot.countCols();const n=this.visualColumnsToPhysical(s,t),i=n.slice(0).sort(((e,t)=>t-e));if(!1===this.hot.runHooks("beforeRemoveCol",s,t,n,o))return!1;let r=!0;const l=i.length,a=this.dataSource;for(let e=0;e<l;e++)r&&n[0]!==n[e]-e&&(r=!1);if(r)for(let e=0,o=this.hot.countSourceRows();e<o;e++)a[e].splice(n[0],t),0===e&&this.metaManager.removeColumn(n[0],t);else for(let e=0,t=this.hot.countSourceRows();e<t;e++)for(let t=0;t<l;t++)a[e].splice(i[t],1),0===e&&this.metaManager.removeColumn(i[t],1);return s<this.hot.countCols()&&(this.hot.columnIndexMapper.removeIndexes(n),0===this.hot.columnIndexMapper.getNotTrimmedIndexesLength()&&this.hot.rowIndexMapper.setIndexesSequence([])),this.hot.runHooks("afterRemoveCol",s,t,n,o),this.hot.forceFullRender=!0,this.refreshDuckSchema(),!0}spliceCol(e,t,o){const s=this.hot.getDataAtCol(e),n=s.slice(t,t+o),i=s.slice(t+o);for(var r=arguments.length,l=new Array(r>3?r-3:0),h=3;h<r;h++)l[h-3]=arguments[h];(0,a.extendArray)(l,i);let c=0;for(;c<o;)l.push(null),c+=1;return(0,a.to2dArray)(l),this.hot.populateFromArray(t,e,l,null,null,"spliceCol"),n}spliceRow(e,t,o){const s=this.hot.getSourceDataAtRow(e),n=s.slice(t,t+o),i=s.slice(t+o);for(var r=arguments.length,l=new Array(r>3?r-3:0),h=3;h<r;h++)l[h-3]=arguments[h];(0,a.extendArray)(l,i);let c=0;for(;c<o;)l.push(null),c+=1;return this.hot.populateFromArray(e,t,[l],null,null,"spliceRow"),n}spliceData(e,t,o){if(!1!==this.hot.runHooks("beforeDataSplice",e,t,o)){const t=[...this.dataSource.slice(0,e),...o,...this.dataSource.slice(e)];this.dataSource.length=0,t.forEach((e=>this.dataSource.push(e)))}}filterData(e,t,o){let s=this.hot.runHooks("filterData",e,t,o);!1===Array.isArray(s)&&(s=this.dataSource.filter(((e,t)=>-1===o.indexOf(t)))),this.dataSource.length=0,Array.prototype.push.apply(this.dataSource,s)}get(e,t){const o=this.hot.toPhysicalRow(e);let s=this.dataSource[o];const n=this.hot.runHooks("modifyRowData",o);s=isNaN(n)?n:s;const{dataDotNotation:i}=this.hot.getSettings();let r=null;if(s&&s.hasOwnProperty&&(0,l.hasOwnProperty)(s,t))r=s[t];else if(i&&"string"==typeof t&&t.indexOf(".")>-1){let e=s;if(!e)return null;const o=t.split(".");for(let t=0,s=o.length;t<s;t++)if(e=e[o[t]],void 0===e)return null;r=e}else"function"==typeof t&&(r=t(this.dataSource.slice(o,o+1)[0]));if(this.hot.hasHook("modifyData")){const e=(0,l.createObjectPropListener)(r);this.hot.runHooks("modifyData",o,this.propToCol(t),e,"get"),e.isTouched()&&(r=e.value)}return r}getCopyable(e,t){return this.hot.getCellMeta(e,this.propToCol(t)).copyable?this.get(e,t):""}set(e,t,o){const s=this.hot.toPhysicalRow(e);let n=o,i=this.dataSource[s];const r=this.hot.runHooks("modifyRowData",s);if(i=isNaN(r)?r:i,this.hot.hasHook("modifyData")){const e=(0,l.createObjectPropListener)(n);this.hot.runHooks("modifyData",s,this.propToCol(t),e,"set"),e.isTouched()&&(n=e.value)}const{dataDotNotation:a}=this.hot.getSettings();if(i&&i.hasOwnProperty&&(0,l.hasOwnProperty)(i,t))i[t]=n;else if(a&&"string"==typeof t&&t.indexOf(".")>-1){let e,o=i,s=0;const r=t.split(".");for(s=0,e=r.length-1;s<e;s++)void 0===o[r[s]]&&(o[r[s]]={}),o=o[r[s]];o[r[s]]=n}else"function"==typeof t?t(this.dataSource.slice(s,s+1)[0],n):i[t]=n}visualRowsToPhysical(e,t){const o=this.hot.countSourceRows(),s=[];let n,i=(o+e)%o,r=t;for(;i<o&&r;)n=this.hot.toPhysicalRow(i),s.push(n),r-=1,i+=1;return s}visualColumnsToPhysical(e,t){const o=this.hot.countCols(),s=[];let n=(o+e)%o,i=t;for(;n<o&&i;){const e=this.hot.toPhysicalColumn(n);s.push(e),i-=1,n+=1}return s}clear(){for(let e=0;e<this.hot.countSourceRows();e++)for(let t=0;t<this.hot.countCols();t++)this.set(e,this.colToProp(t),"")}getLength(){const e=this.tableMeta.maxRows;let t;t=e<0||0===e?0:e||1/0;const o=this.hot.rowIndexMapper.getNotTrimmedIndexesLength();return Math.min(o,t)}getAll(){const e={row:0,col:0},t={row:Math.max(this.hot.countRows()-1,0),col:Math.max(this.hot.countCols()-1,0)};return e.row-t.row!=0||this.hot.countSourceRows()?this.getRange(e,t,u.DESTINATION_RENDERER):[]}countCachedColumns(){return this.colToPropCache.length}getRange(e,t,o){const s=[];let n,i,r;const l=this.tableMeta.maxRows,a=this.tableMeta.maxCols;if(0===l||0===a)return[];const h=o===u.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get,c=Math.min(Math.max(l-1,0),Math.max(e.row,t.row)),d=Math.min(Math.max(a-1,0),Math.max(e.col,t.col));for(n=Math.min(e.row,t.row);n<=c;n++){r=[];const o=n>=0?this.hot.toPhysicalRow(n):n;for(i=Math.min(e.col,t.col);i<=d&&null!==o;i++)r.push(h.call(this,n,this.colToProp(i)));null!==o&&s.push(r)}return s}getText(e,t){return(0,i.stringify)(this.getRange(e,t,u.DESTINATION_RENDERER))}getCopyableText(e,t){return(0,i.stringify)(this.getRange(e,t,u.DESTINATION_CLIPBOARD_GENERATOR))}destroy(){this.hot=null,this.metaManager=null,this.dataSource=null,this.duckSchema=null,this.colToPropCache.length=0,this.propToColCache.clear(),this.propToColCache=void 0}}t.default=u},12248:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(15724);var n=s(o(85707)),i=o(13911),r=o(56216),l=o(9175),a=o(87485),h=o(78832);t.default=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];(0,n.default)(this,"hot",void 0),(0,n.default)(this,"data",void 0),(0,n.default)(this,"dataType","array"),(0,n.default)(this,"colToProp",(()=>{})),(0,n.default)(this,"propToCol",(()=>{})),this.hot=e,this.data=t}modifyRowData(e){let t;return this.hot.hasHook("modifyRowData")&&(t=this.hot.runHooks("modifyRowData",e)),void 0===t||Number.isInteger(t)?this.data[e]:t}getData(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.data&&0!==this.data.length?this.getByRange(null,null,e):this.data}setData(e){this.data=e}getAtColumn(e){const t=[];return(0,l.arrayEach)(this.data,((o,s)=>{const n=this.getAtCell(s,e);t.push(n)})),t}getAtRow(e,t,o){let s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const n=void 0===t&&void 0===o,{dataDotNotation:r}=this.hot.getSettings();let l=null,c=null;if(l=this.modifyRowData(e),Array.isArray(l))c=[],n?l.forEach(((t,o)=>{c[o]=this.getAtPhysicalCell(e,o,l)})):(0,a.rangeEach)(t,o,(o=>{c[o-t]=this.getAtPhysicalCell(e,o,l)}));else if((0,i.isObject)(l)||(0,h.isFunction)(l))if(c=s?[]:{},!n||s){const n=0,h=this.countFirstRowKeys()-1;(0,a.rangeEach)(n,h,(a=>{const u=this.colToProp(a);if(a>=(t||n)&&a<=(o||h)&&!Number.isInteger(u)){const t=this.getAtPhysicalCell(e,u,l);s?c.push(t):r?(0,i.setProperty)(c,u,t):c[u]=t}}))}else(0,i.objectEach)(l,((t,o)=>{const s=this.getAtPhysicalCell(e,o,l);r?(0,i.setProperty)(c,o,s):c[o]=s}));return c}setAtCell(e,t,o){if(!(e>=this.countRows()||t>=this.countFirstRowKeys())){if(this.hot.hasHook("modifySourceData")){const s=(0,i.createObjectPropListener)(o);this.hot.runHooks("modifySourceData",e,t,s,"set"),s.isTouched()&&(o=s.value)}Number.isInteger(t)?this.data[e][t]=o:(0,i.setProperty)(this.data[e],t,o)}}getAtPhysicalCell(e,t,o){let s=null;if(o)if("string"==typeof t){const{dataDotNotation:e}=this.hot.getSettings();s=e?(0,i.getProperty)(o,t):o[t]}else s="function"==typeof t?t(o):o[t];if(this.hot.hasHook("modifySourceData")){const o=(0,i.createObjectPropListener)(s);this.hot.runHooks("modifySourceData",e,t,o,"get"),o.isTouched()&&(s=o.value)}return s}getAtCell(e,t){const o=this.modifyRowData(e);return this.getAtPhysicalCell(e,this.colToProp(t),o)}getByRange(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=!1,n=null,i=null,r=null,l=null;null===e||null===t?(s=!0,n=0,r=this.countRows()-1):(n=Math.min(e.row,t.row),i=Math.min(e.col,t.col),r=Math.max(e.row,t.row),l=Math.max(e.col,t.col));const h=[];return(0,a.rangeEach)(n,r,(e=>{h.push(s?this.getAtRow(e,void 0,void 0,o):this.getAtRow(e,i,l,o))})),h}countRows(){if(this.hot.hasHook("modifySourceLength")){const e=this.hot.runHooks("modifySourceLength");if(Number.isInteger(e))return e}return this.data.length}countFirstRowKeys(){return(0,r.countFirstRowKeys)(this.data)}destroy(){this.data=null,this.hot=null}}},71757:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(87727));t.DataMap=n.default;var i=s(o(36102));t.MetaManager=i.default;var r=s(o(32054));t.metaSchemaFactory=r.default;var l=o(21781);t.replaceData=l.replaceData;var a=o(74870);t.DynamicCellMetaMod=a.DynamicCellMetaMod;var h=o(88884);t.ExtendMetaPropertiesMod=h.ExtendMetaPropertiesMod},36102:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=s(o(85252)),i=s(o(47441)),r=s(o(5065)),l=s(o(25779)),a=s(o(63870)),h=o(13911);class c{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];this.hot=e,this.globalMeta=new n.default(e),this.tableMeta=new i.default(this.globalMeta),this.columnMeta=new r.default(this.globalMeta),this.cellMeta=new l.default(this.columnMeta),o.forEach((e=>new e(this))),this.globalMeta.updateMeta(t)}getGlobalMeta(){return this.globalMeta.getMeta()}updateGlobalMeta(e){this.globalMeta.updateMeta(e)}getTableMeta(){return this.tableMeta.getMeta()}updateTableMeta(e){this.tableMeta.updateMeta(e)}getColumnMeta(e){return this.columnMeta.getMeta(e)}updateColumnMeta(e,t){this.columnMeta.updateMeta(e,t)}getCellMeta(e,t,o){let{visualRow:s,visualColumn:n}=o;const i=this.cellMeta.getMeta(e,t);return i.visualRow=s,i.visualCol=n,i.row=e,i.col=t,this.runLocalHooks("afterGetCellMeta",i),i}getCellMetaKeyValue(e,t,o){if("string"!=typeof o)throw new Error("The passed cell meta object key is not a string");return this.cellMeta.getMeta(e,t,o)}setCellMeta(e,t,o,s){this.cellMeta.setMeta(e,t,o,s)}updateCellMeta(e,t,o){this.cellMeta.updateMeta(e,t,o)}removeCellMeta(e,t,o){this.cellMeta.removeMeta(e,t,o)}getCellsMeta(){return this.cellMeta.getMetas()}getCellsMetaAtRow(e){return this.cellMeta.getMetasAtRow(e)}createRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.createRow(e,t)}removeRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.removeRow(e,t)}createColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.createColumn(e,t),this.columnMeta.createColumn(e,t)}removeColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.removeColumn(e,t),this.columnMeta.removeColumn(e,t)}clearCellsCache(){this.cellMeta.clearCache()}clearCache(){this.cellMeta.clearCache(),this.columnMeta.clearCache()}}t.default=c,(0,h.mixin)(c,a.default)},47586:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(15724),o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var n=s(o(85707)),i=o(9175),r=o(34471);class l{constructor(e){(0,n.default)(this,"valueFactory",void 0),(0,n.default)(this,"data",[]),(0,n.default)(this,"index",[]),(0,n.default)(this,"holes",new Set),this.valueFactory=e}obtain(e){(0,r.assert)((()=>(0,r.isUnsignedNumber)(e)),"Expecting an unsigned number.");const t=this._getStorageIndexByKey(e);let o;if(t>=0)o=this.data[t],void 0===o&&(o=this.valueFactory(e),this.data[t]=o);else if(o=this.valueFactory(e),this.holes.size>0){const t=this.holes.values().next().value;this.holes.delete(t),this.data[t]=o,this.index[e]=t}else this.data.push(o),this.index[e]=this.data.length-1;return o}insert(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;(0,r.assert)((()=>(0,r.isUnsignedNumber)(e)||(0,r.isNullish)(e)),"Expecting an unsigned number or null/undefined argument.");const o=[],s=this.data.length;for(let e=0;e<t;e++)o.push(s+e),this.data.push(void 0);const n=(0,r.isNullish)(e)?this.index.length:e;this.index=[...this.index.slice(0,n),...o,...this.index.slice(n)]}remove(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;(0,r.assert)((()=>(0,r.isUnsignedNumber)(e)||(0,r.isNullish)(e)),"Expecting an unsigned number or null/undefined argument.");const o=this.index.splice((0,r.isNullish)(e)?this.index.length-t:e,t);for(let e=0;e<o.length;e++){const t=o[e];"number"==typeof t&&this.holes.add(t)}}size(){return this.data.length-this.holes.size}values(){return(0,i.arrayFilter)(this.data,((e,t)=>!this.holes.has(t)))[Symbol.iterator]()}entries(){const e=[];for(let t=0;t<this.data.length;t++){const o=this._getKeyByStorageIndex(t);-1!==o&&e.push([o,this.data[t]])}let t=0;return{next:()=>{if(t<e.length){const o=e[t];return t+=1,{value:o,done:!1}}return{done:!0}}}}clear(){this.data=[],this.index=[],this.holes.clear()}_getStorageIndexByKey(e){return this.index.length>e?this.index[e]:-1}_getKeyByStorageIndex(e){return this.index.indexOf(e)}[Symbol.iterator](){return this.entries()}}t.default=l},25779:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(15724);var n=s(o(85707)),i=o(13911),r=o(34471),l=s(o(47586)),a=o(38893);t.default=class{constructor(e){(0,n.default)(this,"columnMeta",void 0),(0,n.default)(this,"metas",new l.default((()=>this._createRow()))),this.columnMeta=e}updateMeta(e,t,o){const s=this.getMeta(e,t);(0,i.extend)(s,o),(0,r.extendByMetaType)(s,o)}createRow(e,t){this.metas.insert(e,t)}createColumn(e,t){for(let o=0;o<this.metas.size();o++)this.metas.obtain(o).insert(e,t)}removeRow(e,t){this.metas.remove(e,t)}removeColumn(e,t){for(let o=0;o<this.metas.size();o++)this.metas.obtain(o).remove(e,t)}getMeta(e,t,o){const s=this.metas.obtain(e).obtain(t);return void 0===o?s:s[o]}setMeta(e,t,o,s){var n;const i=this.metas.obtain(e).obtain(t);null===(n=i._automaticallyAssignedMetaProps)||void 0===n||n.delete(o),i[o]=s}removeMeta(e,t,o){delete this.metas.obtain(e).obtain(t)[o]}getMetas(){const e=[],t=Array.from(this.metas.values());for(let o=0;o<t.length;o++)(0,a.isDefined)(t[o])&&e.push(...t[o].values());return e}getMetasAtRow(e){(0,r.assert)((()=>(0,r.isUnsignedNumber)(e)),"Expecting an unsigned number.");const t=new Map(this.metas);return t.has(e)?Array.from(t.get(e).values()):[]}clearCache(){this.metas.clear()}_createRow(){return new l.default((e=>this._createMeta(e)))}_createMeta(e){return new(this.columnMeta.getMetaConstructor(e))}}},5065:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707)),i=o(13911),r=o(34471),l=s(o(47586));const a=["data","width"];t.default=class{constructor(e){(0,n.default)(this,"globalMeta",void 0),(0,n.default)(this,"metas",new l.default((()=>this._createMeta()))),this.globalMeta=e,this.metas=new l.default((()=>this._createMeta()))}updateMeta(e,t){const o=this.getMeta(e);(0,i.extend)(o,t),(0,r.extendByMetaType)(o,t)}createColumn(e,t){this.metas.insert(e,t)}removeColumn(e,t){this.metas.remove(e,t)}getMeta(e){return this.metas.obtain(e)}getMetaConstructor(e){return this.metas.obtain(e).constructor}clearCache(){this.metas.clear()}_createMeta(){return(0,r.columnFactory)(this.globalMeta.getMetaConstructor(),a).prototype}}},85252:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707)),i=o(13911),r=o(34471),l=s(o(32054));t.default=class{constructor(e){(0,n.default)(this,"metaCtor",class{}),(0,n.default)(this,"meta",void 0),this.meta=this.metaCtor.prototype,(0,i.extend)(this.meta,(0,l.default)()),this.meta.instance=e}getMetaConstructor(){return this.metaCtor}getMeta(){return this.meta}updateMeta(e){var t;(0,i.extend)(this.meta,e),(0,r.extendByMetaType)(this.meta,{...e,type:null!==(t=e.type)&&void 0!==t?t:this.meta.type},e)}}},47441:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707)),i=o(13911),r=o(34471);t.default=class{constructor(e){(0,n.default)(this,"meta",void 0);const t=e.getMetaConstructor();this.meta=new t}getMeta(){return this.meta}updateMeta(e){(0,i.extend)(this.meta,e),(0,r.extendByMetaType)(this.meta,e,e)}}},32054:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(38893),n=o(13911);t.default=()=>({_automaticallyAssignedMetaProps:void 0,activeHeaderClassName:"ht__active_highlight",allowEmpty:!0,allowHtml:!1,allowInsertColumn:!0,allowInsertRow:!0,allowInvalid:!0,allowRemoveColumn:!0,allowRemoveRow:!0,ariaTags:!0,autoColumnSize:void 0,autoRowSize:void 0,autoWrapCol:!1,autoWrapRow:!1,bindRowsWithHeaders:void 0,cell:[],cells:void 0,checkedTemplate:void 0,className:void 0,colHeaders:null,collapsibleColumns:void 0,columnHeaderHeight:void 0,columns:void 0,columnSorting:void 0,columnSummary:void 0,colWidths:void 0,commentedCellClassName:"htCommentCell",comments:!1,contextMenu:void 0,copyable:!0,copyPaste:!0,correctFormat:!1,currentColClassName:void 0,currentHeaderClassName:"ht__highlight",currentRowClassName:void 0,customBorders:!1,data:void 0,dataDotNotation:!0,dataSchema:void 0,dateFormat:"DD/MM/YYYY",timeFormat:"h:mm:ss a",datePickerConfig:void 0,defaultDate:void 0,disableVisualSelection:!1,dragToScroll:!0,dropdownMenu:void 0,editor:void 0,enterBeginsEditing:!0,enterMoves:{col:0,row:1},fillHandle:{autoInsertRow:!1},filter:!0,filteringCaseSensitive:!1,filters:void 0,fixedColumnsLeft:0,fixedColumnsStart:0,fixedRowsBottom:0,fixedRowsTop:0,formulas:void 0,fragmentSelection:!1,headerClassName:void 0,height:void 0,hiddenColumns:void 0,hiddenRows:void 0,invalidCellClassName:"htInvalid",imeFastEdit:!1,isEmptyCol(e){let t,o,n;for(t=0,o=this.countRows();t<o;t++)if(n=this.getDataAtCell(t,e),!1===(0,s.isEmpty)(n))return!1;return!0},isEmptyRow(e){let t,o,i,r;for(t=0,o=this.countCols();t<o;t++)if(i=this.getDataAtCell(e,t),!1===(0,s.isEmpty)(i))return"object"==typeof i&&(r=this.getCellMeta(e,t),(0,n.isObjectEqual)(this.getSchema()[r.prop],i));return!0},label:void 0,language:"en-US",layoutDirection:"inherit",licenseKey:void 0,locale:"en-US",manualColumnFreeze:void 0,manualColumnMove:void 0,manualColumnResize:void 0,manualRowMove:void 0,manualRowResize:void 0,maxCols:1/0,maxRows:1/0,mergeCells:!1,minCols:0,minRows:0,minSpareCols:0,minSpareRows:0,multiColumnSorting:void 0,navigableHeaders:!1,tabNavigation:!0,nestedHeaders:void 0,nestedRows:void 0,noWordWrapClassName:"htNoWrap",numericFormat:void 0,observeDOMVisibility:!0,outsideClickDeselects:!0,persistentState:void 0,placeholder:void 0,placeholderCellClassName:"htPlaceholder",preventOverflow:!1,preventWheel:!1,readOnly:!1,readOnlyCellClassName:"htDimmed",renderAllRows:!1,renderAllColumns:!1,renderer:void 0,rowHeaders:void 0,rowHeaderWidth:void 0,rowHeights:void 0,search:!1,selectionMode:"multiple",selectOptions:void 0,skipColumnOnPaste:!1,skipRowOnPaste:!1,sortByRelevance:!0,source:void 0,startCols:5,startRows:5,stretchH:"none",strict:void 0,tableClassName:void 0,tabMoves:{row:0,col:1},title:void 0,trimDropdown:!0,trimRows:void 0,trimWhitespace:!0,type:"text",uncheckedTemplate:void 0,undo:void 0,validator:void 0,viewportColumnRenderingOffset:"auto",viewportRowRenderingOffset:"auto",visibleRows:10,width:void 0,wordWrap:!0})},74870:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var n=s(o(85707)),i=s(o(56937)),r=o(13911),l=o(78832);t.DynamicCellMetaMod=class{constructor(e){(0,n.default)(this,"metaManager",void 0),(0,n.default)(this,"metaSyncMemo",new Map),this.metaManager=e,e.addLocalHook("afterGetCellMeta",(e=>this.extendCellMeta(e))),i.default.getSingleton().add("beforeRender",(e=>{e&&this.metaSyncMemo.clear()}),this.metaManager.hot)}extendCellMeta(e){var t;const{row:o,col:s}=e;if(null!==(t=this.metaSyncMemo.get(o))&&void 0!==t&&t.has(s))return;const{visualRow:n,visualCol:i}=e,a=this.metaManager.hot,h=a.colToProp(i);e.prop=h,a.runHooks("beforeGetCellMeta",n,i,e);const c=(0,r.hasOwnProperty)(e,"type")?e.type:null;let u=(0,l.isFunction)(e.cells)?e.cells(o,s,h):null;var d;c&&(u?u.type=null!==(d=u.type)&&void 0!==d?d:c:u={type:c});u&&this.metaManager.updateCellMeta(o,s,u),a.runHooks("afterGetCellMeta",n,i,e),this.metaSyncMemo.has(o)||this.metaSyncMemo.set(o,new Set),this.metaSyncMemo.get(o).add(s)}}},88884:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724),o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var n=s(o(85707));function i(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function r(e,t){return e.get(function(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}(e,t))}var l=new WeakMap;t.ExtendMetaPropertiesMod=class{constructor(e){(0,n.default)(this,"metaManager",void 0),(0,n.default)(this,"usageTracker",new Set),(0,n.default)(this,"propDescriptors",new Map([["ariaTags",{initOnly:!0}],["fixedColumnsLeft",{target:"fixedColumnsStart",onChange(e){if(this.metaManager.hot.isRtl()&&"fixedColumnsLeft"===e)throw new Error("The `fixedColumnsLeft` is not supported for RTL. Please use option `fixedColumnsStart`.");if(this.usageTracker.has("fixedColumnsLeft")&&this.usageTracker.has("fixedColumnsStart"))throw new Error("The `fixedColumnsLeft` and `fixedColumnsStart` should not be used together. Please use only the option `fixedColumnsStart`.")}}],["layoutDirection",{initOnly:!0}],["renderAllColumns",{initOnly:!0}],["renderAllRows",{initOnly:!0}]])),i(this,l,((e,t,o)=>{if(!o)throw new Error(`The \`${e}\` option can not be updated after the Handsontable is initialized.`)})),this.metaManager=e,this.extendMetaProps()}extendMetaProps(){this.propDescriptors.forEach(((e,t)=>{const{initOnly:o,target:s,onChange:n}=e,i="string"==typeof s,a=i?s:t,h=`_${a}`;this.metaManager.globalMeta.meta[h]=this.metaManager.globalMeta.meta[a],n?(this.installPropWatcher(t,h,n),i&&this.installPropWatcher(s,h,n)):o&&(this.installPropWatcher(t,h,r(l,this)),this.metaManager.globalMeta.meta._initOnlySettings||(this.metaManager.globalMeta.meta._initOnlySettings=[]),this.metaManager.globalMeta.meta._initOnlySettings.push(t))}))}installPropWatcher(e,t,o){const s=this;Object.defineProperty(this.metaManager.globalMeta.meta,e,{get(){return this[t]},set(n){const i=!s.usageTracker.has(e);s.usageTracker.add(e),o.call(s,e,n,i),this[t]=n},enumerable:!0,configurable:!0})}}},34471:(e,t,o)=>{"use strict";t.__esModule=!0,t.assert=function(e,t){if(!e())throw new Error(`Assertion failed: ${t}`)},t.columnFactory=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];function o(){}(0,s.inherit)(o,e);for(let e=0;e<t.length;e++)o.prototype[t[e]]=void 0;return o},t.extendByMetaType=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;const i="string"==typeof t.type?(0,n.getCellType)(t.type):t.type;e._automaticallyAssignedMetaProps&&(0,s.objectEach)(t,((t,o)=>{e._automaticallyAssignedMetaProps.delete(o)}));if(!(0,s.isObject)(i))return;o!==e||e._automaticallyAssignedMetaProps||(e._automaticallyAssignedMetaProps=new Set);const r={};(0,s.objectEach)(i,((t,n)=>{var i;(function(e,t){var o;if("CELL_TYPE"===e)return!1;return(null===(o=t._automaticallyAssignedMetaProps)||void 0===o?void 0:o.has(e))||!(0,s.hasOwnProperty)(t,e)})(n,o)&&(r[n]=t,null===(i=e._automaticallyAssignedMetaProps)||void 0===i||i.add(n))})),(0,s.extend)(e,r)},t.isNullish=function(e){return null==e},t.isUnsignedNumber=function(e){return Number.isInteger(e)&&e>=0},o(67834),o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var s=o(13911),n=o(34299)},21781:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.replaceData=function(e,t,o,s){const{hotInstance:c,dataMap:u,dataSource:d,internalSource:g,source:f,metaManager:p,firstRun:m}=s,w=(0,n.toUpperCaseFirst)(g),C=c.getSettings();Array.isArray(C.dataSchema)?c.dataType="array":(0,i.isFunction)(C.dataSchema)?c.dataType="function":c.dataType="object";u&&u.destroy();e=c.runHooks(`before${w}`,e,m,f);const v=new r.default(c,e,p);if(t(v),"object"==typeof e&&null!==e)e.push&&e.splice||(e=[e]);else{if(null!==e)throw new Error(`${g} only accepts array of objects or array of arrays (${typeof e} given)`);{const t=v.getSchema();let o;e=[];let s=0,n=0;for(s=0,n=C.startRows;s<n;s++)if("object"!==c.dataType&&"function"!==c.dataType||!C.dataSchema)if("array"===c.dataType)o=(0,l.deepClone)(t[0]),e.push(o);else{o=[];for(let e=0,t=C.startCols;e<t;e++)o.push(null);e.push(o)}else o=(0,l.deepClone)(t),e.push(o)}}Array.isArray(e[0])&&(c.dataType="array");C.data=e,v.dataSource=e,d.data=e,d.dataType=c.dataType,d.colToProp=v.colToProp.bind(v),d.propToCol=v.propToCol.bind(v),d.countCachedColumns=v.countCachedColumns.bind(v),o(v),c.runHooks(`after${w}`,e,m,f),m||(c.runHooks("afterChange",null,g),c.render());c.getSettings().ariaTags&&(0,a.setAttribute)(c.rootElement,[(0,h.A11Y_ROWCOUNT)(-1),(0,h.A11Y_COLCOUNT)(c.countCols()+(c.view?c.countRowHeaders():0))])},o(67834),o(15724);var n=o(59777),i=o(78832),r=s(o(87727)),l=o(13911),a=o(9893),h=o(92692)},18344:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=s(o(85707)),i=o(71257),r=o(79729),l=o(84558),a=s(o(82629));function h(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function c(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var u=new WeakSet;class d{constructor(e,t,o){h(this,u),(0,n.default)(this,"hot",void 0),(0,n.default)(this,"tableMeta",void 0),(0,n.default)(this,"selection",void 0),(0,n.default)(this,"eventManager",void 0),(0,n.default)(this,"destroyed",!1),(0,n.default)(this,"activeEditor",void 0),(0,n.default)(this,"cellProperties",void 0),this.hot=e,this.tableMeta=t,this.selection=o,this.eventManager=new a.default(e),this.hot.addHook("afterDocumentKeyDown",(e=>c(u,this,g).call(this,e))),this.eventManager.addEventListener(this.hot.rootDocument.documentElement,"compositionstart",(e=>{!this.destroyed&&this.hot.isListening()&&this.openEditor("",e)})),this.hot.view._wt.update("onCellDblClick",((e,t,o)=>c(u,this,f).call(this,e,t,o)))}getActiveEditor(){return this.activeEditor}prepareEditor(){var e;if(this.activeEditor&&this.activeEditor.isWaiting())return void this.closeEditor(!1,!1,(e=>{e&&this.prepareEditor()}));const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;if(!t||t.isHeader())return;const{row:o,col:s}=t,n=this.hot.runHooks("modifyGetCellCoords",o,s);let i=o,r=s;if(Array.isArray(n)&&([i,r]=n),this.cellProperties=this.hot.getCellMeta(i,r),!this.isCellEditable())return void this.clearActiveEditor();const a=this.hot.getCell(o,s,!0);if(a){const e=this.hot.getCellEditor(this.cellProperties),t=this.hot.colToProp(r),n=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(i),r);this.activeEditor=(0,l.getEditorInstance)(e,this.hot),this.activeEditor.prepare(o,s,t,a,n,this.cellProperties)}}isEditorOpened(){return this.activeEditor&&this.activeEditor.isOpened()}openEditor(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.isCellEditable())return void this.clearActiveEditor();const s=this.hot.getSelectedRangeLast();let n=this.hot.runHooks("beforeBeginEditing",s.highlight.row,s.highlight.col,e,t,o);t instanceof MouseEvent&&"boolean"!=typeof n&&(n=0===this.hot.selection.getLayerLevel()&&s.isSingle()),!1!==n?(this.activeEditor||(this.hot.scrollToFocusedCell(),this.prepareEditor()),this.activeEditor&&(o&&this.activeEditor.enableFullEditMode(),this.activeEditor.beginEditing(e,t))):this.clearActiveEditor()}closeEditor(e,t,o){this.activeEditor?this.activeEditor.finishEditing(e,t,o):o&&o(!1)}closeEditorAndSaveChanges(e){this.closeEditor(!1,e)}closeEditorAndRestoreOriginalValue(e){this.closeEditor(!0,e)}clearActiveEditor(){this.activeEditor=void 0}isCellEditable(){const e=this.hot.getSelectedRangeLast();if(!e)return!1;const t=this.hot.getCellEditor(this.cellProperties),{row:o,col:s}=e.highlight,{rowIndexMapper:n,columnIndexMapper:i}=this.hot,r=n.isHidden(this.hot.toPhysicalRow(o))||i.isHidden(this.hot.toPhysicalColumn(s));return!(this.cellProperties.readOnly||!t||r)}moveSelectionAfterEnter(e){const t={..."function"==typeof this.tableMeta.enterMoves?this.tableMeta.enterMoves(e):this.tableMeta.enterMoves};e.shiftKey&&(t.row=-t.row,t.col=-t.col),this.hot.selection.isMultiple()?this.selection.transformFocus(t.row,t.col):this.selection.transformStart(t.row,t.col,!0)}destroy(){this.destroyed=!0,this.eventManager.destroy()}}function g(e){const t=this.hot.getSelectedRangeLast();if(!this.hot.isListening()||!t||t.highlight.isHeader()||(0,r.isImmediatePropagationStopped)(e))return;const{keyCode:o}=e,s=(e.ctrlKey||e.metaKey)&&!e.altKey;(!this.activeEditor||this.activeEditor&&!this.activeEditor.isWaiting())&&((0,i.isFunctionKey)(o)||(0,i.isCtrlMetaKey)(o)||s||this.isEditorOpened()||this.openEditor("",e))}function f(e,t){t.isCell()&&this.openEditor(null,e,!0)}const p=new WeakMap;d.getInstance=function(e,t,o){let s=p.get(e);return s||(s=new d(e,t,o),p.set(e,s)),s};t.default=d},36854:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(56138),r=o(9175),l=o(9893),a=o(38893),h=o(59777),c=o(71257),u=o(36748),d=o(92692);function g(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function f(e,t){return e.get(function(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}(e,t))}const p=t.EDITOR_TYPE="autocomplete";var m=new WeakMap;class w extends i.HandsontableEditor{constructor(){super(...arguments),(0,n.default)(this,"query",null),(0,n.default)(this,"strippedChoices",[]),(0,n.default)(this,"rawChoices",[]),g(this,m,this.hot.guid.slice(0,9)),(0,n.default)(this,"sortByRelevance",(function(e,t,o){const s=[],n=[],i=e.length;let r,l,c,u,d=t.length;if(0===i){for(c=0;c<d;c++)n.push(c);return n}for(c=0;c<d;c++){if(l=(0,h.stripTags)((0,a.stringify)(t[c])),o)u=l.indexOf(e);else{const t=this.cellProperties.locale;u=l.toLocaleLowerCase(t).indexOf(e.toLocaleLowerCase(t))}-1!==u&&(r=l.length-u-i,s.push({baseIndex:c,index:u,charsLeft:r,value:l}))}for(s.sort(((e,t)=>{if(-1===t.index)return-1;if(-1===e.index)return 1;if(e.index<t.index)return-1;if(t.index<e.index)return 1;if(e.index===t.index){if(e.charsLeft<t.charsLeft)return-1;if(e.charsLeft>t.charsLeft)return 1}return 0})),c=0,d=s.length;c<d;c++)n.push(s[c].baseIndex);return n}))}static get EDITOR_TYPE(){return p}getValue(){const e=this.rawChoices.find((e=>this.stripValueIfNeeded(e)===this.TEXTAREA.value));return(0,a.isDefined)(e)?e:this.TEXTAREA.value}createElements(){super.createElements(),(0,l.addClass)(this.htContainer,"autocompleteEditor"),(0,l.addClass)(this.htContainer,-1===this.hot.rootWindow.navigator.platform.indexOf("Mac")?"":"htMacScroll"),this.hot.getSettings().ariaTags&&(0,l.setAttribute)(this.TEXTAREA,[(0,d.A11Y_TEXT)(),(0,d.A11Y_COMBOBOX)(),(0,d.A11Y_HASPOPUP)("listbox"),(0,d.A11Y_AUTOCOMPLETE)()])}prepare(e,t,o,s,n,i){super.prepare(e,t,o,s,n,i),this.hot.getSettings().ariaTags&&(0,l.setAttribute)(this.TEXTAREA,[(0,d.A11Y_EXPANDED)("false"),(0,d.A11Y_CONTROLS)(`${f(m,this)}-listbox-${e}-${t}`)])}open(){super.open();const e=void 0===this.cellProperties.trimDropdown||this.cellProperties.trimDropdown,t=this.hot.getSettings().ariaTags,o=Array.isArray(this.cellProperties.source)?this.cellProperties.source:null,s=null==o?void 0:o.length,{row:n,col:i}=this;this.showEditableElement(),this.focus(),this.addHook("beforeKeyDown",(e=>this.onBeforeKeyDown(e))),this.htEditor.updateSettings({colWidths:e?[(0,l.outerWidth)(this.TEXTAREA)-2]:void 0,autoColumnSize:!0,autoRowSize:!0,renderer:(e,n,i,r,h,c,g)=>{(0,u.textRenderer)(e,n,i,r,h,c,g);const{filteringCaseSensitive:f,allowHtml:p,locale:m}=this.cellProperties,w=this.query;let C,v,y=(0,a.stringify)(c);y&&!p&&(C=!0===f?y.indexOf(w):y.toLocaleLowerCase(m).indexOf(w.toLocaleLowerCase(m)),-1!==C&&(v=y.substr(C,w.length),y=y.replace(v,`<strong>${v}</strong>`))),t&&(0,l.setAttribute)(n,[(0,d.A11Y_OPTION)(),...o?[(0,d.A11Y_SETSIZE)(s)]:[],...o?[(0,d.A11Y_POSINSET)(o.indexOf(c)+1)]:[],["id",`${this.htEditor.rootElement.id}_${i}-${r}`]]),n.innerHTML=y},afterSelectionEnd:(e,o)=>{if(t){const t=this.htEditor.getCell(e,o,!0);(0,l.setAttribute)(t,[(0,d.A11Y_SELECTED)()]),(0,l.setAttribute)(this.TEXTAREA,...(0,d.A11Y_ACTIVEDESCENDANT)(t.id))}}}),t&&((0,l.setAttribute)(this.htEditor.view._wt.wtOverlays.wtTable.TABLE,...(0,d.A11Y_PRESENTATION)()),(0,l.setAttribute)(this.htEditor.rootElement,[(0,d.A11Y_LISTBOX)(),(0,d.A11Y_LIVE)("polite"),(0,d.A11Y_RELEVANT)("text"),["id",`${f(m,this)}-listbox-${n}-${i}`]]),(0,l.setAttribute)(this.TEXTAREA,...(0,d.A11Y_EXPANDED)("true"))),this.hot._registerTimeout((()=>{this.queryChoices(this.TEXTAREA.value)}))}close(){this.removeHooksByKey("beforeKeyDown"),super.close(),this.hot.getSettings().ariaTags&&(0,l.setAttribute)(this.TEXTAREA,[(0,d.A11Y_EXPANDED)("false")])}discardEditor(e){super.discardEditor(e),this.hot.view.render()}queryChoices(e){const t=this.cellProperties.source;this.query=e,"function"==typeof t?t.call(this.cellProperties,e,(e=>{this.rawChoices=e,this.updateChoicesList(this.stripValuesIfNeeded(e))})):Array.isArray(t)?(this.rawChoices=t,this.updateChoicesList(this.stripValuesIfNeeded(t))):this.updateChoicesList([])}updateChoicesList(e){const t=(0,l.getCaretPosition)(this.TEXTAREA),o=(0,l.getSelectionEndPosition)(this.TEXTAREA),s=this.cellProperties.sortByRelevance,n=this.cellProperties.filter;let i=null,a=null,h=e;s&&(i=this.sortByRelevance(this.stripValueIfNeeded(this.getValue()),h,this.cellProperties.filteringCaseSensitive));const c=Array.isArray(i)?i.length:0;if(!1===n)c&&(a=i[0]);else{const e=[];for(let t=0,o=h.length;t<o&&!(s&&c<=t);t++)c?e.push(h[i[t]]):e.push(h[t]);a=0,h=e}this.strippedChoices=h,0===h.length?this.htEditor.rootElement.style.display="none":this.htEditor.rootElement.style.display="",this.htEditor.loadData((0,r.pivot)([h])),h.length>0&&(this.updateDropdownDimensions(),this.flipDropdownIfNeeded(),!0===this.cellProperties.strict&&this.highlightBestMatchingChoice(a)),this.hot.listen(),(0,l.setCaretPosition)(this.TEXTAREA,t,t===o?void 0:o)}flipDropdownIfNeeded(){const e=(0,l.getTrimmingContainer)(this.hot.view._wt.wtTable.TABLE),t=e===this.hot.rootWindow,o=this.cellProperties.preventOverflow;if(t||!t&&(o||"horizontal"===o))return!1;const s=(0,l.offset)(this.TEXTAREA),n=(0,l.outerHeight)(this.TEXTAREA),i=this.getHeight(),r=e.scrollTop,a=(0,l.outerHeight)(this.hot.view._wt.wtTable.THEAD),h=(0,l.offset)(e),c=s.top-h.top-a+r,u=e.scrollHeight-c-a-n,d=i>u&&c>u;return d?this.flipDropdown(i):this.unflipDropdown(),this.limitDropdownIfNeeded(d?c:u,i),d}limitDropdownIfNeeded(e,t){if(t>e){let o=0,s=0,n=0,i=null;do{n=this.htEditor.getRowHeight(s)||this.htEditor.view._wt.getSetting("defaultRowHeight"),o+=n,s+=1}while(o<e);i=o-n,this.htEditor.flipped&&(this.htEditor.rootElement.style.top=parseInt(this.htEditor.rootElement.style.top,10)+t-i+"px"),this.setDropdownHeight(o-n)}}flipDropdown(e){const t=this.htEditor.rootElement.style;t.position="absolute",t.top=-e+"px",this.htEditor.flipped=!0}unflipDropdown(){const e=this.htEditor.rootElement.style;e.position="absolute",e.top="",this.htEditor.flipped=void 0}updateDropdownDimensions(){const e=this.cellProperties.trimDropdown,t=e?this.getWidth():void 0,o=this.getHeight();this.htEditor.updateSettings({width:t,height:o}),e&&this.htEditor.view.hasVerticalScroll()&&this.htEditor.updateSettings({width:t+(0,l.getScrollbarWidth)(this.hot.rootDocument)}),this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer()}setDropdownHeight(e){this.htEditor.updateSettings({height:e})}highlightBestMatchingChoice(e){"number"==typeof e?this.htEditor.selectCell(e,0,void 0,void 0,void 0,!1):this.htEditor.deselectCell()}getHeight(){const e=this.hot.rootWindow.getComputedStyle(this.htContainer.querySelector(".htCore")),t=parseInt(e.borderTopWidth,10)+parseInt(e.borderBottomWidth,10),o=Math.min(this.cellProperties.visibleRows,this.strippedChoices.length);return Array.from({length:o},((e,t)=>t)).reduce(((e,t)=>e+this.htEditor.getRowHeight(t)),0)+t+1}getWidth(){const e=this.hot.rootWindow.getComputedStyle(this.htContainer.querySelector(".htCore")),t=parseInt(e.borderInlineStartWidth,10)+parseInt(e.borderInlineEndWidth,10);return this.htEditor.getColWidth(0)+t}stripValueIfNeeded(e){return this.stripValuesIfNeeded([e])[0]}stripValuesIfNeeded(e){const{allowHtml:t}=this.cellProperties,o=(0,r.arrayMap)(e,(e=>(0,a.stringify)(e)));return(0,r.arrayMap)(o,(e=>t?e:(0,h.stripTags)(e)))}allowKeyEventPropagation(e){const t=this.htEditor.getSelectedRangeLast(),o=t?t.from.row:-1;let s=!1;return e===c.KEY_CODES.ARROW_DOWN&&o>0&&o<this.htEditor.countRows()-1&&(s=!0),e===c.KEY_CODES.ARROW_UP&&o>-1&&(s=!0),s}onBeforeKeyDown(e){if((0,c.isPrintableChar)(e.keyCode)||e.keyCode===c.KEY_CODES.BACKSPACE||e.keyCode===c.KEY_CODES.DELETE||e.keyCode===c.KEY_CODES.INSERT){let t=10;if(e.keyCode===c.KEY_CODES.C&&(e.ctrlKey||e.metaKey))return;this.isOpened()||(t+=10),this.htEditor&&this.hot._registerTimeout((()=>{this.queryChoices(this.TEXTAREA.value)}),t)}}}t.AutocompleteEditor=w},80115:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(36854);t.EDITOR_TYPE=s.EDITOR_TYPE,t.AutocompleteEditor=s.AutocompleteEditor},63180:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=s(o(85707)),i=o(38893),r=o(13911),l=s(o(31872)),a=o(9893);const h=t.EDITOR_TYPE="base",c=t.EDITOR_STATE=Object.freeze({VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"});class u{static get EDITOR_TYPE(){return h}constructor(e){(0,n.default)(this,"hot",void 0),(0,n.default)(this,"state",c.VIRGIN),(0,n.default)(this,"_opened",!1),(0,n.default)(this,"_fullEditMode",!1),(0,n.default)(this,"_closeCallback",null),(0,n.default)(this,"TD",null),(0,n.default)(this,"row",null),(0,n.default)(this,"col",null),(0,n.default)(this,"prop",null),(0,n.default)(this,"originalValue",null),(0,n.default)(this,"cellProperties",null),this.hot=e,this.init()}_fireCallbacks(e){this._closeCallback&&(this._closeCallback(e),this._closeCallback=null)}init(){}getValue(){throw Error("Editor getValue() method unimplemented")}setValue(){throw Error("Editor setValue() method unimplemented")}open(){throw Error("Editor open() method unimplemented")}close(){throw Error("Editor close() method unimplemented")}prepare(e,t,o,s,n,i){this.TD=s,this.row=e,this.col=t,this.prop=o,this.originalValue=n,this.cellProperties=i,this.state=this.isOpened()?this.state:c.VIRGIN}extend(){return class extends this.constructor{}}saveValue(e,t){let o,s,n,i;if(t){const e=this.hot.getSelectedLast();o=Math.max(Math.min(e[0],e[2]),0),s=Math.max(Math.min(e[1],e[3]),0),n=Math.max(e[0],e[2]),i=Math.max(e[1],e[3])}else[o,s,n,i]=[this.row,this.col,null,null];const r=this.hot.runHooks("modifyGetCellCoords",o,s);Array.isArray(r)&&([o,s]=r),this.hot.populateFromArray(o,s,e,n,i,"edit")}beginEditing(e,t){if(this.state!==c.VIRGIN)return;const o=this.hot,s=o.rowIndexMapper.getRenderableFromVisualIndex(this.row),n=o.columnIndexMapper.getRenderableFromVisualIndex(this.col);if(o.view.scrollViewport(o._createCellCoords(s,n)),this.state=c.EDITING,this.isInFullEditMode()){const t="string"==typeof e?e:(0,i.stringify)(this.originalValue);this.setValue(t)}this.open(t),this._opened=!0,this.focus(),o.view.render(),o.runHooks("afterBeginEditing",this.row,this.col)}finishEditing(e,t,o){let s;if(o){const e=this._closeCallback;this._closeCallback=t=>{e&&e(t),o(t),this.hot.view.render()}}if(!this.isWaiting())if(this.state!==c.VIRGIN){if(this.state===c.EDITING){if(e)return this.cancelChanges(),void this.hot.view.render();const o=this.getValue();s=this.cellProperties.trimWhitespace?[["string"==typeof o?String.prototype.trim.call(o||""):o]]:[[o]],this.state=c.WAITING,this.saveValue(s,t),this.hot.getCellValidator(this.cellProperties)?this.hot.addHookOnce("postAfterValidate",(e=>{this.state=c.FINISHED,this.discardEditor(e)})):(this.state=c.FINISHED,this.discardEditor(!0))}}else this.hot._registerTimeout((()=>{this._fireCallbacks(!0)}))}cancelChanges(){this.state=c.FINISHED,this.discardEditor()}discardEditor(e){if(this.state===c.FINISHED)if(!1===e&&!0!==this.cellProperties.allowInvalid)this.hot.selectCell(this.row,this.col),this.focus(),this.state=c.EDITING,this._fireCallbacks(!1);else{this.close(),this._opened=!1,this._fullEditMode=!1,this.state=c.VIRGIN,this._fireCallbacks(!0);this.hot.getShortcutManager().setActiveContextName("grid")}}enableFullEditMode(){this._fullEditMode=!0}isInFullEditMode(){return this._fullEditMode}isOpened(){return this._opened}isWaiting(){return this.state===c.WAITING}getEditedCellRect(){var e;const t=this.getEditedCell();if(!t)return;const{wtOverlays:o,wtViewport:s}=this.hot.view._wt,n=this.hot.rootWindow,i=(0,a.offset)(t),r=(0,a.outerWidth)(t),l=(0,a.offset)(this.hot.rootElement),h=(0,a.outerWidth)(this.hot.rootElement),c=o.topOverlay.holder,u=o.inlineStartOverlay.holder,d=c!==n?c.scrollTop:0,g=u!==n?u.scrollLeft:0,f=n.innerWidth-l.left-h,{wtTable:p}=null!==(e=o.getParentOverlay(t))&&void 0!==e?e:this.hot.view._wt,m=p.name,w=["master","inline_start"].includes(m)?d:0,C=["master","top","bottom"].includes(m)?g:0,v=i.top===l.top?0:1;let y=i.top-l.top-v-w,E=0;E=this.hot.isRtl()?n.innerWidth-i.left-r-f-1+C:i.left-l.left-1-C,["top","top_inline_start_corner"].includes(m)&&(y+=o.topOverlay.getOverlayOffset()),["inline_start","top_inline_start_corner"].includes(m)&&(E+=Math.abs(o.inlineStartOverlay.getOverlayOffset()));const S=this.hot.hasColHeaders(),R=this.hot.rowIndexMapper.getRenderableFromVisualIndex(this.row),b=this.hot.columnIndexMapper.getRenderableFromVisualIndex(this.col),_=this.hot.rowIndexMapper.getRenderableIndexesLength()-this.hot.view._wt.getSetting("fixedRowsBottom");(S&&R<=0||R===_)&&(y+=1),b<=0&&(E+=1);const T=s.rowsRenderCalculator.startPosition,M=s.columnsRenderCalculator.startPosition,O=Math.abs(o.inlineStartOverlay.getScrollPosition()),I=o.topOverlay.getScrollPosition(),N=(0,a.getScrollbarWidth)(this.hot.rootDocument);let A=t.offsetTop;if(["inline_start","master"].includes(m)&&(A+=T-I),["bottom","bottom_inline_start_corner"].includes(m)){const{wtViewport:e,wtTable:t}=o.bottomOverlay.clone;A+=e.getWorkspaceHeight()-t.getHeight()-N}let P=t.offsetLeft;this.hot.isRtl()?(P=P>=0?p.getWidth()-t.offsetLeft:Math.abs(P),P+=M-O-r):["top","master","bottom"].includes(m)&&(P+=M-O);const x=n.getComputedStyle(this.TD),H=this.hot.isRtl()?"borderRightWidth":"borderLeftWidth",D=parseInt(x[H],10)>0?0:1,L=parseInt(x.borderTopWidth,10)>0?0:1,k=(0,a.outerWidth)(t)+D,V=(0,a.outerHeight)(t)+L,F=(0,a.hasVerticalScrollbar)(c)?N:0,W=(0,a.hasHorizontalScrollbar)(u)?N:0,B=this.hot.view.maximumVisibleElementWidth(P)-F+D;return{top:y,start:E,height:V,maxHeight:Math.max(this.hot.view.maximumVisibleElementHeight(A)-W+L,23),width:k,maxWidth:B}}getEditedCellsLayerClass(){switch(this.checkEditorSection()){case"inline-start":return"ht_clone_left ht_clone_inline_start";case"bottom":return"ht_clone_bottom";case"bottom-inline-start-corner":return"ht_clone_bottom_left_corner ht_clone_bottom_inline_start_corner";case"top":return"ht_clone_top";case"top-inline-start-corner":return"ht_clone_top_left_corner ht_clone_top_inline_start_corner";default:return"ht_clone_master"}}getEditedCell(){return this.hot.getCell(this.row,this.col,!0)}checkEditorSection(){const e=this.hot.countRows();let t="";return this.row<this.hot.getSettings().fixedRowsTop?t=this.col<this.hot.getSettings().fixedColumnsStart?"top-inline-start-corner":"top":this.hot.getSettings().fixedRowsBottom&&this.row>=e-this.hot.getSettings().fixedRowsBottom?t=this.col<this.hot.getSettings().fixedColumnsStart?"bottom-inline-start-corner":"bottom":this.col<this.hot.getSettings().fixedColumnsStart&&(t="inline-start"),t}}t.BaseEditor=u,(0,r.mixin)(u,l.default)},52618:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(63180);t.EDITOR_STATE=s.EDITOR_STATE,t.EDITOR_TYPE=s.EDITOR_TYPE,t.BaseEditor=s.BaseEditor},11936:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(52618),n=o(9893);const i=t.EDITOR_TYPE="checkbox";class r extends s.BaseEditor{static get EDITOR_TYPE(){return i}beginEditing(e,t){if(t&&"mouseup"===t.type&&"TD"===t.target.nodeName){const e=this.TD.querySelector('input[type="checkbox"]');(0,n.hasClass)(e,"htBadValue")||e.click()}}finishEditing(){}init(){}open(){}close(){}getValue(){}setValue(){}focus(){}}t.CheckboxEditor=r},39626:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(11936);t.EDITOR_TYPE=s.EDITOR_TYPE,t.CheckboxEditor=s.CheckboxEditor},10978:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=s(o(85707)),i=s(o(86798)),r=s(o(75972)),l=o(52618),a=o(64952),h=o(9893),c=o(13911),u=o(71257);o(17728);const d=t.EDITOR_TYPE="date",g="dateEditor";class f extends a.TextEditor{constructor(){super(...arguments),(0,n.default)(this,"defaultDateFormat","DD/MM/YYYY"),(0,n.default)(this,"parentDestroyed",!1),(0,n.default)(this,"$datePicker",null)}static get EDITOR_TYPE(){return d}init(){if("function"!=typeof i.default)throw new Error("You need to include moment.js to your project.");if("function"!=typeof r.default)throw new Error("You need to include Pikaday to your project.");super.init(),this.hot.addHook("afterDestroy",(()=>{this.parentDestroyed=!0,this.destroyElements()}))}createElements(){super.createElements(),this.datePicker=this.hot.rootDocument.createElement("DIV"),this.datePickerStyle=this.datePicker.style,this.datePickerStyle.position="absolute",this.datePickerStyle.top=0,this.datePickerStyle.left=0,this.datePickerStyle.zIndex=9999,this.datePicker.setAttribute("dir",this.hot.isRtl()?"rtl":"ltr"),(0,h.addClass)(this.datePicker,"htDatepickerHolder"),this.hot.rootDocument.body.appendChild(this.datePicker),this.eventManager.addEventListener(this.datePicker,"mousedown",(e=>{(0,h.hasClass)(e.target,"pika-day")&&this.hideDatepicker(),e.stopPropagation()}))}destroyElements(){const e=this.datePicker.parentNode;this.$datePicker&&this.$datePicker.destroy(),e&&e.removeChild(this.datePicker)}prepare(e,t,o,s,n,i){super.prepare(e,t,o,s,n,i)}open(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=this.hot.getShortcutManager().getContext("editor");this.showDatepicker(e),super.open(),t.addShortcuts([{keys:[["ArrowLeft"]],callback:()=>{this.$datePicker.adjustDate("subtract",1)}},{keys:[["ArrowRight"]],callback:()=>{this.$datePicker.adjustDate("add",1)}},{keys:[["ArrowUp"]],callback:()=>{this.$datePicker.adjustDate("subtract",7)}},{keys:[["ArrowDown"]],callback:()=>{this.$datePicker.adjustDate("add",7)}}],{group:g})}close(){var e;this._opened=!1,null!==(e=this.$datePicker)&&void 0!==e&&e.destroy&&this.$datePicker.destroy(),this.hot._registerTimeout((()=>{const e=this.hot._getEditorManager();e.closeEditor(),this.hot.view.render(),e.prepareEditor()}));this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(g),super.close()}finishEditing(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];super.finishEditing(e,t)}showDatepicker(e){const t=this.cellProperties.dateFormat||this.defaultDateFormat,o=this.hot.view.isMouseDown(),s=!!e&&(0,u.isFunctionKey)(e.keyCode);let n;this.datePicker.style.display="block",this.$datePicker=new r.default(this.getDatePickerConfig()),"function"==typeof this.$datePicker.useMoment&&this.$datePicker.useMoment(i.default),this.$datePicker._onInputFocus=function(){},this.originalValue?(n=this.originalValue,(0,i.default)(n,t,!0).isValid()&&this.$datePicker.setMoment((0,i.default)(n,t),!0),this.getValue()!==this.originalValue&&this.setValue(this.originalValue),s||o||this.setValue("")):this.cellProperties.defaultDate?(n=this.cellProperties.defaultDate,(0,i.default)(n,t,!0).isValid()&&this.$datePicker.setMoment((0,i.default)(n,t),!0),s||o||this.setValue("")):this.$datePicker.gotoToday()}hideDatepicker(){this.datePickerStyle.display="none",this.$datePicker.hide()}getDatePickerConfig(){const e=this.TEXTAREA,t={};this.cellProperties&&this.cellProperties.datePickerConfig&&(0,c.deepExtend)(t,this.cellProperties.datePickerConfig);const o=t.onSelect,s=t.onClose;return t.field=e,t.trigger=e,t.container=this.datePicker,t.bound=!1,t.keyboardInput=!1,t.format=t.format||this.defaultDateFormat,t.reposition=t.reposition||!1,t.isRTL=!1,t.onSelect=e=>{let t=e;isNaN(t.getTime())||(t=(0,i.default)(t).format(this.cellProperties.dateFormat||this.defaultDateFormat)),this.setValue(t),o&&o()},t.onClose=()=>{this.parentDestroyed||this.finishEditing(!1),s&&s()},t}refreshDimensions(e){var t;if(super.refreshDimensions(e),this.state!==l.EDITOR_STATE.EDITING)return;if(this.TD=this.getEditedCell(),!this.TD)return void this.hideDatepicker();const{rowIndexMapper:o,columnIndexMapper:s}=this.hot,{wtOverlays:n}=this.hot.view._wt,{wtTable:i}=null!==(t=n.getParentOverlay(this.TD))&&void 0!==t?t:this.hot.view._wt,r=o.getVisualFromRenderableIndex(i.getFirstPartiallyVisibleRow()),a=o.getVisualFromRenderableIndex(i.getLastPartiallyVisibleRow()),c=s.getVisualFromRenderableIndex(i.getFirstPartiallyVisibleColumn()),u=s.getVisualFromRenderableIndex(i.getLastPartiallyVisibleColumn());if(this.row>=r&&this.row<=a&&this.col>=c&&this.col<=u){const e=this.TD.getBoundingClientRect();this.datePickerStyle.top=`${this.hot.rootWindow.pageYOffset+e.top+(0,h.outerHeight)(this.TD)}px`;let t=this.hot.rootWindow.pageXOffset;this.hot.isRtl()?t+=e.right-(0,h.outerWidth)(this.datePicker):t+=e.left,this.datePickerStyle.left=`${t}px`}else this.hideDatepicker()}}t.DateEditor=f},59127:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(10978);t.EDITOR_TYPE=s.EDITOR_TYPE,t.DateEditor=s.DateEditor},52236:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=o(80115),i=s(o(56937));const r=t.EDITOR_TYPE="dropdown";class l extends n.AutocompleteEditor{static get EDITOR_TYPE(){return r}prepare(e,t,o,s,n,i){super.prepare(e,t,o,s,n,i),this.cellProperties.filter=!1,this.cellProperties.strict=!0}}t.DropdownEditor=l,i.default.getSingleton().add("beforeValidate",(function(e,t,o){const s=this.propToCol(o);if(Number.isInteger(s)){const e=this.getCellMeta(t,s);e.editor===l&&void 0===e.strict&&(e.filter=!1,e.strict=!0)}}))},50486:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(52236);t.EDITOR_TYPE=s.EDITOR_TYPE,t.DropdownEditor=s.DropdownEditor},29408:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(64952),n=o(9893),i=o(79729),r=o(13911),l=o(37947);const a="handsontableEditor",h=t.EDITOR_TYPE="handsontable";class c extends s.TextEditor{static get EDITOR_TYPE(){return h}open(){super.open(),this.htEditor&&this.htEditor.destroy(),"none"===this.htContainer.style.display&&(this.htContainer.style.display=""),this.htEditor=new this.hot.constructor(this.htContainer,this.htOptions),this.htEditor.init(),this.htEditor.rootElement.style.display="",this.cellProperties.strict?this.htEditor.selectCell(0,0):this.htEditor.deselectCell(),(0,n.setCaretPosition)(this.TEXTAREA,0,this.TEXTAREA.value.length),this.refreshDimensions(),this.htEditor.updateSettings({width:this.getWidth(),height:this.getHeight()})}close(){this.htEditor&&(this.htEditor.rootElement.style.display="none"),this.removeHooksByKey("beforeKeyDown"),super.close()}prepare(e,t,o,s,n,i){super.prepare(e,t,o,s,n,i);const l=this,a={startRows:0,startCols:0,minRows:0,minCols:0,className:"listbox",copyPaste:!1,autoColumnSize:!1,autoRowSize:!1,readOnly:!0,fillHandle:!1,autoWrapCol:!1,autoWrapRow:!1,ariaTags:!1,afterOnCellMouseDown(e,t){const o=this.getSourceData(t.row,t.col);void 0!==o&&l.setValue(o),l.hot.destroyEditor()},preventWheel:!0,layoutDirection:this.hot.isRtl()?"rtl":"ltr"};this.cellProperties.handsontable&&(0,r.extend)(a,i.handsontable),this.htOptions=a}beginEditing(e,t){const o=this.hot.getSettings().onBeginEditing;o&&!1===o()||super.beginEditing(e,t)}createElements(){super.createElements();const e=this.hot.rootDocument.createElement("DIV");e.className="handsontableEditor",this.TEXTAREA_PARENT.appendChild(e),this.htContainer=e,this.assignHooks()}finishEditing(e,t,o){if(this.htEditor&&this.htEditor.isListening()&&this.hot.listen(),this.htEditor&&this.htEditor.getSelectedLast()){const e=this.htEditor.getValue();void 0!==e&&this.setValue(e)}super.finishEditing(e,t,o)}getHeight(){return this.htEditor.view.getTableHeight()}getWidth(){return this.htEditor.view.getTableWidth()}assignHooks(){this.hot.addHook("afterDestroy",(()=>{this.htEditor&&this.htEditor.destroy()}))}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor");super.registerShortcuts();const t={group:a,relativeToGroup:l.EDITOR_EDIT_GROUP,position:"before"},o=(e,t)=>{const o=this.htEditor;if(void 0!==e&&(e<0||o.flipped&&e>o.countRows()-1?o.deselectCell():o.selectCell(e,0),o.getData().length))return t.preventDefault(),(0,i.stopImmediatePropagation)(t),this.hot.listen(),this.TEXTAREA.focus(),!1};e.addShortcuts([{keys:[["ArrowUp"]],callback:e=>{const t=this.htEditor;let s,n;return!t.getSelectedLast()&&t.flipped?s=t.countRows()-1:t.getSelectedLast()&&(t.flipped?(n=t.getSelectedLast()[0],s=Math.max(0,n-1)):(n=t.getSelectedLast()[0],s=n-1)),o(s,e)},preventDefault:!1},{keys:[["ArrowDown"]],callback:e=>{const t=this.htEditor;let s,n;if(t.getSelectedLast()||t.flipped){if(t.getSelectedLast())if(t.flipped)s=t.getSelectedLast()[0]+1;else if(!t.flipped){const e=t.countRows()-1;n=t.getSelectedLast()[0],s=Math.min(e,n+1)}}else s=0;return o(s,e)},preventDefault:!1}],t)}unregisterShortcuts(){super.unregisterShortcuts();this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(a)}}t.HandsontableEditor=c},56138:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(29408);t.EDITOR_TYPE=s.EDITOR_TYPE,t.HandsontableEditor=s.HandsontableEditor},83645:(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllEditors=function(){(0,f.registerEditor)(n.BaseEditor),(0,f.registerEditor)(s.AutocompleteEditor),(0,f.registerEditor)(i.CheckboxEditor),(0,f.registerEditor)(r.DateEditor),(0,f.registerEditor)(l.DropdownEditor),(0,f.registerEditor)(a.HandsontableEditor),(0,f.registerEditor)(h.NumericEditor),(0,f.registerEditor)(c.PasswordEditor),(0,f.registerEditor)(u.SelectEditor),(0,f.registerEditor)(d.TextEditor),(0,f.registerEditor)(g.TimeEditor)};var s=o(80115);t.AutocompleteEditor=s.AutocompleteEditor,t.AUTOCOMPLETE_EDITOR=s.EDITOR_TYPE;var n=o(52618);t.BaseEditor=n.BaseEditor,t.BASE_EDITOR=n.EDITOR_TYPE;var i=o(39626);t.CheckboxEditor=i.CheckboxEditor,t.CHECKBOX_EDITOR=i.EDITOR_TYPE;var r=o(59127);t.DateEditor=r.DateEditor,t.DATE_EDITOR=r.EDITOR_TYPE;var l=o(50486);t.DropdownEditor=l.DropdownEditor,t.DROPDOWN_EDITOR=l.EDITOR_TYPE;var a=o(56138);t.HandsontableEditor=a.HandsontableEditor,t.HANDSONTABLE_EDITOR=a.EDITOR_TYPE;var h=o(33972);t.NumericEditor=h.NumericEditor,t.NUMERIC_EDITOR=h.EDITOR_TYPE;var c=o(46138);t.PasswordEditor=c.PasswordEditor,t.PASSWORD_EDITOR=c.EDITOR_TYPE;var u=o(7507);t.SelectEditor=u.SelectEditor,t.SELECT_EDITOR=u.EDITOR_TYPE;var d=o(64952);t.TextEditor=d.TextEditor,t.TEXT_EDITOR=d.EDITOR_TYPE;var g=o(14902);t.TimeEditor=g.TimeEditor,t.TIME_EDITOR=g.EDITOR_TYPE;var f=o(84558);t.registerEditor=f.registerEditor,t.RegisteredEditor=f.RegisteredEditor,t._getEditorInstance=f._getEditorInstance,t.getEditor=f.getEditor,t.getEditorInstance=f.getEditorInstance,t.getRegisteredEditorNames=f.getRegisteredEditorNames,t.getRegisteredEditors=f.getRegisteredEditors,t.hasEditor=f.hasEditor},33972:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(29230);t.EDITOR_TYPE=s.EDITOR_TYPE,t.NumericEditor=s.NumericEditor},29230:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(64952);const n=t.EDITOR_TYPE="numeric";class i extends s.TextEditor{static get EDITOR_TYPE(){return n}}t.NumericEditor=i},46138:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(99896);t.EDITOR_TYPE=s.EDITOR_TYPE,t.PasswordEditor=s.PasswordEditor},99896:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(64952),n=o(9893),i=o(92692);const r=t.EDITOR_TYPE="password";class l extends s.TextEditor{static get EDITOR_TYPE(){return r}createElements(){super.createElements(),this.TEXTAREA=this.hot.rootDocument.createElement("input"),this.TEXTAREA.setAttribute("type","password"),this.TEXTAREA.setAttribute("data-hot-input",""),this.TEXTAREA.className="handsontableInput",this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.hot.getSettings().ariaTags&&(0,n.setAttribute)(this.TEXTAREA,[(0,i.A11Y_HIDDEN)()]),(0,n.empty)(this.TEXTAREA_PARENT),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)}}t.PasswordEditor=l},84558:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.RegisteredEditor=d,t.getEditorInstance=t._getEditorInstance=function(e,t){let o;if("function"==typeof e)r.get(e)||g(null,e),o=r.get(e);else{if("string"!=typeof e)throw Error('Only strings and functions can be passed as "editor" parameter');o=a(e)}if(!o)throw Error(`No editor registered under name "${e}"`);return o.getInstance(t)},t.getEditor=function(e){if("function"==typeof e)return e;if(!h(e))throw Error(`No registered editor found under "${e}" name`);return a(e).getConstructor()},t.registerEditor=g,o(67834);var n=s(o(56937)),i=s(o(71263));const r=new WeakMap,{register:l,getItem:a,hasItem:h,getNames:c,getValues:u}=(0,i.default)("editors");function d(e){const t={},o=e;this.getConstructor=function(){return e},this.getInstance=function(e){return e.guid in t||(t[e.guid]=new o(e)),t[e.guid]},n.default.getSingleton().add("afterDestroy",(function(){t[this.guid]=null}))}function g(e,t){e&&"string"!=typeof e&&(e=(t=e).EDITOR_TYPE);const o=new d(t);"string"==typeof e&&l(e,o),r.set(t,o)}t.getRegisteredEditors=u,t.getRegisteredEditorNames=c,t.hasEditor=h},7507:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(24138);t.EDITOR_TYPE=s.EDITOR_TYPE,t.SelectEditor=s.SelectEditor},24138:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(52618),n=o(9893),i=o(13911);const r="ht_editor_visible",l="selectEditor",a=t.EDITOR_TYPE="select";class h extends s.BaseEditor{static get EDITOR_TYPE(){return a}init(){this.select=this.hot.rootDocument.createElement("select"),this.select.setAttribute("data-hot-input","true"),this.select.style.display="none",(0,n.addClass)(this.select,"htSelectEditor"),this.hot.rootElement.appendChild(this.select),this.registerHooks()}getValue(){return this.select.value}setValue(e){this.select.value=e}open(){this._opened=!0,this.refreshDimensions(),this.select.style.display="";this.hot.getShortcutManager().setActiveContextName("editor"),this.registerShortcuts()}close(){this._opened=!1,this.select.style.display="none",(0,n.hasClass)(this.select,r)&&(0,n.removeClass)(this.select,r),this.unregisterShortcuts(),this.clearHooks()}focus(){this.select.focus()}registerHooks(){this.addHook("afterScrollHorizontally",(()=>this.refreshDimensions())),this.addHook("afterScrollVertically",(()=>this.refreshDimensions())),this.addHook("afterColumnResize",(()=>this.refreshDimensions())),this.addHook("afterRowResize",(()=>this.refreshDimensions()))}prepare(e,t,o,s,r,l){super.prepare(e,t,o,s,r,l);const a=this.cellProperties.selectOptions;let h;h="function"==typeof a?this.prepareOptions(a(this.row,this.col,this.prop)):this.prepareOptions(a),(0,n.empty)(this.select),(0,i.objectEach)(h,((e,t)=>{const o=this.hot.rootDocument.createElement("OPTION");o.value=t,(0,n.fastInnerHTML)(o,e),this.select.appendChild(o)}))}prepareOptions(e){let t={};if(Array.isArray(e))for(let o=0,s=e.length;o<s;o++)t[e[o]]=e[o];else"object"==typeof e&&(t=e);return t}refreshValue(){const e=this.hot.getSourceDataAtCell(this.row,this.prop);this.originalValue=e,this.setValue(e),this.refreshDimensions()}refreshDimensions(){if(this.state!==s.EDITOR_STATE.EDITING)return;if(this.TD=this.getEditedCell(),!this.TD)return void this.close();const{top:e,start:t,width:o,height:i}=this.getEditedCellRect(),l=this.select.style;l.height=`${i}px`,l.width=`${o}px`,l.top=`${e}px`,l[this.hot.isRtl()?"right":"left"]=`${t}px`,l.margin="0px",(0,n.addClass)(this.select,r)}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor"),t={group:l};this.isInFullEditMode()&&e.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{const e=this.select.selectedIndex-1;e>=0&&(this.select[e].selected=!0)}},{keys:[["ArrowDown"]],callback:()=>{const e=this.select.selectedIndex+1;e<=this.select.length-1&&(this.select[e].selected=!0)}}],t)}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(l)}}t.SelectEditor=h},40559:(e,t,o)=>{"use strict";t.__esModule=!0,t.updateCaretPosition=function(e,t){const o=(0,s.getCaretPosition)(t),n=t.value.split("\n");let i=o,r=0;for(let t=0;t<n.length;t++){const s=n[t];0!==t&&(r+=n[t-1].length+1);const l=r+s.length;if("home"===e?i=r:"end"===e&&(i=l),o<=l)break}(0,s.setCaretPosition)(t,i)};var s=o(9893)},64952:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(82540);t.EDITOR_TYPE=s.EDITOR_TYPE,t.TextEditor=s.TextEditor},82540:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707)),i=o(52618),r=s(o(82629)),l=o(28890),a=o(9893),h=o(87485),c=o(11139),u=o(38893),d=o(40559),g=o(92692);const f="ht_editor_hidden",p="textEditor",m=t.EDITOR_TYPE="text";class w extends i.BaseEditor{static get EDITOR_TYPE(){return m}constructor(e){super(e),(0,n.default)(this,"eventManager",new r.default(this)),(0,n.default)(this,"autoResize",(0,c.createInputElementResizer)(this.hot.rootDocument)),(0,n.default)(this,"TEXTAREA",void 0),(0,n.default)(this,"textareaStyle",void 0),(0,n.default)(this,"TEXTAREA_PARENT",void 0),(0,n.default)(this,"textareaParentStyle",void 0),(0,n.default)(this,"layerClass",void 0),this.eventManager=new r.default(this),this.createElements(),this.bindEvents(),this.hot.addHookOnce("afterDestroy",(()=>this.destroy()))}getValue(){return this.TEXTAREA.value}setValue(e){this.TEXTAREA.value=e}open(){this.refreshDimensions(),this.showEditableElement(),this.hot.getShortcutManager().setActiveContextName("editor"),this.registerShortcuts()}close(){this.autoResize.unObserve(),(0,a.isThisHotChild)(this.hot.rootDocument.activeElement,this.hot.rootElement)&&this.hot.listen(),this.hideEditableElement(),this.unregisterShortcuts()}prepare(e,t,o,s,n,r){const l=this.state;if(super.prepare(e,t,o,s,n,r),!r.readOnly){this.refreshDimensions(!0);const{allowInvalid:e}=r;e&&!this.isOpened()&&(this.TEXTAREA.value=""),l===i.EDITOR_STATE.FINISHED||this.isOpened()||this.hideEditableElement()}}beginEditing(e,t){this.state===i.EDITOR_STATE.VIRGIN&&(this.TEXTAREA.value="",super.beginEditing(e,t))}focus(){this.TEXTAREA.select(),(0,a.setCaretPosition)(this.TEXTAREA,this.TEXTAREA.value.length)}createElements(){const{rootDocument:e}=this.hot;this.TEXTAREA=e.createElement("TEXTAREA"),(0,a.setAttribute)(this.TEXTAREA,[["data-hot-input",""],(0,g.A11Y_TABINDEX)(-1)]),this.hot.getSettings().ariaTags&&(0,a.setAttribute)(this.TEXTAREA,[(0,g.A11Y_HIDDEN)()]),(0,a.addClass)(this.TEXTAREA,"handsontableInput"),this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.textareaStyle.overflowY="visible",this.TEXTAREA_PARENT=e.createElement("DIV"),(0,a.addClass)(this.TEXTAREA_PARENT,"handsontableInputHolder"),(0,a.hasClass)(this.TEXTAREA_PARENT,this.layerClass)&&(0,a.removeClass)(this.TEXTAREA_PARENT,this.layerClass),(0,a.addClass)(this.TEXTAREA_PARENT,f),this.textareaParentStyle=this.TEXTAREA_PARENT.style,this.TEXTAREA_PARENT.appendChild(this.TEXTAREA),this.hot.rootElement.appendChild(this.TEXTAREA_PARENT)}hideEditableElement(){(0,l.isEdge)()&&(this.textareaStyle.textIndent="-99999px"),this.textareaStyle.overflowY="visible",this.textareaParentStyle.opacity="0",this.textareaParentStyle.height="1px",(0,a.removeClass)(this.TEXTAREA_PARENT,this.layerClass),(0,a.addClass)(this.TEXTAREA_PARENT,f)}showEditableElement(){this.textareaParentStyle.height="",this.textareaParentStyle.overflow="",this.textareaParentStyle.position="",this.textareaParentStyle[this.hot.isRtl()?"left":"right"]="auto",this.textareaParentStyle.opacity="1",this.textareaStyle.textIndent="";const e=this.TEXTAREA_PARENT.childNodes;let t=!1;(0,h.rangeEach)(e.length-1,(o=>{const s=e[o];if((0,a.hasClass)(s,"handsontableEditor"))return t=!0,!1})),(0,a.hasClass)(this.TEXTAREA_PARENT,f)&&(0,a.removeClass)(this.TEXTAREA_PARENT,f),t?(this.layerClass="ht_editor_visible",(0,a.addClass)(this.TEXTAREA_PARENT,this.layerClass)):(this.layerClass=this.getEditedCellsLayerClass(),(0,a.addClass)(this.TEXTAREA_PARENT,this.layerClass))}refreshValue(){const e=this.hot.toPhysicalRow(this.row),t=this.hot.getSourceDataAtCell(e,this.col);this.originalValue=t,this.setValue(t),this.refreshDimensions()}refreshDimensions(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.state!==i.EDITOR_STATE.EDITING&&!e)return;if(this.TD=this.getEditedCell(),!this.TD)return void(e||this.close());const{top:t,start:o,width:s,maxWidth:n,height:r,maxHeight:l}=this.getEditedCellRect();this.textareaParentStyle.top=`${t}px`,this.textareaParentStyle[this.hot.isRtl()?"right":"left"]=`${o}px`,this.showEditableElement();const a=this.hot.rootWindow.getComputedStyle(this.TD);this.TEXTAREA.style.fontSize=a.fontSize,this.TEXTAREA.style.fontFamily=a.fontFamily,this.TEXTAREA.style.backgroundColor=this.TD.style.backgroundColor;const h=this.hot.rootWindow.getComputedStyle(this.TEXTAREA),c=parseInt(h.paddingLeft,10)+parseInt(h.paddingRight,10),u=parseInt(h.paddingTop,10)+parseInt(h.paddingBottom,10),d=s-c,g=r-u,f=n-c,p=l-u;this.autoResize.init(this.TEXTAREA,{minWidth:Math.min(d,f),minHeight:Math.min(g,p),maxWidth:f,maxHeight:p},!0)}bindEvents(){(0,l.isIOS)()&&this.eventManager.addEventListener(this.TEXTAREA,"focusout",(()=>this.finishEditing(!1))),this.addHook("afterScrollHorizontally",(()=>this.refreshDimensions())),this.addHook("afterScrollVertically",(()=>this.refreshDimensions())),this.addHook("afterColumnResize",(()=>{this.refreshDimensions(),this.state===i.EDITOR_STATE.EDITING&&this.focus()})),this.addHook("afterRowResize",(()=>{this.refreshDimensions(),this.state===i.EDITOR_STATE.EDITING&&this.focus()}))}allowKeyEventPropagation(){}destroy(){this.eventManager.destroy(),this.clearHooks()}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor"),t={runOnlyIf:()=>(0,u.isDefined)(this.hot.getSelected()),group:p},o=()=>{this.hot.rootDocument.execCommand("insertText",!1,"\n")};e.addShortcuts([{keys:[["Control","Enter"]],callback:()=>(o(),!1),runOnlyIf:e=>!this.hot.selection.isMultiple()&&!e.altKey},{keys:[["Meta","Enter"]],callback:()=>(o(),!1),runOnlyIf:()=>!this.hot.selection.isMultiple()},{keys:[["Alt","Enter"]],callback:()=>(o(),!1)},{keys:[["Home"]],callback:(e,t)=>{let[o]=t;(0,d.updateCaretPosition)(o,this.TEXTAREA)}},{keys:[["End"]],callback:(e,t)=>{let[o]=t;(0,d.updateCaretPosition)(o,this.TEXTAREA)}}],t)}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(p)}}t.TextEditor=w},14902:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(9412);t.EDITOR_TYPE=s.EDITOR_TYPE,t.TimeEditor=s.TimeEditor},9412:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(64952);const n=t.EDITOR_TYPE="time";class i extends s.TextEditor{static get EDITOR_TYPE(){return n}prepare(e,t,o,s,n,i){super.prepare(e,t,o,s,n,i),this.TEXTAREA.dir="ltr"}}t.TimeEditor=i},82629:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.getListenersCounter=function(){return r},o(15724);var n=s(o(85707)),i=o(79729);let r=0;t.default=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,n.default)(this,"context",void 0),this.context=e||this,this.context.eventListeners||(this.context.eventListeners=[])}addEventListener(e,t,o){let s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];function n(e){o.call(this,function(e){const t=e.stopImmediatePropagation;return e.stopImmediatePropagation=function(){t.apply(this),(0,i.stopImmediatePropagation)(this)},e}(e))}return this.context.eventListeners.push({element:e,event:t,callback:o,callbackProxy:n,options:s,eventManager:this}),e.addEventListener(t,n,s),r+=1,()=>{this.removeEventListener(e,t,o)}}removeEventListener(e,t,o){let s,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=this.context.eventListeners.length;for(;i;)if(i-=1,s=this.context.eventListeners[i],s.event===t&&s.element===e){if(o&&o!==s.callback)continue;if(n&&s.eventManager!==this)continue;this.context.eventListeners.splice(i,1),s.element.removeEventListener(s.event,s.callbackProxy,s.options),r-=1}}clearEvents(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.context)return;let t=this.context.eventListeners.length;for(;t;){t-=1;const o=this.context.eventListeners[t];e&&o.eventManager!==this||(this.context.eventListeners.splice(t,1),o.element.removeEventListener(o.event,o.callbackProxy,o.options),r-=1)}}clear(){this.clearEvents()}destroy(){this.clearEvents(),this.context=null}destroyWithOwnEventsOnly(){this.clearEvents(!0),this.context=null}fireEvent(e,t){let o=e.document,s=e;o||(o=e.ownerDocument?e.ownerDocument:e,s=o.defaultView);const n={bubbles:!0,cancelable:"mousemove"!==t,view:s,detail:0,screenX:0,screenY:0,clientX:1,clientY:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:void 0};let i;o.createEvent?(i=o.createEvent("MouseEvents"),i.initMouseEvent(t,n.bubbles,n.cancelable,n.view,n.detail,n.screenX,n.screenY,n.clientX,n.clientY,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey,n.button,n.relatedTarget||o.body.parentNode)):i=o.createEventObject(),e.dispatchEvent?e.dispatchEvent(i):e.fireEvent(`on${t}`,i)}}},26505:(e,t,o)=>{"use strict";t.__esModule=!0,o(67834);var s=o(83119),n=o(9893),i=o(78832);function r(e,t,o){l(e,t),t.set(e,o)}function l(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function a(e,t){return e.get(c(e,t))}function h(e,t,o){return e.set(c(e,t),o),o}function c(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}const u=Object.freeze({CELL:"cell",MIXED:"mixed"});var d=new WeakMap,g=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,w=new WeakSet;function C(e){var t;const o=null===(t=a(d,this).getSelectedRangeLast())||void 0===t?void 0:t.highlight;if(!o||!a(d,this).selection.isCellVisible(o))return void e(null);const s=a(d,this).getCell(o.row,o.col,!0);null===s?a(d,this).addHookOnce("afterScroll",(()=>{e(a(d,this).getCell(o.row,o.col,!0))})):e(s)}function v(){c(w,this,C).call(this,(e=>{const{activeElement:t}=a(d,this).rootDocument;t&&(0,n.isOutsideInput)(t)&&t.blur(),this.focusOnHighlightedCell(e)}))}function y(){c(w,this,C).call(this,(e=>{this.getFocusMode()===u.MIXED&&"TD"===e.nodeName&&this.refocusToEditorTextarea()}))}function E(e){"boolean"==typeof e.imeFastEdit&&this.setFocusMode(e.imeFastEdit?u.MIXED:u.CELL)}t.FocusManager=class{constructor(e){var t,o,s=this;l(t=this,o=w),o.add(t),r(this,d,void 0),r(this,g,void 0),r(this,f,1),r(this,p,null),r(this,m,new Map);const n=e.getSettings();h(d,this,e),h(g,this,n.imeFastEdit?u.MIXED:u.CELL),a(d,this).addHook("afterUpdateSettings",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return c(w,s,E).call(s,...t)})),a(d,this).addHook("afterSelection",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return c(w,s,v).call(s,...t)})),a(d,this).addHook("afterSelectionFocusSet",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return c(w,s,v).call(s,...t)})),a(d,this).addHook("afterSelectionEnd",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return c(w,s,y).call(s,...t)}))}getFocusMode(){return a(g,this)}setFocusMode(e){Object.values(u).includes(e)?h(g,this,e):(0,s.warn)(`"${e}" is not a valid focus mode.`)}getRefocusDelay(){return a(f,this)}setRefocusDelay(e){h(f,this,e)}setRefocusElementGetter(e){h(p,this,e)}getRefocusElement(){return"function"==typeof a(p,this)?a(p,this).call(this):null===(e=a(d,this).getActiveEditor())||void 0===e?void 0:e.TEXTAREA;var e}focusOnHighlightedCell(e){const t=e=>{var t,o;const s=null===(t=a(d,this).getSelectedRangeLast())||void 0===t?void 0:t.highlight;if(!s)return;let n=a(d,this).runHooks("modifyFocusedElement",s.row,s.col,e);n instanceof HTMLElement||(n=e),!n||null!==(o=a(d,this).getActiveEditor())&&void 0!==o&&o.isOpened()||n.focus({preventScroll:!0})};e?t(e):c(w,this,C).call(this,(e=>t(e)))}refocusToEditorTextarea(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a(f,this);const o=this.getRefocusElement();!a(d,this).getSettings().imeFastEdit||null!==(e=a(d,this).getActiveEditor())&&void 0!==e&&e.isOpened()||!o||(a(m,this).has(t)||a(m,this).set(t,(0,i.debounce)((()=>{o.select()}),t)),a(m,this).get(t)())}}},92692:(e,t)=>{"use strict";t.__esModule=!0;t.A11Y_TABINDEX=e=>["tabindex",e];t.A11Y_TREEGRID=()=>["role","treegrid"];t.A11Y_PRESENTATION=()=>["role","presentation"];t.A11Y_GRIDCELL=()=>["role","gridcell"];t.A11Y_ROWHEADER=()=>["role","rowheader"];t.A11Y_ROWGROUP=()=>["role","rowgroup"];t.A11Y_COLUMNHEADER=()=>["role","columnheader"];t.A11Y_ROW=()=>["role","row"];t.A11Y_MENU=()=>["role","menu"];t.A11Y_MENU_ITEM=()=>["role","menuitem"];t.A11Y_MENU_ITEM_CHECKBOX=()=>["role","menuitemcheckbox"];t.A11Y_COMBOBOX=()=>["role","combobox"];t.A11Y_LISTBOX=()=>["role","listbox"];t.A11Y_OPTION=()=>["role","option"];t.A11Y_CHECKBOX=()=>["role","checkbox"];t.A11Y_SCOPE_COL=()=>["scope","col"];t.A11Y_SCOPE_ROW=()=>["scope","row"];t.A11Y_TEXT=()=>["type","text"];t.A11Y_LABEL=e=>["aria-label",e];t.A11Y_HIDDEN=()=>["aria-hidden","true"];t.A11Y_DISABLED=()=>["aria-disabled","true"];t.A11Y_MULTISELECTABLE=()=>["aria-multiselectable","true"];t.A11Y_HASPOPUP=e=>["aria-haspopup",e];t.A11Y_ROWCOUNT=e=>["aria-rowcount",e];t.A11Y_COLCOUNT=e=>["aria-colcount",e];t.A11Y_ROWINDEX=e=>["aria-rowindex",e];t.A11Y_COLINDEX=e=>["aria-colindex",e];t.A11Y_EXPANDED=e=>["aria-expanded",e];t.A11Y_SORT=e=>["aria-sort",e];t.A11Y_READONLY=()=>["aria-readonly","true"];t.A11Y_INVALID=()=>["aria-invalid","true"];t.A11Y_CHECKED=e=>["aria-checked",e];t.A11Y_SELECTED=()=>["aria-selected","true"];t.A11Y_AUTOCOMPLETE=()=>["aria-autocomplete","list"];t.A11Y_CONTROLS=e=>["aria-controls",e];t.A11Y_ACTIVEDESCENDANT=e=>["aria-activedescendant",e];t.A11Y_LIVE=e=>["aria-live",e];t.A11Y_RELEVANT=e=>["aria-relevant",e];t.A11Y_SETSIZE=e=>["aria-setsize",e];t.A11Y_POSINSET=e=>["aria-posinset",e]},9175:(e,t,o)=>{"use strict";function s(e,t,o,s){let n=-1,i=e,r=o;Array.isArray(e)||(i=Array.from(e));const l=i.length;for(s&&l&&(n+=1,r=i[n]),n+=1;n<l;)r=t(r,i[n],n,i),n+=1;return r}function n(e,t){let o=0,s=e;Array.isArray(e)||(s=Array.from(e));const n=s.length;for(;o<n&&!1!==t(s[o],o,s);)o+=1;return e}function i(e){return s(e,((e,t)=>e+t),0)}t.__esModule=!0,t.arrayAvg=function(e){if(!e.length)return 0;return i(e)/e.length},t.arrayEach=n,t.arrayFilter=function(e,t){let o=0,s=e;Array.isArray(e)||(s=Array.from(e));const n=s.length,i=[];let r=-1;for(;o<n;){const e=s[o];t(e,o,s)&&(r+=1,i[r]=e),o+=1}return i},t.arrayFlatten=function e(t){return s(t,((t,o)=>t.concat(Array.isArray(o)?e(o):o)),[])},t.arrayMap=function(e,t){let o=0,s=e;Array.isArray(e)||(s=Array.from(e));const n=s.length,i=[];let r=-1;for(;o<n;){const e=s[o];r+=1,i[r]=t(e,o,s),o+=1}return i},t.arrayMax=function(e){return s(e,((e,t)=>e>t?e:t),Array.isArray(e)?e[0]:void 0)},t.arrayMin=function(e){return s(e,((e,t)=>e<t?e:t),Array.isArray(e)?e[0]:void 0)},t.arrayReduce=s,t.arraySum=i,t.arrayUnique=function(e){const t=[];return n(e,(e=>{-1===t.indexOf(e)&&t.push(e)})),t},t.extendArray=function(e,t){const o=t.length;let s=0;for(;s<o;)e.push(t[s]),s+=1},t.getDifferenceOfArrays=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];const[s,...i]=[...t];let r=s;return n(i,(e=>{r=r.filter((t=>!e.includes(t)))})),r},t.getIntersectionOfArrays=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];const[s,...i]=[...t];let r=s;return n(i,(e=>{r=r.filter((t=>e.includes(t)))})),r},t.getUnionOfArrays=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];const[s,...i]=[...t],r=new Set(s);return n(i,(e=>{n(e,(e=>{r.has(e)||r.add(e)}))})),Array.from(r)},t.pivot=function(e){const t=[];if(!e||0===e.length||!e[0]||0===e[0].length)return t;const o=e.length,s=e[0].length;for(let n=0;n<o;n++)for(let o=0;o<s;o++)t[o]||(t[o]=[]),t[o][n]=e[n][o];return t},t.stringToArray=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";return e.split(t)},t.to2dArray=function(e){const t=e.length;let o=0;for(;o<t;)e[o]=[e[o]],o+=1},o(15724),o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371)},28890:(e,t,o)=>{"use strict";t.__esModule=!0,t.isChrome=function(){return r.chrome.value},t.isChromeWebKit=function(){return r.chromeWebKit.value},t.isEdge=function(){return r.edge.value},t.isEdgeWebKit=function(){return r.edgeWebKit.value},t.isFirefox=function(){return r.firefox.value},t.isFirefoxWebKit=function(){return r.firefoxWebKit.value},t.isIOS=function(){return l.ios.value},t.isIpadOS=function(){let{maxTouchPoints:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator;return e>2&&l.mac.value},t.isLinuxOS=function(){return l.linux.value},t.isMacOS=function(){return l.mac.value},t.isMobileBrowser=function(){return r.mobile.value},t.isSafari=function(){return r.safari.value},t.isWindowsOS=function(){return l.win.value},t.setBrowserMeta=a,t.setPlatformMeta=h;var s=o(13911),n=o(93980);const i=e=>{const t={value:!1,test:(o,s)=>{t.value=e(o,s)}};return t},r={chrome:i(((e,t)=>/Chrome/.test(e)&&/Google/.test(t))),chromeWebKit:i((e=>/CriOS/.test(e))),edge:i((e=>/Edge/.test(e))),edgeWebKit:i((e=>/EdgiOS/.test(e))),firefox:i((e=>/Firefox/.test(e))),firefoxWebKit:i((e=>/FxiOS/.test(e))),mobile:i((e=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e))),safari:i(((e,t)=>/Safari/.test(e)&&/Apple Computer/.test(t)))},l={mac:i((e=>/^Mac/.test(e))),win:i((e=>/^Win/.test(e))),linux:i((e=>/^Linux/.test(e))),ios:i((e=>/iPhone|iPad|iPod/i.test(e)))};function a(){let{userAgent:e=navigator.userAgent,vendor:t=navigator.vendor}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,s.objectEach)(r,(o=>{let{test:s}=o;s(e,t)}))}function h(){let{platform:e=navigator.platform}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,s.objectEach)(l,(t=>{let{test:o}=t;o(e)}))}(0,n.isCSR)()&&(a(),h())},83119:(e,t,o)=>{"use strict";t.__esModule=!0,t.error=function(){(0,s.isDefined)(console)&&console.error(...arguments)},t.info=function(){(0,s.isDefined)(console)&&console.info(...arguments)},t.log=function(){(0,s.isDefined)(console)&&console.log(...arguments)},t.warn=function(){(0,s.isDefined)(console)&&console.warn(...arguments)};var s=o(38893)},56216:(e,t,o)=>{"use strict";t.__esModule=!0,t.countFirstRowKeys=function(e){let t=0;Array.isArray(e)&&(e[0]&&Array.isArray(e[0])?t=e[0].length:e[0]&&(0,s.isObject)(e[0])&&(t=(0,s.deepObjectSize)(e[0])));return t},t.createEmptySpreadsheetData=function(e,t){const o=[];let s;for(let n=0;n<e;n++){s=[];for(let e=0;e<t;e++)s.push("");o.push(s)}return o},t.createSpreadsheetData=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;const o=[];let s,n;for(s=0;s<e;s++){const e=[];for(n=0;n<t;n++)e.push(r(n)+(s+1));o.push(e)}return o},t.createSpreadsheetObjectData=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;const o=[];let s,n;for(s=0;s<e;s++){const e={};for(n=0;n<t;n++)e[`prop${n}`]=r(n)+(s+1);o.push(e)}return o},t.dataRowToChangesArray=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=e;const s=[];Array.isArray(e)&&Array.isArray(e[0])||(o=[e]);return o.forEach(((e,o)=>{Array.isArray(e)?e.forEach(((e,n)=>{s.push([o+t,n,e])})):Object.keys(e).forEach((n=>{s.push([o+t,n,e[n]])}))})),s},t.isArrayOfArrays=function(e){return!!(Array.isArray(e)&&e.length&&e.every((e=>Array.isArray(e))))},t.isArrayOfObjects=function(e){return!!(Array.isArray(e)&&e.length&&e.every((e=>"object"==typeof e&&!Array.isArray(e)&&null!==e)))},t.spreadsheetColumnIndex=function(e){let t=0;if(e)for(let o=0,s=e.length-1;o<e.length;o+=1,s-=1)t+=i**s*(n.indexOf(e[o])+1);return t-=1,t},t.spreadsheetColumnLabel=r,o(15724);var s=o(13911);const n="ABCDEFGHIJKLMNOPQRSTUVWXYZ",i=n.length;function r(e){let t,o=e+1,s="";for(;o>0;)t=(o-1)%i,s=String.fromCharCode(65+t)+s,o=parseInt((o-t)/i,10);return s}},72484:(e,t)=>{"use strict";t.__esModule=!0,t.getNormalizedDate=function(e){const t=new Date(e);if(!isNaN(new Date(`${e}T00:00`).getDate()))return new Date(t.getTime()+6e4*t.getTimezoneOffset());return t}},9893:(e,t,o)=>{"use strict";t.__esModule=!0,t.addClass=h,t.addEvent=function(e,t,o){e.addEventListener(t,o,!1)},t.clearTextSelection=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;e.getSelection&&(e.getSelection().empty?e.getSelection().empty():e.getSelection().removeAllRanges&&e.getSelection().removeAllRanges())},t.closest=r,t.closestDown=function(e,t,o){const s=[];let n=e;for(;n&&(n=r(n,t,o),n&&(!o||o.contains(n)));)s.push(n),n=n.host&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE?n.host:n.parentNode;const i=s.length;return i?s[i-1]:null},t.empty=d,t.fastInnerHTML=function(e,t){let o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];g.test(t)?e.innerHTML=o?(0,s.sanitize)(t):t:f(e,t)},t.fastInnerText=f,t.getCaretPosition=function(e){if(e.selectionStart)return e.selectionStart;return 0},t.getCssTransform=function(e){let t;if(e.style.transform&&""!==(t=e.style.transform))return["transform",t];return-1},t.getFrameElement=i,t.getMaximumScrollLeft=function(e){return e.scrollWidth-e.clientWidth},t.getMaximumScrollTop=function(e){return e.scrollHeight-e.clientHeight},t.getParent=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=-1,s=null,n=e;for(;null!==n;){if(o===t){s=n;break}n.host&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE?n=n.host:(o+=1,n=n.parentNode)}return s},t.getParentWindow=function(e){return i(e)&&e.parent},t.getScrollLeft=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(e===t)return m(t);return e.scrollLeft},t.getScrollTop=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(e===t)return p(t);return e.scrollTop},t.getScrollableElement=function(e){let t=e.ownerDocument,o=t?t.defaultView:void 0;t||(t=e.document?e.document:e,o=t.defaultView);const s=["auto","scroll"];let n=e.parentNode;for(;n&&n.style&&t.body!==n;){let{overflow:e,overflowX:t,overflowY:i}=n.style;if([e,t,i].includes("scroll"))return n;if(({overflow:e,overflowX:t,overflowY:i}=o.getComputedStyle(n)),s.includes(e)||s.includes(t)||s.includes(i))return n;if(n.clientHeight<=n.scrollHeight+1&&(s.includes(i)||s.includes(e)))return n;if(n.clientWidth<=n.scrollWidth+1&&(s.includes(t)||s.includes(e)))return n;n=n.parentNode}return o},t.getScrollbarWidth=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;void 0===w&&(w=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;const t=e.createElement("div");t.style.height="200px",t.style.width="100%";const o=e.createElement("div");o.style.boxSizing="content-box",o.style.height="150px",o.style.left="0px",o.style.overflow="hidden",o.style.position="absolute",o.style.top="0px",o.style.width="200px",o.style.visibility="hidden",o.appendChild(t),(e.body||e.documentElement).appendChild(o);const s=t.offsetWidth;o.style.overflow="scroll";let n=t.offsetWidth;s===n&&(n=o.clientWidth);return(e.body||e.documentElement).removeChild(o),s-n}(e));return w},t.getSelectionEndPosition=function(e){if(e.selectionEnd)return e.selectionEnd;return 0},t.getSelectionText=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;const t=e.document;let o="";e.getSelection?o=e.getSelection().toString():t.selection&&"Control"!==t.selection.type&&(o=t.selection.createRange().text);return o},t.getStyle=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;if(!e)return;if(e===o)return"width"===t?`${o.innerWidth}px`:"height"===t?`${o.innerHeight}px`:void 0;const s=e.style[t];if(""!==s&&void 0!==s)return s;const n=o.getComputedStyle(e);if(""!==n[t]&&void 0!==n[t])return n[t]},t.getTrimmingContainer=function(e){const t=e.ownerDocument,o=t.defaultView;let s=e.parentNode;for(;s&&s.style&&t.body!==s;){if("visible"!==s.style.overflow&&""!==s.style.overflow)return s;const e=o.getComputedStyle(s),t=["scroll","hidden","auto"],n=e.getPropertyValue("overflow"),i=e.getPropertyValue("overflow-y"),r=e.getPropertyValue("overflow-x");if(t.includes(n)||t.includes(i)||t.includes(r))return s;s=s.parentNode}return o},t.getWindowScrollLeft=m,t.getWindowScrollTop=p,t.hasAccessToParentWindow=function(e){return!!Object.getPrototypeOf(e.parent)},t.hasClass=function(e,t){if(void 0===e.classList||"string"!=typeof t||""===t)return!1;return e.classList.contains(t)},t.hasHorizontalScrollbar=function(e){return e.offsetHeight!==e.clientHeight},t.hasVerticalScrollbar=function(e){return e.offsetWidth!==e.clientWidth},t.index=function(e){let t=0,o=e;if(o.previousSibling)for(;o=o.previousSibling;)t+=1;return t},t.innerHeight=function(e){return e.clientHeight||e.innerHeight},t.innerWidth=function(e){return e.clientWidth||e.innerWidth},t.isChildOf=function(e,t){let o=e.parentNode,s=[];"string"==typeof t?s=e.defaultView?Array.prototype.slice.call(e.querySelectorAll(t),0):Array.prototype.slice.call(e.ownerDocument.querySelectorAll(t),0):s.push(t);for(;null!==o;){if(s.indexOf(o)>-1)return!0;o=o.parentNode}return!1},t.isDetached=function(e){return!e.parentNode},t.isInput=C,t.isOutsideInput=v,t.isThisHotChild=function(e,t){const o=e.closest(".handsontable");return!!o&&(o.parentNode===t||o===t)},t.isVisible=function e(t){const o=t.ownerDocument.documentElement,s=t.ownerDocument.defaultView;let n=t;for(;n!==o;){if(null===n)return!1;if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(n.host){if(n.host.impl)return e(n.host.impl);if(n.host)return e(n.host);throw new Error("Lost in Web Components world")}return!1}if("none"===s.getComputedStyle(n).display)return!1;n=n.parentNode}return!0},t.makeElementContentEditableAndSelectItsContent=y,t.matchesCSSRules=function(e,t){const{selectorText:o}=t;let s=!1;t.type===CSSRule.STYLE_RULE&&o&&(e.msMatchesSelector?s=e.msMatchesSelector(o):e.matches&&(s=e.matches(o)));return s},t.observeVisibilityChangeOnce=function(e,t){new IntersectionObserver(((o,s)=>{o.forEach((o=>{o.isIntersecting&&null!==e.offsetParent&&(t(),s.unobserve(e))}))}),{root:e.ownerDocument.body}).observe(e)},t.offset=function(e){const t=e.ownerDocument,o=t.defaultView,s=t.documentElement;let n,i,r,l=e;n=l.offsetLeft,i=l.offsetTop,r=l;for(;(l=l.offsetParent)&&l!==t.body&&"offsetLeft"in l;)n+=l.offsetLeft,i+=l.offsetTop,r=l;r&&"fixed"===r.style.position&&(n+=o.pageXOffset||s.scrollLeft,i+=o.pageYOffset||s.scrollTop);return{left:n,top:i}},t.outerHeight=function(e){return e.offsetHeight},t.outerWidth=function(e){return e.offsetWidth},t.overlayContainsElement=function(e,t,o){const s=o.parentElement.querySelector(`.ht_clone_${e}`);return s?s.contains(t):null},t.removeAttribute=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];"string"==typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);const{regexFree:o,regexes:s}=a(t,!0);o.forEach((t=>{""!==t&&e.removeAttribute(t)})),s.forEach((t=>{e.getAttributeNames().forEach((o=>{t.test(o)&&e.removeAttribute(o)}))}))},t.removeClass=c,t.removeContentEditableFromElementAndDeselect=E,t.removeEvent=function(e,t,o){e.removeEventListener(t,o,!1)},t.removeTextNodes=function e(t){if(3===t.nodeType)t.parentNode.removeChild(t);else if(["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(t.nodeName)>-1){const o=t.childNodes;for(let t=o.length-1;t>=0;t--)e(o[t])}},t.resetCssTransform=function(e){e.style.transform&&""!==e.style.transform&&(e.style.transform="")},t.runWithSelectedContendEditableElement=function(e,t){let o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];y(e,o),t(),E(e,o)},t.selectElementIfAllowed=function(e){v(e.ownerDocument.activeElement)||e.select()},t.setAttribute=u,t.setCaretPosition=function(e,t,o){void 0===o&&(o=t);if(e.setSelectionRange){e.focus();try{e.setSelectionRange(t,o)}catch(s){const n=e.parentNode,i=n.style.display;n.style.display="block",e.setSelectionRange(t,o),n.style.display=i}}},t.setOverlayPosition=function(e,t,o){e.style.transform=`translate3d(${t},${o},0)`},o(67834),o(15724);var s=o(59777),n=o(92692);function i(e){return Object.getPrototypeOf(e.parent)&&e.frameElement}function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2?arguments[2]:void 0;const{ELEMENT_NODE:s,DOCUMENT_FRAGMENT_NODE:n}=Node;let i=e;for(;null!=i&&i!==o;){const{nodeType:e,nodeName:o}=i;if(e===s&&(t.includes(o)||t.includes(i)))return i;const{host:r}=i;i=r&&e===n?r:i.parentNode}return null}function l(e){return e&&e.length?e.filter((e=>!!e)):[]}function a(e,t){if(!e||!e.length)return t?{regexFree:[],regexes:[]}:[];const o=[],s=[];return s.push(...e.filter((e=>{const s=e instanceof RegExp;return s&&t&&o.push(e),!s}))),t?{regexFree:s,regexes:o}:s}function h(e,t){"string"==typeof t&&(t=t.split(" ")),(t=l(t)).length>0&&e.classList.add(...t)}function c(e,t){"string"==typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);let{regexFree:o,regexes:s}=a(t,!0);o=l(o),o.length>0&&e.classList.remove(...o),s.forEach((t=>{e.classList.forEach((o=>{t.test(o)&&e.classList.remove(o)}))}))}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2?arguments[2]:void 0;Array.isArray(t)||(t=[[t,o]]),t.forEach((t=>{Array.isArray(t)&&""!==t[0]&&e.setAttribute(...t)}))}function d(e){let t;for(;t=e.lastChild;)e.removeChild(t)}const g=t.HTML_CHARACTERS=/(<(.*)>|&(.*);)/;function f(e,t){const o=e.firstChild;o&&3===o.nodeType&&null===o.nextSibling?o.textContent=t:(d(e),e.appendChild(e.ownerDocument.createTextNode(t)))}function p(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).scrollY}function m(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).scrollX}let w;function C(e){return e&&(["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function v(e){return C(e)&&!1===e.hasAttribute("data-hot-input")}function y(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const s=e.ownerDocument,i=s.createRange(),r=s.defaultView.getSelection();u(e,"contenteditable",!0),o&&u(e,...(0,n.A11Y_HIDDEN)()),t&&h(e,"invisibleSelection"),i.selectNodeContents(e),r.removeAllRanges(),r.addRange(i)}function E(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const o=e.ownerDocument.defaultView.getSelection();e.hasAttribute("aria-hidden")&&e.removeAttribute("aria-hidden"),o.removeAllRanges(),t&&c(e,"invisibleSelection"),e.removeAttribute("contenteditable")}},79729:(e,t)=>{"use strict";t.__esModule=!0,t.isImmediatePropagationStopped=function(e){return!1===e.isImmediatePropagationEnabled},t.isLeftClick=function(e){return 0===e.button},t.isRightClick=function(e){return 2===e.button},t.isTouchEvent=function(e){return e instanceof TouchEvent},t.offsetRelativeTo=function(e,t){const o={x:e.offsetX,y:e.offsetY};let s=e.target;if(!(t instanceof HTMLElement)||s!==t&&s.contains(t))return o;for(;s!==t;)o.x+=s.offsetLeft,o.y+=s.offsetTop,s=s.offsetParent;return o},t.stopImmediatePropagation=function(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0}},93980:(e,t)=>{"use strict";let o;t.__esModule=!0,t.cancelAnimationFrame=function(e){window.cancelAnimationFrame(e)},t.getComparisonFunction=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(o)return o;o="object"==typeof Intl?new Intl.Collator(e,t).compare:"function"==typeof String.prototype.localeCompare?(e,t)=>`${e}`.localeCompare(t):(e,t)=>e===t?0:e>t?-1:1;return o},t.isCSR=function(){return"undefined"!=typeof window},t.isTouchSupported=function(){return"ontouchstart"in window},t.requestAnimationFrame=function(e){return window.requestAnimationFrame(e)}},78832:(e,t,o)=>{"use strict";t.__esModule=!0,t.curry=function(e){const t=e.length;return function o(s){return function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];const l=s.concat(i);let a;return a=l.length>=t?e.apply(this,l):o(l),a}}([])},t.curryRight=function(e){const t=e.length;return function o(s){return function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];const l=s.concat(i.reverse());let a;return a=l.length>=t?e.apply(this,l):o(l),a}}([])},t.debounce=function(e){let t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,s=null;return function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return s&&clearTimeout(s),s=setTimeout((()=>{t=e.apply(this,i)}),o),t}},t.fastCall=function(e,t,o,s,i,r,l,a){if((0,n.isDefined)(a))return e.call(t,o,s,i,r,l,a);if((0,n.isDefined)(l))return e.call(t,o,s,i,r,l);if((0,n.isDefined)(r))return e.call(t,o,s,i,r);if((0,n.isDefined)(i))return e.call(t,o,s,i);if((0,n.isDefined)(s))return e.call(t,o,s);if((0,n.isDefined)(o))return e.call(t,o);return e.call(t)},t.isFunction=function(e){return"function"==typeof e},t.partial=function(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];return function(){for(var t=arguments.length,s=new Array(t),n=0;n<t;n++)s[n]=arguments[n];return e.apply(this,o.concat(s))}},t.pipe=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];const[n,...i]=t;return function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return(0,s.arrayReduce)(i,((e,t)=>t(e)),n.apply(this,t))}},t.throttle=i,t.throttleAfterHits=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;const s=i(e,t);let n=o;function r(){for(var t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return n?(n-=1,e.apply(this,o)):s.apply(this,o)}return r.clearHits=function(){n=o},r};var s=o(9175),n=o(38893);function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,o=0;const s={lastCallThrottled:!0};let n=null;return function(){for(var i=arguments.length,r=new Array(i),l=0;l<i;l++)r[l]=arguments[l];const a=Date.now();let h=!1;s.lastCallThrottled=!0,o||(o=a,h=!0);const c=t-(a-o);return h?(s.lastCallThrottled=!1,e.apply(this,r)):(n&&clearTimeout(n),n=setTimeout((()=>{s.lastCallThrottled=!1,e.apply(this,r),o=0,n=void 0}),c)),s}}},38893:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t._injectProductInfo=function(e,t){const o=!l(e),s="string"==typeof e&&"non-commercial-and-evaluation"===e.toLowerCase(),i="0.0.0-next-ffdf116-20240926";let r,v="invalid",y="invalid";const E=function(e){let t=[][a],o=t;if(e[a]!==d("Z"))return!1;for(let t="",s="B<H4P+".split(""),n=d(s.shift());n;n=d(s.shift()||"A"))--n<""[a]?o|=(c(`${c(h(t)+(h(u(e,Math.abs(n),2))+[]).padStart(2,"0"))}`)%97||2)>>1:t=u(e,n,n?1===s[a]?9:8:6);return o===t}(e=g(e||""));if(o||s||E)if(E){const t=(0,n.default)("30/07/2024","DD/MM/YYYY"),o=Math.floor(t.toDate().getTime()/864e5),s=f(e);r=(0,n.default)(864e5*(s+1),"x").format("MMMM DD, YYYY"),o>s?(v="expired",y="expired"):(v="valid",y="valid")}else s?(v="non_commercial",y="valid"):(v="invalid",y="invalid");else v="missing",y="missing";p()&&(v="valid",y="valid");if(!m&&"valid"!==v){w[v]({keyValidityDate:r,hotVersion:i})&&console["non_commercial"===v?"info":"warn"](w[v]({keyValidityDate:r,hotVersion:i})),m=!0}if("valid"!==y&&t.parentNode){if(C[y]({keyValidityDate:r,hotVersion:i})){const e=document.createElement("div");e.className="hot-display-license-info",e.innerHTML=C[y]({keyValidityDate:r,hotVersion:i}),t.parentNode.insertBefore(e,t.nextSibling)}}},t.isDefined=function(e){return void 0!==e},t.isEmpty=l,t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t.isUndefined=r,t.stringify=function(e){let t;switch(typeof e){case"string":case"number":t=`${e}`;break;case"object":t=null===e?"":e.toString();break;case"undefined":t="";break;default:t=e.toString()}return t};var n=s(o(86798)),i=o(28927);function r(e){return void 0===e}function l(e){return null===e||""===e||r(e)}const a="length",h=e=>parseInt(e,16),c=e=>parseInt(e,10),u=(e,t,o)=>e.substr(t,o),d=e=>e.codePointAt(0)-65,g=e=>`${e}`.replace(/\-/g,""),f=e=>h(u(g(e),h("12"),d("F")))/(h(u(g(e),d("B"),~~![][a]))||9),p=()=>"undefined"!=typeof location&&/^([a-z0-9\-]+\.)?\x68\x61\x6E\x64\x73\x6F\x6E\x74\x61\x62\x6C\x65\x2E\x63\x6F\x6D$/i.test(location.host);let m=!1;const w={invalid:()=>i.toSingleLine`
35
+ turning off the "renderAllRows" option.`)),this.table.isAriaEnabled()&&(0,h.setAttribute)(this.rootNode,[(0,c.A11Y_ROWGROUP)()]),this.orderView.setSize(e).setOffset(this.table.renderedRowToSource(0)).start();for(let s=0;s<e;s++){this.orderView.render();const e=this.orderView.getCurrentNode(),n=this.table.renderedRowToSource(s);var t,o;if(this.table.isAriaEnabled())(0,h.setAttribute)(e,[(0,c.A11Y_ROW)(),(0,c.A11Y_ROWINDEX)(n+(null!==(t=null===(o=this.table.rowUtils)||void 0===o||null===(o=o.dataAccessObject)||void 0===o?void 0:o.columnHeaders.length)&&void 0!==t?t:0)+1)]);(0,h.removeClass)(e,[u,d]),(n+1)%2==0?(0,h.addClass)(e,u):(0,h.addClass)(e,d)}this.orderView.end()}}t.default=f},67016:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707));t.default=class{constructor(e){let{cellRenderer:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,n.default)(this,"rootNode",void 0),(0,n.default)(this,"rootDocument",void 0),(0,n.default)(this,"rowHeaders",null),(0,n.default)(this,"columnHeaders",null),(0,n.default)(this,"colGroup",null),(0,n.default)(this,"rows",null),(0,n.default)(this,"cells",null),(0,n.default)(this,"rowFilter",null),(0,n.default)(this,"columnFilter",null),(0,n.default)(this,"rowUtils",null),(0,n.default)(this,"columnUtils",null),(0,n.default)(this,"rowsToRender",0),(0,n.default)(this,"columnsToRender",0),(0,n.default)(this,"rowHeaderFunctions",[]),(0,n.default)(this,"rowHeadersCount",0),(0,n.default)(this,"columnHeaderFunctions",[]),(0,n.default)(this,"columnHeadersCount",0),(0,n.default)(this,"cellRenderer",void 0),(0,n.default)(this,"activeOverlayName",void 0),this.rootNode=e,this.rootDocument=this.rootNode.ownerDocument,this.cellRenderer=t}setActiveOverlayName(e){this.activeOverlayName=e}setAxisUtils(e,t){this.rowUtils=e,this.columnUtils=t}setViewportSize(e,t){this.rowsToRender=e,this.columnsToRender=t}setFilters(e,t){this.rowFilter=e,this.columnFilter=t}setHeaderContentRenderers(e,t){this.rowHeaderFunctions=e,this.rowHeadersCount=e.length,this.columnHeaderFunctions=t,this.columnHeadersCount=t.length}setRenderers(){let{rowHeaders:e,columnHeaders:t,colGroup:o,rows:s,cells:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.setTable(this),t.setTable(this),o.setTable(this),s.setTable(this),n.setTable(this),this.rowHeaders=e,this.columnHeaders=t,this.colGroup=o,this.rows=s,this.cells=n}renderedRowToSource(e){return this.rowFilter.renderedToSource(e)}renderedColumnToSource(e){return this.columnFilter.renderedToSource(e)}isAriaEnabled(){return this.rowUtils.wtSettings.getSetting("ariaTags")}render(){this.colGroup.adjust(),this.columnHeaders.adjust(),this.rows.adjust(),this.rowHeaders.adjust(),this.columnHeaders.render(),this.rows.render(),this.rowHeaders.render(),this.cells.render(),this.columnUtils.calculateWidths(),this.colGroup.render();const{rowsToRender:e,rows:t}=this;for(let o=0;o<e;o++){const e=t.getRenderedNode(o);if(e.firstChild){const t=this.renderedRowToSource(o),s=this.rowUtils.getHeightByOverlayName(t,this.activeOverlayName);e.firstChild.style.height=s?s-1+"px":""}}}}},61677:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=s(o(85707)),i=o(9893);function r(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function l(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var a=new WeakSet;function h(e){const{wtSettings:t,inlineStartOverlay:o,wtTable:s,wtViewport:n,totalColumns:r,rootWindow:l}=this.dataAccessObject;if(o.mainTableScrollableElement===l){let a=null;if(t.getSetting("rtlMode")){const e=s.TABLE.getBoundingClientRect(),t=this.dataAccessObject.rootWindow.document.documentElement.offsetWidth;a=Math.abs(e.right-t)}else{a=(0,i.offset)(s.wtRootElement).left}const h=Math.abs((0,i.getScrollLeft)(l,l));if(a>h){const t=(0,i.innerWidth)(l);let s=n.getRowHeaderWidth();for(let n=1;n<=r;n++)if(s+=o.sumCellSizes(n-1,n),a+s-h>=t){e=n-2;break}}}return e}function c(e){const{topOverlay:t,wtTable:o,wtViewport:s,totalRows:n,rootWindow:r}=this.dataAccessObject;if(t.mainTableScrollableElement===r){const l=(0,i.offset)(o.wtRootElement),a=(0,i.getScrollTop)(r,r);if(l.top>a){const o=(0,i.innerHeight)(r);let h=s.getColumnHeaderHeight();for(let s=1;s<=n;s++)if(h+=t.sumCellSizes(s-1,s),l.top+h-a>=o){e=s-2;break}}}return e}t.default=class{constructor(e){r(this,a),(0,n.default)(this,"dataAccessObject",void 0),this.dataAccessObject=e}scrollViewport(e,t,o,s,n){const i=this.scrollViewportHorizontally(e.col,o,n),r=this.scrollViewportVertically(e.row,t,s);return i||r}scrollViewportHorizontally(e,t,o){const{drawn:s,totalColumns:n}=this.dataAccessObject;if(!s||!Number.isInteger(e)||e<0||e>n)return!1;const i=void 0===t&&void 0===o,{fixedColumnsStart:r,inlineStartOverlay:l}=this.dataAccessObject;if(i&&e<r)return!1;if(e=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollHorizontally",e),!Number.isInteger(e)||e<0||e>n)return!1;const a=this.getFirstVisibleColumn(),h=this.getLastVisibleColumn();let c=!1;return(i&&(e<a||e>h)||!i)&&(c=l.scrollTo(e,i?e>=this.getLastPartiallyVisibleColumn():t)),c}scrollViewportVertically(e,t,o){const{drawn:s,totalRows:n}=this.dataAccessObject;if(!s||!Number.isInteger(e)||e<0||e>n)return!1;const i=void 0===t&&void 0===o,{fixedRowsBottom:r,fixedRowsTop:l,topOverlay:a}=this.dataAccessObject;if(i&&(e<l||e>n-r-1))return!1;if(e=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollVertically",e),!Number.isInteger(e)||e<0||e>n)return!1;const h=this.getFirstVisibleRow(),c=this.getLastVisibleRow();let u=!1;return(i&&(e<h||e>c)||!i)&&(u=a.scrollTo(e,i?e>=this.getLastPartiallyVisibleRow():o)),u}getFirstVisibleRow(){return this.dataAccessObject.wtTable.getFirstVisibleRow()}getLastVisibleRow(){return l(a,this,c).call(this,this.dataAccessObject.wtTable.getLastVisibleRow())}getFirstPartiallyVisibleRow(){return this.dataAccessObject.wtTable.getFirstPartiallyVisibleRow()}getLastPartiallyVisibleRow(){return l(a,this,c).call(this,this.dataAccessObject.wtTable.getLastPartiallyVisibleRow())}getFirstVisibleColumn(){return this.dataAccessObject.wtTable.getFirstVisibleColumn()}getLastVisibleColumn(){return l(a,this,h).call(this,this.dataAccessObject.wtTable.getLastVisibleColumn())}getFirstPartiallyVisibleColumn(){return this.dataAccessObject.wtTable.getFirstPartiallyVisibleColumn()}getLastPartiallyVisibleColumn(){return l(a,this,h).call(this,this.dataAccessObject.wtTable.getLastPartiallyVisibleColumn())}}},15934:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(9893),n=o(79729),i=o(13911),r=o(28890),l=o(30563);t.default=class{constructor(e,t){t&&(this.eventManager=e.eventManager,this.instance=e,this.wot=e,this.settings=t,this.mouseDown=!1,this.main=null,this.top=null,this.bottom=null,this.start=null,this.end=null,this.topStyle=null,this.bottomStyle=null,this.startStyle=null,this.endStyle=null,this.cornerDefaultStyle=l.CORNER_DEFAULT_STYLE,this.cornerCenterPointOffset=-parseInt(this.cornerDefaultStyle.width,10)/2,this.corner=null,this.cornerStyle=null,this.createBorders(t),this.registerListeners())}registerListeners(){const e=this.wot.rootDocument.body;this.eventManager.addEventListener(e,"mousedown",(()=>this.onMouseDown())),this.eventManager.addEventListener(e,"mouseup",(()=>this.onMouseUp()));for(let e=0,t=this.main.childNodes.length;e<t;e++){const t=this.main.childNodes[e];this.eventManager.addEventListener(t,"mouseenter",(t=>this.onMouseEnter(t,this.main.childNodes[e])))}}onMouseDown(){this.mouseDown=!0}onMouseUp(){this.mouseDown=!1}onMouseEnter(e,t){if(!this.mouseDown||!this.wot.getSetting("hideBorderOnMouseDownOver"))return;e.preventDefault(),(0,n.stopImmediatePropagation)(e);const o=this,s=this.wot.rootDocument.body,i=t.getBoundingClientRect();t.style.display="none",this.eventManager.addEventListener(s,"mousemove",(function e(n){var r;((r=n).clientY<Math.floor(i.top)||r.clientY>Math.ceil(i.top+i.height)||r.clientX<Math.floor(i.left)||r.clientX>Math.ceil(i.left+i.width))&&(o.eventManager.removeEventListener(s,"mousemove",e),t.style.display="block")}))}createBorders(e){const{rootDocument:t}=this.wot;this.main=t.createElement("div");const o=["top","start","bottom","end","corner"];let s=this.main.style;s.position="absolute",s.top=0,s.left=0;for(let n=0;n<5;n++){const i=o[n],r=t.createElement("div");r.className=`wtBorder ${this.settings.className||""}`,this.settings[i]&&this.settings[i].hide&&(r.className+=" hidden"),s=r.style,s.backgroundColor=this.settings[i]&&this.settings[i].color?this.settings[i].color:e.border.color,s.height=this.settings[i]&&this.settings[i].width?`${this.settings[i].width}px`:`${e.border.width}px`,s.width=this.settings[i]&&this.settings[i].width?`${this.settings[i].width}px`:`${e.border.width}px`,this.main.appendChild(r)}this.top=this.main.childNodes[0],this.start=this.main.childNodes[1],this.bottom=this.main.childNodes[2],this.end=this.main.childNodes[3],this.topStyle=this.top.style,this.startStyle=this.start.style,this.bottomStyle=this.bottom.style,this.endStyle=this.end.style,this.corner=this.main.childNodes[4],this.corner.className+=" corner",this.cornerStyle=this.corner.style,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.height=this.cornerDefaultStyle.height,this.cornerStyle.border=[this.cornerDefaultStyle.borderWidth,this.cornerDefaultStyle.borderStyle,this.cornerDefaultStyle.borderColor].join(" "),(0,r.isMobileBrowser)()&&this.instance.getSetting("isDataViewInstance")&&this.createMultipleSelectorHandles(),this.disappear();const{wtTable:n}=this.wot;let i=n.bordersHolder;i||(i=t.createElement("div"),i.className="htBorders",n.bordersHolder=i,n.spreader.appendChild(i)),i.appendChild(this.main)}createMultipleSelectorHandles(){const{rootDocument:e}=this.wot;this.selectionHandles={top:e.createElement("DIV"),topHitArea:e.createElement("DIV"),bottom:e.createElement("DIV"),bottomHitArea:e.createElement("DIV")};this.selectionHandles.top.className="topSelectionHandle topLeftSelectionHandle",this.selectionHandles.topHitArea.className="topSelectionHandle-HitArea topLeftSelectionHandle-HitArea",this.selectionHandles.bottom.className="bottomSelectionHandle bottomRightSelectionHandle",this.selectionHandles.bottomHitArea.className="bottomSelectionHandle-HitArea bottomRightSelectionHandle-HitArea",this.selectionHandles.styles={top:this.selectionHandles.top.style,topHitArea:this.selectionHandles.topHitArea.style,bottom:this.selectionHandles.bottom.style,bottomHitArea:this.selectionHandles.bottomHitArea.style};const t={position:"absolute",height:"40px",width:"40px","border-radius":`${parseInt(40/1.5,10)}px`};(0,i.objectEach)(t,((e,t)=>{this.selectionHandles.styles.bottomHitArea[t]=e,this.selectionHandles.styles.topHitArea[t]=e}));const o={position:"absolute",height:"10px",width:"10px","border-radius":`${parseInt(10/1.5,10)}px`,background:"#F5F5FF",border:"1px solid #4285c8"};(0,i.objectEach)(o,((e,t)=>{this.selectionHandles.styles.bottom[t]=e,this.selectionHandles.styles.top[t]=e})),this.main.appendChild(this.selectionHandles.top),this.main.appendChild(this.selectionHandles.bottom),this.main.appendChild(this.selectionHandles.topHitArea),this.main.appendChild(this.selectionHandles.bottomHitArea)}isPartRange(e,t){const o=this.wot.selectionManager.getAreaSelection();return!(!o.cellRange||e===o.cellRange.to.row&&t===o.cellRange.to.col)}updateMultipleSelectionHandlesPosition(e,t,o,s,n,i){const r=this.wot.wtSettings.getSetting("rtlMode")?"right":"left",{top:l,topHitArea:a,bottom:h,bottomHitArea:c}=this.selectionHandles.styles,u=parseInt(l.borderWidth,10),d=parseInt(l.width,10),g=parseInt(a.width,10),f=this.wot.wtTable.getWidth(),p=this.wot.wtTable.getHeight();l.top=`${parseInt(o-d-1,10)}px`,l[r]=`${parseInt(s-d-1,10)}px`,a.top=`${parseInt(o-g/4*3,10)}px`,a[r]=`${parseInt(s-g/4*3,10)}px`;const m=Math.min(parseInt(s+n,10),f-d-2*u),w=Math.min(parseInt(s+n-g/4,10),f-g-2*u);h[r]=`${m}px`,c[r]=`${w}px`;const C=Math.min(parseInt(o+i,10),p-d-2*u),v=Math.min(parseInt(o+i-g/4,10),p-g-2*u);h.top=`${C}px`,c.top=`${v}px`,this.settings.border.cornerVisible&&this.settings.border.cornerVisible()?(l.display="block",a.display="block",this.isPartRange(e,t)?(h.display="none",c.display="none"):(h.display="block",c.display="block")):(l.display="none",h.display="none",a.display="none",c.display="none"),e===this.wot.wtSettings.getSetting("fixedRowsTop")||t===this.wot.wtSettings.getSetting("fixedColumnsStart")?(l.zIndex="9999",a.zIndex="9999"):(l.zIndex="",a.zIndex="")}appear(e){if(this.disabled)return;const{wtTable:t,rootDocument:o,rootWindow:n}=this.wot;let i,l,a,h,c,u;const d=t.getRenderedRowsCount();for(let o=0;o<d;o+=1){const s=t.rowFilter.renderedToSource(o);if(s>=e[0]&&s<=e[2]){i=s,c=e[0];break}}for(let o=d-1;o>=0;o-=1){const s=t.rowFilter.renderedToSource(o);if(s>=e[0]&&s<=e[2]){l=s;break}}const g=t.getRenderedColumnsCount();for(let o=0;o<g;o+=1){const s=t.columnFilter.renderedToSource(o);if(s>=e[1]&&s<=e[3]){a=s,u=e[1];break}}for(let o=g-1;o>=0;o-=1){const s=t.columnFilter.renderedToSource(o);if(s>=e[1]&&s<=e[3]){h=s;break}}if(void 0===i||void 0===a)return void this.disappear();let f=t.getCell(this.wot.createCellCoords(i,a));const p=i!==l||a!==h,m=p?t.getCell(this.wot.createCellCoords(l,h)):f,w=(0,s.offset)(f),C=p?(0,s.offset)(m):w,v=(0,s.offset)(t.TABLE),y=(0,s.outerWidth)(t.TABLE),E=w.top,S=w.left,R=this.wot.wtSettings.getSetting("rtlMode");let b=0,_=0;if(R){const e=(0,s.outerWidth)(f),t=n.innerWidth-v.left-y;_=S+e-C.left,b=n.innerWidth-S-e-t-1}else _=C.left+(0,s.outerWidth)(m)-S,b=S-v.left-1;if(this.isEntireColumnSelected(i,l)){const e=this.getDimensionsFromHeader("columns",a,h,c,v);let t=null;e&&([t,b,_]=e),t&&(f=t)}let T=E-v.top-1,M=C.top+(0,s.outerHeight)(m)-E;if(this.isEntireRowSelected(a,h)){const e=this.getDimensionsFromHeader("rows",i,l,u,v);let t=null;e&&([t,T,M]=e),t&&(f=t)}const O=n.getComputedStyle(f);parseInt(O.borderTopWidth,10)>0&&(T+=1,M=M>0?M-1:0),parseInt(O[R?"borderRightWidth":"borderLeftWidth"],10)>0&&(b+=1,_=_>0?_-1:0);const I=R?"right":"left";this.topStyle.top=`${T}px`,this.topStyle[I]=`${b}px`,this.topStyle.width=`${_}px`,this.topStyle.display="block",this.startStyle.top=`${T}px`,this.startStyle[I]=`${b}px`,this.startStyle.height=`${M}px`,this.startStyle.display="block";const N=Math.floor(this.settings.border.width/2);this.bottomStyle.top=T+M-N+"px",this.bottomStyle[I]=`${b}px`,this.bottomStyle.width=`${_}px`,this.bottomStyle.display="block",this.endStyle.top=`${T}px`,this.endStyle[I]=b+_-N+"px",this.endStyle.height=`${M+1}px`,this.endStyle.display="block";let A=this.settings.border.cornerVisible;A="function"==typeof A?A(this.settings.layerLevel):A;const P=this.wot.getSetting("onModifyGetCellCoords",l,h);let[x,H]=[l,h];if(P&&Array.isArray(P)&&([,,x,H]=P),(0,r.isMobileBrowser)()||!A||this.isPartRange(x,H))this.cornerStyle.display="none";else{this.cornerStyle.top=T+M+this.cornerCenterPointOffset-1+"px",this.cornerStyle[I]=b+_+this.cornerCenterPointOffset-1+"px",this.cornerStyle.borderRightWidth=this.cornerDefaultStyle.borderWidth,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.display="none";let e=(0,s.getTrimmingContainer)(t.TABLE);const i=e===n;i&&(e=o.documentElement);const r=parseInt(this.cornerDefaultStyle.width,10)/2,a=parseInt(this.cornerDefaultStyle.height,10)/2;if(h===this.wot.getSetting("totalColumns")-1){const t=i?m.getBoundingClientRect().left:m.offsetLeft;let o=!1,n=0;R?(n=t-parseInt(this.cornerDefaultStyle.width,10)/2,o=n<0):(n=t+(0,s.outerWidth)(m)+parseInt(this.cornerDefaultStyle.width,10)/2,o=n>=(0,s.innerWidth)(e)),o&&(this.cornerStyle[I]=`${Math.floor(b+_+this.cornerCenterPointOffset-r)}px`,this.cornerStyle[R?"borderLeftWidth":"borderRightWidth"]=0)}if(l===this.wot.getSetting("totalRows")-1){(i?m.getBoundingClientRect().top:m.offsetTop)+(0,s.outerHeight)(m)+parseInt(this.cornerDefaultStyle.height,10)/2>=(0,s.innerHeight)(e)&&(this.cornerStyle.top=`${Math.floor(T+M+this.cornerCenterPointOffset-a)}px`,this.cornerStyle.borderBottomWidth=0)}this.cornerStyle.display="block"}(0,r.isMobileBrowser)()&&this.instance.getSetting("isDataViewInstance")&&this.updateMultipleSelectionHandlesPosition(l,h,T,b,_,M)}isEntireColumnSelected(e,t){return e===this.wot.wtTable.getFirstRenderedRow()&&t===this.wot.wtTable.getLastRenderedRow()}isEntireRowSelected(e,t){return e===this.wot.wtTable.getFirstRenderedColumn()&&t===this.wot.wtTable.getLastRenderedColumn()}getDimensionsFromHeader(e,t,o,n,i){const{wtTable:r}=this.wot,l=r.wtRootElement.parentNode;let a=null,h=null,c=null,u=null,d=null,g=null,f=null,p=null;switch(e){case"rows":a=function(){return r.getRowHeader(...arguments)},h=function(){return(0,s.outerHeight)(...arguments)},c="ht__selection--rows",g="top";break;case"columns":a=function(){return r.getColumnHeader(...arguments)},h=function(){return(0,s.outerWidth)(...arguments)},c="ht__selection--columns",g="left"}if(l.classList.contains(c)){const e=this.wot.getSetting("columnHeaders").length;if(f=a(t,e-n),p=a(o,e-n),!f||!p)return!1;const r=(0,s.offset)(f),l=(0,s.offset)(p);return f&&p&&(u=r[g]-i[g]-1,d=l[g]+h(p)-r[g]),[f,u,d]}return!1}changeBorderStyle(e,t){const o=this[e].style,n=t[e];!n||n.hide?(0,s.addClass)(this[e],"hidden"):((0,s.hasClass)(this[e],"hidden")&&(0,s.removeClass)(this[e],"hidden"),o.backgroundColor=n.color,"top"!==e&&"bottom"!==e||(o.height=`${n.width}px`),"start"!==e&&"end"!==e||(o.width=`${n.width}px`))}changeBorderToDefaultStyle(e){const t=1,o="#000",s=this[e].style;s.backgroundColor=o,s.width=`${t}px`,s.height=`${t}px`}toggleHiddenClass(e,t){this.changeBorderToDefaultStyle(e),t?(0,s.addClass)(this[e],"hidden"):(0,s.removeClass)(this[e],"hidden")}disappear(){this.topStyle.display="none",this.bottomStyle.display="none",this.startStyle.display="none",this.endStyle.display="none",this.cornerStyle.display="none",(0,r.isMobileBrowser)()&&this.instance.getSetting("isDataViewInstance")&&(this.selectionHandles.styles.top.display="none",this.selectionHandles.styles.topHitArea.display="none",this.selectionHandles.styles.bottom.display="none",this.selectionHandles.styles.bottomHitArea.display="none")}destroy(){this.eventManager.destroyWithOwnEventsOnly(),this.main.parentNode.removeChild(this.main)}}},30563:(e,t)=>{"use strict";t.__esModule=!0;t.CORNER_DEFAULT_STYLE=Object.freeze({width:"6px",height:"6px",borderWidth:"1px",borderStyle:"solid",borderColor:"#FFF"})},30782:(e,t)=>{"use strict";t.__esModule=!0;t.ACTIVE_HEADER_TYPE="active-header",t.HEADER_TYPE="header",t.AREA_TYPE="area",t.FOCUS_TYPE="focus",t.FILL_TYPE="fill",t.ROW_TYPE="row",t.COLUMN_TYPE="column",t.CUSTOM_SELECTION_TYPE="custom-selection"},98779:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n={SelectionManager:!0,Selection:!0},i=s(o(8313));t.Selection=i.default;var r=o(30782);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===r[e]||(t[e]=r[e]))}));var l=o(30563);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===l[e]||(t[e]=l[e]))}));var a=o(42492);t.SelectionManager=a.SelectionManager},42492:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724),o(25352),o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var n=o(9893),i=o(51785),r=s(o(15934));function l(e,t,o){a(e,t),t.set(e,o)}function a(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function h(e,t){return e.get(u(e,t))}function c(e,t,o){return e.set(u(e,t),o),o}function u(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var d=new WeakMap,g=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,w=new WeakMap,C=new WeakSet;function v(){const e=h(p,this).get(h(d,this)),t=h(d,this).wtSettings.getSetting("onBeforeRemoveCellClassNames");if(Array.isArray(t))for(let o=0;o<t.length;o++)e.add(t[o]);e.forEach((e=>{var t,o;const s=h(d,this).wtTable.TABLE.querySelectorAll(`.${e}`);let i=[];Array.isArray(null===(t=h(g,this).options)||void 0===t?void 0:t.cellAttributes)&&(i=h(g,this).options.cellAttributes.map((e=>e[0]))),Array.isArray(null===(o=h(g,this).options)||void 0===o?void 0:o.headerAttributes)&&(i=[...i,...h(g,this).options.headerAttributes.map((e=>e[0]))]);for(let t=0,o=s.length;t<o;t++)(0,n.removeClass)(s[t],e),(0,n.removeAttribute)(s[t],i)})),e.clear()}t.SelectionManager=class{constructor(e){var t,o;a(t=this,o=C),o.add(t),l(this,d,void 0),l(this,g,void 0),l(this,f,new i.SelectionScanner),l(this,p,new WeakMap),l(this,m,new WeakSet),l(this,w,new Map),c(g,this,e)}setActiveOverlay(e){return c(d,this,e),h(f,this).setActiveOverlay(h(d,this)),h(p,this).has(h(d,this))||h(p,this).set(h(d,this),new Set),this}getFocusSelection(){return null!==h(g,this)?h(g,this).getFocus():null}getAreaSelection(){return null!==h(g,this)?h(g,this).createLayeredArea():null}getBorderInstance(e){if(!e.settings.border)return null;if(h(w,this).has(e)){const t=h(w,this).get(e);if(t.has(h(d,this)))return t.get(h(d,this));const o=new r.default(h(d,this),e.settings);return t.set(h(d,this),o),o}const t=new r.default(h(d,this),e.settings);return h(w,this).set(e,new Map([[h(d,this),t]])),t}getBorderInstances(e){var t,o;return Array.from(null!==(t=null===(o=h(w,this).get(e))||void 0===o?void 0:o.values())&&void 0!==t?t:[])}destroyBorders(e){h(w,this).get(e).forEach((e=>e.destroy())),h(w,this).delete(e)}render(e){if(null===h(g,this))return;e&&u(C,this,v).call(this);const t=Array.from(h(g,this)),o=new Map,s=new Map;for(let e=0;e<t.length;e++){const n=t[e],{className:i,headerAttributes:r,createLayers:l,selectionType:a}=n.settings;h(m,this).has(n)||(h(m,this).add(n),n.addLocalHook("destroy",(()=>this.destroyBorders(n))));const c=this.getBorderInstance(n);if(n.isEmpty()){null==c||c.disappear();continue}if(i){h(f,this).setActiveSelection(n).scan().forEach((e=>{if(o.has(e)){const t=o.get(e);t.has(i)&&!0===l?t.set(i,t.get(i)+1):t.set(i,1)}else o.set(e,new Map([[i,1]]));r&&(s.has(e)||s.set(e,[]),"TH"===e.nodeName&&s.get(e).push(...r))}))}const u=n.getCorners();h(d,this).getSetting("onBeforeDrawBorders",u,a),null==c||c.appear(u)}o.forEach(((e,t)=>{var o;const s=Array.from(e).map((e=>{let[t,o]=e;return 1===o?t:[t,...Array.from({length:o-1},((e,o)=>`${t}-${o+1}`))]})).flat();s.forEach((e=>h(p,this).get(h(d,this)).add(e))),(0,n.addClass)(t,s),"TD"===t.nodeName&&Array.isArray(null===(o=h(g,this).options)||void 0===o?void 0:o.cellAttributes)&&(0,n.setAttribute)(t,h(g,this).options.cellAttributes)})),Array.from(s.keys()).forEach((e=>{(0,n.setAttribute)(e,[...s.get(e)])}))}}},51785:(e,t,o)=>{"use strict";t.__esModule=!0,o(67834),o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var s=o(9893);function n(e,t,o){i(e,t),t.set(e,o)}function i(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function r(e,t){return e.get(a(e,t))}function l(e,t,o){return e.set(a(e,t),o),o}function a(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var h=new WeakMap,c=new WeakMap,u=new WeakSet;function d(e){const{wtTable:t}=r(c,this),o=t.getRenderedRowsCount(),s=t.getRenderedColumnsCount();for(let n=0;n<o;n+=1){const o=t.rowFilter.renderedToSource(n);for(let n=0;n<s;n+=1)e(o,t.columnFilter.renderedToSource(n))}}t.SelectionScanner=class{constructor(){var e,t;i(e=this,t=u),t.add(e),n(this,h,void 0),n(this,c,void 0)}setActiveOverlay(e){return l(c,this,e),this}setActiveSelection(e){return l(h,this,e),this}scan(){const e=r(h,this).settings.selectionType,t=new Set;return"active-header"===e?(this.scanColumnsInHeadersRange((e=>t.add(e))),this.scanRowsInHeadersRange((e=>t.add(e)))):"area"===e?this.scanCellsRange((e=>t.add(e))):"focus"===e?(this.scanColumnsInHeadersRange((e=>t.add(e))),this.scanRowsInHeadersRange((e=>t.add(e))),this.scanCellsRange((e=>t.add(e)))):"fill"===e?this.scanCellsRange((e=>t.add(e))):"header"===e?(this.scanColumnsInHeadersRange((e=>t.add(e))),this.scanRowsInHeadersRange((e=>t.add(e)))):"row"===e?(this.scanRowsInHeadersRange((e=>t.add(e))),this.scanRowsInCellsRange((e=>t.add(e)))):"column"===e&&(this.scanColumnsInHeadersRange((e=>t.add(e))),this.scanColumnsInCellsRange((e=>t.add(e)))),t}scanColumnsInHeadersRange(e){const[t,o,s,n]=r(h,this).getCorners(),{wtTable:i}=r(c,this),l=i.getRenderedColumnsCount(),a=i.getColumnHeadersCount();let u=0;for(let d=-i.getRowHeadersCount();d<l;d++){const l=i.columnFilter.renderedToSource(d);if(!(l<o||l>n)){for(let d=-a;d<0;d++){if(d<t||d>s)continue;const g=d+a;let f=i.getColumnHeader(l,g);const p=r(c,this).getSetting("onBeforeHighlightingColumnHeader",l,g,{selectionType:r(h,this).settings.selectionType,columnCursor:u,selectionWidth:n-o+1});null!==p&&(p!==l&&(f=i.getColumnHeader(p,g)),e(f))}u+=1}}}scanRowsInHeadersRange(e){const[t,o,s,n]=r(h,this).getCorners(),{wtTable:i}=r(c,this),l=i.getRenderedRowsCount(),a=i.getRowHeadersCount();let u=0;for(let d=-i.getColumnHeadersCount();d<l;d++){const l=i.rowFilter.renderedToSource(d);if(!(l<t||l>s)){for(let d=-a;d<0;d++){if(d<o||d>n)continue;const g=d+a;let f=i.getRowHeader(l,g);const p=r(c,this).getSetting("onBeforeHighlightingRowHeader",l,g,{selectionType:r(h,this).settings.selectionType,rowCursor:u,selectionHeight:s-t+1});null!==p&&(p!==l&&(f=i.getRowHeader(p,g)),e(f))}u+=1}}}scanCellsRange(e){const[t,o,n,i]=r(h,this).getCorners(),{wtTable:l}=r(c,this);a(u,this,d).call(this,((a,u)=>{if(a>=t&&a<=n&&u>=o&&u<=i){const t=l.getCell(r(c,this).createCellCoords(a,u)),o=r(c,this).getSetting("onAfterDrawSelection",a,u,r(h,this).settings.layerLevel);"string"==typeof o&&(0,s.addClass)(t,o),e(t)}}))}scanRowsInCellsRange(e){const[t,,o]=r(h,this).getCorners(),{wtTable:s}=r(c,this);a(u,this,d).call(this,((n,i)=>{if(n>=t&&n<=o){const t=s.getCell(r(c,this).createCellCoords(n,i));e(t)}}))}scanColumnsInCellsRange(e){const[,t,,o]=r(h,this).getCorners(),{wtTable:s}=r(c,this);a(u,this,d).call(this,((n,i)=>{if(i>=t&&i<=o){const t=s.getCell(r(c,this).createCellCoords(n,i));e(t)}}))}}},8313:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=o(13911),i=s(o(63870));class r{constructor(e,t){this.settings=e,this.cellRange=t||null}isEmpty(){return null===this.cellRange}add(e){return this.isEmpty()?this.cellRange=this.settings.createCellRange(e):this.cellRange.expand(e),this}replace(e,t){if(!this.isEmpty()){if(this.cellRange.from.isEqual(e))return this.cellRange.from=t,!0;if(this.cellRange.to.isEqual(e))return this.cellRange.to=t,!0}return!1}clear(){return this.cellRange=null,this}getCorners(){const e=this.cellRange.getOuterTopStartCorner(),t=this.cellRange.getOuterBottomEndCorner();return[e.row,e.col,t.row,t.col]}destroy(){this.runLocalHooks("destroy")}}(0,n.mixin)(r,i.default);t.default=r},47241:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=s(o(85707)),i=o(9893),r=o(13911);t.default=class{constructor(e){(0,n.default)(this,"settings",{}),(0,n.default)(this,"defaults",Object.freeze(this.getDefaults())),(0,r.objectEach)(this.defaults,((t,o)=>{if(void 0!==e[o])this.settings[o]=e[o];else{if(void 0===t)throw new Error(`A required setting "${o}" was not provided`);this.settings[o]=t}}))}getDefaults(){return{facade:void 0,table:void 0,isDataViewInstance:!0,externalRowCalculator:!1,stretchH:"none",currentRowClassName:null,currentColumnClassName:null,preventOverflow:()=>!1,preventWheel:!1,data:void 0,freezeOverlays:!1,fixedColumnsStart:0,fixedRowsTop:0,fixedRowsBottom:0,shouldRenderInlineStartOverlay:()=>this.getSetting("fixedColumnsStart")>0||this.getSetting("rowHeaders").length>0,shouldRenderTopOverlay:()=>this.getSetting("fixedRowsTop")>0||this.getSetting("columnHeaders").length>0,shouldRenderBottomOverlay:()=>this.getSetting("fixedRowsBottom")>0,minSpareRows:0,rowHeaders:()=>[],columnHeaders:()=>[],totalRows:void 0,totalColumns:void 0,cellRenderer:(e,t,o)=>{const s=this.getSetting("data",e,t);(0,i.fastInnerText)(o,null==s?"":s)},columnWidth(){},rowHeight(){},rowHeightByOverlayName(){},defaultRowHeight:23,defaultColumnWidth:50,selections:null,hideBorderOnMouseDownOver:!1,viewportRowCalculatorOverride:null,viewportColumnCalculatorOverride:null,onCellMouseDown:null,onCellContextMenu:null,onCellMouseOver:null,onCellMouseOut:null,onCellMouseUp:null,onCellDblClick:null,onCellCornerMouseDown:null,onCellCornerDblClick:null,beforeDraw:null,onDraw:null,onBeforeRemoveCellClassNames:null,onAfterDrawSelection:null,onBeforeDrawBorders:null,onBeforeViewportScrollHorizontally:e=>e,onBeforeViewportScrollVertically:e=>e,onScrollHorizontally:null,onScrollVertically:null,onBeforeTouchScroll:null,onAfterMomentumScroll:null,onBeforeStretchingColumnWidth:e=>e,onModifyRowHeaderWidth:null,onModifyGetCellCoords:null,onBeforeHighlightingRowHeader:e=>e,onBeforeHighlightingColumnHeader:e=>e,onWindowResize:null,onContainerElementResize:null,renderAllColumns:!1,renderAllRows:!1,groups:!1,rowHeaderWidth:null,columnHeaderHeight:null,headerClassName:null,rtlMode:!1,ariaTags:!0}}update(e,t){return void 0===t?(0,r.objectEach)(e,((e,t)=>{this.settings[t]=e})):this.settings[e]=t,this}getSetting(e,t,o,s,n){return"function"==typeof this.settings[e]?this.settings[e](t,o,s,n):void 0!==t&&Array.isArray(this.settings[e])?this.settings[e][t]:this.settings[e]}getSettingPure(e){return this.settings[e]}has(e){return!!this.settings[e]}}},63646:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(9893),r=o(78832),l=s(o(16979)),a=s(o(39277)),h=o(20524),c=s(o(87736)),u=s(o(46372)),d=o(34009),g=o(92692);t.default=class{constructor(e,t,o,s,r){(0,n.default)(this,"wtSettings",null),(0,n.default)(this,"domBindings",void 0),(0,n.default)(this,"TBODY",null),(0,n.default)(this,"THEAD",null),(0,n.default)(this,"COLGROUP",null),(0,n.default)(this,"hasTableHeight",!0),(0,n.default)(this,"hasTableWidth",!0),(0,n.default)(this,"isTableVisible",!1),(0,n.default)(this,"tableOffset",0),(0,n.default)(this,"holderOffset",0),this.domBindings=o,this.isMaster="master"===r,this.name=r,this.dataAccessObject=e,this.facadeGetter=t,this.wtSettings=s,this.instance=this.dataAccessObject.wot,this.wot=this.dataAccessObject.wot,this.TABLE=o.rootTable,(0,i.removeTextNodes)(this.TABLE),this.spreader=this.createSpreader(this.TABLE),this.hider=this.createHider(this.spreader),this.holder=this.createHolder(this.hider),this.wtRootElement=this.holder.parentNode,this.isMaster&&this.alignOverlaysWithTrimmingContainer(),this.fixTableDomTree(),this.rowFilter=null,this.columnFilter=null,this.correctHeaderWidth=!1;const l=this.wtSettings.getSettingPure("rowHeaderWidth");this.wtSettings.update("rowHeaderWidth",(()=>this._modifyRowHeaderWidth(l))),this.rowUtils=new u.default(this.dataAccessObject,this.wtSettings),this.columnUtils=new c.default(this.dataAccessObject,this.wtSettings),this.tableRenderer=new h.Renderer({TABLE:this.TABLE,THEAD:this.THEAD,COLGROUP:this.COLGROUP,TBODY:this.TBODY,rowUtils:this.rowUtils,columnUtils:this.columnUtils,cellRenderer:this.wtSettings.getSettingPure("cellRenderer")})}is(e){return this.name===e}fixTableDomTree(){const e=this.domBindings.rootDocument;this.TBODY=this.TABLE.querySelector("tbody"),this.TBODY||(this.TBODY=e.createElement("tbody"),this.TABLE.appendChild(this.TBODY)),this.THEAD=this.TABLE.querySelector("thead"),this.THEAD||(this.THEAD=e.createElement("thead"),this.TABLE.insertBefore(this.THEAD,this.TBODY)),this.COLGROUP=this.TABLE.querySelector("colgroup"),this.COLGROUP||(this.COLGROUP=e.createElement("colgroup"),this.TABLE.insertBefore(this.COLGROUP,this.THEAD))}createSpreader(e){const t=e.parentNode;let o;return t&&t.nodeType===Node.ELEMENT_NODE&&(0,i.hasClass)(t,"wtHolder")||(o=this.domBindings.rootDocument.createElement("div"),o.className="wtSpreader",t&&t.insertBefore(o,e),o.appendChild(e)),o.style.position="relative",this.wtSettings.getSetting("ariaTags")&&(0,i.setAttribute)(o,[(0,g.A11Y_PRESENTATION)()]),o}createHider(e){const t=e.parentNode;let o;return t&&t.nodeType===Node.ELEMENT_NODE&&(0,i.hasClass)(t,"wtHolder")||(o=this.domBindings.rootDocument.createElement("div"),o.className="wtHider",t&&t.insertBefore(o,e),o.appendChild(e)),this.wtSettings.getSetting("ariaTags")&&(0,i.setAttribute)(o,[(0,g.A11Y_PRESENTATION)()]),o}createHolder(e){const t=e.parentNode;let o;return t&&t.nodeType===Node.ELEMENT_NODE&&(0,i.hasClass)(t,"wtHolder")||(o=this.domBindings.rootDocument.createElement("div"),o.style.position="relative",o.className="wtHolder",t&&t.insertBefore(o,e),this.isMaster&&(o.parentNode.className+="ht_master handsontable",o.parentNode.setAttribute("dir",this.wtSettings.getSettingPure("rtlMode")?"rtl":"ltr"),this.wtSettings.getSetting("ariaTags")&&(0,i.setAttribute)(o.parentNode,[(0,g.A11Y_PRESENTATION)()])),o.appendChild(e)),this.wtSettings.getSetting("ariaTags")&&(0,i.setAttribute)(o,[(0,g.A11Y_PRESENTATION)()]),o}draw(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{wtSettings:t}=this,{wtOverlays:o,wtViewport:s}=this.dataAccessObject,n=t.getSetting("totalRows"),r=t.getSetting("totalColumns"),h=t.getSetting("rowHeaders"),c=h.length,u=t.getSetting("columnHeaders"),g=u.length;let f=e;if(this.isMaster&&(o.beforeDraw(),this.holderOffset=(0,i.offset)(this.holder),f=s.createCalculators(f),c&&!t.getSetting("fixedColumnsStart"))){const e=o.inlineStartOverlay.getScrollPosition(),t=this.correctHeaderWidth;this.correctHeaderWidth=0!==e,t!==this.correctHeaderWidth&&(f=!1)}if(f)this.isMaster&&o.refresh(!0);else{this.isMaster?this.tableOffset=(0,i.offset)(this.TABLE):this.tableOffset=this.dataAccessObject.parentTableOffset;const e=n>0?this.getFirstRenderedRow():0,t=r>0?this.getFirstRenderedColumn():0;this.rowFilter=new a.default(e,n,g),this.columnFilter=new l.default(t,r,c);let f=!0;if(this.isMaster){this.alignOverlaysWithTrimmingContainer();const e={};this.wtSettings.getSetting("beforeDraw",!0,e),f=!0!==e.skipRender}if(f){let e;if(this.tableRenderer.setHeaderContentRenderers(h,u),(this.is(d.CLONE_BOTTOM)||this.is(d.CLONE_BOTTOM_INLINE_START_CORNER))&&this.tableRenderer.setHeaderContentRenderers(h,[]),this.resetOversizedRows(),this.tableRenderer.setActiveOverlayName(this.name).setViewportSize(this.getRenderedRowsCount(),this.getRenderedColumnsCount()).setFilters(this.rowFilter,this.columnFilter).render(),this.isMaster&&(e=this.dataAccessObject.workspaceWidth,s.containerWidth=null,this.markOversizedColumnHeaders()),this.adjustColumnHeaderHeights(),(this.isMaster||this.is(d.CLONE_BOTTOM))&&this.markOversizedRows(),this.isMaster){this.wtSettings.getSetting("externalRowCalculator")||s.createVisibleCalculators(),o.refresh(!1),o.applyToDOM();const t=(0,i.outerWidth)(this.hider),n=(0,i.outerWidth)(this.TABLE);0!==t&&n!==t&&(this.columnUtils.calculateWidths(),this.tableRenderer.renderer.colGroup.render()),e!==s.getWorkspaceWidth()&&(s.containerWidth=null,this.columnUtils.calculateWidths(),this.tableRenderer.renderer.colGroup.render()),this.wtSettings.getSetting("onDraw",!0)}else this.is(d.CLONE_BOTTOM)&&this.dataAccessObject.cloneSource.wtOverlays.adjustElementsSize()}}let p=!1;return this.isMaster&&(p=o.topOverlay.resetFixedPosition(),o.bottomOverlay.clone&&(p=o.bottomOverlay.resetFixedPosition()||p),p=o.inlineStartOverlay.resetFixedPosition()||p,o.topInlineStartCornerOverlay&&o.topInlineStartCornerOverlay.resetFixedPosition(),o.bottomInlineStartCornerOverlay&&o.bottomInlineStartCornerOverlay.clone&&o.bottomInlineStartCornerOverlay.resetFixedPosition()),p?(o.refreshAll(),o.adjustElementsSize()):this.dataAccessObject.selectionManager.setActiveOverlay(this.facadeGetter()).render(f),this.isMaster&&o.afterDraw(),this.dataAccessObject.drawn=!0,this}markIfOversizedColumnHeader(e){const t=this.columnFilter.renderedToSource(e);let o=this.wtSettings.getSetting("columnHeaders").length;const s=this.wtSettings.getSetting("defaultRowHeight");let n,r,l;const a=this.wtSettings.getSetting("columnHeaderHeight")||[];for(;o;)o-=1,n=this.getColumnHeaderHeight(o),r=this.getColumnHeader(t,o),r&&(l=(0,i.innerHeight)(r),(!n&&s<l||n<l)&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=l),Array.isArray(a)?null!==a[o]&&void 0!==a[o]&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=a[o]):isNaN(a)||(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=a),this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]<(a[o]||a)&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=a[o]||a))}adjustColumnHeaderHeights(){const{wtSettings:e}=this,t=this.THEAD.childNodes,o=this.dataAccessObject.wtViewport.oversizedColumnHeaders;for(let s=0,n=e.getSetting("columnHeaders").length;s<n;s++)if(o[s]){if(!t[s]||0===t[s].childNodes.length)return;t[s].childNodes[0].style.height=`${o[s]}px`}}resetOversizedRows(){const{wtSettings:e}=this,{wtViewport:t}=this.dataAccessObject;if((this.isMaster||this.is(d.CLONE_BOTTOM))&&!e.getSetting("externalRowCalculator")){const e=this.getRenderedRowsCount();for(let o=0;o<e;o++){const e=this.rowFilter.renderedToSource(o);t.oversizedRows&&t.oversizedRows[e]&&(t.oversizedRows[e]=void 0)}}}getCell(e){let t=e.row,o=e.col;const s=this.wtSettings.getSetting("onModifyGetCellCoords",t,o);if(s&&Array.isArray(s)&&([t,o]=s),this.isRowBeforeRenderedRows(t))return-1;if(this.isRowAfterRenderedRows(t))return-2;if(this.isColumnBeforeRenderedColumns(o))return-3;if(this.isColumnAfterRenderedColumns(o))return-4;const n=this.getRow(t);if(!n&&t>=0)throw new Error("TR was expected to be rendered but is not");const i=n.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(o)];if(!i&&o>=0)throw new Error("TD or TH was expected to be rendered but is not");return i}getRow(e){let t=null,o=null;var s,n;e<0?(t=null===(s=this.rowFilter)||void 0===s?void 0:s.sourceRowToVisibleColHeadedRow(e),o=this.THEAD):(t=null===(n=this.rowFilter)||void 0===n?void 0:n.sourceToRendered(e),o=this.TBODY);return void 0!==t&&void 0!==o&&(!(o.childNodes.length<t+1)&&o.childNodes[t])}getColumnHeader(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const o=this.THEAD.childNodes[t];return null==o?void 0:o.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e)]}getColumnHeaders(e){const t=[],o=this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e);return this.THEAD.childNodes.forEach((e=>{const s=e.childNodes[o];s&&t.push(s)})),t}getRowHeader(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(t>=this.wtSettings.getSetting("rowHeaders").length)return;const o=this.rowFilter.sourceToRendered(e),s=o<0?this.rowFilter.sourceRowToVisibleColHeadedRow(e):o,n=(o<0?this.THEAD:this.TBODY).childNodes[s];return null==n?void 0:n.childNodes[t]}getRowHeaders(e){const t=[],o=this.wtSettings.getSetting("rowHeaders").length;for(let s=0;s<o;s++){const o=this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)],n=null==o?void 0:o.childNodes[s];n&&t.push(n)}return t}getCoords(e){let t=e;if("TD"!==t.nodeName&&"TH"!==t.nodeName&&(t=(0,i.closest)(t,["TD","TH"])),null===t)return null;const o=t.parentNode,s=o.parentNode;let n=(0,i.index)(o),r=t.cellIndex;if((0,i.overlayContainsElement)(d.CLONE_TOP_INLINE_START_CORNER,t,this.wtRootElement)||(0,i.overlayContainsElement)(d.CLONE_TOP,t,this.wtRootElement))"THEAD"===s.nodeName&&(n-=s.childNodes.length);else if((0,i.overlayContainsElement)(d.CLONE_BOTTOM_INLINE_START_CORNER,t,this.wtRootElement)||(0,i.overlayContainsElement)(d.CLONE_BOTTOM,t,this.wtRootElement)){n=this.wtSettings.getSetting("totalRows")-s.childNodes.length+n}else n=s===this.THEAD?this.rowFilter.visibleColHeadedRowToSourceRow(n):this.rowFilter.renderedToSource(n);return r=(0,i.overlayContainsElement)(d.CLONE_TOP_INLINE_START_CORNER,t,this.wtRootElement)||(0,i.overlayContainsElement)(d.CLONE_INLINE_START,t,this.wtRootElement)||(0,i.overlayContainsElement)(d.CLONE_BOTTOM_INLINE_START_CORNER,t,this.wtRootElement)?this.columnFilter.offsettedTH(r):this.columnFilter.visibleRowHeadedColumnToSourceColumn(r),this.wot.createCellCoords(n,r)}markOversizedRows(){if(this.wtSettings.getSetting("externalRowCalculator"))return;let e=this.TBODY.childNodes.length;let t,o,s,n,r;if(e*this.wtSettings.getSetting("defaultRowHeight")!==(0,i.innerHeight)(this.TBODY)-1||this.wtSettings.getSetting("fixedRowsBottom"))for(;e;)e-=1,s=this.rowFilter.renderedToSource(e),t=this.getRowHeight(s),n=this.getTrForRow(s),r=n.querySelector("th"),o=r?(0,i.innerHeight)(r):(0,i.innerHeight)(n)-1,(!t&&this.wtSettings.getSetting("defaultRowHeight")<o||t<o)&&(o+=1,this.dataAccessObject.wtViewport.oversizedRows[s]=o)}getTrForRow(e){return this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)]}isColumnHeaderRendered(e){if(e>=0)return!1;const t=this.wtSettings.getSetting("rowHeaders").length;return Math.abs(e)<=t}isRowHeaderRendered(e){if(e>=0)return!1;const t=this.wtSettings.getSetting("columnHeaders").length;return Math.abs(e)<=t}isRowBeforeRenderedRows(e){const t=this.getFirstRenderedRow();return e<0&&t<=0?!this.isRowHeaderRendered(e):e<t}isRowAfterRenderedRows(e){return e>this.getLastRenderedRow()}isColumnBeforeRenderedColumns(e){const t=this.getFirstRenderedColumn();return e<0&&t<=0?!this.isColumnHeaderRendered(e):e<t}isColumnAfterRenderedColumns(e){return this.columnFilter&&e>this.getLastRenderedColumn()}isColumnAfterViewport(e){return this.columnFilter&&e>this.getLastVisibleColumn()}isRowAfterViewport(e){return this.rowFilter&&e>this.getLastVisibleRow()}isColumnBeforeViewport(e){return this.columnFilter&&this.columnFilter.sourceToRendered(e)<0&&e>=0}isLastRowFullyVisible(){return this.getLastVisibleRow()===this.getLastRenderedRow()}isLastColumnFullyVisible(){return this.getLastVisibleColumn()===this.getLastRenderedColumn()}allRowsInViewport(){return this.wtSettings.getSetting("totalRows")===this.getVisibleRowsCount()}allColumnsInViewport(){return this.wtSettings.getSetting("totalColumns")===this.getVisibleColumnsCount()}getRowHeight(e){return this.rowUtils.getHeight(e)}getColumnHeaderHeight(e){return this.columnUtils.getHeaderHeight(e)}getColumnWidth(e){return this.columnUtils.getWidth(e)}getStretchedColumnWidth(e){return this.columnUtils.getStretchedColumnWidth(e)}hasDefinedSize(){return this.hasTableHeight&&this.hasTableWidth}getWidth(){return(0,i.outerWidth)(this.TABLE)}getHeight(){return(0,i.outerHeight)(this.TABLE)}getTotalWidth(){const e=(0,i.outerWidth)(this.hider);return 0!==e?e:this.getWidth()}getTotalHeight(){const e=(0,i.outerHeight)(this.hider);return 0!==e?e:this.getHeight()}isVisible(){return(0,i.isVisible)(this.TABLE)}_modifyRowHeaderWidth(e){let t=(0,r.isFunction)(e)?e():null;return Array.isArray(t)?(t=[...t],t[t.length-1]=this._correctRowHeaderWidth(t[t.length-1])):t=this._correctRowHeaderWidth(t),t}_correctRowHeaderWidth(e){let t=e;return"number"!=typeof e&&(t=this.wtSettings.getSetting("defaultColumnWidth")),this.correctHeaderWidth&&(t+=1),t}}},31542:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(63646)),i=s(o(58166)),r=s(o(17800)),l=o(13911),a=o(34009);class h extends n.default{constructor(e,t,o,s){super(e,t,o,s,a.CLONE_BOTTOM)}}(0,l.mixin)(h,i.default),(0,l.mixin)(h,r.default);t.default=h},93638:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(63646)),i=s(o(58166)),r=s(o(85449)),l=o(13911),a=o(34009);class h extends n.default{constructor(e,t,o,s){super(e,t,o,s,a.CLONE_BOTTOM_INLINE_START_CORNER)}}(0,l.mixin)(h,i.default),(0,l.mixin)(h,r.default);t.default=h},14658:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(63646)),i=s(o(95374)),r=s(o(85449)),l=o(13911),a=o(34009);class h extends n.default{constructor(e,t,o,s){super(e,t,o,s,a.CLONE_INLINE_START)}}(0,l.mixin)(h,i.default),(0,l.mixin)(h,r.default);t.default=h},26235:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=o(9893),i=s(o(63646)),r=s(o(95374)),l=s(o(17800)),a=o(13911);class h extends i.default{constructor(e,t,o,s){super(e,t,o,s,"master")}alignOverlaysWithTrimmingContainer(){const e=(0,n.getTrimmingContainer)(this.wtRootElement),{rootWindow:t}=this.domBindings;if(e===t){this.wtSettings.getSetting("preventOverflow")||(this.holder.style.overflow="visible",this.wtRootElement.style.overflow="visible")}else{const o=e.parentElement,s=(0,n.getStyle)(e,"height",t),i=(0,n.getStyle)(e,"overflow",t),r=this.holder.style,{scrollWidth:l,scrollHeight:a}=e;let h=e.offsetWidth,c=e.offsetHeight;if(o&&["auto","hidden","scroll"].includes(i)){const s=e.cloneNode(!1);s.style.overflow="auto",s.style.position="absolute",e.nextElementSibling?o.insertBefore(s,e.nextElementSibling):o.appendChild(s);const n=parseInt(t.getComputedStyle(s).height,10);o.removeChild(s),0===n&&(c=0)}c=Math.min(c,a),r.height="auto"===s?"auto":`${c}px`,h=Math.min(h,l),r.width=`${h}px`,r.overflow="",this.hasTableHeight="auto"===r.height||c>0,this.hasTableWidth=h>0}this.isTableVisible=(0,n.isVisible)(this.TABLE)}markOversizedColumnHeaders(){const{wtSettings:e}=this,{wtViewport:t}=this.dataAccessObject,o="master",s=e.getSetting("columnHeaders").length;if(s&&!t.hasOversizedColumnHeadersMarked[o]){const n=e.getSetting("rowHeaders").length,i=this.getRenderedColumnsCount();for(let e=0;e<s;e++)for(let e=-1*n;e<i;e++)this.markIfOversizedColumnHeader(e);t.hasOversizedColumnHeadersMarked[o]=!0}}}(0,a.mixin)(h,r.default),(0,a.mixin)(h,l.default);t.default=h},17800:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(13911);const n={getFirstRenderedColumn(){const e=this.dataAccessObject.startColumnRendered;return null===e?-1:e},getFirstVisibleColumn(){const e=this.dataAccessObject.startColumnVisible;return null===e?-1:e},getFirstPartiallyVisibleColumn(){const e=this.dataAccessObject.startColumnPartiallyVisible;return null===e?-1:e},getLastRenderedColumn(){const e=this.dataAccessObject.endColumnRendered;return null===e?-1:e},getLastVisibleColumn(){const e=this.dataAccessObject.endColumnVisible;return null===e?-1:e},getLastPartiallyVisibleColumn(){const e=this.dataAccessObject.endColumnPartiallyVisible;return null===e?-1:e},getRenderedColumnsCount(){return this.dataAccessObject.countColumnsRendered},getVisibleColumnsCount(){return this.dataAccessObject.countColumnsVisible},getRowHeadersCount(){return this.dataAccessObject.rowHeaders.length}};(0,s.defineGetter)(n,"MIXIN_NAME","calculatedColumns",{writable:!1,enumerable:!1});t.default=n},95374:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(13911);const n={getFirstRenderedRow(){const e=this.dataAccessObject.startRowRendered;return null===e?-1:e},getFirstVisibleRow(){const e=this.dataAccessObject.startRowVisible;return null===e?-1:e},getFirstPartiallyVisibleRow(){const e=this.dataAccessObject.startRowPartiallyVisible;return null===e?-1:e},getLastRenderedRow(){const e=this.dataAccessObject.endRowRendered;return null===e?-1:e},getLastVisibleRow(){const e=this.dataAccessObject.endRowVisible;return null===e?-1:e},getLastPartiallyVisibleRow(){const e=this.dataAccessObject.endRowPartiallyVisible;return null===e?-1:e},getRenderedRowsCount(){return this.dataAccessObject.countRowsRendered},getVisibleRowsCount(){return this.dataAccessObject.countRowsVisible},getColumnHeadersCount(){return this.dataAccessObject.columnHeaders.length}};(0,s.defineGetter)(n,"MIXIN_NAME","calculatedRows",{writable:!1,enumerable:!1});t.default=n},85449:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(13911);const n={getFirstRenderedColumn(){return 0===this.wtSettings.getSetting("totalColumns")?-1:0},getFirstVisibleColumn(){return this.getFirstRenderedColumn()},getFirstPartiallyVisibleColumn(){return this.getFirstRenderedColumn()},getLastRenderedColumn(){return this.getRenderedColumnsCount()-1},getLastVisibleColumn(){return this.getLastRenderedColumn()},getLastPartiallyVisibleColumn(){return this.getLastRenderedColumn()},getRenderedColumnsCount(){const e=this.wtSettings.getSetting("totalColumns");return Math.min(this.wtSettings.getSetting("fixedColumnsStart"),e)},getVisibleColumnsCount(){return this.getRenderedColumnsCount()},getRowHeadersCount(){return this.dataAccessObject.rowHeaders.length}};(0,s.defineGetter)(n,"MIXIN_NAME","stickyColumnsStart",{writable:!1,enumerable:!1});t.default=n},58166:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(13911);const n={getFirstRenderedRow(){const e=this.wtSettings.getSetting("totalRows"),t=this.wtSettings.getSetting("fixedRowsBottom"),o=e-t;return 0===e||0===t?-1:o<0?0:o},getFirstVisibleRow(){return this.getFirstRenderedRow()},getFirstPartiallyVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return this.wtSettings.getSetting("totalRows")-1},getLastVisibleRow(){return this.getLastRenderedRow()},getLastPartiallyVisibleRow(){return this.getLastRenderedRow()},getRenderedRowsCount(){const e=this.wtSettings.getSetting("totalRows");return Math.min(this.wtSettings.getSetting("fixedRowsBottom"),e)},getVisibleRowsCount(){return this.getRenderedRowsCount()},getColumnHeadersCount:()=>0};(0,s.defineGetter)(n,"MIXIN_NAME","stickyRowsBottom",{writable:!1,enumerable:!1});t.default=n},61138:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(13911);const n={getFirstRenderedRow(){return 0===this.wtSettings.getSetting("totalRows")?-1:0},getFirstVisibleRow(){return this.getFirstRenderedRow()},getFirstPartiallyVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return this.getRenderedRowsCount()-1},getLastVisibleRow(){return this.getLastRenderedRow()},getLastPartiallyVisibleRow(){return this.getLastRenderedRow()},getRenderedRowsCount(){const e=this.wtSettings.getSetting("totalRows");return Math.min(this.wtSettings.getSetting("fixedRowsTop"),e)},getVisibleRowsCount(){return this.getRenderedRowsCount()},getColumnHeadersCount(){return this.dataAccessObject.columnHeaders.length}};(0,s.defineGetter)(n,"MIXIN_NAME","stickyRowsTop",{writable:!1,enumerable:!1});t.default=n},61234:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(63646)),i=s(o(61138)),r=s(o(17800)),l=o(13911),a=o(34009);class h extends n.default{constructor(e,t,o,s){super(e,t,o,s,a.CLONE_TOP)}}(0,l.mixin)(h,i.default),(0,l.mixin)(h,r.default);t.default=h},60882:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(63646)),i=s(o(61138)),r=s(o(85449)),l=o(13911),a=o(34009);class h extends n.default{constructor(e,t,o,s){super(e,t,o,s,a.CLONE_TOP_INLINE_START_CORNER)}}(0,l.mixin)(h,i.default),(0,l.mixin)(h,r.default);t.default=h},87736:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707)),i=o(9893),r=o(61311);t.default=class{constructor(e,t){(0,n.default)(this,"dataAccessObject",void 0),(0,n.default)(this,"wtSettings",void 0),(0,n.default)(this,"headerWidths",new Map),(0,n.default)(this,"stretching",void 0),this.dataAccessObject=e,this.wtSettings=t,this.stretching=new r.ColumnStretching({totalColumns:()=>this.wtSettings.getSetting("totalColumns"),stretchMode:()=>this.wtSettings.getSetting("stretchH"),stretchingColumnWidthFn:(e,t)=>this.wtSettings.getSetting("onBeforeStretchingColumnWidth",e,t),columnWidthFn:e=>this.dataAccessObject.wtTable.getColumnWidth(e)})}getWidth(e){return this.wtSettings.getSetting("columnWidth",e)||this.wtSettings.getSetting("defaultColumnWidth")}getStretchedColumnWidth(e){let t=this.getWidth(e);const o=this.stretching.getStretchedColumnWidth(e,t);return o&&(t=o),t}getHeaderHeight(e){let t=this.wtSettings.getSetting("defaultRowHeight");const o=this.dataAccessObject.wtViewport.oversizedColumnHeaders[e];return void 0!==o&&(t=t?Math.max(t,o):o),t}getHeaderWidth(e){return this.headerWidths.get(this.dataAccessObject.wtTable.columnFilter.sourceToRendered(e))}refreshStretching(){const{wtTable:e,wtViewport:t,cloneSource:o}=this.dataAccessObject,s=o?o.wtTable.holder:e.holder,n=s.offsetHeight<s.scrollHeight?(0,i.getScrollbarWidth)():0;this.stretching.refreshStretching(t.getViewportWidth()-n)}calculateWidths(){const{wtSettings:e}=this;let t=e.getSetting("rowHeaderWidth");if(this.refreshStretching(),t=e.getSetting("onModifyRowHeaderWidth",t),null!=t){const o=e.getSetting("rowHeaders").length,s=e.getSetting("defaultColumnWidth");for(let e=0;e<o;e++){let o=Array.isArray(t)?t[e]:t;o=null==o?s:o,this.headerWidths.set(e,o)}}}}},61311:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=s(o(85707)),i=o(26679);function r(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function l(e,t){return e.get(h(e,t))}function a(e,t,o){return e.set(h(e,t),o),o}function h(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var c=new WeakMap,u=new WeakMap,d=new WeakMap,g=new WeakMap,f=new WeakMap;t.ColumnStretching=class{constructor(e){let{totalColumns:t,stretchMode:o,stretchingColumnWidthFn:s,columnWidthFn:i}=e;(0,n.default)(this,"stretchAllRatio",0),(0,n.default)(this,"stretchLastWidth",0),(0,n.default)(this,"stretchAllColumnsWidth",[]),r(this,c,0),(0,n.default)(this,"needVerifyLastColumnWidth",!0),r(this,u,(()=>0)),r(this,d,(e=>e)),r(this,g,(e=>e)),r(this,f,(()=>"none")),a(u,this,t),a(f,this,o),a(d,this,null!=s?s:l(d,this)),a(g,this,null!=i?i:l(g,this))}refreshStretching(e){if("none"===l(f,this).call(this))return;this.stretchAllRatio=0,this.stretchAllColumnsWidth=[],this.needVerifyLastColumnWidth=!0,this.stretchLastWidth=0,a(c,this,e);let t=0;for(let o=0;o<l(u,this).call(this);o++){const s=this._getColumnWidth(o),n=l(d,this).call(this,void 0,o);"number"==typeof n?e-=n:t+=s}const o=e-t;if("all"===l(f,this).call(this)&&o>0)this.stretchAllRatio=e/t,this.stretchAllColumnsWidth=[],this.needVerifyLastColumnWidth=!0;else if("last"===l(f,this).call(this)&&e!==1/0){const e=this._getColumnWidth(l(u,this).call(this)-1),t=o+e;this.stretchLastWidth=t>=0?t:e}}getStretchedColumnWidth(e,t){let o=null;return"all"===l(f,this).call(this)&&0!==this.stretchAllRatio?o=this._getStretchedAllColumnWidth(e,t):"last"===l(f,this).call(this)&&0!==this.stretchLastWidth&&(o=this._getStretchedLastColumnWidth(e)),o}_getStretchedAllColumnWidth(e,t){let o=0;if(!this.stretchAllColumnsWidth[e]){const o=Math.round(t*this.stretchAllRatio),s=l(d,this).call(this,o,e);this.stretchAllColumnsWidth[e]=void 0===s?o:isNaN(s)?this._getColumnWidth(e):s}if(this.stretchAllColumnsWidth.length===l(u,this).call(this)&&this.needVerifyLastColumnWidth){this.needVerifyLastColumnWidth=!1;for(let e=0;e<this.stretchAllColumnsWidth.length;e++)o+=this.stretchAllColumnsWidth[e];o!==l(c,this)&&(this.stretchAllColumnsWidth[this.stretchAllColumnsWidth.length-1]+=l(c,this)-o)}return this.stretchAllColumnsWidth[e]}_getStretchedLastColumnWidth(e){return e===l(u,this).call(this)-1?this.stretchLastWidth:null}_getColumnWidth(e){let t=l(g,this).call(this,e);return isNaN(t)&&(t=i.DEFAULT_COLUMN_WIDTH),t}}},42715:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707));t.default=class{constructor(e){(0,n.default)(this,"nodeType",void 0),this.nodeType=e.toUpperCase()}setRootDocument(e){this.rootDocument=e}obtain(){return this.rootDocument.createElement(this.nodeType)}}},60739:(e,t)=>{"use strict";t.__esModule=!0;t.WORKING_SPACE_ALL=0,t.WORKING_SPACE_TOP=1,t.WORKING_SPACE_BOTTOM=2},21682:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(23225));t.OrderView=n.default;var i=s(o(47664));t.SharedOrderView=i.default},47664:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(23225));class i extends n.default{prependView(e){return this.sizeSet.prepend(e.sizeSet),e.sizeSet.append(this.sizeSet),this}appendView(e){return this.sizeSet.append(e.sizeSet),e.sizeSet.prepend(this.sizeSet),this}}t.default=i},23225:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(15724);var n=s(o(85707)),i=o(60739),r=s(o(83638));t.default=class{constructor(e,t,o){(0,n.default)(this,"rootNode",void 0),(0,n.default)(this,"nodesPool",void 0),(0,n.default)(this,"sizeSet",new r.default),(0,n.default)(this,"childNodeType",void 0),(0,n.default)(this,"visualIndex",0),(0,n.default)(this,"collectedNodes",[]),this.rootNode=e,this.nodesPool=t,this.childNodeType=o.toUpperCase()}setSize(e){return this.sizeSet.setSize(e),this}setOffset(e){return this.sizeSet.setOffset(e),this}isSharedViewSet(){return this.sizeSet.isShared()}getNode(e){return e<this.collectedNodes.length?this.collectedNodes[e]:null}getCurrentNode(){const e=this.collectedNodes.length;return e>0?this.collectedNodes[e-1]:null}getRenderedChildCount(){const{rootNode:e,sizeSet:t}=this;let o=0;if(this.isSharedViewSet()){let s=e.firstElementChild;for(;s;){if(s.tagName===this.childNodeType)o+=1;else if(t.isPlaceOn(i.WORKING_SPACE_TOP))break;s=s.nextElementSibling}}else o=e.childElementCount;return o}start(){this.collectedNodes.length=0,this.visualIndex=0;const{rootNode:e,sizeSet:t}=this,o=this.isSharedViewSet(),{nextSize:s}=t.getViewSize();let n=this.getRenderedChildCount();for(;n<s;){const s=this.nodesPool();!o||o&&t.isPlaceOn(i.WORKING_SPACE_BOTTOM)?e.appendChild(s):e.insertBefore(s,e.firstChild),n+=1}const r=o&&t.isPlaceOn(i.WORKING_SPACE_TOP);for(;n>s;)e.removeChild(r?e.firstChild:e.lastChild),n-=1}render(){const{rootNode:e,sizeSet:t}=this;let o=this.visualIndex;this.isSharedViewSet()&&t.isPlaceOn(i.WORKING_SPACE_BOTTOM)&&(o+=t.sharedSize.nextSize);let s=e.childNodes[o];if(s.tagName!==this.childNodeType){const t=this.nodesPool();e.replaceChild(t,s),s=t}this.collectedNodes.push(s),this.visualIndex+=1}end(){}}},92820:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707));t.default=class{constructor(){(0,n.default)(this,"currentSize",0),(0,n.default)(this,"nextSize",0),(0,n.default)(this,"currentOffset",0),(0,n.default)(this,"nextOffset",0)}setSize(e){this.currentSize=this.nextSize,this.nextSize=e}setOffset(e){this.currentOffset=this.nextOffset,this.nextOffset=e}}},83638:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707)),i=s(o(92820)),r=o(60739);t.default=class{constructor(){(0,n.default)(this,"size",new i.default),(0,n.default)(this,"workingSpace",r.WORKING_SPACE_ALL),(0,n.default)(this,"sharedSize",null)}setSize(e){this.size.setSize(e)}setOffset(e){this.size.setOffset(e)}getViewSize(){return this.size}isShared(){return this.sharedSize instanceof i.default}isPlaceOn(e){return this.workingSpace===e}append(e){this.workingSpace=r.WORKING_SPACE_TOP,e.workingSpace=r.WORKING_SPACE_BOTTOM,this.sharedSize=e.getViewSize()}prepend(e){this.workingSpace=r.WORKING_SPACE_BOTTOM,e.workingSpace=r.WORKING_SPACE_TOP,this.sharedSize=e.getViewSize()}}},46372:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707));t.default=class{constructor(e,t){(0,n.default)(this,"dataAccessObject",void 0),(0,n.default)(this,"wtSettings",void 0),this.dataAccessObject=e,this.wtSettings=t}getHeight(e){let t=this.wtSettings.getSetting("rowHeight",e);const o=this.dataAccessObject.wtViewport.oversizedRows[e];return void 0!==o&&(t=void 0===t?o:Math.max(t,o)),t}getHeightByOverlayName(e,t){let o=this.wtSettings.getSetting("rowHeightByOverlayName",e,t);const s=this.dataAccessObject.wtViewport.oversizedRows[e];return void 0!==s&&(o=void 0===o?s:Math.max(o,s)),o}}},85690:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(9893),n=o(13911),i=o(26679);t.default=class{constructor(e,t,o,s,n){this.dataAccessObject=e,this.wot=e.wot,this.instance=this.wot,this.domBindings=t,this.wtSettings=o,this.wtTable=n,this.oversizedRows=[],this.oversizedColumnHeaders=[],this.hasOversizedColumnHeadersMarked={},this.clientHeight=0,this.containerWidth=NaN,this.rowHeaderWidth=NaN,this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,this.rowsCalculatorTypes=new Map([["rendered",()=>this.wtSettings.getSetting("renderAllRows")?new i.RenderedAllRowsCalculationType:new i.RenderedRowsCalculationType],["fullyVisible",()=>new i.FullyVisibleRowsCalculationType],["partiallyVisible",()=>new i.PartiallyVisibleRowsCalculationType]]),this.columnsCalculatorTypes=new Map([["rendered",()=>this.wtSettings.getSetting("renderAllColumns")?new i.RenderedAllColumnsCalculationType:new i.RenderedColumnsCalculationType],["fullyVisible",()=>new i.FullyVisibleColumnsCalculationType],["partiallyVisible",()=>new i.PartiallyVisibleColumnsCalculationType]]),this.eventManager=s,this.eventManager.addEventListener(this.domBindings.rootWindow,"resize",(()=>{this.clientHeight=this.getWorkspaceHeight()}))}getWorkspaceHeight(){const e=this.domBindings.rootDocument,t=this.dataAccessObject.topOverlayTrimmingContainer;let o=0;if(t===this.domBindings.rootWindow)o=e.documentElement.clientHeight;else{o=(0,s.outerHeight)(t)>0&&t.clientHeight>0?t.clientHeight:1/0}return o}getWorkspaceWidth(){const{wtSettings:e}=this,{rootDocument:t,rootWindow:o}=this.domBindings,n=this.dataAccessObject.inlineStartOverlayTrimmingContainer,i=t.documentElement.offsetWidth,r=e.getSetting("totalColumns"),l=e.getSetting("preventOverflow"),a=e.getSetting("rtlMode"),h=this.wtTable.TABLE.getBoundingClientRect(),c=i-(a?h.right-i:h.left);let u,d;if(l)return(0,s.outerWidth)(this.wtTable.wtRootElement);if(u=e.getSetting("freezeOverlays")?Math.min(c,i):Math.min(this.getContainerFillWidth(),c,i),n===o&&r>0&&this.sumColumnWidths(0,r-1)>u)return t.documentElement.clientWidth;if(n!==o&&(d=(0,s.getStyle)(this.dataAccessObject.inlineStartOverlayTrimmingContainer,"overflow",o),"scroll"===d||"hidden"===d||"auto"===d))return Math.max(u,n.clientWidth);const g=e.getSetting("stretchH");return"none"!==g&&g?u:Math.max(u,(0,s.outerWidth)(this.wtTable.TABLE))}hasVerticalScroll(){return this.wtTable.hider.offsetHeight>this.getWorkspaceHeight()}hasHorizontalScroll(){return this.wtTable.hider.offsetWidth>this.getWorkspaceWidth()}sumColumnWidths(e,t){let o=0,s=e;for(;s<t;)o+=this.wtTable.getColumnWidth(s),s+=1;return o}getContainerFillWidth(){if(this.containerWidth)return this.containerWidth;const e=this.wtTable.holder,t=this.domBindings.rootDocument.createElement("div");t.style.width="100%",t.style.height="1px",e.appendChild(t);const o=t.offsetWidth;return this.containerWidth=o,e.removeChild(t),o}getWorkspaceOffset(){return(0,s.offset)(this.wtTable.TABLE)}getColumnHeaderHeight(){return this.wtSettings.getSetting("columnHeaders").length?isNaN(this.columnHeaderHeight)&&(this.columnHeaderHeight=(0,s.outerHeight)(this.wtTable.THEAD)):this.columnHeaderHeight=0,this.columnHeaderHeight}getViewportHeight(){let e=this.getWorkspaceHeight();if(e===1/0)return e;const t=this.getColumnHeaderHeight();return t>0&&(e-=t),e}getRowHeaderWidth(){const e=this.wtSettings.getSetting("rowHeaderWidth"),t=this.wtSettings.getSetting("rowHeaders");if(e){this.rowHeaderWidth=0;for(let o=0,s=t.length;o<s;o++)this.rowHeaderWidth+=e[o]||e}if(isNaN(this.rowHeaderWidth))if(t.length){let e=this.wtTable.TABLE.querySelector("TH");this.rowHeaderWidth=0;for(let o=0,n=t.length;o<n;o++)e?(this.rowHeaderWidth+=(0,s.outerWidth)(e),e=e.nextSibling):this.rowHeaderWidth+=50}else this.rowHeaderWidth=0;return this.rowHeaderWidth=this.wtSettings.getSetting("onModifyRowHeaderWidth",this.rowHeaderWidth)||this.rowHeaderWidth,this.rowHeaderWidth}getViewportWidth(){const e=this.getWorkspaceWidth();if(e===1/0)return e;const t=this.getRowHeaderWidth();return t>0?e-t:e}createRowsCalculator(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["rendered","fullyVisible","partiallyVisible"];const{wtSettings:t,wtTable:o}=this;let n,r,l=this.getViewportHeight();this.rowHeaderWidth=NaN;let a=this.dataAccessObject.topScrollPosition-this.dataAccessObject.topParentOffset;const h=t.getSetting("fixedRowsTop"),c=t.getSetting("fixedRowsBottom"),u=t.getSetting("totalRows");return h&&a>=0&&(r=this.dataAccessObject.topOverlay.sumCellSizes(0,h),a+=r,l-=r),c&&this.dataAccessObject.bottomOverlay.clone&&(r=this.dataAccessObject.bottomOverlay.sumCellSizes(u-c,u),l-=r),n=o.holder.clientHeight===o.holder.offsetHeight?0:(0,s.getScrollbarWidth)(this.domBindings.rootDocument),new i.ViewportRowsCalculator({calculationTypes:e.map((e=>[e,this.rowsCalculatorTypes.get(e)()])),viewportHeight:l,scrollOffset:a,totalRows:t.getSetting("totalRows"),rowHeightFn:e=>o.getRowHeight(e),overrideFn:t.getSettingPure("viewportRowCalculatorOverride"),horizontalScrollbarHeight:n})}createColumnsCalculator(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["rendered","fullyVisible","partiallyVisible"];const{wtSettings:t,wtTable:o}=this;let n=this.getViewportWidth(),r=Math.abs(this.dataAccessObject.inlineStartScrollPosition)-this.dataAccessObject.inlineStartParentOffset;this.columnHeaderHeight=NaN;const l=t.getSetting("fixedColumnsStart");if(l&&r>=0){const e=this.dataAccessObject.inlineStartOverlay.sumCellSizes(0,l);r+=e,n-=e}return o.holder.clientWidth!==o.holder.offsetWidth&&(n-=(0,s.getScrollbarWidth)(this.domBindings.rootDocument)),new i.ViewportColumnsCalculator({calculationTypes:e.map((e=>[e,this.columnsCalculatorTypes.get(e)()])),viewportWidth:n,scrollOffset:r,totalColumns:t.getSetting("totalColumns"),columnWidthFn:e=>o.getColumnWidth(e),overrideFn:t.getSettingPure("viewportColumnCalculatorOverride"),inlineStartOffset:this.dataAccessObject.inlineStartParentOffset})}createCalculators(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{wtSettings:t}=this,o=this.createRowsCalculator(),s=this.createColumnsCalculator();if(e&&!t.getSetting("renderAllRows")){const t=o.getResultsFor("fullyVisible");e=this.areAllProposedVisibleRowsAlreadyRendered(t)}if(e&&!t.getSetting("renderAllColumns")){const t=s.getResultsFor("fullyVisible");e=this.areAllProposedVisibleColumnsAlreadyRendered(t)}return e||(this.rowsRenderCalculator=o.getResultsFor("rendered"),this.columnsRenderCalculator=s.getResultsFor("rendered")),this.rowsVisibleCalculator=o.getResultsFor("fullyVisible"),this.columnsVisibleCalculator=s.getResultsFor("fullyVisible"),this.rowsPartiallyVisibleCalculator=o.getResultsFor("partiallyVisible"),this.columnsPartiallyVisibleCalculator=s.getResultsFor("partiallyVisible"),e}createVisibleCalculators(){const e=this.createRowsCalculator(["fullyVisible","partiallyVisible"]),t=this.createColumnsCalculator(["fullyVisible","partiallyVisible"]);this.rowsVisibleCalculator=e.getResultsFor("fullyVisible"),this.columnsVisibleCalculator=t.getResultsFor("fullyVisible"),this.rowsPartiallyVisibleCalculator=e.getResultsFor("partiallyVisible"),this.columnsPartiallyVisibleCalculator=t.getResultsFor("partiallyVisible")}areAllProposedVisibleRowsAlreadyRendered(e){if(!this.rowsVisibleCalculator)return!1;let{startRow:t,endRow:o}=e;if(null===t&&null===o){if(!e.isVisibleInTrimmingContainer)return!0;t=this.rowsPartiallyVisibleCalculator.startRow,o=this.rowsPartiallyVisibleCalculator.endRow}const{startRow:s,endRow:n}=this.rowsRenderCalculator;return!(t<s||t===s&&t>0)&&!(o>n||o===n&&o<this.wtSettings.getSetting("totalRows")-1)}areAllProposedVisibleColumnsAlreadyRendered(e){if(!this.columnsVisibleCalculator)return!1;let{startColumn:t,endColumn:o}=e;if(null===t&&null===o){if(!e.isVisibleInTrimmingContainer)return!0;t=this.columnsPartiallyVisibleCalculator.startColumn,o=this.columnsPartiallyVisibleCalculator.endColumn}const{startColumn:s,endColumn:n}=this.columnsRenderCalculator;return!(t<s||t===s&&t>0)&&!(o>n||o===n&&o<this.wtSettings.getSetting("totalColumns")-1)}resetHasOversizedColumnHeadersMarked(){(0,n.objectEach)(this.hasOversizedColumnHeadersMarked,((e,t,o)=>{o[t]=void 0}))}}},38715:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(6254),o(20512),o(23844),o(38594);var n=s(o(87789)),i=o(11015),r=o(71757),l=s(o(56937)),a=o(74174),h=o(34299),c=o(49676),u=o(52618),d=o(90);function g(e,t){const o=new n.default(e,t||{},i.rootInstanceSymbol);return o.init(),o}t.CellCoords=d.CellCoords,t.CellRange=d.CellRange,(0,h.registerCellType)(c.TextCellType),g.editors={BaseEditor:u.BaseEditor},g.Core=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new n.default(e,t,i.rootInstanceSymbol)},g.DefaultSettings=(0,r.metaSchemaFactory)(),g.hooks=l.default.getSingleton(),g.CellCoords=d.CellCoords,g.CellRange=d.CellRange,g.packageName="handsontable",g.buildDate="30/09/2024 11:07:42",g.version="0.0.0-next-517ec9c-20240930",g.languages={dictionaryKeys:a.dictionaryKeys,getLanguageDictionary:a.getLanguageDictionary,getLanguagesDictionaries:a.getLanguagesDictionaries,registerLanguageDictionary:a.registerLanguageDictionary,getTranslatedPhrase:a.getTranslatedPhrase};t.default=g},16531:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(80115),n=o(80827),i=o(93307);const r=t.CELL_TYPE="autocomplete";t.AutocompleteCellType={CELL_TYPE:r,editor:s.AutocompleteEditor,renderer:n.autocompleteRenderer,validator:i.autocompleteValidator}},95211:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(16531);t.AutocompleteCellType=s.AutocompleteCellType,t.CELL_TYPE=s.CELL_TYPE},29529:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(39626),n=o(80730);const i=t.CELL_TYPE="checkbox";t.CheckboxCellType={CELL_TYPE:i,editor:s.CheckboxEditor,renderer:n.checkboxRenderer}},55286:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(29529);t.CELL_TYPE=s.CELL_TYPE,t.CheckboxCellType=s.CheckboxCellType},40395:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(59127),n=o(48075),i=o(70323);const r=t.CELL_TYPE="date";t.DateCellType={CELL_TYPE:r,editor:s.DateEditor,renderer:n.dateRenderer,validator:i.dateValidator}},15347:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(40395);t.CELL_TYPE=s.CELL_TYPE,t.DateCellType=s.DateCellType},85769:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(50486),n=o(82070),i=o(7628);const r=t.CELL_TYPE="dropdown";t.DropdownCellType={CELL_TYPE:r,editor:s.DropdownEditor,renderer:n.dropdownRenderer,validator:i.dropdownValidator}},98614:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(85769);t.CELL_TYPE=s.CELL_TYPE,t.DropdownCellType=s.DropdownCellType},63297:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(56138),n=o(8218);const i=t.CELL_TYPE="handsontable";t.HandsontableCellType={CELL_TYPE:i,editor:s.HandsontableEditor,renderer:n.handsontableRenderer}},37334:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(63297);t.CELL_TYPE=s.CELL_TYPE,t.HandsontableCellType=s.HandsontableCellType},10426:(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllCellTypes=function(){(0,g.registerCellType)(s.AutocompleteCellType),(0,g.registerCellType)(n.CheckboxCellType),(0,g.registerCellType)(i.DateCellType),(0,g.registerCellType)(r.DropdownCellType),(0,g.registerCellType)(l.HandsontableCellType),(0,g.registerCellType)(a.NumericCellType),(0,g.registerCellType)(h.PasswordCellType),(0,g.registerCellType)(c.SelectCellType),(0,g.registerCellType)(u.TextCellType),(0,g.registerCellType)(d.TimeCellType)};var s=o(95211);t.AutocompleteCellType=s.AutocompleteCellType,t.AUTOCOMPLETE_TYPE=s.CELL_TYPE;var n=o(55286);t.CheckboxCellType=n.CheckboxCellType,t.CHECKBOX_TYPE=n.CELL_TYPE;var i=o(15347);t.DateCellType=i.DateCellType,t.DATE_TYPE=i.CELL_TYPE;var r=o(98614);t.DropdownCellType=r.DropdownCellType,t.DROPDOWN_TYPE=r.CELL_TYPE;var l=o(37334);t.HandsontableCellType=l.HandsontableCellType,t.HANDSONTABLE_TYPE=l.CELL_TYPE;var a=o(85506);t.NumericCellType=a.NumericCellType,t.NUMERIC_TYPE=a.CELL_TYPE;var h=o(1774);t.PasswordCellType=h.PasswordCellType,t.PASSWORD_TYPE=h.CELL_TYPE;var c=o(85183);t.SelectCellType=c.SelectCellType,t.SELECT_TYPE=c.CELL_TYPE;var u=o(49676);t.TextCellType=u.TextCellType,t.TEXT_TYPE=u.CELL_TYPE;var d=o(37574);t.TimeCellType=d.TimeCellType,t.TIME_TYPE=d.CELL_TYPE;var g=o(34299);t.registerCellType=g.registerCellType,t.getCellType=g.getCellType,t.getRegisteredCellTypeNames=g.getRegisteredCellTypeNames,t.getRegisteredCellTypes=g.getRegisteredCellTypes,t.hasCellType=g.hasCellType},85506:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(78625);t.CELL_TYPE=s.CELL_TYPE,t.NumericCellType=s.NumericCellType},78625:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(33972),n=o(89760),i=o(66640);const r=t.CELL_TYPE="numeric";t.NumericCellType={CELL_TYPE:r,editor:s.NumericEditor,renderer:n.numericRenderer,validator:i.numericValidator,dataType:"number"}},1774:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(2401);t.CELL_TYPE=s.CELL_TYPE,t.PasswordCellType=s.PasswordCellType},2401:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(46138),n=o(15074);const i=t.CELL_TYPE="password";t.PasswordCellType={CELL_TYPE:i,editor:s.PasswordEditor,renderer:n.passwordRenderer,copyable:!1}},34299:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.getCellType=function(e){if(!c(e))throw Error(`You declared cell type "${e}" as a string that is not mapped to a known object.\n Cell type must be an object or a string mapped to an object registered by\n "Handsontable.cellTypes.registerCellType" method`);return h(e)},t.registerCellType=function(e,t){"string"!=typeof e&&(e=(t=e).CELL_TYPE);const{editor:o,renderer:s,validator:n}=t;o&&(0,i.registerEditor)(e,o);s&&(0,r.registerRenderer)(e,s);n&&(0,l.registerValidator)(e,n);a(e,t)},o(67834);var n=s(o(71263)),i=o(84558),r=o(44288),l=o(51255);const{register:a,getItem:h,hasItem:c,getNames:u,getValues:d}=(0,n.default)("cellTypes");t.getRegisteredCellTypes=d,t.getRegisteredCellTypeNames=u,t.hasCellType=c},85183:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(9771);t.CELL_TYPE=s.CELL_TYPE,t.SelectCellType=s.SelectCellType},9771:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(7507),n=o(31151);const i=t.CELL_TYPE="select";t.SelectCellType={CELL_TYPE:i,editor:s.SelectEditor,renderer:n.selectRenderer}},49676:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(18645);t.CELL_TYPE=s.CELL_TYPE,t.TextCellType=s.TextCellType},18645:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(64952),n=o(36748);const i=t.CELL_TYPE="text";t.TextCellType={CELL_TYPE:i,editor:s.TextEditor,renderer:n.textRenderer}},37574:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(4385);t.CELL_TYPE=s.CELL_TYPE,t.TimeCellType=s.TimeCellType},4385:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(14902),n=o(19698),i=o(51284);const r=t.CELL_TYPE="time";t.TimeCellType={CELL_TYPE:r,editor:s.TimeEditor,renderer:n.timeRenderer,validator:i.timeValidator}},87789:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.default=function(e,t){var o,s=this;let L=arguments.length>2&&void 0!==arguments[2]&&arguments[2],V=this;const F=new h.default(V);let W,B,U,j,Y,z,G=!0;(0,b.hasValidParameter)(L)&&(0,b.registerAsRootInstance)(this);this.rootElement=e,this.rootDocument=e.ownerDocument,this.rootWindow=this.rootDocument.defaultView,this.isDestroyed=!1,this.renderSuspendedCounter=0,this.executionSuspendedCounter=0;const $=null!==(o=null==t?void 0:t.layoutDirection)&&void 0!==o?o:"inherit",K=["rtl","ltr"].includes($)?$:this.rootWindow.getComputedStyle(this.rootElement).direction;this.rootElement.setAttribute("dir",K),this.isRtl=function(){return"rtl"===K},this.isLtr=function(){return!V.isRtl()},this.getDirectionFactor=function(){return V.isLtr()?1:-1},t.language=(0,M.getValidLanguageCode)(t.language);const X=new N.MetaManager(V,t,[N.DynamicCellMetaMod,N.ExtendMetaPropertiesMod]),q=X.getTableMeta(),Q=X.getGlobalMeta(),J=(0,P.createUniqueMap)();this.container=this.rootDocument.createElement("div"),this.renderCall=!1,e.insertBefore(this.container,e.firstChild),(0,b.isRootInstance)(this)&&(0,r._injectProductInfo)(t.licenseKey,e);this.guid=`ht_${(0,C.randomString)()}`,k.set(this.guid,this),this.columnIndexMapper=new R.IndexMapper,this.rowIndexMapper=new R.IndexMapper,this.columnIndexMapper.addLocalHook("indexesSequenceChange",(e=>{V.runHooks("afterColumnSequenceChange",e)})),this.rowIndexMapper.addLocalHook("indexesSequenceChange",(e=>{V.runHooks("afterRowSequenceChange",e)})),B=new E.default(V),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid);let Z=new I.Selection(q,{rowIndexMapper:V.rowIndexMapper,columnIndexMapper:V.columnIndexMapper,countCols:()=>V.countCols(),countRows:()=>V.countRows(),propToCol:e=>W.propToCol(e),isEditorOpened:()=>!!V.getActiveEditor()&&V.getActiveEditor().isOpened(),countRenderableColumns:()=>this.view.countRenderableColumns(),countRenderableRows:()=>this.view.countRenderableRows(),countRowHeaders:()=>this.countRowHeaders(),countColHeaders:()=>this.countColHeaders(),countRenderableRowsInRange:function(){return s.view.countRenderableRowsInRange(...arguments)},countRenderableColumnsInRange:function(){return s.view.countRenderableColumnsInRange(...arguments)},getShortcutManager:()=>V.getShortcutManager(),createCellCoords:(e,t)=>V._createCellCoords(e,t),createCellRange:(e,t,o)=>V._createCellRange(e,t,o),visualToRenderableCoords:e=>{const{row:t,col:o}=e;return V._createCellCoords(t>=0?V.rowIndexMapper.getRenderableFromVisualIndex(t):t,o>=0?V.columnIndexMapper.getRenderableFromVisualIndex(o):o)},renderableToVisualCoords:e=>{const{row:t,col:o}=e;return V._createCellCoords(t>=0?V.rowIndexMapper.getVisualFromRenderableIndex(t):t,o>=0?V.columnIndexMapper.getVisualFromRenderableIndex(o):o)},findFirstNonHiddenRenderableRow:(e,t)=>{const o=t>e?1:-1,s=Math.min(e,t),n=Math.max(e,t),i=V.rowIndexMapper.getNearestNotHiddenIndex(e,o);return null===i||1===o&&i>n||-1===o&&i<s?null:i>=0?V.rowIndexMapper.getRenderableFromVisualIndex(i):i},findFirstNonHiddenRenderableColumn:(e,t)=>{const o=t>e?1:-1,s=Math.min(e,t),n=Math.max(e,t),i=V.columnIndexMapper.getNearestNotHiddenIndex(e,o);return null===i||1===o&&i>n||-1===o&&i<s?null:i>=0?V.columnIndexMapper.getRenderableFromVisualIndex(i):i},isDisabledCellSelection:(e,t)=>e<0||t<0?V.getSettings().disableVisualSelection:V.getCellMeta(e,t).disableVisualSelection});this.selection=Z;const ee=e=>{let{hiddenIndexesChanged:t}=e;t&&this.selection.commit()};function te(e){const t=(0,O.normalizeLanguageCode)(e);(0,M.hasLanguageDictionary)(t)?(V.runHooks("beforeLanguageChange",t),Q.language=t,V.runHooks("afterLanguageChange",t)):(0,O.warnUserAboutLanguageRegistration)(e)}function oe(e,t){const o="className"===e?V.rootElement:V.table;if(G)(0,n.addClass)(o,t);else{let s=[],i=[];Q[e]&&(s=Array.isArray(Q[e])?Q[e]:(0,d.stringToArray)(Q[e])),t&&(i=Array.isArray(t)?t:(0,d.stringToArray)(t));const r=(0,d.getDifferenceOfArrays)(s,i),l=(0,d.getDifferenceOfArrays)(i,s);r.length&&(0,n.removeClass)(o,r),l.length&&(0,n.addClass)(o,l)}Q[e]=t}function se(){let e=!1;return{validatorsInQueue:0,valid:!0,addValidatorToQueue(){this.validatorsInQueue+=1,e=!1},removeValidatorFormQueue(){this.validatorsInQueue=this.validatorsInQueue-1<0?0:this.validatorsInQueue-1,this.checkIfQueueIsEmpty()},onQueueEmpty(){},checkIfQueueIsEmpty(){0===this.validatorsInQueue&&!1===e&&(e=!0,this.onQueueEmpty(this.valid))}}}function ne(e){const t=e.replace(",",".");return!1===isNaN(parseFloat(t))?parseFloat(t):e}function ie(e,t,o){if(!e.length)return void o();const s=V.getActiveEditor(),n=new se;let i=!0;n.onQueueEmpty=()=>{s&&i&&s.cancelChanges(),o()};for(let o=e.length-1;o>=0;o--){const[s,r,,l]=e[o],a=W.propToCol(r);let h;h=Number.isInteger(a)?V.getCellMeta(s,a):{...Object.getPrototypeOf(q),...q},"numeric"===h.type&&"string"==typeof l&&(0,v.isNumericLike)(l)&&(e[o][3]=ne(l)),V.getCellValidator(h)&&(n.addValidatorToQueue(),V.validateCell(e[o][3],h,function(t,o){return function(s){if("boolean"!=typeof s)throw new Error("Validation error: result is not boolean");!1===s&&!1===o.allowInvalid&&(i=!1,e.splice(t,1),o.valid=!0),n.removeValidatorFormQueue()}}(o,h),t))}n.checkIfQueueIsEmpty()}function re(e,t){for(let o=e.length-1;o>=0;o--){let s=!1;if(null!==e[o]){if(null!==e[o][2]&&void 0!==e[o][2]||null!==e[o][3]&&void 0!==e[o][3]){if(q.allowInsertRow)for(;e[o][0]>V.countRows()-1;){const{delta:e}=W.createRow(void 0,void 0,{source:t});if(0===e){s=!0;break}}if("array"===V.dataType&&(!q.columns||0===q.columns.length)&&q.allowInsertColumn)for(;W.propToCol(e[o][1])>V.countCols()-1;){const{delta:e}=W.createCol(void 0,void 0,{source:t});if(0===e){s=!0;break}}s||W.set(e[o][0],e[o][1],e[o][3])}}else e.splice(o,1)}const o=e.length>0;if(V.forceFullRender=!0,o){U.adjustRowsAndCols(),V.runHooks("beforeChangeRender",e,t),j.closeEditor(),V.view.render(),j.prepareEditor(),V.view.adjustElementsSize(),V.runHooks("afterChange",e,t||"edit");const o=V.getActiveEditor();o&&(0,r.isDefined)(o.refreshValue)&&o.refreshValue()}else V.view.render()}function le(e,t,o){return Array.isArray(e)?e:[[e,t,o]]}function ae(e,t){const o=V.getActiveEditor(),s=V.runHooks("beforeChange",e,t||"edit"),n=e.filter((e=>null!==e));return!1===s||0===n.length?(o&&o.cancelChanges(),[]):n}this.columnIndexMapper.addLocalHook("cacheUpdated",ee),this.rowIndexMapper.addLocalHook("cacheUpdated",ee),this.selection.addLocalHook("afterSetRangeEnd",((e,t)=>{const o=(0,c.createObjectPropListener)(!1),s=this.selection.getSelectedRange(),{from:i,to:r}=s.current(),l=s.size()-1;this.runHooks("afterSelection",i.row,i.col,r.row,r.col,o,l),this.runHooks("afterSelectionByProp",i.row,V.colToProp(i.col),r.row,V.colToProp(r.col),o,l),t&&(!o.isTouched()||o.isTouched()&&!o.value)&&z.scrollTo(e);const a=Z.isSelectedByRowHeader(),h=Z.isSelectedByColumnHeader();a&&h?(0,n.addClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]):a?((0,n.removeClass)(this.rootElement,"ht__selection--columns"),(0,n.addClass)(this.rootElement,"ht__selection--rows")):h?((0,n.removeClass)(this.rootElement,"ht__selection--rows"),(0,n.addClass)(this.rootElement,"ht__selection--columns")):(0,n.removeClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]),"shift"!==Z.getSelectionSource()&&j.closeEditor(null),V.view.render(),j.prepareEditor()})),this.selection.addLocalHook("beforeSetFocus",(e=>{this.runHooks("beforeSelectionFocusSet",e.row,e.col)})),this.selection.addLocalHook("afterSetFocus",(e=>{const t=(0,c.createObjectPropListener)(!1);this.runHooks("afterSelectionFocusSet",e.row,e.col,t),(!t.isTouched()||t.isTouched()&&!t.value)&&z.scrollTo(e),j.closeEditor(),V.view.render(),j.prepareEditor()})),this.selection.addLocalHook("afterSelectionFinished",(e=>{const t=e.length-1,{from:o,to:s}=e[t];this.runHooks("afterSelectionEnd",o.row,o.col,s.row,s.col,t),this.runHooks("afterSelectionEndByProp",o.row,V.colToProp(o.col),s.row,V.colToProp(s.col),t)})),this.selection.addLocalHook("afterIsMultipleSelection",(e=>{const t=this.runHooks("afterIsMultipleSelection",e.value);e.value&&(e.value=t)})),this.selection.addLocalHook("afterDeselect",(()=>{j.closeEditor(),V.view.render(),(0,n.removeClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]),this.runHooks("afterDeselect")})),this.selection.addLocalHook("beforeHighlightSet",(()=>this.runHooks("beforeSelectionHighlightSet"))).addLocalHook("beforeSetRangeStart",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeSetRangeStart",...t)})).addLocalHook("beforeSetRangeStartOnly",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeSetRangeStartOnly",...t)})).addLocalHook("beforeSetRangeEnd",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeSetRangeEnd",...t)})).addLocalHook("beforeSelectColumns",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeSelectColumns",...t)})).addLocalHook("afterSelectColumns",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("afterSelectColumns",...t)})).addLocalHook("beforeSelectRows",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeSelectRows",...t)})).addLocalHook("afterSelectRows",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("afterSelectRows",...t)})).addLocalHook("beforeModifyTransformStart",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("modifyTransformStart",...t)})).addLocalHook("afterModifyTransformStart",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("afterModifyTransformStart",...t)})).addLocalHook("beforeModifyTransformFocus",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("modifyTransformFocus",...t)})).addLocalHook("afterModifyTransformFocus",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("afterModifyTransformFocus",...t)})).addLocalHook("beforeModifyTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("modifyTransformEnd",...t)})).addLocalHook("afterModifyTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("afterModifyTransformEnd",...t)})).addLocalHook("beforeRowWrap",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeRowWrap",...t)})).addLocalHook("beforeColumnWrap",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeColumnWrap",...t)})).addLocalHook("insertRowRequire",(e=>this.alter("insert_row_above",e,1,"auto"))).addLocalHook("insertColRequire",(e=>this.alter("insert_col_start",e,1,"auto"))),U={alter(e,t){var o,s;let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3?arguments[3]:void 0,l=arguments.length>4?arguments[4]:void 0;const a=e=>{if(0===e.length)return[];const t=[...e];t.sort(((e,t)=>{let[o]=e,[s]=t;return o===s?0:o>s?1:-1}));return(0,d.arrayReduce)(t,((e,t)=>{let[o,s]=t;const n=e[e.length-1],[i,r]=n,l=i+r;if(o<=l){const e=Math.max(s-(l-o),0);n[1]+=e}else e.push([o,s]);return e}),[t[0]])};switch(e){case"insert_row_below":case"insert_row_above":const l=V.countSourceRows();if(q.maxRows===l)return;const h="insert_row_below"===e?"below":"above";t=null!==(o=t)&&void 0!==o?o:"below"===h?l:0;const{delta:c,startPhysicalIndex:u}=W.createRow(t,n,{source:i,mode:h});Z.shiftRows(V.toVisualRow(u),c);break;case"insert_col_start":case"insert_col_end":const g="insert_col_end"===e?"end":"start";t=null!==(s=t)&&void 0!==s?s:"end"===g?V.countSourceCols():0;const{delta:f,startPhysicalIndex:p}=W.createCol(t,n,{source:i,mode:g});if(f){if(Array.isArray(q.colHeaders)){const e=[V.toVisualColumn(p),0];e.length+=f,Array.prototype.splice.apply(q.colHeaders,e)}Z.shiftColumns(V.toVisualColumn(p),f)}break;case"remove_row":const m=e=>{let t=0;(0,d.arrayEach)(e,(e=>{let[o,s]=e;const n=(0,r.isEmpty)(o)?V.countRows()-1:Math.max(o-t,0);Number.isInteger(o)&&(o=Math.max(o-t,0));if(!W.removeRow(o,s,i))return;if(Z.isSelected()){const{row:e}=V.getSelectedRangeLast().highlight;e>=o&&e<=o+s-1&&j.closeEditor(!0)}const l=V.countRows();0===l?Z.deselect():"ContextMenu.removeRow"===i?Z.refresh():Z.shiftRows(o,-s);const a=q.fixedRowsTop;a>=n+1&&(q.fixedRowsTop-=Math.min(s,a-n));const h=q.fixedRowsBottom;h&&n>=l-h&&(q.fixedRowsBottom-=Math.min(s,h)),t+=s}))};Array.isArray(t)?m(a(t)):m([[t,n]]);break;case"remove_col":const w=e=>{let t=0;(0,d.arrayEach)(e,(e=>{let[o,s]=e;const n=(0,r.isEmpty)(o)?V.countCols()-1:Math.max(o-t,0);let l=V.toPhysicalColumn(n);Number.isInteger(o)&&(o=Math.max(o-t,0));if(!W.removeCol(o,s,i))return;if(Z.isSelected()){const{col:e}=V.getSelectedRangeLast().highlight;e>=o&&e<=o+s-1&&j.closeEditor(!0)}0===V.countCols()?Z.deselect():"ContextMenu.removeColumn"===i?Z.refresh():Z.shiftColumns(o,-s);const a=q.fixedColumnsStart;a>=n+1&&(q.fixedColumnsStart-=Math.min(s,a-n)),Array.isArray(q.colHeaders)&&(void 0===l&&(l=-1),q.colHeaders.splice(l,s)),t+=s}))};Array.isArray(t)?w(a(t)):w([[t,n]]);break;default:throw new Error(`There is no such action "${e}"`)}V.view.render(),l||U.adjustRowsAndCols()},adjustRowsAndCols(){const e=q.minRows,t=q.minSpareRows,o=q.minCols,s=q.minSpareCols;if(e){const t=V.countRows();t<e&&W.createRow(t,e-t,{source:"auto"})}if(t){const e=V.countEmptyRows(!0);if(e<t){const o=t-e,s=Math.min(o,q.maxRows-V.countSourceRows());W.createRow(V.countRows(),s,{source:"auto"})}}{let e;(o||s)&&(e=V.countEmptyCols(!0));let t=V.countCols();if(o&&!q.columns&&t<o){const s=o-t;e+=s,W.createCol(t,s,{source:"auto"})}if(s&&!q.columns&&"array"===V.dataType&&e<s){t=V.countCols();const o=s-e,n=Math.min(o,q.maxCols-t);W.createCol(t,n,{source:"auto"})}}V.view&&V.view.adjustElementsSize()},populateFromArray(e,t,o,s,n){let i,r,l,a;const h=[],u={},g=[],f=e.row,p=e.col;if(r=t.length,0===r)return!1;let m=0,w=0;switch((0,c.isObject)(o)&&(m=o.col-p+1,w=o.row-f+1),n){case"shift_down":const n=(0,d.pivot)(t),C=n.length,v=Math.max(C,m),y=V.getData().slice(f),E=(0,d.pivot)(y).slice(p,p+v);for(l=0;l<v;l+=1)if(l<C){for(i=0,r=n[l].length;i<w-r;i+=1)n[l].push(n[l][i%r]);l<E.length?g.push(n[l].concat(E[l])):g.push(n[l].concat(new Array(y.length).fill(null)))}else g.push(n[l%C].concat(E[l]));V.populateFromArray(f,p,(0,d.pivot)(g));break;case"shift_right":const S=t.length,R=Math.max(S,w),b=V.getData().slice(f).map((e=>e.slice(p)));for(i=0;i<R;i+=1)if(i<S){for(l=0,a=t[i].length;l<m-a;l+=1)t[i].push(t[i][l%a]);if(i<b.length)for(let e=0;e<b[i].length;e+=1)t[i].push(b[i][e]);else t[i].push(...new Array(b[0].length).fill(null))}else t.push(t[i%r].slice(0,R).concat(b[i]));V.populateFromArray(f,p,t);break;default:u.row=e.row,u.col=e.col;let _,T=0,M=0,O=!0;const I=function(e){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const s=t[e%t.length];return null!==o?s[o%s.length]:s},N=t.length,A=o?o.row-e.row+1:0;for(r=o?A:Math.max(N,A),i=0;i<r&&!(o&&u.row>o.row&&A>N||!q.allowInsertRow&&u.row>V.countRows()-1||u.row>=q.maxRows);i++){const t=i-T,n=I(t).length,d=o?o.col-e.col+1:0;if(a=o?d:Math.max(n,d),u.col=e.col,_=V.getCellMeta(u.row,u.col),"CopyPaste.paste"!==s&&"Autofill.fill"!==s||!_.skipRowOnPaste){for(M=0,l=0;l<a&&!(o&&u.col>o.col&&d>n||!q.allowInsertColumn&&u.col>V.countCols()-1||u.col>=q.maxCols);l++){if(_=V.getCellMeta(u.row,u.col),("CopyPaste.paste"===s||"Autofill.fill"===s)&&_.skipColumnOnPaste){M+=1,u.col+=1,a+=1;continue}if(_.readOnly&&"UndoRedo.undo"!==s){u.col+=1;continue}let e=I(t,l-M),o=V.getDataAtCell(u.row,u.col);if(null!==e&&"object"==typeof e)if(Array.isArray(e)&&null===o&&(o=[]),null===o||"object"!=typeof o)O=!1;else{const t=(0,c.duckSchema)(Array.isArray(o)?o:o[0]||o),s=(0,c.duckSchema)(Array.isArray(e)?e:e[0]||e);(0,c.isObjectEqual)(t,s)||Array.isArray(t)&&Array.isArray(s)?e=(0,c.deepClone)(e):O=!1}else null!==o&&"object"==typeof o&&(O=!1);O&&h.push([u.row,u.col,e]),O=!0,u.col+=1}u.row+=1}else T+=1,u.row+=1,r+=1}V.setDataAtCell(h,null,null,s||"populateFromArray")}}},this.init=function(){B.setData(q.data),V.runHooks("beforeInit"),((0,l.isMobileBrowser)()||(0,l.isIpadOS)())&&(0,n.addClass)(V.rootElement,"mobile"),this.updateSettings(q,!0),this.view=new y.default(this),j=a.default.getInstance(V,q,Z),z=(0,A.createViewportScroller)(V),Y=new u.FocusManager(V),(0,b.isRootInstance)(this)&&(0,A.installFocusCatcher)(V),V.runHooks("init"),this.forceFullRender=!0,this.view.render(),G&&null===V.rootElement.offsetParent&&(0,n.observeVisibilityChangeOnce)(V.rootElement,(()=>{V.view._wt.wtOverlays.updateLastSpreaderSize(),V.render(),V.view.adjustElementsSize()})),"object"==typeof G&&(V.runHooks("afterChange",G[0],G[1]),G=!1),V.runHooks("afterInit")},this._createCellCoords=function(e,t){return V.view._wt.createCellCoords(e,t)},this._createCellRange=function(e,t,o){return V.view._wt.createCellRange(e,t,o)},this.validateCell=function(e,t,o,s){let n=V.getCellValidator(t);function l(e){if(!(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])||!0===t.hidden)return void o(e);const s=t.visualCol,n=t.visualRow,i=V.getCell(n,s,!0);if(i&&"TH"!==i.nodeName){const e=V.rowIndexMapper.getRenderableFromVisualIndex(n),t=V.columnIndexMapper.getRenderableFromVisualIndex(s);V.view._wt.getSetting("cellRenderer",e,t,i)}o(e)}var a;(0,r.isRegExp)(n)&&(a=n,n=function(e,t){t(a.test(e))}),(0,i.isFunction)(n)?(e=V.runHooks("beforeValidate",e,t.visualRow,t.prop,s),V._registerImmediate((()=>{n.call(t,e,(o=>{V&&(o=V.runHooks("afterValidate",o,e,t.visualRow,t.prop,s),t.valid=o,l(o),V.runHooks("postAfterValidate",o,e,t.visualRow,t.prop,s))}))}))):V._registerImmediate((()=>{t.valid=!0,l(t.valid,!1)}))},this.setDataAtCell=function(e,t,o,s){const n=le(e,t,o),i=[];let r,l,a,h=s;for(r=0,l=n.length;r<l;r++){if("object"!=typeof n[r])throw new Error("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter");if("number"!=typeof n[r][1])throw new Error("Method `setDataAtCell` accepts row and column number as its parameters. If you want to use object property name, use method `setDataAtRowProp`");a=n[r][1]>=this.countCols()?n[r][1]:W.colToProp(n[r][1]),i.push([n[r][0],a,B.getAtCell(this.toPhysicalRow(n[r][0]),n[r][1]),n[r][2]])}h||"object"!=typeof e||(h=t);const c=ae(i,s);V.runHooks("afterSetDataAtCell",c,h),ie(c,h,(()=>{re(c,h)}))},this.setDataAtRowProp=function(e,t,o,s){const n=le(e,t,o),i=[];let r,l,a=s;for(r=0,l=n.length;r<l;r++)i.push([n[r][0],n[r][1],B.getAtCell(this.toPhysicalRow(n[r][0]),n[r][1]),n[r][2]]);a||"object"!=typeof e||(a=t);const h=ae(i,s);V.runHooks("afterSetDataAtRowProp",h,a),ie(h,a,(()=>{re(h,a)}))},this.listen=function(){V&&!V.isListening()&&(k.forEach((e=>{V!==e&&e.unlisten()})),D=V.guid,V.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(D=null,V.runHooks("afterUnlisten"))},this.isListening=function(){return D===V.guid},this.destroyEditor=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];j.closeEditor(e),V.view.render(),t&&Z.isSelected()&&j.prepareEditor()},this.populateFromArray=function(e,t,o,s,n,i,r){if("object"!=typeof o||"object"!=typeof o[0])throw new Error("populateFromArray parameter `input` must be an array of arrays");const l="number"==typeof s?V._createCellCoords(s,n):null;return U.populateFromArray(V._createCellCoords(e,t),o,l,i,r)},this.spliceCol=function(e,t,o){for(var s=arguments.length,n=new Array(s>3?s-3:0),i=3;i<s;i++)n[i-3]=arguments[i];return W.spliceCol(e,t,o,...n)},this.spliceRow=function(e,t,o){for(var s=arguments.length,n=new Array(s>3?s-3:0),i=3;i<s;i++)n[i-3]=arguments[i];return W.spliceRow(e,t,o,...n)},this.getSelected=function(){if(Z.isSelected())return(0,d.arrayMap)(Z.getSelectedRange(),(e=>{let{from:t,to:o}=e;return[t.row,t.col,o.row,o.col]}))},this.getSelectedLast=function(){const e=this.getSelected();let t;return e&&e.length>0&&(t=e[e.length-1]),t},this.getSelectedRange=function(){if(Z.isSelected())return Array.from(Z.getSelectedRange())},this.getSelectedRangeLast=function(){const e=this.getSelectedRange();let t;return e&&e.length>0&&(t=e[e.length-1]),t},this.emptySelectedCells=function(e){if(!Z.isSelected()||0===this.countRows()||0===this.countCols())return;const t=[];(0,d.arrayEach)(Z.getSelectedRange(),(e=>{if(e.isSingleHeader())return;const o=e.getTopStartCorner(),s=e.getBottomEndCorner();(0,v.rangeEach)(o.row,s.row,(e=>{(0,v.rangeEach)(o.col,s.col,(o=>{this.getCellMeta(e,o).readOnly||t.push([e,o,null])}))}))})),t.length>0&&this.setDataAtCell(t,e)},this.isRenderSuspended=function(){return this.renderSuspendedCounter>0},this.suspendRender=function(){this.renderSuspendedCounter+=1},this.resumeRender=function(){const e=this.renderSuspendedCounter-1;this.renderSuspendedCounter=Math.max(e,0),this.isRenderSuspended()||e!==this.renderSuspendedCounter||(this.renderCall?this.render():V.view.render())},this.render=function(){this.view&&(this.renderCall=!0,this.forceFullRender=!0,this.isRenderSuspended()||V.view.render())},this.batchRender=function(e){this.suspendRender();const t=e();return this.resumeRender(),t},this.isExecutionSuspended=function(){return this.executionSuspendedCounter>0},this.suspendExecution=function(){this.executionSuspendedCounter+=1,this.columnIndexMapper.suspendOperations(),this.rowIndexMapper.suspendOperations()},this.resumeExecution=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.executionSuspendedCounter-1;this.executionSuspendedCounter=Math.max(t,0),(!this.isExecutionSuspended()&&t===this.executionSuspendedCounter||e)&&(this.columnIndexMapper.resumeOperations(),this.rowIndexMapper.resumeOperations())},this.batchExecution=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.suspendExecution();const o=e();return this.resumeExecution(t),o},this.batch=function(e){this.suspendRender(),this.suspendExecution();const t=e();return this.resumeExecution(),this.resumeRender(),t},this.refreshDimensions=function(){if(!V.view)return;const{width:e,height:t}=V.view.getLastSize(),{width:o,height:s}=V.rootElement.getBoundingClientRect(),n=o!==e||s!==t;!1===V.runHooks("beforeRefreshDimensions",{width:e,height:t},{width:o,height:s},n)||((n||V.view._wt.wtOverlays.scrollableElement===V.rootWindow)&&(V.view.setLastSize(o,s),V.render()),V.runHooks("afterRefreshDimensions",{width:e,height:t},{width:o,height:s},n))},this.updateData=function(e,t){(0,N.replaceData)(e,(e=>{W=e}),(e=>{W=e,V.columnIndexMapper.fitToLength(this.getInitialColumnCount()),V.rowIndexMapper.fitToLength(this.countSourceRows()),U.adjustRowsAndCols(),Z.refresh()}),{hotInstance:V,dataMap:W,dataSource:B,internalSource:"updateData",source:t,metaManager:X,firstRun:G})},this.loadData=function(e,t){(0,N.replaceData)(e,(e=>{W=e}),(()=>{X.clearCellsCache(),V.initIndexMappers(),U.adjustRowsAndCols(),Z.refresh(),G&&(G=[null,"loadData"])}),{hotInstance:V,dataMap:W,dataSource:B,internalSource:"loadData",source:t,metaManager:X,firstRun:G})},this.getInitialColumnCount=function(){const e=q.columns;let t=0;if(Array.isArray(e))t=e.length;else if((0,i.isFunction)(e))if("array"===V.dataType){const o=this.countSourceCols();for(let s=0;s<o;s+=1)e(s)&&(t+=1)}else"object"!==V.dataType&&"function"!==V.dataType||(t=W.colToPropCache.length);else if((0,r.isDefined)(q.dataSchema)){const e=W.getSchema();t=Array.isArray(e)?e.length:(0,c.deepObjectSize)(e)}else t=this.countSourceCols();return t},this.initIndexMappers=function(){this.columnIndexMapper.initToLength(this.getInitialColumnCount()),this.rowIndexMapper.initToLength(this.countSourceRows())},this.getData=function(e,t,o,s){return(0,r.isUndefined)(e)?W.getAll():W.getRange(V._createCellCoords(e,t),V._createCellCoords(o,s),W.DESTINATION_RENDERER)},this.getCopyableText=function(e,t,o,s){return W.getCopyableText(V._createCellCoords(e,t),V._createCellCoords(o,s))},this.getCopyableData=function(e,t){return W.getCopyable(e,W.colToProp(t))},this.getSchema=function(){return W.getSchema()},this.updateSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=(G?V.loadData:V.updateData).bind(this);let s,n,l=!1;if((0,r.isDefined)(e.rows))throw new Error('The "rows" setting is no longer supported. Do you mean startRows, minRows or maxRows?');if((0,r.isDefined)(e.cols))throw new Error('The "cols" setting is no longer supported. Do you mean startCols, minCols or maxCols?');if((0,r.isDefined)(e.ganttChart))throw new Error('Since 8.0.0 the "ganttChart" setting is no longer supported.');for(s in e)"data"===s||("language"===s?te(e.language):"className"===s?oe("className",e.className):"tableClassName"===s&&V.table?(oe("tableClassName",e.tableClassName),V.view._wt.wtOverlays.syncOverlayTableClassNames()):T.default.getSingleton().isRegistered(s)||T.default.getSingleton().isDeprecated(s)?((0,i.isFunction)(e[s])||Array.isArray(e[s]))&&(e[s].initialHook=!0,V.addHook(s,e[s])):!t&&(0,c.hasOwnProperty)(e,s)&&(Q[s]=e[s]));void 0===e.data&&void 0===q.data?o(null,"updateSettings"):void 0!==e.data?o(e.data,"updateSettings"):void 0!==e.columns&&(W.createMap(),V.initIndexMappers());const a=V.countCols(),h=q.columns;if(h&&(0,i.isFunction)(h)&&(l=!0),void 0===e.cell&&void 0===e.cells&&void 0===e.columns||X.clearCache(),a>0)for(s=0,n=0;s<a;s++){if(h){const e=l?h(s):h[n];e&&X.updateColumnMeta(n,e)}n+=1}(0,r.isDefined)(e.cell)&&(0,c.objectEach)(e.cell,(e=>{V.setCellMetaObject(e.row,e.col,e)})),V.runHooks("afterCellMetaReset");let u=V.rootElement.style.height;""!==u&&(u=parseInt(V.rootElement.style.height,10));let d=e.height;if((0,i.isFunction)(d)&&(d=d()),t){V.rootElement.getAttribute("style")&&V.rootElement.setAttribute("data-initialstyle",V.rootElement.getAttribute("style"))}if(null===d){const e=V.rootElement.getAttribute("data-initialstyle");e&&(e.indexOf("height")>-1||e.indexOf("overflow")>-1)?V.rootElement.setAttribute("style",e):(V.rootElement.style.height="",V.rootElement.style.overflow="")}else void 0!==d&&(V.rootElement.style.height=isNaN(d)?`${d}`:`${d}px`,V.rootElement.style.overflow="hidden");if(void 0!==e.width){let t=e.width;(0,i.isFunction)(t)&&(t=t()),V.rootElement.style.width=isNaN(t)?`${t}`:`${t}px`}t||(V.view&&(V.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked(),V.view._wt.exportSettingsAsClassNames()),V.runHooks("afterUpdateSettings",e)),U.adjustRowsAndCols(),V.view&&!G&&(V.forceFullRender=!0,V.view.render(),V.view._wt.wtOverlays.adjustElementsSize()),t||!V.view||""!==u&&""!==d&&void 0!==d||u===d||V.view._wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){const e=V.getSelectedLast();if(q.getValue){if((0,i.isFunction)(q.getValue))return q.getValue.call(V);if(e)return V.getData()[e[0][0]][q.getValue]}else if(e)return V.getDataAtCell(e[0],e[1])},this.getSettings=function(){return q},this.clear=function(){this.selectAll(),this.emptySelectedCells()},this.alter=function(e,t,o,s,n){U.alter(e,t,o,s,n)},this.getCell=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=t,n=e;if(t>=0){if(this.columnIndexMapper.isHidden(this.toPhysicalColumn(t)))return null;s=this.columnIndexMapper.getRenderableFromVisualIndex(t)}if(e>=0){if(this.rowIndexMapper.isHidden(this.toPhysicalRow(e)))return null;n=this.rowIndexMapper.getRenderableFromVisualIndex(e)}return null===n||null===s||void 0===n||void 0===s?null:V.view.getCellAtCoords(V._createCellCoords(n,s),o)},this.getCoords=function(e){const t=this.view._wt.wtTable.getCoords(e);if(null===t)return null;const{row:o,col:s}=t;let n=o,i=s;return o>=0&&(n=this.rowIndexMapper.getVisualFromRenderableIndex(o)),s>=0&&(i=this.columnIndexMapper.getVisualFromRenderableIndex(s)),V._createCellCoords(n,i)},this.colToProp=function(e){return W.colToProp(e)},this.propToCol=function(e){return W.propToCol(e)},this.toVisualRow=e=>this.rowIndexMapper.getVisualFromPhysicalIndex(e),this.toVisualColumn=e=>this.columnIndexMapper.getVisualFromPhysicalIndex(e),this.toPhysicalRow=e=>this.rowIndexMapper.getPhysicalFromVisualIndex(e),this.toPhysicalColumn=e=>this.columnIndexMapper.getPhysicalFromVisualIndex(e),this.getDataAtCell=function(e,t){return W.get(e,W.colToProp(t))},this.getDataAtRowProp=function(e,t){return W.get(e,t)},this.getDataAtCol=function(e){const t=[],o=W.getRange(V._createCellCoords(0,e),V._createCellCoords(q.data.length-1,e),W.DESTINATION_RENDERER);for(let e=0;e<o.length;e+=1)for(let s=0;s<o[e].length;s+=1)t.push(o[e][s]);return t},this.getDataAtProp=function(e){const t=[],o=W.getRange(V._createCellCoords(0,W.propToCol(e)),V._createCellCoords(q.data.length-1,W.propToCol(e)),W.DESTINATION_RENDERER);for(let e=0;e<o.length;e+=1)for(let s=0;s<o[e].length;s+=1)t.push(o[e][s]);return t},this.getSourceData=function(e,t,o,s){let n;return n=void 0===e?B.getData():B.getByRange(V._createCellCoords(e,t),V._createCellCoords(o,s)),n},this.getSourceDataArray=function(e,t,o,s){let n;return n=void 0===e?B.getData(!0):B.getByRange(V._createCellCoords(e,t),V._createCellCoords(o,s),!0),n},this.getSourceDataAtCol=function(e){return B.getAtColumn(e)},this.setSourceDataAtCell=function(e,t,o,s){const n=le(e,t,o),i=this.hasHook("afterSetSourceDataAtCell"),l=[];i&&(0,d.arrayEach)(n,(e=>{let[t,o,s]=e;l.push([t,o,B.getAtCell(t,o),s])})),(0,d.arrayEach)(n,(e=>{let[t,o,s]=e;B.setAtCell(t,o,s)})),i&&this.runHooks("afterSetSourceDataAtCell",l,s),this.render();const a=V.getActiveEditor();a&&(0,r.isDefined)(a.refreshValue)&&a.refreshValue()},this.getSourceDataAtRow=function(e){return B.getAtRow(e)},this.getSourceDataAtCell=function(e,t){return B.getAtCell(e,t)},this.getDataAtRow=function(e){return W.getRange(V._createCellCoords(e,0),V._createCellCoords(e,this.countCols()-1),W.DESTINATION_RENDERER)[0]||[]},this.getDataType=function(e,t,o,s){const n=void 0===e?[0,0,this.countRows(),this.countCols()]:[e,t,o,s],[i,r]=n;let[,,l,a]=n,h=null,c=null;void 0===l&&(l=i),void 0===a&&(a=r);let u="mixed";return(0,v.rangeEach)(Math.max(Math.min(i,l),0),Math.max(i,l),(e=>{let t=!0;return(0,v.rangeEach)(Math.max(Math.min(r,a),0),Math.max(r,a),(o=>{const s=this.getCellMeta(e,o);return c=s.type,h?t=h===c:h=c,t})),u=t?c:"mixed",t})),u},this.removeCellMeta=function(e,t,o){const[s,n]=[this.toPhysicalRow(e),this.toPhysicalColumn(t)];let i=X.getCellMetaKeyValue(s,n,o);!1!==V.runHooks("beforeRemoveCellMeta",e,t,o,i)&&(X.removeCellMeta(s,n,o),V.runHooks("afterRemoveCellMeta",e,t,o,i)),i=null},this.spliceCellsMeta=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(var o=arguments.length,s=new Array(o>2?o-2:0),n=2;n<o;n++)s[n-2]=arguments[n];if(s.length>0&&!Array.isArray(s[0]))throw new Error("The 3rd argument (cellMetaRows) has to be passed as an array of cell meta objects array.");t>0&&X.removeRow(this.toPhysicalRow(e),t),s.length>0&&(0,d.arrayEach)(s.reverse(),(t=>{X.createRow(this.toPhysicalRow(e)),(0,d.arrayEach)(t,((t,o)=>this.setCellMetaObject(e,o,t)))})),V.render()},this.setCellMetaObject=function(e,t,o){"object"==typeof o&&(0,c.objectEach)(o,((o,s)=>{this.setCellMeta(e,t,s,o)}))},this.setCellMeta=function(e,t,o,s){if(!1===V.runHooks("beforeSetCellMeta",e,t,o,s))return;let n=e,i=t;e<this.countRows()&&(n=this.toPhysicalRow(e)),t<this.countCols()&&(i=this.toPhysicalColumn(t)),X.setCellMeta(n,i,o,s),V.runHooks("afterSetCellMeta",e,t,o,s)},this.getCellsMeta=function(){return X.getCellsMeta()},this.getCellMeta=function(e,t){let o=this.toPhysicalRow(e),s=this.toPhysicalColumn(t);return null===o&&(o=e),null===s&&(s=t),X.getCellMeta(o,s,{visualRow:e,visualColumn:t})},this.getColumnMeta=function(e){return X.getColumnMeta(this.toPhysicalColumn(e))},this.getCellMetaAtRow=function(e){return X.getCellsMetaAtRow(e)},this.isColumnModificationAllowed=function(){return!("object"===V.dataType||q.columns)},this.getCellRenderer=function(e,t){const o="number"==typeof e?V.getCellMeta(e,t).renderer:e.renderer;return"string"==typeof o?(0,p.getRenderer)(o):(0,r.isUndefined)(o)?(0,p.getRenderer)("text"):o},this.getCellEditor=function(e,t){const o="number"==typeof e?V.getCellMeta(e,t).editor:e.editor;return"string"==typeof o?(0,m.getEditor)(o):(0,r.isUndefined)(o)?(0,m.getEditor)("text"):o},this.getCellValidator=function(e,t){const o="number"==typeof e?V.getCellMeta(e,t).validator:e.validator;return"string"==typeof o?(0,w.getValidator)(o):o},this.validateCells=function(e){this._validateCells(e)},this.validateRows=function(e,t){if(!Array.isArray(e))throw new Error("validateRows parameter `rows` must be an array");this._validateCells(t,e)},this.validateColumns=function(e,t){if(!Array.isArray(e))throw new Error("validateColumns parameter `columns` must be an array");this._validateCells(t,void 0,e)},this._validateCells=function(e,t,o){const s=new se;e&&(s.onQueueEmpty=e);let n=V.countRows()-1;for(;n>=0;){if(void 0!==t&&-1===t.indexOf(n)){n-=1;continue}let e=V.countCols()-1;for(;e>=0;)void 0===o||-1!==o.indexOf(e)?(s.addValidatorToQueue(),V.validateCell(V.getDataAtCell(n,e),V.getCellMeta(n,e),(e=>{if("boolean"!=typeof e)throw new Error("Validation error: result is not boolean");!1===e&&(s.valid=!1),s.removeValidatorFormQueue()}),"validateCells"),e-=1):e-=1;n-=1}s.checkIfQueueIsEmpty()},this.getRowHeader=function(e){let t=q.rowHeaders,o=e;return void 0!==o&&(o=V.runHooks("modifyRowHeader",o)),void 0===o?(t=[],(0,v.rangeEach)(V.countRows()-1,(e=>{t.push(V.getRowHeader(e))}))):Array.isArray(t)&&void 0!==t[o]?t=t[o]:(0,i.isFunction)(t)?t=t(o):t&&"string"!=typeof t&&"number"!=typeof t&&(t=o+1),t},this.hasRowHeaders=function(){return!!q.rowHeaders},this.hasColHeaders=function(){if(void 0!==q.colHeaders&&null!==q.colHeaders)return!!q.colHeaders;for(let e=0,t=V.countCols();e<t;e++)if(V.getColHeader(e))return!0;return!1},this.getColHeader=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;const o=V.runHooks("modifyColHeader",e);if(void 0===o){const e=[],t=V.countCols();for(let o=0;o<t;o++)e.push(V.getColHeader(o));return e}let s=q.colHeaders;const n=V.toPhysicalColumn(o),r=function(e){const t=[],o=V.countCols();let s=0;for(;s<o;s++)(0,i.isFunction)(q.columns)&&q.columns(s)&&t.push(s);return t[e]}(n);return!1===q.colHeaders?s=null:q.columns&&(0,i.isFunction)(q.columns)&&q.columns(r)&&q.columns(r).title?s=q.columns(r).title:q.columns&&q.columns[n]&&q.columns[n].title?s=q.columns[n].title:Array.isArray(q.colHeaders)&&void 0!==q.colHeaders[n]?s=q.colHeaders[n]:(0,i.isFunction)(q.colHeaders)?s=q.colHeaders(n):q.colHeaders&&"string"!=typeof q.colHeaders&&"number"!=typeof q.colHeaders&&(s=(0,S.spreadsheetColumnLabel)(o)),s=V.runHooks("modifyColumnHeaderValue",s,e,t),s},this._getColWidthFromSettings=function(e){let t;if(e>=0){t=V.getCellMeta(0,e).width}if(void 0!==t&&t!==q.width||(t=q.colWidths),null!=t){switch(typeof t){case"object":t=t[e];break;case"function":t=t(e)}"string"==typeof t&&(t=parseInt(t,10))}return t},this.getColWidth=function(e){let t=V._getColWidthFromSettings(e);return t=V.runHooks("modifyColWidth",t,e),void 0===t&&(t=_.DEFAULT_COLUMN_WIDTH),t},this._getRowHeightFromSettings=function(e){let t=q.rowHeights;if(null!=t){switch(typeof t){case"object":t=t[e];break;case"function":t=t(e)}"string"==typeof t&&(t=parseInt(t,10))}return t},this.getRowHeight=function(e){let t=V._getRowHeightFromSettings(e);return t=V.runHooks("modifyRowHeight",t,e),t},this.countSourceRows=function(){return B.countRows()},this.countSourceCols=function(){return B.countFirstRowKeys()},this.countRows=function(){return W.getLength()},this.countCols=function(){const e=q.maxCols,t=this.columnIndexMapper.getNotTrimmedIndexesLength();return Math.min(e,t)},this.countRenderedRows=function(){return V.view._wt.drawn?V.view._wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return V.view._wt.drawn?V.view._wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return V.view._wt.drawn?V.view._wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return V.view._wt.drawn?V.view._wt.wtTable.getVisibleColumnsCount():-1},this.countRowHeaders=function(){return this.view.getRowHeadersCount()},this.countColHeaders=function(){return this.view.getColumnHeadersCount()},this.countEmptyRows=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return(0,v.rangeEachReverse)(V.countRows()-1,(o=>{if(V.isEmptyRow(o))t+=1;else if(!0===e)return!1})),t},this.countEmptyCols=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return(0,v.rangeEachReverse)(V.countCols()-1,(o=>{if(V.isEmptyCol(o))t+=1;else if(!0===e)return!1})),t},this.isEmptyRow=function(e){return q.isEmptyRow.call(V,e)},this.isEmptyCol=function(e){return q.isEmptyCol.call(V,e)},this.selectCell=function(e,t,o,s){let n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];return!(0,r.isUndefined)(e)&&!(0,r.isUndefined)(t)&&this.selectCells([[e,t,o,s]],n,i)},this.selectCells=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[[]],t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];!1===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&z.suspend();const o=Z.selectCells(e);return o&&t&&V.listen(),z.resume(),o},this.selectColumns=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,o=arguments.length>2?arguments[2]:void 0;return Z.selectColumns(e,t,o)},this.selectRows=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,o=arguments.length>2?arguments[2]:void 0;return Z.selectRows(e,t,o)},this.deselectCell=function(){Z.deselect()},this.selectAll=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,o=arguments.length>2?arguments[2]:void 0;z.skipNextScrollCycle(),Z.selectAll(e,t,o)};const he=(e,t)=>e.getNearestNotHiddenIndex(t,1,!0);this.scrollViewportTo=function(e){var t,o;"number"==typeof e&&(e={row:arguments[0],col:arguments[1],verticalSnap:arguments[2]?"bottom":"top",horizontalSnap:arguments[3]?"end":"start",considerHiddenIndexes:null===(o=arguments[4])||void 0===o||o});const{row:s,col:n,verticalSnap:i,horizontalSnap:r,considerHiddenIndexes:l}=null!==(t=e)&&void 0!==t?t:{};let a,h,c,u;void 0!==i&&(a="top"===i,h=!a),void 0!==r&&(c="start"===r,u=!c);let d=s,g=n;if(void 0===l||l){const e=Number.isInteger(s)&&s>=0,t=Number.isInteger(n)&&n>=0,o=e?he(this.rowIndexMapper,s):void 0,i=t?he(this.columnIndexMapper,n):void 0;if(null===o||null===i)return!1;d=e?V.rowIndexMapper.getRenderableFromVisualIndex(o):s,g=t?V.columnIndexMapper.getRenderableFromVisualIndex(i):n}const f=Number.isInteger(d),p=Number.isInteger(g);return f&&d>=0&&p&&g>=0?V.view.scrollViewport(V._createCellCoords(d,g),a,u,h,c):f&&d>=0&&(p&&g<0||!p)?V.view.scrollViewportVertically(d,a,h):!!(p&&g>=0&&(f&&d<0||!f))&&V.view.scrollViewportHorizontally(g,u,c)},this.scrollToFocusedCell=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:()=>{};if(!this.selection.isSelected())return;this.addHookOnce("afterScroll",e);const{highlight:t}=this.getSelectedRangeLast();this.scrollViewportTo(t.toObject())?this.view.render():(this.removeHook("afterScroll",e),this._registerImmediate((()=>e())))},this.destroy=function(){if(V._clearTimeouts(),V._clearImmediates(),V.view&&V.view.destroy(),B&&B.destroy(),B=null,this.getShortcutManager().destroy(),X.clearCache(),k.delete(this.guid),(0,b.isRootInstance)(V)){const e=this.rootDocument.querySelector(".hot-display-license-info");e&&e.parentNode.removeChild(e)}(0,n.empty)(V.rootElement),F.destroy(),j&&j.destroy(),V.batchExecution((()=>{V.rowIndexMapper.unregisterAll(),V.columnIndexMapper.unregisterAll(),J.getItems().forEach((e=>{let[,t]=e;t.destroy()})),J.clear(),V.runHooks("afterDestroy")}),!0),T.default.getSingleton().destroy(V),(0,c.objectEach)(V,((e,t,o)=>{var s;(0,i.isFunction)(e)?o[t]=(s=t,()=>{throw new Error(`The "${s}" method cannot be called because this Handsontable instance has been destroyed`)}):"guid"!==t&&(o[t]=null)})),V.isDestroyed=!0,W&&W.destroy(),W=null,U=null,Z=null,j=null,V=null},this.getActiveEditor=function(){return j.getActiveEditor()},this.getFirstRenderedVisibleRow=function(){return V.view.getFirstRenderedVisibleRow()},this.getLastRenderedVisibleRow=function(){return V.view.getLastRenderedVisibleRow()},this.getFirstRenderedVisibleColumn=function(){return V.view.getFirstRenderedVisibleColumn()},this.getLastRenderedVisibleColumn=function(){return V.view.getLastRenderedVisibleColumn()},this.getFirstFullyVisibleRow=function(){return V.view.getFirstFullyVisibleRow()},this.getLastFullyVisibleRow=function(){return V.view.getLastFullyVisibleRow()},this.getFirstFullyVisibleColumn=function(){return V.view.getFirstFullyVisibleColumn()},this.getLastFullyVisibleColumn=function(){return V.view.getLastFullyVisibleColumn()},this.getFirstPartiallyVisibleRow=function(){return V.view.getFirstPartiallyVisibleRow()},this.getLastPartiallyVisibleRow=function(){return V.view.getLastPartiallyVisibleRow()},this.getFirstPartiallyVisibleColumn=function(){return V.view.getFirstPartiallyVisibleColumn()},this.getLastPartiallyVisibleColumn=function(){return V.view.getLastPartiallyVisibleColumn()},this.getPlugin=function(e){const t=(0,C.toUpperCaseFirst)(e);return"UndoRedo"===t?this.undoRedo:J.getItem(t)},this.getPluginName=function(e){return e===this.undoRedo?this.undoRedo.constructor.PLUGIN_KEY:J.getId(e)},this.getInstance=function(){return V},this.addHook=function(e,t,o){T.default.getSingleton().add(e,t,V,o)},this.hasHook=function(e){return T.default.getSingleton().has(e,V)||T.default.getSingleton().has(e)},this.addHookOnce=function(e,t,o){T.default.getSingleton().once(e,t,V,o)},this.removeHook=function(e,t){T.default.getSingleton().remove(e,t,V)},this.runHooks=function(e,t,o,s,n,i,r){return T.default.getSingleton().run(V,e,t,o,s,n,i,r)},this.getTranslatedPhrase=function(e,t){return(0,M.getTranslatedPhrase)(q.language,e,t)},this.toHTML=()=>(0,g.instanceToHTML)(this),this.toTableElement=()=>{const e=this.rootDocument.createElement("div");return e.insertAdjacentHTML("afterbegin",(0,g.instanceToHTML)(this)),e.firstElementChild},this.timeouts=[],this._registerTimeout=function(e){let t=e;"function"==typeof t&&(t=setTimeout(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)),this.timeouts.push(t)},this._clearTimeouts=function(){(0,d.arrayEach)(this.timeouts,(e=>{clearTimeout(e)}))},this.immediates=[],this._registerImmediate=function(e){this.immediates.push(setImmediate(e))},this._clearImmediates=function(){(0,d.arrayEach)(this.immediates,(e=>{clearImmediate(e)}))},this._getEditorManager=function(){return j},this.isRtl=function(){return"rtl"===V.rootWindow.getComputedStyle(V.rootElement).direction},this.isLtr=function(){return!V.isRtl()},this.getDirectionFactor=function(){return V.isLtr()?1:-1};const ce=(0,x.createShortcutManager)({handleEvent:()=>V.isListening(),beforeKeyDown:e=>this.runHooks("beforeKeyDown",e),afterKeyDown:e=>{this.isDestroyed||V.runHooks("afterDocumentKeyDown",e)},ownerWindow:this.rootWindow});this.addHook("beforeOnCellMouseDown",(e=>{!1===e.ctrlKey&&!1===e.metaKey&&ce.releasePressedKeys()})),this.getShortcutManager=function(){return ce},this.getFocusManager=function(){return Y},(0,f.getPluginsNames)().forEach((e=>{const t=(0,f.getPlugin)(e);J.addItem(e,new t(this))})),(0,H.registerAllShortcutContexts)(V),ce.setActiveContextName("grid"),T.default.getSingleton().run(V,"construct")},o(67834),o(15724),o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371),o(71766);var n=o(9893),i=o(78832),r=o(38893),l=o(28890),a=s(o(18344)),h=s(o(82629)),c=o(13911),u=o(26505),d=o(9175),g=o(74737),f=o(90532),p=o(44288),m=o(84558),w=o(51255),C=o(59777),v=o(87485),y=s(o(66801)),E=s(o(12248)),S=o(56216),R=o(93969),b=o(11015),_=o(90),T=s(o(56937)),M=o(74174),O=o(75032),I=o(73497),N=o(71757),A=o(48246),P=o(84134),x=o(57660),H=o(37947);let D=null;const k=new Map;new Set},63745:(e,t,o)=>{"use strict";t.__esModule=!0,t.installFocusDetector=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=e.rootElement,s=i(e),n=i(e);return s.addEventListener("focus",(()=>null==t?void 0:t.onFocusFromTop())),n.addEventListener("focus",(()=>null==t?void 0:t.onFocusFromBottom())),o.firstChild.before(s),o.lastChild.after(n),{activate(){e._registerTimeout((()=>{s.tabIndex=0,n.tabIndex=0}),10)},deactivate(){e._registerTimeout((()=>{s.tabIndex=-1,n.tabIndex=-1}),10)}}};var s=o(9893),n=o(92692);function i(e){const t=e.rootDocument.createElement("input");return t.type="text",t.classList.add("htFocusCatcher"),e.getSettings().ariaTags&&(0,s.setAttribute)(t,[(0,n.A11Y_PRESENTATION)(),(0,n.A11Y_HIDDEN)()]),t}},71563:(e,t,o)=>{"use strict";t.__esModule=!0,t.installFocusCatcher=function(e){const t=function(e){return t=>{if(!t)return null;const o=i(e),s=r(e);return t.col<o.col&&(t.col=o.col),t.col>s.col&&(t.col=s.col),t.row<o.row&&(t.row=o.row),t.row>s.row&&(t.row=s.row),t}}(e);let o;const{activate:l,deactivate:a}=(0,n.installFocusDetector)(e,{onFocusFromTop(){var s;const n=null!==(s=t(o))&&void 0!==s?s:i(e);n&&(e.runHooks("modifyFocusOnTabNavigation","from_above",n),e.selectCell(n.row,n.col)),e.listen()},onFocusFromBottom(){var s;const n=null!==(s=t(o))&&void 0!==s?s:r(e);n&&(e.runHooks("modifyFocusOnTabNavigation","from_below",n),e.selectCell(n.row,n.col)),e.listen()}}),h={wrapped:!1,flipped:!1};let c=!0,u=!1,d=!1;e.addHook("afterListen",(()=>a())),e.addHook("afterUnlisten",(()=>l())),e.addHook("afterSelection",((t,s,n,i,r)=>{var l;(u&&(h.wrapped&&h.flipped||d)&&(d=!1,r.value=!0),c)&&(o=null===(l=e.getSelectedRangeLast())||void 0===l?void 0:l.highlight)})),e.addHook("beforeRowWrap",((e,t,o)=>{h.wrapped=!0,h.flipped=o}));const g={keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:s.GRID_GROUP,group:"focusCatcher"};e.getShortcutManager().getContext("grid").addShortcuts([{...g,callback:()=>{const{tabNavigation:t}=e.getSettings();u=!0,e.getSelectedRangeLast()&&!t&&(c=!1),t||(d=!0)},position:"before"},{...g,callback:t=>{const{tabNavigation:s,autoWrapRow:n}=e.getSettings();if(u=!1,c=!0,!s||!e.selection.isSelected()||n&&h.wrapped&&h.flipped||!n&&h.wrapped)return n&&h.wrapped&&h.flipped&&(o=t.shiftKey?i(e):r(e)),h.wrapped=!1,h.flipped=!1,e.deselectCell(),e.unlisten(),!1;t.preventDefault()},position:"after"}])};var s=o(37947),n=o(63745);function i(e){const{rowIndexMapper:t,columnIndexMapper:o}=e,{navigableHeaders:s}=e.getSettings();let n=s&&e.countColHeaders()>0?-e.countColHeaders():0,i=s&&e.countRowHeaders()>0?-e.countRowHeaders():0;return 0===n&&(n=t.getVisualFromRenderableIndex(n)),0===i&&(i=o.getVisualFromRenderableIndex(i)),null===n||null===i?null:e._createCellCoords(n,i)}function r(e){var t,o;const{rowIndexMapper:s,columnIndexMapper:n}=e,{navigableHeaders:i}=e.getSettings();let r=s.getRenderableIndexesLength()-1,l=n.getRenderableIndexesLength()-1;if(r<0){if(!i||0===e.countColHeaders())return null;r=-1}if(l<0){if(!i||0===e.countColHeaders())return null;l=-1}return e._createCellCoords(null!==(t=s.getVisualFromRenderableIndex(r))&&void 0!==t?t:r,null!==(o=n.getVisualFromRenderableIndex(l))&&void 0!==o?o:l)}},48246:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(71563);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||(t[e]=s[e]))}));var n=o(44428);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||(t[e]=n[e]))}))},44428:(e,t,o)=>{"use strict";t.__esModule=!0,t.createViewportScroller=function(e){const{selection:t}=e;let o=!1,c=!1;return{resume(){c=!1},suspend(){c=!0},skipNextScrollCycle(){o=!0},scrollTo(u){var d;if(o||c)return void(o=!1);let g;t.isFocusSelectionChanged()?g=(0,i.focusScrollStrategy)(e):t.isSelectedByCorner()?g=(0,n.cornerHeaderScrollStrategy)(e):t.isSelectedByRowHeader()?g=(0,a.rowHeaderScrollStrategy)(e):t.isSelectedByColumnHeader()?g=(0,s.columnHeaderScrollStrategy)(e):1===t.getSelectedRange().size()&&t.isMultiple()?g=(0,r.multipleScrollStrategy)(e):1!==t.getSelectedRange().size()||t.isMultiple()?t.getSelectedRange().size()>1&&(g=(0,l.noncontiguousScrollStrategy)(e)):g=(0,h.singleScrollStrategy)(e),null===(d=g)||void 0===d||d(u)}}};var s=o(9635),n=o(5696),i=o(88948),r=o(29980),l=o(3011),a=o(44745),h=o(8248)},9635:(e,t)=>{"use strict";t.__esModule=!0,t.columnHeaderScrollStrategy=function(e){return t=>{let{col:o}=t;e.scrollViewportTo({col:o})}}},5696:(e,t)=>{"use strict";t.__esModule=!0,t.cornerHeaderScrollStrategy=function(){return()=>{}}},88948:(e,t)=>{"use strict";t.__esModule=!0,t.focusScrollStrategy=function(e){return t=>{e.scrollViewportTo(t.toObject())}}},29980:(e,t)=>{"use strict";t.__esModule=!0,t.multipleScrollStrategy=function(e){return t=>{e.scrollViewportTo(t.toObject())}}},3011:(e,t)=>{"use strict";t.__esModule=!0,t.noncontiguousScrollStrategy=function(e){return t=>{e.scrollViewportTo(t.toObject())}}},44745:(e,t)=>{"use strict";t.__esModule=!0,t.rowHeaderScrollStrategy=function(e){return t=>{let{row:o}=t;e.scrollViewportTo({row:o})}}},8248:(e,t)=>{"use strict";t.__esModule=!0,t.singleScrollStrategy=function(e){return t=>{const o=e.selection.getSelectionSource(),{row:s,col:n}=t;if(s<0&&n>=0)e.scrollViewportTo({col:n});else if(n<0&&s>=0)e.scrollViewportTo({row:s});else{if("mouse"===o&&(n===e.view.getLastPartiallyVisibleColumn()||s===e.view.getLastPartiallyVisibleRow()))return;e.scrollViewportTo({row:s,col:n})}}}},87727:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(55518),r=o(56216),l=o(13911),a=o(9175),h=o(87485),c=o(38893);class u{static get DESTINATION_RENDERER(){return 1}static get DESTINATION_CLIPBOARD_GENERATOR(){return 2}constructor(e,t,o){(0,n.default)(this,"hot",void 0),(0,n.default)(this,"metaManager",void 0),(0,n.default)(this,"tableMeta",void 0),(0,n.default)(this,"dataSource",void 0),(0,n.default)(this,"duckSchema",void 0),(0,n.default)(this,"colToPropCache",void 0),(0,n.default)(this,"propToColCache",void 0),this.hot=e,this.metaManager=o,this.tableMeta=o.getTableMeta(),this.dataSource=t,this.duckSchema=this.createDuckSchema(),this.createMap()}createMap(){const e=this.getSchema();if(void 0===e)throw new Error("trying to create `columns` definition but you didn't provide `schema` nor `data`");const t=this.tableMeta.columns;let o;if(this.colToPropCache=[],this.propToColCache=new Map,t){let s=0,n=0,i=!1;if("function"==typeof t){const t=(0,l.deepObjectSize)(e);s=t>0?t:this.countFirstRowKeys(),i=!0}else{const e=this.tableMeta.maxCols;s=Math.min(e,t.length)}for(o=0;o<s;o++){const e=i?t(o):t[o];if((0,l.isObject)(e)){if(void 0!==e.data){const t=i?n:o;this.colToPropCache[t]=e.data,this.propToColCache.set(e.data,t)}n+=1}}}else this.recursiveDuckColumns(e)}countFirstRowKeys(){return(0,r.countFirstRowKeys)(this.dataSource)}recursiveDuckColumns(e,t,o){let s,n=t,i=o;return void 0===n&&(n=0,i=""),"object"!=typeof e||Array.isArray(e)||(0,l.objectEach)(e,((e,t)=>{null===e?(s=i+t,this.colToPropCache.push(s),this.propToColCache.set(s,n),n+=1):n=this.recursiveDuckColumns(e,n,`${t}.`)})),n}colToProp(e){if(!1===Number.isInteger(e))return e;const t=this.hot.toPhysicalColumn(e);return null===t?e:this.colToPropCache&&(0,c.isDefined)(this.colToPropCache[t])?this.colToPropCache[t]:t}propToCol(e){const t=this.propToColCache.get(e);if((0,c.isDefined)(t))return this.hot.toVisualColumn(t);const o=this.hot.toVisualColumn(e);return null===o?e:o}getSchema(){const e=this.tableMeta.dataSchema;return e?"function"==typeof e?e():e:this.duckSchema}createDuckSchema(){return this.dataSource&&this.dataSource[0]?(0,l.duckSchema)(this.dataSource[0]):{}}refreshDuckSchema(){this.duckSchema=this.createDuckSchema()}createRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{source:o,mode:s="above"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=this.hot.countSourceRows();let i=n,r=0,a=e;("number"!=typeof a||a>=n)&&(a=n),a<this.hot.countRows()&&(i=this.hot.toPhysicalRow(a));if(!1===this.hot.runHooks("beforeCreateRow",a,t,o)||null===i)return{delta:0};const c=this.tableMeta.maxRows,u=this.getSchema().length,d=[];for(;r<t&&n+r<c;){let e=null;"array"===this.hot.dataType?this.tableMeta.dataSchema?e=(0,l.deepClone)(this.getSchema()):(e=[],(0,h.rangeEach)(u-1,(()=>e.push(null)))):"function"===this.hot.dataType?e=this.tableMeta.dataSchema(a+r):(e={},(0,l.deepExtend)(e,this.getSchema())),d.push(e),r+=1}this.hot.rowIndexMapper.insertIndexes(a,r),"below"===s&&(i=Math.min(i+1,n)),this.spliceData(i,0,d);const g=this.hot.toVisualRow(i);return this.hot.countSourceRows()===d.length&&this.hot.columnIndexMapper.initToLength(this.hot.getInitialColumnCount()),r>0&&(null==e?this.metaManager.createRow(null,r):"auto"!==o&&this.metaManager.createRow(i,t)),this.hot.runHooks("afterCreateRow",g,r,o),this.hot.forceFullRender=!0,{delta:r,startPhysicalIndex:i}}createCol(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{source:o,mode:s="start"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!this.hot.isColumnModificationAllowed())throw new Error("Cannot create new column. When data source in an object, you can only have as much columns as defined in first data row, data schema or in the 'columns' setting.If you want to be able to add new columns, you have to use array datasource.");const n=this.dataSource,i=this.tableMeta.maxCols,r=this.hot.countSourceCols();let l=e;("number"!=typeof l||l>=r)&&(l=r);if(!1===this.hot.runHooks("beforeCreateCol",l,t,o))return{delta:0};let a=r;l<this.hot.countCols()&&(a=this.hot.toPhysicalColumn(l));const h=this.hot.countSourceRows();let c=this.hot.countCols(),u=0,d=a;"end"===s&&(d=Math.min(d+1,r));const g=d;for(;u<t&&c<i;){if("number"!=typeof l||l>=c)if(h>0)for(let e=0;e<h;e+=1)void 0===n[e]&&(n[e]=[]),n[e].push(null);else n.push([null]);else for(let e=0;e<h;e++)n[e].splice(d,0,null);u+=1,d+=1,c+=1}this.hot.columnIndexMapper.insertIndexes(l,u),u>0&&(null==e?this.metaManager.createColumn(null,u):"auto"!==o&&this.metaManager.createColumn(g,t));const f=this.hot.toVisualColumn(g);return this.hot.runHooks("afterCreateCol",f,u,o),this.hot.forceFullRender=!0,this.refreshDuckSchema(),{delta:u,startPhysicalIndex:g}}removeRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2?arguments[2]:void 0,s=Number.isInteger(e)?e:-t;const n=this.visualRowsToPhysical(s,t),i=this.hot.countSourceRows();s=(i+s)%i;if(!1===this.hot.runHooks("beforeRemoveRow",s,n.length,n,o))return!1;const r=n.length;if(this.filterData(s,r,n),s<this.hot.countRows()){this.hot.rowIndexMapper.removeIndexes(n);const e=(0,c.isDefined)(this.tableMeta.columns)||(0,c.isDefined)(this.tableMeta.dataSchema);0===this.hot.rowIndexMapper.getNotTrimmedIndexesLength()&&!1===e&&this.hot.columnIndexMapper.setIndexesSequence([])}return n.slice(0).sort(((e,t)=>t-e)).forEach((e=>{this.metaManager.removeRow(e,1)})),this.hot.runHooks("afterRemoveRow",s,r,n,o),this.hot.forceFullRender=!0,!0}removeCol(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2?arguments[2]:void 0;if("object"===this.hot.dataType||this.tableMeta.columns)throw new Error("cannot remove column with object data source or columns option specified");let s="number"!=typeof e?-t:e;s=(this.hot.countCols()+s)%this.hot.countCols();const n=this.visualColumnsToPhysical(s,t),i=n.slice(0).sort(((e,t)=>t-e));if(!1===this.hot.runHooks("beforeRemoveCol",s,t,n,o))return!1;let r=!0;const l=i.length,a=this.dataSource;for(let e=0;e<l;e++)r&&n[0]!==n[e]-e&&(r=!1);if(r)for(let e=0,o=this.hot.countSourceRows();e<o;e++)a[e].splice(n[0],t),0===e&&this.metaManager.removeColumn(n[0],t);else for(let e=0,t=this.hot.countSourceRows();e<t;e++)for(let t=0;t<l;t++)a[e].splice(i[t],1),0===e&&this.metaManager.removeColumn(i[t],1);return s<this.hot.countCols()&&(this.hot.columnIndexMapper.removeIndexes(n),0===this.hot.columnIndexMapper.getNotTrimmedIndexesLength()&&this.hot.rowIndexMapper.setIndexesSequence([])),this.hot.runHooks("afterRemoveCol",s,t,n,o),this.hot.forceFullRender=!0,this.refreshDuckSchema(),!0}spliceCol(e,t,o){const s=this.hot.getDataAtCol(e),n=s.slice(t,t+o),i=s.slice(t+o);for(var r=arguments.length,l=new Array(r>3?r-3:0),h=3;h<r;h++)l[h-3]=arguments[h];(0,a.extendArray)(l,i);let c=0;for(;c<o;)l.push(null),c+=1;return(0,a.to2dArray)(l),this.hot.populateFromArray(t,e,l,null,null,"spliceCol"),n}spliceRow(e,t,o){const s=this.hot.getSourceDataAtRow(e),n=s.slice(t,t+o),i=s.slice(t+o);for(var r=arguments.length,l=new Array(r>3?r-3:0),h=3;h<r;h++)l[h-3]=arguments[h];(0,a.extendArray)(l,i);let c=0;for(;c<o;)l.push(null),c+=1;return this.hot.populateFromArray(e,t,[l],null,null,"spliceRow"),n}spliceData(e,t,o){if(!1!==this.hot.runHooks("beforeDataSplice",e,t,o)){const t=[...this.dataSource.slice(0,e),...o,...this.dataSource.slice(e)];this.dataSource.length=0,t.forEach((e=>this.dataSource.push(e)))}}filterData(e,t,o){let s=this.hot.runHooks("filterData",e,t,o);!1===Array.isArray(s)&&(s=this.dataSource.filter(((e,t)=>-1===o.indexOf(t)))),this.dataSource.length=0,Array.prototype.push.apply(this.dataSource,s)}get(e,t){const o=this.hot.toPhysicalRow(e);let s=this.dataSource[o];const n=this.hot.runHooks("modifyRowData",o);s=isNaN(n)?n:s;const{dataDotNotation:i}=this.hot.getSettings();let r=null;if(s&&s.hasOwnProperty&&(0,l.hasOwnProperty)(s,t))r=s[t];else if(i&&"string"==typeof t&&t.indexOf(".")>-1){let e=s;if(!e)return null;const o=t.split(".");for(let t=0,s=o.length;t<s;t++)if(e=e[o[t]],void 0===e)return null;r=e}else"function"==typeof t&&(r=t(this.dataSource.slice(o,o+1)[0]));if(this.hot.hasHook("modifyData")){const e=(0,l.createObjectPropListener)(r);this.hot.runHooks("modifyData",o,this.propToCol(t),e,"get"),e.isTouched()&&(r=e.value)}return r}getCopyable(e,t){return this.hot.getCellMeta(e,this.propToCol(t)).copyable?this.get(e,t):""}set(e,t,o){const s=this.hot.toPhysicalRow(e);let n=o,i=this.dataSource[s];const r=this.hot.runHooks("modifyRowData",s);if(i=isNaN(r)?r:i,this.hot.hasHook("modifyData")){const e=(0,l.createObjectPropListener)(n);this.hot.runHooks("modifyData",s,this.propToCol(t),e,"set"),e.isTouched()&&(n=e.value)}const{dataDotNotation:a}=this.hot.getSettings();if(i&&i.hasOwnProperty&&(0,l.hasOwnProperty)(i,t))i[t]=n;else if(a&&"string"==typeof t&&t.indexOf(".")>-1){let e,o=i,s=0;const r=t.split(".");for(s=0,e=r.length-1;s<e;s++)void 0===o[r[s]]&&(o[r[s]]={}),o=o[r[s]];o[r[s]]=n}else"function"==typeof t?t(this.dataSource.slice(s,s+1)[0],n):i[t]=n}visualRowsToPhysical(e,t){const o=this.hot.countSourceRows(),s=[];let n,i=(o+e)%o,r=t;for(;i<o&&r;)n=this.hot.toPhysicalRow(i),s.push(n),r-=1,i+=1;return s}visualColumnsToPhysical(e,t){const o=this.hot.countCols(),s=[];let n=(o+e)%o,i=t;for(;n<o&&i;){const e=this.hot.toPhysicalColumn(n);s.push(e),i-=1,n+=1}return s}clear(){for(let e=0;e<this.hot.countSourceRows();e++)for(let t=0;t<this.hot.countCols();t++)this.set(e,this.colToProp(t),"")}getLength(){const e=this.tableMeta.maxRows;let t;t=e<0||0===e?0:e||1/0;const o=this.hot.rowIndexMapper.getNotTrimmedIndexesLength();return Math.min(o,t)}getAll(){const e={row:0,col:0},t={row:Math.max(this.hot.countRows()-1,0),col:Math.max(this.hot.countCols()-1,0)};return e.row-t.row!=0||this.hot.countSourceRows()?this.getRange(e,t,u.DESTINATION_RENDERER):[]}countCachedColumns(){return this.colToPropCache.length}getRange(e,t,o){const s=[];let n,i,r;const l=this.tableMeta.maxRows,a=this.tableMeta.maxCols;if(0===l||0===a)return[];const h=o===u.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get,c=Math.min(Math.max(l-1,0),Math.max(e.row,t.row)),d=Math.min(Math.max(a-1,0),Math.max(e.col,t.col));for(n=Math.min(e.row,t.row);n<=c;n++){r=[];const o=n>=0?this.hot.toPhysicalRow(n):n;for(i=Math.min(e.col,t.col);i<=d&&null!==o;i++)r.push(h.call(this,n,this.colToProp(i)));null!==o&&s.push(r)}return s}getText(e,t){return(0,i.stringify)(this.getRange(e,t,u.DESTINATION_RENDERER))}getCopyableText(e,t){return(0,i.stringify)(this.getRange(e,t,u.DESTINATION_CLIPBOARD_GENERATOR))}destroy(){this.hot=null,this.metaManager=null,this.dataSource=null,this.duckSchema=null,this.colToPropCache.length=0,this.propToColCache.clear(),this.propToColCache=void 0}}t.default=u},12248:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(15724);var n=s(o(85707)),i=o(13911),r=o(56216),l=o(9175),a=o(87485),h=o(78832);t.default=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];(0,n.default)(this,"hot",void 0),(0,n.default)(this,"data",void 0),(0,n.default)(this,"dataType","array"),(0,n.default)(this,"colToProp",(()=>{})),(0,n.default)(this,"propToCol",(()=>{})),this.hot=e,this.data=t}modifyRowData(e){let t;return this.hot.hasHook("modifyRowData")&&(t=this.hot.runHooks("modifyRowData",e)),void 0===t||Number.isInteger(t)?this.data[e]:t}getData(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.data&&0!==this.data.length?this.getByRange(null,null,e):this.data}setData(e){this.data=e}getAtColumn(e){const t=[];return(0,l.arrayEach)(this.data,((o,s)=>{const n=this.getAtCell(s,e);t.push(n)})),t}getAtRow(e,t,o){let s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const n=void 0===t&&void 0===o,{dataDotNotation:r}=this.hot.getSettings();let l=null,c=null;if(l=this.modifyRowData(e),Array.isArray(l))c=[],n?l.forEach(((t,o)=>{c[o]=this.getAtPhysicalCell(e,o,l)})):(0,a.rangeEach)(t,o,(o=>{c[o-t]=this.getAtPhysicalCell(e,o,l)}));else if((0,i.isObject)(l)||(0,h.isFunction)(l))if(c=s?[]:{},!n||s){const n=0,h=this.countFirstRowKeys()-1;(0,a.rangeEach)(n,h,(a=>{const u=this.colToProp(a);if(a>=(t||n)&&a<=(o||h)&&!Number.isInteger(u)){const t=this.getAtPhysicalCell(e,u,l);s?c.push(t):r?(0,i.setProperty)(c,u,t):c[u]=t}}))}else(0,i.objectEach)(l,((t,o)=>{const s=this.getAtPhysicalCell(e,o,l);r?(0,i.setProperty)(c,o,s):c[o]=s}));return c}setAtCell(e,t,o){if(!(e>=this.countRows()||t>=this.countFirstRowKeys())){if(this.hot.hasHook("modifySourceData")){const s=(0,i.createObjectPropListener)(o);this.hot.runHooks("modifySourceData",e,t,s,"set"),s.isTouched()&&(o=s.value)}Number.isInteger(t)?this.data[e][t]=o:(0,i.setProperty)(this.data[e],t,o)}}getAtPhysicalCell(e,t,o){let s=null;if(o)if("string"==typeof t){const{dataDotNotation:e}=this.hot.getSettings();s=e?(0,i.getProperty)(o,t):o[t]}else s="function"==typeof t?t(o):o[t];if(this.hot.hasHook("modifySourceData")){const o=(0,i.createObjectPropListener)(s);this.hot.runHooks("modifySourceData",e,t,o,"get"),o.isTouched()&&(s=o.value)}return s}getAtCell(e,t){const o=this.modifyRowData(e);return this.getAtPhysicalCell(e,this.colToProp(t),o)}getByRange(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=!1,n=null,i=null,r=null,l=null;null===e||null===t?(s=!0,n=0,r=this.countRows()-1):(n=Math.min(e.row,t.row),i=Math.min(e.col,t.col),r=Math.max(e.row,t.row),l=Math.max(e.col,t.col));const h=[];return(0,a.rangeEach)(n,r,(e=>{h.push(s?this.getAtRow(e,void 0,void 0,o):this.getAtRow(e,i,l,o))})),h}countRows(){if(this.hot.hasHook("modifySourceLength")){const e=this.hot.runHooks("modifySourceLength");if(Number.isInteger(e))return e}return this.data.length}countFirstRowKeys(){return(0,r.countFirstRowKeys)(this.data)}destroy(){this.data=null,this.hot=null}}},71757:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(87727));t.DataMap=n.default;var i=s(o(36102));t.MetaManager=i.default;var r=s(o(32054));t.metaSchemaFactory=r.default;var l=o(21781);t.replaceData=l.replaceData;var a=o(74870);t.DynamicCellMetaMod=a.DynamicCellMetaMod;var h=o(88884);t.ExtendMetaPropertiesMod=h.ExtendMetaPropertiesMod},36102:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=s(o(85252)),i=s(o(47441)),r=s(o(5065)),l=s(o(25779)),a=s(o(63870)),h=o(13911);class c{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];this.hot=e,this.globalMeta=new n.default(e),this.tableMeta=new i.default(this.globalMeta),this.columnMeta=new r.default(this.globalMeta),this.cellMeta=new l.default(this.columnMeta),o.forEach((e=>new e(this))),this.globalMeta.updateMeta(t)}getGlobalMeta(){return this.globalMeta.getMeta()}updateGlobalMeta(e){this.globalMeta.updateMeta(e)}getTableMeta(){return this.tableMeta.getMeta()}updateTableMeta(e){this.tableMeta.updateMeta(e)}getColumnMeta(e){return this.columnMeta.getMeta(e)}updateColumnMeta(e,t){this.columnMeta.updateMeta(e,t)}getCellMeta(e,t,o){let{visualRow:s,visualColumn:n}=o;const i=this.cellMeta.getMeta(e,t);return i.visualRow=s,i.visualCol=n,i.row=e,i.col=t,this.runLocalHooks("afterGetCellMeta",i),i}getCellMetaKeyValue(e,t,o){if("string"!=typeof o)throw new Error("The passed cell meta object key is not a string");return this.cellMeta.getMeta(e,t,o)}setCellMeta(e,t,o,s){this.cellMeta.setMeta(e,t,o,s)}updateCellMeta(e,t,o){this.cellMeta.updateMeta(e,t,o)}removeCellMeta(e,t,o){this.cellMeta.removeMeta(e,t,o)}getCellsMeta(){return this.cellMeta.getMetas()}getCellsMetaAtRow(e){return this.cellMeta.getMetasAtRow(e)}createRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.createRow(e,t)}removeRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.removeRow(e,t)}createColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.createColumn(e,t),this.columnMeta.createColumn(e,t)}removeColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.removeColumn(e,t),this.columnMeta.removeColumn(e,t)}clearCellsCache(){this.cellMeta.clearCache()}clearCache(){this.cellMeta.clearCache(),this.columnMeta.clearCache()}}t.default=c,(0,h.mixin)(c,a.default)},47586:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(15724),o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var n=s(o(85707)),i=o(9175),r=o(34471);class l{constructor(e){(0,n.default)(this,"valueFactory",void 0),(0,n.default)(this,"data",[]),(0,n.default)(this,"index",[]),(0,n.default)(this,"holes",new Set),this.valueFactory=e}obtain(e){(0,r.assert)((()=>(0,r.isUnsignedNumber)(e)),"Expecting an unsigned number.");const t=this._getStorageIndexByKey(e);let o;if(t>=0)o=this.data[t],void 0===o&&(o=this.valueFactory(e),this.data[t]=o);else if(o=this.valueFactory(e),this.holes.size>0){const t=this.holes.values().next().value;this.holes.delete(t),this.data[t]=o,this.index[e]=t}else this.data.push(o),this.index[e]=this.data.length-1;return o}insert(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;(0,r.assert)((()=>(0,r.isUnsignedNumber)(e)||(0,r.isNullish)(e)),"Expecting an unsigned number or null/undefined argument.");const o=[],s=this.data.length;for(let e=0;e<t;e++)o.push(s+e),this.data.push(void 0);const n=(0,r.isNullish)(e)?this.index.length:e;this.index=[...this.index.slice(0,n),...o,...this.index.slice(n)]}remove(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;(0,r.assert)((()=>(0,r.isUnsignedNumber)(e)||(0,r.isNullish)(e)),"Expecting an unsigned number or null/undefined argument.");const o=this.index.splice((0,r.isNullish)(e)?this.index.length-t:e,t);for(let e=0;e<o.length;e++){const t=o[e];"number"==typeof t&&this.holes.add(t)}}size(){return this.data.length-this.holes.size}values(){return(0,i.arrayFilter)(this.data,((e,t)=>!this.holes.has(t)))[Symbol.iterator]()}entries(){const e=[];for(let t=0;t<this.data.length;t++){const o=this._getKeyByStorageIndex(t);-1!==o&&e.push([o,this.data[t]])}let t=0;return{next:()=>{if(t<e.length){const o=e[t];return t+=1,{value:o,done:!1}}return{done:!0}}}}clear(){this.data=[],this.index=[],this.holes.clear()}_getStorageIndexByKey(e){return this.index.length>e?this.index[e]:-1}_getKeyByStorageIndex(e){return this.index.indexOf(e)}[Symbol.iterator](){return this.entries()}}t.default=l},25779:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(15724);var n=s(o(85707)),i=o(13911),r=o(34471),l=s(o(47586)),a=o(38893);t.default=class{constructor(e){(0,n.default)(this,"columnMeta",void 0),(0,n.default)(this,"metas",new l.default((()=>this._createRow()))),this.columnMeta=e}updateMeta(e,t,o){const s=this.getMeta(e,t);(0,i.extend)(s,o),(0,r.extendByMetaType)(s,o)}createRow(e,t){this.metas.insert(e,t)}createColumn(e,t){for(let o=0;o<this.metas.size();o++)this.metas.obtain(o).insert(e,t)}removeRow(e,t){this.metas.remove(e,t)}removeColumn(e,t){for(let o=0;o<this.metas.size();o++)this.metas.obtain(o).remove(e,t)}getMeta(e,t,o){const s=this.metas.obtain(e).obtain(t);return void 0===o?s:s[o]}setMeta(e,t,o,s){var n;const i=this.metas.obtain(e).obtain(t);null===(n=i._automaticallyAssignedMetaProps)||void 0===n||n.delete(o),i[o]=s}removeMeta(e,t,o){delete this.metas.obtain(e).obtain(t)[o]}getMetas(){const e=[],t=Array.from(this.metas.values());for(let o=0;o<t.length;o++)(0,a.isDefined)(t[o])&&e.push(...t[o].values());return e}getMetasAtRow(e){(0,r.assert)((()=>(0,r.isUnsignedNumber)(e)),"Expecting an unsigned number.");const t=new Map(this.metas);return t.has(e)?Array.from(t.get(e).values()):[]}clearCache(){this.metas.clear()}_createRow(){return new l.default((e=>this._createMeta(e)))}_createMeta(e){return new(this.columnMeta.getMetaConstructor(e))}}},5065:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707)),i=o(13911),r=o(34471),l=s(o(47586));const a=["data","width"];t.default=class{constructor(e){(0,n.default)(this,"globalMeta",void 0),(0,n.default)(this,"metas",new l.default((()=>this._createMeta()))),this.globalMeta=e,this.metas=new l.default((()=>this._createMeta()))}updateMeta(e,t){const o=this.getMeta(e);(0,i.extend)(o,t),(0,r.extendByMetaType)(o,t)}createColumn(e,t){this.metas.insert(e,t)}removeColumn(e,t){this.metas.remove(e,t)}getMeta(e){return this.metas.obtain(e)}getMetaConstructor(e){return this.metas.obtain(e).constructor}clearCache(){this.metas.clear()}_createMeta(){return(0,r.columnFactory)(this.globalMeta.getMetaConstructor(),a).prototype}}},85252:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707)),i=o(13911),r=o(34471),l=s(o(32054));t.default=class{constructor(e){(0,n.default)(this,"metaCtor",class{}),(0,n.default)(this,"meta",void 0),this.meta=this.metaCtor.prototype,(0,i.extend)(this.meta,(0,l.default)()),this.meta.instance=e}getMetaConstructor(){return this.metaCtor}getMeta(){return this.meta}updateMeta(e){var t;(0,i.extend)(this.meta,e),(0,r.extendByMetaType)(this.meta,{...e,type:null!==(t=e.type)&&void 0!==t?t:this.meta.type},e)}}},47441:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707)),i=o(13911),r=o(34471);t.default=class{constructor(e){(0,n.default)(this,"meta",void 0);const t=e.getMetaConstructor();this.meta=new t}getMeta(){return this.meta}updateMeta(e){(0,i.extend)(this.meta,e),(0,r.extendByMetaType)(this.meta,e,e)}}},32054:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(38893),n=o(13911);t.default=()=>({_automaticallyAssignedMetaProps:void 0,activeHeaderClassName:"ht__active_highlight",allowEmpty:!0,allowHtml:!1,allowInsertColumn:!0,allowInsertRow:!0,allowInvalid:!0,allowRemoveColumn:!0,allowRemoveRow:!0,ariaTags:!0,autoColumnSize:void 0,autoRowSize:void 0,autoWrapCol:!1,autoWrapRow:!1,bindRowsWithHeaders:void 0,cell:[],cells:void 0,checkedTemplate:void 0,className:void 0,colHeaders:null,collapsibleColumns:void 0,columnHeaderHeight:void 0,columns:void 0,columnSorting:void 0,columnSummary:void 0,colWidths:void 0,commentedCellClassName:"htCommentCell",comments:!1,contextMenu:void 0,copyable:!0,copyPaste:!0,correctFormat:!1,currentColClassName:void 0,currentHeaderClassName:"ht__highlight",currentRowClassName:void 0,customBorders:!1,data:void 0,dataDotNotation:!0,dataSchema:void 0,dateFormat:"DD/MM/YYYY",timeFormat:"h:mm:ss a",datePickerConfig:void 0,defaultDate:void 0,disableVisualSelection:!1,dragToScroll:!0,dropdownMenu:void 0,editor:void 0,enterBeginsEditing:!0,enterMoves:{col:0,row:1},fillHandle:{autoInsertRow:!1},filter:!0,filteringCaseSensitive:!1,filters:void 0,fixedColumnsLeft:0,fixedColumnsStart:0,fixedRowsBottom:0,fixedRowsTop:0,formulas:void 0,fragmentSelection:!1,headerClassName:void 0,height:void 0,hiddenColumns:void 0,hiddenRows:void 0,invalidCellClassName:"htInvalid",imeFastEdit:!1,isEmptyCol(e){let t,o,n;for(t=0,o=this.countRows();t<o;t++)if(n=this.getDataAtCell(t,e),!1===(0,s.isEmpty)(n))return!1;return!0},isEmptyRow(e){let t,o,i,r;for(t=0,o=this.countCols();t<o;t++)if(i=this.getDataAtCell(e,t),!1===(0,s.isEmpty)(i))return"object"==typeof i&&(r=this.getCellMeta(e,t),(0,n.isObjectEqual)(this.getSchema()[r.prop],i));return!0},label:void 0,language:"en-US",layoutDirection:"inherit",licenseKey:void 0,locale:"en-US",manualColumnFreeze:void 0,manualColumnMove:void 0,manualColumnResize:void 0,manualRowMove:void 0,manualRowResize:void 0,maxCols:1/0,maxRows:1/0,mergeCells:!1,minCols:0,minRows:0,minSpareCols:0,minSpareRows:0,multiColumnSorting:void 0,navigableHeaders:!1,tabNavigation:!0,nestedHeaders:void 0,nestedRows:void 0,noWordWrapClassName:"htNoWrap",numericFormat:void 0,observeDOMVisibility:!0,outsideClickDeselects:!0,persistentState:void 0,placeholder:void 0,placeholderCellClassName:"htPlaceholder",preventOverflow:!1,preventWheel:!1,readOnly:!1,readOnlyCellClassName:"htDimmed",renderAllRows:!1,renderAllColumns:!1,renderer:void 0,rowHeaders:void 0,rowHeaderWidth:void 0,rowHeights:void 0,search:!1,selectionMode:"multiple",selectOptions:void 0,skipColumnOnPaste:!1,skipRowOnPaste:!1,sortByRelevance:!0,source:void 0,startCols:5,startRows:5,stretchH:"none",strict:void 0,tableClassName:void 0,tabMoves:{row:0,col:1},title:void 0,trimDropdown:!0,trimRows:void 0,trimWhitespace:!0,type:"text",uncheckedTemplate:void 0,undo:void 0,validator:void 0,viewportColumnRenderingOffset:"auto",viewportRowRenderingOffset:"auto",visibleRows:10,width:void 0,wordWrap:!0})},74870:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var n=s(o(85707)),i=s(o(56937)),r=o(13911),l=o(78832);t.DynamicCellMetaMod=class{constructor(e){(0,n.default)(this,"metaManager",void 0),(0,n.default)(this,"metaSyncMemo",new Map),this.metaManager=e,e.addLocalHook("afterGetCellMeta",(e=>this.extendCellMeta(e))),i.default.getSingleton().add("beforeRender",(e=>{e&&this.metaSyncMemo.clear()}),this.metaManager.hot)}extendCellMeta(e){var t;const{row:o,col:s}=e;if(null!==(t=this.metaSyncMemo.get(o))&&void 0!==t&&t.has(s))return;const{visualRow:n,visualCol:i}=e,a=this.metaManager.hot,h=a.colToProp(i);e.prop=h,a.runHooks("beforeGetCellMeta",n,i,e);const c=(0,r.hasOwnProperty)(e,"type")?e.type:null;let u=(0,l.isFunction)(e.cells)?e.cells(o,s,h):null;var d;c&&(u?u.type=null!==(d=u.type)&&void 0!==d?d:c:u={type:c});u&&this.metaManager.updateCellMeta(o,s,u),a.runHooks("afterGetCellMeta",n,i,e),this.metaSyncMemo.has(o)||this.metaSyncMemo.set(o,new Set),this.metaSyncMemo.get(o).add(s)}}},88884:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724),o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var n=s(o(85707));function i(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function r(e,t){return e.get(function(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}(e,t))}var l=new WeakMap;t.ExtendMetaPropertiesMod=class{constructor(e){(0,n.default)(this,"metaManager",void 0),(0,n.default)(this,"usageTracker",new Set),(0,n.default)(this,"propDescriptors",new Map([["ariaTags",{initOnly:!0}],["fixedColumnsLeft",{target:"fixedColumnsStart",onChange(e){if(this.metaManager.hot.isRtl()&&"fixedColumnsLeft"===e)throw new Error("The `fixedColumnsLeft` is not supported for RTL. Please use option `fixedColumnsStart`.");if(this.usageTracker.has("fixedColumnsLeft")&&this.usageTracker.has("fixedColumnsStart"))throw new Error("The `fixedColumnsLeft` and `fixedColumnsStart` should not be used together. Please use only the option `fixedColumnsStart`.")}}],["layoutDirection",{initOnly:!0}],["renderAllColumns",{initOnly:!0}],["renderAllRows",{initOnly:!0}]])),i(this,l,((e,t,o)=>{if(!o)throw new Error(`The \`${e}\` option can not be updated after the Handsontable is initialized.`)})),this.metaManager=e,this.extendMetaProps()}extendMetaProps(){this.propDescriptors.forEach(((e,t)=>{const{initOnly:o,target:s,onChange:n}=e,i="string"==typeof s,a=i?s:t,h=`_${a}`;this.metaManager.globalMeta.meta[h]=this.metaManager.globalMeta.meta[a],n?(this.installPropWatcher(t,h,n),i&&this.installPropWatcher(s,h,n)):o&&(this.installPropWatcher(t,h,r(l,this)),this.metaManager.globalMeta.meta._initOnlySettings||(this.metaManager.globalMeta.meta._initOnlySettings=[]),this.metaManager.globalMeta.meta._initOnlySettings.push(t))}))}installPropWatcher(e,t,o){const s=this;Object.defineProperty(this.metaManager.globalMeta.meta,e,{get(){return this[t]},set(n){const i=!s.usageTracker.has(e);s.usageTracker.add(e),o.call(s,e,n,i),this[t]=n},enumerable:!0,configurable:!0})}}},34471:(e,t,o)=>{"use strict";t.__esModule=!0,t.assert=function(e,t){if(!e())throw new Error(`Assertion failed: ${t}`)},t.columnFactory=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];function o(){}(0,s.inherit)(o,e);for(let e=0;e<t.length;e++)o.prototype[t[e]]=void 0;return o},t.extendByMetaType=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;const i="string"==typeof t.type?(0,n.getCellType)(t.type):t.type;e._automaticallyAssignedMetaProps&&(0,s.objectEach)(t,((t,o)=>{e._automaticallyAssignedMetaProps.delete(o)}));if(!(0,s.isObject)(i))return;o!==e||e._automaticallyAssignedMetaProps||(e._automaticallyAssignedMetaProps=new Set);const r={};(0,s.objectEach)(i,((t,n)=>{var i;(function(e,t){var o;if("CELL_TYPE"===e)return!1;return(null===(o=t._automaticallyAssignedMetaProps)||void 0===o?void 0:o.has(e))||!(0,s.hasOwnProperty)(t,e)})(n,o)&&(r[n]=t,null===(i=e._automaticallyAssignedMetaProps)||void 0===i||i.add(n))})),(0,s.extend)(e,r)},t.isNullish=function(e){return null==e},t.isUnsignedNumber=function(e){return Number.isInteger(e)&&e>=0},o(67834),o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var s=o(13911),n=o(34299)},21781:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.replaceData=function(e,t,o,s){const{hotInstance:c,dataMap:u,dataSource:d,internalSource:g,source:f,metaManager:p,firstRun:m}=s,w=(0,n.toUpperCaseFirst)(g),C=c.getSettings();Array.isArray(C.dataSchema)?c.dataType="array":(0,i.isFunction)(C.dataSchema)?c.dataType="function":c.dataType="object";u&&u.destroy();e=c.runHooks(`before${w}`,e,m,f);const v=new r.default(c,e,p);if(t(v),"object"==typeof e&&null!==e)e.push&&e.splice||(e=[e]);else{if(null!==e)throw new Error(`${g} only accepts array of objects or array of arrays (${typeof e} given)`);{const t=v.getSchema();let o;e=[];let s=0,n=0;for(s=0,n=C.startRows;s<n;s++)if("object"!==c.dataType&&"function"!==c.dataType||!C.dataSchema)if("array"===c.dataType)o=(0,l.deepClone)(t[0]),e.push(o);else{o=[];for(let e=0,t=C.startCols;e<t;e++)o.push(null);e.push(o)}else o=(0,l.deepClone)(t),e.push(o)}}Array.isArray(e[0])&&(c.dataType="array");C.data=e,v.dataSource=e,d.data=e,d.dataType=c.dataType,d.colToProp=v.colToProp.bind(v),d.propToCol=v.propToCol.bind(v),d.countCachedColumns=v.countCachedColumns.bind(v),o(v),c.runHooks(`after${w}`,e,m,f),m||(c.runHooks("afterChange",null,g),c.render());c.getSettings().ariaTags&&(0,a.setAttribute)(c.rootElement,[(0,h.A11Y_ROWCOUNT)(-1),(0,h.A11Y_COLCOUNT)(c.countCols()+(c.view?c.countRowHeaders():0))])},o(67834),o(15724);var n=o(59777),i=o(78832),r=s(o(87727)),l=o(13911),a=o(9893),h=o(92692)},18344:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=s(o(85707)),i=o(71257),r=o(79729),l=o(84558),a=s(o(82629));function h(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function c(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var u=new WeakSet;class d{constructor(e,t,o){h(this,u),(0,n.default)(this,"hot",void 0),(0,n.default)(this,"tableMeta",void 0),(0,n.default)(this,"selection",void 0),(0,n.default)(this,"eventManager",void 0),(0,n.default)(this,"destroyed",!1),(0,n.default)(this,"activeEditor",void 0),(0,n.default)(this,"cellProperties",void 0),this.hot=e,this.tableMeta=t,this.selection=o,this.eventManager=new a.default(e),this.hot.addHook("afterDocumentKeyDown",(e=>c(u,this,g).call(this,e))),this.eventManager.addEventListener(this.hot.rootDocument.documentElement,"compositionstart",(e=>{!this.destroyed&&this.hot.isListening()&&this.openEditor("",e)})),this.hot.view._wt.update("onCellDblClick",((e,t,o)=>c(u,this,f).call(this,e,t,o)))}getActiveEditor(){return this.activeEditor}prepareEditor(){var e;if(this.activeEditor&&this.activeEditor.isWaiting())return void this.closeEditor(!1,!1,(e=>{e&&this.prepareEditor()}));const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;if(!t||t.isHeader())return;const{row:o,col:s}=t,n=this.hot.runHooks("modifyGetCellCoords",o,s);let i=o,r=s;if(Array.isArray(n)&&([i,r]=n),this.cellProperties=this.hot.getCellMeta(i,r),!this.isCellEditable())return void this.clearActiveEditor();const a=this.hot.getCell(o,s,!0);if(a){const e=this.hot.getCellEditor(this.cellProperties),t=this.hot.colToProp(r),n=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(i),r);this.activeEditor=(0,l.getEditorInstance)(e,this.hot),this.activeEditor.prepare(o,s,t,a,n,this.cellProperties)}}isEditorOpened(){return this.activeEditor&&this.activeEditor.isOpened()}openEditor(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.isCellEditable())return void this.clearActiveEditor();const s=this.hot.getSelectedRangeLast();let n=this.hot.runHooks("beforeBeginEditing",s.highlight.row,s.highlight.col,e,t,o);t instanceof MouseEvent&&"boolean"!=typeof n&&(n=0===this.hot.selection.getLayerLevel()&&s.isSingle()),!1!==n?(this.activeEditor||(this.hot.scrollToFocusedCell(),this.prepareEditor()),this.activeEditor&&(o&&this.activeEditor.enableFullEditMode(),this.activeEditor.beginEditing(e,t))):this.clearActiveEditor()}closeEditor(e,t,o){this.activeEditor?this.activeEditor.finishEditing(e,t,o):o&&o(!1)}closeEditorAndSaveChanges(e){this.closeEditor(!1,e)}closeEditorAndRestoreOriginalValue(e){this.closeEditor(!0,e)}clearActiveEditor(){this.activeEditor=void 0}isCellEditable(){const e=this.hot.getSelectedRangeLast();if(!e)return!1;const t=this.hot.getCellEditor(this.cellProperties),{row:o,col:s}=e.highlight,{rowIndexMapper:n,columnIndexMapper:i}=this.hot,r=n.isHidden(this.hot.toPhysicalRow(o))||i.isHidden(this.hot.toPhysicalColumn(s));return!(this.cellProperties.readOnly||!t||r)}moveSelectionAfterEnter(e){const t={..."function"==typeof this.tableMeta.enterMoves?this.tableMeta.enterMoves(e):this.tableMeta.enterMoves};e.shiftKey&&(t.row=-t.row,t.col=-t.col),this.hot.selection.isMultiple()?this.selection.transformFocus(t.row,t.col):this.selection.transformStart(t.row,t.col,!0)}destroy(){this.destroyed=!0,this.eventManager.destroy()}}function g(e){const t=this.hot.getSelectedRangeLast();if(!this.hot.isListening()||!t||t.highlight.isHeader()||(0,r.isImmediatePropagationStopped)(e))return;const{keyCode:o}=e,s=(e.ctrlKey||e.metaKey)&&!e.altKey;(!this.activeEditor||this.activeEditor&&!this.activeEditor.isWaiting())&&((0,i.isFunctionKey)(o)||(0,i.isCtrlMetaKey)(o)||s||this.isEditorOpened()||this.openEditor("",e))}function f(e,t){t.isCell()&&this.openEditor(null,e,!0)}const p=new WeakMap;d.getInstance=function(e,t,o){let s=p.get(e);return s||(s=new d(e,t,o),p.set(e,s)),s};t.default=d},36854:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(56138),r=o(9175),l=o(9893),a=o(38893),h=o(59777),c=o(71257),u=o(36748),d=o(92692);function g(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function f(e,t){return e.get(function(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}(e,t))}const p=t.EDITOR_TYPE="autocomplete";var m=new WeakMap;class w extends i.HandsontableEditor{constructor(){super(...arguments),(0,n.default)(this,"query",null),(0,n.default)(this,"strippedChoices",[]),(0,n.default)(this,"rawChoices",[]),g(this,m,this.hot.guid.slice(0,9)),(0,n.default)(this,"sortByRelevance",(function(e,t,o){const s=[],n=[],i=e.length;let r,l,c,u,d=t.length;if(0===i){for(c=0;c<d;c++)n.push(c);return n}for(c=0;c<d;c++){if(l=(0,h.stripTags)((0,a.stringify)(t[c])),o)u=l.indexOf(e);else{const t=this.cellProperties.locale;u=l.toLocaleLowerCase(t).indexOf(e.toLocaleLowerCase(t))}-1!==u&&(r=l.length-u-i,s.push({baseIndex:c,index:u,charsLeft:r,value:l}))}for(s.sort(((e,t)=>{if(-1===t.index)return-1;if(-1===e.index)return 1;if(e.index<t.index)return-1;if(t.index<e.index)return 1;if(e.index===t.index){if(e.charsLeft<t.charsLeft)return-1;if(e.charsLeft>t.charsLeft)return 1}return 0})),c=0,d=s.length;c<d;c++)n.push(s[c].baseIndex);return n}))}static get EDITOR_TYPE(){return p}getValue(){const e=this.rawChoices.find((e=>this.stripValueIfNeeded(e)===this.TEXTAREA.value));return(0,a.isDefined)(e)?e:this.TEXTAREA.value}createElements(){super.createElements(),(0,l.addClass)(this.htContainer,"autocompleteEditor"),(0,l.addClass)(this.htContainer,-1===this.hot.rootWindow.navigator.platform.indexOf("Mac")?"":"htMacScroll"),this.hot.getSettings().ariaTags&&(0,l.setAttribute)(this.TEXTAREA,[(0,d.A11Y_TEXT)(),(0,d.A11Y_COMBOBOX)(),(0,d.A11Y_HASPOPUP)("listbox"),(0,d.A11Y_AUTOCOMPLETE)()])}prepare(e,t,o,s,n,i){super.prepare(e,t,o,s,n,i),this.hot.getSettings().ariaTags&&(0,l.setAttribute)(this.TEXTAREA,[(0,d.A11Y_EXPANDED)("false"),(0,d.A11Y_CONTROLS)(`${f(m,this)}-listbox-${e}-${t}`)])}open(){super.open();const e=void 0===this.cellProperties.trimDropdown||this.cellProperties.trimDropdown,t=this.hot.getSettings().ariaTags,o=Array.isArray(this.cellProperties.source)?this.cellProperties.source:null,s=null==o?void 0:o.length,{row:n,col:i}=this;this.showEditableElement(),this.focus(),this.addHook("beforeKeyDown",(e=>this.onBeforeKeyDown(e))),this.htEditor.updateSettings({colWidths:e?[(0,l.outerWidth)(this.TEXTAREA)-2]:void 0,autoColumnSize:!0,autoRowSize:!0,renderer:(e,n,i,r,h,c,g)=>{(0,u.textRenderer)(e,n,i,r,h,c,g);const{filteringCaseSensitive:f,allowHtml:p,locale:m}=this.cellProperties,w=this.query;let C,v,y=(0,a.stringify)(c);y&&!p&&(C=!0===f?y.indexOf(w):y.toLocaleLowerCase(m).indexOf(w.toLocaleLowerCase(m)),-1!==C&&(v=y.substr(C,w.length),y=y.replace(v,`<strong>${v}</strong>`))),t&&(0,l.setAttribute)(n,[(0,d.A11Y_OPTION)(),...o?[(0,d.A11Y_SETSIZE)(s)]:[],...o?[(0,d.A11Y_POSINSET)(o.indexOf(c)+1)]:[],["id",`${this.htEditor.rootElement.id}_${i}-${r}`]]),n.innerHTML=y},afterSelectionEnd:(e,o)=>{if(t){const t=this.htEditor.getCell(e,o,!0);(0,l.setAttribute)(t,[(0,d.A11Y_SELECTED)()]),(0,l.setAttribute)(this.TEXTAREA,...(0,d.A11Y_ACTIVEDESCENDANT)(t.id))}}}),t&&((0,l.setAttribute)(this.htEditor.view._wt.wtOverlays.wtTable.TABLE,...(0,d.A11Y_PRESENTATION)()),(0,l.setAttribute)(this.htEditor.rootElement,[(0,d.A11Y_LISTBOX)(),(0,d.A11Y_LIVE)("polite"),(0,d.A11Y_RELEVANT)("text"),["id",`${f(m,this)}-listbox-${n}-${i}`]]),(0,l.setAttribute)(this.TEXTAREA,...(0,d.A11Y_EXPANDED)("true"))),this.hot._registerTimeout((()=>{this.queryChoices(this.TEXTAREA.value)}))}close(){this.removeHooksByKey("beforeKeyDown"),super.close(),this.hot.getSettings().ariaTags&&(0,l.setAttribute)(this.TEXTAREA,[(0,d.A11Y_EXPANDED)("false")])}discardEditor(e){super.discardEditor(e),this.hot.view.render()}queryChoices(e){const t=this.cellProperties.source;this.query=e,"function"==typeof t?t.call(this.cellProperties,e,(e=>{this.rawChoices=e,this.updateChoicesList(this.stripValuesIfNeeded(e))})):Array.isArray(t)?(this.rawChoices=t,this.updateChoicesList(this.stripValuesIfNeeded(t))):this.updateChoicesList([])}updateChoicesList(e){const t=(0,l.getCaretPosition)(this.TEXTAREA),o=(0,l.getSelectionEndPosition)(this.TEXTAREA),s=this.cellProperties.sortByRelevance,n=this.cellProperties.filter;let i=null,a=null,h=e;s&&(i=this.sortByRelevance(this.stripValueIfNeeded(this.getValue()),h,this.cellProperties.filteringCaseSensitive));const c=Array.isArray(i)?i.length:0;if(!1===n)c&&(a=i[0]);else{const e=[];for(let t=0,o=h.length;t<o&&!(s&&c<=t);t++)c?e.push(h[i[t]]):e.push(h[t]);a=0,h=e}this.strippedChoices=h,0===h.length?this.htEditor.rootElement.style.display="none":this.htEditor.rootElement.style.display="",this.htEditor.loadData((0,r.pivot)([h])),h.length>0&&(this.updateDropdownDimensions(),this.flipDropdownIfNeeded(),!0===this.cellProperties.strict&&this.highlightBestMatchingChoice(a)),this.hot.listen(),(0,l.setCaretPosition)(this.TEXTAREA,t,t===o?void 0:o)}flipDropdownIfNeeded(){const e=(0,l.getTrimmingContainer)(this.hot.view._wt.wtTable.TABLE),t=e===this.hot.rootWindow,o=this.cellProperties.preventOverflow;if(t||!t&&(o||"horizontal"===o))return!1;const s=(0,l.offset)(this.TEXTAREA),n=(0,l.outerHeight)(this.TEXTAREA),i=this.getHeight(),r=e.scrollTop,a=(0,l.outerHeight)(this.hot.view._wt.wtTable.THEAD),h=(0,l.offset)(e),c=s.top-h.top-a+r,u=e.scrollHeight-c-a-n,d=i>u&&c>u;return d?this.flipDropdown(i):this.unflipDropdown(),this.limitDropdownIfNeeded(d?c:u,i),d}limitDropdownIfNeeded(e,t){if(t>e){let o=0,s=0,n=0,i=null;do{n=this.htEditor.getRowHeight(s)||this.htEditor.view._wt.getSetting("defaultRowHeight"),o+=n,s+=1}while(o<e);i=o-n,this.htEditor.flipped&&(this.htEditor.rootElement.style.top=parseInt(this.htEditor.rootElement.style.top,10)+t-i+"px"),this.setDropdownHeight(o-n)}}flipDropdown(e){const t=this.htEditor.rootElement.style;t.position="absolute",t.top=-e+"px",this.htEditor.flipped=!0}unflipDropdown(){const e=this.htEditor.rootElement.style;e.position="absolute",e.top="",this.htEditor.flipped=void 0}updateDropdownDimensions(){const e=this.cellProperties.trimDropdown,t=e?this.getWidth():void 0,o=this.getHeight();this.htEditor.updateSettings({width:t,height:o}),e&&this.htEditor.view.hasVerticalScroll()&&this.htEditor.updateSettings({width:t+(0,l.getScrollbarWidth)(this.hot.rootDocument)}),this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer()}setDropdownHeight(e){this.htEditor.updateSettings({height:e})}highlightBestMatchingChoice(e){"number"==typeof e?this.htEditor.selectCell(e,0,void 0,void 0,void 0,!1):this.htEditor.deselectCell()}getHeight(){const e=this.hot.rootWindow.getComputedStyle(this.htContainer.querySelector(".htCore")),t=parseInt(e.borderTopWidth,10)+parseInt(e.borderBottomWidth,10),o=Math.min(this.cellProperties.visibleRows,this.strippedChoices.length);return Array.from({length:o},((e,t)=>t)).reduce(((e,t)=>e+this.htEditor.getRowHeight(t)),0)+t+1}getWidth(){const e=this.hot.rootWindow.getComputedStyle(this.htContainer.querySelector(".htCore")),t=parseInt(e.borderInlineStartWidth,10)+parseInt(e.borderInlineEndWidth,10);return this.htEditor.getColWidth(0)+t}stripValueIfNeeded(e){return this.stripValuesIfNeeded([e])[0]}stripValuesIfNeeded(e){const{allowHtml:t}=this.cellProperties,o=(0,r.arrayMap)(e,(e=>(0,a.stringify)(e)));return(0,r.arrayMap)(o,(e=>t?e:(0,h.stripTags)(e)))}allowKeyEventPropagation(e){const t=this.htEditor.getSelectedRangeLast(),o=t?t.from.row:-1;let s=!1;return e===c.KEY_CODES.ARROW_DOWN&&o>0&&o<this.htEditor.countRows()-1&&(s=!0),e===c.KEY_CODES.ARROW_UP&&o>-1&&(s=!0),s}onBeforeKeyDown(e){if((0,c.isPrintableChar)(e.keyCode)||e.keyCode===c.KEY_CODES.BACKSPACE||e.keyCode===c.KEY_CODES.DELETE||e.keyCode===c.KEY_CODES.INSERT){let t=10;if(e.keyCode===c.KEY_CODES.C&&(e.ctrlKey||e.metaKey))return;this.isOpened()||(t+=10),this.htEditor&&this.hot._registerTimeout((()=>{this.queryChoices(this.TEXTAREA.value)}),t)}}}t.AutocompleteEditor=w},80115:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(36854);t.EDITOR_TYPE=s.EDITOR_TYPE,t.AutocompleteEditor=s.AutocompleteEditor},63180:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=s(o(85707)),i=o(38893),r=o(13911),l=s(o(31872)),a=o(9893);const h=t.EDITOR_TYPE="base",c=t.EDITOR_STATE=Object.freeze({VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"});class u{static get EDITOR_TYPE(){return h}constructor(e){(0,n.default)(this,"hot",void 0),(0,n.default)(this,"state",c.VIRGIN),(0,n.default)(this,"_opened",!1),(0,n.default)(this,"_fullEditMode",!1),(0,n.default)(this,"_closeCallback",null),(0,n.default)(this,"TD",null),(0,n.default)(this,"row",null),(0,n.default)(this,"col",null),(0,n.default)(this,"prop",null),(0,n.default)(this,"originalValue",null),(0,n.default)(this,"cellProperties",null),this.hot=e,this.init()}_fireCallbacks(e){this._closeCallback&&(this._closeCallback(e),this._closeCallback=null)}init(){}getValue(){throw Error("Editor getValue() method unimplemented")}setValue(){throw Error("Editor setValue() method unimplemented")}open(){throw Error("Editor open() method unimplemented")}close(){throw Error("Editor close() method unimplemented")}prepare(e,t,o,s,n,i){this.TD=s,this.row=e,this.col=t,this.prop=o,this.originalValue=n,this.cellProperties=i,this.state=this.isOpened()?this.state:c.VIRGIN}extend(){return class extends this.constructor{}}saveValue(e,t){let o,s,n,i;if(t){const e=this.hot.getSelectedLast();o=Math.max(Math.min(e[0],e[2]),0),s=Math.max(Math.min(e[1],e[3]),0),n=Math.max(e[0],e[2]),i=Math.max(e[1],e[3])}else[o,s,n,i]=[this.row,this.col,null,null];const r=this.hot.runHooks("modifyGetCellCoords",o,s);Array.isArray(r)&&([o,s]=r),this.hot.populateFromArray(o,s,e,n,i,"edit")}beginEditing(e,t){if(this.state!==c.VIRGIN)return;const o=this.hot,s=o.rowIndexMapper.getRenderableFromVisualIndex(this.row),n=o.columnIndexMapper.getRenderableFromVisualIndex(this.col);if(o.view.scrollViewport(o._createCellCoords(s,n)),this.state=c.EDITING,this.isInFullEditMode()){const t="string"==typeof e?e:(0,i.stringify)(this.originalValue);this.setValue(t)}this.open(t),this._opened=!0,this.focus(),o.view.render(),o.runHooks("afterBeginEditing",this.row,this.col)}finishEditing(e,t,o){let s;if(o){const e=this._closeCallback;this._closeCallback=t=>{e&&e(t),o(t),this.hot.view.render()}}if(!this.isWaiting())if(this.state!==c.VIRGIN){if(this.state===c.EDITING){if(e)return this.cancelChanges(),void this.hot.view.render();const o=this.getValue();s=this.cellProperties.trimWhitespace?[["string"==typeof o?String.prototype.trim.call(o||""):o]]:[[o]],this.state=c.WAITING,this.saveValue(s,t),this.hot.getCellValidator(this.cellProperties)?this.hot.addHookOnce("postAfterValidate",(e=>{this.state=c.FINISHED,this.discardEditor(e)})):(this.state=c.FINISHED,this.discardEditor(!0))}}else this.hot._registerTimeout((()=>{this._fireCallbacks(!0)}))}cancelChanges(){this.state=c.FINISHED,this.discardEditor()}discardEditor(e){if(this.state===c.FINISHED)if(!1===e&&!0!==this.cellProperties.allowInvalid)this.hot.selectCell(this.row,this.col),this.focus(),this.state=c.EDITING,this._fireCallbacks(!1);else{this.close(),this._opened=!1,this._fullEditMode=!1,this.state=c.VIRGIN,this._fireCallbacks(!0);this.hot.getShortcutManager().setActiveContextName("grid")}}enableFullEditMode(){this._fullEditMode=!0}isInFullEditMode(){return this._fullEditMode}isOpened(){return this._opened}isWaiting(){return this.state===c.WAITING}getEditedCellRect(){var e;const t=this.getEditedCell();if(!t)return;const{wtOverlays:o,wtViewport:s}=this.hot.view._wt,n=this.hot.rootWindow,i=(0,a.offset)(t),r=(0,a.outerWidth)(t),l=(0,a.offset)(this.hot.rootElement),h=(0,a.outerWidth)(this.hot.rootElement),c=o.topOverlay.holder,u=o.inlineStartOverlay.holder,d=c!==n?c.scrollTop:0,g=u!==n?u.scrollLeft:0,f=n.innerWidth-l.left-h,{wtTable:p}=null!==(e=o.getParentOverlay(t))&&void 0!==e?e:this.hot.view._wt,m=p.name,w=["master","inline_start"].includes(m)?d:0,C=["master","top","bottom"].includes(m)?g:0,v=i.top===l.top?0:1;let y=i.top-l.top-v-w,E=0;E=this.hot.isRtl()?n.innerWidth-i.left-r-f-1+C:i.left-l.left-1-C,["top","top_inline_start_corner"].includes(m)&&(y+=o.topOverlay.getOverlayOffset()),["inline_start","top_inline_start_corner"].includes(m)&&(E+=Math.abs(o.inlineStartOverlay.getOverlayOffset()));const S=this.hot.hasColHeaders(),R=this.hot.rowIndexMapper.getRenderableFromVisualIndex(this.row),b=this.hot.columnIndexMapper.getRenderableFromVisualIndex(this.col),_=this.hot.rowIndexMapper.getRenderableIndexesLength()-this.hot.view._wt.getSetting("fixedRowsBottom");(S&&R<=0||R===_)&&(y+=1),b<=0&&(E+=1);const T=s.rowsRenderCalculator.startPosition,M=s.columnsRenderCalculator.startPosition,O=Math.abs(o.inlineStartOverlay.getScrollPosition()),I=o.topOverlay.getScrollPosition(),N=(0,a.getScrollbarWidth)(this.hot.rootDocument);let A=t.offsetTop;if(["inline_start","master"].includes(m)&&(A+=T-I),["bottom","bottom_inline_start_corner"].includes(m)){const{wtViewport:e,wtTable:t}=o.bottomOverlay.clone;A+=e.getWorkspaceHeight()-t.getHeight()-N}let P=t.offsetLeft;this.hot.isRtl()?(P=P>=0?p.getWidth()-t.offsetLeft:Math.abs(P),P+=M-O-r):["top","master","bottom"].includes(m)&&(P+=M-O);const x=n.getComputedStyle(this.TD),H=this.hot.isRtl()?"borderRightWidth":"borderLeftWidth",D=parseInt(x[H],10)>0?0:1,k=parseInt(x.borderTopWidth,10)>0?0:1,L=(0,a.outerWidth)(t)+D,V=(0,a.outerHeight)(t)+k,F=(0,a.hasVerticalScrollbar)(c)?N:0,W=(0,a.hasHorizontalScrollbar)(u)?N:0,B=this.hot.view.maximumVisibleElementWidth(P)-F+D;return{top:y,start:E,height:V,maxHeight:Math.max(this.hot.view.maximumVisibleElementHeight(A)-W+k,23),width:L,maxWidth:B}}getEditedCellsLayerClass(){switch(this.checkEditorSection()){case"inline-start":return"ht_clone_left ht_clone_inline_start";case"bottom":return"ht_clone_bottom";case"bottom-inline-start-corner":return"ht_clone_bottom_left_corner ht_clone_bottom_inline_start_corner";case"top":return"ht_clone_top";case"top-inline-start-corner":return"ht_clone_top_left_corner ht_clone_top_inline_start_corner";default:return"ht_clone_master"}}getEditedCell(){return this.hot.getCell(this.row,this.col,!0)}checkEditorSection(){const e=this.hot.countRows();let t="";return this.row<this.hot.getSettings().fixedRowsTop?t=this.col<this.hot.getSettings().fixedColumnsStart?"top-inline-start-corner":"top":this.hot.getSettings().fixedRowsBottom&&this.row>=e-this.hot.getSettings().fixedRowsBottom?t=this.col<this.hot.getSettings().fixedColumnsStart?"bottom-inline-start-corner":"bottom":this.col<this.hot.getSettings().fixedColumnsStart&&(t="inline-start"),t}}t.BaseEditor=u,(0,r.mixin)(u,l.default)},52618:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(63180);t.EDITOR_STATE=s.EDITOR_STATE,t.EDITOR_TYPE=s.EDITOR_TYPE,t.BaseEditor=s.BaseEditor},11936:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(52618),n=o(9893);const i=t.EDITOR_TYPE="checkbox";class r extends s.BaseEditor{static get EDITOR_TYPE(){return i}beginEditing(e,t){if(t&&"mouseup"===t.type&&"TD"===t.target.nodeName){const e=this.TD.querySelector('input[type="checkbox"]');(0,n.hasClass)(e,"htBadValue")||e.click()}}finishEditing(){}init(){}open(){}close(){}getValue(){}setValue(){}focus(){}}t.CheckboxEditor=r},39626:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(11936);t.EDITOR_TYPE=s.EDITOR_TYPE,t.CheckboxEditor=s.CheckboxEditor},10978:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=s(o(85707)),i=s(o(86798)),r=s(o(75972)),l=o(52618),a=o(64952),h=o(9893),c=o(13911),u=o(71257);o(17728);const d=t.EDITOR_TYPE="date",g="dateEditor";class f extends a.TextEditor{constructor(){super(...arguments),(0,n.default)(this,"defaultDateFormat","DD/MM/YYYY"),(0,n.default)(this,"parentDestroyed",!1),(0,n.default)(this,"$datePicker",null)}static get EDITOR_TYPE(){return d}init(){if("function"!=typeof i.default)throw new Error("You need to include moment.js to your project.");if("function"!=typeof r.default)throw new Error("You need to include Pikaday to your project.");super.init(),this.hot.addHook("afterDestroy",(()=>{this.parentDestroyed=!0,this.destroyElements()}))}createElements(){super.createElements(),this.datePicker=this.hot.rootDocument.createElement("DIV"),this.datePickerStyle=this.datePicker.style,this.datePickerStyle.position="absolute",this.datePickerStyle.top=0,this.datePickerStyle.left=0,this.datePickerStyle.zIndex=9999,this.datePicker.setAttribute("dir",this.hot.isRtl()?"rtl":"ltr"),(0,h.addClass)(this.datePicker,"htDatepickerHolder"),this.hot.rootDocument.body.appendChild(this.datePicker),this.eventManager.addEventListener(this.datePicker,"mousedown",(e=>{(0,h.hasClass)(e.target,"pika-day")&&this.hideDatepicker(),e.stopPropagation()}))}destroyElements(){const e=this.datePicker.parentNode;this.$datePicker&&this.$datePicker.destroy(),e&&e.removeChild(this.datePicker)}prepare(e,t,o,s,n,i){super.prepare(e,t,o,s,n,i)}open(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=this.hot.getShortcutManager().getContext("editor");this.showDatepicker(e),super.open(),t.addShortcuts([{keys:[["ArrowLeft"]],callback:()=>{this.$datePicker.adjustDate("subtract",1)}},{keys:[["ArrowRight"]],callback:()=>{this.$datePicker.adjustDate("add",1)}},{keys:[["ArrowUp"]],callback:()=>{this.$datePicker.adjustDate("subtract",7)}},{keys:[["ArrowDown"]],callback:()=>{this.$datePicker.adjustDate("add",7)}}],{group:g})}close(){var e;this._opened=!1,null!==(e=this.$datePicker)&&void 0!==e&&e.destroy&&this.$datePicker.destroy(),this.hot._registerTimeout((()=>{const e=this.hot._getEditorManager();e.closeEditor(),this.hot.view.render(),e.prepareEditor()}));this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(g),super.close()}finishEditing(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];super.finishEditing(e,t)}showDatepicker(e){const t=this.cellProperties.dateFormat||this.defaultDateFormat,o=this.hot.view.isMouseDown(),s=!!e&&(0,u.isFunctionKey)(e.keyCode);let n;this.datePicker.style.display="block",this.$datePicker=new r.default(this.getDatePickerConfig()),"function"==typeof this.$datePicker.useMoment&&this.$datePicker.useMoment(i.default),this.$datePicker._onInputFocus=function(){},this.originalValue?(n=this.originalValue,(0,i.default)(n,t,!0).isValid()&&this.$datePicker.setMoment((0,i.default)(n,t),!0),this.getValue()!==this.originalValue&&this.setValue(this.originalValue),s||o||this.setValue("")):this.cellProperties.defaultDate?(n=this.cellProperties.defaultDate,(0,i.default)(n,t,!0).isValid()&&this.$datePicker.setMoment((0,i.default)(n,t),!0),s||o||this.setValue("")):this.$datePicker.gotoToday()}hideDatepicker(){this.datePickerStyle.display="none",this.$datePicker.hide()}getDatePickerConfig(){const e=this.TEXTAREA,t={};this.cellProperties&&this.cellProperties.datePickerConfig&&(0,c.deepExtend)(t,this.cellProperties.datePickerConfig);const o=t.onSelect,s=t.onClose;return t.field=e,t.trigger=e,t.container=this.datePicker,t.bound=!1,t.keyboardInput=!1,t.format=t.format||this.defaultDateFormat,t.reposition=t.reposition||!1,t.isRTL=!1,t.onSelect=e=>{let t=e;isNaN(t.getTime())||(t=(0,i.default)(t).format(this.cellProperties.dateFormat||this.defaultDateFormat)),this.setValue(t),o&&o()},t.onClose=()=>{this.parentDestroyed||this.finishEditing(!1),s&&s()},t}refreshDimensions(e){var t;if(super.refreshDimensions(e),this.state!==l.EDITOR_STATE.EDITING)return;if(this.TD=this.getEditedCell(),!this.TD)return void this.hideDatepicker();const{rowIndexMapper:o,columnIndexMapper:s}=this.hot,{wtOverlays:n}=this.hot.view._wt,{wtTable:i}=null!==(t=n.getParentOverlay(this.TD))&&void 0!==t?t:this.hot.view._wt,r=o.getVisualFromRenderableIndex(i.getFirstPartiallyVisibleRow()),a=o.getVisualFromRenderableIndex(i.getLastPartiallyVisibleRow()),c=s.getVisualFromRenderableIndex(i.getFirstPartiallyVisibleColumn()),u=s.getVisualFromRenderableIndex(i.getLastPartiallyVisibleColumn());if(this.row>=r&&this.row<=a&&this.col>=c&&this.col<=u){const e=this.TD.getBoundingClientRect();this.datePickerStyle.top=`${this.hot.rootWindow.pageYOffset+e.top+(0,h.outerHeight)(this.TD)}px`;let t=this.hot.rootWindow.pageXOffset;this.hot.isRtl()?t+=e.right-(0,h.outerWidth)(this.datePicker):t+=e.left,this.datePickerStyle.left=`${t}px`}else this.hideDatepicker()}}t.DateEditor=f},59127:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(10978);t.EDITOR_TYPE=s.EDITOR_TYPE,t.DateEditor=s.DateEditor},52236:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=o(80115),i=s(o(56937));const r=t.EDITOR_TYPE="dropdown";class l extends n.AutocompleteEditor{static get EDITOR_TYPE(){return r}prepare(e,t,o,s,n,i){super.prepare(e,t,o,s,n,i),this.cellProperties.filter=!1,this.cellProperties.strict=!0}}t.DropdownEditor=l,i.default.getSingleton().add("beforeValidate",(function(e,t,o){const s=this.propToCol(o);if(Number.isInteger(s)){const e=this.getCellMeta(t,s);e.editor===l&&void 0===e.strict&&(e.filter=!1,e.strict=!0)}}))},50486:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(52236);t.EDITOR_TYPE=s.EDITOR_TYPE,t.DropdownEditor=s.DropdownEditor},29408:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(64952),n=o(9893),i=o(79729),r=o(13911),l=o(37947);const a="handsontableEditor",h=t.EDITOR_TYPE="handsontable";class c extends s.TextEditor{static get EDITOR_TYPE(){return h}open(){super.open(),this.htEditor&&this.htEditor.destroy(),"none"===this.htContainer.style.display&&(this.htContainer.style.display=""),this.htEditor=new this.hot.constructor(this.htContainer,this.htOptions),this.htEditor.init(),this.htEditor.rootElement.style.display="",this.cellProperties.strict?this.htEditor.selectCell(0,0):this.htEditor.deselectCell(),(0,n.setCaretPosition)(this.TEXTAREA,0,this.TEXTAREA.value.length),this.refreshDimensions(),this.htEditor.updateSettings({width:this.getWidth(),height:this.getHeight()})}close(){this.htEditor&&(this.htEditor.rootElement.style.display="none"),this.removeHooksByKey("beforeKeyDown"),super.close()}prepare(e,t,o,s,n,i){super.prepare(e,t,o,s,n,i);const l=this,a={startRows:0,startCols:0,minRows:0,minCols:0,className:"listbox",copyPaste:!1,autoColumnSize:!1,autoRowSize:!1,readOnly:!0,fillHandle:!1,autoWrapCol:!1,autoWrapRow:!1,ariaTags:!1,afterOnCellMouseDown(e,t){const o=this.getSourceData(t.row,t.col);void 0!==o&&l.setValue(o),l.hot.destroyEditor()},preventWheel:!0,layoutDirection:this.hot.isRtl()?"rtl":"ltr"};this.cellProperties.handsontable&&(0,r.extend)(a,i.handsontable),this.htOptions=a}beginEditing(e,t){const o=this.hot.getSettings().onBeginEditing;o&&!1===o()||super.beginEditing(e,t)}createElements(){super.createElements();const e=this.hot.rootDocument.createElement("DIV");e.className="handsontableEditor",this.TEXTAREA_PARENT.appendChild(e),this.htContainer=e,this.assignHooks()}finishEditing(e,t,o){if(this.htEditor&&this.htEditor.isListening()&&this.hot.listen(),this.htEditor&&this.htEditor.getSelectedLast()){const e=this.htEditor.getValue();void 0!==e&&this.setValue(e)}super.finishEditing(e,t,o)}getHeight(){return this.htEditor.view.getTableHeight()}getWidth(){return this.htEditor.view.getTableWidth()}assignHooks(){this.hot.addHook("afterDestroy",(()=>{this.htEditor&&this.htEditor.destroy()}))}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor");super.registerShortcuts();const t={group:a,relativeToGroup:l.EDITOR_EDIT_GROUP,position:"before"},o=(e,t)=>{const o=this.htEditor;if(void 0!==e&&(e<0||o.flipped&&e>o.countRows()-1?o.deselectCell():o.selectCell(e,0),o.getData().length))return t.preventDefault(),(0,i.stopImmediatePropagation)(t),this.hot.listen(),this.TEXTAREA.focus(),!1};e.addShortcuts([{keys:[["ArrowUp"]],callback:e=>{const t=this.htEditor;let s,n;return!t.getSelectedLast()&&t.flipped?s=t.countRows()-1:t.getSelectedLast()&&(t.flipped?(n=t.getSelectedLast()[0],s=Math.max(0,n-1)):(n=t.getSelectedLast()[0],s=n-1)),o(s,e)},preventDefault:!1},{keys:[["ArrowDown"]],callback:e=>{const t=this.htEditor;let s,n;if(t.getSelectedLast()||t.flipped){if(t.getSelectedLast())if(t.flipped)s=t.getSelectedLast()[0]+1;else if(!t.flipped){const e=t.countRows()-1;n=t.getSelectedLast()[0],s=Math.min(e,n+1)}}else s=0;return o(s,e)},preventDefault:!1}],t)}unregisterShortcuts(){super.unregisterShortcuts();this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(a)}}t.HandsontableEditor=c},56138:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(29408);t.EDITOR_TYPE=s.EDITOR_TYPE,t.HandsontableEditor=s.HandsontableEditor},83645:(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllEditors=function(){(0,f.registerEditor)(n.BaseEditor),(0,f.registerEditor)(s.AutocompleteEditor),(0,f.registerEditor)(i.CheckboxEditor),(0,f.registerEditor)(r.DateEditor),(0,f.registerEditor)(l.DropdownEditor),(0,f.registerEditor)(a.HandsontableEditor),(0,f.registerEditor)(h.NumericEditor),(0,f.registerEditor)(c.PasswordEditor),(0,f.registerEditor)(u.SelectEditor),(0,f.registerEditor)(d.TextEditor),(0,f.registerEditor)(g.TimeEditor)};var s=o(80115);t.AutocompleteEditor=s.AutocompleteEditor,t.AUTOCOMPLETE_EDITOR=s.EDITOR_TYPE;var n=o(52618);t.BaseEditor=n.BaseEditor,t.BASE_EDITOR=n.EDITOR_TYPE;var i=o(39626);t.CheckboxEditor=i.CheckboxEditor,t.CHECKBOX_EDITOR=i.EDITOR_TYPE;var r=o(59127);t.DateEditor=r.DateEditor,t.DATE_EDITOR=r.EDITOR_TYPE;var l=o(50486);t.DropdownEditor=l.DropdownEditor,t.DROPDOWN_EDITOR=l.EDITOR_TYPE;var a=o(56138);t.HandsontableEditor=a.HandsontableEditor,t.HANDSONTABLE_EDITOR=a.EDITOR_TYPE;var h=o(33972);t.NumericEditor=h.NumericEditor,t.NUMERIC_EDITOR=h.EDITOR_TYPE;var c=o(46138);t.PasswordEditor=c.PasswordEditor,t.PASSWORD_EDITOR=c.EDITOR_TYPE;var u=o(7507);t.SelectEditor=u.SelectEditor,t.SELECT_EDITOR=u.EDITOR_TYPE;var d=o(64952);t.TextEditor=d.TextEditor,t.TEXT_EDITOR=d.EDITOR_TYPE;var g=o(14902);t.TimeEditor=g.TimeEditor,t.TIME_EDITOR=g.EDITOR_TYPE;var f=o(84558);t.registerEditor=f.registerEditor,t.RegisteredEditor=f.RegisteredEditor,t._getEditorInstance=f._getEditorInstance,t.getEditor=f.getEditor,t.getEditorInstance=f.getEditorInstance,t.getRegisteredEditorNames=f.getRegisteredEditorNames,t.getRegisteredEditors=f.getRegisteredEditors,t.hasEditor=f.hasEditor},33972:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(29230);t.EDITOR_TYPE=s.EDITOR_TYPE,t.NumericEditor=s.NumericEditor},29230:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(64952);const n=t.EDITOR_TYPE="numeric";class i extends s.TextEditor{static get EDITOR_TYPE(){return n}}t.NumericEditor=i},46138:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(99896);t.EDITOR_TYPE=s.EDITOR_TYPE,t.PasswordEditor=s.PasswordEditor},99896:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(64952),n=o(9893),i=o(92692);const r=t.EDITOR_TYPE="password";class l extends s.TextEditor{static get EDITOR_TYPE(){return r}createElements(){super.createElements(),this.TEXTAREA=this.hot.rootDocument.createElement("input"),this.TEXTAREA.setAttribute("type","password"),this.TEXTAREA.setAttribute("data-hot-input",""),this.TEXTAREA.className="handsontableInput",this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.hot.getSettings().ariaTags&&(0,n.setAttribute)(this.TEXTAREA,[(0,i.A11Y_HIDDEN)()]),(0,n.empty)(this.TEXTAREA_PARENT),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)}}t.PasswordEditor=l},84558:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.RegisteredEditor=d,t.getEditorInstance=t._getEditorInstance=function(e,t){let o;if("function"==typeof e)r.get(e)||g(null,e),o=r.get(e);else{if("string"!=typeof e)throw Error('Only strings and functions can be passed as "editor" parameter');o=a(e)}if(!o)throw Error(`No editor registered under name "${e}"`);return o.getInstance(t)},t.getEditor=function(e){if("function"==typeof e)return e;if(!h(e))throw Error(`No registered editor found under "${e}" name`);return a(e).getConstructor()},t.registerEditor=g,o(67834);var n=s(o(56937)),i=s(o(71263));const r=new WeakMap,{register:l,getItem:a,hasItem:h,getNames:c,getValues:u}=(0,i.default)("editors");function d(e){const t={},o=e;this.getConstructor=function(){return e},this.getInstance=function(e){return e.guid in t||(t[e.guid]=new o(e)),t[e.guid]},n.default.getSingleton().add("afterDestroy",(function(){t[this.guid]=null}))}function g(e,t){e&&"string"!=typeof e&&(e=(t=e).EDITOR_TYPE);const o=new d(t);"string"==typeof e&&l(e,o),r.set(t,o)}t.getRegisteredEditors=u,t.getRegisteredEditorNames=c,t.hasEditor=h},7507:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(24138);t.EDITOR_TYPE=s.EDITOR_TYPE,t.SelectEditor=s.SelectEditor},24138:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(52618),n=o(9893),i=o(13911);const r="ht_editor_visible",l="selectEditor",a=t.EDITOR_TYPE="select";class h extends s.BaseEditor{static get EDITOR_TYPE(){return a}init(){this.select=this.hot.rootDocument.createElement("select"),this.select.setAttribute("data-hot-input","true"),this.select.style.display="none",(0,n.addClass)(this.select,"htSelectEditor"),this.hot.rootElement.appendChild(this.select),this.registerHooks()}getValue(){return this.select.value}setValue(e){this.select.value=e}open(){this._opened=!0,this.refreshDimensions(),this.select.style.display="";this.hot.getShortcutManager().setActiveContextName("editor"),this.registerShortcuts()}close(){this._opened=!1,this.select.style.display="none",(0,n.hasClass)(this.select,r)&&(0,n.removeClass)(this.select,r),this.unregisterShortcuts(),this.clearHooks()}focus(){this.select.focus()}registerHooks(){this.addHook("afterScrollHorizontally",(()=>this.refreshDimensions())),this.addHook("afterScrollVertically",(()=>this.refreshDimensions())),this.addHook("afterColumnResize",(()=>this.refreshDimensions())),this.addHook("afterRowResize",(()=>this.refreshDimensions()))}prepare(e,t,o,s,r,l){super.prepare(e,t,o,s,r,l);const a=this.cellProperties.selectOptions;let h;h="function"==typeof a?this.prepareOptions(a(this.row,this.col,this.prop)):this.prepareOptions(a),(0,n.empty)(this.select),(0,i.objectEach)(h,((e,t)=>{const o=this.hot.rootDocument.createElement("OPTION");o.value=t,(0,n.fastInnerHTML)(o,e),this.select.appendChild(o)}))}prepareOptions(e){let t={};if(Array.isArray(e))for(let o=0,s=e.length;o<s;o++)t[e[o]]=e[o];else"object"==typeof e&&(t=e);return t}refreshValue(){const e=this.hot.getSourceDataAtCell(this.row,this.prop);this.originalValue=e,this.setValue(e),this.refreshDimensions()}refreshDimensions(){if(this.state!==s.EDITOR_STATE.EDITING)return;if(this.TD=this.getEditedCell(),!this.TD)return void this.close();const{top:e,start:t,width:o,height:i}=this.getEditedCellRect(),l=this.select.style;l.height=`${i}px`,l.width=`${o}px`,l.top=`${e}px`,l[this.hot.isRtl()?"right":"left"]=`${t}px`,l.margin="0px",(0,n.addClass)(this.select,r)}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor"),t={group:l};this.isInFullEditMode()&&e.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{const e=this.select.selectedIndex-1;e>=0&&(this.select[e].selected=!0)}},{keys:[["ArrowDown"]],callback:()=>{const e=this.select.selectedIndex+1;e<=this.select.length-1&&(this.select[e].selected=!0)}}],t)}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(l)}}t.SelectEditor=h},40559:(e,t,o)=>{"use strict";t.__esModule=!0,t.updateCaretPosition=function(e,t){const o=(0,s.getCaretPosition)(t),n=t.value.split("\n");let i=o,r=0;for(let t=0;t<n.length;t++){const s=n[t];0!==t&&(r+=n[t-1].length+1);const l=r+s.length;if("home"===e?i=r:"end"===e&&(i=l),o<=l)break}(0,s.setCaretPosition)(t,i)};var s=o(9893)},64952:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(82540);t.EDITOR_TYPE=s.EDITOR_TYPE,t.TextEditor=s.TextEditor},82540:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707)),i=o(52618),r=s(o(82629)),l=o(28890),a=o(9893),h=o(87485),c=o(11139),u=o(38893),d=o(40559),g=o(92692);const f="ht_editor_hidden",p="textEditor",m=t.EDITOR_TYPE="text";class w extends i.BaseEditor{static get EDITOR_TYPE(){return m}constructor(e){super(e),(0,n.default)(this,"eventManager",new r.default(this)),(0,n.default)(this,"autoResize",(0,c.createInputElementResizer)(this.hot.rootDocument)),(0,n.default)(this,"TEXTAREA",void 0),(0,n.default)(this,"textareaStyle",void 0),(0,n.default)(this,"TEXTAREA_PARENT",void 0),(0,n.default)(this,"textareaParentStyle",void 0),(0,n.default)(this,"layerClass",void 0),this.eventManager=new r.default(this),this.createElements(),this.bindEvents(),this.hot.addHookOnce("afterDestroy",(()=>this.destroy()))}getValue(){return this.TEXTAREA.value}setValue(e){this.TEXTAREA.value=e}open(){this.refreshDimensions(),this.showEditableElement(),this.hot.getShortcutManager().setActiveContextName("editor"),this.registerShortcuts()}close(){this.autoResize.unObserve(),(0,a.isThisHotChild)(this.hot.rootDocument.activeElement,this.hot.rootElement)&&this.hot.listen(),this.hideEditableElement(),this.unregisterShortcuts()}prepare(e,t,o,s,n,r){const l=this.state;if(super.prepare(e,t,o,s,n,r),!r.readOnly){this.refreshDimensions(!0);const{allowInvalid:e}=r;e&&!this.isOpened()&&(this.TEXTAREA.value=""),l===i.EDITOR_STATE.FINISHED||this.isOpened()||this.hideEditableElement()}}beginEditing(e,t){this.state===i.EDITOR_STATE.VIRGIN&&(this.TEXTAREA.value="",super.beginEditing(e,t))}focus(){this.TEXTAREA.select(),(0,a.setCaretPosition)(this.TEXTAREA,this.TEXTAREA.value.length)}createElements(){const{rootDocument:e}=this.hot;this.TEXTAREA=e.createElement("TEXTAREA"),(0,a.setAttribute)(this.TEXTAREA,[["data-hot-input",""],(0,g.A11Y_TABINDEX)(-1)]),this.hot.getSettings().ariaTags&&(0,a.setAttribute)(this.TEXTAREA,[(0,g.A11Y_HIDDEN)()]),(0,a.addClass)(this.TEXTAREA,"handsontableInput"),this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.textareaStyle.overflowY="visible",this.TEXTAREA_PARENT=e.createElement("DIV"),(0,a.addClass)(this.TEXTAREA_PARENT,"handsontableInputHolder"),(0,a.hasClass)(this.TEXTAREA_PARENT,this.layerClass)&&(0,a.removeClass)(this.TEXTAREA_PARENT,this.layerClass),(0,a.addClass)(this.TEXTAREA_PARENT,f),this.textareaParentStyle=this.TEXTAREA_PARENT.style,this.TEXTAREA_PARENT.appendChild(this.TEXTAREA),this.hot.rootElement.appendChild(this.TEXTAREA_PARENT)}hideEditableElement(){(0,l.isEdge)()&&(this.textareaStyle.textIndent="-99999px"),this.textareaStyle.overflowY="visible",this.textareaParentStyle.opacity="0",this.textareaParentStyle.height="1px",(0,a.removeClass)(this.TEXTAREA_PARENT,this.layerClass),(0,a.addClass)(this.TEXTAREA_PARENT,f)}showEditableElement(){this.textareaParentStyle.height="",this.textareaParentStyle.overflow="",this.textareaParentStyle.position="",this.textareaParentStyle[this.hot.isRtl()?"left":"right"]="auto",this.textareaParentStyle.opacity="1",this.textareaStyle.textIndent="";const e=this.TEXTAREA_PARENT.childNodes;let t=!1;(0,h.rangeEach)(e.length-1,(o=>{const s=e[o];if((0,a.hasClass)(s,"handsontableEditor"))return t=!0,!1})),(0,a.hasClass)(this.TEXTAREA_PARENT,f)&&(0,a.removeClass)(this.TEXTAREA_PARENT,f),t?(this.layerClass="ht_editor_visible",(0,a.addClass)(this.TEXTAREA_PARENT,this.layerClass)):(this.layerClass=this.getEditedCellsLayerClass(),(0,a.addClass)(this.TEXTAREA_PARENT,this.layerClass))}refreshValue(){const e=this.hot.toPhysicalRow(this.row),t=this.hot.getSourceDataAtCell(e,this.col);this.originalValue=t,this.setValue(t),this.refreshDimensions()}refreshDimensions(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.state!==i.EDITOR_STATE.EDITING&&!e)return;if(this.TD=this.getEditedCell(),!this.TD)return void(e||this.close());const{top:t,start:o,width:s,maxWidth:n,height:r,maxHeight:l}=this.getEditedCellRect();this.textareaParentStyle.top=`${t}px`,this.textareaParentStyle[this.hot.isRtl()?"right":"left"]=`${o}px`,this.showEditableElement();const a=this.hot.rootWindow.getComputedStyle(this.TD);this.TEXTAREA.style.fontSize=a.fontSize,this.TEXTAREA.style.fontFamily=a.fontFamily,this.TEXTAREA.style.backgroundColor=this.TD.style.backgroundColor;const h=this.hot.rootWindow.getComputedStyle(this.TEXTAREA),c=parseInt(h.paddingLeft,10)+parseInt(h.paddingRight,10),u=parseInt(h.paddingTop,10)+parseInt(h.paddingBottom,10),d=s-c,g=r-u,f=n-c,p=l-u;this.autoResize.init(this.TEXTAREA,{minWidth:Math.min(d,f),minHeight:Math.min(g,p),maxWidth:f,maxHeight:p},!0)}bindEvents(){(0,l.isIOS)()&&this.eventManager.addEventListener(this.TEXTAREA,"focusout",(()=>this.finishEditing(!1))),this.addHook("afterScrollHorizontally",(()=>this.refreshDimensions())),this.addHook("afterScrollVertically",(()=>this.refreshDimensions())),this.addHook("afterColumnResize",(()=>{this.refreshDimensions(),this.state===i.EDITOR_STATE.EDITING&&this.focus()})),this.addHook("afterRowResize",(()=>{this.refreshDimensions(),this.state===i.EDITOR_STATE.EDITING&&this.focus()}))}allowKeyEventPropagation(){}destroy(){this.eventManager.destroy(),this.clearHooks()}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor"),t={runOnlyIf:()=>(0,u.isDefined)(this.hot.getSelected()),group:p},o=()=>{this.hot.rootDocument.execCommand("insertText",!1,"\n")};e.addShortcuts([{keys:[["Control","Enter"]],callback:()=>(o(),!1),runOnlyIf:e=>!this.hot.selection.isMultiple()&&!e.altKey},{keys:[["Meta","Enter"]],callback:()=>(o(),!1),runOnlyIf:()=>!this.hot.selection.isMultiple()},{keys:[["Alt","Enter"]],callback:()=>(o(),!1)},{keys:[["Home"]],callback:(e,t)=>{let[o]=t;(0,d.updateCaretPosition)(o,this.TEXTAREA)}},{keys:[["End"]],callback:(e,t)=>{let[o]=t;(0,d.updateCaretPosition)(o,this.TEXTAREA)}}],t)}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(p)}}t.TextEditor=w},14902:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(9412);t.EDITOR_TYPE=s.EDITOR_TYPE,t.TimeEditor=s.TimeEditor},9412:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(64952);const n=t.EDITOR_TYPE="time";class i extends s.TextEditor{static get EDITOR_TYPE(){return n}prepare(e,t,o,s,n,i){super.prepare(e,t,o,s,n,i),this.TEXTAREA.dir="ltr"}}t.TimeEditor=i},82629:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.getListenersCounter=function(){return r},o(15724);var n=s(o(85707)),i=o(79729);let r=0;t.default=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,n.default)(this,"context",void 0),this.context=e||this,this.context.eventListeners||(this.context.eventListeners=[])}addEventListener(e,t,o){let s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];function n(e){o.call(this,function(e){const t=e.stopImmediatePropagation;return e.stopImmediatePropagation=function(){t.apply(this),(0,i.stopImmediatePropagation)(this)},e}(e))}return this.context.eventListeners.push({element:e,event:t,callback:o,callbackProxy:n,options:s,eventManager:this}),e.addEventListener(t,n,s),r+=1,()=>{this.removeEventListener(e,t,o)}}removeEventListener(e,t,o){let s,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=this.context.eventListeners.length;for(;i;)if(i-=1,s=this.context.eventListeners[i],s.event===t&&s.element===e){if(o&&o!==s.callback)continue;if(n&&s.eventManager!==this)continue;this.context.eventListeners.splice(i,1),s.element.removeEventListener(s.event,s.callbackProxy,s.options),r-=1}}clearEvents(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.context)return;let t=this.context.eventListeners.length;for(;t;){t-=1;const o=this.context.eventListeners[t];e&&o.eventManager!==this||(this.context.eventListeners.splice(t,1),o.element.removeEventListener(o.event,o.callbackProxy,o.options),r-=1)}}clear(){this.clearEvents()}destroy(){this.clearEvents(),this.context=null}destroyWithOwnEventsOnly(){this.clearEvents(!0),this.context=null}fireEvent(e,t){let o=e.document,s=e;o||(o=e.ownerDocument?e.ownerDocument:e,s=o.defaultView);const n={bubbles:!0,cancelable:"mousemove"!==t,view:s,detail:0,screenX:0,screenY:0,clientX:1,clientY:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:void 0};let i;o.createEvent?(i=o.createEvent("MouseEvents"),i.initMouseEvent(t,n.bubbles,n.cancelable,n.view,n.detail,n.screenX,n.screenY,n.clientX,n.clientY,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey,n.button,n.relatedTarget||o.body.parentNode)):i=o.createEventObject(),e.dispatchEvent?e.dispatchEvent(i):e.fireEvent(`on${t}`,i)}}},26505:(e,t,o)=>{"use strict";t.__esModule=!0,o(67834);var s=o(83119),n=o(9893),i=o(78832);function r(e,t,o){l(e,t),t.set(e,o)}function l(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function a(e,t){return e.get(c(e,t))}function h(e,t,o){return e.set(c(e,t),o),o}function c(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}const u=Object.freeze({CELL:"cell",MIXED:"mixed"});var d=new WeakMap,g=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,w=new WeakSet;function C(e){var t;const o=null===(t=a(d,this).getSelectedRangeLast())||void 0===t?void 0:t.highlight;if(!o||!a(d,this).selection.isCellVisible(o))return void e(null);const s=a(d,this).getCell(o.row,o.col,!0);null===s?a(d,this).addHookOnce("afterScroll",(()=>{e(a(d,this).getCell(o.row,o.col,!0))})):e(s)}function v(){c(w,this,C).call(this,(e=>{const{activeElement:t}=a(d,this).rootDocument;t&&(0,n.isOutsideInput)(t)&&t.blur(),this.focusOnHighlightedCell(e)}))}function y(){c(w,this,C).call(this,(e=>{this.getFocusMode()===u.MIXED&&"TD"===e.nodeName&&this.refocusToEditorTextarea()}))}function E(e){"boolean"==typeof e.imeFastEdit&&this.setFocusMode(e.imeFastEdit?u.MIXED:u.CELL)}t.FocusManager=class{constructor(e){var t,o,s=this;l(t=this,o=w),o.add(t),r(this,d,void 0),r(this,g,void 0),r(this,f,1),r(this,p,null),r(this,m,new Map);const n=e.getSettings();h(d,this,e),h(g,this,n.imeFastEdit?u.MIXED:u.CELL),a(d,this).addHook("afterUpdateSettings",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return c(w,s,E).call(s,...t)})),a(d,this).addHook("afterSelection",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return c(w,s,v).call(s,...t)})),a(d,this).addHook("afterSelectionFocusSet",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return c(w,s,v).call(s,...t)})),a(d,this).addHook("afterSelectionEnd",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return c(w,s,y).call(s,...t)}))}getFocusMode(){return a(g,this)}setFocusMode(e){Object.values(u).includes(e)?h(g,this,e):(0,s.warn)(`"${e}" is not a valid focus mode.`)}getRefocusDelay(){return a(f,this)}setRefocusDelay(e){h(f,this,e)}setRefocusElementGetter(e){h(p,this,e)}getRefocusElement(){return"function"==typeof a(p,this)?a(p,this).call(this):null===(e=a(d,this).getActiveEditor())||void 0===e?void 0:e.TEXTAREA;var e}focusOnHighlightedCell(e){const t=e=>{var t,o;const s=null===(t=a(d,this).getSelectedRangeLast())||void 0===t?void 0:t.highlight;if(!s)return;let n=a(d,this).runHooks("modifyFocusedElement",s.row,s.col,e);n instanceof HTMLElement||(n=e),!n||null!==(o=a(d,this).getActiveEditor())&&void 0!==o&&o.isOpened()||n.focus({preventScroll:!0})};e?t(e):c(w,this,C).call(this,(e=>t(e)))}refocusToEditorTextarea(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a(f,this);const o=this.getRefocusElement();!a(d,this).getSettings().imeFastEdit||null!==(e=a(d,this).getActiveEditor())&&void 0!==e&&e.isOpened()||!o||(a(m,this).has(t)||a(m,this).set(t,(0,i.debounce)((()=>{o.select()}),t)),a(m,this).get(t)())}}},92692:(e,t)=>{"use strict";t.__esModule=!0;t.A11Y_TABINDEX=e=>["tabindex",e];t.A11Y_TREEGRID=()=>["role","treegrid"];t.A11Y_PRESENTATION=()=>["role","presentation"];t.A11Y_GRIDCELL=()=>["role","gridcell"];t.A11Y_ROWHEADER=()=>["role","rowheader"];t.A11Y_ROWGROUP=()=>["role","rowgroup"];t.A11Y_COLUMNHEADER=()=>["role","columnheader"];t.A11Y_ROW=()=>["role","row"];t.A11Y_MENU=()=>["role","menu"];t.A11Y_MENU_ITEM=()=>["role","menuitem"];t.A11Y_MENU_ITEM_CHECKBOX=()=>["role","menuitemcheckbox"];t.A11Y_COMBOBOX=()=>["role","combobox"];t.A11Y_LISTBOX=()=>["role","listbox"];t.A11Y_OPTION=()=>["role","option"];t.A11Y_CHECKBOX=()=>["role","checkbox"];t.A11Y_SCOPE_COL=()=>["scope","col"];t.A11Y_SCOPE_ROW=()=>["scope","row"];t.A11Y_TEXT=()=>["type","text"];t.A11Y_LABEL=e=>["aria-label",e];t.A11Y_HIDDEN=()=>["aria-hidden","true"];t.A11Y_DISABLED=()=>["aria-disabled","true"];t.A11Y_MULTISELECTABLE=()=>["aria-multiselectable","true"];t.A11Y_HASPOPUP=e=>["aria-haspopup",e];t.A11Y_ROWCOUNT=e=>["aria-rowcount",e];t.A11Y_COLCOUNT=e=>["aria-colcount",e];t.A11Y_ROWINDEX=e=>["aria-rowindex",e];t.A11Y_COLINDEX=e=>["aria-colindex",e];t.A11Y_EXPANDED=e=>["aria-expanded",e];t.A11Y_SORT=e=>["aria-sort",e];t.A11Y_READONLY=()=>["aria-readonly","true"];t.A11Y_INVALID=()=>["aria-invalid","true"];t.A11Y_CHECKED=e=>["aria-checked",e];t.A11Y_SELECTED=()=>["aria-selected","true"];t.A11Y_AUTOCOMPLETE=()=>["aria-autocomplete","list"];t.A11Y_CONTROLS=e=>["aria-controls",e];t.A11Y_ACTIVEDESCENDANT=e=>["aria-activedescendant",e];t.A11Y_LIVE=e=>["aria-live",e];t.A11Y_RELEVANT=e=>["aria-relevant",e];t.A11Y_SETSIZE=e=>["aria-setsize",e];t.A11Y_POSINSET=e=>["aria-posinset",e]},9175:(e,t,o)=>{"use strict";function s(e,t,o,s){let n=-1,i=e,r=o;Array.isArray(e)||(i=Array.from(e));const l=i.length;for(s&&l&&(n+=1,r=i[n]),n+=1;n<l;)r=t(r,i[n],n,i),n+=1;return r}function n(e,t){let o=0,s=e;Array.isArray(e)||(s=Array.from(e));const n=s.length;for(;o<n&&!1!==t(s[o],o,s);)o+=1;return e}function i(e){return s(e,((e,t)=>e+t),0)}t.__esModule=!0,t.arrayAvg=function(e){if(!e.length)return 0;return i(e)/e.length},t.arrayEach=n,t.arrayFilter=function(e,t){let o=0,s=e;Array.isArray(e)||(s=Array.from(e));const n=s.length,i=[];let r=-1;for(;o<n;){const e=s[o];t(e,o,s)&&(r+=1,i[r]=e),o+=1}return i},t.arrayFlatten=function e(t){return s(t,((t,o)=>t.concat(Array.isArray(o)?e(o):o)),[])},t.arrayMap=function(e,t){let o=0,s=e;Array.isArray(e)||(s=Array.from(e));const n=s.length,i=[];let r=-1;for(;o<n;){const e=s[o];r+=1,i[r]=t(e,o,s),o+=1}return i},t.arrayMax=function(e){return s(e,((e,t)=>e>t?e:t),Array.isArray(e)?e[0]:void 0)},t.arrayMin=function(e){return s(e,((e,t)=>e<t?e:t),Array.isArray(e)?e[0]:void 0)},t.arrayReduce=s,t.arraySum=i,t.arrayUnique=function(e){const t=[];return n(e,(e=>{-1===t.indexOf(e)&&t.push(e)})),t},t.extendArray=function(e,t){const o=t.length;let s=0;for(;s<o;)e.push(t[s]),s+=1},t.getDifferenceOfArrays=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];const[s,...i]=[...t];let r=s;return n(i,(e=>{r=r.filter((t=>!e.includes(t)))})),r},t.getIntersectionOfArrays=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];const[s,...i]=[...t];let r=s;return n(i,(e=>{r=r.filter((t=>e.includes(t)))})),r},t.getUnionOfArrays=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];const[s,...i]=[...t],r=new Set(s);return n(i,(e=>{n(e,(e=>{r.has(e)||r.add(e)}))})),Array.from(r)},t.pivot=function(e){const t=[];if(!e||0===e.length||!e[0]||0===e[0].length)return t;const o=e.length,s=e[0].length;for(let n=0;n<o;n++)for(let o=0;o<s;o++)t[o]||(t[o]=[]),t[o][n]=e[n][o];return t},t.stringToArray=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";return e.split(t)},t.to2dArray=function(e){const t=e.length;let o=0;for(;o<t;)e[o]=[e[o]],o+=1},o(15724),o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371)},28890:(e,t,o)=>{"use strict";t.__esModule=!0,t.isChrome=function(){return r.chrome.value},t.isChromeWebKit=function(){return r.chromeWebKit.value},t.isEdge=function(){return r.edge.value},t.isEdgeWebKit=function(){return r.edgeWebKit.value},t.isFirefox=function(){return r.firefox.value},t.isFirefoxWebKit=function(){return r.firefoxWebKit.value},t.isIOS=function(){return l.ios.value},t.isIpadOS=function(){let{maxTouchPoints:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator;return e>2&&l.mac.value},t.isLinuxOS=function(){return l.linux.value},t.isMacOS=function(){return l.mac.value},t.isMobileBrowser=function(){return r.mobile.value},t.isSafari=function(){return r.safari.value},t.isWindowsOS=function(){return l.win.value},t.setBrowserMeta=a,t.setPlatformMeta=h;var s=o(13911),n=o(93980);const i=e=>{const t={value:!1,test:(o,s)=>{t.value=e(o,s)}};return t},r={chrome:i(((e,t)=>/Chrome/.test(e)&&/Google/.test(t))),chromeWebKit:i((e=>/CriOS/.test(e))),edge:i((e=>/Edge/.test(e))),edgeWebKit:i((e=>/EdgiOS/.test(e))),firefox:i((e=>/Firefox/.test(e))),firefoxWebKit:i((e=>/FxiOS/.test(e))),mobile:i((e=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e))),safari:i(((e,t)=>/Safari/.test(e)&&/Apple Computer/.test(t)))},l={mac:i((e=>/^Mac/.test(e))),win:i((e=>/^Win/.test(e))),linux:i((e=>/^Linux/.test(e))),ios:i((e=>/iPhone|iPad|iPod/i.test(e)))};function a(){let{userAgent:e=navigator.userAgent,vendor:t=navigator.vendor}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,s.objectEach)(r,(o=>{let{test:s}=o;s(e,t)}))}function h(){let{platform:e=navigator.platform}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,s.objectEach)(l,(t=>{let{test:o}=t;o(e)}))}(0,n.isCSR)()&&(a(),h())},83119:(e,t,o)=>{"use strict";t.__esModule=!0,t.error=function(){(0,s.isDefined)(console)&&console.error(...arguments)},t.info=function(){(0,s.isDefined)(console)&&console.info(...arguments)},t.log=function(){(0,s.isDefined)(console)&&console.log(...arguments)},t.warn=function(){(0,s.isDefined)(console)&&console.warn(...arguments)};var s=o(38893)},56216:(e,t,o)=>{"use strict";t.__esModule=!0,t.countFirstRowKeys=function(e){let t=0;Array.isArray(e)&&(e[0]&&Array.isArray(e[0])?t=e[0].length:e[0]&&(0,s.isObject)(e[0])&&(t=(0,s.deepObjectSize)(e[0])));return t},t.createEmptySpreadsheetData=function(e,t){const o=[];let s;for(let n=0;n<e;n++){s=[];for(let e=0;e<t;e++)s.push("");o.push(s)}return o},t.createSpreadsheetData=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;const o=[];let s,n;for(s=0;s<e;s++){const e=[];for(n=0;n<t;n++)e.push(r(n)+(s+1));o.push(e)}return o},t.createSpreadsheetObjectData=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;const o=[];let s,n;for(s=0;s<e;s++){const e={};for(n=0;n<t;n++)e[`prop${n}`]=r(n)+(s+1);o.push(e)}return o},t.dataRowToChangesArray=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=e;const s=[];Array.isArray(e)&&Array.isArray(e[0])||(o=[e]);return o.forEach(((e,o)=>{Array.isArray(e)?e.forEach(((e,n)=>{s.push([o+t,n,e])})):Object.keys(e).forEach((n=>{s.push([o+t,n,e[n]])}))})),s},t.isArrayOfArrays=function(e){return!!(Array.isArray(e)&&e.length&&e.every((e=>Array.isArray(e))))},t.isArrayOfObjects=function(e){return!!(Array.isArray(e)&&e.length&&e.every((e=>"object"==typeof e&&!Array.isArray(e)&&null!==e)))},t.spreadsheetColumnIndex=function(e){let t=0;if(e)for(let o=0,s=e.length-1;o<e.length;o+=1,s-=1)t+=i**s*(n.indexOf(e[o])+1);return t-=1,t},t.spreadsheetColumnLabel=r,o(15724);var s=o(13911);const n="ABCDEFGHIJKLMNOPQRSTUVWXYZ",i=n.length;function r(e){let t,o=e+1,s="";for(;o>0;)t=(o-1)%i,s=String.fromCharCode(65+t)+s,o=parseInt((o-t)/i,10);return s}},72484:(e,t)=>{"use strict";t.__esModule=!0,t.getNormalizedDate=function(e){const t=new Date(e);if(!isNaN(new Date(`${e}T00:00`).getDate()))return new Date(t.getTime()+6e4*t.getTimezoneOffset());return t}},9893:(e,t,o)=>{"use strict";t.__esModule=!0,t.addClass=h,t.addEvent=function(e,t,o){e.addEventListener(t,o,!1)},t.clearTextSelection=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;e.getSelection&&(e.getSelection().empty?e.getSelection().empty():e.getSelection().removeAllRanges&&e.getSelection().removeAllRanges())},t.closest=r,t.closestDown=function(e,t,o){const s=[];let n=e;for(;n&&(n=r(n,t,o),n&&(!o||o.contains(n)));)s.push(n),n=n.host&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE?n.host:n.parentNode;const i=s.length;return i?s[i-1]:null},t.empty=d,t.fastInnerHTML=function(e,t){let o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];g.test(t)?e.innerHTML=o?(0,s.sanitize)(t):t:f(e,t)},t.fastInnerText=f,t.getCaretPosition=function(e){if(e.selectionStart)return e.selectionStart;return 0},t.getCssTransform=function(e){let t;if(e.style.transform&&""!==(t=e.style.transform))return["transform",t];return-1},t.getFrameElement=i,t.getMaximumScrollLeft=function(e){return e.scrollWidth-e.clientWidth},t.getMaximumScrollTop=function(e){return e.scrollHeight-e.clientHeight},t.getParent=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=-1,s=null,n=e;for(;null!==n;){if(o===t){s=n;break}n.host&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE?n=n.host:(o+=1,n=n.parentNode)}return s},t.getParentWindow=function(e){return i(e)&&e.parent},t.getScrollLeft=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(e===t)return m(t);return e.scrollLeft},t.getScrollTop=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(e===t)return p(t);return e.scrollTop},t.getScrollableElement=function(e){let t=e.ownerDocument,o=t?t.defaultView:void 0;t||(t=e.document?e.document:e,o=t.defaultView);const s=["auto","scroll"];let n=e.parentNode;for(;n&&n.style&&t.body!==n;){let{overflow:e,overflowX:t,overflowY:i}=n.style;if([e,t,i].includes("scroll"))return n;if(({overflow:e,overflowX:t,overflowY:i}=o.getComputedStyle(n)),s.includes(e)||s.includes(t)||s.includes(i))return n;if(n.clientHeight<=n.scrollHeight+1&&(s.includes(i)||s.includes(e)))return n;if(n.clientWidth<=n.scrollWidth+1&&(s.includes(t)||s.includes(e)))return n;n=n.parentNode}return o},t.getScrollbarWidth=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;void 0===w&&(w=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;const t=e.createElement("div");t.style.height="200px",t.style.width="100%";const o=e.createElement("div");o.style.boxSizing="content-box",o.style.height="150px",o.style.left="0px",o.style.overflow="hidden",o.style.position="absolute",o.style.top="0px",o.style.width="200px",o.style.visibility="hidden",o.appendChild(t),(e.body||e.documentElement).appendChild(o);const s=t.offsetWidth;o.style.overflow="scroll";let n=t.offsetWidth;s===n&&(n=o.clientWidth);return(e.body||e.documentElement).removeChild(o),s-n}(e));return w},t.getSelectionEndPosition=function(e){if(e.selectionEnd)return e.selectionEnd;return 0},t.getSelectionText=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;const t=e.document;let o="";e.getSelection?o=e.getSelection().toString():t.selection&&"Control"!==t.selection.type&&(o=t.selection.createRange().text);return o},t.getStyle=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;if(!e)return;if(e===o)return"width"===t?`${o.innerWidth}px`:"height"===t?`${o.innerHeight}px`:void 0;const s=e.style[t];if(""!==s&&void 0!==s)return s;const n=o.getComputedStyle(e);if(""!==n[t]&&void 0!==n[t])return n[t]},t.getTrimmingContainer=function(e){const t=e.ownerDocument,o=t.defaultView;let s=e.parentNode;for(;s&&s.style&&t.body!==s;){if("visible"!==s.style.overflow&&""!==s.style.overflow)return s;const e=o.getComputedStyle(s),t=["scroll","hidden","auto"],n=e.getPropertyValue("overflow"),i=e.getPropertyValue("overflow-y"),r=e.getPropertyValue("overflow-x");if(t.includes(n)||t.includes(i)||t.includes(r))return s;s=s.parentNode}return o},t.getWindowScrollLeft=m,t.getWindowScrollTop=p,t.hasAccessToParentWindow=function(e){return!!Object.getPrototypeOf(e.parent)},t.hasClass=function(e,t){if(void 0===e.classList||"string"!=typeof t||""===t)return!1;return e.classList.contains(t)},t.hasHorizontalScrollbar=function(e){return e.offsetHeight!==e.clientHeight},t.hasVerticalScrollbar=function(e){return e.offsetWidth!==e.clientWidth},t.index=function(e){let t=0,o=e;if(o.previousSibling)for(;o=o.previousSibling;)t+=1;return t},t.innerHeight=function(e){return e.clientHeight||e.innerHeight},t.innerWidth=function(e){return e.clientWidth||e.innerWidth},t.isChildOf=function(e,t){let o=e.parentNode,s=[];"string"==typeof t?s=e.defaultView?Array.prototype.slice.call(e.querySelectorAll(t),0):Array.prototype.slice.call(e.ownerDocument.querySelectorAll(t),0):s.push(t);for(;null!==o;){if(s.indexOf(o)>-1)return!0;o=o.parentNode}return!1},t.isDetached=function(e){return!e.parentNode},t.isInput=C,t.isOutsideInput=v,t.isThisHotChild=function(e,t){const o=e.closest(".handsontable");return!!o&&(o.parentNode===t||o===t)},t.isVisible=function e(t){const o=t.ownerDocument.documentElement,s=t.ownerDocument.defaultView;let n=t;for(;n!==o;){if(null===n)return!1;if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(n.host){if(n.host.impl)return e(n.host.impl);if(n.host)return e(n.host);throw new Error("Lost in Web Components world")}return!1}if("none"===s.getComputedStyle(n).display)return!1;n=n.parentNode}return!0},t.makeElementContentEditableAndSelectItsContent=y,t.matchesCSSRules=function(e,t){const{selectorText:o}=t;let s=!1;t.type===CSSRule.STYLE_RULE&&o&&(e.msMatchesSelector?s=e.msMatchesSelector(o):e.matches&&(s=e.matches(o)));return s},t.observeVisibilityChangeOnce=function(e,t){new IntersectionObserver(((o,s)=>{o.forEach((o=>{o.isIntersecting&&null!==e.offsetParent&&(t(),s.unobserve(e))}))}),{root:e.ownerDocument.body}).observe(e)},t.offset=function(e){const t=e.ownerDocument,o=t.defaultView,s=t.documentElement;let n,i,r,l=e;n=l.offsetLeft,i=l.offsetTop,r=l;for(;(l=l.offsetParent)&&l!==t.body&&"offsetLeft"in l;)n+=l.offsetLeft,i+=l.offsetTop,r=l;r&&"fixed"===r.style.position&&(n+=o.pageXOffset||s.scrollLeft,i+=o.pageYOffset||s.scrollTop);return{left:n,top:i}},t.outerHeight=function(e){return e.offsetHeight},t.outerWidth=function(e){return e.offsetWidth},t.overlayContainsElement=function(e,t,o){const s=o.parentElement.querySelector(`.ht_clone_${e}`);return s?s.contains(t):null},t.removeAttribute=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];"string"==typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);const{regexFree:o,regexes:s}=a(t,!0);o.forEach((t=>{""!==t&&e.removeAttribute(t)})),s.forEach((t=>{e.getAttributeNames().forEach((o=>{t.test(o)&&e.removeAttribute(o)}))}))},t.removeClass=c,t.removeContentEditableFromElementAndDeselect=E,t.removeEvent=function(e,t,o){e.removeEventListener(t,o,!1)},t.removeTextNodes=function e(t){if(3===t.nodeType)t.parentNode.removeChild(t);else if(["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(t.nodeName)>-1){const o=t.childNodes;for(let t=o.length-1;t>=0;t--)e(o[t])}},t.resetCssTransform=function(e){e.style.transform&&""!==e.style.transform&&(e.style.transform="")},t.runWithSelectedContendEditableElement=function(e,t){let o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];y(e,o),t(),E(e,o)},t.selectElementIfAllowed=function(e){v(e.ownerDocument.activeElement)||e.select()},t.setAttribute=u,t.setCaretPosition=function(e,t,o){void 0===o&&(o=t);if(e.setSelectionRange){e.focus();try{e.setSelectionRange(t,o)}catch(s){const n=e.parentNode,i=n.style.display;n.style.display="block",e.setSelectionRange(t,o),n.style.display=i}}},t.setOverlayPosition=function(e,t,o){e.style.transform=`translate3d(${t},${o},0)`},o(67834),o(15724);var s=o(59777),n=o(92692);function i(e){return Object.getPrototypeOf(e.parent)&&e.frameElement}function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2?arguments[2]:void 0;const{ELEMENT_NODE:s,DOCUMENT_FRAGMENT_NODE:n}=Node;let i=e;for(;null!=i&&i!==o;){const{nodeType:e,nodeName:o}=i;if(e===s&&(t.includes(o)||t.includes(i)))return i;const{host:r}=i;i=r&&e===n?r:i.parentNode}return null}function l(e){return e&&e.length?e.filter((e=>!!e)):[]}function a(e,t){if(!e||!e.length)return t?{regexFree:[],regexes:[]}:[];const o=[],s=[];return s.push(...e.filter((e=>{const s=e instanceof RegExp;return s&&t&&o.push(e),!s}))),t?{regexFree:s,regexes:o}:s}function h(e,t){"string"==typeof t&&(t=t.split(" ")),(t=l(t)).length>0&&e.classList.add(...t)}function c(e,t){"string"==typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);let{regexFree:o,regexes:s}=a(t,!0);o=l(o),o.length>0&&e.classList.remove(...o),s.forEach((t=>{e.classList.forEach((o=>{t.test(o)&&e.classList.remove(o)}))}))}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2?arguments[2]:void 0;Array.isArray(t)||(t=[[t,o]]),t.forEach((t=>{Array.isArray(t)&&""!==t[0]&&e.setAttribute(...t)}))}function d(e){let t;for(;t=e.lastChild;)e.removeChild(t)}const g=t.HTML_CHARACTERS=/(<(.*)>|&(.*);)/;function f(e,t){const o=e.firstChild;o&&3===o.nodeType&&null===o.nextSibling?o.textContent=t:(d(e),e.appendChild(e.ownerDocument.createTextNode(t)))}function p(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).scrollY}function m(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).scrollX}let w;function C(e){return e&&(["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function v(e){return C(e)&&!1===e.hasAttribute("data-hot-input")}function y(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const s=e.ownerDocument,i=s.createRange(),r=s.defaultView.getSelection();u(e,"contenteditable",!0),o&&u(e,...(0,n.A11Y_HIDDEN)()),t&&h(e,"invisibleSelection"),i.selectNodeContents(e),r.removeAllRanges(),r.addRange(i)}function E(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const o=e.ownerDocument.defaultView.getSelection();e.hasAttribute("aria-hidden")&&e.removeAttribute("aria-hidden"),o.removeAllRanges(),t&&c(e,"invisibleSelection"),e.removeAttribute("contenteditable")}},79729:(e,t)=>{"use strict";t.__esModule=!0,t.isImmediatePropagationStopped=function(e){return!1===e.isImmediatePropagationEnabled},t.isLeftClick=function(e){return 0===e.button},t.isRightClick=function(e){return 2===e.button},t.isTouchEvent=function(e){return e instanceof TouchEvent},t.offsetRelativeTo=function(e,t){const o={x:e.offsetX,y:e.offsetY};let s=e.target;if(!(t instanceof HTMLElement)||s!==t&&s.contains(t))return o;for(;s!==t;)o.x+=s.offsetLeft,o.y+=s.offsetTop,s=s.offsetParent;return o},t.stopImmediatePropagation=function(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0}},93980:(e,t)=>{"use strict";let o;t.__esModule=!0,t.cancelAnimationFrame=function(e){window.cancelAnimationFrame(e)},t.getComparisonFunction=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(o)return o;o="object"==typeof Intl?new Intl.Collator(e,t).compare:"function"==typeof String.prototype.localeCompare?(e,t)=>`${e}`.localeCompare(t):(e,t)=>e===t?0:e>t?-1:1;return o},t.isCSR=function(){return"undefined"!=typeof window},t.isTouchSupported=function(){return"ontouchstart"in window},t.requestAnimationFrame=function(e){return window.requestAnimationFrame(e)}},78832:(e,t,o)=>{"use strict";t.__esModule=!0,t.curry=function(e){const t=e.length;return function o(s){return function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];const l=s.concat(i);let a;return a=l.length>=t?e.apply(this,l):o(l),a}}([])},t.curryRight=function(e){const t=e.length;return function o(s){return function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];const l=s.concat(i.reverse());let a;return a=l.length>=t?e.apply(this,l):o(l),a}}([])},t.debounce=function(e){let t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,s=null;return function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return s&&clearTimeout(s),s=setTimeout((()=>{t=e.apply(this,i)}),o),t}},t.fastCall=function(e,t,o,s,i,r,l,a){if((0,n.isDefined)(a))return e.call(t,o,s,i,r,l,a);if((0,n.isDefined)(l))return e.call(t,o,s,i,r,l);if((0,n.isDefined)(r))return e.call(t,o,s,i,r);if((0,n.isDefined)(i))return e.call(t,o,s,i);if((0,n.isDefined)(s))return e.call(t,o,s);if((0,n.isDefined)(o))return e.call(t,o);return e.call(t)},t.isFunction=function(e){return"function"==typeof e},t.partial=function(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];return function(){for(var t=arguments.length,s=new Array(t),n=0;n<t;n++)s[n]=arguments[n];return e.apply(this,o.concat(s))}},t.pipe=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];const[n,...i]=t;return function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return(0,s.arrayReduce)(i,((e,t)=>t(e)),n.apply(this,t))}},t.throttle=i,t.throttleAfterHits=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;const s=i(e,t);let n=o;function r(){for(var t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return n?(n-=1,e.apply(this,o)):s.apply(this,o)}return r.clearHits=function(){n=o},r};var s=o(9175),n=o(38893);function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,o=0;const s={lastCallThrottled:!0};let n=null;return function(){for(var i=arguments.length,r=new Array(i),l=0;l<i;l++)r[l]=arguments[l];const a=Date.now();let h=!1;s.lastCallThrottled=!0,o||(o=a,h=!0);const c=t-(a-o);return h?(s.lastCallThrottled=!1,e.apply(this,r)):(n&&clearTimeout(n),n=setTimeout((()=>{s.lastCallThrottled=!1,e.apply(this,r),o=0,n=void 0}),c)),s}}},38893:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t._injectProductInfo=function(e,t){const o=!l(e),s="string"==typeof e&&"non-commercial-and-evaluation"===e.toLowerCase(),i="0.0.0-next-517ec9c-20240930";let r,v="invalid",y="invalid";const E=function(e){let t=[][a],o=t;if(e[a]!==d("Z"))return!1;for(let t="",s="B<H4P+".split(""),n=d(s.shift());n;n=d(s.shift()||"A"))--n<""[a]?o|=(c(`${c(h(t)+(h(u(e,Math.abs(n),2))+[]).padStart(2,"0"))}`)%97||2)>>1:t=u(e,n,n?1===s[a]?9:8:6);return o===t}(e=g(e||""));if(o||s||E)if(E){const t=(0,n.default)("30/07/2024","DD/MM/YYYY"),o=Math.floor(t.toDate().getTime()/864e5),s=f(e);r=(0,n.default)(864e5*(s+1),"x").format("MMMM DD, YYYY"),o>s?(v="expired",y="expired"):(v="valid",y="valid")}else s?(v="non_commercial",y="valid"):(v="invalid",y="invalid");else v="missing",y="missing";p()&&(v="valid",y="valid");if(!m&&"valid"!==v){w[v]({keyValidityDate:r,hotVersion:i})&&console["non_commercial"===v?"info":"warn"](w[v]({keyValidityDate:r,hotVersion:i})),m=!0}if("valid"!==y&&t.parentNode){if(C[y]({keyValidityDate:r,hotVersion:i})){const e=document.createElement("div");e.className="hot-display-license-info",e.innerHTML=C[y]({keyValidityDate:r,hotVersion:i}),t.parentNode.insertBefore(e,t.nextSibling)}}},t.isDefined=function(e){return void 0!==e},t.isEmpty=l,t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t.isUndefined=r,t.stringify=function(e){let t;switch(typeof e){case"string":case"number":t=`${e}`;break;case"object":t=null===e?"":e.toString();break;case"undefined":t="";break;default:t=e.toString()}return t};var n=s(o(86798)),i=o(28927);function r(e){return void 0===e}function l(e){return null===e||""===e||r(e)}const a="length",h=e=>parseInt(e,16),c=e=>parseInt(e,10),u=(e,t,o)=>e.substr(t,o),d=e=>e.codePointAt(0)-65,g=e=>`${e}`.replace(/\-/g,""),f=e=>h(u(g(e),h("12"),d("F")))/(h(u(g(e),d("B"),~~![][a]))||9),p=()=>"undefined"!=typeof location&&/^([a-z0-9\-]+\.)?\x68\x61\x6E\x64\x73\x6F\x6E\x74\x61\x62\x6C\x65\x2E\x63\x6F\x6D$/i.test(location.host);let m=!1;const w={invalid:()=>i.toSingleLine`
36
36
  The license key for Handsontable is invalid.\x20
37
37
  If you need any help, contact us at support@handsontable.com.`,expired:e=>{let{keyValidityDate:t,hotVersion:o}=e;return i.toSingleLine`
38
38
  The license key for Handsontable expired on ${t}, and is not valid for the installed\x20
@@ -64,29 +64,29 @@
64
64
  before using it. Read more about this issue at: https://docs.handsontable.com/i18n/missing-language-code.`)};var s=o(38893),n=o(13911),i=o(83119),r=o(28927)},31872:(e,t,o)=>{"use strict";t.__esModule=!0,o(15724);var s=o(9175),n=o(13911);const i={_hooksStorage:Object.create(null),addHook(e,t){return this._hooksStorage[e]||(this._hooksStorage[e]=[]),this.hot.addHook(e,t),this._hooksStorage[e].push(t),this},removeHooksByKey(e){(0,s.arrayEach)(this._hooksStorage[e]||[],(t=>{this.hot.removeHook(e,t)}))},clearHooks(){(0,n.objectEach)(this._hooksStorage,((e,t)=>this.removeHooksByKey(t))),this._hooksStorage={}}};(0,n.defineGetter)(i,"MIXIN_NAME","hooksRefRegisterer",{writable:!1,enumerable:!1});t.default=i},63870:(e,t,o)=>{"use strict";t.__esModule=!0,o(15724);var s=o(13911),n=o(78832);const i={_localHooks:Object.create(null),addLocalHook(e,t){return this._localHooks[e]||(this._localHooks[e]=[]),this._localHooks[e].push(t),this},runLocalHooks(e,t,o,s,i,r,l){if(this._localHooks[e]){const a=this._localHooks[e].length;for(let h=0;h<a;h++)(0,n.fastCall)(this._localHooks[e][h],this,t,o,s,i,r,l)}},clearLocalHooks(){return this._localHooks={},this}};(0,s.defineGetter)(i,"MIXIN_NAME","localHooks",{writable:!1,enumerable:!1});t.default=i},56937:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(15724),o(63979);var n=s(o(85707)),i=o(9175),r=o(13911),l=o(59777),a=o(83119),h=o(28927),c=o(78832);const u=["afterCellMetaReset","afterChange","afterContextMenuDefaultOptions","beforeContextMenuSetItems","afterDropdownMenuDefaultOptions","beforeDropdownMenuSetItems","afterContextMenuHide","beforeContextMenuShow","afterContextMenuShow","afterCopyLimit","beforeCreateCol","afterColumnSequenceChange","afterCreateCol","beforeCreateRow","afterCreateRow","afterDeselect","afterDestroy","afterDocumentKeyDown","afterDrawSelection","beforeRemoveCellClassNames","afterGetCellMeta","afterGetColHeader","afterGetRowHeader","afterInit","afterLoadData","afterUpdateData","afterMomentumScroll","afterOnCellCornerMouseDown","afterOnCellCornerDblClick","afterOnCellMouseDown","afterOnCellMouseUp","afterOnCellContextMenu","afterOnCellMouseOver","afterOnCellMouseOut","afterRemoveCol","afterRemoveRow","beforeRenderer","afterRenderer","afterRowSequenceChange","beforeViewportScrollVertically","beforeViewportScrollHorizontally","beforeViewportScroll","afterScrollHorizontally","afterScrollVertically","afterScroll","afterSelection","afterSelectionByProp","afterSelectionEnd","afterSelectionEndByProp","afterSelectionFocusSet","beforeSelectColumns","afterSelectColumns","beforeSelectRows","afterSelectRows","afterSetCellMeta","afterRemoveCellMeta","afterSetDataAtCell","afterSetDataAtRowProp","afterSetSourceDataAtCell","afterUpdateSettings","afterValidate","beforeLanguageChange","afterLanguageChange","beforeAutofill","afterAutofill","beforeCellAlignment","beforeChange","beforeChangeRender","beforeDrawBorders","beforeGetCellMeta","beforeRemoveCellMeta","beforeInit","beforeInitWalkontable","beforeLoadData","beforeUpdateData","beforeKeyDown","beforeOnCellMouseDown","beforeOnCellMouseUp","beforeOnCellContextMenu","beforeOnCellMouseOver","beforeOnCellMouseOut","beforeRemoveCol","beforeRemoveRow","beforeViewRender","afterViewRender","beforeRender","afterRender","beforeRowWrap","beforeColumnWrap","beforeSetCellMeta","beforeSelectionFocusSet","beforeSetRangeStartOnly","beforeSetRangeStart","beforeSetRangeEnd","beforeSelectionHighlightSet","beforeTouchScroll","beforeValidate","beforeValueRender","construct","init","modifyColHeader","modifyColWidth","modifyFiltersMultiSelectValue","modifyFocusedElement","modifyRowHeader","modifyRowHeight","modifyRowHeightByOverlayName","modifyData","modifySourceData","modifyRowData","modifyGetCellCoords","modifyFocusOnTabNavigation","beforeHighlightingRowHeader","beforeHighlightingColumnHeader","persistentStateLoad","persistentStateReset","persistentStateSave","beforeColumnSort","afterColumnSort","modifyAutofillRange","modifyCopyableRange","beforeCut","afterCut","beforeCopy","afterCopy","beforePaste","afterPaste","beforeColumnFreeze","afterColumnFreeze","beforeColumnMove","afterColumnMove","beforeColumnUnfreeze","afterColumnUnfreeze","beforeRowMove","afterRowMove","beforeColumnResize","afterColumnResize","beforeRowResize","afterRowResize","afterGetColumnHeaderRenderers","afterGetRowHeaderRenderers","beforeStretchingColumnWidth","beforeFilter","afterFilter","afterFormulasValuesUpdate","afterNamedExpressionAdded","afterNamedExpressionRemoved","afterSheetAdded","afterSheetRenamed","afterSheetRemoved","modifyColumnHeaderHeight","modifyColumnHeaderValue","beforeUndo","beforeUndoStackChange","afterUndo","afterUndoStackChange","beforeRedo","beforeRedoStackChange","afterRedo","afterRedoStackChange","modifyRowHeaderWidth","modifyTransformFocus","modifyTransformStart","modifyTransformEnd","afterModifyTransformFocus","afterModifyTransformStart","afterModifyTransformEnd","afterViewportRowCalculatorOverride","afterViewportColumnCalculatorOverride","afterPluginsInitialized","beforeHideRows","afterHideRows","beforeUnhideRows","afterUnhideRows","beforeHideColumns","afterHideColumns","beforeUnhideColumns","afterUnhideColumns","beforeTrimRow","afterTrimRow","beforeUntrimRow","afterUntrimRow","beforeDropdownMenuShow","afterDropdownMenuShow","afterDropdownMenuHide","beforeAddChild","afterAddChild","beforeDetachChild","afterDetachChild","beforeBeginEditing","afterBeginEditing","beforeMergeCells","afterMergeCells","beforeUnmergeCells","afterUnmergeCells","afterListen","afterUnlisten","afterRefreshDimensions","beforeRefreshDimensions","beforeColumnCollapse","afterColumnCollapse","beforeColumnExpand","afterColumnExpand","modifyAutoColumnSizeSeed"],d=h.toSingleLine`The plugin hook "[hookName]" was removed in Handsontable [removedInVersion].\x20
65
65
  Please consult release notes https://github.com/handsontable/handsontable/releases/tag/[removedInVersion] to\x20
66
66
  learn about the migration path.`,g=new Map([["modifyRow","8.0.0"],["modifyCol","8.0.0"],["unmodifyRow","8.0.0"],["unmodifyCol","8.0.0"],["skipLengthCache","8.0.0"],["hiddenColumn","8.0.0"],["hiddenRow","8.0.0"]]),f=new Map([[]]),p=new WeakMap;class m{static getSingleton(){return w}constructor(){(0,n.default)(this,"globalBucket",void 0),this.globalBucket=this.createEmptyBucket()}createEmptyBucket(){const e=Object.create(null);return(0,i.arrayEach)(u,(t=>{e[t]=[],this.initOrderMap(e,t)})),e}getBucket(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?(e.pluginHookBucket||(e.pluginHookBucket=this.createEmptyBucket()),e.pluginHookBucket):this.globalBucket}add(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,s=arguments.length>3?arguments[3]:void 0;if(Array.isArray(t))(0,i.arrayEach)(t,(t=>this.add(e,t,o)));else{g.has(e)&&(0,a.warn)((0,l.substitute)(d,{hookName:e,removedInVersion:g.get(e)})),f.has(e)&&(0,a.warn)(f.get(e));const n=this.getBucket(o);if(void 0===n[e]&&(this.register(e),n[e]=[],this.initOrderMap(n,e)),t.skip=!1,-1===n[e].indexOf(t)){let o=!1;t.initialHook&&(0,i.arrayEach)(n[e],((s,i)=>{if(s.initialHook)return n[e][i]=t,o=!0,!1})),o||n[e].push(t)}this.setCallbackOrderIndex(n,e,t,s),this.orderBucketByOrderIndex(n,e)}return this}once(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,s=arguments.length>3?arguments[3]:void 0;Array.isArray(t)?(0,i.arrayEach)(t,(t=>this.once(e,t,o))):(t.runOnce=!0,this.add(e,t,o,s))}remove(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const s=this.getBucket(o);return void 0!==s[e]&&s[e].indexOf(t)>=0&&(t.skip=!0,!0)}has(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const o=this.getBucket(t);return!(void 0===o[e]||!o[e].length)}run(e,t,o,s,n,i,r,l){{const a=this.globalBucket[t],h=a?a.length:0;let u=0;if(h)for(;u<h;){if(!a[u]||a[u].skip){u+=1;continue}const h=(0,c.fastCall)(a[u],e,o,s,n,i,r,l);void 0!==h&&(o=h),a[u]&&a[u].runOnce&&this.remove(t,a[u]),u+=1}}{const a=this.getBucket(e)[t],h=a?a.length:0;let u=0;if(h)for(;u<h;){if(!a[u]||a[u].skip){u+=1;continue}const h=(0,c.fastCall)(a[u],e,o,s,n,i,r,l);void 0!==h&&(o=h),a[u]&&a[u].runOnce&&this.remove(t,a[u],e),u+=1}}return o}destroy(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,r.objectEach)(this.getBucket(e),((e,t,o)=>o[t].length=0))}register(e){this.isRegistered(e)||u.push(e)}deregister(e){this.isRegistered(e)&&u.splice(u.indexOf(e),1)}isDeprecated(e){return f.has(e)||g.has(e)}isRegistered(e){return u.indexOf(e)>=0}getRegistered(){return u}setCallbackOrderIndex(e,t,o,s){const n=Number.isInteger(s)?s:0,i=this.getCallbackOrderMap(e,t);i.set(n,[...i.get(n)||[],o])}orderBucketByOrderIndex(e,t){const o=this.getCallbackOrderMap(e,t);void 0===o||0===o.size||1===o.size&&o.has(0)||(e[t]=[...o].sort(((e,t)=>e[0]-t[0])).flatMap((e=>{let[,t]=e;return t})))}initOrderMap(e,t){p.has(e)||p.set(e,[]),p.get(e)[t]=new Map}getCallbackOrderMap(e,t){return p.get(e)[t]}}const w=new m;t.default=m},14578:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(61205),r=o(93980),l=s(o(1817)),a=s(o(56937)),h=o(13911),c=o(87485),u=s(o(95532)),d=o(59777),g=o(90),f=o(93969);function p(e,t,o){m(e,t),t.set(e,o)}function m(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function w(e,t){return e.get(v(e,t))}function C(e,t,o){return e.set(v(e,t),o),o}function v(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}a.default.getSingleton().register("modifyAutoColumnSizeSeed");const y=t.PLUGIN_KEY="autoColumnSize",E=t.PLUGIN_PRIORITY=10;var S=new WeakMap,R=new WeakMap,b=new WeakSet;class _ extends i.BasePlugin{static get PLUGIN_KEY(){return y}static get PLUGIN_PRIORITY(){return E}static get SETTING_KEYS(){return!0}static get CALCULATION_STEP(){return 50}static get SYNC_CALCULATION_LIMIT(){return 50}constructor(e){var t,o;super(e),m(t=this,o=b),o.add(t),(0,n.default)(this,"ghostTable",new l.default(this.hot)),(0,n.default)(this,"samplesGenerator",new u.default(((e,t)=>{const o=this.hot.toPhysicalRow(e),s=this.hot.toPhysicalColumn(t);if(this.hot.rowIndexMapper.isHidden(o)||this.hot.columnIndexMapper.isHidden(s))return!1;const n=this.hot.getCellMeta(e,t);let i="";n.spanned||(i=this.hot.getDataAtCell(e,t));let r="";return this.hot.hasHook("modifyAutoColumnSizeSeed")&&(r=this.hot.runHooks("modifyAutoColumnSizeSeed",r,n,i)),{value:i,bundleSeed:r}}))),(0,n.default)(this,"inProgress",!1),(0,n.default)(this,"measuredColumns",0),(0,n.default)(this,"columnWidthsMap",new f.PhysicalIndexToValueMap),p(this,S,[]),p(this,R,[]),this.hot.columnIndexMapper.registerMap("autoColumnSize",this.columnWidthsMap),this.addHook("beforeColumnResize",((e,t,o)=>v(b,this,N).call(this,e,t,o)))}isEnabled(){return!1!==this.hot.getSettings()[y]&&!this.hot.getSettings().colWidths}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[y];t&&null!==t.useHeaders&&void 0!==t.useHeaders&&this.ghostTable.setSetting("useHeaders",t.useHeaders),this.setSamplingOptions(),this.addHook("afterLoadData",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(b,e,O).call(e,...o)})),this.addHook("beforeChangeRender",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(b,e,I).call(e,...o)})),this.addHook("afterFormulasValuesUpdate",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(b,e,P).call(e,...o)})),this.addHook("beforeRender",(()=>v(b,this,M).call(this))),this.addHook("modifyColWidth",((e,t)=>this.getColumnWidth(t,e))),this.addHook("init",(()=>v(b,this,A).call(this))),super.enablePlugin()}updatePlugin(){C(R,this,this.findColumnsWhereHeaderWasChanged()),super.updatePlugin()}disablePlugin(){super.disablePlugin(),this.addHook("beforeColumnResize",((e,t,o)=>v(b,this,N).call(this,e,t,o)))}calculateVisibleColumnsWidth(){if(!this.hot.countRows())return;const e=this.getFirstVisibleColumn(),t=this.getLastVisibleColumn();if(-1===e||-1===t)return;const o=this.hot.renderCall;this.calculateColumnsWidth({from:e,to:t},void 0,o)}calculateColumnsWidth(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countRows()-1},o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s="number"==typeof e?{from:e,to:e}:e,n="number"==typeof t?{from:t,to:t}:t;(0,c.rangeEach)(s.from,s.to,(e=>{let t=this.hot.toPhysicalColumn(e);if(null===t&&(t=e),o||null===this.columnWidthsMap.getValueAtIndex(t)&&!this.hot._getColWidthFromSettings(t)){this.samplesGenerator.generateColumnSamples(e,n).forEach(((e,t)=>this.ghostTable.addColumn(t,e)))}})),this.ghostTable.columns.length&&(this.hot.batchExecution((()=>{this.ghostTable.getWidths(((e,t)=>{const o=this.hot.toPhysicalColumn(e);this.columnWidthsMap.setValueAtIndex(o,t)}))}),!0),this.measuredColumns=s.to+1,this.ghostTable.clean())}calculateAllColumnsWidth(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=0;const s=this.hot.countCols()-1;let n=null;this.inProgress=!0;const i=()=>{if(!this.hot)return(0,r.cancelAnimationFrame)(n),void(this.inProgress=!1);this.calculateColumnsWidth({from:o,to:Math.min(o+_.CALCULATION_STEP,s)},e,t),o=o+_.CALCULATION_STEP+1,o<s?n=(0,r.requestAnimationFrame)(i):((0,r.cancelAnimationFrame)(n),this.inProgress=!1,this.hot.view.adjustElementsSize())},l=this.getSyncCalculationLimit();l>=0&&(this.calculateColumnsWidth({from:0,to:l},e,t),o=l+1),o<s?i():this.inProgress=!1}setSamplingOptions(){const e=this.hot.getSettings()[y],t=e&&(0,h.hasOwnProperty)(e,"samplingRatio")?e.samplingRatio:void 0,o=e&&(0,h.hasOwnProperty)(e,"allowSampleDuplicates")?e.allowSampleDuplicates:void 0;t&&!isNaN(t)&&this.samplesGenerator.setSampleCount(parseInt(t,10)),o&&this.samplesGenerator.setAllowDuplicates(o)}recalculateAllColumnsWidth(){this.hot.view.isVisible()&&this.calculateAllColumnsWidth({from:0,to:this.hot.countRows()-1},!0)}getSyncCalculationLimit(){const e=this.hot.getSettings()[y];let t=_.SYNC_CALCULATION_LIMIT;const o=this.hot.countCols()-1;return(0,h.isObject)(e)&&(t=e.syncLimit,(0,d.isPercentValue)(t)?t=(0,c.valueAccordingPercent)(o,t):t>>=0),Math.min(t,o)}getColumnWidth(e,t){let o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=t;return void 0===s&&(s=this.columnWidthsMap.getValueAtIndex(this.hot.toPhysicalColumn(e)),o&&"number"==typeof s&&(s=Math.max(s,g.DEFAULT_COLUMN_WIDTH))),s}getFirstVisibleColumn(){var e;return null!==(e=this.hot.view.getFirstRenderedVisibleColumn())&&void 0!==e?e:-1}getLastVisibleColumn(){var e;return null!==(e=this.hot.view.getLastRenderedVisibleColumn())&&void 0!==e?e:-1}findColumnsWhereHeaderWasChanged(){return this.hot.getColHeader().reduce(((e,t,o)=>{const s=w(S,this).length;return(s-1<o||w(S,this)[o]!==t)&&e.push(this.hot.toVisualColumn(o)),s-1<o?w(S,this).push(t):w(S,this)[o]=t,e}),[])}clearCache(e){Array.isArray(e)?this.hot.batchExecution((()=>{e.forEach((e=>{this.columnWidthsMap.setValueAtIndex(e,null)}))}),!0):this.columnWidthsMap.clear()}isNeedRecalculate(){return!!this.columnWidthsMap.getValues().slice(0,this.measuredColumns).filter((e=>null===e)).length}destroy(){this.ghostTable.clean(),super.destroy()}}function T(e){const t={from:0,to:this.hot.countRows()-1};e.forEach((e=>{const o=this.hot.toPhysicalColumn(e);if(null!==o&&!this.hot._getColWidthFromSettings(o)){this.samplesGenerator.generateColumnSamples(e,t).forEach(((e,t)=>this.ghostTable.addColumn(t,e)))}})),this.ghostTable.columns.length&&(this.hot.batchExecution((()=>{this.ghostTable.getWidths(((e,t)=>{const o=this.hot.toPhysicalColumn(e);this.columnWidthsMap.setValueAtIndex(o,t)}))}),!0),this.ghostTable.clean())}function M(){this.calculateVisibleColumnsWidth(),this.inProgress||(v(b,this,T).call(this,w(R,this)),C(R,this,[]))}function O(e,t){t||this.recalculateAllColumnsWidth()}function I(e){const t=e.reduce(((e,t)=>{let[,o]=t;const s=this.hot.propToCol(o);return Number.isInteger(s)&&-1===e.indexOf(s)&&e.push(s),e}),[]);w(R,this).push(...t)}function N(e,t,o){let s=e;return o&&(this.calculateColumnsWidth(t,void 0,!0),s=this.getColumnWidth(t,void 0,!1)),s}function A(){C(S,this,this.hot.getColHeader()),this.recalculateAllColumnsWidth()}function P(e){const t=e.reduce(((e,t)=>{var o;const s=null===(o=t.address)||void 0===o?void 0:o.col;if(Number.isInteger(s)){const t=this.hot.toVisualColumn(s);-1===e.indexOf(t)&&e.push(t)}return e}),[]);w(R,this).push(...t)}t.AutoColumnSize=_},58764:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(14578);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.AutoColumnSize=s.AutoColumnSize},38292:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(61205),r=o(93980),l=s(o(1817)),a=o(13911),h=o(87485),c=s(o(95532)),u=o(59777),d=o(93969);function g(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function f(e,t){return e.get(p(e,t))}function p(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}const m=t.PLUGIN_KEY="autoRowSize",w=t.PLUGIN_PRIORITY=40;var C=new WeakMap,v=new WeakSet;class y extends i.BasePlugin{static get PLUGIN_KEY(){return m}static get PLUGIN_PRIORITY(){return w}static get SETTING_KEYS(){return!0}static get CALCULATION_STEP(){return 50}static get SYNC_CALCULATION_LIMIT(){return 500}constructor(e){var t,o;super(e),g(t=this,o=v),o.add(t),(0,n.default)(this,"headerHeight",null),(0,n.default)(this,"ghostTable",new l.default(this.hot)),(0,n.default)(this,"samplesGenerator",new c.default(((e,t)=>{const o=this.hot.toPhysicalRow(e),s=this.hot.toPhysicalColumn(t);if(this.hot.rowIndexMapper.isHidden(o)||this.hot.columnIndexMapper.isHidden(s))return!1;if(e>=0&&t>=0){if(this.hot.getCellMeta(e,t).hidden)return!1}let n;return e>=0?n=this.hot.getDataAtCell(e,t):-1===e&&(n=this.hot.getColHeader(t)),{value:n}}))),(0,n.default)(this,"inProgress",!1),(0,n.default)(this,"measuredRows",0),(0,n.default)(this,"rowHeightsMap",new d.PhysicalIndexToValueMap),function(e,t,o){g(e,t),t.set(e,o)}(this,C,[]),this.hot.rowIndexMapper.registerMap("autoRowSize",this.rowHeightsMap),this.addHook("beforeRowResize",((e,t,o)=>p(v,this,R).call(this,e,t,o)))}isEnabled(){const e=this.hot.getSettings()[m];return!0===e||(0,a.isObject)(e)}enablePlugin(){var e=this;this.enabled||(this.setSamplingOptions(),this.addHook("afterLoadData",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return p(v,e,b).call(e,...o)})),this.addHook("beforeChangeRender",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return p(v,e,_).call(e,...o)})),this.addHook("beforeColumnResize",(()=>this.recalculateAllRowsHeight())),this.addHook("afterFormulasValuesUpdate",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return p(v,e,M).call(e,...o)})),this.addHook("beforeRender",(()=>p(v,this,S).call(this))),this.addHook("modifyRowHeight",((e,t)=>this.getRowHeight(t,e))),this.addHook("init",(()=>p(v,this,T).call(this))),this.addHook("modifyColumnHeaderHeight",(()=>this.getColumnHeaderHeight())),super.enablePlugin())}disablePlugin(){this.headerHeight=null,super.disablePlugin(),this.addHook("beforeRowResize",((e,t,o)=>p(v,this,R).call(this,e,t,o)))}calculateVisibleRowsHeight(){if(!this.hot.countCols())return;const e=this.getFirstVisibleRow(),t=this.getLastVisibleRow();if(-1===e||-1===t)return;const o=this.hot.renderCall;this.calculateRowsHeight({from:e,to:t},void 0,o)}calculateRowsHeight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countCols()-1},o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s="number"==typeof e?{from:e,to:e}:e,n="number"==typeof t?{from:t,to:t}:t;if(null!==this.hot.getColHeader(0)){const e=this.samplesGenerator.generateRowSamples(-1,n);this.ghostTable.addColumnHeadersRow(e.get(-1))}(0,h.rangeEach)(s.from,s.to,(e=>{let t=this.hot.toPhysicalRow(e);if(null===t&&(t=e),o||null===this.rowHeightsMap.getValueAtIndex(t)){this.samplesGenerator.generateRowSamples(e,n).forEach(((e,t)=>this.ghostTable.addRow(t,e)))}})),this.ghostTable.rows.length&&(this.hot.batchExecution((()=>{this.ghostTable.getHeights(((e,t)=>{e<0?this.headerHeight=t:this.rowHeightsMap.setValueAtIndex(this.hot.toPhysicalRow(e),t)}))}),!0),this.measuredRows=s.to+1,this.ghostTable.clean())}calculateAllRowsHeight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=0;const s=this.hot.countRows()-1;let n=null;this.inProgress=!0;const i=()=>{if(!this.hot)return(0,r.cancelAnimationFrame)(n),void(this.inProgress=!1);this.calculateRowsHeight({from:o,to:Math.min(o+y.CALCULATION_STEP,s)},e,t),o=o+y.CALCULATION_STEP+1,o<s?n=(0,r.requestAnimationFrame)(i):((0,r.cancelAnimationFrame)(n),this.inProgress=!1,this.hot.view.adjustElementsSize(),this.hot.view._wt.wtOverlays.inlineStartOverlay.needFullRender&&this.hot.view._wt.wtOverlays.inlineStartOverlay.clone.draw())},l=this.getSyncCalculationLimit();l>=0&&(this.calculateRowsHeight({from:0,to:l},e,t),o=l+1),o<s?i():(this.inProgress=!1,this.hot.view.adjustElementsSize())}setSamplingOptions(){const e=this.hot.getSettings()[m],t=e&&(0,a.hasOwnProperty)(e,"samplingRatio")?e.samplingRatio:void 0,o=e&&(0,a.hasOwnProperty)(e,"allowSampleDuplicates")?e.allowSampleDuplicates:void 0;t&&!isNaN(t)&&this.samplesGenerator.setSampleCount(parseInt(t,10)),o&&this.samplesGenerator.setAllowDuplicates(o)}recalculateAllRowsHeight(){this.hot.view.isVisible()&&this.calculateAllRowsHeight({from:0,to:this.hot.countCols()-1},!0)}getSyncCalculationLimit(){const e=this.hot.getSettings()[m];let t=y.SYNC_CALCULATION_LIMIT;const o=this.hot.countRows()-1;return(0,a.isObject)(e)&&(t=e.syncLimit,(0,u.isPercentValue)(t)?t=(0,h.valueAccordingPercent)(o,t):t>>=0),Math.min(t,o)}getRowHeight(e,t){const o=e<0?this.headerHeight:this.rowHeightsMap.getValueAtIndex(this.hot.toPhysicalRow(e));let s=t;return null!==o&&o>(t||0)&&(s=o),s}getColumnHeaderHeight(){return this.headerHeight}getFirstVisibleRow(){var e;return null!==(e=this.hot.view.getFirstRenderedVisibleRow())&&void 0!==e?e:-1}getLastVisibleRow(){var e;return null!==(e=this.hot.view.getLastRenderedVisibleRow())&&void 0!==e?e:-1}clearCache(e){this.headerHeight=null,Array.isArray(e)?this.hot.batchExecution((()=>{e.forEach((e=>{this.rowHeightsMap.setValueAtIndex(e,null)}))}),!0):this.rowHeightsMap.clear()}clearCacheByRange(e){const{from:t,to:o}="number"==typeof e?{from:e,to:e}:e;this.hot.batchExecution((()=>{(0,h.rangeEach)(Math.min(t,o),Math.max(t,o),(e=>{this.rowHeightsMap.setValueAtIndex(e,null)}))}),!0)}isNeedRecalculate(){return!!this.rowHeightsMap.getValues().slice(0,this.measuredRows).filter((e=>null===e)).length}destroy(){this.ghostTable.clean(),super.destroy()}}function E(e){const t={from:0,to:this.hot.countCols()-1};e.forEach((e=>{this.samplesGenerator.generateRowSamples(e,t).forEach(((e,t)=>this.ghostTable.addRow(t,e)))})),this.ghostTable.rows.length&&(this.hot.batchExecution((()=>{this.ghostTable.getHeights(((e,t)=>{const o=this.hot.toPhysicalRow(e);this.rowHeightsMap.setValueAtIndex(o,t)}))}),!0),this.ghostTable.clean())}function S(){var e,t,o;this.calculateVisibleRowsHeight(),this.inProgress||(p(v,this,E).call(this,f(C,this)),t=this,o=[],(e=C).set(p(e,t),o))}function R(e,t,o){let s=e;return o&&(this.calculateRowsHeight(t,void 0,!0),s=this.getRowHeight(t)),s}function b(e,t){t||this.recalculateAllRowsHeight()}function _(e){const t=e.reduce(((e,t)=>{let[o]=t;return-1===e.indexOf(o)&&e.push(o),e}),[]);f(C,this).push(...t)}function T(){this.recalculateAllRowsHeight()}function M(e){const t=e.reduce(((e,t)=>{var o;const s=null===(o=t.address)||void 0===o?void 0:o.row;if(Number.isInteger(s)){const t=this.hot.toVisualRow(s);-1===e.indexOf(t)&&e.push(t)}return e}),[]);f(C,this).push(...t)}t.AutoRowSize=y},45452:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(38292);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.AutoRowSize=s.AutoRowSize},26138:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(61205),r=s(o(56937)),l=o(9893),a=o(9175),h=o(38893),c=o(91291);function u(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function d(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}r.default.getSingleton().register("modifyAutofillRange"),r.default.getSingleton().register("beforeAutofill"),r.default.getSingleton().register("afterAutofill");const g=t.PLUGIN_KEY="autofill",f=t.PLUGIN_PRIORITY=20,p=["fillHandle"];var m=new WeakSet;class w extends i.BasePlugin{constructor(){super(...arguments),u(this,m),(0,n.default)(this,"addingStarted",!1),(0,n.default)(this,"mouseDownOnCellCorner",!1),(0,n.default)(this,"mouseDragOutside",!1),(0,n.default)(this,"handleDraggedCells",0),(0,n.default)(this,"directions",[]),(0,n.default)(this,"autoInsertRow",!1)}static get PLUGIN_KEY(){return g}static get PLUGIN_PRIORITY(){return f}static get SETTING_KEYS(){return[g,...p]}isEnabled(){return this.hot.getSettings().fillHandle}enablePlugin(){this.enabled||(this.mapSettings(),this.registerEvents(),this.addHook("afterOnCellCornerMouseDown",(e=>d(m,this,v).call(this,e))),this.addHook("afterOnCellCornerDblClick",(e=>d(m,this,C).call(this,e))),this.addHook("beforeOnCellMouseOver",((e,t)=>d(m,this,y).call(this,t))),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.clearMappedSettings(),super.disablePlugin()}getSelectionData(){const e=this.hot.getSelectedRangeLast(),{row:t,col:o}=e.getTopStartCorner(),{row:s,col:n}=e.getBottomEndCorner(),i=this.hot.runHooks("modifyCopyableRange",[{startRow:t,startCol:o,endRow:s,endCol:n}]),r=[],l=[],h=[];return(0,a.arrayEach)(i,(e=>{for(let t=e.startRow;t<=e.endRow;t+=1)-1===r.indexOf(t)&&r.push(t);for(let t=e.startCol;t<=e.endCol;t+=1)-1===l.indexOf(t)&&l.push(t)})),(0,a.arrayEach)(r,(e=>{const t=[];(0,a.arrayEach)(l,(o=>{t.push(this.hot.getCopyableData(e,o))})),h.push(t)})),h}fillIn(){if(this.hot.selection.highlight.getFill().isEmpty())return!1;const[e,t,o,s]=this.hot.selection.highlight.getFill().getVisualCorners(),n=this.hot.getSelectedRangeLast(),i=n.getTopStartCorner(),r=n.getBottomEndCorner();this.resetSelectionOfDraggedArea();const l=[i.row,i.col,r.row,r.col],a=this.hot.runHooks("modifyAutofillRange",[Math.min(i.row,e),Math.min(i.col,t),Math.max(r.row,o),Math.max(r.col,s)],l),{directionOfDrag:h,startOfDragCoords:u,endOfDragCoords:d}=(0,c.getDragDirectionAndRange)(l,a,((e,t)=>this.hot._createCellCoords(e,t)));if(u&&u.row>-1&&u.col>-1){const e=this.getSelectionData(),t=n.clone(),o=this.hot._createCellRange(u,u,d),s=this.hot.runHooks("beforeAutofill",e,t,o,h);if(!1===s)return this.hot.selection.highlight.getFill().clear(),this.hot.render(),!1;let i=s;const r=s;if(["up","left"].indexOf(h)>-1&&(1!==r.length||0!==r[0].length))if(i=[],"up"===h){const e=d.row-u.row+1,t=e%r.length;for(let o=0;o<e;o++)i.push(r[(o+(r.length-t))%r.length])}else{const e=d.col-u.col+1,t=e%r[0].length;for(let o=0;o<r.length;o++){i.push([]);for(let s=0;s<e;s++)i[o].push(r[o][(s+(r[o].length-t))%r[o].length])}}this.hot.populateFromArray(u.row,u.col,i,d.row,d.col,`${this.pluginName}.fill`,null),this.setSelection(a),this.hot.runHooks("afterAutofill",i,t,o,h),this.hot.render()}else this.hot.view.render();return!0}reduceSelectionAreaIfNeeded(e){return e.row<0&&(e.row=0),e.col<0&&(e.col=0),e}getCoordsOfDragAndDropBorders(e){const t=this.hot.getSelectedRangeLast(),o=t.getBottomEndCorner();let s=e;if(this.directions.includes(c.DIRECTIONS.vertical)&&this.directions.includes(c.DIRECTIONS.horizontal)){const n=t.getTopStartCorner();(o.col<=e.col||n.col>=e.col)&&(s=this.hot._createCellCoords(o.row,e.col)),(o.row<e.row||n.row>e.row)&&(s=this.hot._createCellCoords(e.row,o.col))}else if(this.directions.includes(c.DIRECTIONS.vertical))s=this.hot._createCellCoords(e.row,o.col);else{if(!this.directions.includes(c.DIRECTIONS.horizontal))return;s=this.hot._createCellCoords(o.row,e.col)}return this.reduceSelectionAreaIfNeeded(s)}showBorder(e){const t=this.getCoordsOfDragAndDropBorders(e);t&&this.redrawBorders(t)}addRow(){this.hot._registerTimeout((()=>{this.hot.alter("insert_row_below",void 0,1,`${this.pluginName}.fill`),this.addingStarted=!1}),200)}addNewRowIfNeeded(){if(!this.hot.selection.highlight.getFill().isEmpty()&&!1===this.addingStarted&&this.autoInsertRow){const e=this.hot.getSelectedLast(),t=this.hot.selection.highlight.getFill().getVisualCorners(),o=this.hot.countRows();e[2]<o-1&&t[2]===o-1&&(this.addingStarted=!0,this.addRow())}}getIndexOfLastAdjacentFilledInRow(e){const t=this.hot.getData(),o=this.hot.countRows();let s;for(let n=e[2]+1;n<o;n++){for(let o=e[1];o<=e[3];o++){const e=t[n][o];if(!(0,h.isEmpty)(e))return-1}const o=t[n][e[1]-1],i=t[n][e[3]+1];(0,h.isEmpty)(o)&&(0,h.isEmpty)(i)||(s=n)}return s}addSelectionFromStartAreaToSpecificRowIndex(e,t){this.hot.selection.highlight.getFill().clear().add(this.hot._createCellCoords(e[0],e[1])).add(this.hot._createCellCoords(t,e[3])).commit()}setSelection(e){this.hot.selectCell(...(0,a.arrayMap)(e,(e=>Math.max(e,0))),!1,!1)}selectAdjacent(){const e=this.hot.getSelectedLast(),t=this.getIndexOfLastAdjacentFilledInRow(e);return-1!==t&&void 0!==t&&(this.addSelectionFromStartAreaToSpecificRowIndex(e,t),!0)}resetSelectionOfDraggedArea(){this.handleDraggedCells=0,this.hot.selection.highlight.getFill().clear()}redrawBorders(e){this.hot.selection.highlight.getFill().clear().add(this.hot.getSelectedRangeLast().from).add(this.hot.getSelectedRangeLast().to).add(e).commit(),this.hot.view.render()}getIfMouseWasDraggedOutside(e){const{documentElement:t}=this.hot.rootDocument,o=(0,l.offset)(this.hot.table).top-(this.hot.rootWindow.pageYOffset||t.scrollTop)+(0,l.outerHeight)(this.hot.table),s=(0,l.offset)(this.hot.table).left-(this.hot.rootWindow.pageXOffset||t.scrollLeft)+(0,l.outerWidth)(this.hot.table);return e.clientY>o&&e.clientX<=s}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mouseup",(()=>d(m,this,E).call(this))),this.eventManager.addEventListener(e,"mousemove",(e=>d(m,this,S).call(this,e)))}clearMappedSettings(){this.directions.length=0,this.autoInsertRow=!1}mapSettings(){const e=(0,c.getMappedFillHandleSetting)(this.hot.getSettings().fillHandle);this.directions=e.directions,this.autoInsertRow=e.autoInsertRow}destroy(){super.destroy()}}function C(){this.selectAdjacent()&&this.fillIn()}function v(){this.handleDraggedCells=1,this.mouseDownOnCellCorner=!0}function y(e){this.mouseDownOnCellCorner&&!this.hot.view.isMouseDown()&&this.handleDraggedCells&&(this.handleDraggedCells+=1,this.showBorder(e),this.addNewRowIfNeeded())}function E(){this.handleDraggedCells&&(this.handleDraggedCells>1&&this.fillIn(),this.handleDraggedCells=0,this.mouseDownOnCellCorner=!1)}function S(e){const t=this.getIfMouseWasDraggedOutside(e);!1===this.addingStarted&&this.handleDraggedCells>0&&t?(this.mouseDragOutside=!0,this.addingStarted=!0):this.mouseDragOutside=!1,this.mouseDragOutside&&this.autoInsertRow&&this.addRow()}t.Autofill=w},3018:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(26138);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.Autofill=s.Autofill},91291:(e,t,o)=>{"use strict";t.__esModule=!0,t.getDragDirectionAndRange=function(e,t,o){let s,n,i;t[0]===e[0]&&t[1]<e[1]?(i="left",s=o(t[0],t[1]),n=o(t[2],e[1]-1)):t[2]===e[2]&&t[0]===e[0]&&t[3]>e[3]?(i="right",s=o(t[0],e[3]+1),n=o(t[2],t[3])):t[0]<e[0]&&t[1]===e[1]?(i="up",s=o(t[0],t[1]),n=o(e[0]-1,t[3])):t[2]>e[2]&&t[1]===e[1]&&(i="down",s=o(e[2]+1,t[1]),n=o(t[2],t[3]));s&&s.normalize();n&&n.normalize();return{directionOfDrag:i,startOfDragCoords:s,endOfDragCoords:n}},t.getMappedFillHandleSetting=function(e){const t={};!0===e?(t.directions=Object.keys(i),t.autoInsertRow=!0):(0,s.isObject)(e)?((0,n.isDefined)(e.autoInsertRow)?e.direction===i.horizontal?t.autoInsertRow=!1:t.autoInsertRow=e.autoInsertRow:t.autoInsertRow=!1,(0,n.isDefined)(e.direction)?t.directions=[e.direction]:t.directions=Object.keys(i)):"string"==typeof e?(t.directions=[e],t.autoInsertRow=!0):(t.directions=[],t.autoInsertRow=!1);return t};var s=o(13911),n=o(38893);const i=t.DIRECTIONS={horizontal:"horizontal",vertical:"vertical"}},7184:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(13911),r=o(9175),l=o(90532),a=o(34299),h=o(84558),c=o(44288),u=o(51255),d=s(o(82629));function g(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function f(e,t){return e.get(p(e,t))}function p(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}const m=new Map([["plugin",l.hasPlugin],["cell-type",a.hasCellType],["editor",h.hasEditor],["renderer",c.hasRenderer],["validator",u.hasValidator]]),w=t.PLUGIN_KEY="base",C=[];let v=null;var y=new WeakMap,E=new WeakSet;function S(e){if(!e)return!1;const t=this.constructor.SETTING_KEYS;if("boolean"==typeof t)return t;for(let o=0;o<t.length;o++)if(void 0!==e[t[o]])return!0;return!1}t.BasePlugin=class{static get PLUGIN_KEY(){return w}static get SETTING_KEYS(){return[this.PLUGIN_KEY]}constructor(e){var t,o;g(t=this,o=E),o.add(t),(0,n.default)(this,"eventManager",new d.default(this)),(0,n.default)(this,"pluginName",null),(0,n.default)(this,"pluginsInitializedCallbacks",[]),(0,n.default)(this,"isPluginsReady",!1),(0,n.default)(this,"enabled",!1),(0,n.default)(this,"initialized",!1),function(e,t,o){g(e,t),t.set(e,o)}(this,y,{}),(0,i.defineGetter)(this,"hot",e,{writable:!1}),v=null,this.hot.addHook("afterPluginsInitialized",(()=>this.onAfterPluginsInitialized())),this.hot.addHook("afterUpdateSettings",(e=>this.onUpdateSettings(e))),this.hot.addHook("beforeInit",(()=>this.init()))}init(){this.pluginName=this.hot.getPluginName(this);const e=this.constructor.PLUGIN_DEPS,t=Array.isArray(e)?e:[];if(t.length>0){const e=[];if(t.forEach((t=>{const[o,s]=t.split(":");if(!m.has(o))throw new Error(`Unknown plugin dependency type "${o}" was found.`);m.get(o)(s)||e.push(` - ${s} (${o})`)})),e.length>0){const t=[`The ${this.pluginName} plugin requires the following modules:\n`,`${e.join("\n")}\n`].join("");C.push(t)}}v||(v=(0,l.getPluginsNames)()),v.indexOf("UndoRedo")>=0&&v.splice(v.indexOf("UndoRedo"),1),v.indexOf(this.pluginName)>=0&&v.splice(v.indexOf(this.pluginName),1),this.hot.addHookOnce("afterPluginsInitialized",(()=>{this.isEnabled&&this.isEnabled()&&this.enablePlugin()}));if(0===v.length){if(C.length>0){const e=[`${C.join("\n")}\n`,"You have to import and register them manually."].join("");throw new Error(e)}this.hot.runHooks("afterPluginsInitialized")}this.initialized=!0}enablePlugin(){this.enabled=!0}disablePlugin(){var e;null===(e=this.eventManager)||void 0===e||e.clear(),this.clearHooks(),this.enabled=!1}addHook(e,t,o){f(y,this)[e]=f(y,this)[e]||[];const s=f(y,this)[e];this.hot.addHook(e,t,o),s.push(t),f(y,this)[e]=s}removeHooks(e){(0,r.arrayEach)(f(y,this)[e]||[],(t=>{this.hot.removeHook(e,t)}))}clearHooks(){const e=f(y,this);(0,i.objectEach)(e,((e,t)=>this.removeHooks(t))),e.length=0}callOnPluginsReady(e){this.isPluginsReady?e():this.pluginsInitializedCallbacks.push(e)}onAfterPluginsInitialized(){(0,r.arrayEach)(this.pluginsInitializedCallbacks,(e=>e())),this.pluginsInitializedCallbacks.length=0,this.isPluginsReady=!0}onUpdateSettings(e){const t=p(E,this,S).call(this,e);this.isEnabled&&(this.enabled&&!this.isEnabled()&&this.disablePlugin(),!this.enabled&&this.isEnabled()&&this.enablePlugin(),this.enabled&&this.isEnabled()&&t&&this.updatePlugin(e))}updatePlugin(){}destroy(){var e;null===(e=this.eventManager)||void 0===e||e.destroy(),this.clearHooks(),(0,i.objectEach)(this,((e,t)=>{"hot"!==t&&(this[t]=null)})),delete this.t,delete this.hot}}},61205:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(7184);t.PLUGIN_KEY=s.PLUGIN_KEY,t.BasePlugin=s.BasePlugin},90316:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=s(o(85707)),i=o(61205),r=s(o(71226)),l=s(o(927));function a(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}const h=t.PLUGIN_KEY="bindRowsWithHeaders",c=t.PLUGIN_PRIORITY=210,u=new Map([["loose",r.default],["strict",l.default]]);var d=new WeakSet;class g extends i.BasePlugin{constructor(){super(...arguments),a(this,d),(0,n.default)(this,"headerIndexes",null)}static get PLUGIN_KEY(){return h}static get PLUGIN_PRIORITY(){return c}isEnabled(){return!!this.hot.getSettings()[h]}enablePlugin(){if(this.enabled)return;let e=this.hot.getSettings()[h];"string"!=typeof e&&(e="loose");const t=u.get(e);this.headerIndexes=this.hot.rowIndexMapper.registerMap("bindRowsWithHeaders",new t),this.addHook("modifyRowHeader",(e=>function(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}(d,this,f).call(this,e))),super.enablePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("bindRowsWithHeaders"),super.disablePlugin()}destroy(){super.destroy()}}function f(e){return this.headerIndexes.getValueAtIndex(this.hot.toPhysicalRow(e))}t.BindRowsWithHeaders=g},92860:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(90316);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.BindRowsWithHeaders=s.BindRowsWithHeaders},71226:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(93969);const{getListWithInsertedItems:n,getListWithRemovedItems:i}=(0,s.alterUtilsFactory)("physicallyIndexed");class r extends s.IndexMap{constructor(){super((e=>e))}insert(e,t){const o=(0,s.getIncreasedIndexes)(this.indexedValues,t);this.indexedValues=n(o,e,t,this.initValueOrFn),super.insert(e,t)}remove(e){const t=i(this.indexedValues,e);this.indexedValues=(0,s.getDecreasedIndexes)(t,e),super.remove(e)}}t.default=r},927:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(93969);const{getListWithInsertedItems:n,getListWithRemovedItems:i}=(0,s.alterUtilsFactory)("physicallyIndexed");class r extends s.IndexMap{constructor(){super((e=>e))}insert(e,t){this.indexedValues=n(this.indexedValues,e,t,((e,t)=>this.getNextValue(t))),super.insert(e,t)}remove(e){this.indexedValues=i(this.indexedValues,e),super.remove(e)}getNextValue(e){return Math.max(...this.getValues())+1+e}}t.default=r},10684:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(61205),r=o(9175),l=o(87485),a=o(83119),h=o(9893),c=o(79729),u=o(37947),d=o(92692);function g(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function f(e,t){return e.get(m(e,t))}function p(e,t,o){return e.set(m(e,t),o),o}function m(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}o(78607);const w=t.PLUGIN_KEY="collapsibleColumns",C=t.PLUGIN_PRIORITY=290,v=["nestedHeaders"],y="collapsibleIndicator",E=w,S=new Map([["collapse",{hideColumn:!0,beforeHook:"beforeColumnCollapse",afterHook:"afterColumnCollapse"}],["expand",{hideColumn:!1,beforeHook:"beforeColumnExpand",afterHook:"afterColumnExpand"}]]);var R=new WeakMap,b=new WeakSet;class _ extends i.BasePlugin{constructor(){var e,t;super(...arguments),g(e=this,t=b),t.add(e),(0,n.default)(this,"nestedHeadersPlugin",null),(0,n.default)(this,"headerStateManager",null),function(e,t,o){g(e,t),t.set(e,o)}(this,R,null)}static get PLUGIN_KEY(){return w}static get PLUGIN_PRIORITY(){return C}static get PLUGIN_DEPS(){return["plugin:NestedHeaders"]}static get SETTING_KEYS(){return[w,...v]}isEnabled(){return!!this.hot.getSettings()[w]}enablePlugin(){var e=this;if(this.enabled)return;const{nestedHeaders:t}=this.hot.getSettings();t||(0,a.warn)("You need to configure the Nested Headers plugin in order to use collapsible headers."),p(R,this,this.hot.columnIndexMapper.createAndRegisterIndexMap(this.pluginName,"hiding")),this.nestedHeadersPlugin=this.hot.getPlugin("nestedHeaders"),this.headerStateManager=this.nestedHeadersPlugin.getStateManager(),this.addHook("init",(()=>m(b,this,O).call(this))),this.addHook("afterLoadData",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return m(b,e,I).call(e,...o)})),this.addHook("afterGetColHeader",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return m(b,e,T).call(e,...o)})),this.addHook("beforeOnCellMouseDown",((e,t,o)=>m(b,this,M).call(this,e,t,o))),this.registerShortcuts(),super.enablePlugin(),this.updatePlugin()}updatePlugin(){if(this.hot.view){if(!this.nestedHeadersPlugin.detectedOverlappedHeaders){const{collapsibleColumns:e}=this.hot.getSettings();"boolean"==typeof e?this.headerStateManager.mapState((e=>({collapsible:e.origColspan>1}))):Array.isArray(e)&&(this.headerStateManager.mapState((()=>({collapsible:!1}))),this.headerStateManager.mergeStateWith(e))}super.updatePlugin()}}disablePlugin(){this.hot.columnIndexMapper.unregisterMap(this.pluginName),p(R,this,null),this.nestedHeadersPlugin=null,this.unregisterShortcuts(),this.clearButtons(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{var e;const{row:t,col:o}=this.hot.getSelectedRangeLast().highlight,{collapsible:s,isCollapsed:n,columnIndex:i}=null!==(e=this.headerStateManager.getHeaderTreeNodeData(t,o))&&void 0!==e?e:{};if(s)return n?this.expandSection({row:t,col:i}):this.collapseSection({row:t,col:i}),!1},runOnlyIf:()=>{var e,t;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.isSingle())&&(null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.highlight.isHeader())},group:E,relativeToGroup:u.EDITOR_EDIT_GROUP,position:"before"})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(E)}clearButtons(){if(!this.hot.view)return;const e=this.hot.view._wt.getSetting("columnHeaders").length,t=this.hot.view._wt.wtTable.THEAD,o=this.hot.view._wt.wtOverlays.topOverlay.clone.wtTable.THEAD,s=this.hot.view._wt.wtOverlays.topInlineStartCornerOverlay?this.hot.view._wt.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.THEAD:null,n=function(e){e&&e.parentNode.removeChild(e)};(0,l.rangeEach)(0,e-1,(e=>{const i=t.childNodes[e],r=o.childNodes[e],a=s?s.childNodes[e]:null;(0,l.rangeEach)(0,i.childNodes.length-1,(e=>{let t=i.childNodes[e].querySelector(`.${y}`);n(t),r&&r.childNodes[e]&&(t=r.childNodes[e].querySelector(`.${y}`),n(t)),s&&a&&a.childNodes[e]&&(t=a.childNodes[e].querySelector(`.${y}`),n(t))}))}),!0)}expandSection(e){this.toggleCollapsibleSection([e],"expand")}collapseSection(e){this.toggleCollapsibleSection([e],"collapse")}toggleAllCollapsibleSections(e){const t=this.headerStateManager.mapNodes((t=>{const{collapsible:o,origColspan:s,headerLevel:n,columnIndex:i,isCollapsed:r}=t;if(!0===o&&s>1&&(r&&"expand"===e||!r&&"collapse"===e))return{row:this.headerStateManager.levelToRowCoords(n),col:i}}));this.toggleCollapsibleSection(t,e)}collapseAll(){this.toggleAllCollapsibleSections("collapse")}expandAll(){this.toggleAllCollapsibleSections("expand")}toggleCollapsibleSection(e,t){if(!S.has(t))throw new Error(`Unsupported action is passed (${t}).`);if(!Array.isArray(e))return;const o=(0,r.arrayFilter)(e,(e=>{let{row:t}=e;return t<0}));let s=o.length>0;(0,r.arrayEach)(o,(e=>{var o;let{row:n,col:i}=e;const{collapsible:r,isCollapsed:l}=null!==(o=this.headerStateManager.getHeaderSettings(n,i))&&void 0!==o?o:{};if(!r||l&&"collapse"===t||!l&&"expand"===t)return s=!1,!1}));const n=[],i=[];s&&(0,r.arrayEach)(o,(e=>{let{row:o,col:s}=e;const{colspanCompensation:r,affectedColumns:l,rollbackModification:a}=this.headerStateManager.triggerNodeModification(t,o,s);r>0&&(i.push(...l),n.push(a))}));const l=this.getCollapsedColumns();let a=[];"collapse"===t?a=(0,r.arrayUnique)([...l,...i]):"expand"===t&&(a=(0,r.arrayFilter)(l,(e=>!i.includes(e))));const h=S.get(t);if(!1===this.hot.runHooks(h.beforeHook,l,a,s))return void(0,r.arrayEach)(n,(e=>{e()}));this.hot.batchExecution((()=>{(0,r.arrayEach)(i,(e=>{f(R,this).setValueAtIndex(this.hot.toPhysicalColumn(e),h.hideColumn)}))}),!0);const c=this.getCollapsedColumns().length!==l.length,u=this.hot.getSelectedRangeLast();if("collapse"===t&&c&&u){const{row:e,col:t}=u.highlight;if((this.hot.rowIndexMapper.isHidden(e)||this.hot.columnIndexMapper.isHidden(t))&&i.includes(t)){const o=e>=0?this.hot.rowIndexMapper.getNearestNotHiddenIndex(e,1,!0):e,s=t>=0?this.hot.columnIndexMapper.getNearestNotHiddenIndex(t,1,!0):t;null!==o&&null!==s&&this.hot.selectCell(o,s)}}this.hot.runHooks(h.afterHook,l,a,s,c),this.hot.render(),this.hot.view.adjustElementsSize()}getCollapsedColumns(){return f(R,this).getHiddenIndexes()}destroy(){p(R,this,null),super.destroy()}}function T(e,t,o){var s;const{collapsible:n,origColspan:i,isCollapsed:r}=null!==(s=this.headerStateManager.getHeaderSettings(o,e))&&void 0!==s?s:{},l=n&&i>1&&e>=this.hot.getSettings().fixedColumnsStart,a=this.hot.getSettings().ariaTags;let c=t.querySelector(`.${y}`);var u;((0,h.removeAttribute)(t,[(0,d.A11Y_EXPANDED)("")[0]]),l)?(c||(c=this.hot.rootDocument.createElement("div"),(0,h.addClass)(c,y),t.querySelector("div:first-child").appendChild(c)),(0,h.removeClass)(c,["collapsed","expanded"]),r?((0,h.addClass)(c,"collapsed"),(0,h.fastInnerText)(c,"+"),a&&(0,h.setAttribute)(t,...(0,d.A11Y_EXPANDED)(!1))):((0,h.addClass)(c,"expanded"),(0,h.fastInnerText)(c,"-"),a&&(0,h.setAttribute)(t,...(0,d.A11Y_EXPANDED)(!0))),a&&(0,h.setAttribute)(c,...(0,d.A11Y_HIDDEN)())):null===(u=c)||void 0===u||u.remove()}function M(e,t){(0,h.hasClass)(e.target,y)&&((0,h.hasClass)(e.target,"expanded")?(this.eventManager.fireEvent(e.target,"mouseup"),this.toggleCollapsibleSection([t],"collapse")):(0,h.hasClass)(e.target,"collapsed")&&(this.eventManager.fireEvent(e.target,"mouseup"),this.toggleCollapsibleSection([t],"expand")),(0,c.stopImmediatePropagation)(e))}function O(){this.updatePlugin()}function I(e,t){t||this.updatePlugin()}t.CollapsibleColumns=_},67607:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(10684);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.CollapsibleColumns=s.CollapsibleColumns},66816:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(9893),r=o(38893),l=o(13911),a=o(78832),h=o(9175),c=o(61205),u=o(93969),d=s(o(56937)),g=o(66373),f=o(37947),p=o(78131),m=o(43977),w=o(21980),C=o(7426),v=o(92692);function y(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function E(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}o(64019);const S=t.PLUGIN_KEY="columnSorting",R=t.PLUGIN_PRIORITY=50,b=t.APPEND_COLUMN_CONFIG_STRATEGY="append",_=t.REPLACE_COLUMN_CONFIG_STRATEGY="replace",T=S;(0,C.registerRootComparator)(S,w.rootComparator),d.default.getSingleton().register("beforeColumnSort"),d.default.getSingleton().register("afterColumnSort");var M=new WeakSet;class O extends c.BasePlugin{constructor(){super(...arguments),y(this,M),(0,n.default)(this,"columnStatesManager",null),(0,n.default)(this,"columnMetaCache",null),(0,n.default)(this,"pluginKey",S),(0,n.default)(this,"indexesSequenceCache",null)}static get PLUGIN_KEY(){return S}static get PLUGIN_PRIORITY(){return R}isEnabled(){return!!this.hot.getSettings()[this.pluginKey]}enablePlugin(){var e=this;this.enabled||(this.columnStatesManager=new g.ColumnStatesManager(this.hot,`${this.pluginKey}.sortingStates`),this.columnMetaCache=new u.PhysicalIndexToValueMap((e=>{let t=this.hot.toVisualColumn(e);return null===t&&(t=e),this.getMergedPluginSettings(t)})),this.hot.columnIndexMapper.registerMap(`${this.pluginKey}.columnMeta`,this.columnMetaCache),this.addHook("afterGetColHeader",((e,t)=>E(M,this,N).call(this,e,t))),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return E(M,e,P).call(e,...o)})),this.addHook("afterOnCellMouseDown",((e,t)=>this.onAfterOnCellMouseDown(e,t))),this.addHook("afterInit",(()=>E(M,this,I).call(this))),this.addHook("afterLoadData",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return E(M,e,A).call(e,...o)})),this.hot.view&&E(M,this,I).call(this),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){const e=(e,t)=>{const o=(0,p.getHeaderSpanElement)(t);!1!==(0,p.isFirstLevelColumnHeader)(e,t)&&null!==o&&this.updateHeaderClasses(o)};this.hot.addHook("afterGetColHeader",e),this.hot.addHookOnce("afterViewRender",(()=>{this.hot.removeHook("afterGetColHeader",e)})),this.hot.batchExecution((()=>{null!==this.indexesSequenceCache&&(this.hot.rowIndexMapper.setIndexesSequence(this.indexesSequenceCache.getValues()),this.hot.rowIndexMapper.unregisterMap(this.pluginKey),this.indexesSequenceCache=null)}),!0),this.hot.columnIndexMapper.unregisterMap(`${this.pluginKey}.columnMeta`),this.columnStatesManager.destroy(),this.columnMetaCache=null,this.columnStatesManager=null,this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();return this.sort(this.getColumnNextConfig(e.col)),!1},runOnlyIf:()=>{var e,t;const o=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return o&&(null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.isSingle())&&this.hot.selection.isCellVisible(o)&&-1===o.row&&o.col>=0},relativeToGroup:f.EDITOR_EDIT_GROUP,position:"before",group:T})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(T)}sort(e){const t=this.getSortConfig(),o=this.getNormalizedSortConfigs(e),s=this.areValidSortConfigs(o);!1!==this.hot.runHooks("beforeColumnSort",t,o,s)&&(0===t.length&&null===this.indexesSequenceCache&&(this.indexesSequenceCache=this.hot.rowIndexMapper.registerMap(this.pluginKey,new u.IndexesSequence),this.indexesSequenceCache.setValues(this.hot.rowIndexMapper.getIndexesSequence())),s&&(this.columnStatesManager.setSortStates(o),this.sortByPresetSortStates(o),this.saveAllSortSettings(o)),this.hot.runHooks("afterColumnSort",t,s?o:t,s),s&&(this.hot.render(),this.hot.forceFullRender=!1,this.hot.view.render()))}clearSort(){this.sort([])}isSorted(){return this.enabled&&!this.columnStatesManager.isListOfSortedColumnsEmpty()}getSortConfig(e){return(0,r.isDefined)(e)?this.columnStatesManager.getColumnSortState(e):this.columnStatesManager.getSortStates()}setSortConfig(e){const t=this.getNormalizedSortConfigs(e);this.areValidSortConfigs(t)&&this.columnStatesManager.setSortStates(t)}getNormalizedSortConfigs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(e)?e.slice(0,1):[e]}areValidSortConfigs(e){const t=this.hot.countCols();return(0,p.areValidSortStates)(e)&&e.every((e=>{let{column:o}=e;return o<=t&&o>=0}))}saveAllSortSettings(e){const t=this.columnStatesManager.getAllColumnsProperties();t.initialConfig=(0,h.arrayMap)(e,(e=>{let{column:t,...o}=e;return{column:this.hot.toPhysicalColumn(t),...o}})),this.hot.runHooks("persistentStateSave","columnSorting",t)}getAllSavedSortSettings(){const e={};this.hot.runHooks("persistentStateLoad","columnSorting",e);const t=e.value,o=e=>{let{column:t,...o}=e;return{column:this.hot.toVisualColumn(t),...o}};return(0,r.isDefined)(t)&&Array.isArray(t.initialConfig)&&(t.initialConfig=(0,h.arrayMap)(t.initialConfig,o)),t}getColumnNextConfig(e){const t=this.columnStatesManager.getSortOrderOfColumn(e);if((0,r.isDefined)(t)){const o=(0,p.getNextSortOrder)(t);return(0,r.isDefined)(o)?{column:e,sortOrder:o}:void 0}const o=this.hot.countCols();if(Number.isInteger(e)&&e>=0&&e<o)return{column:e,sortOrder:(0,p.getNextSortOrder)()}}getNextSortConfig(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b;const o=this.columnStatesManager.getIndexOfColumnInSortQueue(e),s=-1!==o,n=this.getSortConfig(),i=this.getColumnNextConfig(e);if(s){if((0,r.isUndefined)(i))return[...n.slice(0,o),...n.slice(o+1)];if(t===b)return[...n.slice(0,o),...n.slice(o+1),i];if(t===_)return[...n.slice(0,o),i,...n.slice(o+1)]}return(0,r.isDefined)(i)?n.concat(i):n}getPluginColumnConfig(e){if((0,l.isObject)(e)){const t=e[this.pluginKey];if((0,l.isObject)(t))return t}return{}}getMergedPluginSettings(e){const t=this.hot.getSettings()[this.pluginKey],o=this.columnStatesManager.getAllColumnsProperties(),s=this.hot.getCellMeta(0,e),n=Object.getPrototypeOf(s);return Array.isArray(n.columns)?Object.assign(o,t,this.getPluginColumnConfig(n.columns[e])):(0,a.isFunction)(n.columns)?Object.assign(o,t,this.getPluginColumnConfig(n.columns(e))):Object.assign(o,t)}getFirstCellSettings(e){const t=this.hot.getCellMeta(0,e),o=Object.create(t);return o[this.pluginKey]=this.columnMetaCache.getValueAtIndex(this.hot.toPhysicalColumn(e)),o}getNumberOfRowsToSort(e){const t=this.hot.getSettings();return t.maxRows<=e?t.maxRows:e-t.minSpareRows}sortByPresetSortStates(e){if(this.hot.rowIndexMapper.setIndexesSequence(this.indexesSequenceCache.getValues()),0===e.length)return;const t=[],o=this.hot.countRows(),s=t=>(0,h.arrayMap)(e,(e=>this.hot.getDataAtCell(t,e.column)));for(let e=0;e<this.getNumberOfRowsToSort(o);e+=1)t.push([this.hot.toPhysicalRow(e)].concat(s(e)));const n=(0,h.arrayMap)(t,(e=>e[0]));(0,C.sort)(t,this.pluginKey,(0,h.arrayMap)(e,(e=>e.sortOrder)),(0,h.arrayMap)(e,(e=>this.getFirstCellSettings(e.column))));for(let e=t.length;e<o;e+=1)t.push([e].concat(s(e)));const i=(0,h.arrayMap)(t,(e=>e[0])),r=new Map((0,h.arrayMap)(n,((e,t)=>[e,i[t]]))),l=(0,h.arrayMap)(this.hot.rowIndexMapper.getIndexesSequence(),(e=>r.has(e)?r.get(e):e));this.hot.rowIndexMapper.setIndexesSequence(l)}sortBySettings(e){if((0,l.isObject)(e)){this.columnStatesManager.updateAllColumnsProperties(e);const t=e.initialConfig;(Array.isArray(t)||(0,l.isObject)(t))&&this.sort(t)}else this.hot.render()}updateHeaderClasses(e){if((0,i.removeClass)(e,(0,m.getClassesToRemove)(e)),!1!==this.enabled){for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];(0,i.addClass)(e,(0,m.getClassesToAdd)(...o))}}onUpdateSettings(e){super.onUpdateSettings(),null!==this.columnMetaCache&&this.columnMetaCache.init(this.hot.columnIndexMapper.getNumberOfIndexes()),(0,r.isDefined)(e[this.pluginKey])&&this.sortBySettings(e[this.pluginKey])}wasClickableHeaderClicked(e,t){return this.getFirstCellSettings(t)[this.pluginKey].headerAction&&(0,i.hasClass)(e.target,p.HEADER_SPAN_CLASS)}onAfterOnCellMouseDown(e,t){if(!1!==(0,p.wasHeaderClickedProperly)(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)){this.hot.getShortcutManager().isCtrlPressed()&&(this.hot.deselectCell(),this.hot.selectColumns(t.col));const e=this.hot.getActiveEditor(),o=this.getColumnNextConfig(t.col);null!=e&&e.isOpened()&&this.hot.getCellValidator(e.row,e.col)?this.hot.addHookOnce("postAfterValidate",(()=>{this.sort(o)})):this.sort(o)}}destroy(){var e;null===(e=this.columnStatesManager)||void 0===e||e.destroy(),super.destroy()}}function I(){const e=this.getAllSavedSortSettings();if((0,l.isObject)(e))this.sortBySettings(e);else{const e=this.hot.getSettings()[this.pluginKey];this.sortBySettings(e)}}function N(e,t){const o=(0,p.getHeaderSpanElement)(t);if(!1===(0,p.isFirstLevelColumnHeader)(e,t)||null===o)return;const s=this.getFirstCellSettings(e)[this.pluginKey],n=s.indicator,r=s.headerAction;if(this.updateHeaderClasses(o,this.columnStatesManager,e,n,r),this.hot.getSettings().ariaTags){const o=this.columnStatesManager.getSortOrderOfColumn(e);(0,i.setAttribute)(t,...(0,v.A11Y_SORT)(o?`${o}ending`:"none"))}}function A(e){!0===e&&this.hot.view&&E(M,this,I).call(this)}function P(e,t,o,s){!1!==(0,p.wasHeaderClickedProperly)(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)&&this.hot.getShortcutManager().isCtrlPressed()&&(s.column=!0)}t.ColumnSorting=O},66373:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707)),i=o(13911),r=o(93969),l=o(38893);const a=["sortEmptyCells","indicator","headerAction","compareFunctionFactory"];t.ColumnStatesManager=class{constructor(e,t){(0,n.default)(this,"hot",void 0),(0,n.default)(this,"sortingStates",new r.LinkedPhysicalIndexToValueMap),(0,n.default)(this,"sortEmptyCells",false),(0,n.default)(this,"indicator",true),(0,n.default)(this,"headerAction",true),(0,n.default)(this,"compareFunctionFactory",void 0),(0,n.default)(this,"mapName",void 0),this.hot=e,this.mapName=t,this.hot.columnIndexMapper.registerMap(t,this.sortingStates)}updateAllColumnsProperties(e){(0,i.isObject)(e)&&(0,i.objectEach)(e,((e,t)=>{a.includes(t)&&(this[t]=e)}))}getAllColumnsProperties(){const e={sortEmptyCells:this.sortEmptyCells,indicator:this.indicator,headerAction:this.headerAction};return"function"==typeof this.compareFunctionFactory&&(e.compareFunctionFactory=this.compareFunctionFactory),e}getSortOrderOfColumn(e){var t;return null===(t=this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(e)))||void 0===t?void 0:t.sortOrder}getIndexOfColumnInSortQueue(e){return e=this.hot.toPhysicalColumn(e),this.sortingStates.getEntries().findIndex((t=>{let[o]=t;return o===e}))}getNumberOfSortedColumns(){return this.sortingStates.getLength()}isListOfSortedColumnsEmpty(){return 0===this.getNumberOfSortedColumns()}isColumnSorted(e){return(0,i.isObject)(this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(e)))}getSortStates(){if(null===this.sortingStates)return[];return this.sortingStates.getEntries().map((e=>{let[t,o]=e;return{column:this.hot.toVisualColumn(t),...o}}))}getColumnSortState(e){const t=this.getSortOrderOfColumn(e);if((0,l.isDefined)(t))return{column:e,sortOrder:t}}setSortStates(e){this.sortingStates.clear();for(let t=0;t<e.length;t+=1)this.sortingStates.setValueAtIndex(this.hot.toPhysicalColumn(e[t].column),{sortOrder:e[t].sortOrder})}destroy(){this.hot.columnIndexMapper.unregisterMap(this.mapName),this.sortingStates=null}}},43977:(e,t,o)=>{"use strict";t.__esModule=!0,t.getClassesToAdd=function(e,t,o,n){const h=[r];n&&h.push(l);if(!1===o)return h.push(i),h;const c=e.getSortOrderOfColumn(t);(0,s.isDefined)(c)&&h.push(a.get(c));return h},t.getClassesToRemove=function(){return Array.from(a.values()).concat(l,i,r)},o(15724);var s=o(38893),n=o(78131);const i="indicatorDisabled",r="columnSorting",l="sortAction",a=new Map([[n.ASC_SORT_STATE,"ascending"],[n.DESC_SORT_STATE,"descending"]])},16050:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(66816);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ColumnSorting=s.ColumnSorting,t.APPEND_COLUMN_CONFIG_STRATEGY=s.APPEND_COLUMN_CONFIG_STRATEGY,t.REPLACE_COLUMN_CONFIG_STRATEGY=s.REPLACE_COLUMN_CONFIG_STRATEGY},21980:(e,t,o)=>{"use strict";t.__esModule=!0,t.rootComparator=function(e,t){return function(o,n){const[,...i]=o,[,...r]=n;return function(o){const n=e[o],l=t[o],a=i[o],h=r[o],c=l.columnSorting;return(c.compareFunctionFactory?c.compareFunctionFactory:(0,s.getCompareFunctionFactory)(l.type))(n,l,c)(a,h)}(0)}};var s=o(7426)},4862:(e,t,o)=>{"use strict";t.__esModule=!0,t.compareFunctionFactory=function(e,t,o){const r=t.checkedTemplate,l=t.uncheckedTemplate,{sortEmptyCells:a}=o;return function(h,c){const u=(0,i.isEmpty)(h),d=(0,i.isEmpty)(c),g=u?l:h,f=d?l:c,p=g===l||g===r,m=f===l||f===r;if(!1===a){if(u&&!1===d)return s.FIRST_AFTER_SECOND;if(!1===u&&d)return s.FIRST_BEFORE_SECOND}return!1===p&&m?"asc"===e?s.FIRST_BEFORE_SECOND:s.FIRST_AFTER_SECOND:p&&!1===m?"asc"===e?s.FIRST_AFTER_SECOND:s.FIRST_BEFORE_SECOND:!1===p&&!1===m?(0,n.compareFunctionFactory)(e,t,o)(h,c):g===l&&f===r?"asc"===e?s.FIRST_BEFORE_SECOND:s.FIRST_AFTER_SECOND:g===r&&f===l?"asc"===e?s.FIRST_AFTER_SECOND:s.FIRST_BEFORE_SECOND:s.DO_NOT_SWAP}};var s=o(7426),n=o(56946),i=o(38893);t.COLUMN_DATA_TYPE="checkbox"},63087:(e,t,o)=>{"use strict";t.__esModule=!0,t.compareFunctionFactory=function(e,t,o){return(0,s.createDateTimeCompareFunction)(e,t.dateFormat,o)};var s=o(78131);t.COLUMN_DATA_TYPE="date"},56946:(e,t,o)=>{"use strict";t.__esModule=!0,t.compareFunctionFactory=function(e,t,o){const i=t.locale;return function(t,r){const{sortEmptyCells:l}=o;return"string"==typeof t&&(t=t.toLocaleLowerCase(i)),"string"==typeof r&&(r=r.toLocaleLowerCase(i)),t===r?n.DO_NOT_SWAP:(0,s.isEmpty)(t)?(0,s.isEmpty)(r)?n.DO_NOT_SWAP:l&&"asc"===e?n.FIRST_BEFORE_SECOND:n.FIRST_AFTER_SECOND:(0,s.isEmpty)(r)?l&&"asc"===e?n.FIRST_AFTER_SECOND:n.FIRST_BEFORE_SECOND:isNaN(t)&&!isNaN(r)?"asc"===e?n.FIRST_AFTER_SECOND:n.FIRST_BEFORE_SECOND:!isNaN(t)&&isNaN(r)?"asc"===e?n.FIRST_BEFORE_SECOND:n.FIRST_AFTER_SECOND:(isNaN(t)||isNaN(r)||(t=parseFloat(t),r=parseFloat(r)),t<r?"asc"===e?n.FIRST_BEFORE_SECOND:n.FIRST_AFTER_SECOND:t>r?"asc"===e?n.FIRST_AFTER_SECOND:n.FIRST_BEFORE_SECOND:n.DO_NOT_SWAP)}};var s=o(38893),n=o(7426);t.COLUMN_DATA_TYPE="default"},92708:(e,t,o)=>{"use strict";t.__esModule=!0,t.compareFunctionFactory=function(e,t,o){return function(t,i){const r=parseFloat(t),l=parseFloat(i),{sortEmptyCells:a}=o;if(r===l||isNaN(r)&&isNaN(l))return n.DO_NOT_SWAP;if(a){if((0,s.isEmpty)(t))return"asc"===e?n.FIRST_BEFORE_SECOND:n.FIRST_AFTER_SECOND;if((0,s.isEmpty)(i))return"asc"===e?n.FIRST_AFTER_SECOND:n.FIRST_BEFORE_SECOND}return isNaN(r)?n.FIRST_AFTER_SECOND:isNaN(l)?n.FIRST_BEFORE_SECOND:r<l?"asc"===e?n.FIRST_BEFORE_SECOND:n.FIRST_AFTER_SECOND:r>l?"asc"===e?n.FIRST_AFTER_SECOND:n.FIRST_BEFORE_SECOND:n.DO_NOT_SWAP}};var s=o(38893),n=o(7426);t.COLUMN_DATA_TYPE="numeric"},36838:(e,t,o)=>{"use strict";t.__esModule=!0,t.compareFunctionFactory=function(e,t,o){return(0,s.createDateTimeCompareFunction)(e,t.timeFormat,o)};var s=o(78131);t.COLUMN_DATA_TYPE="time"},34070:(e,t,o)=>{"use strict";t.__esModule=!0,t.sort=function(e,t){const o=(0,s.getRootComparator)(t);for(var n=arguments.length,i=new Array(n>2?n-2:0),r=2;r<n;r++)i[r-2]=arguments[r];e.sort(o(...i))};var s=o(71907);t.DO_NOT_SWAP=0,t.FIRST_BEFORE_SECOND=-1,t.FIRST_AFTER_SECOND=1},7426:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(71907);t.registerRootComparator=s.registerRootComparator,t.getRootComparator=s.getRootComparator,t.getCompareFunctionFactory=s.getCompareFunctionFactory;var n=o(34070);t.FIRST_AFTER_SECOND=n.FIRST_AFTER_SECOND,t.FIRST_BEFORE_SECOND=n.FIRST_BEFORE_SECOND,t.DO_NOT_SWAP=n.DO_NOT_SWAP,t.sort=n.sort},71907:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.getCompareFunctionFactory=function(e){if(d(e))return u(e);return u(n.COLUMN_DATA_TYPE)};var n=o(56946),i=o(92708),r=o(4862),l=o(63087),a=o(36838),h=s(o(71263));const{register:c,getItem:u,hasItem:d}=(0,h.default)("sorting.compareFunctionFactory"),{register:g,getItem:f}=(0,h.default)("sorting.mainSortComparator");t.getRootComparator=f,t.registerRootComparator=g,c(r.COLUMN_DATA_TYPE,r.compareFunctionFactory),c(l.COLUMN_DATA_TYPE,l.compareFunctionFactory),c(n.COLUMN_DATA_TYPE,n.compareFunctionFactory),c(i.COLUMN_DATA_TYPE,i.compareFunctionFactory),c(a.COLUMN_DATA_TYPE,a.compareFunctionFactory)},78131:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.areValidSortStates=function(e){if(e.some((e=>!1===function(e){if(!1===(0,i.isObject)(e))return!1;const{column:t,sortOrder:o}=e;return Number.isInteger(t)&&[h,c].includes(o)}(e))))return!1;const t=e.map((e=>{let{column:t}=e;return t}));return new Set(t).size===t.length},t.createDateTimeCompareFunction=function(e,t,o){return function(s,i){const{sortEmptyCells:r}=o;if(s===i)return a.DO_NOT_SWAP;if((0,l.isEmpty)(s))return(0,l.isEmpty)(i)?a.DO_NOT_SWAP:r&&"asc"===e?a.FIRST_BEFORE_SECOND:a.FIRST_AFTER_SECOND;if((0,l.isEmpty)(i))return r&&"asc"===e?a.FIRST_AFTER_SECOND:a.FIRST_BEFORE_SECOND;const h=(0,n.default)(s,t),c=(0,n.default)(i,t);return h.isValid()?c.isValid()?c.isAfter(h)?"asc"===e?a.FIRST_BEFORE_SECOND:a.FIRST_AFTER_SECOND:c.isBefore(h)?"asc"===e?a.FIRST_AFTER_SECOND:a.FIRST_BEFORE_SECOND:a.DO_NOT_SWAP:a.FIRST_BEFORE_SECOND:a.FIRST_AFTER_SECOND}},t.getHeaderSpanElement=function(e){return e.querySelector(`.${u}`)},t.getNextSortOrder=function(e){if(e===c)return;if(e===h)return c;return h},t.isFirstLevelColumnHeader=function(e,t){if(e<0||!t.parentNode)return!1;const o=t.parentNode.parentNode.childNodes;if(Array.from(o).indexOf(t.parentNode)-o.length!=-1)return!1;return!0},t.wasHeaderClickedProperly=function(e,t,o){return-1===e&&t>=0&&!1===(0,r.isRightClick)(o)},o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var n=s(o(86798)),i=o(13911),r=o(79729),l=o(38893),a=o(7426);const h=t.ASC_SORT_STATE="asc",c=t.DESC_SORT_STATE="desc",u=t.HEADER_SPAN_CLASS="colHeader"},17588:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=s(o(85707)),i=o(61205),r=o(13911),l=s(o(74316)),a=o(28927),h=o(70235);function c(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function u(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}const d=t.PLUGIN_KEY="columnSummary",g=t.PLUGIN_PRIORITY=220;var f=new WeakSet;class p extends i.BasePlugin{constructor(){super(...arguments),c(this,f),(0,n.default)(this,"endpoints",null)}static get PLUGIN_KEY(){return d}static get PLUGIN_PRIORITY(){return g}isEnabled(){return!!this.hot.getSettings()[d]}enablePlugin(){var e=this;this.enabled||(this.settings=this.hot.getSettings()[d],this.endpoints=new l.default(this,this.settings),this.addHook("afterInit",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return u(f,e,m).call(e,...o)})),this.addHook("afterChange",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return u(f,e,C).call(e,...o)})),this.addHook("afterUpdateSettings",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return u(f,e,w).call(e,...o)})),this.addHook("beforeCreateRow",((e,t,o)=>this.endpoints.resetSetupBeforeStructureAlteration("insert_row",e,t,null,o))),this.addHook("beforeCreateCol",((e,t,o)=>this.endpoints.resetSetupBeforeStructureAlteration("insert_col",e,t,null,o))),this.addHook("beforeRemoveRow",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return e.endpoints.resetSetupBeforeStructureAlteration("remove_row",...o)})),this.addHook("beforeRemoveCol",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return e.endpoints.resetSetupBeforeStructureAlteration("remove_col",...o)})),this.addHook("afterCreateRow",((e,t,o)=>this.endpoints.resetSetupAfterStructureAlteration("insert_row",e,t,null,o))),this.addHook("afterCreateCol",((e,t,o)=>this.endpoints.resetSetupAfterStructureAlteration("insert_col",e,t,null,o))),this.addHook("afterRemoveRow",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return e.endpoints.resetSetupAfterStructureAlteration("remove_row",...o)})),this.addHook("afterRemoveCol",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return e.endpoints.resetSetupAfterStructureAlteration("remove_col",...o)})),this.addHook("afterRowMove",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return u(f,e,v).call(e,...o)})),super.enablePlugin())}disablePlugin(){this.endpoints=null,this.settings=null,this.currentEndpoint=null,super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.endpoints.initEndpoints(),super.updatePlugin()}calculate(e){switch(e.type.toLowerCase()){case"sum":e.result=this.calculateSum(e);break;case"min":case"max":e.result=this.calculateMinMax(e,e.type);break;case"count":e.result=this.countEntries(e);break;case"average":e.result=this.calculateAverage(e);break;case"custom":e.result=e.customFunction.call(this,e)}}calculateSum(e){let t=0;return(0,r.objectEach)(e.ranges,(o=>{t+=this.getPartialSum(o,e.sourceColumn)})),t}getPartialSum(e,t){let o=0,s=e[1]||e[0],n=null,i=0;do{if(n=this.getCellValue(s,t),n=(0,h.isNullishOrNaN)(n)?null:n,null!==n){const e=(`${n}`.split(".")[1]||[]).length||1;e>i&&(i=e)}o+=n||0,s-=1}while(s>=e[0]);return Math.round(o*10**i)/10**i}calculateMinMax(e,t){let o=null;return(0,r.objectEach)(e.ranges,(s=>{const n=this.getPartialMinMax(s,e.sourceColumn,t);if(null===o&&null!==n&&(o=n),null!==n)switch(t){case"min":o=Math.min(o,n);break;case"max":o=Math.max(o,n)}})),null===o?"Not enough data":o}getPartialMinMax(e,t,o){let s,n=null,i=e[1]||e[0];do{if(s=this.getCellValue(i,t),s=(0,h.isNullishOrNaN)(s)?null:s,null===n)n=s;else if(null!==s)switch(o){case"min":n=Math.min(n,s);break;case"max":n=Math.max(n,s)}i-=1}while(i>=e[0]);return n}countEmpty(e,t){let o,s=0,n=e[1]||e[0];do{o=this.getCellValue(n,t),o=(0,h.isNullishOrNaN)(o)?null:o,null===o&&(s+=1),n-=1}while(n>=e[0]);return s}countEntries(e){let t=0;const o=e.ranges;return(0,r.objectEach)(o,(o=>{const s=void 0===o[1]?1:o[1]-o[0]+1,n=this.countEmpty(o,e.sourceColumn);t+=s,t-=n})),t}calculateAverage(e){return this.calculateSum(e)/this.countEntries(e)}getCellValue(e,t){const o=this.hot.toVisualRow(e),s=this.hot.toVisualColumn(t);let n=this.hot.getSourceDataAtCell(e,t),i="";if(null!==o&&null!==s&&(i=this.hot.getCellMeta(o,s).className||""),i.indexOf("columnSummaryResult")>-1)return null;if(this.endpoints.currentEndpoint.forceNumeric&&("string"==typeof n&&(n=n.replace(/,/,".")),n=parseFloat(n)),isNaN(n)&&!this.endpoints.currentEndpoint.suppressDataTypeErrors)throw new Error(a.toSingleLine`ColumnSummary plugin: cell at (${e}, ${t}) is not in a\x20
67
- numeric format. Cannot do the calculation.`);return n}}function m(){this.endpoints.initEndpoints()}function w(e){void 0!==e.columns&&this.endpoints.refreshCellMetas()}function C(e,t){e&&"ColumnSummary.reset"!==t&&"ColumnSummary.set"!==t&&"loadData"!==t&&this.endpoints.refreshChangedEndpoints(e)}function v(e,t){this.endpoints.resetSetupBeforeStructureAlteration("move_row",e[0],e.length,e,this.pluginName),this.endpoints.resetSetupAfterStructureAlteration("move_row",t,e.length,e,this.pluginName)}t.ColumnSummary=p},74316:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(9175),r=o(83119);t.default=class{constructor(e,t){(0,n.default)(this,"plugin",void 0),(0,n.default)(this,"hot",void 0),(0,n.default)(this,"endpoints",[]),(0,n.default)(this,"settings",void 0),(0,n.default)(this,"settingsType","array"),(0,n.default)(this,"currentEndpoint",null),(0,n.default)(this,"cellsToSetCache",[]),this.plugin=e,this.hot=this.plugin.hot,this.settings=t}initEndpoints(){this.endpoints=this.parseSettings(),this.refreshAllEndpoints()}getEndpoint(e){return"function"===this.settingsType?this.fillMissingEndpointData(this.settings)[e]:this.endpoints[e]}getAllEndpoints(){return"function"===this.settingsType?this.fillMissingEndpointData(this.settings):this.endpoints}fillMissingEndpointData(e){return this.parseSettings(e.call(this))}parseSettings(e){const t=[];let o=e;if(o||"function"!=typeof this.settings)return o||(o=this.settings),(0,i.arrayEach)(o,(e=>{const o={};this.assignSetting(e,o,"ranges",[[0,this.hot.countRows()-1]]),this.assignSetting(e,o,"reversedRowCoords",!1),this.assignSetting(e,o,"destinationRow",new Error("\n You must provide a destination row for the Column Summary plugin in order to work properly!\n ")),this.assignSetting(e,o,"destinationColumn",new Error("\n You must provide a destination column for the Column Summary plugin in order to work properly!\n ")),this.assignSetting(e,o,"sourceColumn",e.destinationColumn),this.assignSetting(e,o,"type","sum"),this.assignSetting(e,o,"forceNumeric",!1),this.assignSetting(e,o,"suppressDataTypeErrors",!0),this.assignSetting(e,o,"customFunction",null),this.assignSetting(e,o,"readOnly",!0),this.assignSetting(e,o,"roundFloat",!1),t.push(o)})),t;this.settingsType="function"}assignSetting(e,t,o,s){if("ranges"!==o||void 0!==e[o]){if("ranges"!==o||0!==e[o].length)if(void 0===e[o]){if(s instanceof Error)throw s;t[o]=s}else"destinationRow"===o&&t.reversedRowCoords?t[o]=this.hot.countRows()-e[o]-1:t[o]=e[o]}else t[o]=s}resetSetupBeforeStructureAlteration(e,t,o){if("function"!==this.settingsType)return;const s=e.indexOf("row")>-1?"row":"col",n=this.getAllEndpoints();(0,i.arrayEach)(n,(n=>{"row"===s&&n.destinationRow>=t&&("insert_row"===e?n.alterRowOffset=o:"remove_row"===e&&(n.alterRowOffset=-1*o)),"col"===s&&n.destinationColumn>=t&&("insert_col"===e?n.alterColumnOffset=o:"remove_col"===e&&(n.alterColumnOffset=-1*o))})),this.resetAllEndpoints(n,!1)}resetSetupAfterStructureAlteration(e,t,o,s,n){let r=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if("function"===this.settingsType){const e=()=>(this.hot.removeHook("beforeViewRender",e),this.refreshAllEndpoints());return void this.hot.addHookOnce("beforeViewRender",e)}const l=e.indexOf("row")>-1?"row":"col",a=e.indexOf("remove")>-1?-1:1,h=this.getAllEndpoints(),c=0===e.indexOf("move_row"),u=t;(0,i.arrayEach)(h,(e=>{"row"===l&&e.destinationRow>=u&&(e.alterRowOffset=a*o),"col"===l&&e.destinationColumn>=u&&(e.alterColumnOffset=a*o)})),this.resetAllEndpoints(h,!c),c?(0,i.arrayEach)(h,(e=>{this.extendEndpointRanges(e,u,s[0],s.length),this.recreatePhysicalRanges(e),this.clearOffsetInformation(e)})):(0,i.arrayEach)(h,(e=>{this.shiftEndpointCoordinates(e,u)})),r&&this.refreshAllEndpoints()}clearOffsetInformation(e){e.alterRowOffset=void 0,e.alterColumnOffset=void 0}extendEndpointRanges(e,t,o,s){(0,i.arrayEach)(e.ranges,(e=>{e[1]&&(t>=e[0]&&t<=e[1]?o>e[1]?e[1]+=s:o<e[0]&&(e[0]-=s):o>=e[0]&&o<=e[1]&&(e[1]-=s,t<=e[0]&&(e[0]+=1,e[1]+=1)))}))}recreatePhysicalRanges(e){const t=e.ranges,o=[],s=[];(0,i.arrayEach)(t,(e=>{const t=[];if(e[1])for(let o=e[0];o<=e[1];o++)t.push(this.hot.toPhysicalRow(o));else t.push(this.hot.toPhysicalRow(e[0]));s.push(t)})),(0,i.arrayEach)(s,(e=>{let t=[];(0,i.arrayEach)(e,((s,n)=>{0===n?t.push(s):e[n]!==e[n-1]+1&&(t.push(e[n-1]),o.push(t),t=[],t.push(s)),n===e.length-1&&(t.push(s),o.push(t))}))})),e.ranges=o}shiftEndpointCoordinates(e,t){e.alterRowOffset&&0!==e.alterRowOffset?(e.destinationRow+=e.alterRowOffset||0,(0,i.arrayEach)(e.ranges,(o=>{(0,i.arrayEach)(o,((s,n)=>{s>=t&&(o[n]+=e.alterRowOffset||0)}))}))):e.alterColumnOffset&&0!==e.alterColumnOffset&&(e.destinationColumn+=e.alterColumnOffset||0,e.sourceColumn+=e.alterColumnOffset||0)}resetAllEndpoints(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getAllEndpoints(),t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.some((e=>{const t=e.alterRowOffset||0,o=e.alterColumnOffset||0;return e.destinationRow+t>=this.hot.countRows()||e.destinationColumn+o>=this.hot.countCols()}))||(this.cellsToSetCache=[],(0,i.arrayEach)(e,(e=>{this.resetEndpointValue(e,t)})),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[])}refreshAllEndpoints(){this.cellsToSetCache=[],(0,i.arrayEach)(this.getAllEndpoints(),(e=>{this.currentEndpoint=e,this.plugin.calculate(e),this.setEndpointValue(e,"init")})),this.currentEndpoint=null,this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}refreshChangedEndpoints(e){const t=[];this.cellsToSetCache=[],(0,i.arrayEach)(e,((e,o,s)=>{`${e[2]||""}`!=`${e[3]}`&&(0,i.arrayEach)(this.getAllEndpoints(),((e,n)=>{this.hot.propToCol(s[o][1])===e.sourceColumn&&-1===t.indexOf(n)&&t.push(n)}))})),(0,i.arrayEach)(t,(e=>{this.refreshEndpoint(this.getEndpoint(e))})),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}refreshCellMetas(){this.endpoints.forEach((e=>{const t=this.hot.toVisualRow(e.destinationRow);if(null!==t){const o=this.hot.getCellMeta(t,e.destinationColumn);o.readOnly=e.readOnly,o.className="columnSummaryResult"}}))}refreshEndpoint(e){this.currentEndpoint=e,this.plugin.calculate(e),this.setEndpointValue(e),this.currentEndpoint=null}resetEndpointValue(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const o=e.alterRowOffset||0,s=e.alterColumnOffset||0;this.cellsToSetCache.push([this.hot.toVisualRow(e.destinationRow+(t?o:0)),this.hot.toVisualColumn(e.destinationColumn+(t?s:0)),""])}setEndpointValue(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=this.hot.toVisualRow(e.destinationRow);if(e.destinationRow>=this.hot.countRows()||e.destinationColumn>=this.hot.countCols())return void this.throwOutOfBoundsWarning();const n=this.hot.toVisualRow(e.destinationRow);if(null!==n){const o=this.hot.getCellMeta(n,e.destinationColumn);"init"!==t&&o.readOnly===e.readOnly||(o.readOnly=e.readOnly,o.className="columnSummaryResult")}if((!0===e.roundFloat||Number.isInteger(e.roundFloat))&&!isNaN(e.result)){const t=e.roundFloat;let o=0;Number.isInteger(t)&&(o=Math.min(Math.max(0,t),100)),e.result=e.result.toFixed(o)}o?this.hot.setDataAtCell(s,e.destinationColumn,e.result,"ColumnSummary.set"):this.cellsToSetCache.push([s,e.destinationColumn,e.result]),e.alterRowOffset=void 0,e.alterColumnOffset=void 0}throwOutOfBoundsWarning(){(0,r.warn)("One of the Column Summary plugins' destination points you provided is beyond the table boundaries!")}}},93642:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(17588);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ColumnSummary=s.ColumnSummary},70235:(e,t)=>{"use strict";t.__esModule=!0,t.isNullishOrNaN=function(e){return null==e||isNaN(e)}},94962:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=o(9893),i=o(13911),r=s(o(63870)),l=o(94151);function a(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function h(e,t){return e.get(u(e,t))}function c(e,t,o){return e.set(u(e,t),o),o}function u(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var d=new WeakMap,g=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,w=new WeakMap,C=new WeakMap;class v{static get CLASS_EDITOR_CONTAINER(){return"htCommentsContainer"}static get CLASS_EDITOR(){return"htComments"}static get CLASS_INPUT(){return"htCommentTextArea"}static get CLASS_CELL(){return"htCommentCell"}constructor(e,t){var o=this;a(this,d,void 0),a(this,g,!1),a(this,f,null),a(this,p,void 0),a(this,m,void 0),a(this,w,!0),a(this,C,new l.EditorResizeObserver),c(d,this,e),c(g,this,t),c(p,this,this.createEditor()),c(m,this,h(p,this).style),h(C,this).setObservedElement(this.getInputElement()),h(C,this).addLocalHook("resize",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("resize",...t)})),this.hide()}setPosition(e,t){h(m,this).left=`${e}px`,h(m,this).top=`${t}px`}setSize(e,t){if(e&&t){const o=this.getInputElement();o.style.width=`${e}px`,o.style.height=`${t}px`}}getSize(){return{width:(0,n.outerWidth)(this.getInputElement()),height:(0,n.outerHeight)(this.getInputElement())}}observeSize(){h(C,this).observe()}resetSize(){const e=this.getInputElement();e.style.width="",e.style.height=""}setReadOnlyState(e){this.getInputElement().readOnly=e}show(){h(m,this).display="block",c(w,this,!1)}hide(){h(C,this).unobserve(),h(w,this)||(h(m,this).display="none"),c(w,this,!0)}isVisible(){return"block"===h(m,this).display}setValue(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")||"";this.getInputElement().value=e}getValue(){return this.getInputElement().value}isFocused(){return h(d,this).activeElement===this.getInputElement()}focus(){this.getInputElement().focus()}createEditor(){const e=h(d,this).createElement("div"),t=h(d,this).createElement("textarea");return e.style.display="none",c(f,this,h(d,this).createElement("div")),h(f,this).setAttribute("dir",h(g,this)?"rtl":"ltr"),(0,n.addClass)(h(f,this),v.CLASS_EDITOR_CONTAINER),h(d,this).body.appendChild(h(f,this)),(0,n.addClass)(e,v.CLASS_EDITOR),(0,n.addClass)(t,v.CLASS_INPUT),t.setAttribute("data-hot-input",!0),e.appendChild(t),h(f,this).appendChild(e),e}getInputElement(){return h(p,this).querySelector(`.${v.CLASS_INPUT}`)}destroy(){const e=h(f,this)?h(f,this).parentNode:null;h(p,this).parentNode.removeChild(h(p,this)),c(p,this,null),c(m,this,null),h(C,this).destroy(),e&&e.removeChild(h(f,this))}}(0,i.mixin)(v,r.default);t.default=v},24090:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(9893),r=o(79729),l=o(13911),a=o(61205),h=s(o(94962)),c=s(o(79324)),u=o(58653),d=s(o(80712)),g=s(o(82667)),f=s(o(85329));function p(e,t,o){m(e,t),t.set(e,o)}function m(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function w(e,t,o){return e.set(v(e,t),o),o}function C(e,t){return e.get(v(e,t))}function v(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}o(19501);const y=t.PLUGIN_KEY="comments",E=t.PLUGIN_PRIORITY=60,S=t.META_COMMENT="comment",R=t.META_COMMENT_VALUE="value",b=t.META_STYLE="style",_=t.META_READONLY="readOnly",T=y,M=`plugin:${y}`;var O=new WeakMap,I=new WeakMap,N=new WeakMap,A=new WeakMap,P=new WeakMap,x=new WeakMap,H=new WeakSet;class D extends a.BasePlugin{constructor(){var e,t;super(...arguments),m(e=this,t=H),t.add(e),(0,n.default)(this,"range",{}),p(this,O,null),p(this,I,null),p(this,N,!1),p(this,A,!1),p(this,P,null),p(this,x,"")}static get PLUGIN_KEY(){return y}static get PLUGIN_PRIORITY(){return E}isEnabled(){return!!this.hot.getSettings()[y]}enablePlugin(){var e=this;this.enabled||(C(O,this)||(w(O,this,new h.default(this.hot.rootDocument,this.hot.isRtl())),C(O,this).addLocalHook("resize",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(H,e,U).call(e,...o)}))),C(I,this)||w(I,this,new c.default(this.getDisplayDelaySetting())),this.addHook("afterContextMenuDefaultOptions",(e=>this.addToContextMenu(e))),this.addHook("afterRenderer",((e,t,o,s,n,i)=>v(H,this,F).call(this,e,i))),this.addHook("afterScroll",(()=>v(H,this,Y).call(this))),this.addHook("afterBeginEditing",(()=>this.hide())),this.addHook("afterDocumentKeyDown",(e=>v(H,this,j).call(this,e))),C(I,this).addLocalHook("hide",(()=>this.hide())),C(I,this).addLocalHook("show",((e,t)=>this.showAtCell(e,t))),this.registerShortcuts(),this.registerListeners(),super.enablePlugin())}updatePlugin(){C(I,this).updateDelay(this.getDisplayDelaySetting()),super.updatePlugin()}disablePlugin(){this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("grid"),o=e.addContext(M);t.addShortcut({keys:[["Control","Alt","M"]],callback:()=>{const t=this.hot.getSelectedRangeLast();w(A,this,!0),this.hot.scrollToFocusedCell((()=>{this.setRange(t),this.show(),this.focusEditor(),e.setActiveContextName(M),this.hot._registerTimeout((()=>{w(A,this,!1)}))}))},stopPropagation:!0,runOnlyIf:()=>{var e;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isCell())&&!C(O,this).isVisible()},group:T}),o.addShortcut({keys:[["Escape"]],callback:()=>{C(O,this).setValue(C(x,this)),this.hide(),e.setActiveContextName("grid")},runOnlyIf:()=>C(O,this).isVisible()&&C(O,this).isFocused(),group:T}),o.addShortcut({keys:[["Control/Meta","Enter"]],callback:()=>{this.hide(),e.setActiveContextName("grid")},runOnlyIf:()=>C(O,this).isVisible()&&C(O,this).isFocused(),group:T})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(T)}registerListeners(){const{rootDocument:e}=this.hot,t=this.getEditorInputElement();this.eventManager.addEventListener(e,"mouseover",(e=>v(H,this,k).call(this,e))),this.eventManager.addEventListener(e,"mousedown",(e=>v(H,this,L).call(this,e))),this.eventManager.addEventListener(e,"mouseup",(()=>v(H,this,V).call(this))),this.eventManager.addEventListener(t,"focus",(()=>v(H,this,B).call(this))),this.eventManager.addEventListener(t,"blur",(()=>v(H,this,W).call(this)))}setRange(e){this.range=e}clearRange(){this.range={}}targetIsCellWithComment(e){const t=(0,i.closest)(e.target,"TD","TBODY");return!!(t&&(0,i.hasClass)(t,"htCommentCell")&&(0,i.closest)(t,[this.hot.rootElement]))}targetIsCommentTextArea(e){return this.getEditorInputElement()===e.target}setComment(e){if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const t=C(O,this).getValue();let o="";null!=e?o=e:null!=t&&(o=t);const s=this.range.from.row,n=this.range.from.col;this.updateCommentMeta(s,n,{[R]:o}),this.hot.render()}setCommentAtCell(e,t,o){this.setRange({from:this.hot._createCellCoords(e,t)}),this.setComment(o)}removeComment(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');this.hot.setCellMeta(this.range.from.row,this.range.from.col,S),e&&this.hot.render(),this.hide()}removeCommentAtCell(e,t){let o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.setRange({from:this.hot._createCellCoords(e,t)}),this.removeComment(o)}getComment(){const e=this.range.from.row,t=this.range.from.col;return this.getCommentMeta(e,t,R)}getCommentAtCell(e,t){return this.getCommentMeta(e,t,R)}show(){var e;if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const{from:{row:t,col:o}}=this.range;if(t<0||t>this.hot.countSourceRows()-1||o<0||o>this.hot.countSourceCols()-1)return!1;const s=this.hot.getCellMeta(this.range.from.row,this.range.from.col);return C(I,this).cancelHiding(),C(O,this).setValue(null!==(e=s[S]?s[S][R]:null)&&void 0!==e?e:""),C(O,this).show(),this.refreshEditor(!0),!0}showAtCell(e,t){return this.setRange({from:this.hot._createCellCoords(e,t)}),this.show()}hide(){C(O,this).hide()}refreshEditor(){var e,t;if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||this.range.from&&C(O,this).isVisible()))return;const{rowIndexMapper:o,columnIndexMapper:s}=this.hot,{row:n,col:r}=this.range.from;let l=o.getRenderableFromVisualIndex(n),a=s.getRenderableFromVisualIndex(r);const h=null===l;C(O,this).setPosition(0,0),null===l&&(l=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(n,-1))),null===a&&(a=s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(r,-1)));const c=null===l,u=null===a;l=null!==(e=l)&&void 0!==e?e:0,a=null!==(t=a)&&void 0!==t?t:0;const{rootWindow:d,view:{_wt:g}}=this.hot,{wtTable:f}=g,p=g.getCell({row:l,col:a},!0),m=this.getCommentMeta(n,r,b);m?C(O,this).setSize(m.width,m.height):C(O,this).resetSize();const w=u?0:f.getStretchedColumnWidth(a),v=h&&!c?(0,i.outerHeight)(p):0,{left:y,top:E,width:S,height:R}=p.getBoundingClientRect(),{width:T,height:M}=C(O,this).getSize(),{innerWidth:I,innerHeight:N}=this.hot.rootWindow,A=this.hot.rootDocument.documentElement;let P=y+d.scrollX+w,x=E+d.scrollY+v;this.hot.isRtl()&&(P-=T+w),this.hot.isLtr()&&y+S+T>I?P=y+d.scrollX-T-1:this.hot.isRtl()&&P<-(A.scrollWidth-A.clientWidth)&&(P=y+d.scrollX+w+1),E+M>N&&(x-=M-R+1),C(O,this).setPosition(P,x),C(O,this).setReadOnlyState(this.getCommentMeta(n,r,_)),C(O,this).observeSize()}focusEditor(){C(O,this).focus()}updateCommentMeta(e,t,o){const s=this.hot.getCellMeta(e,t)[S];let n;s?(n=(0,l.deepClone)(s),(0,l.deepExtend)(n,o)):n=o,this.hot.setCellMeta(e,t,S,n)}getCommentMeta(e,t,o){const s=this.hot.getCellMeta(e,t);if(s[S])return s[S][o]}addToContextMenu(e){e.items.push({name:u.SEPARATOR},(0,d.default)(this),(0,g.default)(this),(0,f.default)(this))}getDisplayDelaySetting(){const e=this.hot.getSettings()[y];if((0,l.isObject)(e))return e.displayDelay}getEditorInputElement(){return C(O,this).getInputElement()}destroy(){var e,t;null===(e=C(O,this))||void 0===e||e.destroy(),null===(t=C(I,this))||void 0===t||t.destroy(),super.destroy()}}function L(e){if(this.hot.view&&this.hot.view._wt&&!C(N,this)&&!this.targetIsCommentTextArea(e)){const t=(0,i.closest)(e.target,"TD","TBODY");let o=null;t&&(o=this.hot.getCoords(t)),(!t||this.range.from&&o&&(this.range.from.row!==o.row||this.range.from.col!==o.col))&&this.hide()}}function k(e){const{rootDocument:t}=this.hot;if(!(C(N,this)||C(O,this).isFocused()||(0,i.hasClass)(e.target,"wtBorder")||C(P,this)===e.target)&&C(O,this))if(w(P,this,t.elementFromPoint(e.clientX,e.clientY)),this.targetIsCellWithComment(e)){const t=this.hot._createCellRange(this.hot.getCoords(e.target));C(I,this).show(t)}else(0,i.isChildOf)(e.target,t)&&!this.targetIsCommentTextArea(e)&&C(I,this).hide()}function V(){w(N,this,!1)}function F(e,t){t[S]&&t[S][R]&&(0,i.addClass)(e,t.commentedCellClassName)}function W(){w(x,this,""),this.hot.getShortcutManager().setActiveContextName("grid"),this.setComment()}function B(){w(x,this,this.getComment()),this.hot.listen(),this.hot.getShortcutManager().setActiveContextName(M)}function U(e,t){this.updateCommentMeta(this.range.from.row,this.range.from.col,{[b]:{width:e,height:t}})}function j(e){C(O,this).isVisible()&&(0,r.stopImmediatePropagation)(e)}function Y(){C(A,this)||this.hide()}t.Comments=D},80712:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"commentsAddEdit",name(){var t;const o=null===(t=this.getSelectedRangeLast())||void 0===t?void 0:t.highlight;return null!=o&&o.isCell()&&e.getCommentAtCell(o.row,o.col)?this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_EDIT_COMMENT):this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_ADD_COMMENT)},callback(){const t=this.getSelectedRangeLast();e.setRange(t),e.show(),e.focusEditor()},disabled(){const e=this.getSelectedRangeLast();return!!(!e||e.highlight.isHeader()||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=i?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}},85329:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"commentsReadOnly",name(){const t=this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT);return(0,n.checkSelectionConsistency)(this.getSelectedRange(),((t,o)=>e.getCommentMeta(t,o,i.META_READONLY)))?(0,n.markLabelAsSelected)(t):t},callback(){this.getSelectedRangeLast().forAll(((t,o)=>{if(t>=0&&o>=0){const s=!!e.getCommentMeta(t,o,i.META_READONLY);e.updateCommentMeta(t,o,{[i.META_READONLY]:!s})}}))},disabled(){const t=this.getSelectedRangeLast();return!!(!t||t.highlight.isHeader()||!e.getCommentAtCell(t.highlight.row,t.highlight.col)||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(80485),i=o(24090);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}},82667:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"commentsRemove",name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_REMOVE_COMMENT)},callback(){this.getSelectedRangeLast().forAll(((t,o)=>{t>=0&&o>=0&&e.removeCommentAtCell(t,o,!1)})),this.render()},disabled(){const e=this.getSelectedRangeLast();return!!(!e||e.highlight.isHeader()||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=i?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}},79324:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707)),i=o(78832),r=o(13911),l=s(o(63870));class a{constructor(e){(0,n.default)(this,"wasLastActionShow",!0),(0,n.default)(this,"showDebounced",null),(0,n.default)(this,"hidingTimer",null),this.updateDelay(e)}hide(){this.wasLastActionShow=!1,this.hidingTimer=setTimeout((()=>{!1===this.wasLastActionShow&&this.runLocalHooks("hide")}),250)}show(e){this.wasLastActionShow=!0,this.showDebounced(e)}cancelHiding(){this.wasLastActionShow=!0,clearTimeout(this.hidingTimer),this.hidingTimer=null}updateDelay(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250;this.showDebounced=(0,i.debounce)((e=>{this.wasLastActionShow&&this.runLocalHooks("show",e.from.row,e.from.col)}),e)}destroy(){this.clearLocalHooks()}}(0,r.mixin)(a,l.default);t.default=a},94151:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=o(13911),i=s(o(63870));function r(e,t,o){l(e,t),t.set(e,o)}function l(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function a(e,t){return e.get(c(e,t))}function h(e,t,o){return e.set(c(e,t),o),o}function c(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var u=new WeakMap,d=new WeakMap,g=new WeakMap,f=new WeakSet;class p{constructor(){var e,t;l(e=this,t=f),t.add(e),r(this,u,!0),r(this,d,null),r(this,g,new ResizeObserver((e=>c(f,this,m).call(this,e))))}setObservedElement(e){h(d,this,e)}unobserve(){a(g,this).unobserve(a(d,this))}observe(){h(u,this,!0),a(g,this).observe(a(d,this))}destroy(){a(g,this).disconnect()}}function m(e){!a(u,this)&&Array.isArray(e)&&e.length?e.forEach((e=>{let{borderBoxSize:t}=e;const{inlineSize:o,blockSize:s}=t[0];this.runLocalHooks("resize",o,s)})):h(u,this,!1)}t.EditorResizeObserver=p,(0,n.mixin)(p,i.default)},41270:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(24090);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.Comments=s.Comments},21172:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724),o(54999);var n=s(o(85707)),i=o(9175),r=o(13911);t.CommandExecutor=class{constructor(e){(0,n.default)(this,"hot",void 0),(0,n.default)(this,"commands",{}),(0,n.default)(this,"commonCallback",null),this.hot=e}registerCommand(e,t){this.commands[e]=t}setCommonCallback(e){this.commonCallback=e}execute(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];const n=e.split(":"),l=n[0],a=2===n.length?n[1]:null;let h=this.commands[l];if(!h)throw new Error(`Menu command '${l}' not exists.`);if(a&&h.submenu&&(h=function(e,t){let o;return(0,i.arrayEach)(t,(t=>{const s=t.key?t.key.split(":"):null;if(Array.isArray(s)&&s[1]===e)return o=t,!1})),o}(a,h.submenu.items)),!0===h.disabled)return;if("function"==typeof h.disabled&&!0===h.disabled.call(this.hot))return;if((0,r.hasOwnProperty)(h,"submenu"))return;const c=[];"function"==typeof h.callback&&c.push(h.callback),"function"==typeof this.commonCallback&&c.push(this.commonCallback),o.unshift(n.join(":")),(0,i.arrayEach)(c,(e=>e.apply(this.hot,o)))}}},74516:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=s(o(85707)),i=o(61205),r=s(o(56937)),l=o(9175),a=o(13911),h=o(21172),c=o(62076),u=o(95586),d=o(80485),g=o(9893),f=o(58653);function p(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function m(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}o(21151);const w=t.PLUGIN_KEY="contextMenu",C=t.PLUGIN_PRIORITY=70,v=w;r.default.getSingleton().register("afterContextMenuDefaultOptions"),r.default.getSingleton().register("beforeContextMenuShow"),r.default.getSingleton().register("afterContextMenuShow"),r.default.getSingleton().register("afterContextMenuHide"),r.default.getSingleton().register("afterContextMenuExecute");var y=new WeakSet;class E extends i.BasePlugin{constructor(){super(...arguments),p(this,y),(0,n.default)(this,"commandExecutor",new h.CommandExecutor(this.hot)),(0,n.default)(this,"itemsFactory",null),(0,n.default)(this,"menu",null)}static get PLUGIN_KEY(){return w}static get PLUGIN_PRIORITY(){return C}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[f.ROW_ABOVE,f.ROW_BELOW,f.SEPARATOR,f.COLUMN_LEFT,f.COLUMN_RIGHT,f.SEPARATOR,f.REMOVE_ROW,f.REMOVE_COLUMN,f.SEPARATOR,f.UNDO,f.REDO,f.SEPARATOR,f.READ_ONLY,f.SEPARATOR,f.ALIGNMENT]}isEnabled(){return!!this.hot.getSettings()[w]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[w];"function"==typeof t.callback&&this.commandExecutor.setCommonCallback(t.callback),this.menu=new u.Menu(this.hot,{className:"htContextMenu",keepInViewport:!0,container:t.uiContainer||this.hot.rootDocument.body}),this.menu.addLocalHook("beforeOpen",(()=>m(y,this,R).call(this))),this.menu.addLocalHook("afterOpen",(()=>m(y,this,b).call(this))),this.menu.addLocalHook("afterClose",(()=>m(y,this,_).call(this))),this.menu.addLocalHook("executeCommand",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return e.executeCommand.call(e,...o)})),this.addHook("afterOnCellContextMenu",(e=>m(y,this,S).call(this,e))),this.registerShortcuts(),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.close(),this.menu&&(this.menu.destroy(),this.menu=null),this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Control/Meta","Shift","Backslash"],["Shift","F10"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();this.hot.scrollToFocusedCell();const t=this.hot.getCell(e.row,e.col,!0).getBoundingClientRect(),o=(0,d.getDocumentOffsetByElement)(this.menu.container,this.hot.rootDocument);this.open({left:t.left+o.left,top:t.top+o.top-1+t.height},{left:t.width,above:-t.height}),this.menu.getNavigator().toFirstItem()},runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&!this.menu.isOpened()},group:v})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(v)}open(e){var t;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{above:0,below:0,left:0,right:0};if(null!==(t=this.menu)&&void 0!==t&&t.isOpened())return;this.prepareMenuItems(),this.menu.open();this.menu.tableBorderWidth>0||(o.below+=1,o.right+=1,o.above-=1,o.left-=1),(0,a.objectEach)(o,((e,t)=>{this.menu.setOffset(t,e)})),this.menu.setPosition(e)}close(){var e;null===(e=this.menu)||void 0===e||e.close(),this.itemsFactory=null}executeCommand(e){null===this.itemsFactory&&this.prepareMenuItems();for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];this.commandExecutor.execute(e,...o)}prepareMenuItems(){this.itemsFactory=new c.ItemsFactory(this.hot,E.DEFAULT_ITEMS);const e=this.hot.getSettings()[w],t={items:this.itemsFactory.getItems(e)};this.hot.runHooks("afterContextMenuDefaultOptions",t),this.itemsFactory.setPredefinedItems(t.items);const o=this.itemsFactory.getItems(e);this.hot.runHooks("beforeContextMenuSetItems",o),this.menu.setMenuItems(o),(0,l.arrayEach)(o,(e=>this.commandExecutor.registerCommand(e.key,e)))}destroy(){this.close(),this.menu&&this.menu.destroy(),super.destroy()}}function S(e){const t=this.hot.getSettings(),o=t.rowHeaders,s=t.colHeaders;const n=e.target;if(this.close(),(0,g.hasClass)(n,"handsontableInput"))return;if(e.preventDefault(),e.stopPropagation(),!o&&!s&&!(function(e){return"TD"===e.nodeName||"TD"===e.parentNode.nodeName}(n)||(0,g.hasClass)(n,"current")&&(0,g.hasClass)(n,"wtBorder")))return;const i=(0,d.getDocumentOffsetByElement)(this.menu.container,this.hot.rootDocument);this.open({top:e.clientY+i.top,left:e.clientX+i.left})}function R(){this.hot.runHooks("beforeContextMenuShow",this)}function b(){this.hot.runHooks("afterContextMenuShow",this)}function _(){this.hot.listen(),this.hot.runHooks("afterContextMenuHide",this)}t.ContextMenu=E,E.SEPARATOR={name:f.SEPARATOR}},10668:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(74516);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ContextMenu=s.ContextMenu},62076:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(15724);var n=s(o(85707)),i=o(13911),r=o(9175),l=o(58653);t.ItemsFactory=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;(0,n.default)(this,"hot",void 0),(0,n.default)(this,"predefinedItems",(0,l.predefinedItems)()),(0,n.default)(this,"defaultOrderPattern",void 0),this.hot=e,this.defaultOrderPattern=t}setPredefinedItems(e){const t={};this.defaultOrderPattern.length=0,(0,i.objectEach)(e,((e,o)=>{let s="";e.name===l.SEPARATOR?(t[l.SEPARATOR]=e,s=l.SEPARATOR):isNaN(parseInt(o,10))?(e.key=void 0===e.key?o:e.key,t[o]=e,s=e.key):(t[e.key]=e,s=e.key),this.defaultOrderPattern.push(s)})),this.predefinedItems=t}getItems(){return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const s=[];let n=e;n&&n.items?n=n.items:Array.isArray(n)||(n=t);(0,i.isObject)(n)?(0,i.objectEach)(n,((e,t)=>{let n=o["string"==typeof e?e:t];n||(n=e),(0,i.isObject)(e)?(0,i.extend)(n,e):"string"==typeof n&&(n={name:n}),void 0===n.key&&(n.key=t),s.push(n)})):(0,r.arrayEach)(n,((e,t)=>{let n=o[e];!n&&l.ITEMS.indexOf(e)>=0||(n||(n={name:e,key:`${t}`}),(0,i.isObject)(e)&&(0,i.extend)(n,e),void 0===n.key&&(n.key=t),s.push(n))}));return s}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,this.defaultOrderPattern,this.predefinedItems)}}},87834:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707));t.Cursor=class{constructor(e,t){(0,n.default)(this,"top",void 0),(0,n.default)(this,"topRelative",void 0),(0,n.default)(this,"left",void 0),(0,n.default)(this,"leftRelative",void 0),(0,n.default)(this,"scrollTop",void 0),(0,n.default)(this,"scrollLeft",void 0),(0,n.default)(this,"cellHeight",void 0),(0,n.default)(this,"cellWidth",void 0);const o=t.scrollY,s=t.scrollX;let i,r,l,a,h,c;this.rootWindow=t,this.type=this.getSourceType(e),"literal"===this.type?(i=parseInt(e.top,10),l=parseInt(e.left,10),h=e.height||0,c=e.width||0,r=i,a=l,i+=o,l+=s):"event"===this.type&&(i=parseInt(e.pageY,10),l=parseInt(e.pageX,10),h=e.target.clientHeight,c=e.target.clientWidth,r=i-o,a=l-s),this.top=i,this.topRelative=r,this.left=l,this.leftRelative=a,this.scrollTop=o,this.scrollLeft=s,this.cellHeight=h,this.cellWidth=c}getSourceType(e){let t="literal";return e instanceof Event&&(t="event"),t}fitsAbove(e){return this.topRelative>=e.offsetHeight}fitsBelow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rootWindow.innerHeight;return this.topRelative+e.offsetHeight<=t}fitsOnRight(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rootWindow.innerWidth;return this.leftRelative+this.cellWidth+e.offsetWidth<=t}fitsOnLeft(e){return this.leftRelative>=e.offsetWidth}}},53748:(e,t)=>{"use strict";t.__esModule=!0,t.createDefaultShortcutsList=function(e){const{hot:t,hotMenu:o}=e;return[{keys:[["Control/Meta","A"]],forwardToContext:t.getShortcutManager().getContext("grid"),callback:()=>e.close(!0)},{keys:[["Tab"],["Shift","Tab"]],callback:(o,s)=>{const n=t.getSettings(),i="function"==typeof n.tabMoves?n.tabMoves(o):n.tabMoves;s.includes("shift")?t.selection.transformStart(-i.row,-i.col):t.selection.transformStart(i.row,i.col),e.close(!0)}},{keys:[["Escape"]],callback:()=>e.close()},{keys:[["ArrowDown"]],callback:()=>e.getNavigator().toNextItem()},{keys:[["ArrowUp"]],callback:()=>e.getNavigator().toPreviousItem()},{keys:[["ArrowRight"]],callback:()=>{const t=o.getSelectedLast();if(t){const o=e.openSubMenu(t[0]);o&&o.getNavigator().toFirstItem()}}},{keys:[["ArrowLeft"]],callback:()=>{o.getSelectedLast()&&e.isSubMenu()&&(e.close(),e.isSubMenu()&&e.parentMenu.hotMenu.listen())}},{keys:[["Control/Meta","ArrowUp"],["Home"]],callback:()=>e.getNavigator().toFirstItem()},{keys:[["Control/Meta","ArrowDown"],["End"]],callback:()=>e.getNavigator().toLastItem()},{keys:[["Enter"],["Space"]],callback:t=>{const s=o.getSelectedLast();s&&(o.getSourceDataAtRow(s[0]).submenu?e.openSubMenu(s[0]).getNavigator().toFirstItem():(e.executeCommand(t),e.close(!0)))}},{keys:[["PageUp"]],callback:()=>{o.getSelectedLast()?o.selection.transformStart(-o.countVisibleRows(),0):e.getNavigator().toFirstItem()}},{keys:[["PageDown"]],callback:()=>{o.getSelectedLast()?o.selection.transformStart(o.countVisibleRows(),0):e.getNavigator().toLastItem()}}]}},95586:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(71131);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||(t[e]=s[e]))}))},71131:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(68860),r=o(49523),l=o(85625),a=o(58653),h=o(79427),c=s(o(82629)),u=o(9175),d=o(28890),g=o(9893),f=o(79729),p=o(78832),m=o(38893),w=o(13911),C=s(o(63870)),v=o(20859),y=o(92692);function E(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function S(e,t,o){return e.set(b(e,t),o),o}function R(e,t){return e.get(b(e,t))}function b(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var _=new WeakMap,T=new WeakMap,M=new WeakMap;class O{get tableBorderWidth(){return void 0===R(M,this)&&this.hotMenu&&S(M,this,parseInt(this.hotMenu.rootWindow.getComputedStyle(this.hotMenu.view._wt.wtTable.TABLE).borderWidth,10)),R(M,this)}constructor(e,t){var o=this;(0,n.default)(this,"hot",void 0),(0,n.default)(this,"options",void 0),(0,n.default)(this,"eventManager",new c.default(this)),(0,n.default)(this,"container",void 0),(0,n.default)(this,"positioner",void 0),(0,n.default)(this,"hotMenu",null),(0,n.default)(this,"hotSubMenus",{}),(0,n.default)(this,"parentMenu",void 0),(0,n.default)(this,"menuItems",null),(0,n.default)(this,"origOutsideClickDeselects",null),E(this,_,void 0),E(this,T,void 0),E(this,M,void 0),this.hot=e,this.options=t||{parent:null,name:null,className:"",keepInViewport:!0,standalone:!1,minWidth:215,container:this.hot.rootDocument.documentElement},this.container=this.createContainer(this.options.name),this.positioner=new i.Positioner(this.options.keepInViewport),this.parentMenu=this.options.parent||null,this.registerEvents(),this.isSubMenu()&&this.addLocalHook("afterSelectionChange",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.parentMenu.runLocalHooks("afterSelectionChange",...t)}))}registerEvents(){let e=this.hot.rootWindow;for(;e;)this.eventManager.addEventListener(e.document,"mousedown",(e=>this.onDocumentMouseDown(e))),this.eventManager.addEventListener(e.document,"touchstart",(e=>this.onDocumentMouseDown(e))),this.eventManager.addEventListener(e.document,"contextmenu",(e=>this.onDocumentContextMenu(e))),e=(0,g.getParentWindow)(e)}setMenuItems(e){this.menuItems=e}getNavigator(){return R(_,this)}getKeyboardShortcutsCtrl(){return R(T,this)}getSelectedItem(){return this.hasSelectedItem()?this.hotMenu.getSourceDataAtRow(this.hotMenu.getSelectedLast()[0]):null}hasSelectedItem(){return Array.isArray(this.hotMenu.getSelectedLast())}isSubMenu(){return null!==this.parentMenu}open(){this.runLocalHooks("beforeOpen"),this.container.removeAttribute("style"),this.container.style.display="block";const e=(0,p.debounce)((e=>this.openSubMenu(e)),300),t=this.options.minWidth||215;let o=!1,s=(0,u.arrayFilter)(this.menuItems,(e=>(e.key===a.NO_ITEMS&&(o=!0),(0,h.isItemHidden)(e,this.hot))));if(s.length<1&&!o)s.push((0,a.predefinedItems)()[a.NO_ITEMS]);else if(0===s.length)return;s=(0,h.filterSeparators)(s,a.SEPARATOR);let n=!1;const i={data:s,colHeaders:!1,autoColumnSize:!0,autoWrapRow:!1,modifyColWidth:e=>(0,m.isDefined)(e)&&e<t?t:e,autoRowSize:!1,readOnly:!0,editor:!1,copyPaste:!1,hiddenRows:!0,maxCols:1,columns:[{data:"name",renderer:(0,v.createMenuItemRenderer)(this.hot)}],renderAllRows:!0,fragmentSelection:!1,outsideClickDeselects:!1,disableVisualSelection:"area",layoutDirection:this.hot.isRtl()?"rtl":"ltr",ariaTags:!1,beforeOnCellMouseOver:(e,t)=>{R(_,this).setCurrentPage(t.row)},afterOnCellMouseOver:(t,o)=>{this.isAllSubMenusClosed()?e(o.row):this.openSubMenu(o.row)},rowHeights:e=>s[e].name===a.SEPARATOR?1:void 0,afterOnCellContextMenu:e=>{e.preventDefault(),(0,d.isWindowsOS)()&&n&&this.hasSelectedItem()&&this.close(!0)},afterSelection:(e,t,o,s,n)=>{this.hotMenu.view.isMouseDown()&&(n.value=!0),this.runLocalHooks("afterSelectionChange",this.getSelectedItem())},beforeOnCellMouseUp:e=>{this.hasSelectedItem()&&(n=!this.isCommandPassive(this.getSelectedItem()),this.executeCommand(e))},afterOnCellMouseUp:e=>{(0,d.isWindowsOS)()&&(0,f.isRightClick)(e)||!n||!this.hasSelectedItem()||((0,d.isMobileBrowser)()||(0,d.isIpadOS)()?this.hot._registerTimeout((()=>this.close(!0)),325):this.close(!0))},afterUnlisten:()=>{!this.hasSelectedItem()&&this.isOpened()&&this.hotMenu.listen()}};this.origOutsideClickDeselects=this.hot.getSettings().outsideClickDeselects,this.hot.getSettings().outsideClickDeselects=!1,this.hotMenu=new this.hot.constructor(this.container,i),this.hotMenu.addHook("afterInit",(()=>this.onAfterInit())),this.hotMenu.init(),S(_,this,(0,r.createMenuNavigator)(this.hotMenu)),S(T,this,(0,l.createKeyboardShortcutsCtrl)(this)),R(T,this).listen(),this.focus(),this.isSubMenu()&&this.addLocalHook("afterOpen",(()=>this.parentMenu.runLocalHooks("afterSubmenuOpen",this))),this.runLocalHooks("afterOpen",this)}close(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isOpened())if(e&&this.isSubMenu())this.parentMenu.close();else if(R(_,this).clear(),this.closeAllSubMenus(),this.container.style.display="none",this.hotMenu.destroy(),this.hotMenu=null,this.hot.getSettings().outsideClickDeselects=this.origOutsideClickDeselects,this.runLocalHooks("afterClose"),this.isSubMenu()){if(this.hot.getSettings().ariaTags){const e=this.parentMenu.hotMenu.getSelectedLast();if(e){const t=this.parentMenu.hotMenu.getCell(e[0],0);(0,g.setAttribute)(t,[(0,y.A11Y_EXPANDED)(!1)])}}this.parentMenu.hotMenu.listen()}}openSubMenu(e){if(!this.hotMenu)return!1;const t=this.hotMenu.getCell(e,0);if(this.closeAllSubMenus(),!t||!(0,h.hasSubMenu)(t))return!1;const o=this.hotMenu.getSourceDataAtRow(e),s=new O(this.hot,{parent:this,name:o.name,className:this.options.className,keepInViewport:!0,container:this.options.container});return s.setMenuItems(o.submenu.items),s.open(),s.setPosition(t.getBoundingClientRect()),this.hotSubMenus[o.key]=s,this.hot.getSettings().ariaTags&&(0,g.setAttribute)(t,[(0,y.A11Y_EXPANDED)(!0)]),s}closeSubMenu(e){const t=this.hotMenu.getSourceDataAtRow(e),o=this.hotSubMenus[t.key];if(o){o.destroy(),delete this.hotSubMenus[t.key];const s=this.hotMenu.getCell(e,0);this.hot.getSettings().ariaTags&&(0,g.setAttribute)(s,[(0,y.A11Y_EXPANDED)(!1)])}}closeAllSubMenus(){(0,u.arrayEach)(this.hotMenu.getData(),((e,t)=>this.closeSubMenu(t)))}isAllSubMenusClosed(){return 0===Object.keys(this.hotSubMenus).length}focus(){this.isOpened()&&(this.hotMenu.rootElement.focus({preventScroll:!0}),this.getKeyboardShortcutsCtrl().listen(),this.hotMenu.listen())}destroy(){const e=this.container.parentNode;this.clearLocalHooks(),this.close(),this.parentMenu=null,this.eventManager.destroy(),e&&e.removeChild(this.container)}isOpened(){return null!==this.hotMenu}executeCommand(e){if(!this.isOpened()||!this.hasSelectedItem())return;const t=this.getSelectedItem();if(this.runLocalHooks("select",t,e),this.isCommandPassive(t))return;const o=this.hot.getSelectedRange(),s=o?(0,h.normalizeSelection)(o):[];this.runLocalHooks("executeCommand",t.key,s,e),this.isSubMenu()&&this.parentMenu.runLocalHooks("executeCommand",t.key,s,e)}isCommandPassive(e){return!1===e.isCommand||(0,h.isItemSeparator)(e)||(0,h.isItemDisabled)(e,this.hot)||(0,h.isItemSubMenu)(e)}setOffset(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.positioner.setOffset(e,t)}setPosition(e){this.isSubMenu()&&this.positioner.setParentElement(this.parentMenu.container),this.positioner.setElement(this.container).updatePosition(e)}updateMenuDimensions(){const{wtTable:e}=this.hotMenu.view._wt,t=this.hotMenu.getSettings().data,o=e.hider.style,s=e.holder.style,n=parseInt(o.width,10),i=(0,u.arrayReduce)(t,((e,t,o)=>{const s=this.hotMenu.getCell(o,0)?(0,g.outerHeight)(this.hotMenu.getCell(o,0)):0;return e+(t.name===a.SEPARATOR?1:s)}),0);s.width=`${n+3}px`,s.height=`${i+3}px`,o.height=s.height}createContainer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=this.options.container.ownerDocument;let o,s=e;return s&&((0,p.isFunction)(s)&&(s=s.call(this.hot),s=null===s||(0,m.isUndefined)(s)?"":s.toString()),s=s.replace(/[^A-z0-9]/g,"_"),s=`${this.options.className}Sub_${s}`,o=t.querySelector(`.${this.options.className}.${s}`)),o||(o=t.createElement("div"),(0,g.addClass)(o,`htMenu ${this.options.className}`),s&&(0,g.addClass)(o,s),this.options.container.appendChild(o)),o}onAfterInit(){this.updateMenuDimensions(),this.hot.getSettings().ariaTags&&(0,g.setAttribute)(this.hotMenu.rootElement,[(0,y.A11Y_MENU)(),(0,y.A11Y_TABINDEX)(-1)])}onDocumentMouseDown(e){this.isOpened()&&(this.options.standalone&&this.hotMenu&&!(0,g.isChildOf)(e.target,this.hotMenu.rootElement)?this.close(!0):!this.isAllSubMenusClosed()&&!this.isSubMenu()||(0,g.isChildOf)(e.target,".htMenu")||this.close(!0))}onDocumentContextMenu(e){this.isOpened()&&(0,g.hasClass)(e.target,"htCore")&&(0,g.isChildOf)(e.target,this.hotMenu.rootElement)&&e.preventDefault()}}t.Menu=O,(0,w.mixin)(O,C.default)},20859:(e,t,o)=>{"use strict";t.__esModule=!0,t.createMenuItemRenderer=function(e){return(t,o,r,l,a,h)=>{const c=t.getSourceDataAtRow(r),u=e.rootDocument.createElement("div"),d="function"==typeof h?h.call(e):h,g="function"==typeof c.ariaLabel?c.ariaLabel.call(e):c.ariaLabel,f="function"==typeof c.ariaChecked?c.ariaChecked.call(e):c.ariaChecked;if((0,n.empty)(o),(0,n.addClass)(u,"htItemWrapper"),e.getSettings().ariaTags){const t=!(0,s.isItemDisabled)(c,e)&&!(0,s.isItemSelectionDisabled)(c)&&!(0,s.isItemSeparator)(c);(0,n.setAttribute)(o,[...(0,s.isItemCheckable)(c)?[(0,i.A11Y_MENU_ITEM_CHECKBOX)(),(0,i.A11Y_LABEL)(g),(0,i.A11Y_CHECKED)(f)]:[(0,i.A11Y_MENU_ITEM)(),(0,i.A11Y_LABEL)(d)],...t?[(0,i.A11Y_TABINDEX)(-1)]:[],...(0,s.isItemDisabled)(c,e)?[(0,i.A11Y_DISABLED)()]:[],...(0,s.isItemSubMenu)(c)?[(0,i.A11Y_EXPANDED)(!1)]:[]])}o.className="",o.appendChild(u),(0,s.isItemSeparator)(c)?(0,n.addClass)(o,"htSeparator"):"function"==typeof c.renderer?((0,n.addClass)(o,"htCustomMenuRenderer"),o.appendChild(c.renderer(t,u,r,l,a,d))):(0,n.fastInnerHTML)(u,d),(0,s.isItemDisabled)(c,e)?(0,n.addClass)(o,"htDisabled"):(0,s.isItemSelectionDisabled)(c)?(0,n.addClass)(o,"htSelectionDisabled"):(0,s.isItemSubMenu)(c)&&(0,n.addClass)(o,"htSubmenu")}};var s=o(79427),n=o(9893),i=o(92692)},49523:(e,t,o)=>{"use strict";t.__esModule=!0,t.createMenuNavigator=function(e){return(0,s.createPaginator)({size:()=>e.countRows(),onItemSelect(t,o){const s=e.getCell(t,0);if(!s||(0,n.isSeparator)(s)||(0,n.isDisabled)(s)||(0,n.isSelectionDisabled)(s))return!1;e.selectCell(t,0,...o?[t,0,!1,!1]:[])},onClear(){e.deselectCell()}})};var s=o(57625),n=o(79427)},68860:(e,t,o)=>{"use strict";t.__esModule=!0,o(67834);var s=o(87834);function n(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function i(e,t){return e.get(l(e,t))}function r(e,t,o){return e.set(l(e,t),o),o}function l(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var a=new WeakMap,h=new WeakMap,c=new WeakMap,u=new WeakMap,d=new WeakMap;t.Positioner=class{constructor(e){n(this,a,void 0),n(this,h,void 0),n(this,c,void 0),n(this,u,!1),n(this,d,{above:0,below:0,left:0,right:0}),r(u,this,e)}setOffset(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return i(d,this)[e]=t,this}setElement(e){return r(a,this,e),this}setParentElement(e){return r(h,this,e),this}updatePosition(e){r(c,this,new s.Cursor(e,i(a,this).ownerDocument.defaultView)),i(u,this)?(i(c,this).fitsBelow(i(a,this))?this.setPositionBelowCursor():i(c,this).fitsAbove(i(a,this))?this.setPositionAboveCursor():this.setPositionBelowCursor(),this.updateHorizontalPosition()):(this.setPositionBelowCursor(),this.setPositionOnRightOfCursor())}updateHorizontalPosition(){"rtl"===i(a,this).dir?i(c,this).fitsOnLeft(i(a,this))?this.setPositionOnLeftOfCursor():this.setPositionOnRightOfCursor():i(c,this).fitsOnRight(i(a,this))?this.setPositionOnRightOfCursor():this.setPositionOnLeftOfCursor()}setPositionAboveCursor(){let e=i(d,this).above+i(c,this).top-i(a,this).offsetHeight;i(h,this)&&(e=i(c,this).top+i(c,this).cellHeight-i(a,this).offsetHeight+3),i(a,this).style.top=`${e}px`}setPositionBelowCursor(){let e=i(d,this).below+i(c,this).top+1;i(h,this)&&(e=i(c,this).top-1),i(a,this).style.top=`${e}px`}setPositionOnRightOfCursor(){let e=i(c,this).left;if(i(h,this)){const t=i(h,this).ownerDocument.defaultView,o=Number.parseInt(t.getComputedStyle(i(h,this).querySelector(".htCore")).borderRightWidth,10);e+=i(c,this).cellWidth+o}else e+=i(d,this).right;i(a,this).style.left=`${e}px`}setPositionOnLeftOfCursor(){let e=i(d,this).left+i(c,this).left-i(a,this).offsetWidth;if(i(h,this)){const t=i(h,this).ownerDocument.defaultView;e-=Number.parseInt(t.getComputedStyle(i(h,this).querySelector(".htCore")).borderLeftWidth,10)}i(a,this).style.left=`${e}px`}}},85625:(e,t,o)=>{"use strict";t.__esModule=!0,t.createKeyboardShortcutsCtrl=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const o=[];function r(e,t){h(t).addShortcuts(e,{group:n})}function l(e,t){const s=h(t);e.forEach((e=>{let{keys:t}=e;t.forEach((e=>s.removeShortcutsByKeys(e)))})),o.push({shortcuts:e,contextName:t}),r(e,t)}function a(e){return e?`${i}:${e}`:i}function h(t){var o;const s=e.hotMenu.getShortcutManager(),n=a(t);return null!==(o=s.getContext(n))&&void 0!==o?o:s.addContext(n)}return r((0,s.createDefaultShortcutsList)(e)),t.forEach((e=>{let{shortcuts:t,contextName:o}=e;l(t,o)})),{addCustomShortcuts:l,getCustomShortcuts:function(){return[...o]},getContext:h,listen:function(t){e.hotMenu.getShortcutManager().setActiveContextName(a(t))}}},o(15724);var s=o(53748);const n="menu",i=n},79427:(e,t,o)=>{"use strict";t.__esModule=!0,t.filterSeparators=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.SEPARATOR,o=e.slice(0);return o=l(o,t),o=function(e,t){let o=e.slice(0);return o.reverse(),o=l(o,t),o.reverse(),o}(o,t),o=function(e){const t=[];return(0,s.arrayEach)(e,((e,o)=>{o>0?t[t.length-1].name!==e.name&&t.push(e):t.push(e)})),t}(o),o},t.hasSubMenu=function(e){return(0,i.hasClass)(e,"htSubmenu")},t.isDisabled=function(e){return(0,i.hasClass)(e,"htDisabled")},t.isItemCheckable=function(e){return!0===e.checkable},t.isItemDisabled=function(e,t){return!0===e.disabled||"function"==typeof e.disabled&&!0===e.disabled.call(t)},t.isItemHidden=function(e,t){return!e.hidden||!("function"==typeof e.hidden&&e.hidden.call(t))},t.isItemSelectionDisabled=function(e){return(0,n.hasOwnProperty)(e,"disableSelection")},t.isItemSeparator=function(e){return new RegExp(r.SEPARATOR,"i").test(e.name)},t.isItemSubMenu=function(e){return(0,n.hasOwnProperty)(e,"submenu")},t.isSelectionDisabled=function(e){return(0,i.hasClass)(e,"htSelectionDisabled")},t.isSeparator=function(e){return(0,i.hasClass)(e,"htSeparator")},t.normalizeSelection=function(e){return(0,s.arrayMap)(e,(e=>({start:e.getTopStartCorner(),end:e.getBottomEndCorner()})))},o(15724);var s=o(9175),n=o(13911),i=o(9893),r=o(58653);function l(e,t){const o=e.slice(0);for(let e=0;e<o.length&&o[e].name===t;)o.shift();return o}},17200:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:l,name(){return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT)},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();return!e||(!!e.isSingleHeader()||!(this.getSelectedRange()&&!this.selection.isSelectedByCorner()))},submenu:{items:[{key:`${l}:left`,checkable:!0,ariaLabel(){return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT)},ariaChecked(){return(0,s.hasSelectionAClass)(this,"htLeft")},name(){let e=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT);return(0,s.hasSelectionAClass)(this,"htLeft")&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),o="horizontal",n="htLeft";this.runHooks("beforeCellAlignment",t,e,o,n),(0,s.align)(e,o,n,((e,t)=>this.getCellMeta(e,t)),((e,t,o,s)=>this.setCellMeta(e,t,o,s))),this.render()},disabled:!1},{key:`${l}:center`,checkable:!0,ariaLabel(){return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER)},ariaChecked(){return(0,s.hasSelectionAClass)(this,"htCenter")},name(){let e=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER);return(0,s.hasSelectionAClass)(this,"htCenter")&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),o="horizontal",n="htCenter";this.runHooks("beforeCellAlignment",t,e,o,n),(0,s.align)(e,o,n,((e,t)=>this.getCellMeta(e,t)),((e,t,o,s)=>this.setCellMeta(e,t,o,s))),this.render()},disabled:!1},{key:`${l}:right`,checkable:!0,ariaLabel(){return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT)},ariaChecked(){return(0,s.hasSelectionAClass)(this,"htRight")},name(){let e=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT);return(0,s.hasSelectionAClass)(this,"htRight")&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),o="horizontal",n="htRight";this.runHooks("beforeCellAlignment",t,e,o,n),(0,s.align)(e,o,n,((e,t)=>this.getCellMeta(e,t)),((e,t,o,s)=>this.setCellMeta(e,t,o,s))),this.render()},disabled:!1},{key:`${l}:justify`,checkable:!0,ariaLabel(){return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY)},ariaChecked(){return(0,s.hasSelectionAClass)(this,"htJustify")},name(){let e=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY);return(0,s.hasSelectionAClass)(this,"htJustify")&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),o="horizontal",n="htJustify";this.runHooks("beforeCellAlignment",t,e,o,n),(0,s.align)(e,o,n,((e,t)=>this.getCellMeta(e,t)),((e,t,o,s)=>this.setCellMeta(e,t,o,s))),this.render()},disabled:!1},{name:n.KEY},{key:`${l}:top`,checkable:!0,ariaLabel(){return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_TOP)},ariaChecked(){return(0,s.hasSelectionAClass)(this,"htTop")},name(){let e=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_TOP);return(0,s.hasSelectionAClass)(this,"htTop")&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),o="vertical",n="htTop";this.runHooks("beforeCellAlignment",t,e,o,n),(0,s.align)(e,o,n,((e,t)=>this.getCellMeta(e,t)),((e,t,o,s)=>this.setCellMeta(e,t,o,s))),this.render()},disabled:!1},{key:`${l}:middle`,checkable:!0,ariaLabel(){return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE)},ariaChecked(){return(0,s.hasSelectionAClass)(this,"htMiddle")},name(){let e=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE);return(0,s.hasSelectionAClass)(this,"htMiddle")&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),o="vertical",n="htMiddle";this.runHooks("beforeCellAlignment",t,e,o,n),(0,s.align)(e,o,n,((e,t)=>this.getCellMeta(e,t)),((e,t,o,s)=>this.setCellMeta(e,t,o,s))),this.render()},disabled:!1},{key:`${l}:bottom`,checkable:!0,ariaLabel(){return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM)},ariaChecked(){return(0,s.hasSelectionAClass)(this,"htBottom")},name(){let e=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM);return(0,s.hasSelectionAClass)(this,"htBottom")&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),o="vertical",n="htBottom";this.runHooks("beforeCellAlignment",t,e,o,n),(0,s.align)(e,o,n,((e,t)=>this.getCellMeta(e,t)),((e,t,o,s)=>this.setCellMeta(e,t,o,s))),this.render()},disabled:!1}]}}};var s=o(80485),n=o(3682),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884));function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const l=t.KEY="alignment"},83398:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:i,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_CLEAR_COLUMN)},callback(e,t){const o=t[0].start.col,s=t[0].end.col;this.countRows()&&this.populateFromArray(0,o,[[null]],Math.max(t[0].start.row,t[0].end.row),s,"ContextMenu.clearColumn")},disabled(){const e=this.getSelectedRangeLast();return!e||(!!(e.isSingleHeader()&&e.highlight.col<0)||!this.selection.isSelectedByColumnHeader())}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=i?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const i=t.KEY="clear_column"},88358:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:i,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_INSERT_LEFT)},callback(){const e=this.getSelectedRangeLast().getTopLeftCorner(),t=this.isRtl()?"insert_col_end":"insert_col_start";this.alter(t,e.col,1,"ContextMenu.columnLeft")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.col<0)return!0;if(this.selection.isSelectedByCorner()){return 0===this.countCols()}return this.selection.isSelectedByRowHeader()||this.countCols()>=this.getSettings().maxCols},hidden(){return!this.getSettings().allowInsertColumn}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=i?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const i=t.KEY="col_left"},53649:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:i,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_INSERT_RIGHT)},callback(){const e=this.getSelectedRangeLast().getTopRightCorner(),t=this.isRtl()?"insert_col_start":"insert_col_end";this.alter(t,e.col,1,"ContextMenu.columnRight")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();return!e||(!!(e.isSingleHeader()&&e.highlight.col<0)||!this.selection.isSelectedByCorner()&&(this.selection.isSelectedByRowHeader()||this.countCols()>=this.getSettings().maxCols))},hidden(){return!this.getSettings().allowInsertColumn}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=i?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const i=t.KEY="col_right"},58653:(e,t,o)=>{"use strict";t.__esModule=!0,t.addItem=function(e,t){-1===v.indexOf(e)&&(y[e]=t)},t.predefinedItems=function(){const e={};return(0,s.objectEach)(y,((t,o)=>{e[o]=t()})),e};var s=o(13911),n=C(o(17200));t.ALIGNMENT=n.KEY;var i=C(o(83398));t.CLEAR_COLUMN=i.KEY;var r=C(o(88358));t.COLUMN_LEFT=r.KEY;var l=C(o(53649));t.COLUMN_RIGHT=l.KEY;var a=C(o(49359));t.READ_ONLY=a.KEY;var h=C(o(25433));t.REDO=h.KEY;var c=C(o(5471));t.REMOVE_COLUMN=c.KEY;var u=C(o(63353));t.REMOVE_ROW=u.KEY;var d=C(o(93640));t.ROW_ABOVE=d.KEY;var g=C(o(42407));t.ROW_BELOW=g.KEY;var f=C(o(3682));t.SEPARATOR=f.KEY;var p=C(o(51628));t.NO_ITEMS=p.KEY;var m=C(o(64443));function w(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(w=function(e){return e?o:t})(e)}function C(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=w(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}t.UNDO=m.KEY;const v=t.ITEMS=[d.KEY,g.KEY,r.KEY,l.KEY,i.KEY,u.KEY,c.KEY,m.KEY,h.KEY,a.KEY,n.KEY,f.KEY,p.KEY],y={[f.KEY]:f.default,[p.KEY]:p.default,[d.KEY]:d.default,[g.KEY]:g.default,[r.KEY]:r.default,[l.KEY]:l.default,[i.KEY]:i.default,[u.KEY]:u.default,[c.KEY]:c.default,[m.KEY]:m.default,[h.KEY]:h.default,[a.KEY]:a.default,[n.KEY]:n.default}},51628:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:n,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_NO_ITEMS)},disabled:!0,isCommand:!1}};var s=o(50884);const n=t.KEY="no_items"},49359:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:l,checkable:!0,ariaChecked(){return(0,s.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>this.getCellMeta(e,t).readOnly))},ariaLabel(){return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_READ_ONLY)},name(){let e=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_READ_ONLY);return(0,s.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>this.getCellMeta(e,t).readOnly))&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.checkSelectionConsistency)(e,((e,t)=>this.getCellMeta(e,t).readOnly));(0,n.arrayEach)(e,(e=>{e.forAll(((e,o)=>{e>=0&&o>=0&&this.setCellMeta(e,o,"readOnly",!t)}))})),this.render()},disabled(){const e=this.getSelectedRangeLast();return!e||(!!e.isSingleHeader()||(!!this.selection.isSelectedByCorner()||(0===this.countRows()||0===this.countCols()||(!this.getSelectedRange()||0===this.getSelectedRange().length))))}}};var s=o(80485),n=o(9175),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884));function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const l=t.KEY="make_read_only"},25433:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:i,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_REDO)},callback(){this.redo()},hidden(){const e=this.getPlugin("undoRedo");return!e||!e.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isRedoAvailable()}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=i?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const i=t.KEY="redo"},5471:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:r,name(){const e=this.getSelected();let t=0;if(e)if(e.length>1)t=1;else{const[,o,,s]=e[0];o-s!=0&&(t=1)}return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_REMOVE_COLUMN,t)},callback(){this.alter("remove_col",(0,s.transformSelectionToColumnDistance)(this),null,"ContextMenu.removeColumn")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.col<0)return!0;const t=this.countCols();return this.selection.isSelectedByCorner()?0===t:this.selection.isSelectedByRowHeader()||0===t},hidden(){return!this.getSettings().allowRemoveColumn}}};var s=o(30580),n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}const r=t.KEY="remove_col"},63353:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:r,name(){const e=this.getSelected();let t=0;if(e)if(e.length>1)t=1;else{const[o,,s]=e[0];o-s!=0&&(t=1)}return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_REMOVE_ROW,t)},callback(){this.alter("remove_row",(0,s.transformSelectionToRowDistance)(this),1,"ContextMenu.removeRow")},disabled(){const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.row<0)return!0;const t=this.countRows();return this.selection.isSelectedByCorner()?0===t:this.selection.isSelectedByColumnHeader()||0===t},hidden(){return!this.getSettings().allowRemoveRow}}};var s=o(30580),n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}const r=t.KEY="remove_row"},93640:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:i,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_ROW_ABOVE)},callback(){const e=this.getSelectedRangeLast().getTopLeftCorner();this.alter("insert_row_above",e.row,1,"ContextMenu.rowAbove")},disabled(){const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.row<0)return!0;if(this.selection.isSelectedByCorner()){return 0===this.countRows()}return this.selection.isSelectedByColumnHeader()||this.countRows()>=this.getSettings().maxRows},hidden(){return!this.getSettings().allowInsertRow}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=i?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const i=t.KEY="row_above"},42407:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:i,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_ROW_BELOW)},callback(){const e=this.getSelectedRangeLast().getBottomRightCorner();this.alter("insert_row_below",e.row,1,"ContextMenu.rowBelow")},disabled(){const e=this.getSelectedRangeLast();return!e||(!!(e.isSingleHeader()&&e.highlight.row<0)||!this.selection.isSelectedByCorner()&&(this.selection.isSelectedByColumnHeader()||this.countRows()>=this.getSettings().maxRows))},hidden(){return!this.getSettings().allowInsertRow}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=i?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const i=t.KEY="row_below"},3682:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(){return{name:o}};const o=t.KEY="---------"},64443:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:i,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_UNDO)},callback(){this.undo()},hidden(){const e=this.getPlugin("undoRedo");return!e||!e.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isUndoAvailable()}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=i?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const i=t.KEY="undo"},80485:(e,t,o)=>{"use strict";t.__esModule=!0,t.align=function(e,t,o,r,l){(0,s.arrayEach)(e,(e=>{e.forAll(((e,s)=>{e>=0&&s>=0&&function(e,t,o,s,r,l){const a=r(e,t);let h=s;a.className&&(h="vertical"===o?n(a.className,s):i(a.className,s));l(e,t,"className",h)}(e,s,t,o,r,l)}))}))},t.checkSelectionConsistency=r,t.getAlignmentClasses=function(e,t){const o={};return(0,s.arrayEach)(e,(e=>{e.forAll(((e,s)=>{e>=0&&s>=0&&(o[e]||(o[e]=[]),o[e][s]=t(e,s))}))})),o},t.getAlignmentComparatorByClass=l,t.getDocumentOffsetByElement=function(e,t){const o={top:0,left:0};if(t!==e.ownerDocument){const{frameElement:e}=t.defaultView,{top:s,left:n}=e.getBoundingClientRect();o.top=s,o.left=n}return o},t.hasSelectionAClass=function(e,t){return r(e.getSelectedRange(),l(t).bind(e))},t.markLabelAsSelected=function(e){return`<span class="selected">${String.fromCharCode(10003)}</span>${e}`},t.prepareHorizontalAlignClass=i,t.prepareVerticalAlignClass=n;var s=o(9175);function n(e,t){if(-1!==e.indexOf(t))return e;return`${e.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ","")} ${t}`}function i(e,t){if(-1!==e.indexOf(t))return e;return`${e.replace("htLeft","").replace("htCenter","").replace("htRight","").replace("htJustify","").replace(" ","")} ${t}`}function r(e,t){let o=!1;return Array.isArray(e)&&(0,s.arrayEach)(e,(e=>(e.forAll(((e,s)=>{if(e>=0&&s>=0&&t(e,s))return o=!0,!1})),o))),o}function l(e){return function(t,o){const s=this.getCellMeta(t,o).className;return s&&-1!==s.indexOf(e)}}},3626:(e,t)=>{"use strict";t.__esModule=!0;t.default=class{constructor(){this.data={}}setData(e,t){this.data[e]=t}getData(e){return this.data[e]||void 0}}},81751:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy",name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_COPY)},callback(){e.copyCellsOnly()},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var s=o(50884)},35101:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy_column_headers_only",name(){const e=this.getSelectedRangeLast(),t=e?(0,n.clamp)(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY,t)},callback(){e.copyColumnHeadersOnly()},disabled(){if(!this.hasColHeaders())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var s=o(50884),n=o(87485)},98626:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy_with_column_group_headers",name(){const e=this.getSelectedRangeLast(),t=e?(0,n.clamp)(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS,t)},callback(){e.copyWithAllColumnHeaders()},disabled(){if(!this.hasColHeaders()||!this.getSettings().nestedHeaders)return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var s=o(50884),n=o(87485)},25015:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy_with_column_headers",name(){const e=this.getSelectedRangeLast(),t=e?(0,n.clamp)(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS,t)},callback(){e.copyWithColumnHeaders()},disabled(){if(!this.hasColHeaders())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var s=o(50884),n=o(87485)},13348:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"cut",name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_CUT)},callback(){e.cut()},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=i?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}},4996:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(61205),r=s(o(56937)),l=o(55518),a=o(9175),h=o(59777),c=o(9893),u=o(28890),d=s(o(81751)),g=s(o(35101)),f=s(o(98626)),p=s(o(25015)),m=s(o(13348)),w=s(o(64471)),C=o(28193),v=o(74737);function y(e,t,o){E(e,t),t.set(e,o)}function E(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function S(e,t){return e.get(b(e,t))}function R(e,t,o){return e.set(b(e,t),o),o}function b(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}o(42172),r.default.getSingleton().register("afterCopyLimit"),r.default.getSingleton().register("modifyCopyableRange"),r.default.getSingleton().register("beforeCut"),r.default.getSingleton().register("afterCut"),r.default.getSingleton().register("beforePaste"),r.default.getSingleton().register("afterPaste"),r.default.getSingleton().register("beforeCopy"),r.default.getSingleton().register("afterCopy");const _=t.PLUGIN_KEY="copyPaste",T=t.PLUGIN_PRIORITY=80,M=["fragmentSelection"],O=['<meta name="generator" content="Handsontable"/>','<style type="text/css">td{white-space:normal}br{mso-data-placement:same-cell}</style>'].join("");var I=new WeakMap,N=new WeakMap,A=new WeakMap,P=new WeakMap,x=new WeakMap,H=new WeakMap,D=new WeakMap,L=new WeakMap,k=new WeakSet;class V extends i.BasePlugin{constructor(){var e,t;super(...arguments),E(e=this,t=k),t.add(e),(0,n.default)(this,"columnsLimit",1/0),(0,n.default)(this,"rowsLimit",1/0),(0,n.default)(this,"pasteMode","overwrite"),(0,n.default)(this,"uiContainer",this.hot.rootDocument.body),y(this,I,!1),y(this,N,!1),y(this,A,!1),y(this,P,"cells-only"),y(this,x,!1),y(this,H,!1),y(this,D,new C.CopyableRangesFactory({countRows:()=>this.hot.countRows(),countColumns:()=>this.hot.countCols(),rowsLimit:()=>this.rowsLimit,columnsLimit:()=>this.columnsLimit,countColumnHeaders:()=>this.hot.view.getColumnHeadersCount()})),y(this,L,!1),(0,n.default)(this,"copyableRanges",[])}static get PLUGIN_KEY(){return _}static get SETTING_KEYS(){return[_,...M]}static get PLUGIN_PRIORITY(){return T}isEnabled(){return!!this.hot.getSettings()[_]}enablePlugin(){var e=this;if(this.enabled)return;const{[_]:t}=this.hot.getSettings();var o,s;"object"==typeof t&&(this.pasteMode=null!==(o=t.pasteMode)&&void 0!==o?o:this.pasteMode,this.rowsLimit=isNaN(t.rowsLimit)?this.rowsLimit:t.rowsLimit,this.columnsLimit=isNaN(t.columnsLimit)?this.columnsLimit:t.columnsLimit,R(I,this,!!t.copyColumnHeaders),R(N,this,!!t.copyColumnGroupHeaders),R(A,this,!!t.copyColumnHeadersOnly),this.uiContainer=null!==(s=t.uiContainer)&&void 0!==s?s:this.uiContainer);this.addHook("afterContextMenuDefaultOptions",(e=>b(k,this,j).call(this,e))),this.addHook("afterSelection",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(k,e,Y).call(e,...o)})),this.addHook("afterSelectionEnd",(()=>b(k,this,z).call(this))),this.eventManager.addEventListener(this.hot.rootDocument,"copy",(function(){return e.onCopy(...arguments)})),this.eventManager.addEventListener(this.hot.rootDocument,"cut",(function(){return e.onCut(...arguments)})),this.eventManager.addEventListener(this.hot.rootDocument,"paste",(function(){return e.onPaste(...arguments)})),(0,u.isSafari)()&&(this.eventManager.addEventListener(this.hot.rootDocument.body,"mouseenter",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(k,e,G).call(e,...o)})),this.eventManager.addEventListener(this.hot.rootDocument.body,"mouseleave",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(k,e,$).call(e,...o)})),this.addHook("afterSelection",(()=>b(k,this,K).call(this)))),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){super.disablePlugin()}copy(){R(P,this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:"cells-only"),R(x,this,!0),b(k,this,F).call(this,"copy")}copyCellsOnly(){this.copy("cells-only")}copyColumnHeadersOnly(){this.copy("column-headers-only")}copyWithAllColumnHeaders(){this.copy("with-column-group-headers")}copyWithColumnHeaders(){this.copy("with-column-headers")}cut(){R(H,this,!0),b(k,this,F).call(this,"cut")}getRangedCopyableData(e){return(0,l.stringify)(this.getRangedData(e))}getRangedData(e){const t=[],{rows:o,columns:s}=(0,C.normalizeRanges)(e);return(0,a.arrayEach)(o,(e=>{const o=[];(0,a.arrayEach)(s,(t=>{e<0?o.push(this.hot.getColHeader(t,e)):o.push(this.hot.getCopyableData(e,t))})),t.push(o)})),t}paste(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(!e&&!t)return;const o=new w.default;e&&o.clipboardData.setData("text/plain",e),t&&o.clipboardData.setData("text/html",t),this.onPaste(o)}setCopyableText(){const e=this.hot.getSelectedRangeLast();if(!e)return;if(e.isSingleHeader())return void(this.copyableRanges=[]);S(D,this).setSelectedRange(e);const t=new Map([["headers",null],["cells",null]]);"column-headers-only"===S(P,this)?t.set("headers",S(D,this).getMostBottomColumnHeadersRange()):("with-column-headers"===S(P,this)?t.set("headers",S(D,this).getMostBottomColumnHeadersRange()):"with-column-group-headers"===S(P,this)&&t.set("headers",S(D,this).getAllColumnHeadersRange()),t.set("cells",S(D,this).getCellsRange())),this.copyableRanges=Array.from(t.values()).filter((e=>null!==e)).map((e=>{let{startRow:t,startCol:o,endRow:s,endCol:n}=e;return{startRow:t,startCol:o,endRow:s,endCol:n}})),this.copyableRanges=this.hot.runHooks("modifyCopyableRange",this.copyableRanges);const o=t.get("cells");if(null!==o&&o.isRangeTrimmed){const{startRow:e,startCol:t,endRow:s,endCol:n}=o;this.hot.runHooks("afterCopyLimit",s-e+1,n-t+1,this.rowsLimit,this.columnsLimit)}}isEditorOpened(){var e;return null===(e=this.hot.getActiveEditor())||void 0===e?void 0:e.isOpened()}populateValues(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.hot.getSelectedRangeLast();if(!e.length)return;const o=e.length,s=e[0].length,n=[],{row:i,col:r}=t.getTopStartCorner(),{row:l,col:a}=t.getBottomEndCorner();let h=i,c=r,u=i,d=r;for(;n.length<o||h<=l;){const{skipRowOnPaste:t,visualRow:l}=this.hot.getCellMeta(h,r);if(h=l+1,!0===t)continue;u=l,c=r;const g=[],f=n.length%o;for(;g.length<s||c<=a;){const{skipColumnOnPaste:t,visualCol:o}=this.hot.getCellMeta(i,c);if(c=o+1,!0===t)continue;d=o;const n=g.length%s;g.push(e[f][n])}n.push(g)}return R(L,this,!0),this.hot.populateFromArray(i,r,n,void 0,void 0,"CopyPaste.paste",this.pasteMode),[i,r,u,d]}onCopy(e){var t;const o=this.hot.getFocusManager().getRefocusElement(),s=null===(t=e.target)||void 0===t?void 0:t.hasAttribute("data-hot-input");if(!this.hot.isListening()&&!S(x,this)||this.isEditorOpened()||e.target instanceof HTMLElement&&(s&&e.target!==o||!s&&e.target!==this.hot.rootDocument.body))return;e.preventDefault(),this.setCopyableText(),R(x,this,!1);const n=this.getRangedData(this.copyableRanges),i=b(k,this,W).call(this,this.copyableRanges);if(!!this.hot.runHooks("beforeCopy",n,this.copyableRanges,i)){const t=(0,l.stringify)(n);if(e&&e.clipboardData){const o=(0,v._dataToHTML)(n,this.hot.rootDocument);e.clipboardData.setData("text/plain",t),e.clipboardData.setData("text/html",[O,o].join(""))}else"undefined"==typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",t);this.hot.runHooks("afterCopy",n,this.copyableRanges,i)}R(P,this,"cells-only")}onCut(e){var t;const o=this.hot.getFocusManager().getRefocusElement(),s=null===(t=e.target)||void 0===t?void 0:t.hasAttribute("data-hot-input");if(!this.hot.isListening()&&!S(H,this)||this.isEditorOpened()||e.target instanceof HTMLElement&&(s&&e.target!==o||!s&&e.target!==this.hot.rootDocument.body))return;e.preventDefault(),this.setCopyableText(),R(H,this,!1);const n=this.getRangedData(this.copyableRanges);if(!!this.hot.runHooks("beforeCut",n,this.copyableRanges)){const t=(0,l.stringify)(n);if(e&&e.clipboardData){const o=(0,v._dataToHTML)(n,this.hot.rootDocument);e.clipboardData.setData("text/plain",t),e.clipboardData.setData("text/html",[O,o].join(""))}else"undefined"==typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",t);this.hot.emptySelectedCells("CopyPaste.cut"),this.hot.runHooks("afterCut",n,this.copyableRanges)}}onPaste(e){var t;const o=this.hot.getFocusManager().getRefocusElement(),s=null===(t=e.target)||void 0===t?void 0:t.hasAttribute("data-hot-input");if(!this.hot.isListening()||this.isEditorOpened()||!this.hot.getSelected()||e.target instanceof HTMLElement&&(s&&e.target!==o||!s&&e.target!==this.hot.rootDocument.body))return;let n;if(e.preventDefault(),e&&void 0!==e.clipboardData){const t=(0,h.sanitize)(e.clipboardData.getData("text/html"),{ADD_TAGS:["meta"],ADD_ATTR:["content"],FORCE_BODY:!0});if(t&&/(<table)|(<TABLE)/g.test(t)){n=(0,v.htmlToGridSettings)(t,this.hot.rootDocument).data}else n=e.clipboardData.getData("text/plain")}else"undefined"==typeof ClipboardEvent&&void 0!==this.hot.rootWindow.clipboardData&&(n=this.hot.rootWindow.clipboardData.getData("Text"));if("string"==typeof n&&(n=(0,l.parse)(n)),void 0===n||n&&0===n.length)return;if(!1===this.hot.runHooks("beforePaste",n,this.copyableRanges))return;const[i,r,a,c]=this.populateValues(n);this.hot.selectCell(i,r,Math.min(this.hot.countRows()-1,a),Math.min(this.hot.countCols()-1,c)),this.hot.runHooks("afterPaste",n,this.copyableRanges)}destroy(){super.destroy()}}function F(e){if((0,u.isSafari)()){const t=this.hot.getSelectedRangeLast();if(t){const{row:o,col:s}=t.highlight,n=this.hot.getCell(o,s,!0);n&&(0,c.runWithSelectedContendEditableElement)(n,(()=>{this.hot.rootDocument.execCommand(e)}))}}else this.hot.rootDocument.execCommand(e)}function W(e){const{rows:t}=(0,C.normalizeRanges)(e);let o=0;for(let e=0;e<t.length&&!(t[e]>=0);e++)o+=1;return{columnHeadersCount:o}}function B(){if(this.hot.isListening()){const e=this.hot.getSelectedRangeLast();if(e){const{row:t,col:o}=e.highlight,s=this.hot.getCell(t,o,!0);s&&(0,c.makeElementContentEditableAndSelectItsContent)(s)}}}function U(){if(this.hot.isListening()){const e=this.hot.getSelectedRangeLast();if(e){const{row:t,col:o}=e.highlight,s=this.hot.getCell(t,o,!0);null!=s&&s.hasAttribute("contenteditable")&&(0,c.removeContentEditableFromElementAndDeselect)(s)}}}function j(e){e.items.push({name:"---------"},(0,d.default)(this)),S(I,this)&&e.items.push((0,p.default)(this)),S(N,this)&&e.items.push((0,f.default)(this)),S(A,this)&&e.items.push((0,g.default)(this)),e.items.push((0,m.default)(this))}function Y(e,t,o,s,n){S(L,this)&&(n.value=!0),R(L,this,!1)}function z(){this.isEditorOpened()||this.hot.getSettings().fragmentSelection||this.setCopyableText()}function G(){b(k,this,U).call(this)}function $(){b(k,this,B).call(this)}function K(){b(k,this,U).call(this)}t.CopyPaste=V},28193:(e,t,o)=>{"use strict";t.__esModule=!0,t.normalizeRanges=function(e){const t=[],o=[];return(0,s.arrayEach)(e,(e=>{const s=Math.min(e.startRow,e.endRow),i=Math.max(e.startRow,e.endRow);(0,n.rangeEach)(s,i,(e=>{-1===t.indexOf(e)&&t.push(e)}));const r=Math.min(e.startCol,e.endCol),l=Math.max(e.startCol,e.endCol);(0,n.rangeEach)(r,l,(e=>{-1===o.indexOf(e)&&o.push(e)}))})),{rows:t,columns:o}},o(67834),o(15724);var s=o(9175),n=o(87485);function i(e,t,o){r(e,t),t.set(e,o)}function r(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function l(e,t){return e.get(h(e,t))}function a(e,t,o){return e.set(h(e,t),o),o}function h(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var c=new WeakMap,u=new WeakMap,d=new WeakMap,g=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakSet;function w(e,t){return Math.min(t,Math.max(e+l(f,this).call(this)-1,e))}function C(e,t){return Math.min(t,Math.max(e+l(g,this).call(this)-1,e))}t.CopyableRangesFactory=class{constructor(e){let{countRows:t,countColumns:o,rowsLimit:s,columnsLimit:n,countColumnHeaders:l}=e;var h,w;r(h=this,w=m),w.add(h),i(this,c,void 0),i(this,u,void 0),i(this,d,void 0),i(this,g,void 0),i(this,f,void 0),i(this,p,void 0),a(u,this,t),a(d,this,o),a(g,this,s),a(f,this,n),a(p,this,l)}setSelectedRange(e){a(c,this,e)}getCellsRange(){if(0===l(u,this).call(this)||0===l(d,this).call(this))return null;const{row:e,col:t}=l(c,this).getTopStartCorner(),{row:o,col:s}=l(c,this).getBottomEndCorner(),n=h(m,this,C).call(this,e,o),i=h(m,this,w).call(this,t,s);return{isRangeTrimmed:o!==n||s!==i,startRow:e,startCol:t,endRow:n,endCol:i}}getMostBottomColumnHeadersRange(){if(0===l(d,this).call(this)||0===l(p,this).call(this))return null;const{col:e}=l(c,this).getTopStartCorner(),{col:t}=l(c,this).getBottomEndCorner(),o=h(m,this,w).call(this,e,t);return{isRangeTrimmed:t!==o,startRow:-1,startCol:e,endRow:-1,endCol:o}}getAllColumnHeadersRange(){if(0===l(d,this).call(this)||0===l(p,this).call(this))return null;const{col:e}=l(c,this).getTopStartCorner(),{col:t}=l(c,this).getBottomEndCorner(),o=h(m,this,w).call(this,e,t);return{isRangeTrimmed:t!==o,startRow:-l(p,this).call(this),startCol:e,endRow:-1,endCol:o}}}},90112:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(4996);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.CopyPaste=s.CopyPaste},64471:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(3626));t.default=class{constructor(){this.clipboardData=new n.default}preventDefault(){}}},63807:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"borders:bottom",name(){let e=this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_BORDERS_BOTTOM);return(0,n.checkSelectionBorders)(this,"bottom")&&(e=(0,n.markSelected)(e)),e},callback(t,o){const s=(0,n.checkSelectionBorders)(this,"bottom");e.prepareBorder(o,"bottom",s)}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(82783);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}},9566:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(63807));t.bottom=n.default;var i=s(o(2857));t.left=i.default;var r=s(o(70024));t.noBorders=r.default;var l=s(o(2992));t.right=l.default;var a=s(o(37513));t.top=a.default},2857:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=e.hot.isRtl()?"end":"start";return{key:"borders:left",name(){let e=this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_BORDERS_LEFT);return(0,n.checkSelectionBorders)(this,t)&&(e=(0,n.markSelected)(e)),e},callback(o,s){const i=(0,n.checkSelectionBorders)(this,t);e.prepareBorder(s,t,i)}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(82783);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}},70024:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"borders:no_borders",name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_REMOVE_BORDERS)},callback(t,o){e.prepareBorder(o,"noBorders")},disabled(){return!(0,n.checkSelectionBorders)(this)}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(82783);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}},2992:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=e.hot.isRtl()?"start":"end";return{key:"borders:right",name(){let e=this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_BORDERS_RIGHT);return(0,n.checkSelectionBorders)(this,t)&&(e=(0,n.markSelected)(e)),e},callback(o,s){const i=(0,n.checkSelectionBorders)(this,t);e.prepareBorder(s,t,i)}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(82783);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}},37513:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"borders:top",name(){let e=this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_BORDERS_TOP);return(0,n.checkSelectionBorders)(this,"top")&&(e=(0,n.markSelected)(e)),e},callback(t,o){const s=(0,n.checkSelectionBorders)(this,"top");e.prepareBorder(o,"top",s)}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(82783);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}},53856:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(61205),r=o(13911),l=o(87485),a=o(9175),h=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=g(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),c=o(9566),u=o(82783),d=o(73497);function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(g=function(e){return e?o:t})(e)}function f(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function p(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}const m=t.PLUGIN_KEY="customBorders",w=t.PLUGIN_PRIORITY=90;var C=new WeakSet;class v extends i.BasePlugin{constructor(){super(...arguments),f(this,C),(0,n.default)(this,"savedBorders",[])}static get PLUGIN_KEY(){return m}static get PLUGIN_PRIORITY(){return w}isEnabled(){return!!this.hot.getSettings()[m]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",(e=>p(C,this,y).call(this,e))),this.addHook("init",(()=>p(C,this,E).call(this))),super.enablePlugin())}disablePlugin(){this.hideBorders(),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.changeBorderSettings(),super.updatePlugin()}setBorders(e,t){let o=["top","bottom","start","end"],s=null;t&&(this.checkSettingsCohesion([t]),o=Object.keys(t),s=(0,u.normalizeBorder)(t));const n=(0,d.detectSelectionType)(e),i=(0,d.normalizeSelectionFactory)(n,{createCellCoords:this.hot._createCellCoords.bind(this.hot),createCellRange:this.hot._createCellRange.bind(this.hot)});(0,a.arrayEach)(e,(e=>{i(e).forAll(((e,t)=>{(0,a.arrayEach)(o,(o=>{this.prepareBorderFromCustomAdded(e,t,s,(0,u.toInlinePropName)(o))}))}))})),this.hot.view.render()}getBorders(e){if(!Array.isArray(e))return this.savedBorders;const t=(0,d.detectSelectionType)(e),o=(0,d.normalizeSelectionFactory)(t,{createCellCoords:this.hot._createCellCoords.bind(this.hot),createCellRange:this.hot._createCellRange.bind(this.hot)}),s=[];return(0,a.arrayEach)(e,(e=>{o(e).forAll(((e,t)=>{(0,a.arrayEach)(this.savedBorders,(o=>{o.row===e&&o.col===t&&s.push((0,u.denormalizeBorder)(o))}))}))})),s}clearBorders(e){e?this.setBorders(e):((0,a.arrayEach)(this.savedBorders,(e=>{this.clearBordersFromSelectionSettings(e.id),this.clearNullCellRange(),this.hot.removeCellMeta(e.row,e.col,"borders")})),this.savedBorders.length=0)}insertBorderIntoSettings(e,t){this.checkSavedBorders(e)||this.savedBorders.push(e);const o=this.hot._createCellRange(this.hot._createCellCoords(e.row,e.col));this.checkCustomSelections(e,o,t)||this.hot.selection.highlight.addCustomSelection({border:e,visualCellRange:o})}prepareBorderFromCustomAdded(e,t,o,s){const n=this.hot.countRows(),i=this.hot.countCols();if(e>=n||t>=i)return;let r=(0,u.createEmptyBorders)(e,t);o&&(r=(0,u.extendDefaultBorder)(r,o),(0,a.arrayEach)(this.hot.selection.highlight.customSelections,(e=>{if(r.id===e.settings.id)return Object.assign(e.settings,o),r.id=e.settings.id,r.top=e.settings.top,r.bottom=e.settings.bottom,r.start=e.settings.start,r.end=e.settings.end,!1}))),this.hot.setCellMeta(e,t,"borders",(0,u.denormalizeBorder)(r)),this.insertBorderIntoSettings(r,s)}prepareBorderFromCustomAddedRange(e,t){const o=Math.min(e.to.row,this.hot.countRows()-1),s=Math.min(e.to.col,this.hot.countCols()-1);(0,l.rangeEach)(e.from.row,o,(o=>{(0,l.rangeEach)(e.from.col,s,(s=>{const n=(0,u.createEmptyBorders)(o,s);let i=0;o===e.from.row&&(0,r.hasOwnProperty)(t,"top")&&(i+=1,n.top=t.top),o===e.to.row&&(0,r.hasOwnProperty)(t,"bottom")&&(i+=1,n.bottom=t.bottom),s===e.from.col&&(0,r.hasOwnProperty)(t,"start")&&(i+=1,n.start=t.start),s===e.to.col&&(0,r.hasOwnProperty)(t,"end")&&(i+=1,n.end=t.end),i>0&&(this.hot.setCellMeta(o,s,"borders",(0,u.denormalizeBorder)(n)),this.insertBorderIntoSettings(n))}))}))}removeAllBorders(e,t){const o=(0,u.createId)(e,t);this.spliceBorder(o),this.clearBordersFromSelectionSettings(o),this.clearNullCellRange(),this.hot.removeCellMeta(e,t,"borders")}setBorder(e,t,o,s){let n=this.hot.getCellMeta(e,t).borders;if(n=n&&void 0!==n.border?(0,u.normalizeBorder)(n):(0,u.createEmptyBorders)(e,t),s){n[o]=(0,u.createSingleEmptyBorder)();if(4===this.countHide(n))this.removeAllBorders(e,t);else{this.checkCustomSelectionsFromContextMenu(n,o,s)||this.insertBorderIntoSettings(n),this.hot.setCellMeta(e,t,"borders",(0,u.denormalizeBorder)(n))}}else{n[o]=(0,u.createDefaultCustomBorder)();this.checkCustomSelectionsFromContextMenu(n,o,s)||this.insertBorderIntoSettings(n),this.hot.setCellMeta(e,t,"borders",(0,u.denormalizeBorder)(n))}}prepareBorder(e,t,o){(0,a.arrayEach)(e,(e=>{let{start:s,end:n}=e;if(s.row===n.row&&s.col===n.col)"noBorders"===t?this.removeAllBorders(s.row,s.col):this.setBorder(s.row,s.col,t,o);else switch(t){case"noBorders":(0,l.rangeEach)(s.col,n.col,(e=>{(0,l.rangeEach)(s.row,n.row,(t=>{this.removeAllBorders(t,e)}))}));break;case"top":(0,l.rangeEach)(s.col,n.col,(e=>{this.setBorder(s.row,e,t,o)}));break;case"bottom":(0,l.rangeEach)(s.col,n.col,(e=>{this.setBorder(n.row,e,t,o)}));break;case"start":(0,l.rangeEach)(s.row,n.row,(e=>{this.setBorder(e,s.col,t,o)}));break;case"end":(0,l.rangeEach)(s.row,n.row,(e=>{this.setBorder(e,n.col,t,o)}))}}))}createCustomBorders(e){(0,a.arrayEach)(e,(e=>{const t=(0,u.normalizeBorder)(e);e.range?this.prepareBorderFromCustomAddedRange(e.range,t):this.prepareBorderFromCustomAdded(e.row,e.col,t)}))}countHide(e){const{top:t,bottom:o,start:s,end:n}=e,i=[t,o,s,n];return(0,a.arrayReduce)(i,((e,t)=>{let o=e;return t&&t.hide&&(o+=1),o}),0)}clearBordersFromSelectionSettings(e){const t=(0,a.arrayMap)(this.hot.selection.highlight.customSelections,(e=>e.settings.id)).indexOf(e);t>-1&&this.hot.selection.highlight.customSelections[t].clear()}clearNullCellRange(){(0,a.arrayEach)(this.hot.selection.highlight.customSelections,((e,t)=>{if(null===e.cellRange)return this.hot.selection.highlight.customSelections[t].destroy(),this.hot.selection.highlight.customSelections.splice(t,1),!1}))}hideBorders(){(0,a.arrayEach)(this.savedBorders,(e=>{this.clearBordersFromSelectionSettings(e.id),this.clearNullCellRange()}))}spliceBorder(e){const t=(0,a.arrayMap)(this.savedBorders,(e=>e.id)).indexOf(e);t>-1&&this.savedBorders.splice(t,1)}checkSavedBorders(e){let t=!1;return 4===this.countHide(e)?(this.spliceBorder(e.id),t=!0):(0,a.arrayEach)(this.savedBorders,((o,s)=>{if(e.id===o.id)return this.savedBorders[s]=e,t=!0,!1})),t}checkCustomSelectionsFromContextMenu(e,t,o){let s=!1;return(0,a.arrayEach)(this.hot.selection.highlight.customSelections,(n=>{if(e.id===n.settings.id){const e=this.hot.view._wt.selectionManager.getBorderInstances(n);return(0,a.arrayEach)(e,(e=>{e.toggleHiddenClass(t,o)})),s=!0,!1}})),s}checkCustomSelections(e,t,o){const s=this.countHide(e);let n=!1;return 4===s?(this.removeAllBorders(e.row,e.col),n=!0):(0,a.arrayEach)(this.hot.selection.highlight.customSelections,(s=>{if(e.id===s.settings.id){if(s.visualCellRange=t,s.commit(),o){const t=this.hot.view._wt.selectionManager.getBorderInstances(s);(0,a.arrayEach)(t,(t=>{t.changeBorderStyle(o,e)}))}return n=!0,!1}})),n}changeBorderSettings(){const e=this.hot.getSettings()[m];if(Array.isArray(e)){const t=(0,r.deepClone)(e);this.checkSettingsCohesion(t),t.length||(this.savedBorders=t),this.createCustomBorders(t)}else void 0!==e&&this.createCustomBorders(this.savedBorders)}checkSettingsCohesion(e){const t=(0,u.hasLeftRightTypeOptions)(e),o=(0,u.hasStartEndTypeOptions)(e);if(t&&o)throw new Error('The "left"/"right" and "start"/"end" options should not be used together. Please use only the option "start"/"end".');if(this.hot.isRtl()&&t)throw new Error('The "left"/"right" properties are not supported for RTL. Please use option "start"/"end".')}destroy(){super.destroy()}}function y(e){this.hot.getSettings()[m]&&e.items.push({name:"---------"},{key:"borders",name(){return this.getTranslatedPhrase(h.CONTEXTMENU_ITEMS_BORDERS)},disabled(){const e=this.getSelectedRangeLast();return!e||(!!e.isSingleHeader()||this.selection.isSelectedByCorner())},submenu:{items:[(0,c.top)(this),(0,c.right)(this),(0,c.bottom)(this),(0,c.left)(this),(0,c.noBorders)(this)]}})}function E(){this.changeBorderSettings()}t.CustomBorders=v},27470:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(53856);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.CustomBorders=s.CustomBorders},82783:(e,t,o)=>{"use strict";t.__esModule=!0,t.checkSelectionBorders=function(e,t){let o=!1;return(0,i.arrayEach)(e.getSelectedRange(),(n=>{n.forAll(((n,i)=>{if(n<0||i<0)return;const r=e.getCellMeta(n,i).borders;if(r){if(!t)return o=!0,!1;if(!(0,s.hasOwnProperty)(r[t],"hide")||!1===r[t].hide)return o=!0,!1}}))})),o},t.createDefaultCustomBorder=l,t.createDefaultHtBorder=h,t.createEmptyBorders=function(e,t){return{id:r(e,t),border:{width:1,color:"#000",cornerVisible:!1},row:e,col:t,top:{hide:!0},bottom:{hide:!0},start:{hide:!0},end:{hide:!0}}},t.createId=r,t.createSingleEmptyBorder=a,t.denormalizeBorder=function(e){(0,n.isDefined)(e.start)&&(e.left=e.start);(0,n.isDefined)(e.end)&&(e.right=e.end);return e},t.extendDefaultBorder=function(e,t){(0,s.hasOwnProperty)(t,"border")&&t.border&&(e.border=t.border);(0,s.hasOwnProperty)(t,"top")&&(0,n.isDefined)(t.top)&&(t.top?((0,s.isObject)(t.top)||(t.top={width:1,color:"#000"}),e.top=t.top):(t.top={hide:!0},e.top=t.top));(0,s.hasOwnProperty)(t,"bottom")&&(0,n.isDefined)(t.bottom)&&(t.bottom?((0,s.isObject)(t.bottom)||(t.bottom={width:1,color:"#000"}),e.bottom=t.bottom):(t.bottom={hide:!0},e.bottom=t.bottom));(0,s.hasOwnProperty)(t,"start")&&(0,n.isDefined)(t.start)&&(t.start?((0,s.isObject)(t.start)||(t.start={width:1,color:"#000"}),e.start=t.start):(t.start={hide:!0},e.start=t.start));(0,s.hasOwnProperty)(t,"end")&&(0,n.isDefined)(t.end)&&(t.end?((0,s.isObject)(t.end)||(t.end={width:1,color:"#000"}),e.end=t.end):(t.end={hide:!0},e.end=t.end));return e},t.hasLeftRightTypeOptions=function(e){return e.some((e=>(0,n.isDefined)(e.left)||(0,n.isDefined)(e.right)))},t.hasStartEndTypeOptions=function(e){return e.some((e=>(0,n.isDefined)(e.start)||(0,n.isDefined)(e.end)))},t.markSelected=function(e){return`<span class="selected">${String.fromCharCode(10003)}</span>${e}`},t.normalizeBorder=function(e){var t,o;((0,n.isDefined)(e.start)||(0,n.isDefined)(e.left))&&(e.start=null!==(t=e.start)&&void 0!==t?t:e.left);((0,n.isDefined)(e.end)||(0,n.isDefined)(e.right))&&(e.end=null!==(o=e.end)&&void 0!==o?o:e.right);return delete e.left,delete e.right,e},t.toInlinePropName=function(e){var t;return null!==(t=c.get(e))&&void 0!==t?t:e};var s=o(13911),n=o(38893),i=o(9175);function r(e,t){return`border_row${e}col${t}`}function l(){return{width:1,color:"#000"}}function a(){return{hide:!0}}function h(){return{width:1,color:"#000",cornerVisible:!1}}const c=new Map([["left","start"],["right","end"]])},24218:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=s(o(85707)),i=o(61205),r=o(79729),l=o(9893);function a(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function h(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}const c=t.PLUGIN_KEY="dragToScroll",u=t.PLUGIN_PRIORITY=100;var d=new WeakSet;class g extends i.BasePlugin{constructor(){super(...arguments),a(this,d),(0,n.default)(this,"boundaries",null),(0,n.default)(this,"callback",null),(0,n.default)(this,"listening",!1)}static get PLUGIN_KEY(){return c}static get PLUGIN_PRIORITY(){return u}isEnabled(){return!!this.hot.getSettings()[c]}enablePlugin(){this.enabled||(this.addHook("afterOnCellMouseDown",(e=>h(d,this,f).call(this,e))),this.addHook("afterOnCellCornerMouseDown",(e=>h(d,this,f).call(this,e))),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.unregisterEvents(),super.disablePlugin()}setBoundaries(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{left:0,right:this.hot.rootWindow.innerWidth,top:0,bottom:this.hot.rootWindow.innerHeight};this.boundaries=e}setCallback(e){this.callback=e}check(e,t){let o=0,s=0;t<this.boundaries.top?s=t-this.boundaries.top:t>this.boundaries.bottom&&(s=t-this.boundaries.bottom),e<this.boundaries.left?o=e-this.boundaries.left:e>this.boundaries.right&&(o=e-this.boundaries.right),this.callback(o,s)}listen(){this.listening=!0}unlisten(){this.listening=!1}isListening(){return this.listening}registerEvents(){const{rootWindow:e}=this.hot;let t=e;for(;t;)this.eventManager.addEventListener(t.document,"contextmenu",(()=>this.unlisten())),this.eventManager.addEventListener(t.document,"mouseup",(()=>this.unlisten())),this.eventManager.addEventListener(t.document,"mousemove",(e=>this.onMouseMove(e))),t=(0,l.getParentWindow)(t)}unregisterEvents(){this.eventManager.clear()}onMouseMove(e){this.isListening()&&this.check(e.clientX,e.clientY)}destroy(){super.destroy()}}function f(e){if((0,r.isRightClick)(e))return;const t=this.hot.view._wt.wtOverlays.topOverlay.mainTableScrollableElement;this.setBoundaries(t!==this.hot.rootWindow?t.getBoundingClientRect():void 0),this.setCallback(((e,o)=>{var s,n;const i=null!==(s=t.scrollLeft)&&void 0!==s?s:t.scrollX,r=null!==(n=t.scrollTop)&&void 0!==n?n:t.scrollY;t.scroll(i+50*Math.sign(e),r+20*Math.sign(o))})),this.listen()}t.DragToScroll=g},66762:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(24218);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.DragToScroll=s.DragToScroll},75930:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=s(o(85707)),i=o(61205),r=o(9175),l=o(13911),a=o(21172),h=o(80485),c=o(9893),u=o(62076),d=o(95586),g=s(o(56937)),f=o(58653);o(98885);var p=o(92692);function m(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function w(e,t,o){return e.set(C(e,t),o),o}function C(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}g.default.getSingleton().register("afterDropdownMenuDefaultOptions"),g.default.getSingleton().register("beforeDropdownMenuShow"),g.default.getSingleton().register("afterDropdownMenuShow"),g.default.getSingleton().register("afterDropdownMenuHide"),g.default.getSingleton().register("afterDropdownMenuExecute");const v=t.PLUGIN_KEY="dropdownMenu",y=t.PLUGIN_PRIORITY=230,E="changeType",S=v;var R=new WeakMap,b=new WeakSet;class _ extends i.BasePlugin{static get PLUGIN_KEY(){return v}static get PLUGIN_PRIORITY(){return y}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[f.COLUMN_LEFT,f.COLUMN_RIGHT,f.SEPARATOR,f.REMOVE_COLUMN,f.SEPARATOR,f.CLEAR_COLUMN,f.SEPARATOR,f.READ_ONLY,f.SEPARATOR,f.ALIGNMENT]}constructor(e){var t,o;super(e),m(t=this,o=b),o.add(t),(0,n.default)(this,"commandExecutor",new a.CommandExecutor(this.hot)),(0,n.default)(this,"itemsFactory",null),(0,n.default)(this,"menu",null),function(e,t,o){m(e,t),t.set(e,o)}(this,R,!1),this.hot.addHook("afterGetColHeader",((e,t)=>C(b,this,O).call(this,e,t)))}isEnabled(){return this.hot.getSettings()[v]}enablePlugin(){var e=this;if(this.enabled)return;this.itemsFactory=new u.ItemsFactory(this.hot,_.DEFAULT_ITEMS),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return C(b,e,H).call(e,...o)})),this.addHook("beforeViewportScrollHorizontally",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return C(b,e,x).call(e,...o)}));const t=this.hot.getSettings()[v],o={items:this.itemsFactory.getItems(t)};this.registerEvents(),"function"==typeof t.callback&&this.commandExecutor.setCommonCallback(t.callback),this.registerShortcuts(),super.enablePlugin(),this.callOnPluginsReady((()=>{this.hot.runHooks("afterDropdownMenuDefaultOptions",o),this.itemsFactory.setPredefinedItems(o.items);const s=this.itemsFactory.getItems(t);this.menu&&this.menu.destroy(),this.menu=new d.Menu(this.hot,{className:"htDropdownMenu",keepInViewport:!0,container:t.uiContainer||this.hot.rootDocument.body}),this.hot.runHooks("beforeDropdownMenuSetItems",s),this.menu.setMenuItems(s),this.menu.addLocalHook("beforeOpen",(()=>C(b,this,I).call(this))),this.menu.addLocalHook("afterOpen",(()=>C(b,this,N).call(this))),this.menu.addLocalHook("afterSubmenuOpen",(e=>C(b,this,A).call(this,e))),this.menu.addLocalHook("afterClose",(()=>C(b,this,P).call(this))),this.menu.addLocalHook("executeCommand",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return e.executeCommand.call(e,...o)})),(0,r.arrayEach)(s,(e=>this.commandExecutor.registerCommand(e.key,e)))}))}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.close(),this.menu&&this.menu.destroy(),this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){const e=()=>{const{highlight:e}=this.hot.getSelectedRangeLast();if((e.isHeader()&&-1===e.row||e.isCell())&&e.col>=0){this.hot.selectColumns(e.col,e.col,-1);const{from:t}=this.hot.getSelectedRangeLast(),o=(0,h.getDocumentOffsetByElement)(this.menu.container,this.hot.rootDocument),s=this.hot.getCell(-1,t.col,!0).querySelector(`.${E}`),n=s.getBoundingClientRect();this.open({left:n.left+o.left,top:n.top+s.offsetHeight+o.top},{left:n.width,right:0,above:0,below:3}),this.menu.getNavigator().toFirstItem()}};this.hot.getShortcutManager().getContext("grid").addShortcuts([{keys:[["Shift","Alt","ArrowDown"],["Control/Meta","Enter"]],callback:e,runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&t.isHeader()&&!this.menu.isOpened()},captureCtrl:!0,group:S},{keys:[["Shift","Alt","ArrowDown"]],callback:e,runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&t.isCell()&&!this.menu.isOpened()},group:S}])}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(S)}registerEvents(){this.eventManager.addEventListener(this.hot.rootElement,"click",(e=>C(b,this,M).call(this,e)))}open(e){var t;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{above:0,below:0,left:0,right:0};null!==(t=this.menu)&&void 0!==t&&t.isOpened()||(this.menu.open(),(0,l.objectEach)(o,((e,t)=>{this.menu.setOffset(t,e)})),this.menu.setPosition(e))}close(){var e;null===(e=this.menu)||void 0===e||e.close()}executeCommand(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];this.commandExecutor.execute(e,...o)}setListening(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.menu.isOpened()&&(e?this.menu.hotMenu.listen():this.menu.hotMenu.unlisten())}destroy(){this.close(),this.menu&&this.menu.destroy(),super.destroy()}}function T(e){e.getKeyboardShortcutsCtrl().addCustomShortcuts([{keys:[["Control/Meta","A"]],callback:()=>!1}])}function M(e){if((0,c.hasClass)(e.target,E)){const t=(0,h.getDocumentOffsetByElement)(this.menu.container,this.hot.rootDocument),o=e.target.getBoundingClientRect();e.stopPropagation(),w(R,this,!1),this.open({left:o.left+t.left,top:o.top+e.target.offsetHeight+t.top},{left:o.width,right:0,above:0,below:3})}}function O(e,t){const o=t.parentNode;if(!o)return;const s=o.parentNode.childNodes,n=Array.prototype.indexOf.call(s,o);if(e<0||n!==s.length-1)return;const i=t.querySelector(`.${E}`);if(this.enabled&&i)return;if(!this.enabled)return void(i&&i.parentNode.removeChild(i));const r=this.hot.rootDocument.createElement("button");r.className=E,r.type="button",r.tabIndex=-1,this.hot.getSettings().ariaTags&&((0,c.setAttribute)(r,[(0,p.A11Y_HIDDEN)(),(0,p.A11Y_LABEL)(" ")]),(0,c.setAttribute)(t,[(0,p.A11Y_HASPOPUP)("menu")])),r.onclick=function(){return!1},t.firstChild.insertBefore(r,t.firstChild.firstChild)}function I(){this.hot.runHooks("beforeDropdownMenuShow",this)}function N(){this.hot.runHooks("afterDropdownMenuShow",this),C(b,this,T).call(this,this.menu)}function A(e){C(b,this,T).call(this,e)}function P(){this.hot.listen(),this.hot.runHooks("afterDropdownMenuHide",this)}function x(e){return o=this,(t=R).get(C(t,o))?null:e;var t,o}function H(e){(0,c.hasClass)(e.target,E)&&w(R,this,!0)}t.DropdownMenu=_,_.SEPARATOR={name:f.SEPARATOR}},71110:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(75930);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.DropdownMenu=s.DropdownMenu},14467:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(15724);var n=s(o(85707)),i=o(87485);t.default=class{constructor(e){(0,n.default)(this,"hot",void 0),(0,n.default)(this,"options",{}),this.hot=e}setOptions(e){this.options=e}getData(){const{startRow:e,startCol:t,endRow:o,endCol:s}=this._getDataRange(),n=this.options,r=[];return(0,i.rangeEach)(e,o,(e=>{const o=[];!n.exportHiddenRows&&this._isHiddenRow(e)||((0,i.rangeEach)(t,s,(t=>{!n.exportHiddenColumns&&this._isHiddenColumn(t)||o.push(this.hot.getDataAtCell(e,t))})),r.push(o))})),r}getRowHeaders(){const e=[];if(this.options.rowHeaders){const{startRow:t,endRow:o}=this._getDataRange(),s=this.hot.getRowHeader();(0,i.rangeEach)(t,o,(t=>{!this.options.exportHiddenRows&&this._isHiddenRow(t)||e.push(s[t])}))}return e}getColumnHeaders(){const e=[];if(this.options.columnHeaders){const{startCol:t,endCol:o}=this._getDataRange(),s=this.hot.getColHeader();(0,i.rangeEach)(t,o,(t=>{!this.options.exportHiddenColumns&&this._isHiddenColumn(t)||e.push(s[t])}))}return e}_getDataRange(){const e=this.hot.countCols()-1,t=this.hot.countRows()-1;let[o=0,s=0,n=t,i=e]=this.options.range;return o=Math.max(o,0),s=Math.max(s,0),n=Math.min(n,t),i=Math.min(i,e),{startRow:o,startCol:s,endRow:n,endCol:i}}_isHiddenRow(e){return this.hot.rowIndexMapper.isHidden(this.hot.toPhysicalRow(e))}_isHiddenColumn(e){return this.hot.columnIndexMapper.isHidden(this.hot.toPhysicalColumn(e))}}},18270:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=o(61205),i=s(o(14467)),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=l(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(16166));function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(l=function(e){return e?o:t})(e)}const a=t.PLUGIN_KEY="exportFile",h=t.PLUGIN_PRIORITY=240;class c extends n.BasePlugin{static get PLUGIN_KEY(){return a}static get PLUGIN_PRIORITY(){return h}isEnabled(){return!0}exportAsString(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._createTypeFormatter(e,t).export()}exportAsBlob(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._createBlob(this._createTypeFormatter(e,t))}downloadFile(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{rootDocument:o,rootWindow:s}=this.hot,n=this._createTypeFormatter(e,t),i=this._createBlob(n),r=s.URL||s.webkitURL,l=o.createElement("a"),a=`${n.options.filename}.${n.options.fileExtension}`;if(void 0!==l.download){const e=r.createObjectURL(i);l.style.display="none",l.setAttribute("href",e),l.setAttribute("download",a),o.body.appendChild(l),l.dispatchEvent(new MouseEvent("click")),o.body.removeChild(l),setTimeout((()=>{r.revokeObjectURL(e)}),100)}else navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob(i,a)}_createTypeFormatter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!r.EXPORT_TYPES[e])throw new Error(`Export format type "${e}" is not supported.`);return(0,r.default)(e,new i.default(this.hot),t)}_createBlob(e){let t=null;return"undefined"!=typeof Blob&&(t=new Blob([e.export()],{type:`${e.options.mimeType};charset=${e.options.encoding}`})),t}}t.ExportFile=c},35472:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(18270);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ExportFile=s.ExportFile},16166:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.default=function(e,t,o){if("function"==typeof r[e])return new r[e](t,o);return null};var n=s(o(37402));const i=t.TYPE_CSV="csv",r=(t.TYPE_EXCEL="excel",t.TYPE_PDF="pdf",t.EXPORT_TYPES={[i]:n.default})},5606:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707)),i=o(13911),r=o(59777);class l{static get DEFAULT_OPTIONS(){return{mimeType:"text/plain",fileExtension:"txt",filename:"Handsontable [YYYY]-[MM]-[DD]",encoding:"utf-8",bom:!1,columnHeaders:!1,rowHeaders:!1,exportHiddenColumns:!1,exportHiddenRows:!1,range:[]}}constructor(e,t){(0,n.default)(this,"dataProvider",void 0),(0,n.default)(this,"options",void 0),this.dataProvider=e,this.options=this._mergeOptions(t),this.dataProvider.setOptions(this.options)}_mergeOptions(e){let t=(0,i.clone)(this.constructor.DEFAULT_OPTIONS);const o=new Date;return t=(0,i.extend)((0,i.clone)(l.DEFAULT_OPTIONS),t),t=(0,i.extend)(t,e),t.filename=(0,r.substitute)(t.filename,{YYYY:o.getFullYear(),MM:`${o.getMonth()+1}`.padStart(2,"0"),DD:`${o.getDate()}`.padStart(2,"0")}),t}}t.default=l},37402:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=o(9175),i=o(38893),r=s(o(5606));const l=String.fromCharCode(13),a=String.fromCharCode(34),h=String.fromCharCode(10);class c extends r.default{static get DEFAULT_OPTIONS(){return{mimeType:"text/csv",fileExtension:"csv",bom:!0,columnDelimiter:",",rowDelimiter:"\r\n"}}export(){const e=this.options,t=this.dataProvider.getData();let o=this.dataProvider.getColumnHeaders();const s=o.length>0,i=this.dataProvider.getRowHeaders(),r=i.length>0;let l=e.bom?String.fromCharCode(65279):"";return s&&(o=(0,n.arrayMap)(o,(e=>this._escapeCell(e,!0))),r&&(l+=e.columnDelimiter),l+=o.join(e.columnDelimiter),l+=e.rowDelimiter),(0,n.arrayEach)(t,((t,o)=>{o>0&&(l+=e.rowDelimiter),r&&(l+=this._escapeCell(i[o])+e.columnDelimiter),l+=t.map((e=>this._escapeCell(e))).join(e.columnDelimiter)})),l}_escapeCell(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=(0,i.stringify)(e);return""!==o&&(t||o.indexOf(l)>=0||o.indexOf(a)>=0||o.indexOf(h)>=0||o.indexOf(this.options.columnDelimiter)>=0)&&(o=o.replace(new RegExp('"',"g"),'""'),o=`"${o}"`),o}}t.default=c},49771:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=s(o(85707)),i=o(9175),r=o(13911),l=s(o(63870)),a=o(93969);class h{constructor(e,t){let{id:o,stateless:s=!0}=t;(0,n.default)(this,"hot",void 0),(0,n.default)(this,"id",void 0),(0,n.default)(this,"elements",[]),(0,n.default)(this,"hidden",!1),(0,n.default)(this,"stateId",""),(0,n.default)(this,"state",void 0),this.hot=e,this.id=o,this.stateId=`Filters.component.${this.id}`,this.state=s?null:this.hot.columnIndexMapper.registerMap(this.stateId,new a.LinkedPhysicalIndexToValueMap)}getElements(){return this.elements}reset(){(0,i.arrayEach)(this.elements,(e=>e.reset()))}hide(){this.hidden=!0}show(){this.hidden=!1}isHidden(){return null===this.hot||this.hidden}restoreState(e){this.state&&this.setState(this.state.getValueAtIndex(e))}setState(){throw new Error("The state setting logic is not implemented")}saveState(e){this.state&&this.state.setValueAtIndex(e,this.getState())}getState(){throw new Error("The state gathering logic is not implemented")}destroy(){this.hot.columnIndexMapper.unregisterMap(this.stateId),this.clearLocalHooks(),(0,i.arrayEach)(this.elements,(e=>e.destroy())),this.state=null,this.elements=null,this.hot=null}}t.BaseComponent=h,(0,r.mixin)(h,l.default)},92620:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n,i=s(o(85707)),r=o(9893),l=o(9175),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=u(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),h=o(49771),c=o(22818);function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(u=function(e){return e?o:t})(e)}function d(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}var g=new WeakSet;class f extends h.BaseComponent{static get BUTTON_OK(){return"ok"}static get BUTTON_CANCEL(){return"cancel"}constructor(e,t){super(e,{id:t.id,stateless:!0}),d(this,g),(0,i.default)(this,"name",""),this.name=t.name,this.elements.push(new c.InputUI(this.hot,{type:"button",value:a.FILTERS_BUTTONS_OK,className:"htUIButton htUIButtonOK",identifier:f.BUTTON_OK})),this.elements.push(new c.InputUI(this.hot,{type:"button",value:a.FILTERS_BUTTONS_CANCEL,className:"htUIButton htUIButtonCancel",identifier:f.BUTTON_CANCEL})),this.registerHooks()}registerHooks(){(0,l.arrayEach)(this.elements,(e=>{e.addLocalHook("click",((e,t)=>function(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}(g,this,p).call(this,e,t)))}))}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t)=>((0,r.addClass)(t.parentNode,"htFiltersMenuActionBar"),(0,l.arrayEach)(this.elements,(e=>t.appendChild(e.element))),t)}}accept(){this.runLocalHooks("accept")}cancel(){this.runLocalHooks("cancel")}}function p(e,t){t.options.identifier===n.BUTTON_OK?this.accept():this.cancel()}t.ActionBarComponent=f,n=f},93138:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(9893),r=o(79729),l=o(9175),a=o(71257),h=o(13911),c=w(o(50884)),u=o(49771),d=w(o(60226)),g=o(22818),f=o(92384),p=o(2048);function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(m=function(e){return e?o:t})(e)}function w(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=m(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}function C(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function v(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var y=new WeakSet;class E extends u.BaseComponent{constructor(e,t){super(e,{id:t.id,stateless:!1}),C(this,y),(0,n.default)(this,"name",""),(0,n.default)(this,"addSeparator",!1),this.name=t.name,this.addSeparator=t.addSeparator,this.elements.push(new f.SelectUI(this.hot,{menuContainer:t.menuContainer})),this.elements.push(new g.InputUI(this.hot,{placeholder:c.FILTERS_BUTTONS_PLACEHOLDER_VALUE})),this.elements.push(new g.InputUI(this.hot,{placeholder:c.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE})),this.registerHooks()}registerHooks(){this.getSelectElement().addLocalHook("select",(e=>v(y,this,S).call(this,e))).addLocalHook("afterClose",(()=>this.runLocalHooks("afterClose"))).addLocalHook("tabKeydown",(e=>this.runLocalHooks("selectTabKeydown",e))),(0,l.arrayEach)(this.getInputElements(),(e=>{e.addLocalHook("keydown",(e=>v(y,this,R).call(this,e)))}))}setState(e){if(this.reset(),!e)return;const t=(0,h.clone)(e.command);t.name.startsWith(c.FILTERS_CONDITIONS_NAMESPACE)&&(t.name=this.hot.getTranslatedPhrase(t.name)),this.getSelectElement().setValue(t),(0,l.arrayEach)(e.args,((e,o)=>{if(o>t.inputsCount-1)return!1;const s=this.getInputElement(o);s.setValue(e),s[t.inputsCount>o?"show":"hide"](),o||this.hot._registerTimeout((()=>s.focus()),10)}))}getState(){const e=this.getSelectElement().getValue()||(0,p.getConditionDescriptor)(d.CONDITION_NONE),t=[];return(0,l.arrayEach)(this.getInputElements(),((o,s)=>{e.inputsCount>s&&t.push(o.getValue())})),{command:e,args:t}}updateState(e,t){const o=e?(0,p.getConditionDescriptor)(e.name):(0,p.getConditionDescriptor)(d.CONDITION_NONE);this.state.setValueAtIndex(t,{command:o,args:e?e.args:[]}),e||(0,l.arrayEach)(this.getInputElements(),(e=>e.setValue(null)))}getSelectElement(){return this.elements.filter((e=>e instanceof f.SelectUI))[0]}getInputElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.getInputElements()[e]}getInputElements(){return this.elements.filter((e=>e instanceof g.InputUI))}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t,o,s,n,r)=>{(0,i.addClass)(t.parentNode,"htFiltersMenuCondition"),this.addSeparator&&(0,i.addClass)(t.parentNode,"border");const a=this.hot.rootDocument.createElement("div");return(0,i.addClass)(a,"htFiltersMenuLabel"),a.textContent=r,t.appendChild(a),t.parentElement.hasAttribute("ghost-table")||(0,l.arrayEach)(this.elements,(e=>t.appendChild(e.element))),t}}}reset(){const e=this.hot.getPlugin("filters").getSelectedColumn();let t=[(0,p.getConditionDescriptor)(d.CONDITION_NONE)];if(null!==e){const{visualIndex:o}=e;t=(0,d.default)(this.hot.getDataType(0,o,this.hot.countRows(),o))}(0,l.arrayEach)(this.getInputElements(),(e=>e.hide())),this.getSelectElement().setItems(t),super.reset(),this.getSelectElement().setValue(t[0])}}function S(e){(0,l.arrayEach)(this.getInputElements(),((t,o)=>{t[e.inputsCount>o?"show":"hide"](),0===o&&this.hot._registerTimeout((()=>t.focus()),10)})),this.runLocalHooks("change",e)}function R(e){(0,a.isKey)(e.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),(0,r.stopImmediatePropagation)(e))}t.ConditionComponent=E},91022:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(9893),r=o(9175),l=o(28927),a=o(49771),h=o(36057),c=o(64709),u=o(75469),d=o(21106),g=o(66733);function f(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}var p=new WeakSet;class m extends a.BaseComponent{constructor(e,t){super(e,{id:t.id,stateless:!1}),f(this,p),(0,n.default)(this,"name",""),this.name=t.name,this.buildOperatorsElement()}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t)=>((0,i.addClass)(t.parentNode,"htFiltersMenuOperators"),(0,r.arrayEach)(this.elements,(e=>t.appendChild(e.element))),t)}}buildOperatorsElement(){const e=[c.OPERATION_ID,u.OPERATION_ID];(0,r.arrayEach)(e,(t=>{const o=new g.RadioInputUI(this.hot,{name:"operator",label:{htmlFor:t,textContent:(0,h.getOperationName)(t)},value:t,checked:t===e[0],id:t});o.addLocalHook("change",(e=>function(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}(p,this,w).call(this,e))),this.elements.push(o)}))}setChecked(e){if(this.elements.length<e)throw Error(l.toSingleLine`Radio button with index ${e} doesn't exist.`);(0,r.arrayEach)(this.elements,((t,o)=>{t.setChecked(o===e)}))}getActiveOperationId(){const e=this.elements.find((e=>e instanceof g.RadioInputUI&&e.isChecked()));return e?e.getValue():c.OPERATION_ID}getState(){return this.getActiveOperationId()}setState(e){this.reset(),e&&this.getActiveOperationId()!==e&&(0,r.arrayEach)(this.elements,(t=>{t.setChecked(t.getValue()===e)}))}updateState(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c.OPERATION_ID,t=arguments.length>1?arguments[1]:void 0,o=e;o===d.OPERATION_ID&&(o=u.OPERATION_ID),this.state.setValueAtIndex(t,o)}reset(){this.setChecked(0)}}function w(e){this.setState(e.target.value)}t.OperatorsComponent=m},64166:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(9893),r=o(79729),l=o(9175),a=o(71257),h=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=m(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),c=o(23674),u=o(49771),d=o(44068),g=o(60226),f=o(2048),p=o(89760);function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(m=function(e){return e?o:t})(e)}function w(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function C(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var v=new WeakSet;class y extends u.BaseComponent{constructor(e,t){super(e,{id:t.id,stateless:!1}),w(this,v),(0,n.default)(this,"name",""),this.name=t.name,this.elements.push(new d.MultipleSelectUI(this.hot)),this.registerHooks()}registerHooks(){this.getMultipleSelectElement().addLocalHook("keydown",(e=>C(v,this,E).call(this,e))).addLocalHook("listTabKeydown",(e=>this.runLocalHooks("listTabKeydown",e))),this.hot.addHook("modifyFiltersMultiSelectValue",((e,t)=>C(v,this,R).call(this,e,t)))}getElements(){const e=this.getMultipleSelectElement();return[e.getSearchInputElement(),e.getSelectAllElement(),e.getClearAllElement(),this.getMultipleSelectElement()]}setState(e){if(this.reset(),e&&e.command.key===g.CONDITION_BY_VALUE){const t=this.getMultipleSelectElement();t.setItems(e.itemsSnapshot),t.setValue(e.args[0]),t.setLocale(e.locale)}}getState(){const e=this.getMultipleSelectElement(),t=e.getItems();return{command:{key:e.isSelectedAllValues()||!t.length?g.CONDITION_NONE:g.CONDITION_BY_VALUE},args:[e.getValue()],itemsSnapshot:t}}updateState(e){const t=(t,o,s,n,i)=>{const[r]=(0,l.arrayFilter)(o,(e=>e.name===g.CONDITION_BY_VALUE)),a={},u=this.hot.getTranslatedPhrase(h.FILTERS_VALUES_BLANK_CELLS);if(r){const o=n(t,i),h=(0,l.arrayMap)(o,(e=>e.value)),d=new Map(o.map((e=>[e.value,this.hot.getCellMeta(e.meta.visualRow,e.meta.visualCol)]))),p=(0,c.unifyColumnValues)(h);s&&(r.args[0]=s);const m=[],w=(0,c.intersectValues)(p,r.args[0],u,(e=>{e.checked&&m.push(e.value),C(v,this,S).call(this,e,d)})),y=e.editedConditionStack.column;a.locale=this.hot.getCellMeta(0,y).locale,a.args=[m],a.command=(0,f.getConditionDescriptor)(g.CONDITION_BY_VALUE),a.itemsSnapshot=w}else a.args=[],a.command=(0,f.getConditionDescriptor)(g.CONDITION_NONE);this.state.setValueAtIndex(t,a)};t(e.editedConditionStack.column,e.editedConditionStack.conditions,e.conditionArgsChange,e.filteredRowsFactory),e.dependentConditionStacks.length&&t(e.dependentConditionStacks[0].column,e.dependentConditionStacks[0].conditions,e.conditionArgsChange,e.filteredRowsFactory,e.editedConditionStack)}getMultipleSelectElement(){return this.elements.filter((e=>e instanceof d.MultipleSelectUI))[0]}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t,o,s,n,r)=>{(0,i.addClass)(t.parentNode,"htFiltersMenuValue");const a=this.hot.rootDocument.createElement("div");return(0,i.addClass)(a,"htFiltersMenuLabel"),a.textContent=r,t.appendChild(a),t.parentElement.hasAttribute("ghost-table")||(0,l.arrayEach)(this.elements,(e=>t.appendChild(e.element))),t}}}reset(){const e=this.hot.getTranslatedPhrase(h.FILTERS_VALUES_BLANK_CELLS),t=this._getColumnVisibleValues(),o=t.map((e=>e.value)),s=new Map(t.map((e=>[e.value,e.meta]))),n=(0,c.unifyColumnValues)(o),i=(0,c.intersectValues)(n,n,e,(e=>{C(v,this,S).call(this,e,s)}));this.getMultipleSelectElement().setItems(i),super.reset(),this.getMultipleSelectElement().setValue(n);const r=this.hot.getPlugin("filters").getSelectedColumn();null!==r&&this.getMultipleSelectElement().setLocale(this.hot.getCellMeta(0,r.visualIndex).locale)}_getColumnVisibleValues(){const e=this.hot.getPlugin("filters").getSelectedColumn();return null===e?[]:(0,l.arrayMap)(this.hot.getDataAtCol(e.visualIndex),((t,o)=>({value:(0,c.toEmptyString)(t),meta:this.hot.getCellMeta(o,e.visualIndex)})))}}function E(e){(0,a.isKey)(e.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),(0,r.stopImmediatePropagation)(e))}function S(e,t){this.hot.hasHook("modifyFiltersMultiSelectValue")&&(e.visualValue=this.hot.runHooks("modifyFiltersMultiSelectValue",e.visualValue,t.get(e.value)))}function R(e,t){return"numeric"===t.type?(0,p.getRenderedValue)(e,t):e}t.ValueComponent=y},88323:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=a;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(38893),i=o(2048);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const l=t.CONDITION_NAME="begins_with";function a(e,t){let[o]=t;return(0,n.stringify)(e.value).toLocaleLowerCase(e.meta.locale).startsWith((0,n.stringify)(o))}(0,i.registerCondition)(l,a,{name:s.FILTERS_CONDITIONS_BEGINS_WITH,inputsCount:1,showOperators:!0})},54789:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=h;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=l(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(2048),i=o(39712),r=o(5667);function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(l=function(e){return e?o:t})(e)}const a=t.CONDITION_NAME="between";function h(e,t){let[o,s]=t,l=o,a=s;if("numeric"===e.meta.type){const e=parseFloat(l,10),t=parseFloat(a,10);l=Math.min(e,t),a=Math.max(e,t)}else if("date"===e.meta.type){const t=(0,n.getCondition)(r.CONDITION_NAME,[a]),o=(0,n.getCondition)(i.CONDITION_NAME,[l]);return t(e)&&o(e)}return e.value>=l&&e.value<=a}(0,n.registerCondition)(a,h,{name:s.FILTERS_CONDITIONS_BETWEEN,inputsCount:2,showOperators:!0})},63039:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=r;var s=o(2048),n=o(23674);const i=t.CONDITION_NAME="by_value";function r(e,t){let[o]=t;return o(e.value)}(0,s.registerCondition)(i,r,{name:"By value",inputsCount:0,inputValuesDecorator(e){let[t]=e;return[(0,n.createArrayAssertion)(t)]},showOperators:!1})},32204:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=a;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(38893),i=o(2048);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const l=t.CONDITION_NAME="contains";function a(e,t){let[o]=t;return(0,n.stringify)(e.value).toLocaleLowerCase(e.meta.locale).indexOf((0,n.stringify)(o))>=0}(0,i.registerCondition)(l,a,{name:s.FILTERS_CONDITIONS_CONTAINS,inputsCount:1,showOperators:!0})},39712:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.condition=h;var n=s(o(86798)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=l(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),r=o(2048);function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(l=function(e){return e?o:t})(e)}const a=t.CONDITION_NAME="date_after";function h(e,t){let[o]=t;const s=(0,n.default)(e.value,e.meta.dateFormat),i=(0,n.default)(o,e.meta.dateFormat);return!(!s.isValid()||!i.isValid())&&s.diff(i)>=0}(0,r.registerCondition)(a,h,{name:i.FILTERS_CONDITIONS_AFTER,inputsCount:1,showOperators:!0})},5667:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.condition=h;var n=s(o(86798)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=l(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),r=o(2048);function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(l=function(e){return e?o:t})(e)}const a=t.CONDITION_NAME="date_before";function h(e,t){let[o]=t;const s=(0,n.default)(e.value,e.meta.dateFormat),i=(0,n.default)(o,e.meta.dateFormat);return!(!s.isValid()||!i.isValid())&&s.diff(i)<=0}(0,r.registerCondition)(a,h,{name:i.FILTERS_CONDITIONS_BEFORE,inputsCount:1,showOperators:!0})},75139:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.condition=h;var n=s(o(86798)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=l(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),r=o(2048);function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(l=function(e){return e?o:t})(e)}const a=t.CONDITION_NAME="date_today";function h(e){const t=(0,n.default)(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame((0,n.default)().startOf("day"),"d")}(0,r.registerCondition)(a,h,{name:i.FILTERS_CONDITIONS_TODAY,inputsCount:0})},62411:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.condition=h;var n=s(o(86798)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=l(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),r=o(2048);function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(l=function(e){return e?o:t})(e)}const a=t.CONDITION_NAME="date_tomorrow";function h(e){const t=(0,n.default)(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame((0,n.default)().subtract(-1,"days").startOf("day"),"d")}(0,r.registerCondition)(a,h,{name:i.FILTERS_CONDITIONS_TOMORROW,inputsCount:0})},64778:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.condition=h;var n=s(o(86798)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=l(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),r=o(2048);function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(l=function(e){return e?o:t})(e)}const a=t.CONDITION_NAME="date_yesterday";function h(e){const t=(0,n.default)(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame((0,n.default)().subtract(1,"days").startOf("day"),"d")}(0,r.registerCondition)(a,h,{name:i.FILTERS_CONDITIONS_YESTERDAY,inputsCount:0})},9780:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=a;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(2048),i=o(38893);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const l=t.CONDITION_NAME="empty";function a(e){return(0,i.isEmpty)(e.value)}(0,n.registerCondition)(l,a,{name:s.FILTERS_CONDITIONS_EMPTY,inputsCount:0,showOperators:!0})},9931:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=a;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(38893),i=o(2048);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const l=t.CONDITION_NAME="ends_with";function a(e,t){let[o]=t;return(0,n.stringify)(e.value).toLocaleLowerCase(e.meta.locale).endsWith((0,n.stringify)(o))}(0,i.registerCondition)(l,a,{name:s.FILTERS_CONDITIONS_ENDS_WITH,inputsCount:1,showOperators:!0})},77649:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=a;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(38893),i=o(2048);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const l=t.CONDITION_NAME="eq";function a(e,t){let[o]=t;return(0,n.stringify)(e.value).toLocaleLowerCase(e.meta.locale)===(0,n.stringify)(o)}(0,i.registerCondition)(l,a,{name:s.FILTERS_CONDITIONS_EQUAL,inputsCount:1,showOperators:!0})},24498:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=i;var s=o(2048);const n=t.CONDITION_NAME="false";function i(){return!1}(0,s.registerCondition)(n,i,{name:"False"})},34808:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=l;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(2048);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}const r=t.CONDITION_NAME="gt";function l(e,t){let[o]=t,s=o;return"numeric"===e.meta.type&&(s=parseFloat(s,10)),e.value>s}(0,n.registerCondition)(r,l,{name:s.FILTERS_CONDITIONS_GREATER_THAN,inputsCount:1,showOperators:!0})},25001:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=l;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(2048);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}const r=t.CONDITION_NAME="gte";function l(e,t){let[o]=t,s=o;return"numeric"===e.meta.type&&(s=parseFloat(s,10)),e.value>=s}(0,n.registerCondition)(r,l,{name:s.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL,inputsCount:1,showOperators:!0})},38979:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=l;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(2048);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}const r=t.CONDITION_NAME="lt";function l(e,t){let[o]=t,s=o;return"numeric"===e.meta.type&&(s=parseFloat(s,10)),e.value<s}(0,n.registerCondition)(r,l,{name:s.FILTERS_CONDITIONS_LESS_THAN,inputsCount:1,showOperators:!0})},80744:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=l;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(2048);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}const r=t.CONDITION_NAME="lte";function l(e,t){let[o]=t,s=o;return"numeric"===e.meta.type&&(s=parseFloat(s,10)),e.value<=s}(0,n.registerCondition)(r,l,{name:s.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL,inputsCount:1,showOperators:!0})},64263:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=l;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(2048);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}const r=t.CONDITION_NAME="none";function l(){return!0}(0,n.registerCondition)(r,l,{name:s.FILTERS_CONDITIONS_NONE,inputsCount:0,showOperators:!1})},14722:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=a;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(2048),i=o(54789);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const l=t.CONDITION_NAME="not_between";function a(e,t){return!(0,n.getCondition)(i.CONDITION_NAME,t)(e)}(0,n.registerCondition)(l,a,{name:s.FILTERS_CONDITIONS_NOT_BETWEEN,inputsCount:2,showOperators:!0})},51838:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=a;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(2048),i=o(32204);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const l=t.CONDITION_NAME="not_contains";function a(e,t){return!(0,n.getCondition)(i.CONDITION_NAME,t)(e)}(0,n.registerCondition)(l,a,{name:s.FILTERS_CONDITIONS_NOT_CONTAIN,inputsCount:1,showOperators:!0})},31539:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=a;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(2048),i=o(9780);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const l=t.CONDITION_NAME="not_empty";function a(e,t){return!(0,n.getCondition)(i.CONDITION_NAME,t)(e)}(0,n.registerCondition)(l,a,{name:s.FILTERS_CONDITIONS_NOT_EMPTY,inputsCount:0,showOperators:!0})},72998:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=a;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(2048),i=o(77649);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const l=t.CONDITION_NAME="neq";function a(e,t){return!(0,n.getCondition)(i.CONDITION_NAME,t)(e)}(0,n.registerCondition)(l,a,{name:s.FILTERS_CONDITIONS_NOT_EQUAL,inputsCount:1,showOperators:!0})},51105:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=i;var s=o(2048);const n=t.CONDITION_NAME="true";function i(){return!0}(0,s.registerCondition)(n,i,{name:"True"})},3158:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(9175),r=o(13911),l=o(28927),a=s(o(63870)),h=o(2048),c=o(64709),u=o(36057),d=o(38893),g=o(93969);const f="ConditionCollection.filteringStates";class p{constructor(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];(0,n.default)(this,"hot",void 0),(0,n.default)(this,"isMapRegistrable",void 0),(0,n.default)(this,"filteringStates",new g.LinkedPhysicalIndexToValueMap),(0,n.default)(this,"previousConditionStack",null),this.hot=e,this.isMapRegistrable=t,!0===this.isMapRegistrable?this.hot.columnIndexMapper.registerMap(f,this.filteringStates):this.filteringStates.init(this.hot.columnIndexMapper.getNumberOfIndexes())}isEmpty(){return 0===this.getFilteredColumns().length}isMatch(e,t){var o;const s=this.filteringStates.getValueAtIndex(t),n=null!==(o=null==s?void 0:s.conditions)&&void 0!==o?o:[],i=null==s?void 0:s.operation;return this.isMatchInConditions(n,e,i)}isMatchInConditions(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c.OPERATION_ID;return!e.length||(0,u.getOperationFunc)(o)(e,t)}addCondition(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c.OPERATION_ID,s=arguments.length>3?arguments[3]:void 0;const n=this.hot.getCellMeta(0,e).locale,r=(0,i.arrayMap)(t.args,(e=>"string"==typeof e?e.toLocaleLowerCase(n):e)),a=t.name||t.command.key;null===this.previousConditionStack&&this.setPreviousConditionStack(this.exportAllConditions()),this.runLocalHooks("beforeAdd",e);const g=this.getOperation(e);if(g){if(g!==o)throw Error(l.toSingleLine`The column of index ${e} has been already applied with a \`${g}\`\x20
67
+ numeric format. Cannot do the calculation.`);return n}}function m(){this.endpoints.initEndpoints()}function w(e){void 0!==e.columns&&this.endpoints.refreshCellMetas()}function C(e,t){e&&"ColumnSummary.reset"!==t&&"ColumnSummary.set"!==t&&"loadData"!==t&&this.endpoints.refreshChangedEndpoints(e)}function v(e,t){this.endpoints.resetSetupBeforeStructureAlteration("move_row",e[0],e.length,e,this.pluginName),this.endpoints.resetSetupAfterStructureAlteration("move_row",t,e.length,e,this.pluginName)}t.ColumnSummary=p},74316:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(9175),r=o(83119);t.default=class{constructor(e,t){(0,n.default)(this,"plugin",void 0),(0,n.default)(this,"hot",void 0),(0,n.default)(this,"endpoints",[]),(0,n.default)(this,"settings",void 0),(0,n.default)(this,"settingsType","array"),(0,n.default)(this,"currentEndpoint",null),(0,n.default)(this,"cellsToSetCache",[]),this.plugin=e,this.hot=this.plugin.hot,this.settings=t}initEndpoints(){this.endpoints=this.parseSettings(),this.refreshAllEndpoints()}getEndpoint(e){return"function"===this.settingsType?this.fillMissingEndpointData(this.settings)[e]:this.endpoints[e]}getAllEndpoints(){return"function"===this.settingsType?this.fillMissingEndpointData(this.settings):this.endpoints}fillMissingEndpointData(e){return this.parseSettings(e.call(this))}parseSettings(e){const t=[];let o=e;if(o||"function"!=typeof this.settings)return o||(o=this.settings),(0,i.arrayEach)(o,(e=>{const o={};this.assignSetting(e,o,"ranges",[[0,this.hot.countRows()-1]]),this.assignSetting(e,o,"reversedRowCoords",!1),this.assignSetting(e,o,"destinationRow",new Error("\n You must provide a destination row for the Column Summary plugin in order to work properly!\n ")),this.assignSetting(e,o,"destinationColumn",new Error("\n You must provide a destination column for the Column Summary plugin in order to work properly!\n ")),this.assignSetting(e,o,"sourceColumn",e.destinationColumn),this.assignSetting(e,o,"type","sum"),this.assignSetting(e,o,"forceNumeric",!1),this.assignSetting(e,o,"suppressDataTypeErrors",!0),this.assignSetting(e,o,"customFunction",null),this.assignSetting(e,o,"readOnly",!0),this.assignSetting(e,o,"roundFloat",!1),t.push(o)})),t;this.settingsType="function"}assignSetting(e,t,o,s){if("ranges"!==o||void 0!==e[o]){if("ranges"!==o||0!==e[o].length)if(void 0===e[o]){if(s instanceof Error)throw s;t[o]=s}else"destinationRow"===o&&t.reversedRowCoords?t[o]=this.hot.countRows()-e[o]-1:t[o]=e[o]}else t[o]=s}resetSetupBeforeStructureAlteration(e,t,o){if("function"!==this.settingsType)return;const s=e.indexOf("row")>-1?"row":"col",n=this.getAllEndpoints();(0,i.arrayEach)(n,(n=>{"row"===s&&n.destinationRow>=t&&("insert_row"===e?n.alterRowOffset=o:"remove_row"===e&&(n.alterRowOffset=-1*o)),"col"===s&&n.destinationColumn>=t&&("insert_col"===e?n.alterColumnOffset=o:"remove_col"===e&&(n.alterColumnOffset=-1*o))})),this.resetAllEndpoints(n,!1)}resetSetupAfterStructureAlteration(e,t,o,s,n){let r=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if("function"===this.settingsType){const e=()=>(this.hot.removeHook("beforeViewRender",e),this.refreshAllEndpoints());return void this.hot.addHookOnce("beforeViewRender",e)}const l=e.indexOf("row")>-1?"row":"col",a=e.indexOf("remove")>-1?-1:1,h=this.getAllEndpoints(),c=0===e.indexOf("move_row"),u=t;(0,i.arrayEach)(h,(e=>{"row"===l&&e.destinationRow>=u&&(e.alterRowOffset=a*o),"col"===l&&e.destinationColumn>=u&&(e.alterColumnOffset=a*o)})),this.resetAllEndpoints(h,!c),c?(0,i.arrayEach)(h,(e=>{this.extendEndpointRanges(e,u,s[0],s.length),this.recreatePhysicalRanges(e),this.clearOffsetInformation(e)})):(0,i.arrayEach)(h,(e=>{this.shiftEndpointCoordinates(e,u)})),r&&this.refreshAllEndpoints()}clearOffsetInformation(e){e.alterRowOffset=void 0,e.alterColumnOffset=void 0}extendEndpointRanges(e,t,o,s){(0,i.arrayEach)(e.ranges,(e=>{e[1]&&(t>=e[0]&&t<=e[1]?o>e[1]?e[1]+=s:o<e[0]&&(e[0]-=s):o>=e[0]&&o<=e[1]&&(e[1]-=s,t<=e[0]&&(e[0]+=1,e[1]+=1)))}))}recreatePhysicalRanges(e){const t=e.ranges,o=[],s=[];(0,i.arrayEach)(t,(e=>{const t=[];if(e[1])for(let o=e[0];o<=e[1];o++)t.push(this.hot.toPhysicalRow(o));else t.push(this.hot.toPhysicalRow(e[0]));s.push(t)})),(0,i.arrayEach)(s,(e=>{let t=[];(0,i.arrayEach)(e,((s,n)=>{0===n?t.push(s):e[n]!==e[n-1]+1&&(t.push(e[n-1]),o.push(t),t=[],t.push(s)),n===e.length-1&&(t.push(s),o.push(t))}))})),e.ranges=o}shiftEndpointCoordinates(e,t){e.alterRowOffset&&0!==e.alterRowOffset?(e.destinationRow+=e.alterRowOffset||0,(0,i.arrayEach)(e.ranges,(o=>{(0,i.arrayEach)(o,((s,n)=>{s>=t&&(o[n]+=e.alterRowOffset||0)}))}))):e.alterColumnOffset&&0!==e.alterColumnOffset&&(e.destinationColumn+=e.alterColumnOffset||0,e.sourceColumn+=e.alterColumnOffset||0)}resetAllEndpoints(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getAllEndpoints(),t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.some((e=>{const t=e.alterRowOffset||0,o=e.alterColumnOffset||0;return e.destinationRow+t>=this.hot.countRows()||e.destinationColumn+o>=this.hot.countCols()}))||(this.cellsToSetCache=[],(0,i.arrayEach)(e,(e=>{this.resetEndpointValue(e,t)})),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[])}refreshAllEndpoints(){this.cellsToSetCache=[],(0,i.arrayEach)(this.getAllEndpoints(),(e=>{this.currentEndpoint=e,this.plugin.calculate(e),this.setEndpointValue(e,"init")})),this.currentEndpoint=null,this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}refreshChangedEndpoints(e){const t=[];this.cellsToSetCache=[],(0,i.arrayEach)(e,((e,o,s)=>{`${e[2]||""}`!=`${e[3]}`&&(0,i.arrayEach)(this.getAllEndpoints(),((e,n)=>{this.hot.propToCol(s[o][1])===e.sourceColumn&&-1===t.indexOf(n)&&t.push(n)}))})),(0,i.arrayEach)(t,(e=>{this.refreshEndpoint(this.getEndpoint(e))})),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}refreshCellMetas(){this.endpoints.forEach((e=>{const t=this.hot.toVisualRow(e.destinationRow);if(null!==t){const o=this.hot.getCellMeta(t,e.destinationColumn);o.readOnly=e.readOnly,o.className="columnSummaryResult"}}))}refreshEndpoint(e){this.currentEndpoint=e,this.plugin.calculate(e),this.setEndpointValue(e),this.currentEndpoint=null}resetEndpointValue(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const o=e.alterRowOffset||0,s=e.alterColumnOffset||0;this.cellsToSetCache.push([this.hot.toVisualRow(e.destinationRow+(t?o:0)),this.hot.toVisualColumn(e.destinationColumn+(t?s:0)),""])}setEndpointValue(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=this.hot.toVisualRow(e.destinationRow);if(e.destinationRow>=this.hot.countRows()||e.destinationColumn>=this.hot.countCols())return void this.throwOutOfBoundsWarning();const n=this.hot.toVisualRow(e.destinationRow);if(null!==n){const o=this.hot.getCellMeta(n,e.destinationColumn);"init"!==t&&o.readOnly===e.readOnly||(o.readOnly=e.readOnly,o.className="columnSummaryResult")}if((!0===e.roundFloat||Number.isInteger(e.roundFloat))&&!isNaN(e.result)){const t=e.roundFloat;let o=0;Number.isInteger(t)&&(o=Math.min(Math.max(0,t),100)),e.result=e.result.toFixed(o)}o?this.hot.setDataAtCell(s,e.destinationColumn,e.result,"ColumnSummary.set"):this.cellsToSetCache.push([s,e.destinationColumn,e.result]),e.alterRowOffset=void 0,e.alterColumnOffset=void 0}throwOutOfBoundsWarning(){(0,r.warn)("One of the Column Summary plugins' destination points you provided is beyond the table boundaries!")}}},93642:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(17588);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ColumnSummary=s.ColumnSummary},70235:(e,t)=>{"use strict";t.__esModule=!0,t.isNullishOrNaN=function(e){return null==e||isNaN(e)}},94962:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=o(9893),i=o(13911),r=s(o(63870)),l=o(94151);function a(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function h(e,t){return e.get(u(e,t))}function c(e,t,o){return e.set(u(e,t),o),o}function u(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var d=new WeakMap,g=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,w=new WeakMap,C=new WeakMap;class v{static get CLASS_EDITOR_CONTAINER(){return"htCommentsContainer"}static get CLASS_EDITOR(){return"htComments"}static get CLASS_INPUT(){return"htCommentTextArea"}static get CLASS_CELL(){return"htCommentCell"}constructor(e,t){var o=this;a(this,d,void 0),a(this,g,!1),a(this,f,null),a(this,p,void 0),a(this,m,void 0),a(this,w,!0),a(this,C,new l.EditorResizeObserver),c(d,this,e),c(g,this,t),c(p,this,this.createEditor()),c(m,this,h(p,this).style),h(C,this).setObservedElement(this.getInputElement()),h(C,this).addLocalHook("resize",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("resize",...t)})),this.hide()}setPosition(e,t){h(m,this).left=`${e}px`,h(m,this).top=`${t}px`}setSize(e,t){if(e&&t){const o=this.getInputElement();o.style.width=`${e}px`,o.style.height=`${t}px`}}getSize(){return{width:(0,n.outerWidth)(this.getInputElement()),height:(0,n.outerHeight)(this.getInputElement())}}observeSize(){h(C,this).observe()}resetSize(){const e=this.getInputElement();e.style.width="",e.style.height=""}setReadOnlyState(e){this.getInputElement().readOnly=e}show(){h(m,this).display="block",c(w,this,!1)}hide(){h(C,this).unobserve(),h(w,this)||(h(m,this).display="none"),c(w,this,!0)}isVisible(){return"block"===h(m,this).display}setValue(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")||"";this.getInputElement().value=e}getValue(){return this.getInputElement().value}isFocused(){return h(d,this).activeElement===this.getInputElement()}focus(){this.getInputElement().focus()}createEditor(){const e=h(d,this).createElement("div"),t=h(d,this).createElement("textarea");return e.style.display="none",c(f,this,h(d,this).createElement("div")),h(f,this).setAttribute("dir",h(g,this)?"rtl":"ltr"),(0,n.addClass)(h(f,this),v.CLASS_EDITOR_CONTAINER),h(d,this).body.appendChild(h(f,this)),(0,n.addClass)(e,v.CLASS_EDITOR),(0,n.addClass)(t,v.CLASS_INPUT),t.setAttribute("data-hot-input",!0),e.appendChild(t),h(f,this).appendChild(e),e}getInputElement(){return h(p,this).querySelector(`.${v.CLASS_INPUT}`)}destroy(){const e=h(f,this)?h(f,this).parentNode:null;h(p,this).parentNode.removeChild(h(p,this)),c(p,this,null),c(m,this,null),h(C,this).destroy(),e&&e.removeChild(h(f,this))}}(0,i.mixin)(v,r.default);t.default=v},24090:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(9893),r=o(79729),l=o(13911),a=o(61205),h=s(o(94962)),c=s(o(79324)),u=o(58653),d=s(o(80712)),g=s(o(82667)),f=s(o(85329));function p(e,t,o){m(e,t),t.set(e,o)}function m(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function w(e,t,o){return e.set(v(e,t),o),o}function C(e,t){return e.get(v(e,t))}function v(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}o(19501);const y=t.PLUGIN_KEY="comments",E=t.PLUGIN_PRIORITY=60,S=t.META_COMMENT="comment",R=t.META_COMMENT_VALUE="value",b=t.META_STYLE="style",_=t.META_READONLY="readOnly",T=y,M=`plugin:${y}`;var O=new WeakMap,I=new WeakMap,N=new WeakMap,A=new WeakMap,P=new WeakMap,x=new WeakMap,H=new WeakSet;class D extends a.BasePlugin{constructor(){var e,t;super(...arguments),m(e=this,t=H),t.add(e),(0,n.default)(this,"range",{}),p(this,O,null),p(this,I,null),p(this,N,!1),p(this,A,!1),p(this,P,null),p(this,x,"")}static get PLUGIN_KEY(){return y}static get PLUGIN_PRIORITY(){return E}isEnabled(){return!!this.hot.getSettings()[y]}enablePlugin(){var e=this;this.enabled||(C(O,this)||(w(O,this,new h.default(this.hot.rootDocument,this.hot.isRtl())),C(O,this).addLocalHook("resize",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(H,e,U).call(e,...o)}))),C(I,this)||w(I,this,new c.default(this.getDisplayDelaySetting())),this.addHook("afterContextMenuDefaultOptions",(e=>this.addToContextMenu(e))),this.addHook("afterRenderer",((e,t,o,s,n,i)=>v(H,this,F).call(this,e,i))),this.addHook("afterScroll",(()=>v(H,this,Y).call(this))),this.addHook("afterBeginEditing",(()=>this.hide())),this.addHook("afterDocumentKeyDown",(e=>v(H,this,j).call(this,e))),C(I,this).addLocalHook("hide",(()=>this.hide())),C(I,this).addLocalHook("show",((e,t)=>this.showAtCell(e,t))),this.registerShortcuts(),this.registerListeners(),super.enablePlugin())}updatePlugin(){C(I,this).updateDelay(this.getDisplayDelaySetting()),super.updatePlugin()}disablePlugin(){this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("grid"),o=e.addContext(M);t.addShortcut({keys:[["Control","Alt","M"]],callback:()=>{const t=this.hot.getSelectedRangeLast();w(A,this,!0),this.hot.scrollToFocusedCell((()=>{this.setRange(t),this.show(),this.focusEditor(),e.setActiveContextName(M),this.hot._registerTimeout((()=>{w(A,this,!1)}))}))},stopPropagation:!0,runOnlyIf:()=>{var e;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isCell())&&!C(O,this).isVisible()},group:T}),o.addShortcut({keys:[["Escape"]],callback:()=>{C(O,this).setValue(C(x,this)),this.hide(),e.setActiveContextName("grid")},runOnlyIf:()=>C(O,this).isVisible()&&C(O,this).isFocused(),group:T}),o.addShortcut({keys:[["Control/Meta","Enter"]],callback:()=>{this.hide(),e.setActiveContextName("grid")},runOnlyIf:()=>C(O,this).isVisible()&&C(O,this).isFocused(),group:T})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(T)}registerListeners(){const{rootDocument:e}=this.hot,t=this.getEditorInputElement();this.eventManager.addEventListener(e,"mouseover",(e=>v(H,this,L).call(this,e))),this.eventManager.addEventListener(e,"mousedown",(e=>v(H,this,k).call(this,e))),this.eventManager.addEventListener(e,"mouseup",(()=>v(H,this,V).call(this))),this.eventManager.addEventListener(t,"focus",(()=>v(H,this,B).call(this))),this.eventManager.addEventListener(t,"blur",(()=>v(H,this,W).call(this)))}setRange(e){this.range=e}clearRange(){this.range={}}targetIsCellWithComment(e){const t=(0,i.closest)(e.target,"TD","TBODY");return!!(t&&(0,i.hasClass)(t,"htCommentCell")&&(0,i.closest)(t,[this.hot.rootElement]))}targetIsCommentTextArea(e){return this.getEditorInputElement()===e.target}setComment(e){if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const t=C(O,this).getValue();let o="";null!=e?o=e:null!=t&&(o=t);const s=this.range.from.row,n=this.range.from.col;this.updateCommentMeta(s,n,{[R]:o}),this.hot.render()}setCommentAtCell(e,t,o){this.setRange({from:this.hot._createCellCoords(e,t)}),this.setComment(o)}removeComment(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');this.hot.setCellMeta(this.range.from.row,this.range.from.col,S),e&&this.hot.render(),this.hide()}removeCommentAtCell(e,t){let o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.setRange({from:this.hot._createCellCoords(e,t)}),this.removeComment(o)}getComment(){const e=this.range.from.row,t=this.range.from.col;return this.getCommentMeta(e,t,R)}getCommentAtCell(e,t){return this.getCommentMeta(e,t,R)}show(){var e;if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const{from:{row:t,col:o}}=this.range;if(t<0||t>this.hot.countSourceRows()-1||o<0||o>this.hot.countSourceCols()-1)return!1;const s=this.hot.getCellMeta(this.range.from.row,this.range.from.col);return C(I,this).cancelHiding(),C(O,this).setValue(null!==(e=s[S]?s[S][R]:null)&&void 0!==e?e:""),C(O,this).show(),this.refreshEditor(!0),!0}showAtCell(e,t){return this.setRange({from:this.hot._createCellCoords(e,t)}),this.show()}hide(){C(O,this).hide()}refreshEditor(){var e,t;if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||this.range.from&&C(O,this).isVisible()))return;const{rowIndexMapper:o,columnIndexMapper:s}=this.hot,{row:n,col:r}=this.range.from;let l=o.getRenderableFromVisualIndex(n),a=s.getRenderableFromVisualIndex(r);const h=null===l;C(O,this).setPosition(0,0),null===l&&(l=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(n,-1))),null===a&&(a=s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(r,-1)));const c=null===l,u=null===a;l=null!==(e=l)&&void 0!==e?e:0,a=null!==(t=a)&&void 0!==t?t:0;const{rootWindow:d,view:{_wt:g}}=this.hot,{wtTable:f}=g,p=g.getCell({row:l,col:a},!0),m=this.getCommentMeta(n,r,b);m?C(O,this).setSize(m.width,m.height):C(O,this).resetSize();const w=u?0:f.getStretchedColumnWidth(a),v=h&&!c?(0,i.outerHeight)(p):0,{left:y,top:E,width:S,height:R}=p.getBoundingClientRect(),{width:T,height:M}=C(O,this).getSize(),{innerWidth:I,innerHeight:N}=this.hot.rootWindow,A=this.hot.rootDocument.documentElement;let P=y+d.scrollX+w,x=E+d.scrollY+v;this.hot.isRtl()&&(P-=T+w),this.hot.isLtr()&&y+S+T>I?P=y+d.scrollX-T-1:this.hot.isRtl()&&P<-(A.scrollWidth-A.clientWidth)&&(P=y+d.scrollX+w+1),E+M>N&&(x-=M-R+1),C(O,this).setPosition(P,x),C(O,this).setReadOnlyState(this.getCommentMeta(n,r,_)),C(O,this).observeSize()}focusEditor(){C(O,this).focus()}updateCommentMeta(e,t,o){const s=this.hot.getCellMeta(e,t)[S];let n;s?(n=(0,l.deepClone)(s),(0,l.deepExtend)(n,o)):n=o,this.hot.setCellMeta(e,t,S,n)}getCommentMeta(e,t,o){const s=this.hot.getCellMeta(e,t);if(s[S])return s[S][o]}addToContextMenu(e){e.items.push({name:u.SEPARATOR},(0,d.default)(this),(0,g.default)(this),(0,f.default)(this))}getDisplayDelaySetting(){const e=this.hot.getSettings()[y];if((0,l.isObject)(e))return e.displayDelay}getEditorInputElement(){return C(O,this).getInputElement()}destroy(){var e,t;null===(e=C(O,this))||void 0===e||e.destroy(),null===(t=C(I,this))||void 0===t||t.destroy(),super.destroy()}}function k(e){if(this.hot.view&&this.hot.view._wt&&!C(N,this)&&!this.targetIsCommentTextArea(e)){const t=(0,i.closest)(e.target,"TD","TBODY");let o=null;t&&(o=this.hot.getCoords(t)),(!t||this.range.from&&o&&(this.range.from.row!==o.row||this.range.from.col!==o.col))&&this.hide()}}function L(e){const{rootDocument:t}=this.hot;if(!(C(N,this)||C(O,this).isFocused()||(0,i.hasClass)(e.target,"wtBorder")||C(P,this)===e.target)&&C(O,this))if(w(P,this,t.elementFromPoint(e.clientX,e.clientY)),this.targetIsCellWithComment(e)){const t=this.hot._createCellRange(this.hot.getCoords(e.target));C(I,this).show(t)}else(0,i.isChildOf)(e.target,t)&&!this.targetIsCommentTextArea(e)&&C(I,this).hide()}function V(){w(N,this,!1)}function F(e,t){t[S]&&t[S][R]&&(0,i.addClass)(e,t.commentedCellClassName)}function W(){w(x,this,""),this.hot.getShortcutManager().setActiveContextName("grid"),this.setComment()}function B(){w(x,this,this.getComment()),this.hot.listen(),this.hot.getShortcutManager().setActiveContextName(M)}function U(e,t){this.updateCommentMeta(this.range.from.row,this.range.from.col,{[b]:{width:e,height:t}})}function j(e){C(O,this).isVisible()&&(0,r.stopImmediatePropagation)(e)}function Y(){C(A,this)||this.hide()}t.Comments=D},80712:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"commentsAddEdit",name(){var t;const o=null===(t=this.getSelectedRangeLast())||void 0===t?void 0:t.highlight;return null!=o&&o.isCell()&&e.getCommentAtCell(o.row,o.col)?this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_EDIT_COMMENT):this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_ADD_COMMENT)},callback(){const t=this.getSelectedRangeLast();e.setRange(t),e.show(),e.focusEditor()},disabled(){const e=this.getSelectedRangeLast();return!!(!e||e.highlight.isHeader()||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=i?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}},85329:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"commentsReadOnly",name(){const t=this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT);return(0,n.checkSelectionConsistency)(this.getSelectedRange(),((t,o)=>e.getCommentMeta(t,o,i.META_READONLY)))?(0,n.markLabelAsSelected)(t):t},callback(){this.getSelectedRangeLast().forAll(((t,o)=>{if(t>=0&&o>=0){const s=!!e.getCommentMeta(t,o,i.META_READONLY);e.updateCommentMeta(t,o,{[i.META_READONLY]:!s})}}))},disabled(){const t=this.getSelectedRangeLast();return!!(!t||t.highlight.isHeader()||!e.getCommentAtCell(t.highlight.row,t.highlight.col)||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(80485),i=o(24090);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}},82667:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"commentsRemove",name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_REMOVE_COMMENT)},callback(){this.getSelectedRangeLast().forAll(((t,o)=>{t>=0&&o>=0&&e.removeCommentAtCell(t,o,!1)})),this.render()},disabled(){const e=this.getSelectedRangeLast();return!!(!e||e.highlight.isHeader()||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=i?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}},79324:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707)),i=o(78832),r=o(13911),l=s(o(63870));class a{constructor(e){(0,n.default)(this,"wasLastActionShow",!0),(0,n.default)(this,"showDebounced",null),(0,n.default)(this,"hidingTimer",null),this.updateDelay(e)}hide(){this.wasLastActionShow=!1,this.hidingTimer=setTimeout((()=>{!1===this.wasLastActionShow&&this.runLocalHooks("hide")}),250)}show(e){this.wasLastActionShow=!0,this.showDebounced(e)}cancelHiding(){this.wasLastActionShow=!0,clearTimeout(this.hidingTimer),this.hidingTimer=null}updateDelay(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250;this.showDebounced=(0,i.debounce)((e=>{this.wasLastActionShow&&this.runLocalHooks("show",e.from.row,e.from.col)}),e)}destroy(){this.clearLocalHooks()}}(0,r.mixin)(a,l.default);t.default=a},94151:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=o(13911),i=s(o(63870));function r(e,t,o){l(e,t),t.set(e,o)}function l(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function a(e,t){return e.get(c(e,t))}function h(e,t,o){return e.set(c(e,t),o),o}function c(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var u=new WeakMap,d=new WeakMap,g=new WeakMap,f=new WeakSet;class p{constructor(){var e,t;l(e=this,t=f),t.add(e),r(this,u,!0),r(this,d,null),r(this,g,new ResizeObserver((e=>c(f,this,m).call(this,e))))}setObservedElement(e){h(d,this,e)}unobserve(){a(g,this).unobserve(a(d,this))}observe(){h(u,this,!0),a(g,this).observe(a(d,this))}destroy(){a(g,this).disconnect()}}function m(e){!a(u,this)&&Array.isArray(e)&&e.length?e.forEach((e=>{let{borderBoxSize:t}=e;const{inlineSize:o,blockSize:s}=t[0];this.runLocalHooks("resize",o,s)})):h(u,this,!1)}t.EditorResizeObserver=p,(0,n.mixin)(p,i.default)},41270:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(24090);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.Comments=s.Comments},21172:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724),o(54999);var n=s(o(85707)),i=o(9175),r=o(13911);t.CommandExecutor=class{constructor(e){(0,n.default)(this,"hot",void 0),(0,n.default)(this,"commands",{}),(0,n.default)(this,"commonCallback",null),this.hot=e}registerCommand(e,t){this.commands[e]=t}setCommonCallback(e){this.commonCallback=e}execute(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];const n=e.split(":"),l=n[0],a=2===n.length?n[1]:null;let h=this.commands[l];if(!h)throw new Error(`Menu command '${l}' not exists.`);if(a&&h.submenu&&(h=function(e,t){let o;return(0,i.arrayEach)(t,(t=>{const s=t.key?t.key.split(":"):null;if(Array.isArray(s)&&s[1]===e)return o=t,!1})),o}(a,h.submenu.items)),!0===h.disabled)return;if("function"==typeof h.disabled&&!0===h.disabled.call(this.hot))return;if((0,r.hasOwnProperty)(h,"submenu"))return;const c=[];"function"==typeof h.callback&&c.push(h.callback),"function"==typeof this.commonCallback&&c.push(this.commonCallback),o.unshift(n.join(":")),(0,i.arrayEach)(c,(e=>e.apply(this.hot,o)))}}},74516:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=s(o(85707)),i=o(61205),r=s(o(56937)),l=o(9175),a=o(13911),h=o(21172),c=o(62076),u=o(95586),d=o(80485),g=o(9893),f=o(58653);function p(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function m(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}o(21151);const w=t.PLUGIN_KEY="contextMenu",C=t.PLUGIN_PRIORITY=70,v=w;r.default.getSingleton().register("afterContextMenuDefaultOptions"),r.default.getSingleton().register("beforeContextMenuShow"),r.default.getSingleton().register("afterContextMenuShow"),r.default.getSingleton().register("afterContextMenuHide"),r.default.getSingleton().register("afterContextMenuExecute");var y=new WeakSet;class E extends i.BasePlugin{constructor(){super(...arguments),p(this,y),(0,n.default)(this,"commandExecutor",new h.CommandExecutor(this.hot)),(0,n.default)(this,"itemsFactory",null),(0,n.default)(this,"menu",null)}static get PLUGIN_KEY(){return w}static get PLUGIN_PRIORITY(){return C}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[f.ROW_ABOVE,f.ROW_BELOW,f.SEPARATOR,f.COLUMN_LEFT,f.COLUMN_RIGHT,f.SEPARATOR,f.REMOVE_ROW,f.REMOVE_COLUMN,f.SEPARATOR,f.UNDO,f.REDO,f.SEPARATOR,f.READ_ONLY,f.SEPARATOR,f.ALIGNMENT]}isEnabled(){return!!this.hot.getSettings()[w]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[w];"function"==typeof t.callback&&this.commandExecutor.setCommonCallback(t.callback),this.menu=new u.Menu(this.hot,{className:"htContextMenu",keepInViewport:!0,container:t.uiContainer||this.hot.rootDocument.body}),this.menu.addLocalHook("beforeOpen",(()=>m(y,this,R).call(this))),this.menu.addLocalHook("afterOpen",(()=>m(y,this,b).call(this))),this.menu.addLocalHook("afterClose",(()=>m(y,this,_).call(this))),this.menu.addLocalHook("executeCommand",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return e.executeCommand.call(e,...o)})),this.addHook("afterOnCellContextMenu",(e=>m(y,this,S).call(this,e))),this.registerShortcuts(),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.close(),this.menu&&(this.menu.destroy(),this.menu=null),this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Control/Meta","Shift","Backslash"],["Shift","F10"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();this.hot.scrollToFocusedCell();const t=this.hot.getCell(e.row,e.col,!0).getBoundingClientRect(),o=(0,d.getDocumentOffsetByElement)(this.menu.container,this.hot.rootDocument);this.open({left:t.left+o.left,top:t.top+o.top-1+t.height},{left:t.width,above:-t.height}),this.menu.getNavigator().toFirstItem()},runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&!this.menu.isOpened()},group:v})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(v)}open(e){var t;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{above:0,below:0,left:0,right:0};if(null!==(t=this.menu)&&void 0!==t&&t.isOpened())return;this.prepareMenuItems(),this.menu.open();this.menu.tableBorderWidth>0||(o.below+=1,o.right+=1,o.above-=1,o.left-=1),(0,a.objectEach)(o,((e,t)=>{this.menu.setOffset(t,e)})),this.menu.setPosition(e)}close(){var e;null===(e=this.menu)||void 0===e||e.close(),this.itemsFactory=null}executeCommand(e){null===this.itemsFactory&&this.prepareMenuItems();for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];this.commandExecutor.execute(e,...o)}prepareMenuItems(){this.itemsFactory=new c.ItemsFactory(this.hot,E.DEFAULT_ITEMS);const e=this.hot.getSettings()[w],t={items:this.itemsFactory.getItems(e)};this.hot.runHooks("afterContextMenuDefaultOptions",t),this.itemsFactory.setPredefinedItems(t.items);const o=this.itemsFactory.getItems(e);this.hot.runHooks("beforeContextMenuSetItems",o),this.menu.setMenuItems(o),(0,l.arrayEach)(o,(e=>this.commandExecutor.registerCommand(e.key,e)))}destroy(){this.close(),this.menu&&this.menu.destroy(),super.destroy()}}function S(e){const t=this.hot.getSettings(),o=t.rowHeaders,s=t.colHeaders;const n=e.target;if(this.close(),(0,g.hasClass)(n,"handsontableInput"))return;if(e.preventDefault(),e.stopPropagation(),!o&&!s&&!(function(e){return"TD"===e.nodeName||"TD"===e.parentNode.nodeName}(n)||(0,g.hasClass)(n,"current")&&(0,g.hasClass)(n,"wtBorder")))return;const i=(0,d.getDocumentOffsetByElement)(this.menu.container,this.hot.rootDocument);this.open({top:e.clientY+i.top,left:e.clientX+i.left})}function R(){this.hot.runHooks("beforeContextMenuShow",this)}function b(){this.hot.runHooks("afterContextMenuShow",this)}function _(){this.hot.listen(),this.hot.runHooks("afterContextMenuHide",this)}t.ContextMenu=E,E.SEPARATOR={name:f.SEPARATOR}},10668:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(74516);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ContextMenu=s.ContextMenu},62076:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(15724);var n=s(o(85707)),i=o(13911),r=o(9175),l=o(58653);t.ItemsFactory=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;(0,n.default)(this,"hot",void 0),(0,n.default)(this,"predefinedItems",(0,l.predefinedItems)()),(0,n.default)(this,"defaultOrderPattern",void 0),this.hot=e,this.defaultOrderPattern=t}setPredefinedItems(e){const t={};this.defaultOrderPattern.length=0,(0,i.objectEach)(e,((e,o)=>{let s="";e.name===l.SEPARATOR?(t[l.SEPARATOR]=e,s=l.SEPARATOR):isNaN(parseInt(o,10))?(e.key=void 0===e.key?o:e.key,t[o]=e,s=e.key):(t[e.key]=e,s=e.key),this.defaultOrderPattern.push(s)})),this.predefinedItems=t}getItems(){return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const s=[];let n=e;n&&n.items?n=n.items:Array.isArray(n)||(n=t);(0,i.isObject)(n)?(0,i.objectEach)(n,((e,t)=>{let n=o["string"==typeof e?e:t];n||(n=e),(0,i.isObject)(e)?(0,i.extend)(n,e):"string"==typeof n&&(n={name:n}),void 0===n.key&&(n.key=t),s.push(n)})):(0,r.arrayEach)(n,((e,t)=>{let n=o[e];!n&&l.ITEMS.indexOf(e)>=0||(n||(n={name:e,key:`${t}`}),(0,i.isObject)(e)&&(0,i.extend)(n,e),void 0===n.key&&(n.key=t),s.push(n))}));return s}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,this.defaultOrderPattern,this.predefinedItems)}}},87834:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707));t.Cursor=class{constructor(e,t){(0,n.default)(this,"top",void 0),(0,n.default)(this,"topRelative",void 0),(0,n.default)(this,"left",void 0),(0,n.default)(this,"leftRelative",void 0),(0,n.default)(this,"scrollTop",void 0),(0,n.default)(this,"scrollLeft",void 0),(0,n.default)(this,"cellHeight",void 0),(0,n.default)(this,"cellWidth",void 0);const o=t.scrollY,s=t.scrollX;let i,r,l,a,h,c;this.rootWindow=t,this.type=this.getSourceType(e),"literal"===this.type?(i=parseInt(e.top,10),l=parseInt(e.left,10),h=e.height||0,c=e.width||0,r=i,a=l,i+=o,l+=s):"event"===this.type&&(i=parseInt(e.pageY,10),l=parseInt(e.pageX,10),h=e.target.clientHeight,c=e.target.clientWidth,r=i-o,a=l-s),this.top=i,this.topRelative=r,this.left=l,this.leftRelative=a,this.scrollTop=o,this.scrollLeft=s,this.cellHeight=h,this.cellWidth=c}getSourceType(e){let t="literal";return e instanceof Event&&(t="event"),t}fitsAbove(e){return this.topRelative>=e.offsetHeight}fitsBelow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rootWindow.innerHeight;return this.topRelative+e.offsetHeight<=t}fitsOnRight(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rootWindow.innerWidth;return this.leftRelative+this.cellWidth+e.offsetWidth<=t}fitsOnLeft(e){return this.leftRelative>=e.offsetWidth}}},53748:(e,t)=>{"use strict";t.__esModule=!0,t.createDefaultShortcutsList=function(e){const{hot:t,hotMenu:o}=e;return[{keys:[["Control/Meta","A"]],forwardToContext:t.getShortcutManager().getContext("grid"),callback:()=>e.close(!0)},{keys:[["Tab"],["Shift","Tab"]],callback:(o,s)=>{const n=t.getSettings(),i="function"==typeof n.tabMoves?n.tabMoves(o):n.tabMoves;s.includes("shift")?t.selection.transformStart(-i.row,-i.col):t.selection.transformStart(i.row,i.col),e.close(!0)}},{keys:[["Escape"]],callback:()=>e.close()},{keys:[["ArrowDown"]],callback:()=>e.getNavigator().toNextItem()},{keys:[["ArrowUp"]],callback:()=>e.getNavigator().toPreviousItem()},{keys:[["ArrowRight"]],callback:()=>{const t=o.getSelectedLast();if(t){const o=e.openSubMenu(t[0]);o&&o.getNavigator().toFirstItem()}}},{keys:[["ArrowLeft"]],callback:()=>{o.getSelectedLast()&&e.isSubMenu()&&(e.close(),e.isSubMenu()&&e.parentMenu.hotMenu.listen())}},{keys:[["Control/Meta","ArrowUp"],["Home"]],callback:()=>e.getNavigator().toFirstItem()},{keys:[["Control/Meta","ArrowDown"],["End"]],callback:()=>e.getNavigator().toLastItem()},{keys:[["Enter"],["Space"]],callback:t=>{const s=o.getSelectedLast();s&&(o.getSourceDataAtRow(s[0]).submenu?e.openSubMenu(s[0]).getNavigator().toFirstItem():(e.executeCommand(t),e.close(!0)))}},{keys:[["PageUp"]],callback:()=>{o.getSelectedLast()?o.selection.transformStart(-o.countVisibleRows(),0):e.getNavigator().toFirstItem()}},{keys:[["PageDown"]],callback:()=>{o.getSelectedLast()?o.selection.transformStart(o.countVisibleRows(),0):e.getNavigator().toLastItem()}}]}},95586:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(71131);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||(t[e]=s[e]))}))},71131:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(68860),r=o(49523),l=o(85625),a=o(58653),h=o(79427),c=s(o(82629)),u=o(9175),d=o(28890),g=o(9893),f=o(79729),p=o(78832),m=o(38893),w=o(13911),C=s(o(63870)),v=o(20859),y=o(92692);function E(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function S(e,t,o){return e.set(b(e,t),o),o}function R(e,t){return e.get(b(e,t))}function b(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var _=new WeakMap,T=new WeakMap,M=new WeakMap;class O{get tableBorderWidth(){return void 0===R(M,this)&&this.hotMenu&&S(M,this,parseInt(this.hotMenu.rootWindow.getComputedStyle(this.hotMenu.view._wt.wtTable.TABLE).borderWidth,10)),R(M,this)}constructor(e,t){var o=this;(0,n.default)(this,"hot",void 0),(0,n.default)(this,"options",void 0),(0,n.default)(this,"eventManager",new c.default(this)),(0,n.default)(this,"container",void 0),(0,n.default)(this,"positioner",void 0),(0,n.default)(this,"hotMenu",null),(0,n.default)(this,"hotSubMenus",{}),(0,n.default)(this,"parentMenu",void 0),(0,n.default)(this,"menuItems",null),(0,n.default)(this,"origOutsideClickDeselects",null),E(this,_,void 0),E(this,T,void 0),E(this,M,void 0),this.hot=e,this.options=t||{parent:null,name:null,className:"",keepInViewport:!0,standalone:!1,minWidth:215,container:this.hot.rootDocument.documentElement},this.container=this.createContainer(this.options.name),this.positioner=new i.Positioner(this.options.keepInViewport),this.parentMenu=this.options.parent||null,this.registerEvents(),this.isSubMenu()&&this.addLocalHook("afterSelectionChange",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.parentMenu.runLocalHooks("afterSelectionChange",...t)}))}registerEvents(){let e=this.hot.rootWindow;for(;e;)this.eventManager.addEventListener(e.document,"mousedown",(e=>this.onDocumentMouseDown(e))),this.eventManager.addEventListener(e.document,"touchstart",(e=>this.onDocumentMouseDown(e))),this.eventManager.addEventListener(e.document,"contextmenu",(e=>this.onDocumentContextMenu(e))),e=(0,g.getParentWindow)(e)}setMenuItems(e){this.menuItems=e}getNavigator(){return R(_,this)}getKeyboardShortcutsCtrl(){return R(T,this)}getSelectedItem(){return this.hasSelectedItem()?this.hotMenu.getSourceDataAtRow(this.hotMenu.getSelectedLast()[0]):null}hasSelectedItem(){return Array.isArray(this.hotMenu.getSelectedLast())}isSubMenu(){return null!==this.parentMenu}open(){this.runLocalHooks("beforeOpen"),this.container.removeAttribute("style"),this.container.style.display="block";const e=(0,p.debounce)((e=>this.openSubMenu(e)),300),t=this.options.minWidth||215;let o=!1,s=(0,u.arrayFilter)(this.menuItems,(e=>(e.key===a.NO_ITEMS&&(o=!0),(0,h.isItemHidden)(e,this.hot))));if(s.length<1&&!o)s.push((0,a.predefinedItems)()[a.NO_ITEMS]);else if(0===s.length)return;s=(0,h.filterSeparators)(s,a.SEPARATOR);let n=!1;const i={data:s,colHeaders:!1,autoColumnSize:!0,autoWrapRow:!1,modifyColWidth:e=>(0,m.isDefined)(e)&&e<t?t:e,autoRowSize:!1,readOnly:!0,editor:!1,copyPaste:!1,hiddenRows:!0,maxCols:1,columns:[{data:"name",renderer:(0,v.createMenuItemRenderer)(this.hot)}],renderAllRows:!0,fragmentSelection:!1,outsideClickDeselects:!1,disableVisualSelection:"area",layoutDirection:this.hot.isRtl()?"rtl":"ltr",ariaTags:!1,beforeOnCellMouseOver:(e,t)=>{R(_,this).setCurrentPage(t.row)},afterOnCellMouseOver:(t,o)=>{this.isAllSubMenusClosed()?e(o.row):this.openSubMenu(o.row)},rowHeights:e=>s[e].name===a.SEPARATOR?1:void 0,afterOnCellContextMenu:e=>{e.preventDefault(),(0,d.isWindowsOS)()&&n&&this.hasSelectedItem()&&this.close(!0)},afterSelection:(e,t,o,s,n)=>{this.hotMenu.view.isMouseDown()&&(n.value=!0),this.runLocalHooks("afterSelectionChange",this.getSelectedItem())},beforeOnCellMouseUp:e=>{this.hasSelectedItem()&&(n=!this.isCommandPassive(this.getSelectedItem()),this.executeCommand(e))},afterOnCellMouseUp:e=>{(0,d.isWindowsOS)()&&(0,f.isRightClick)(e)||!n||!this.hasSelectedItem()||((0,d.isMobileBrowser)()||(0,d.isIpadOS)()?this.hot._registerTimeout((()=>this.close(!0)),325):this.close(!0))},afterUnlisten:()=>{!this.hasSelectedItem()&&this.isOpened()&&this.hotMenu.listen()}};this.origOutsideClickDeselects=this.hot.getSettings().outsideClickDeselects,this.hot.getSettings().outsideClickDeselects=!1,this.hotMenu=new this.hot.constructor(this.container,i),this.hotMenu.addHook("afterInit",(()=>this.onAfterInit())),this.hotMenu.init(),S(_,this,(0,r.createMenuNavigator)(this.hotMenu)),S(T,this,(0,l.createKeyboardShortcutsCtrl)(this)),R(T,this).listen(),this.focus(),this.isSubMenu()&&this.addLocalHook("afterOpen",(()=>this.parentMenu.runLocalHooks("afterSubmenuOpen",this))),this.runLocalHooks("afterOpen",this)}close(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isOpened())if(e&&this.isSubMenu())this.parentMenu.close();else if(R(_,this).clear(),this.closeAllSubMenus(),this.container.style.display="none",this.hotMenu.destroy(),this.hotMenu=null,this.hot.getSettings().outsideClickDeselects=this.origOutsideClickDeselects,this.runLocalHooks("afterClose"),this.isSubMenu()){if(this.hot.getSettings().ariaTags){const e=this.parentMenu.hotMenu.getSelectedLast();if(e){const t=this.parentMenu.hotMenu.getCell(e[0],0);(0,g.setAttribute)(t,[(0,y.A11Y_EXPANDED)(!1)])}}this.parentMenu.hotMenu.listen()}}openSubMenu(e){if(!this.hotMenu)return!1;const t=this.hotMenu.getCell(e,0);if(this.closeAllSubMenus(),!t||!(0,h.hasSubMenu)(t))return!1;const o=this.hotMenu.getSourceDataAtRow(e),s=new O(this.hot,{parent:this,name:o.name,className:this.options.className,keepInViewport:!0,container:this.options.container});return s.setMenuItems(o.submenu.items),s.open(),s.setPosition(t.getBoundingClientRect()),this.hotSubMenus[o.key]=s,this.hot.getSettings().ariaTags&&(0,g.setAttribute)(t,[(0,y.A11Y_EXPANDED)(!0)]),s}closeSubMenu(e){const t=this.hotMenu.getSourceDataAtRow(e),o=this.hotSubMenus[t.key];if(o){o.destroy(),delete this.hotSubMenus[t.key];const s=this.hotMenu.getCell(e,0);this.hot.getSettings().ariaTags&&(0,g.setAttribute)(s,[(0,y.A11Y_EXPANDED)(!1)])}}closeAllSubMenus(){(0,u.arrayEach)(this.hotMenu.getData(),((e,t)=>this.closeSubMenu(t)))}isAllSubMenusClosed(){return 0===Object.keys(this.hotSubMenus).length}focus(){this.isOpened()&&(this.hotMenu.rootElement.focus({preventScroll:!0}),this.getKeyboardShortcutsCtrl().listen(),this.hotMenu.listen())}destroy(){const e=this.container.parentNode;this.clearLocalHooks(),this.close(),this.parentMenu=null,this.eventManager.destroy(),e&&e.removeChild(this.container)}isOpened(){return null!==this.hotMenu}executeCommand(e){if(!this.isOpened()||!this.hasSelectedItem())return;const t=this.getSelectedItem();if(this.runLocalHooks("select",t,e),this.isCommandPassive(t))return;const o=this.hot.getSelectedRange(),s=o?(0,h.normalizeSelection)(o):[];this.runLocalHooks("executeCommand",t.key,s,e),this.isSubMenu()&&this.parentMenu.runLocalHooks("executeCommand",t.key,s,e)}isCommandPassive(e){return!1===e.isCommand||(0,h.isItemSeparator)(e)||(0,h.isItemDisabled)(e,this.hot)||(0,h.isItemSubMenu)(e)}setOffset(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.positioner.setOffset(e,t)}setPosition(e){this.isSubMenu()&&this.positioner.setParentElement(this.parentMenu.container),this.positioner.setElement(this.container).updatePosition(e)}updateMenuDimensions(){const{wtTable:e}=this.hotMenu.view._wt,t=this.hotMenu.getSettings().data,o=e.hider.style,s=e.holder.style,n=parseInt(o.width,10),i=(0,u.arrayReduce)(t,((e,t,o)=>{const s=this.hotMenu.getCell(o,0)?(0,g.outerHeight)(this.hotMenu.getCell(o,0)):0;return e+(t.name===a.SEPARATOR?1:s)}),0);s.width=`${n+3}px`,s.height=`${i+3}px`,o.height=s.height}createContainer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=this.options.container.ownerDocument;let o,s=e;return s&&((0,p.isFunction)(s)&&(s=s.call(this.hot),s=null===s||(0,m.isUndefined)(s)?"":s.toString()),s=s.replace(/[^A-z0-9]/g,"_"),s=`${this.options.className}Sub_${s}`,o=t.querySelector(`.${this.options.className}.${s}`)),o||(o=t.createElement("div"),(0,g.addClass)(o,`htMenu ${this.options.className}`),s&&(0,g.addClass)(o,s),this.options.container.appendChild(o)),o}onAfterInit(){this.updateMenuDimensions(),this.hot.getSettings().ariaTags&&(0,g.setAttribute)(this.hotMenu.rootElement,[(0,y.A11Y_MENU)(),(0,y.A11Y_TABINDEX)(-1)])}onDocumentMouseDown(e){this.isOpened()&&(this.options.standalone&&this.hotMenu&&!(0,g.isChildOf)(e.target,this.hotMenu.rootElement)?this.close(!0):!this.isAllSubMenusClosed()&&!this.isSubMenu()||(0,g.isChildOf)(e.target,".htMenu")||this.close(!0))}onDocumentContextMenu(e){this.isOpened()&&(0,g.hasClass)(e.target,"htCore")&&(0,g.isChildOf)(e.target,this.hotMenu.rootElement)&&e.preventDefault()}}t.Menu=O,(0,w.mixin)(O,C.default)},20859:(e,t,o)=>{"use strict";t.__esModule=!0,t.createMenuItemRenderer=function(e){return(t,o,r,l,a,h)=>{const c=t.getSourceDataAtRow(r),u=e.rootDocument.createElement("div"),d="function"==typeof h?h.call(e):h,g="function"==typeof c.ariaLabel?c.ariaLabel.call(e):c.ariaLabel,f="function"==typeof c.ariaChecked?c.ariaChecked.call(e):c.ariaChecked;if((0,n.empty)(o),(0,n.addClass)(u,"htItemWrapper"),e.getSettings().ariaTags){const t=!(0,s.isItemDisabled)(c,e)&&!(0,s.isItemSelectionDisabled)(c)&&!(0,s.isItemSeparator)(c);(0,n.setAttribute)(o,[...(0,s.isItemCheckable)(c)?[(0,i.A11Y_MENU_ITEM_CHECKBOX)(),(0,i.A11Y_LABEL)(g),(0,i.A11Y_CHECKED)(f)]:[(0,i.A11Y_MENU_ITEM)(),(0,i.A11Y_LABEL)(d)],...t?[(0,i.A11Y_TABINDEX)(-1)]:[],...(0,s.isItemDisabled)(c,e)?[(0,i.A11Y_DISABLED)()]:[],...(0,s.isItemSubMenu)(c)?[(0,i.A11Y_EXPANDED)(!1)]:[]])}o.className="",o.appendChild(u),(0,s.isItemSeparator)(c)?(0,n.addClass)(o,"htSeparator"):"function"==typeof c.renderer?((0,n.addClass)(o,"htCustomMenuRenderer"),o.appendChild(c.renderer(t,u,r,l,a,d))):(0,n.fastInnerHTML)(u,d),(0,s.isItemDisabled)(c,e)?(0,n.addClass)(o,"htDisabled"):(0,s.isItemSelectionDisabled)(c)?(0,n.addClass)(o,"htSelectionDisabled"):(0,s.isItemSubMenu)(c)&&(0,n.addClass)(o,"htSubmenu")}};var s=o(79427),n=o(9893),i=o(92692)},49523:(e,t,o)=>{"use strict";t.__esModule=!0,t.createMenuNavigator=function(e){return(0,s.createPaginator)({size:()=>e.countRows(),onItemSelect(t,o){const s=e.getCell(t,0);if(!s||(0,n.isSeparator)(s)||(0,n.isDisabled)(s)||(0,n.isSelectionDisabled)(s))return!1;e.selectCell(t,0,...o?[t,0,!1,!1]:[])},onClear(){e.deselectCell()}})};var s=o(57625),n=o(79427)},68860:(e,t,o)=>{"use strict";t.__esModule=!0,o(67834);var s=o(87834);function n(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function i(e,t){return e.get(l(e,t))}function r(e,t,o){return e.set(l(e,t),o),o}function l(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var a=new WeakMap,h=new WeakMap,c=new WeakMap,u=new WeakMap,d=new WeakMap;t.Positioner=class{constructor(e){n(this,a,void 0),n(this,h,void 0),n(this,c,void 0),n(this,u,!1),n(this,d,{above:0,below:0,left:0,right:0}),r(u,this,e)}setOffset(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return i(d,this)[e]=t,this}setElement(e){return r(a,this,e),this}setParentElement(e){return r(h,this,e),this}updatePosition(e){r(c,this,new s.Cursor(e,i(a,this).ownerDocument.defaultView)),i(u,this)?(i(c,this).fitsBelow(i(a,this))?this.setPositionBelowCursor():i(c,this).fitsAbove(i(a,this))?this.setPositionAboveCursor():this.setPositionBelowCursor(),this.updateHorizontalPosition()):(this.setPositionBelowCursor(),this.setPositionOnRightOfCursor())}updateHorizontalPosition(){"rtl"===i(a,this).dir?i(c,this).fitsOnLeft(i(a,this))?this.setPositionOnLeftOfCursor():this.setPositionOnRightOfCursor():i(c,this).fitsOnRight(i(a,this))?this.setPositionOnRightOfCursor():this.setPositionOnLeftOfCursor()}setPositionAboveCursor(){let e=i(d,this).above+i(c,this).top-i(a,this).offsetHeight;i(h,this)&&(e=i(c,this).top+i(c,this).cellHeight-i(a,this).offsetHeight+3),i(a,this).style.top=`${e}px`}setPositionBelowCursor(){let e=i(d,this).below+i(c,this).top+1;i(h,this)&&(e=i(c,this).top-1),i(a,this).style.top=`${e}px`}setPositionOnRightOfCursor(){let e=i(c,this).left;if(i(h,this)){const t=i(h,this).ownerDocument.defaultView,o=Number.parseInt(t.getComputedStyle(i(h,this).querySelector(".htCore")).borderRightWidth,10);e+=i(c,this).cellWidth+o}else e+=i(d,this).right;i(a,this).style.left=`${e}px`}setPositionOnLeftOfCursor(){let e=i(d,this).left+i(c,this).left-i(a,this).offsetWidth;if(i(h,this)){const t=i(h,this).ownerDocument.defaultView;e-=Number.parseInt(t.getComputedStyle(i(h,this).querySelector(".htCore")).borderLeftWidth,10)}i(a,this).style.left=`${e}px`}}},85625:(e,t,o)=>{"use strict";t.__esModule=!0,t.createKeyboardShortcutsCtrl=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const o=[];function r(e,t){h(t).addShortcuts(e,{group:n})}function l(e,t){const s=h(t);e.forEach((e=>{let{keys:t}=e;t.forEach((e=>s.removeShortcutsByKeys(e)))})),o.push({shortcuts:e,contextName:t}),r(e,t)}function a(e){return e?`${i}:${e}`:i}function h(t){var o;const s=e.hotMenu.getShortcutManager(),n=a(t);return null!==(o=s.getContext(n))&&void 0!==o?o:s.addContext(n)}return r((0,s.createDefaultShortcutsList)(e)),t.forEach((e=>{let{shortcuts:t,contextName:o}=e;l(t,o)})),{addCustomShortcuts:l,getCustomShortcuts:function(){return[...o]},getContext:h,listen:function(t){e.hotMenu.getShortcutManager().setActiveContextName(a(t))}}},o(15724);var s=o(53748);const n="menu",i=n},79427:(e,t,o)=>{"use strict";t.__esModule=!0,t.filterSeparators=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.SEPARATOR,o=e.slice(0);return o=l(o,t),o=function(e,t){let o=e.slice(0);return o.reverse(),o=l(o,t),o.reverse(),o}(o,t),o=function(e){const t=[];return(0,s.arrayEach)(e,((e,o)=>{o>0?t[t.length-1].name!==e.name&&t.push(e):t.push(e)})),t}(o),o},t.hasSubMenu=function(e){return(0,i.hasClass)(e,"htSubmenu")},t.isDisabled=function(e){return(0,i.hasClass)(e,"htDisabled")},t.isItemCheckable=function(e){return!0===e.checkable},t.isItemDisabled=function(e,t){return!0===e.disabled||"function"==typeof e.disabled&&!0===e.disabled.call(t)},t.isItemHidden=function(e,t){return!e.hidden||!("function"==typeof e.hidden&&e.hidden.call(t))},t.isItemSelectionDisabled=function(e){return(0,n.hasOwnProperty)(e,"disableSelection")},t.isItemSeparator=function(e){return new RegExp(r.SEPARATOR,"i").test(e.name)},t.isItemSubMenu=function(e){return(0,n.hasOwnProperty)(e,"submenu")},t.isSelectionDisabled=function(e){return(0,i.hasClass)(e,"htSelectionDisabled")},t.isSeparator=function(e){return(0,i.hasClass)(e,"htSeparator")},t.normalizeSelection=function(e){return(0,s.arrayMap)(e,(e=>({start:e.getTopStartCorner(),end:e.getBottomEndCorner()})))},o(15724);var s=o(9175),n=o(13911),i=o(9893),r=o(58653);function l(e,t){const o=e.slice(0);for(let e=0;e<o.length&&o[e].name===t;)o.shift();return o}},17200:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:l,name(){return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT)},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();return!e||(!!e.isSingleHeader()||!(this.getSelectedRange()&&!this.selection.isSelectedByCorner()))},submenu:{items:[{key:`${l}:left`,checkable:!0,ariaLabel(){return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT)},ariaChecked(){return(0,s.hasSelectionAClass)(this,"htLeft")},name(){let e=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT);return(0,s.hasSelectionAClass)(this,"htLeft")&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),o="horizontal",n="htLeft";this.runHooks("beforeCellAlignment",t,e,o,n),(0,s.align)(e,o,n,((e,t)=>this.getCellMeta(e,t)),((e,t,o,s)=>this.setCellMeta(e,t,o,s))),this.render()},disabled:!1},{key:`${l}:center`,checkable:!0,ariaLabel(){return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER)},ariaChecked(){return(0,s.hasSelectionAClass)(this,"htCenter")},name(){let e=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER);return(0,s.hasSelectionAClass)(this,"htCenter")&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),o="horizontal",n="htCenter";this.runHooks("beforeCellAlignment",t,e,o,n),(0,s.align)(e,o,n,((e,t)=>this.getCellMeta(e,t)),((e,t,o,s)=>this.setCellMeta(e,t,o,s))),this.render()},disabled:!1},{key:`${l}:right`,checkable:!0,ariaLabel(){return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT)},ariaChecked(){return(0,s.hasSelectionAClass)(this,"htRight")},name(){let e=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT);return(0,s.hasSelectionAClass)(this,"htRight")&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),o="horizontal",n="htRight";this.runHooks("beforeCellAlignment",t,e,o,n),(0,s.align)(e,o,n,((e,t)=>this.getCellMeta(e,t)),((e,t,o,s)=>this.setCellMeta(e,t,o,s))),this.render()},disabled:!1},{key:`${l}:justify`,checkable:!0,ariaLabel(){return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY)},ariaChecked(){return(0,s.hasSelectionAClass)(this,"htJustify")},name(){let e=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY);return(0,s.hasSelectionAClass)(this,"htJustify")&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),o="horizontal",n="htJustify";this.runHooks("beforeCellAlignment",t,e,o,n),(0,s.align)(e,o,n,((e,t)=>this.getCellMeta(e,t)),((e,t,o,s)=>this.setCellMeta(e,t,o,s))),this.render()},disabled:!1},{name:n.KEY},{key:`${l}:top`,checkable:!0,ariaLabel(){return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_TOP)},ariaChecked(){return(0,s.hasSelectionAClass)(this,"htTop")},name(){let e=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_TOP);return(0,s.hasSelectionAClass)(this,"htTop")&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),o="vertical",n="htTop";this.runHooks("beforeCellAlignment",t,e,o,n),(0,s.align)(e,o,n,((e,t)=>this.getCellMeta(e,t)),((e,t,o,s)=>this.setCellMeta(e,t,o,s))),this.render()},disabled:!1},{key:`${l}:middle`,checkable:!0,ariaLabel(){return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE)},ariaChecked(){return(0,s.hasSelectionAClass)(this,"htMiddle")},name(){let e=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE);return(0,s.hasSelectionAClass)(this,"htMiddle")&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),o="vertical",n="htMiddle";this.runHooks("beforeCellAlignment",t,e,o,n),(0,s.align)(e,o,n,((e,t)=>this.getCellMeta(e,t)),((e,t,o,s)=>this.setCellMeta(e,t,o,s))),this.render()},disabled:!1},{key:`${l}:bottom`,checkable:!0,ariaLabel(){return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM)},ariaChecked(){return(0,s.hasSelectionAClass)(this,"htBottom")},name(){let e=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM);return(0,s.hasSelectionAClass)(this,"htBottom")&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),o="vertical",n="htBottom";this.runHooks("beforeCellAlignment",t,e,o,n),(0,s.align)(e,o,n,((e,t)=>this.getCellMeta(e,t)),((e,t,o,s)=>this.setCellMeta(e,t,o,s))),this.render()},disabled:!1}]}}};var s=o(80485),n=o(3682),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884));function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const l=t.KEY="alignment"},83398:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:i,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_CLEAR_COLUMN)},callback(e,t){const o=t[0].start.col,s=t[0].end.col;this.countRows()&&this.populateFromArray(0,o,[[null]],Math.max(t[0].start.row,t[0].end.row),s,"ContextMenu.clearColumn")},disabled(){const e=this.getSelectedRangeLast();return!e||(!!(e.isSingleHeader()&&e.highlight.col<0)||!this.selection.isSelectedByColumnHeader())}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=i?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const i=t.KEY="clear_column"},88358:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:i,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_INSERT_LEFT)},callback(){const e=this.getSelectedRangeLast().getTopLeftCorner(),t=this.isRtl()?"insert_col_end":"insert_col_start";this.alter(t,e.col,1,"ContextMenu.columnLeft")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.col<0)return!0;if(this.selection.isSelectedByCorner()){return 0===this.countCols()}return this.selection.isSelectedByRowHeader()||this.countCols()>=this.getSettings().maxCols},hidden(){return!this.getSettings().allowInsertColumn}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=i?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const i=t.KEY="col_left"},53649:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:i,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_INSERT_RIGHT)},callback(){const e=this.getSelectedRangeLast().getTopRightCorner(),t=this.isRtl()?"insert_col_start":"insert_col_end";this.alter(t,e.col,1,"ContextMenu.columnRight")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();return!e||(!!(e.isSingleHeader()&&e.highlight.col<0)||!this.selection.isSelectedByCorner()&&(this.selection.isSelectedByRowHeader()||this.countCols()>=this.getSettings().maxCols))},hidden(){return!this.getSettings().allowInsertColumn}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=i?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const i=t.KEY="col_right"},58653:(e,t,o)=>{"use strict";t.__esModule=!0,t.addItem=function(e,t){-1===v.indexOf(e)&&(y[e]=t)},t.predefinedItems=function(){const e={};return(0,s.objectEach)(y,((t,o)=>{e[o]=t()})),e};var s=o(13911),n=C(o(17200));t.ALIGNMENT=n.KEY;var i=C(o(83398));t.CLEAR_COLUMN=i.KEY;var r=C(o(88358));t.COLUMN_LEFT=r.KEY;var l=C(o(53649));t.COLUMN_RIGHT=l.KEY;var a=C(o(49359));t.READ_ONLY=a.KEY;var h=C(o(25433));t.REDO=h.KEY;var c=C(o(5471));t.REMOVE_COLUMN=c.KEY;var u=C(o(63353));t.REMOVE_ROW=u.KEY;var d=C(o(93640));t.ROW_ABOVE=d.KEY;var g=C(o(42407));t.ROW_BELOW=g.KEY;var f=C(o(3682));t.SEPARATOR=f.KEY;var p=C(o(51628));t.NO_ITEMS=p.KEY;var m=C(o(64443));function w(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(w=function(e){return e?o:t})(e)}function C(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=w(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}t.UNDO=m.KEY;const v=t.ITEMS=[d.KEY,g.KEY,r.KEY,l.KEY,i.KEY,u.KEY,c.KEY,m.KEY,h.KEY,a.KEY,n.KEY,f.KEY,p.KEY],y={[f.KEY]:f.default,[p.KEY]:p.default,[d.KEY]:d.default,[g.KEY]:g.default,[r.KEY]:r.default,[l.KEY]:l.default,[i.KEY]:i.default,[u.KEY]:u.default,[c.KEY]:c.default,[m.KEY]:m.default,[h.KEY]:h.default,[a.KEY]:a.default,[n.KEY]:n.default}},51628:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:n,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_NO_ITEMS)},disabled:!0,isCommand:!1}};var s=o(50884);const n=t.KEY="no_items"},49359:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:l,checkable:!0,ariaChecked(){return(0,s.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>this.getCellMeta(e,t).readOnly))},ariaLabel(){return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_READ_ONLY)},name(){let e=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_READ_ONLY);return(0,s.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>this.getCellMeta(e,t).readOnly))&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.checkSelectionConsistency)(e,((e,t)=>this.getCellMeta(e,t).readOnly));(0,n.arrayEach)(e,(e=>{e.forAll(((e,o)=>{e>=0&&o>=0&&this.setCellMeta(e,o,"readOnly",!t)}))})),this.render()},disabled(){const e=this.getSelectedRangeLast();return!e||(!!e.isSingleHeader()||(!!this.selection.isSelectedByCorner()||(0===this.countRows()||0===this.countCols()||(!this.getSelectedRange()||0===this.getSelectedRange().length))))}}};var s=o(80485),n=o(9175),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884));function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const l=t.KEY="make_read_only"},25433:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:i,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_REDO)},callback(){this.redo()},hidden(){const e=this.getPlugin("undoRedo");return!e||!e.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isRedoAvailable()}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=i?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const i=t.KEY="redo"},5471:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:r,name(){const e=this.getSelected();let t=0;if(e)if(e.length>1)t=1;else{const[,o,,s]=e[0];o-s!=0&&(t=1)}return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_REMOVE_COLUMN,t)},callback(){this.alter("remove_col",(0,s.transformSelectionToColumnDistance)(this),null,"ContextMenu.removeColumn")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.col<0)return!0;const t=this.countCols();return this.selection.isSelectedByCorner()?0===t:this.selection.isSelectedByRowHeader()||0===t},hidden(){return!this.getSettings().allowRemoveColumn}}};var s=o(30580),n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}const r=t.KEY="remove_col"},63353:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:r,name(){const e=this.getSelected();let t=0;if(e)if(e.length>1)t=1;else{const[o,,s]=e[0];o-s!=0&&(t=1)}return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_REMOVE_ROW,t)},callback(){this.alter("remove_row",(0,s.transformSelectionToRowDistance)(this),1,"ContextMenu.removeRow")},disabled(){const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.row<0)return!0;const t=this.countRows();return this.selection.isSelectedByCorner()?0===t:this.selection.isSelectedByColumnHeader()||0===t},hidden(){return!this.getSettings().allowRemoveRow}}};var s=o(30580),n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}const r=t.KEY="remove_row"},93640:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:i,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_ROW_ABOVE)},callback(){const e=this.getSelectedRangeLast().getTopLeftCorner();this.alter("insert_row_above",e.row,1,"ContextMenu.rowAbove")},disabled(){const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.row<0)return!0;if(this.selection.isSelectedByCorner()){return 0===this.countRows()}return this.selection.isSelectedByColumnHeader()||this.countRows()>=this.getSettings().maxRows},hidden(){return!this.getSettings().allowInsertRow}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=i?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const i=t.KEY="row_above"},42407:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:i,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_ROW_BELOW)},callback(){const e=this.getSelectedRangeLast().getBottomRightCorner();this.alter("insert_row_below",e.row,1,"ContextMenu.rowBelow")},disabled(){const e=this.getSelectedRangeLast();return!e||(!!(e.isSingleHeader()&&e.highlight.row<0)||!this.selection.isSelectedByCorner()&&(this.selection.isSelectedByColumnHeader()||this.countRows()>=this.getSettings().maxRows))},hidden(){return!this.getSettings().allowInsertRow}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=i?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const i=t.KEY="row_below"},3682:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(){return{name:o}};const o=t.KEY="---------"},64443:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:i,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_UNDO)},callback(){this.undo()},hidden(){const e=this.getPlugin("undoRedo");return!e||!e.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isUndoAvailable()}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=i?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const i=t.KEY="undo"},80485:(e,t,o)=>{"use strict";t.__esModule=!0,t.align=function(e,t,o,r,l){(0,s.arrayEach)(e,(e=>{e.forAll(((e,s)=>{e>=0&&s>=0&&function(e,t,o,s,r,l){const a=r(e,t);let h=s;a.className&&(h="vertical"===o?n(a.className,s):i(a.className,s));l(e,t,"className",h)}(e,s,t,o,r,l)}))}))},t.checkSelectionConsistency=r,t.getAlignmentClasses=function(e,t){const o={};return(0,s.arrayEach)(e,(e=>{e.forAll(((e,s)=>{e>=0&&s>=0&&(o[e]||(o[e]=[]),o[e][s]=t(e,s))}))})),o},t.getAlignmentComparatorByClass=l,t.getDocumentOffsetByElement=function(e,t){const o={top:0,left:0};if(t!==e.ownerDocument){const{frameElement:e}=t.defaultView,{top:s,left:n}=e.getBoundingClientRect();o.top=s,o.left=n}return o},t.hasSelectionAClass=function(e,t){return r(e.getSelectedRange(),l(t).bind(e))},t.markLabelAsSelected=function(e){return`<span class="selected">${String.fromCharCode(10003)}</span>${e}`},t.prepareHorizontalAlignClass=i,t.prepareVerticalAlignClass=n;var s=o(9175);function n(e,t){if(-1!==e.indexOf(t))return e;return`${e.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ","")} ${t}`}function i(e,t){if(-1!==e.indexOf(t))return e;return`${e.replace("htLeft","").replace("htCenter","").replace("htRight","").replace("htJustify","").replace(" ","")} ${t}`}function r(e,t){let o=!1;return Array.isArray(e)&&(0,s.arrayEach)(e,(e=>(e.forAll(((e,s)=>{if(e>=0&&s>=0&&t(e,s))return o=!0,!1})),o))),o}function l(e){return function(t,o){const s=this.getCellMeta(t,o).className;return s&&-1!==s.indexOf(e)}}},3626:(e,t)=>{"use strict";t.__esModule=!0;t.default=class{constructor(){this.data={}}setData(e,t){this.data[e]=t}getData(e){return this.data[e]||void 0}}},81751:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy",name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_COPY)},callback(){e.copyCellsOnly()},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var s=o(50884)},35101:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy_column_headers_only",name(){const e=this.getSelectedRangeLast(),t=e?(0,n.clamp)(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY,t)},callback(){e.copyColumnHeadersOnly()},disabled(){if(!this.hasColHeaders())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var s=o(50884),n=o(87485)},98626:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy_with_column_group_headers",name(){const e=this.getSelectedRangeLast(),t=e?(0,n.clamp)(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS,t)},callback(){e.copyWithAllColumnHeaders()},disabled(){if(!this.hasColHeaders()||!this.getSettings().nestedHeaders)return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var s=o(50884),n=o(87485)},25015:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy_with_column_headers",name(){const e=this.getSelectedRangeLast(),t=e?(0,n.clamp)(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS,t)},callback(){e.copyWithColumnHeaders()},disabled(){if(!this.hasColHeaders())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var s=o(50884),n=o(87485)},13348:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"cut",name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_CUT)},callback(){e.cut()},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=i?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}},4996:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(61205),r=s(o(56937)),l=o(55518),a=o(9175),h=o(59777),c=o(9893),u=o(28890),d=s(o(81751)),g=s(o(35101)),f=s(o(98626)),p=s(o(25015)),m=s(o(13348)),w=s(o(64471)),C=o(28193),v=o(74737);function y(e,t,o){E(e,t),t.set(e,o)}function E(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function S(e,t){return e.get(b(e,t))}function R(e,t,o){return e.set(b(e,t),o),o}function b(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}o(42172),r.default.getSingleton().register("afterCopyLimit"),r.default.getSingleton().register("modifyCopyableRange"),r.default.getSingleton().register("beforeCut"),r.default.getSingleton().register("afterCut"),r.default.getSingleton().register("beforePaste"),r.default.getSingleton().register("afterPaste"),r.default.getSingleton().register("beforeCopy"),r.default.getSingleton().register("afterCopy");const _=t.PLUGIN_KEY="copyPaste",T=t.PLUGIN_PRIORITY=80,M=["fragmentSelection"],O=['<meta name="generator" content="Handsontable"/>','<style type="text/css">td{white-space:normal}br{mso-data-placement:same-cell}</style>'].join("");var I=new WeakMap,N=new WeakMap,A=new WeakMap,P=new WeakMap,x=new WeakMap,H=new WeakMap,D=new WeakMap,k=new WeakMap,L=new WeakSet;class V extends i.BasePlugin{constructor(){var e,t;super(...arguments),E(e=this,t=L),t.add(e),(0,n.default)(this,"columnsLimit",1/0),(0,n.default)(this,"rowsLimit",1/0),(0,n.default)(this,"pasteMode","overwrite"),(0,n.default)(this,"uiContainer",this.hot.rootDocument.body),y(this,I,!1),y(this,N,!1),y(this,A,!1),y(this,P,"cells-only"),y(this,x,!1),y(this,H,!1),y(this,D,new C.CopyableRangesFactory({countRows:()=>this.hot.countRows(),countColumns:()=>this.hot.countCols(),rowsLimit:()=>this.rowsLimit,columnsLimit:()=>this.columnsLimit,countColumnHeaders:()=>this.hot.view.getColumnHeadersCount()})),y(this,k,!1),(0,n.default)(this,"copyableRanges",[])}static get PLUGIN_KEY(){return _}static get SETTING_KEYS(){return[_,...M]}static get PLUGIN_PRIORITY(){return T}isEnabled(){return!!this.hot.getSettings()[_]}enablePlugin(){var e=this;if(this.enabled)return;const{[_]:t}=this.hot.getSettings();var o,s;"object"==typeof t&&(this.pasteMode=null!==(o=t.pasteMode)&&void 0!==o?o:this.pasteMode,this.rowsLimit=isNaN(t.rowsLimit)?this.rowsLimit:t.rowsLimit,this.columnsLimit=isNaN(t.columnsLimit)?this.columnsLimit:t.columnsLimit,R(I,this,!!t.copyColumnHeaders),R(N,this,!!t.copyColumnGroupHeaders),R(A,this,!!t.copyColumnHeadersOnly),this.uiContainer=null!==(s=t.uiContainer)&&void 0!==s?s:this.uiContainer);this.addHook("afterContextMenuDefaultOptions",(e=>b(L,this,j).call(this,e))),this.addHook("afterSelection",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(L,e,Y).call(e,...o)})),this.addHook("afterSelectionEnd",(()=>b(L,this,z).call(this))),this.eventManager.addEventListener(this.hot.rootDocument,"copy",(function(){return e.onCopy(...arguments)})),this.eventManager.addEventListener(this.hot.rootDocument,"cut",(function(){return e.onCut(...arguments)})),this.eventManager.addEventListener(this.hot.rootDocument,"paste",(function(){return e.onPaste(...arguments)})),(0,u.isSafari)()&&(this.eventManager.addEventListener(this.hot.rootDocument.body,"mouseenter",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(L,e,G).call(e,...o)})),this.eventManager.addEventListener(this.hot.rootDocument.body,"mouseleave",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(L,e,$).call(e,...o)})),this.addHook("afterSelection",(()=>b(L,this,K).call(this)))),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){super.disablePlugin()}copy(){R(P,this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:"cells-only"),R(x,this,!0),b(L,this,F).call(this,"copy")}copyCellsOnly(){this.copy("cells-only")}copyColumnHeadersOnly(){this.copy("column-headers-only")}copyWithAllColumnHeaders(){this.copy("with-column-group-headers")}copyWithColumnHeaders(){this.copy("with-column-headers")}cut(){R(H,this,!0),b(L,this,F).call(this,"cut")}getRangedCopyableData(e){return(0,l.stringify)(this.getRangedData(e))}getRangedData(e){const t=[],{rows:o,columns:s}=(0,C.normalizeRanges)(e);return(0,a.arrayEach)(o,(e=>{const o=[];(0,a.arrayEach)(s,(t=>{e<0?o.push(this.hot.getColHeader(t,e)):o.push(this.hot.getCopyableData(e,t))})),t.push(o)})),t}paste(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(!e&&!t)return;const o=new w.default;e&&o.clipboardData.setData("text/plain",e),t&&o.clipboardData.setData("text/html",t),this.onPaste(o)}setCopyableText(){const e=this.hot.getSelectedRangeLast();if(!e)return;if(e.isSingleHeader())return void(this.copyableRanges=[]);S(D,this).setSelectedRange(e);const t=new Map([["headers",null],["cells",null]]);"column-headers-only"===S(P,this)?t.set("headers",S(D,this).getMostBottomColumnHeadersRange()):("with-column-headers"===S(P,this)?t.set("headers",S(D,this).getMostBottomColumnHeadersRange()):"with-column-group-headers"===S(P,this)&&t.set("headers",S(D,this).getAllColumnHeadersRange()),t.set("cells",S(D,this).getCellsRange())),this.copyableRanges=Array.from(t.values()).filter((e=>null!==e)).map((e=>{let{startRow:t,startCol:o,endRow:s,endCol:n}=e;return{startRow:t,startCol:o,endRow:s,endCol:n}})),this.copyableRanges=this.hot.runHooks("modifyCopyableRange",this.copyableRanges);const o=t.get("cells");if(null!==o&&o.isRangeTrimmed){const{startRow:e,startCol:t,endRow:s,endCol:n}=o;this.hot.runHooks("afterCopyLimit",s-e+1,n-t+1,this.rowsLimit,this.columnsLimit)}}isEditorOpened(){var e;return null===(e=this.hot.getActiveEditor())||void 0===e?void 0:e.isOpened()}populateValues(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.hot.getSelectedRangeLast();if(!e.length)return;const o=e.length,s=e[0].length,n=[],{row:i,col:r}=t.getTopStartCorner(),{row:l,col:a}=t.getBottomEndCorner();let h=i,c=r,u=i,d=r;for(;n.length<o||h<=l;){const{skipRowOnPaste:t,visualRow:l}=this.hot.getCellMeta(h,r);if(h=l+1,!0===t)continue;u=l,c=r;const g=[],f=n.length%o;for(;g.length<s||c<=a;){const{skipColumnOnPaste:t,visualCol:o}=this.hot.getCellMeta(i,c);if(c=o+1,!0===t)continue;d=o;const n=g.length%s;g.push(e[f][n])}n.push(g)}return R(k,this,!0),this.hot.populateFromArray(i,r,n,void 0,void 0,"CopyPaste.paste",this.pasteMode),[i,r,u,d]}onCopy(e){var t;const o=this.hot.getFocusManager().getRefocusElement(),s=null===(t=e.target)||void 0===t?void 0:t.hasAttribute("data-hot-input");if(!this.hot.isListening()&&!S(x,this)||this.isEditorOpened()||e.target instanceof HTMLElement&&(s&&e.target!==o||!s&&e.target!==this.hot.rootDocument.body))return;e.preventDefault(),this.setCopyableText(),R(x,this,!1);const n=this.getRangedData(this.copyableRanges),i=b(L,this,W).call(this,this.copyableRanges);if(!!this.hot.runHooks("beforeCopy",n,this.copyableRanges,i)){const t=(0,l.stringify)(n);if(e&&e.clipboardData){const o=(0,v._dataToHTML)(n,this.hot.rootDocument);e.clipboardData.setData("text/plain",t),e.clipboardData.setData("text/html",[O,o].join(""))}else"undefined"==typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",t);this.hot.runHooks("afterCopy",n,this.copyableRanges,i)}R(P,this,"cells-only")}onCut(e){var t;const o=this.hot.getFocusManager().getRefocusElement(),s=null===(t=e.target)||void 0===t?void 0:t.hasAttribute("data-hot-input");if(!this.hot.isListening()&&!S(H,this)||this.isEditorOpened()||e.target instanceof HTMLElement&&(s&&e.target!==o||!s&&e.target!==this.hot.rootDocument.body))return;e.preventDefault(),this.setCopyableText(),R(H,this,!1);const n=this.getRangedData(this.copyableRanges);if(!!this.hot.runHooks("beforeCut",n,this.copyableRanges)){const t=(0,l.stringify)(n);if(e&&e.clipboardData){const o=(0,v._dataToHTML)(n,this.hot.rootDocument);e.clipboardData.setData("text/plain",t),e.clipboardData.setData("text/html",[O,o].join(""))}else"undefined"==typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",t);this.hot.emptySelectedCells("CopyPaste.cut"),this.hot.runHooks("afterCut",n,this.copyableRanges)}}onPaste(e){var t;const o=this.hot.getFocusManager().getRefocusElement(),s=null===(t=e.target)||void 0===t?void 0:t.hasAttribute("data-hot-input");if(!this.hot.isListening()||this.isEditorOpened()||!this.hot.getSelected()||e.target instanceof HTMLElement&&(s&&e.target!==o||!s&&e.target!==this.hot.rootDocument.body))return;let n;if(e.preventDefault(),e&&void 0!==e.clipboardData){const t=(0,h.sanitize)(e.clipboardData.getData("text/html"),{ADD_TAGS:["meta"],ADD_ATTR:["content"],FORCE_BODY:!0});if(t&&/(<table)|(<TABLE)/g.test(t)){n=(0,v.htmlToGridSettings)(t,this.hot.rootDocument).data}else n=e.clipboardData.getData("text/plain")}else"undefined"==typeof ClipboardEvent&&void 0!==this.hot.rootWindow.clipboardData&&(n=this.hot.rootWindow.clipboardData.getData("Text"));if("string"==typeof n&&(n=(0,l.parse)(n)),void 0===n||n&&0===n.length)return;if(!1===this.hot.runHooks("beforePaste",n,this.copyableRanges))return;const[i,r,a,c]=this.populateValues(n);this.hot.selectCell(i,r,Math.min(this.hot.countRows()-1,a),Math.min(this.hot.countCols()-1,c)),this.hot.runHooks("afterPaste",n,this.copyableRanges)}destroy(){super.destroy()}}function F(e){if((0,u.isSafari)()){const t=this.hot.getSelectedRangeLast();if(t){const{row:o,col:s}=t.highlight,n=this.hot.getCell(o,s,!0);n&&(0,c.runWithSelectedContendEditableElement)(n,(()=>{this.hot.rootDocument.execCommand(e)}))}}else this.hot.rootDocument.execCommand(e)}function W(e){const{rows:t}=(0,C.normalizeRanges)(e);let o=0;for(let e=0;e<t.length&&!(t[e]>=0);e++)o+=1;return{columnHeadersCount:o}}function B(){if(this.hot.isListening()){const e=this.hot.getSelectedRangeLast();if(e){const{row:t,col:o}=e.highlight,s=this.hot.getCell(t,o,!0);s&&(0,c.makeElementContentEditableAndSelectItsContent)(s)}}}function U(){if(this.hot.isListening()){const e=this.hot.getSelectedRangeLast();if(e){const{row:t,col:o}=e.highlight,s=this.hot.getCell(t,o,!0);null!=s&&s.hasAttribute("contenteditable")&&(0,c.removeContentEditableFromElementAndDeselect)(s)}}}function j(e){e.items.push({name:"---------"},(0,d.default)(this)),S(I,this)&&e.items.push((0,p.default)(this)),S(N,this)&&e.items.push((0,f.default)(this)),S(A,this)&&e.items.push((0,g.default)(this)),e.items.push((0,m.default)(this))}function Y(e,t,o,s,n){S(k,this)&&(n.value=!0),R(k,this,!1)}function z(){this.isEditorOpened()||this.hot.getSettings().fragmentSelection||this.setCopyableText()}function G(){b(L,this,U).call(this)}function $(){b(L,this,B).call(this)}function K(){b(L,this,U).call(this)}t.CopyPaste=V},28193:(e,t,o)=>{"use strict";t.__esModule=!0,t.normalizeRanges=function(e){const t=[],o=[];return(0,s.arrayEach)(e,(e=>{const s=Math.min(e.startRow,e.endRow),i=Math.max(e.startRow,e.endRow);(0,n.rangeEach)(s,i,(e=>{-1===t.indexOf(e)&&t.push(e)}));const r=Math.min(e.startCol,e.endCol),l=Math.max(e.startCol,e.endCol);(0,n.rangeEach)(r,l,(e=>{-1===o.indexOf(e)&&o.push(e)}))})),{rows:t,columns:o}},o(67834),o(15724);var s=o(9175),n=o(87485);function i(e,t,o){r(e,t),t.set(e,o)}function r(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function l(e,t){return e.get(h(e,t))}function a(e,t,o){return e.set(h(e,t),o),o}function h(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var c=new WeakMap,u=new WeakMap,d=new WeakMap,g=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakSet;function w(e,t){return Math.min(t,Math.max(e+l(f,this).call(this)-1,e))}function C(e,t){return Math.min(t,Math.max(e+l(g,this).call(this)-1,e))}t.CopyableRangesFactory=class{constructor(e){let{countRows:t,countColumns:o,rowsLimit:s,columnsLimit:n,countColumnHeaders:l}=e;var h,w;r(h=this,w=m),w.add(h),i(this,c,void 0),i(this,u,void 0),i(this,d,void 0),i(this,g,void 0),i(this,f,void 0),i(this,p,void 0),a(u,this,t),a(d,this,o),a(g,this,s),a(f,this,n),a(p,this,l)}setSelectedRange(e){a(c,this,e)}getCellsRange(){if(0===l(u,this).call(this)||0===l(d,this).call(this))return null;const{row:e,col:t}=l(c,this).getTopStartCorner(),{row:o,col:s}=l(c,this).getBottomEndCorner(),n=h(m,this,C).call(this,e,o),i=h(m,this,w).call(this,t,s);return{isRangeTrimmed:o!==n||s!==i,startRow:e,startCol:t,endRow:n,endCol:i}}getMostBottomColumnHeadersRange(){if(0===l(d,this).call(this)||0===l(p,this).call(this))return null;const{col:e}=l(c,this).getTopStartCorner(),{col:t}=l(c,this).getBottomEndCorner(),o=h(m,this,w).call(this,e,t);return{isRangeTrimmed:t!==o,startRow:-1,startCol:e,endRow:-1,endCol:o}}getAllColumnHeadersRange(){if(0===l(d,this).call(this)||0===l(p,this).call(this))return null;const{col:e}=l(c,this).getTopStartCorner(),{col:t}=l(c,this).getBottomEndCorner(),o=h(m,this,w).call(this,e,t);return{isRangeTrimmed:t!==o,startRow:-l(p,this).call(this),startCol:e,endRow:-1,endCol:o}}}},90112:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(4996);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.CopyPaste=s.CopyPaste},64471:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(3626));t.default=class{constructor(){this.clipboardData=new n.default}preventDefault(){}}},63807:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"borders:bottom",name(){let e=this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_BORDERS_BOTTOM);return(0,n.checkSelectionBorders)(this,"bottom")&&(e=(0,n.markSelected)(e)),e},callback(t,o){const s=(0,n.checkSelectionBorders)(this,"bottom");e.prepareBorder(o,"bottom",s)}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(82783);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}},9566:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(63807));t.bottom=n.default;var i=s(o(2857));t.left=i.default;var r=s(o(70024));t.noBorders=r.default;var l=s(o(2992));t.right=l.default;var a=s(o(37513));t.top=a.default},2857:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=e.hot.isRtl()?"end":"start";return{key:"borders:left",name(){let e=this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_BORDERS_LEFT);return(0,n.checkSelectionBorders)(this,t)&&(e=(0,n.markSelected)(e)),e},callback(o,s){const i=(0,n.checkSelectionBorders)(this,t);e.prepareBorder(s,t,i)}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(82783);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}},70024:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"borders:no_borders",name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_REMOVE_BORDERS)},callback(t,o){e.prepareBorder(o,"noBorders")},disabled(){return!(0,n.checkSelectionBorders)(this)}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(82783);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}},2992:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=e.hot.isRtl()?"start":"end";return{key:"borders:right",name(){let e=this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_BORDERS_RIGHT);return(0,n.checkSelectionBorders)(this,t)&&(e=(0,n.markSelected)(e)),e},callback(o,s){const i=(0,n.checkSelectionBorders)(this,t);e.prepareBorder(s,t,i)}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(82783);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}},37513:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"borders:top",name(){let e=this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_BORDERS_TOP);return(0,n.checkSelectionBorders)(this,"top")&&(e=(0,n.markSelected)(e)),e},callback(t,o){const s=(0,n.checkSelectionBorders)(this,"top");e.prepareBorder(o,"top",s)}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(82783);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}},53856:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(61205),r=o(13911),l=o(87485),a=o(9175),h=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=g(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),c=o(9566),u=o(82783),d=o(73497);function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(g=function(e){return e?o:t})(e)}function f(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function p(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}const m=t.PLUGIN_KEY="customBorders",w=t.PLUGIN_PRIORITY=90;var C=new WeakSet;class v extends i.BasePlugin{constructor(){super(...arguments),f(this,C),(0,n.default)(this,"savedBorders",[])}static get PLUGIN_KEY(){return m}static get PLUGIN_PRIORITY(){return w}isEnabled(){return!!this.hot.getSettings()[m]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",(e=>p(C,this,y).call(this,e))),this.addHook("init",(()=>p(C,this,E).call(this))),super.enablePlugin())}disablePlugin(){this.hideBorders(),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.changeBorderSettings(),super.updatePlugin()}setBorders(e,t){let o=["top","bottom","start","end"],s=null;t&&(this.checkSettingsCohesion([t]),o=Object.keys(t),s=(0,u.normalizeBorder)(t));const n=(0,d.detectSelectionType)(e),i=(0,d.normalizeSelectionFactory)(n,{createCellCoords:this.hot._createCellCoords.bind(this.hot),createCellRange:this.hot._createCellRange.bind(this.hot)});(0,a.arrayEach)(e,(e=>{i(e).forAll(((e,t)=>{(0,a.arrayEach)(o,(o=>{this.prepareBorderFromCustomAdded(e,t,s,(0,u.toInlinePropName)(o))}))}))})),this.hot.view.render()}getBorders(e){if(!Array.isArray(e))return this.savedBorders;const t=(0,d.detectSelectionType)(e),o=(0,d.normalizeSelectionFactory)(t,{createCellCoords:this.hot._createCellCoords.bind(this.hot),createCellRange:this.hot._createCellRange.bind(this.hot)}),s=[];return(0,a.arrayEach)(e,(e=>{o(e).forAll(((e,t)=>{(0,a.arrayEach)(this.savedBorders,(o=>{o.row===e&&o.col===t&&s.push((0,u.denormalizeBorder)(o))}))}))})),s}clearBorders(e){e?this.setBorders(e):((0,a.arrayEach)(this.savedBorders,(e=>{this.clearBordersFromSelectionSettings(e.id),this.clearNullCellRange(),this.hot.removeCellMeta(e.row,e.col,"borders")})),this.savedBorders.length=0)}insertBorderIntoSettings(e,t){this.checkSavedBorders(e)||this.savedBorders.push(e);const o=this.hot._createCellRange(this.hot._createCellCoords(e.row,e.col));this.checkCustomSelections(e,o,t)||this.hot.selection.highlight.addCustomSelection({border:e,visualCellRange:o})}prepareBorderFromCustomAdded(e,t,o,s){const n=this.hot.countRows(),i=this.hot.countCols();if(e>=n||t>=i)return;let r=(0,u.createEmptyBorders)(e,t);o&&(r=(0,u.extendDefaultBorder)(r,o),(0,a.arrayEach)(this.hot.selection.highlight.customSelections,(e=>{if(r.id===e.settings.id)return Object.assign(e.settings,o),r.id=e.settings.id,r.top=e.settings.top,r.bottom=e.settings.bottom,r.start=e.settings.start,r.end=e.settings.end,!1}))),this.hot.setCellMeta(e,t,"borders",(0,u.denormalizeBorder)(r)),this.insertBorderIntoSettings(r,s)}prepareBorderFromCustomAddedRange(e,t){const o=Math.min(e.to.row,this.hot.countRows()-1),s=Math.min(e.to.col,this.hot.countCols()-1);(0,l.rangeEach)(e.from.row,o,(o=>{(0,l.rangeEach)(e.from.col,s,(s=>{const n=(0,u.createEmptyBorders)(o,s);let i=0;o===e.from.row&&(0,r.hasOwnProperty)(t,"top")&&(i+=1,n.top=t.top),o===e.to.row&&(0,r.hasOwnProperty)(t,"bottom")&&(i+=1,n.bottom=t.bottom),s===e.from.col&&(0,r.hasOwnProperty)(t,"start")&&(i+=1,n.start=t.start),s===e.to.col&&(0,r.hasOwnProperty)(t,"end")&&(i+=1,n.end=t.end),i>0&&(this.hot.setCellMeta(o,s,"borders",(0,u.denormalizeBorder)(n)),this.insertBorderIntoSettings(n))}))}))}removeAllBorders(e,t){const o=(0,u.createId)(e,t);this.spliceBorder(o),this.clearBordersFromSelectionSettings(o),this.clearNullCellRange(),this.hot.removeCellMeta(e,t,"borders")}setBorder(e,t,o,s){let n=this.hot.getCellMeta(e,t).borders;if(n=n&&void 0!==n.border?(0,u.normalizeBorder)(n):(0,u.createEmptyBorders)(e,t),s){n[o]=(0,u.createSingleEmptyBorder)();if(4===this.countHide(n))this.removeAllBorders(e,t);else{this.checkCustomSelectionsFromContextMenu(n,o,s)||this.insertBorderIntoSettings(n),this.hot.setCellMeta(e,t,"borders",(0,u.denormalizeBorder)(n))}}else{n[o]=(0,u.createDefaultCustomBorder)();this.checkCustomSelectionsFromContextMenu(n,o,s)||this.insertBorderIntoSettings(n),this.hot.setCellMeta(e,t,"borders",(0,u.denormalizeBorder)(n))}}prepareBorder(e,t,o){(0,a.arrayEach)(e,(e=>{let{start:s,end:n}=e;if(s.row===n.row&&s.col===n.col)"noBorders"===t?this.removeAllBorders(s.row,s.col):this.setBorder(s.row,s.col,t,o);else switch(t){case"noBorders":(0,l.rangeEach)(s.col,n.col,(e=>{(0,l.rangeEach)(s.row,n.row,(t=>{this.removeAllBorders(t,e)}))}));break;case"top":(0,l.rangeEach)(s.col,n.col,(e=>{this.setBorder(s.row,e,t,o)}));break;case"bottom":(0,l.rangeEach)(s.col,n.col,(e=>{this.setBorder(n.row,e,t,o)}));break;case"start":(0,l.rangeEach)(s.row,n.row,(e=>{this.setBorder(e,s.col,t,o)}));break;case"end":(0,l.rangeEach)(s.row,n.row,(e=>{this.setBorder(e,n.col,t,o)}))}}))}createCustomBorders(e){(0,a.arrayEach)(e,(e=>{const t=(0,u.normalizeBorder)(e);e.range?this.prepareBorderFromCustomAddedRange(e.range,t):this.prepareBorderFromCustomAdded(e.row,e.col,t)}))}countHide(e){const{top:t,bottom:o,start:s,end:n}=e,i=[t,o,s,n];return(0,a.arrayReduce)(i,((e,t)=>{let o=e;return t&&t.hide&&(o+=1),o}),0)}clearBordersFromSelectionSettings(e){const t=(0,a.arrayMap)(this.hot.selection.highlight.customSelections,(e=>e.settings.id)).indexOf(e);t>-1&&this.hot.selection.highlight.customSelections[t].clear()}clearNullCellRange(){(0,a.arrayEach)(this.hot.selection.highlight.customSelections,((e,t)=>{if(null===e.cellRange)return this.hot.selection.highlight.customSelections[t].destroy(),this.hot.selection.highlight.customSelections.splice(t,1),!1}))}hideBorders(){(0,a.arrayEach)(this.savedBorders,(e=>{this.clearBordersFromSelectionSettings(e.id),this.clearNullCellRange()}))}spliceBorder(e){const t=(0,a.arrayMap)(this.savedBorders,(e=>e.id)).indexOf(e);t>-1&&this.savedBorders.splice(t,1)}checkSavedBorders(e){let t=!1;return 4===this.countHide(e)?(this.spliceBorder(e.id),t=!0):(0,a.arrayEach)(this.savedBorders,((o,s)=>{if(e.id===o.id)return this.savedBorders[s]=e,t=!0,!1})),t}checkCustomSelectionsFromContextMenu(e,t,o){let s=!1;return(0,a.arrayEach)(this.hot.selection.highlight.customSelections,(n=>{if(e.id===n.settings.id){const e=this.hot.view._wt.selectionManager.getBorderInstances(n);return(0,a.arrayEach)(e,(e=>{e.toggleHiddenClass(t,o)})),s=!0,!1}})),s}checkCustomSelections(e,t,o){const s=this.countHide(e);let n=!1;return 4===s?(this.removeAllBorders(e.row,e.col),n=!0):(0,a.arrayEach)(this.hot.selection.highlight.customSelections,(s=>{if(e.id===s.settings.id){if(s.visualCellRange=t,s.commit(),o){const t=this.hot.view._wt.selectionManager.getBorderInstances(s);(0,a.arrayEach)(t,(t=>{t.changeBorderStyle(o,e)}))}return n=!0,!1}})),n}changeBorderSettings(){const e=this.hot.getSettings()[m];if(Array.isArray(e)){const t=(0,r.deepClone)(e);this.checkSettingsCohesion(t),t.length||(this.savedBorders=t),this.createCustomBorders(t)}else void 0!==e&&this.createCustomBorders(this.savedBorders)}checkSettingsCohesion(e){const t=(0,u.hasLeftRightTypeOptions)(e),o=(0,u.hasStartEndTypeOptions)(e);if(t&&o)throw new Error('The "left"/"right" and "start"/"end" options should not be used together. Please use only the option "start"/"end".');if(this.hot.isRtl()&&t)throw new Error('The "left"/"right" properties are not supported for RTL. Please use option "start"/"end".')}destroy(){super.destroy()}}function y(e){this.hot.getSettings()[m]&&e.items.push({name:"---------"},{key:"borders",name(){return this.getTranslatedPhrase(h.CONTEXTMENU_ITEMS_BORDERS)},disabled(){const e=this.getSelectedRangeLast();return!e||(!!e.isSingleHeader()||this.selection.isSelectedByCorner())},submenu:{items:[(0,c.top)(this),(0,c.right)(this),(0,c.bottom)(this),(0,c.left)(this),(0,c.noBorders)(this)]}})}function E(){this.changeBorderSettings()}t.CustomBorders=v},27470:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(53856);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.CustomBorders=s.CustomBorders},82783:(e,t,o)=>{"use strict";t.__esModule=!0,t.checkSelectionBorders=function(e,t){let o=!1;return(0,i.arrayEach)(e.getSelectedRange(),(n=>{n.forAll(((n,i)=>{if(n<0||i<0)return;const r=e.getCellMeta(n,i).borders;if(r){if(!t)return o=!0,!1;if(!(0,s.hasOwnProperty)(r[t],"hide")||!1===r[t].hide)return o=!0,!1}}))})),o},t.createDefaultCustomBorder=l,t.createDefaultHtBorder=h,t.createEmptyBorders=function(e,t){return{id:r(e,t),border:{width:1,color:"#000",cornerVisible:!1},row:e,col:t,top:{hide:!0},bottom:{hide:!0},start:{hide:!0},end:{hide:!0}}},t.createId=r,t.createSingleEmptyBorder=a,t.denormalizeBorder=function(e){(0,n.isDefined)(e.start)&&(e.left=e.start);(0,n.isDefined)(e.end)&&(e.right=e.end);return e},t.extendDefaultBorder=function(e,t){(0,s.hasOwnProperty)(t,"border")&&t.border&&(e.border=t.border);(0,s.hasOwnProperty)(t,"top")&&(0,n.isDefined)(t.top)&&(t.top?((0,s.isObject)(t.top)||(t.top={width:1,color:"#000"}),e.top=t.top):(t.top={hide:!0},e.top=t.top));(0,s.hasOwnProperty)(t,"bottom")&&(0,n.isDefined)(t.bottom)&&(t.bottom?((0,s.isObject)(t.bottom)||(t.bottom={width:1,color:"#000"}),e.bottom=t.bottom):(t.bottom={hide:!0},e.bottom=t.bottom));(0,s.hasOwnProperty)(t,"start")&&(0,n.isDefined)(t.start)&&(t.start?((0,s.isObject)(t.start)||(t.start={width:1,color:"#000"}),e.start=t.start):(t.start={hide:!0},e.start=t.start));(0,s.hasOwnProperty)(t,"end")&&(0,n.isDefined)(t.end)&&(t.end?((0,s.isObject)(t.end)||(t.end={width:1,color:"#000"}),e.end=t.end):(t.end={hide:!0},e.end=t.end));return e},t.hasLeftRightTypeOptions=function(e){return e.some((e=>(0,n.isDefined)(e.left)||(0,n.isDefined)(e.right)))},t.hasStartEndTypeOptions=function(e){return e.some((e=>(0,n.isDefined)(e.start)||(0,n.isDefined)(e.end)))},t.markSelected=function(e){return`<span class="selected">${String.fromCharCode(10003)}</span>${e}`},t.normalizeBorder=function(e){var t,o;((0,n.isDefined)(e.start)||(0,n.isDefined)(e.left))&&(e.start=null!==(t=e.start)&&void 0!==t?t:e.left);((0,n.isDefined)(e.end)||(0,n.isDefined)(e.right))&&(e.end=null!==(o=e.end)&&void 0!==o?o:e.right);return delete e.left,delete e.right,e},t.toInlinePropName=function(e){var t;return null!==(t=c.get(e))&&void 0!==t?t:e};var s=o(13911),n=o(38893),i=o(9175);function r(e,t){return`border_row${e}col${t}`}function l(){return{width:1,color:"#000"}}function a(){return{hide:!0}}function h(){return{width:1,color:"#000",cornerVisible:!1}}const c=new Map([["left","start"],["right","end"]])},24218:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=s(o(85707)),i=o(61205),r=o(79729),l=o(9893);function a(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function h(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}const c=t.PLUGIN_KEY="dragToScroll",u=t.PLUGIN_PRIORITY=100;var d=new WeakSet;class g extends i.BasePlugin{constructor(){super(...arguments),a(this,d),(0,n.default)(this,"boundaries",null),(0,n.default)(this,"callback",null),(0,n.default)(this,"listening",!1)}static get PLUGIN_KEY(){return c}static get PLUGIN_PRIORITY(){return u}isEnabled(){return!!this.hot.getSettings()[c]}enablePlugin(){this.enabled||(this.addHook("afterOnCellMouseDown",(e=>h(d,this,f).call(this,e))),this.addHook("afterOnCellCornerMouseDown",(e=>h(d,this,f).call(this,e))),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.unregisterEvents(),super.disablePlugin()}setBoundaries(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{left:0,right:this.hot.rootWindow.innerWidth,top:0,bottom:this.hot.rootWindow.innerHeight};this.boundaries=e}setCallback(e){this.callback=e}check(e,t){let o=0,s=0;t<this.boundaries.top?s=t-this.boundaries.top:t>this.boundaries.bottom&&(s=t-this.boundaries.bottom),e<this.boundaries.left?o=e-this.boundaries.left:e>this.boundaries.right&&(o=e-this.boundaries.right),this.callback(o,s)}listen(){this.listening=!0}unlisten(){this.listening=!1}isListening(){return this.listening}registerEvents(){const{rootWindow:e}=this.hot;let t=e;for(;t;)this.eventManager.addEventListener(t.document,"contextmenu",(()=>this.unlisten())),this.eventManager.addEventListener(t.document,"mouseup",(()=>this.unlisten())),this.eventManager.addEventListener(t.document,"mousemove",(e=>this.onMouseMove(e))),t=(0,l.getParentWindow)(t)}unregisterEvents(){this.eventManager.clear()}onMouseMove(e){this.isListening()&&this.check(e.clientX,e.clientY)}destroy(){super.destroy()}}function f(e){if((0,r.isRightClick)(e))return;const t=this.hot.view._wt.wtOverlays.topOverlay.mainTableScrollableElement;this.setBoundaries(t!==this.hot.rootWindow?t.getBoundingClientRect():void 0),this.setCallback(((e,o)=>{var s,n;const i=null!==(s=t.scrollLeft)&&void 0!==s?s:t.scrollX,r=null!==(n=t.scrollTop)&&void 0!==n?n:t.scrollY;t.scroll(i+50*Math.sign(e),r+20*Math.sign(o))})),this.listen()}t.DragToScroll=g},66762:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(24218);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.DragToScroll=s.DragToScroll},75930:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=s(o(85707)),i=o(61205),r=o(9175),l=o(13911),a=o(21172),h=o(80485),c=o(9893),u=o(62076),d=o(95586),g=s(o(56937)),f=o(58653);o(98885);var p=o(92692);function m(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function w(e,t,o){return e.set(C(e,t),o),o}function C(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}g.default.getSingleton().register("afterDropdownMenuDefaultOptions"),g.default.getSingleton().register("beforeDropdownMenuShow"),g.default.getSingleton().register("afterDropdownMenuShow"),g.default.getSingleton().register("afterDropdownMenuHide"),g.default.getSingleton().register("afterDropdownMenuExecute");const v=t.PLUGIN_KEY="dropdownMenu",y=t.PLUGIN_PRIORITY=230,E="changeType",S=v;var R=new WeakMap,b=new WeakSet;class _ extends i.BasePlugin{static get PLUGIN_KEY(){return v}static get PLUGIN_PRIORITY(){return y}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[f.COLUMN_LEFT,f.COLUMN_RIGHT,f.SEPARATOR,f.REMOVE_COLUMN,f.SEPARATOR,f.CLEAR_COLUMN,f.SEPARATOR,f.READ_ONLY,f.SEPARATOR,f.ALIGNMENT]}constructor(e){var t,o;super(e),m(t=this,o=b),o.add(t),(0,n.default)(this,"commandExecutor",new a.CommandExecutor(this.hot)),(0,n.default)(this,"itemsFactory",null),(0,n.default)(this,"menu",null),function(e,t,o){m(e,t),t.set(e,o)}(this,R,!1),this.hot.addHook("afterGetColHeader",((e,t)=>C(b,this,O).call(this,e,t)))}isEnabled(){return this.hot.getSettings()[v]}enablePlugin(){var e=this;if(this.enabled)return;this.itemsFactory=new u.ItemsFactory(this.hot,_.DEFAULT_ITEMS),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return C(b,e,H).call(e,...o)})),this.addHook("beforeViewportScrollHorizontally",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return C(b,e,x).call(e,...o)}));const t=this.hot.getSettings()[v],o={items:this.itemsFactory.getItems(t)};this.registerEvents(),"function"==typeof t.callback&&this.commandExecutor.setCommonCallback(t.callback),this.registerShortcuts(),super.enablePlugin(),this.callOnPluginsReady((()=>{this.hot.runHooks("afterDropdownMenuDefaultOptions",o),this.itemsFactory.setPredefinedItems(o.items);const s=this.itemsFactory.getItems(t);this.menu&&this.menu.destroy(),this.menu=new d.Menu(this.hot,{className:"htDropdownMenu",keepInViewport:!0,container:t.uiContainer||this.hot.rootDocument.body}),this.hot.runHooks("beforeDropdownMenuSetItems",s),this.menu.setMenuItems(s),this.menu.addLocalHook("beforeOpen",(()=>C(b,this,I).call(this))),this.menu.addLocalHook("afterOpen",(()=>C(b,this,N).call(this))),this.menu.addLocalHook("afterSubmenuOpen",(e=>C(b,this,A).call(this,e))),this.menu.addLocalHook("afterClose",(()=>C(b,this,P).call(this))),this.menu.addLocalHook("executeCommand",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return e.executeCommand.call(e,...o)})),(0,r.arrayEach)(s,(e=>this.commandExecutor.registerCommand(e.key,e)))}))}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.close(),this.menu&&this.menu.destroy(),this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){const e=()=>{const{highlight:e}=this.hot.getSelectedRangeLast();if((e.isHeader()&&-1===e.row||e.isCell())&&e.col>=0){this.hot.selectColumns(e.col,e.col,-1);const{from:t}=this.hot.getSelectedRangeLast(),o=(0,h.getDocumentOffsetByElement)(this.menu.container,this.hot.rootDocument),s=this.hot.getCell(-1,t.col,!0).querySelector(`.${E}`),n=s.getBoundingClientRect();this.open({left:n.left+o.left,top:n.top+s.offsetHeight+o.top},{left:n.width,right:0,above:0,below:3}),this.menu.getNavigator().toFirstItem()}};this.hot.getShortcutManager().getContext("grid").addShortcuts([{keys:[["Shift","Alt","ArrowDown"],["Control/Meta","Enter"]],callback:e,runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&t.isHeader()&&!this.menu.isOpened()},captureCtrl:!0,group:S},{keys:[["Shift","Alt","ArrowDown"]],callback:e,runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&t.isCell()&&!this.menu.isOpened()},group:S}])}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(S)}registerEvents(){this.eventManager.addEventListener(this.hot.rootElement,"click",(e=>C(b,this,M).call(this,e)))}open(e){var t;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{above:0,below:0,left:0,right:0};null!==(t=this.menu)&&void 0!==t&&t.isOpened()||(this.menu.open(),(0,l.objectEach)(o,((e,t)=>{this.menu.setOffset(t,e)})),this.menu.setPosition(e))}close(){var e;null===(e=this.menu)||void 0===e||e.close()}executeCommand(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];this.commandExecutor.execute(e,...o)}setListening(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.menu.isOpened()&&(e?this.menu.hotMenu.listen():this.menu.hotMenu.unlisten())}destroy(){this.close(),this.menu&&this.menu.destroy(),super.destroy()}}function T(e){e.getKeyboardShortcutsCtrl().addCustomShortcuts([{keys:[["Control/Meta","A"]],callback:()=>!1}])}function M(e){if((0,c.hasClass)(e.target,E)){const t=(0,h.getDocumentOffsetByElement)(this.menu.container,this.hot.rootDocument),o=e.target.getBoundingClientRect();e.stopPropagation(),w(R,this,!1),this.open({left:o.left+t.left,top:o.top+e.target.offsetHeight+t.top},{left:o.width,right:0,above:0,below:3})}}function O(e,t){const o=t.parentNode;if(!o)return;const s=o.parentNode.childNodes,n=Array.prototype.indexOf.call(s,o);if(e<0||n!==s.length-1)return;const i=t.querySelector(`.${E}`);if(this.enabled&&i)return;if(!this.enabled)return void(i&&i.parentNode.removeChild(i));const r=this.hot.rootDocument.createElement("button");r.className=E,r.type="button",r.tabIndex=-1,this.hot.getSettings().ariaTags&&((0,c.setAttribute)(r,[(0,p.A11Y_HIDDEN)(),(0,p.A11Y_LABEL)(" ")]),(0,c.setAttribute)(t,[(0,p.A11Y_HASPOPUP)("menu")])),r.onclick=function(){return!1},t.firstChild.insertBefore(r,t.firstChild.firstChild)}function I(){this.hot.runHooks("beforeDropdownMenuShow",this)}function N(){this.hot.runHooks("afterDropdownMenuShow",this),C(b,this,T).call(this,this.menu)}function A(e){C(b,this,T).call(this,e)}function P(){this.hot.listen(),this.hot.runHooks("afterDropdownMenuHide",this)}function x(e){return o=this,(t=R).get(C(t,o))?null:e;var t,o}function H(e){(0,c.hasClass)(e.target,E)&&w(R,this,!0)}t.DropdownMenu=_,_.SEPARATOR={name:f.SEPARATOR}},71110:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(75930);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.DropdownMenu=s.DropdownMenu},14467:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(15724);var n=s(o(85707)),i=o(87485);t.default=class{constructor(e){(0,n.default)(this,"hot",void 0),(0,n.default)(this,"options",{}),this.hot=e}setOptions(e){this.options=e}getData(){const{startRow:e,startCol:t,endRow:o,endCol:s}=this._getDataRange(),n=this.options,r=[];return(0,i.rangeEach)(e,o,(e=>{const o=[];!n.exportHiddenRows&&this._isHiddenRow(e)||((0,i.rangeEach)(t,s,(t=>{!n.exportHiddenColumns&&this._isHiddenColumn(t)||o.push(this.hot.getDataAtCell(e,t))})),r.push(o))})),r}getRowHeaders(){const e=[];if(this.options.rowHeaders){const{startRow:t,endRow:o}=this._getDataRange(),s=this.hot.getRowHeader();(0,i.rangeEach)(t,o,(t=>{!this.options.exportHiddenRows&&this._isHiddenRow(t)||e.push(s[t])}))}return e}getColumnHeaders(){const e=[];if(this.options.columnHeaders){const{startCol:t,endCol:o}=this._getDataRange(),s=this.hot.getColHeader();(0,i.rangeEach)(t,o,(t=>{!this.options.exportHiddenColumns&&this._isHiddenColumn(t)||e.push(s[t])}))}return e}_getDataRange(){const e=this.hot.countCols()-1,t=this.hot.countRows()-1;let[o=0,s=0,n=t,i=e]=this.options.range;return o=Math.max(o,0),s=Math.max(s,0),n=Math.min(n,t),i=Math.min(i,e),{startRow:o,startCol:s,endRow:n,endCol:i}}_isHiddenRow(e){return this.hot.rowIndexMapper.isHidden(this.hot.toPhysicalRow(e))}_isHiddenColumn(e){return this.hot.columnIndexMapper.isHidden(this.hot.toPhysicalColumn(e))}}},18270:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=o(61205),i=s(o(14467)),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=l(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(16166));function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(l=function(e){return e?o:t})(e)}const a=t.PLUGIN_KEY="exportFile",h=t.PLUGIN_PRIORITY=240;class c extends n.BasePlugin{static get PLUGIN_KEY(){return a}static get PLUGIN_PRIORITY(){return h}isEnabled(){return!0}exportAsString(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._createTypeFormatter(e,t).export()}exportAsBlob(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._createBlob(this._createTypeFormatter(e,t))}downloadFile(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{rootDocument:o,rootWindow:s}=this.hot,n=this._createTypeFormatter(e,t),i=this._createBlob(n),r=s.URL||s.webkitURL,l=o.createElement("a"),a=`${n.options.filename}.${n.options.fileExtension}`;if(void 0!==l.download){const e=r.createObjectURL(i);l.style.display="none",l.setAttribute("href",e),l.setAttribute("download",a),o.body.appendChild(l),l.dispatchEvent(new MouseEvent("click")),o.body.removeChild(l),setTimeout((()=>{r.revokeObjectURL(e)}),100)}else navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob(i,a)}_createTypeFormatter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!r.EXPORT_TYPES[e])throw new Error(`Export format type "${e}" is not supported.`);return(0,r.default)(e,new i.default(this.hot),t)}_createBlob(e){let t=null;return"undefined"!=typeof Blob&&(t=new Blob([e.export()],{type:`${e.options.mimeType};charset=${e.options.encoding}`})),t}}t.ExportFile=c},35472:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(18270);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ExportFile=s.ExportFile},16166:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.default=function(e,t,o){if("function"==typeof r[e])return new r[e](t,o);return null};var n=s(o(37402));const i=t.TYPE_CSV="csv",r=(t.TYPE_EXCEL="excel",t.TYPE_PDF="pdf",t.EXPORT_TYPES={[i]:n.default})},5606:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707)),i=o(13911),r=o(59777);class l{static get DEFAULT_OPTIONS(){return{mimeType:"text/plain",fileExtension:"txt",filename:"Handsontable [YYYY]-[MM]-[DD]",encoding:"utf-8",bom:!1,columnHeaders:!1,rowHeaders:!1,exportHiddenColumns:!1,exportHiddenRows:!1,range:[]}}constructor(e,t){(0,n.default)(this,"dataProvider",void 0),(0,n.default)(this,"options",void 0),this.dataProvider=e,this.options=this._mergeOptions(t),this.dataProvider.setOptions(this.options)}_mergeOptions(e){let t=(0,i.clone)(this.constructor.DEFAULT_OPTIONS);const o=new Date;return t=(0,i.extend)((0,i.clone)(l.DEFAULT_OPTIONS),t),t=(0,i.extend)(t,e),t.filename=(0,r.substitute)(t.filename,{YYYY:o.getFullYear(),MM:`${o.getMonth()+1}`.padStart(2,"0"),DD:`${o.getDate()}`.padStart(2,"0")}),t}}t.default=l},37402:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=o(9175),i=o(38893),r=s(o(5606));const l=String.fromCharCode(13),a=String.fromCharCode(34),h=String.fromCharCode(10);class c extends r.default{static get DEFAULT_OPTIONS(){return{mimeType:"text/csv",fileExtension:"csv",bom:!0,columnDelimiter:",",rowDelimiter:"\r\n"}}export(){const e=this.options,t=this.dataProvider.getData();let o=this.dataProvider.getColumnHeaders();const s=o.length>0,i=this.dataProvider.getRowHeaders(),r=i.length>0;let l=e.bom?String.fromCharCode(65279):"";return s&&(o=(0,n.arrayMap)(o,(e=>this._escapeCell(e,!0))),r&&(l+=e.columnDelimiter),l+=o.join(e.columnDelimiter),l+=e.rowDelimiter),(0,n.arrayEach)(t,((t,o)=>{o>0&&(l+=e.rowDelimiter),r&&(l+=this._escapeCell(i[o])+e.columnDelimiter),l+=t.map((e=>this._escapeCell(e))).join(e.columnDelimiter)})),l}_escapeCell(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=(0,i.stringify)(e);return""!==o&&(t||o.indexOf(l)>=0||o.indexOf(a)>=0||o.indexOf(h)>=0||o.indexOf(this.options.columnDelimiter)>=0)&&(o=o.replace(new RegExp('"',"g"),'""'),o=`"${o}"`),o}}t.default=c},49771:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=s(o(85707)),i=o(9175),r=o(13911),l=s(o(63870)),a=o(93969);class h{constructor(e,t){let{id:o,stateless:s=!0}=t;(0,n.default)(this,"hot",void 0),(0,n.default)(this,"id",void 0),(0,n.default)(this,"elements",[]),(0,n.default)(this,"hidden",!1),(0,n.default)(this,"stateId",""),(0,n.default)(this,"state",void 0),this.hot=e,this.id=o,this.stateId=`Filters.component.${this.id}`,this.state=s?null:this.hot.columnIndexMapper.registerMap(this.stateId,new a.LinkedPhysicalIndexToValueMap)}getElements(){return this.elements}reset(){(0,i.arrayEach)(this.elements,(e=>e.reset()))}hide(){this.hidden=!0}show(){this.hidden=!1}isHidden(){return null===this.hot||this.hidden}restoreState(e){this.state&&this.setState(this.state.getValueAtIndex(e))}setState(){throw new Error("The state setting logic is not implemented")}saveState(e){this.state&&this.state.setValueAtIndex(e,this.getState())}getState(){throw new Error("The state gathering logic is not implemented")}destroy(){this.hot.columnIndexMapper.unregisterMap(this.stateId),this.clearLocalHooks(),(0,i.arrayEach)(this.elements,(e=>e.destroy())),this.state=null,this.elements=null,this.hot=null}}t.BaseComponent=h,(0,r.mixin)(h,l.default)},92620:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n,i=s(o(85707)),r=o(9893),l=o(9175),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=u(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),h=o(49771),c=o(22818);function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(u=function(e){return e?o:t})(e)}function d(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}var g=new WeakSet;class f extends h.BaseComponent{static get BUTTON_OK(){return"ok"}static get BUTTON_CANCEL(){return"cancel"}constructor(e,t){super(e,{id:t.id,stateless:!0}),d(this,g),(0,i.default)(this,"name",""),this.name=t.name,this.elements.push(new c.InputUI(this.hot,{type:"button",value:a.FILTERS_BUTTONS_OK,className:"htUIButton htUIButtonOK",identifier:f.BUTTON_OK})),this.elements.push(new c.InputUI(this.hot,{type:"button",value:a.FILTERS_BUTTONS_CANCEL,className:"htUIButton htUIButtonCancel",identifier:f.BUTTON_CANCEL})),this.registerHooks()}registerHooks(){(0,l.arrayEach)(this.elements,(e=>{e.addLocalHook("click",((e,t)=>function(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}(g,this,p).call(this,e,t)))}))}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t)=>((0,r.addClass)(t.parentNode,"htFiltersMenuActionBar"),(0,l.arrayEach)(this.elements,(e=>t.appendChild(e.element))),t)}}accept(){this.runLocalHooks("accept")}cancel(){this.runLocalHooks("cancel")}}function p(e,t){t.options.identifier===n.BUTTON_OK?this.accept():this.cancel()}t.ActionBarComponent=f,n=f},93138:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(9893),r=o(79729),l=o(9175),a=o(71257),h=o(13911),c=w(o(50884)),u=o(49771),d=w(o(60226)),g=o(22818),f=o(92384),p=o(2048);function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(m=function(e){return e?o:t})(e)}function w(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=m(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}function C(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function v(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var y=new WeakSet;class E extends u.BaseComponent{constructor(e,t){super(e,{id:t.id,stateless:!1}),C(this,y),(0,n.default)(this,"name",""),(0,n.default)(this,"addSeparator",!1),this.name=t.name,this.addSeparator=t.addSeparator,this.elements.push(new f.SelectUI(this.hot,{menuContainer:t.menuContainer})),this.elements.push(new g.InputUI(this.hot,{placeholder:c.FILTERS_BUTTONS_PLACEHOLDER_VALUE})),this.elements.push(new g.InputUI(this.hot,{placeholder:c.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE})),this.registerHooks()}registerHooks(){this.getSelectElement().addLocalHook("select",(e=>v(y,this,S).call(this,e))).addLocalHook("afterClose",(()=>this.runLocalHooks("afterClose"))).addLocalHook("tabKeydown",(e=>this.runLocalHooks("selectTabKeydown",e))),(0,l.arrayEach)(this.getInputElements(),(e=>{e.addLocalHook("keydown",(e=>v(y,this,R).call(this,e)))}))}setState(e){if(this.reset(),!e)return;const t=(0,h.clone)(e.command);t.name.startsWith(c.FILTERS_CONDITIONS_NAMESPACE)&&(t.name=this.hot.getTranslatedPhrase(t.name)),this.getSelectElement().setValue(t),(0,l.arrayEach)(e.args,((e,o)=>{if(o>t.inputsCount-1)return!1;const s=this.getInputElement(o);s.setValue(e),s[t.inputsCount>o?"show":"hide"](),o||this.hot._registerTimeout((()=>s.focus()),10)}))}getState(){const e=this.getSelectElement().getValue()||(0,p.getConditionDescriptor)(d.CONDITION_NONE),t=[];return(0,l.arrayEach)(this.getInputElements(),((o,s)=>{e.inputsCount>s&&t.push(o.getValue())})),{command:e,args:t}}updateState(e,t){const o=e?(0,p.getConditionDescriptor)(e.name):(0,p.getConditionDescriptor)(d.CONDITION_NONE);this.state.setValueAtIndex(t,{command:o,args:e?e.args:[]}),e||(0,l.arrayEach)(this.getInputElements(),(e=>e.setValue(null)))}getSelectElement(){return this.elements.filter((e=>e instanceof f.SelectUI))[0]}getInputElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.getInputElements()[e]}getInputElements(){return this.elements.filter((e=>e instanceof g.InputUI))}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t,o,s,n,r)=>{(0,i.addClass)(t.parentNode,"htFiltersMenuCondition"),this.addSeparator&&(0,i.addClass)(t.parentNode,"border");const a=this.hot.rootDocument.createElement("div");return(0,i.addClass)(a,"htFiltersMenuLabel"),a.textContent=r,t.appendChild(a),t.parentElement.hasAttribute("ghost-table")||(0,l.arrayEach)(this.elements,(e=>t.appendChild(e.element))),t}}}reset(){const e=this.hot.getPlugin("filters").getSelectedColumn();let t=[(0,p.getConditionDescriptor)(d.CONDITION_NONE)];if(null!==e){const{visualIndex:o}=e;t=(0,d.default)(this.hot.getDataType(0,o,this.hot.countRows(),o))}(0,l.arrayEach)(this.getInputElements(),(e=>e.hide())),this.getSelectElement().setItems(t),super.reset(),this.getSelectElement().setValue(t[0])}}function S(e){(0,l.arrayEach)(this.getInputElements(),((t,o)=>{t[e.inputsCount>o?"show":"hide"](),0===o&&this.hot._registerTimeout((()=>t.focus()),10)})),this.runLocalHooks("change",e)}function R(e){(0,a.isKey)(e.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),(0,r.stopImmediatePropagation)(e))}t.ConditionComponent=E},91022:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(9893),r=o(9175),l=o(28927),a=o(49771),h=o(36057),c=o(64709),u=o(75469),d=o(21106),g=o(66733);function f(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}var p=new WeakSet;class m extends a.BaseComponent{constructor(e,t){super(e,{id:t.id,stateless:!1}),f(this,p),(0,n.default)(this,"name",""),this.name=t.name,this.buildOperatorsElement()}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t)=>((0,i.addClass)(t.parentNode,"htFiltersMenuOperators"),(0,r.arrayEach)(this.elements,(e=>t.appendChild(e.element))),t)}}buildOperatorsElement(){const e=[c.OPERATION_ID,u.OPERATION_ID];(0,r.arrayEach)(e,(t=>{const o=new g.RadioInputUI(this.hot,{name:"operator",label:{htmlFor:t,textContent:(0,h.getOperationName)(t)},value:t,checked:t===e[0],id:t});o.addLocalHook("change",(e=>function(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}(p,this,w).call(this,e))),this.elements.push(o)}))}setChecked(e){if(this.elements.length<e)throw Error(l.toSingleLine`Radio button with index ${e} doesn't exist.`);(0,r.arrayEach)(this.elements,((t,o)=>{t.setChecked(o===e)}))}getActiveOperationId(){const e=this.elements.find((e=>e instanceof g.RadioInputUI&&e.isChecked()));return e?e.getValue():c.OPERATION_ID}getState(){return this.getActiveOperationId()}setState(e){this.reset(),e&&this.getActiveOperationId()!==e&&(0,r.arrayEach)(this.elements,(t=>{t.setChecked(t.getValue()===e)}))}updateState(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c.OPERATION_ID,t=arguments.length>1?arguments[1]:void 0,o=e;o===d.OPERATION_ID&&(o=u.OPERATION_ID),this.state.setValueAtIndex(t,o)}reset(){this.setChecked(0)}}function w(e){this.setState(e.target.value)}t.OperatorsComponent=m},64166:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(9893),r=o(79729),l=o(9175),a=o(71257),h=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=m(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),c=o(23674),u=o(49771),d=o(44068),g=o(60226),f=o(2048),p=o(89760);function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(m=function(e){return e?o:t})(e)}function w(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function C(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var v=new WeakSet;class y extends u.BaseComponent{constructor(e,t){super(e,{id:t.id,stateless:!1}),w(this,v),(0,n.default)(this,"name",""),this.name=t.name,this.elements.push(new d.MultipleSelectUI(this.hot)),this.registerHooks()}registerHooks(){this.getMultipleSelectElement().addLocalHook("keydown",(e=>C(v,this,E).call(this,e))).addLocalHook("listTabKeydown",(e=>this.runLocalHooks("listTabKeydown",e))),this.hot.addHook("modifyFiltersMultiSelectValue",((e,t)=>C(v,this,R).call(this,e,t)))}getElements(){const e=this.getMultipleSelectElement();return[e.getSearchInputElement(),e.getSelectAllElement(),e.getClearAllElement(),this.getMultipleSelectElement()]}setState(e){if(this.reset(),e&&e.command.key===g.CONDITION_BY_VALUE){const t=this.getMultipleSelectElement();t.setItems(e.itemsSnapshot),t.setValue(e.args[0]),t.setLocale(e.locale)}}getState(){const e=this.getMultipleSelectElement(),t=e.getItems();return{command:{key:e.isSelectedAllValues()||!t.length?g.CONDITION_NONE:g.CONDITION_BY_VALUE},args:[e.getValue()],itemsSnapshot:t}}updateState(e){const t=(t,o,s,n,i)=>{const[r]=(0,l.arrayFilter)(o,(e=>e.name===g.CONDITION_BY_VALUE)),a={},u=this.hot.getTranslatedPhrase(h.FILTERS_VALUES_BLANK_CELLS);if(r){const o=n(t,i),h=(0,l.arrayMap)(o,(e=>e.value)),d=new Map(o.map((e=>[e.value,this.hot.getCellMeta(e.meta.visualRow,e.meta.visualCol)]))),p=(0,c.unifyColumnValues)(h);s&&(r.args[0]=s);const m=[],w=(0,c.intersectValues)(p,r.args[0],u,(e=>{e.checked&&m.push(e.value),C(v,this,S).call(this,e,d)})),y=e.editedConditionStack.column;a.locale=this.hot.getCellMeta(0,y).locale,a.args=[m],a.command=(0,f.getConditionDescriptor)(g.CONDITION_BY_VALUE),a.itemsSnapshot=w}else a.args=[],a.command=(0,f.getConditionDescriptor)(g.CONDITION_NONE);this.state.setValueAtIndex(t,a)};t(e.editedConditionStack.column,e.editedConditionStack.conditions,e.conditionArgsChange,e.filteredRowsFactory),e.dependentConditionStacks.length&&t(e.dependentConditionStacks[0].column,e.dependentConditionStacks[0].conditions,e.conditionArgsChange,e.filteredRowsFactory,e.editedConditionStack)}getMultipleSelectElement(){return this.elements.filter((e=>e instanceof d.MultipleSelectUI))[0]}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t,o,s,n,r)=>{(0,i.addClass)(t.parentNode,"htFiltersMenuValue");const a=this.hot.rootDocument.createElement("div");return(0,i.addClass)(a,"htFiltersMenuLabel"),a.textContent=r,t.appendChild(a),t.parentElement.hasAttribute("ghost-table")||(0,l.arrayEach)(this.elements,(e=>t.appendChild(e.element))),t}}}reset(){const e=this.hot.getTranslatedPhrase(h.FILTERS_VALUES_BLANK_CELLS),t=this._getColumnVisibleValues(),o=t.map((e=>e.value)),s=new Map(t.map((e=>[e.value,e.meta]))),n=(0,c.unifyColumnValues)(o),i=(0,c.intersectValues)(n,n,e,(e=>{C(v,this,S).call(this,e,s)}));this.getMultipleSelectElement().setItems(i),super.reset(),this.getMultipleSelectElement().setValue(n);const r=this.hot.getPlugin("filters").getSelectedColumn();null!==r&&this.getMultipleSelectElement().setLocale(this.hot.getCellMeta(0,r.visualIndex).locale)}_getColumnVisibleValues(){const e=this.hot.getPlugin("filters").getSelectedColumn();return null===e?[]:(0,l.arrayMap)(this.hot.getDataAtCol(e.visualIndex),((t,o)=>({value:(0,c.toEmptyString)(t),meta:this.hot.getCellMeta(o,e.visualIndex)})))}}function E(e){(0,a.isKey)(e.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),(0,r.stopImmediatePropagation)(e))}function S(e,t){this.hot.hasHook("modifyFiltersMultiSelectValue")&&(e.visualValue=this.hot.runHooks("modifyFiltersMultiSelectValue",e.visualValue,t.get(e.value)))}function R(e,t){return"numeric"===t.type?(0,p.getRenderedValue)(e,t):e}t.ValueComponent=y},88323:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=a;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(38893),i=o(2048);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const l=t.CONDITION_NAME="begins_with";function a(e,t){let[o]=t;return(0,n.stringify)(e.value).toLocaleLowerCase(e.meta.locale).startsWith((0,n.stringify)(o))}(0,i.registerCondition)(l,a,{name:s.FILTERS_CONDITIONS_BEGINS_WITH,inputsCount:1,showOperators:!0})},54789:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=h;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=l(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(2048),i=o(39712),r=o(5667);function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(l=function(e){return e?o:t})(e)}const a=t.CONDITION_NAME="between";function h(e,t){let[o,s]=t,l=o,a=s;if("numeric"===e.meta.type){const e=parseFloat(l,10),t=parseFloat(a,10);l=Math.min(e,t),a=Math.max(e,t)}else if("date"===e.meta.type){const t=(0,n.getCondition)(r.CONDITION_NAME,[a]),o=(0,n.getCondition)(i.CONDITION_NAME,[l]);return t(e)&&o(e)}return e.value>=l&&e.value<=a}(0,n.registerCondition)(a,h,{name:s.FILTERS_CONDITIONS_BETWEEN,inputsCount:2,showOperators:!0})},63039:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=r;var s=o(2048),n=o(23674);const i=t.CONDITION_NAME="by_value";function r(e,t){let[o]=t;return o(e.value)}(0,s.registerCondition)(i,r,{name:"By value",inputsCount:0,inputValuesDecorator(e){let[t]=e;return[(0,n.createArrayAssertion)(t)]},showOperators:!1})},32204:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=a;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(38893),i=o(2048);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const l=t.CONDITION_NAME="contains";function a(e,t){let[o]=t;return(0,n.stringify)(e.value).toLocaleLowerCase(e.meta.locale).indexOf((0,n.stringify)(o))>=0}(0,i.registerCondition)(l,a,{name:s.FILTERS_CONDITIONS_CONTAINS,inputsCount:1,showOperators:!0})},39712:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.condition=h;var n=s(o(86798)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=l(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),r=o(2048);function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(l=function(e){return e?o:t})(e)}const a=t.CONDITION_NAME="date_after";function h(e,t){let[o]=t;const s=(0,n.default)(e.value,e.meta.dateFormat),i=(0,n.default)(o,e.meta.dateFormat);return!(!s.isValid()||!i.isValid())&&s.diff(i)>=0}(0,r.registerCondition)(a,h,{name:i.FILTERS_CONDITIONS_AFTER,inputsCount:1,showOperators:!0})},5667:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.condition=h;var n=s(o(86798)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=l(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),r=o(2048);function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(l=function(e){return e?o:t})(e)}const a=t.CONDITION_NAME="date_before";function h(e,t){let[o]=t;const s=(0,n.default)(e.value,e.meta.dateFormat),i=(0,n.default)(o,e.meta.dateFormat);return!(!s.isValid()||!i.isValid())&&s.diff(i)<=0}(0,r.registerCondition)(a,h,{name:i.FILTERS_CONDITIONS_BEFORE,inputsCount:1,showOperators:!0})},75139:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.condition=h;var n=s(o(86798)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=l(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),r=o(2048);function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(l=function(e){return e?o:t})(e)}const a=t.CONDITION_NAME="date_today";function h(e){const t=(0,n.default)(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame((0,n.default)().startOf("day"),"d")}(0,r.registerCondition)(a,h,{name:i.FILTERS_CONDITIONS_TODAY,inputsCount:0})},62411:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.condition=h;var n=s(o(86798)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=l(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),r=o(2048);function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(l=function(e){return e?o:t})(e)}const a=t.CONDITION_NAME="date_tomorrow";function h(e){const t=(0,n.default)(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame((0,n.default)().subtract(-1,"days").startOf("day"),"d")}(0,r.registerCondition)(a,h,{name:i.FILTERS_CONDITIONS_TOMORROW,inputsCount:0})},64778:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.condition=h;var n=s(o(86798)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=l(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),r=o(2048);function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(l=function(e){return e?o:t})(e)}const a=t.CONDITION_NAME="date_yesterday";function h(e){const t=(0,n.default)(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame((0,n.default)().subtract(1,"days").startOf("day"),"d")}(0,r.registerCondition)(a,h,{name:i.FILTERS_CONDITIONS_YESTERDAY,inputsCount:0})},9780:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=a;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(2048),i=o(38893);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const l=t.CONDITION_NAME="empty";function a(e){return(0,i.isEmpty)(e.value)}(0,n.registerCondition)(l,a,{name:s.FILTERS_CONDITIONS_EMPTY,inputsCount:0,showOperators:!0})},9931:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=a;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(38893),i=o(2048);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const l=t.CONDITION_NAME="ends_with";function a(e,t){let[o]=t;return(0,n.stringify)(e.value).toLocaleLowerCase(e.meta.locale).endsWith((0,n.stringify)(o))}(0,i.registerCondition)(l,a,{name:s.FILTERS_CONDITIONS_ENDS_WITH,inputsCount:1,showOperators:!0})},77649:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=a;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(38893),i=o(2048);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const l=t.CONDITION_NAME="eq";function a(e,t){let[o]=t;return(0,n.stringify)(e.value).toLocaleLowerCase(e.meta.locale)===(0,n.stringify)(o)}(0,i.registerCondition)(l,a,{name:s.FILTERS_CONDITIONS_EQUAL,inputsCount:1,showOperators:!0})},24498:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=i;var s=o(2048);const n=t.CONDITION_NAME="false";function i(){return!1}(0,s.registerCondition)(n,i,{name:"False"})},34808:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=l;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(2048);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}const r=t.CONDITION_NAME="gt";function l(e,t){let[o]=t,s=o;return"numeric"===e.meta.type&&(s=parseFloat(s,10)),e.value>s}(0,n.registerCondition)(r,l,{name:s.FILTERS_CONDITIONS_GREATER_THAN,inputsCount:1,showOperators:!0})},25001:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=l;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(2048);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}const r=t.CONDITION_NAME="gte";function l(e,t){let[o]=t,s=o;return"numeric"===e.meta.type&&(s=parseFloat(s,10)),e.value>=s}(0,n.registerCondition)(r,l,{name:s.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL,inputsCount:1,showOperators:!0})},38979:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=l;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(2048);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}const r=t.CONDITION_NAME="lt";function l(e,t){let[o]=t,s=o;return"numeric"===e.meta.type&&(s=parseFloat(s,10)),e.value<s}(0,n.registerCondition)(r,l,{name:s.FILTERS_CONDITIONS_LESS_THAN,inputsCount:1,showOperators:!0})},80744:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=l;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(2048);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}const r=t.CONDITION_NAME="lte";function l(e,t){let[o]=t,s=o;return"numeric"===e.meta.type&&(s=parseFloat(s,10)),e.value<=s}(0,n.registerCondition)(r,l,{name:s.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL,inputsCount:1,showOperators:!0})},64263:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=l;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(2048);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}const r=t.CONDITION_NAME="none";function l(){return!0}(0,n.registerCondition)(r,l,{name:s.FILTERS_CONDITIONS_NONE,inputsCount:0,showOperators:!1})},14722:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=a;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(2048),i=o(54789);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const l=t.CONDITION_NAME="not_between";function a(e,t){return!(0,n.getCondition)(i.CONDITION_NAME,t)(e)}(0,n.registerCondition)(l,a,{name:s.FILTERS_CONDITIONS_NOT_BETWEEN,inputsCount:2,showOperators:!0})},51838:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=a;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(2048),i=o(32204);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const l=t.CONDITION_NAME="not_contains";function a(e,t){return!(0,n.getCondition)(i.CONDITION_NAME,t)(e)}(0,n.registerCondition)(l,a,{name:s.FILTERS_CONDITIONS_NOT_CONTAIN,inputsCount:1,showOperators:!0})},31539:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=a;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(2048),i=o(9780);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const l=t.CONDITION_NAME="not_empty";function a(e,t){return!(0,n.getCondition)(i.CONDITION_NAME,t)(e)}(0,n.registerCondition)(l,a,{name:s.FILTERS_CONDITIONS_NOT_EMPTY,inputsCount:0,showOperators:!0})},72998:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=a;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(2048),i=o(77649);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const l=t.CONDITION_NAME="neq";function a(e,t){return!(0,n.getCondition)(i.CONDITION_NAME,t)(e)}(0,n.registerCondition)(l,a,{name:s.FILTERS_CONDITIONS_NOT_EQUAL,inputsCount:1,showOperators:!0})},51105:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=i;var s=o(2048);const n=t.CONDITION_NAME="true";function i(){return!0}(0,s.registerCondition)(n,i,{name:"True"})},3158:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(9175),r=o(13911),l=o(28927),a=s(o(63870)),h=o(2048),c=o(64709),u=o(36057),d=o(38893),g=o(93969);const f="ConditionCollection.filteringStates";class p{constructor(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];(0,n.default)(this,"hot",void 0),(0,n.default)(this,"isMapRegistrable",void 0),(0,n.default)(this,"filteringStates",new g.LinkedPhysicalIndexToValueMap),(0,n.default)(this,"previousConditionStack",null),this.hot=e,this.isMapRegistrable=t,!0===this.isMapRegistrable?this.hot.columnIndexMapper.registerMap(f,this.filteringStates):this.filteringStates.init(this.hot.columnIndexMapper.getNumberOfIndexes())}isEmpty(){return 0===this.getFilteredColumns().length}isMatch(e,t){var o;const s=this.filteringStates.getValueAtIndex(t),n=null!==(o=null==s?void 0:s.conditions)&&void 0!==o?o:[],i=null==s?void 0:s.operation;return this.isMatchInConditions(n,e,i)}isMatchInConditions(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c.OPERATION_ID;return!e.length||(0,u.getOperationFunc)(o)(e,t)}addCondition(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c.OPERATION_ID,s=arguments.length>3?arguments[3]:void 0;const n=this.hot.getCellMeta(0,e).locale,r=(0,i.arrayMap)(t.args,(e=>"string"==typeof e?e.toLocaleLowerCase(n):e)),a=t.name||t.command.key;null===this.previousConditionStack&&this.setPreviousConditionStack(this.exportAllConditions()),this.runLocalHooks("beforeAdd",e);const g=this.getOperation(e);if(g){if(g!==o)throw Error(l.toSingleLine`The column of index ${e} has been already applied with a \`${g}\`\x20
68
68
  filter operation. Use \`removeConditions\` to clear the current conditions and then add new ones.\x20
69
69
  Mind that you cannot mix different types of operations (for instance, if you use \`conjunction\`,\x20
70
70
  use it consequently for a particular column).`)}else if((0,d.isUndefined)(u.operations[o]))throw new Error(l.toSingleLine`Unexpected operation named \`${o}\`. Possible ones are\x20
71
- \`disjunction\` and \`conjunction\`.`);const f=this.getConditions(e);0===f.length?this.filteringStates.setValueAtIndex(e,{operation:o,conditions:[{name:a,args:r,func:(0,h.getCondition)(a,r)}]},s):f.push({name:a,args:r,func:(0,h.getCondition)(a,r)}),this.runLocalHooks("afterAdd",e)}getConditions(e){var t,o;return null!==(t=null===(o=this.filteringStates.getValueAtIndex(e))||void 0===o?void 0:o.conditions)&&void 0!==t?t:[]}getOperation(e){var t;return null===(t=this.filteringStates.getValueAtIndex(e))||void 0===t?void 0:t.operation}getFilteredColumns(){return this.filteringStates.getEntries().map((e=>{let[t]=e;return t}))}getColumnStackPosition(e){return this.getFilteredColumns().indexOf(e)}exportAllConditions(){return(0,i.arrayReduce)(this.filteringStates.getEntries(),((e,t)=>{let[o,{operation:s,conditions:n}]=t;return e.push({column:o,operation:s,conditions:(0,i.arrayMap)(n,(e=>{let{name:t,args:o}=e;return{name:t,args:o}}))}),e}),[])}importAllConditions(e){this.clean(),(0,i.arrayEach)(e,(e=>{(0,i.arrayEach)(e.conditions,(t=>this.addCondition(e.column,t)))}))}removeConditions(e){this.setPreviousConditionStack(this.exportAllConditions()),this.runLocalHooks("beforeRemove",e),this.filteringStates.clearValue(e),this.runLocalHooks("afterRemove",e)}clean(){this.runLocalHooks("beforeClean"),this.filteringStates.clear(),this.runLocalHooks("afterClean")}hasConditions(e,t){const o=this.getConditions(e);return t?o.some((e=>e.name===t)):o.length>0}setPreviousConditionStack(e){this.previousConditionStack=e}destroy(){this.isMapRegistrable&&this.hot.columnIndexMapper.unregisterMap(f),this.filteringStates=null,this.clearLocalHooks()}}(0,r.mixin)(p,a.default);t.default=p},2048:(e,t,o)=>{"use strict";t.__esModule=!0,t.getCondition=function(e,t){if(!s[e])throw Error(`Filter condition "${e}" does not exist.`);const{condition:o,descriptor:n}=s[e];let i=t;n.inputValuesDecorator&&(i=n.inputValuesDecorator(i));return function(e){return o.apply(e.meta.instance,[].concat([e],[i]))}},t.getConditionDescriptor=function(e){if(!s[e])throw Error(`Filter condition "${e}" does not exist.`);return s[e].descriptor},t.registerCondition=function(e,t,o){o.key=e,s[e]={condition:t,descriptor:o}},o(67834);const s=t.conditions={}},66901:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(9175),r=o(13911),l=o(78832),a=s(o(63870)),h=s(o(3158)),c=s(o(91257)),u=o(23674);function d(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function g(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var f=new WeakSet;class p{constructor(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>[];d(this,f),(0,n.default)(this,"hot",void 0),(0,n.default)(this,"conditionCollection",void 0),(0,n.default)(this,"columnDataFactory",void 0),(0,n.default)(this,"changes",[]),(0,n.default)(this,"grouping",!1),(0,n.default)(this,"latestEditedColumnPosition",-1),(0,n.default)(this,"latestOrderStack",[]),this.hot=e,this.conditionCollection=t,this.columnDataFactory=o,this.conditionCollection.addLocalHook("beforeRemove",(e=>g(f,this,m).call(this,e))),this.conditionCollection.addLocalHook("afterRemove",(e=>this.updateStatesAtColumn(e))),this.conditionCollection.addLocalHook("afterAdd",(e=>this.updateStatesAtColumn(e))),this.conditionCollection.addLocalHook("beforeClean",(()=>g(f,this,w).call(this))),this.conditionCollection.addLocalHook("afterClean",(()=>g(f,this,C).call(this)))}groupChanges(){this.grouping=!0}flush(){this.grouping=!1,(0,i.arrayEach)(this.changes,(e=>{this.updateStatesAtColumn(e)})),this.changes.length=0}updateStatesAtColumn(e,t){var o=this;if(this.grouping)return void(-1===this.changes.indexOf(e)&&this.changes.push(e));const s=this.conditionCollection.exportAllConditions();let n=this.conditionCollection.getColumnStackPosition(e);-1===n&&(n=this.latestEditedColumnPosition);const r=s.slice(0,n),a=s.slice(n);a.length&&a[0].column===e&&a.shift();const d=(0,l.curry)((function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const n=new h.default(o.hot,!1),r=[].concat(e,s);n.importAllConditions(r);const l=o.columnDataFactory(t);let a;a=n.isEmpty()?l:new c.default(n,(e=>o.columnDataFactory(e))).filter(),a=(0,i.arrayMap)(a,(e=>e.meta.visualRow));const d=(0,u.createArrayAssertion)(a);return n.destroy(),(0,i.arrayFilter)(l,(e=>d(e.meta.visualRow)))}))(r),g=[].concat(this.conditionCollection.getConditions(e));this.runLocalHooks("update",{editedConditionStack:{column:e,conditions:g},dependentConditionStacks:a,filteredRowsFactory:d,conditionArgsChange:t})}destroy(){this.clearLocalHooks(),(0,r.objectEach)(this,((e,t)=>{this[t]=null}))}}function m(e){this.latestEditedColumnPosition=this.conditionCollection.getColumnStackPosition(e)}function w(){this.latestOrderStack=this.conditionCollection.getFilteredColumns()}function C(){(0,i.arrayEach)(this.latestOrderStack,(e=>{this.updateStatesAtColumn(e)}))}(0,r.mixin)(p,a.default);t.default=p},60226:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=[];let o=e;L[o]||(o=H);return(0,n.arrayEach)(L[o],(e=>{let o;o=e===i.SEPARATOR?{name:i.SEPARATOR}:(0,s.clone)((0,r.getConditionDescriptor)(e)),t.push(o)})),t},o(15724);var s=o(13911),n=o(9175),i=o(58653),r=o(2048),l=o(64263);t.CONDITION_NONE=l.CONDITION_NAME;var a=o(9780);t.CONDITION_EMPTY=a.CONDITION_NAME;var h=o(31539);t.CONDITION_NOT_EMPTY=h.CONDITION_NAME;var c=o(77649);t.CONDITION_EQUAL=c.CONDITION_NAME;var u=o(72998);t.CONDITION_NOT_EQUAL=u.CONDITION_NAME;var d=o(34808);t.CONDITION_GREATER_THAN=d.CONDITION_NAME;var g=o(25001);t.CONDITION_GREATER_THAN_OR_EQUAL=g.CONDITION_NAME;var f=o(38979);t.CONDITION_LESS_THAN=f.CONDITION_NAME;var p=o(80744);t.CONDITION_LESS_THAN_OR_EQUAL=p.CONDITION_NAME;var m=o(54789);t.CONDITION_BETWEEN=m.CONDITION_NAME;var w=o(14722);t.CONDITION_NOT_BETWEEN=w.CONDITION_NAME;var C=o(88323);t.CONDITION_BEGINS_WITH=C.CONDITION_NAME;var v=o(9931);t.CONDITION_ENDS_WITH=v.CONDITION_NAME;var y=o(32204);t.CONDITION_CONTAINS=y.CONDITION_NAME;var E=o(51838);t.CONDITION_NOT_CONTAINS=E.CONDITION_NAME;var S=o(5667);t.CONDITION_DATE_BEFORE=S.CONDITION_NAME;var R=o(39712);t.CONDITION_DATE_AFTER=R.CONDITION_NAME;var b=o(62411);t.CONDITION_TOMORROW=b.CONDITION_NAME;var _=o(75139);t.CONDITION_TODAY=_.CONDITION_NAME;var T=o(64778);t.CONDITION_YESTERDAY=T.CONDITION_NAME;var M=o(63039);t.CONDITION_BY_VALUE=M.CONDITION_NAME;var O=o(51105);t.CONDITION_TRUE=O.CONDITION_NAME;var I=o(24498);t.CONDITION_FALSE=I.CONDITION_NAME;var N=o(64709);t.OPERATION_AND=N.OPERATION_ID;var A=o(75469);t.OPERATION_OR=A.OPERATION_ID;var P=o(21106);t.OPERATION_OR_THEN_VARIABLE=P.OPERATION_ID;const x=t.TYPE_NUMERIC="numeric",H=t.TYPE_TEXT="text",D=t.TYPE_DATE="date",L=t.TYPES={[x]:[l.CONDITION_NAME,i.SEPARATOR,a.CONDITION_NAME,h.CONDITION_NAME,i.SEPARATOR,c.CONDITION_NAME,u.CONDITION_NAME,i.SEPARATOR,d.CONDITION_NAME,g.CONDITION_NAME,f.CONDITION_NAME,p.CONDITION_NAME,m.CONDITION_NAME,w.CONDITION_NAME],[H]:[l.CONDITION_NAME,i.SEPARATOR,a.CONDITION_NAME,h.CONDITION_NAME,i.SEPARATOR,c.CONDITION_NAME,u.CONDITION_NAME,i.SEPARATOR,C.CONDITION_NAME,v.CONDITION_NAME,i.SEPARATOR,y.CONDITION_NAME,E.CONDITION_NAME],[D]:[l.CONDITION_NAME,i.SEPARATOR,a.CONDITION_NAME,h.CONDITION_NAME,i.SEPARATOR,c.CONDITION_NAME,u.CONDITION_NAME,i.SEPARATOR,S.CONDITION_NAME,R.CONDITION_NAME,m.CONDITION_NAME,i.SEPARATOR,b.CONDITION_NAME,_.CONDITION_NAME,T.CONDITION_NAME]}},91257:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(15724);var n=s(o(85707)),i=o(9175);t.default=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>[];(0,n.default)(this,"conditionCollection",void 0),(0,n.default)(this,"columnDataFactory",void 0),this.conditionCollection=e,this.columnDataFactory=t}filter(){let e=[];return(0,i.arrayEach)(this.conditionCollection.getFilteredColumns(),((t,o)=>{let s=this.columnDataFactory(t);o&&(s=this._getIntersectData(s,e)),e=this.filterByColumn(t,s)})),e}filterByColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const o=[];return(0,i.arrayEach)(t,(t=>{void 0!==t&&this.conditionCollection.isMatch(t,e)&&o.push(t)})),o}_getIntersectData(e,t){const o=[];return(0,i.arrayEach)(t,(t=>{const s=t.meta.visualRow;void 0!==e[s]&&(o[s]=e[s])})),o}}},72100:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724),o(25352);var n=s(o(85707)),i=o(61205),r=o(9175),l=o(28927),a=o(83119),h=o(87485),c=o(9893),u=o(71257),d=o(58653),g=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=_(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),f=o(93138),p=o(91022),m=o(64166),w=o(92620),C=s(o(3158)),v=s(o(91257)),y=s(o(66901)),E=o(23674),S=o(2947),R=o(60226),b=o(93969);function _(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(_=function(e){return e?o:t})(e)}function T(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function M(e,t){return e.get(O(e,t))}function O(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}o(72039);const I=t.PLUGIN_KEY="filters",N=t.PLUGIN_PRIORITY=250,A=I;var P=new WeakMap,x=new WeakSet;class H extends i.BasePlugin{static get PLUGIN_KEY(){return I}static get PLUGIN_PRIORITY(){return N}static get PLUGIN_DEPS(){return["plugin:DropdownMenu","plugin:HiddenRows","cell-type:checkbox"]}constructor(e){var t,o;super(e),T(t=this,o=x),o.add(t),(0,n.default)(this,"dropdownMenuPlugin",null),(0,n.default)(this,"conditionCollection",null),(0,n.default)(this,"conditionUpdateObserver",null),(0,n.default)(this,"components",new Map([["filter_by_condition",null],["filter_operators",null],["filter_by_condition2",null],["filter_by_value",null],["filter_action_bar",null]])),(0,n.default)(this,"filtersRowsMap",null),function(e,t,o){T(e,t),t.set(e,o)}(this,P,void 0),this.hot.addHook("afterGetColHeader",((e,t)=>O(x,this,U).call(this,e,t)))}isEnabled(){return!!this.hot.getSettings()[I]}enablePlugin(){if(this.enabled)return;this.filtersRowsMap=this.hot.rowIndexMapper.registerMap(this.pluginName,new b.TrimmingMap),this.dropdownMenuPlugin=this.hot.getPlugin("dropdownMenu");const e=this.hot.getSettings().dropdownMenu,t=e&&e.uiContainer||this.hot.rootDocument.body,o=e=>(e.addLocalHook("accept",(()=>O(x,this,F).call(this,"accept"))),e.addLocalHook("cancel",(()=>O(x,this,F).call(this,"cancel"))),e.addLocalHook("change",(t=>O(x,this,W).call(this,e,t))),e),s=()=>`${this.hot.getTranslatedPhrase(g.FILTERS_DIVS_FILTER_BY_CONDITION)}:`,n=()=>`${this.hot.getTranslatedPhrase(g.FILTERS_DIVS_FILTER_BY_VALUE)}:`;if(!this.components.get("filter_by_condition")){const e=new f.ConditionComponent(this.hot,{id:"filter_by_condition",name:s,addSeparator:!1,menuContainer:t});e.addLocalHook("afterClose",(()=>O(x,this,B).call(this))),this.components.set("filter_by_condition",o(e))}if(this.components.get("filter_operators")||this.components.set("filter_operators",new p.OperatorsComponent(this.hot,{id:"filter_operators",name:"Operators"})),!this.components.get("filter_by_condition2")){const e=new f.ConditionComponent(this.hot,{id:"filter_by_condition2",name:"",addSeparator:!0,menuContainer:t});e.addLocalHook("afterClose",(()=>O(x,this,B).call(this))),this.components.set("filter_by_condition2",o(e))}if(this.components.get("filter_by_value")||this.components.set("filter_by_value",o(new m.ValueComponent(this.hot,{id:"filter_by_value",name:n}))),this.components.get("filter_action_bar")||this.components.set("filter_action_bar",o(new w.ActionBarComponent(this.hot,{id:"filter_action_bar",name:"Action bar"}))),this.conditionCollection||(this.conditionCollection=new C.default(this.hot)),this.conditionUpdateObserver||(this.conditionUpdateObserver=new y.default(this.hot,this.conditionCollection,(e=>this.getDataMapAtColumn(e))),this.conditionUpdateObserver.addLocalHook("update",(e=>O(x,this,j).call(this,e)))),this.components.forEach((e=>e.show())),this.addHook("afterDropdownMenuDefaultOptions",(e=>O(x,this,V).call(this,e))),this.addHook("afterDropdownMenuShow",(()=>O(x,this,L).call(this))),this.addHook("afterDropdownMenuHide",(()=>O(x,this,k).call(this))),this.addHook("afterChange",(e=>O(x,this,D).call(this,e))),this.hot.getSettings().dropdownMenu&&this.dropdownMenuPlugin&&(this.dropdownMenuPlugin.disablePlugin(),this.dropdownMenuPlugin.enablePlugin()),!M(P,this)&&this.dropdownMenuPlugin.enabled){const e=this.dropdownMenuPlugin.menu,t=[{focus:()=>{const t=e.getNavigator(),o=M(P,this).getLastMenuPage();e.focus(),o>0?t.setCurrentPage(o):t.toFirstItem()}},...Array.from(this.components).map((e=>{let[,t]=e;return t.getElements()})).flat()];i=P,r=this,l=(0,S.createMenuFocusController)(e,t),i.set(O(i,r),l);const o=e=>{M(P,this).listen(),e.preventDefault(),(0,u.isKey)(e.keyCode,"TAB")&&(e.shiftKey?M(P,this).toPreviousItem():M(P,this).toNextItem())};this.components.get("filter_by_value").addLocalHook("listTabKeydown",o),this.components.get("filter_by_condition").addLocalHook("selectTabKeydown",o)}var i,r,l;this.registerShortcuts(),super.enablePlugin()}disablePlugin(){var e;this.enabled&&(null!==(e=this.dropdownMenuPlugin)&&void 0!==e&&e.enabled&&this.dropdownMenuPlugin.menu.clearLocalHooks(),this.components.forEach(((e,t)=>{e.destroy(),this.components.set(t,null)})),this.conditionCollection.destroy(),this.conditionCollection=null,this.hot.rowIndexMapper.unregisterMap(this.pluginName));this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Alt","A"]],stopPropagation:!0,callback:()=>{const e=this.hot.getSelected();this.clearConditions(),this.filter(),e&&this.hot.selectCells(e)},group:A})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(A)}addCondition(e,t,o){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:R.OPERATION_AND;const n=this.hot.toPhysicalColumn(e);this.conditionCollection.addCondition(n,{command:{key:t},args:o},s)}removeConditions(e){const t=this.hot.toPhysicalColumn(e);this.conditionCollection.removeConditions(t)}clearConditions(e){if(void 0===e)this.conditionCollection.clean();else{const t=this.hot.toPhysicalColumn(e);this.conditionCollection.removeConditions(t)}}filter(){const{navigableHeaders:e}=this.hot.getSettings(),t=this._createDataFilter(),o=!this.conditionCollection.isEmpty();let s=[];const n=this.conditionCollection.exportAllConditions();if(!1!==this.hot.runHooks("beforeFilter",n,this.conditionCollection.previousConditionStack))if(o){const o=[];this.hot.batchExecution((()=>{this.filtersRowsMap.clear(),s=(0,r.arrayMap)(t.filter(),(e=>e.meta.visualRow));const e=(0,E.createArrayAssertion)(s);(0,h.rangeEach)(this.hot.countSourceRows()-1,(t=>{e(t)||o.push(t)})),(0,r.arrayEach)(o,(e=>{this.filtersRowsMap.setValueAtIndex(e,!0)}))}),!0),e||s.length||this.hot.deselectCell()}else this.filtersRowsMap.clear();this.hot.runHooks("afterFilter",n),this.conditionCollection.setPreviousConditionStack(null),this.hot.view.adjustElementsSize(),this.hot.render(),this.hot.selection.isSelected()&&this.hot.selectCell(e?-1:0,this.hot.getSelectedRangeLast().highlight.col)}getSelectedColumn(){var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t?{visualIndex:t.col,physicalIndex:this.hot.toPhysicalColumn(t.col)}:null}getDataMapAtColumn(e){const t=this.hot.toVisualColumn(e),o=[];return(0,r.arrayEach)(this.hot.getSourceDataAtCol(t),((e,s)=>{var n;const{row:i,col:r,visualCol:l,visualRow:a,type:h,instance:c,dateFormat:u,locale:d}=this.hot.getCellMeta(s,t),g=null!==(n=this.hot.getDataAtCell(this.hot.toVisualRow(s),t))&&void 0!==n?n:e;o.push({meta:{row:i,col:r,visualCol:l,visualRow:a,type:h,instance:c,dateFormat:u,locale:d},value:(0,E.toEmptyString)(g)})})),o}updateValueComponentCondition(e){const t=this.hot.getDataAtCol(e),o=(0,E.unifyColumnValues)(t);this.conditionUpdateObserver.updateStatesAtColumn(e,o)}restoreComponents(e){var t;const o=null===(t=this.getSelectedColumn())||void 0===t?void 0:t.physicalIndex;e.forEach((e=>{e.isHidden()||e.restoreState(o)})),this.updateDependentComponentsVisibility()}getOperationBasedOnArguments(e,t,o,s){let n=e;return n===R.OPERATION_OR&&t.command.key!==R.CONDITION_NONE&&o.command.key!==R.CONDITION_NONE&&s.command.key!==R.CONDITION_NONE?n=R.OPERATION_OR_THEN_VARIABLE:s.command.key!==R.CONDITION_NONE&&(t.command.key!==R.CONDITION_NONE&&o.command.key!==R.CONDITION_NONE||(n=R.OPERATION_AND)),n}setListeningDropdownMenu(){this.dropdownMenuPlugin&&this.dropdownMenuPlugin.setListening()}updateDependentComponentsVisibility(){const e=this.components.get("filter_by_condition"),{command:t}=e.getState(),o=[this.components.get("filter_by_condition2"),this.components.get("filter_operators")];t.showOperators?this.showComponents(...o):this.hideComponents(...o)}_createDataFilter(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.conditionCollection;return new v.default(e,(e=>this.getDataMapAtColumn(e)))}getIndexesOfComponents(){const e=[];if(!this.dropdownMenuPlugin)return e;const t=this.dropdownMenuPlugin.menu;for(var o=arguments.length,s=new Array(o),n=0;n<o;n++)s[n]=arguments[n];return(0,r.arrayEach)(s,(o=>{(0,r.arrayEach)(t.menuItems,((t,s)=>{t.key===o.getMenuItemDescriptor().key&&e.push(s)}))})),e}changeComponentsVisibility(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this.dropdownMenuPlugin)return;const t=this.dropdownMenuPlugin.menu.hotMenu,o=t.getPlugin("hiddenRows");for(var s=arguments.length,n=new Array(s>1?s-1:0),i=1;i<s;i++)n[i-1]=arguments[i];const r=this.getIndexesOfComponents(...n);e?o.showRows(r):o.hideRows(r),t.render()}hideComponents(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.changeComponentsVisibility(!1,...t)}showComponents(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.changeComponentsVisibility(!0,...t)}destroy(){this.enabled&&(this.components.forEach(((e,t)=>{null!==e&&(e.destroy(),this.components.set(t,null))})),this.conditionCollection.destroy(),this.conditionUpdateObserver.destroy(),this.hot.rowIndexMapper.unregisterMap(this.pluginName)),super.destroy()}}function D(e){e&&(0,r.arrayEach)(e,(e=>{const[,t]=e,o=this.hot.propToCol(t);this.conditionCollection.hasConditions(o)&&this.updateValueComponentCondition(o)}))}function L(){const e=this.dropdownMenuPlugin.menu;this.restoreComponents(Array.from(this.components.values())),e.updateMenuDimensions()}function k(){this.components.get("filter_by_condition").getSelectElement().closeOptions(),this.components.get("filter_by_condition2").getSelectElement().closeOptions()}function V(e){e.items.push({name:d.SEPARATOR}),this.components.forEach((t=>{e.items.push(t.getMenuItemDescriptor())}))}function F(e){var t;if("accept"===e){const e=this.getSelectedColumn();var o;if(null===e)return void(null===(o=this.dropdownMenuPlugin)||void 0===o||o.close());const{physicalIndex:t}=e,s=this.components.get("filter_by_condition").getState(),n=this.components.get("filter_by_condition2").getState(),i=this.components.get("filter_by_value").getState(),r=this.getOperationBasedOnArguments(this.components.get("filter_operators").getActiveOperationId(),s,n,i);this.conditionUpdateObserver.groupChanges();let l=this.conditionCollection.getColumnStackPosition(t);-1===l&&(l=void 0),this.conditionCollection.removeConditions(t),s.command.key!==R.CONDITION_NONE&&(this.conditionCollection.addCondition(t,s,r,l),n.command.key!==R.CONDITION_NONE&&this.conditionCollection.addCondition(t,n,r,l)),i.command.key!==R.CONDITION_NONE&&this.conditionCollection.addCondition(t,i,r,l),this.conditionUpdateObserver.flush(),this.components.forEach((e=>e.saveState(t))),this.filtersRowsMap.clear(),this.filter()}null===(t=this.dropdownMenuPlugin)||void 0===t||t.close()}function W(e,t){this.updateDependentComponentsVisibility(),e.constructor!==f.ConditionComponent||t.inputsCount||this.setListeningDropdownMenu()}function B(){this.setListeningDropdownMenu()}function U(e,t){const o=this.hot.toPhysicalColumn(e);this.enabled&&this.conditionCollection.hasConditions(o)?(0,c.addClass)(t,"htFiltersActive"):(0,c.removeClass)(t,"htFiltersActive")}function j(e){var t;if(null===(t=this.dropdownMenuPlugin)||void 0===t||!t.enabled)return;const{editedConditionStack:{conditions:o,column:s}}=e,n=o.filter((e=>e.name===R.CONDITION_BY_VALUE)),i=o.filter((e=>e.name!==R.CONDITION_BY_VALUE));if(n.length>=2||i.length>=3)(0,a.warn)(l.toSingleLine`The filter conditions have been applied properly, but couldn’t be displayed visually.\x20
71
+ \`disjunction\` and \`conjunction\`.`);const f=this.getConditions(e);0===f.length?this.filteringStates.setValueAtIndex(e,{operation:o,conditions:[{name:a,args:r,func:(0,h.getCondition)(a,r)}]},s):f.push({name:a,args:r,func:(0,h.getCondition)(a,r)}),this.runLocalHooks("afterAdd",e)}getConditions(e){var t,o;return null!==(t=null===(o=this.filteringStates.getValueAtIndex(e))||void 0===o?void 0:o.conditions)&&void 0!==t?t:[]}getOperation(e){var t;return null===(t=this.filteringStates.getValueAtIndex(e))||void 0===t?void 0:t.operation}getFilteredColumns(){return this.filteringStates.getEntries().map((e=>{let[t]=e;return t}))}getColumnStackPosition(e){return this.getFilteredColumns().indexOf(e)}exportAllConditions(){return(0,i.arrayReduce)(this.filteringStates.getEntries(),((e,t)=>{let[o,{operation:s,conditions:n}]=t;return e.push({column:o,operation:s,conditions:(0,i.arrayMap)(n,(e=>{let{name:t,args:o}=e;return{name:t,args:o}}))}),e}),[])}importAllConditions(e){this.clean(),(0,i.arrayEach)(e,(e=>{(0,i.arrayEach)(e.conditions,(t=>this.addCondition(e.column,t)))}))}removeConditions(e){this.setPreviousConditionStack(this.exportAllConditions()),this.runLocalHooks("beforeRemove",e),this.filteringStates.clearValue(e),this.runLocalHooks("afterRemove",e)}clean(){this.runLocalHooks("beforeClean"),this.filteringStates.clear(),this.runLocalHooks("afterClean")}hasConditions(e,t){const o=this.getConditions(e);return t?o.some((e=>e.name===t)):o.length>0}setPreviousConditionStack(e){this.previousConditionStack=e}destroy(){this.isMapRegistrable&&this.hot.columnIndexMapper.unregisterMap(f),this.filteringStates=null,this.clearLocalHooks()}}(0,r.mixin)(p,a.default);t.default=p},2048:(e,t,o)=>{"use strict";t.__esModule=!0,t.getCondition=function(e,t){if(!s[e])throw Error(`Filter condition "${e}" does not exist.`);const{condition:o,descriptor:n}=s[e];let i=t;n.inputValuesDecorator&&(i=n.inputValuesDecorator(i));return function(e){return o.apply(e.meta.instance,[].concat([e],[i]))}},t.getConditionDescriptor=function(e){if(!s[e])throw Error(`Filter condition "${e}" does not exist.`);return s[e].descriptor},t.registerCondition=function(e,t,o){o.key=e,s[e]={condition:t,descriptor:o}},o(67834);const s=t.conditions={}},66901:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(9175),r=o(13911),l=o(78832),a=s(o(63870)),h=s(o(3158)),c=s(o(91257)),u=o(23674);function d(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function g(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var f=new WeakSet;class p{constructor(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>[];d(this,f),(0,n.default)(this,"hot",void 0),(0,n.default)(this,"conditionCollection",void 0),(0,n.default)(this,"columnDataFactory",void 0),(0,n.default)(this,"changes",[]),(0,n.default)(this,"grouping",!1),(0,n.default)(this,"latestEditedColumnPosition",-1),(0,n.default)(this,"latestOrderStack",[]),this.hot=e,this.conditionCollection=t,this.columnDataFactory=o,this.conditionCollection.addLocalHook("beforeRemove",(e=>g(f,this,m).call(this,e))),this.conditionCollection.addLocalHook("afterRemove",(e=>this.updateStatesAtColumn(e))),this.conditionCollection.addLocalHook("afterAdd",(e=>this.updateStatesAtColumn(e))),this.conditionCollection.addLocalHook("beforeClean",(()=>g(f,this,w).call(this))),this.conditionCollection.addLocalHook("afterClean",(()=>g(f,this,C).call(this)))}groupChanges(){this.grouping=!0}flush(){this.grouping=!1,(0,i.arrayEach)(this.changes,(e=>{this.updateStatesAtColumn(e)})),this.changes.length=0}updateStatesAtColumn(e,t){var o=this;if(this.grouping)return void(-1===this.changes.indexOf(e)&&this.changes.push(e));const s=this.conditionCollection.exportAllConditions();let n=this.conditionCollection.getColumnStackPosition(e);-1===n&&(n=this.latestEditedColumnPosition);const r=s.slice(0,n),a=s.slice(n);a.length&&a[0].column===e&&a.shift();const d=(0,l.curry)((function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const n=new h.default(o.hot,!1),r=[].concat(e,s);n.importAllConditions(r);const l=o.columnDataFactory(t);let a;a=n.isEmpty()?l:new c.default(n,(e=>o.columnDataFactory(e))).filter(),a=(0,i.arrayMap)(a,(e=>e.meta.visualRow));const d=(0,u.createArrayAssertion)(a);return n.destroy(),(0,i.arrayFilter)(l,(e=>d(e.meta.visualRow)))}))(r),g=[].concat(this.conditionCollection.getConditions(e));this.runLocalHooks("update",{editedConditionStack:{column:e,conditions:g},dependentConditionStacks:a,filteredRowsFactory:d,conditionArgsChange:t})}destroy(){this.clearLocalHooks(),(0,r.objectEach)(this,((e,t)=>{this[t]=null}))}}function m(e){this.latestEditedColumnPosition=this.conditionCollection.getColumnStackPosition(e)}function w(){this.latestOrderStack=this.conditionCollection.getFilteredColumns()}function C(){(0,i.arrayEach)(this.latestOrderStack,(e=>{this.updateStatesAtColumn(e)}))}(0,r.mixin)(p,a.default);t.default=p},60226:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=[];let o=e;k[o]||(o=H);return(0,n.arrayEach)(k[o],(e=>{let o;o=e===i.SEPARATOR?{name:i.SEPARATOR}:(0,s.clone)((0,r.getConditionDescriptor)(e)),t.push(o)})),t},o(15724);var s=o(13911),n=o(9175),i=o(58653),r=o(2048),l=o(64263);t.CONDITION_NONE=l.CONDITION_NAME;var a=o(9780);t.CONDITION_EMPTY=a.CONDITION_NAME;var h=o(31539);t.CONDITION_NOT_EMPTY=h.CONDITION_NAME;var c=o(77649);t.CONDITION_EQUAL=c.CONDITION_NAME;var u=o(72998);t.CONDITION_NOT_EQUAL=u.CONDITION_NAME;var d=o(34808);t.CONDITION_GREATER_THAN=d.CONDITION_NAME;var g=o(25001);t.CONDITION_GREATER_THAN_OR_EQUAL=g.CONDITION_NAME;var f=o(38979);t.CONDITION_LESS_THAN=f.CONDITION_NAME;var p=o(80744);t.CONDITION_LESS_THAN_OR_EQUAL=p.CONDITION_NAME;var m=o(54789);t.CONDITION_BETWEEN=m.CONDITION_NAME;var w=o(14722);t.CONDITION_NOT_BETWEEN=w.CONDITION_NAME;var C=o(88323);t.CONDITION_BEGINS_WITH=C.CONDITION_NAME;var v=o(9931);t.CONDITION_ENDS_WITH=v.CONDITION_NAME;var y=o(32204);t.CONDITION_CONTAINS=y.CONDITION_NAME;var E=o(51838);t.CONDITION_NOT_CONTAINS=E.CONDITION_NAME;var S=o(5667);t.CONDITION_DATE_BEFORE=S.CONDITION_NAME;var R=o(39712);t.CONDITION_DATE_AFTER=R.CONDITION_NAME;var b=o(62411);t.CONDITION_TOMORROW=b.CONDITION_NAME;var _=o(75139);t.CONDITION_TODAY=_.CONDITION_NAME;var T=o(64778);t.CONDITION_YESTERDAY=T.CONDITION_NAME;var M=o(63039);t.CONDITION_BY_VALUE=M.CONDITION_NAME;var O=o(51105);t.CONDITION_TRUE=O.CONDITION_NAME;var I=o(24498);t.CONDITION_FALSE=I.CONDITION_NAME;var N=o(64709);t.OPERATION_AND=N.OPERATION_ID;var A=o(75469);t.OPERATION_OR=A.OPERATION_ID;var P=o(21106);t.OPERATION_OR_THEN_VARIABLE=P.OPERATION_ID;const x=t.TYPE_NUMERIC="numeric",H=t.TYPE_TEXT="text",D=t.TYPE_DATE="date",k=t.TYPES={[x]:[l.CONDITION_NAME,i.SEPARATOR,a.CONDITION_NAME,h.CONDITION_NAME,i.SEPARATOR,c.CONDITION_NAME,u.CONDITION_NAME,i.SEPARATOR,d.CONDITION_NAME,g.CONDITION_NAME,f.CONDITION_NAME,p.CONDITION_NAME,m.CONDITION_NAME,w.CONDITION_NAME],[H]:[l.CONDITION_NAME,i.SEPARATOR,a.CONDITION_NAME,h.CONDITION_NAME,i.SEPARATOR,c.CONDITION_NAME,u.CONDITION_NAME,i.SEPARATOR,C.CONDITION_NAME,v.CONDITION_NAME,i.SEPARATOR,y.CONDITION_NAME,E.CONDITION_NAME],[D]:[l.CONDITION_NAME,i.SEPARATOR,a.CONDITION_NAME,h.CONDITION_NAME,i.SEPARATOR,c.CONDITION_NAME,u.CONDITION_NAME,i.SEPARATOR,S.CONDITION_NAME,R.CONDITION_NAME,m.CONDITION_NAME,i.SEPARATOR,b.CONDITION_NAME,_.CONDITION_NAME,T.CONDITION_NAME]}},91257:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(15724);var n=s(o(85707)),i=o(9175);t.default=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>[];(0,n.default)(this,"conditionCollection",void 0),(0,n.default)(this,"columnDataFactory",void 0),this.conditionCollection=e,this.columnDataFactory=t}filter(){let e=[];return(0,i.arrayEach)(this.conditionCollection.getFilteredColumns(),((t,o)=>{let s=this.columnDataFactory(t);o&&(s=this._getIntersectData(s,e)),e=this.filterByColumn(t,s)})),e}filterByColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const o=[];return(0,i.arrayEach)(t,(t=>{void 0!==t&&this.conditionCollection.isMatch(t,e)&&o.push(t)})),o}_getIntersectData(e,t){const o=[];return(0,i.arrayEach)(t,(t=>{const s=t.meta.visualRow;void 0!==e[s]&&(o[s]=e[s])})),o}}},72100:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724),o(25352);var n=s(o(85707)),i=o(61205),r=o(9175),l=o(28927),a=o(83119),h=o(87485),c=o(9893),u=o(71257),d=o(58653),g=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=_(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),f=o(93138),p=o(91022),m=o(64166),w=o(92620),C=s(o(3158)),v=s(o(91257)),y=s(o(66901)),E=o(23674),S=o(2947),R=o(60226),b=o(93969);function _(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(_=function(e){return e?o:t})(e)}function T(e,t,o){M(e,t),t.set(e,o)}function M(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function O(e,t){return e.get(I(e,t))}function I(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}o(72039);const N=t.PLUGIN_KEY="filters",A=t.PLUGIN_PRIORITY=250,P=N;var x=new WeakMap,H=new WeakMap,D=new WeakSet;class k extends i.BasePlugin{static get PLUGIN_KEY(){return N}static get PLUGIN_PRIORITY(){return A}static get PLUGIN_DEPS(){return["plugin:DropdownMenu","plugin:HiddenRows","cell-type:checkbox"]}constructor(e){var t,o;super(e),M(t=this,o=D),o.add(t),(0,n.default)(this,"dropdownMenuPlugin",null),(0,n.default)(this,"conditionCollection",null),(0,n.default)(this,"conditionUpdateObserver",null),(0,n.default)(this,"components",new Map([["filter_by_condition",null],["filter_operators",null],["filter_by_condition2",null],["filter_by_value",null],["filter_action_bar",null]])),(0,n.default)(this,"filtersRowsMap",null),T(this,x,void 0),T(this,H,new WeakSet),this.hot.addHook("afterGetColHeader",((e,t)=>I(D,this,z).call(this,e,t)))}isEnabled(){return!!this.hot.getSettings()[N]}enablePlugin(){var e=this;if(this.enabled)return;this.filtersRowsMap=this.hot.rowIndexMapper.registerMap(this.pluginName,new b.TrimmingMap),this.dropdownMenuPlugin=this.hot.getPlugin("dropdownMenu");const t=this.hot.getSettings().dropdownMenu,o=t&&t.uiContainer||this.hot.rootDocument.body,s=e=>(e.addLocalHook("accept",(()=>I(D,this,U).call(this,"accept"))),e.addLocalHook("cancel",(()=>I(D,this,U).call(this,"cancel"))),e.addLocalHook("change",(t=>I(D,this,j).call(this,e,t))),e),n=()=>`${this.hot.getTranslatedPhrase(g.FILTERS_DIVS_FILTER_BY_CONDITION)}:`,i=()=>`${this.hot.getTranslatedPhrase(g.FILTERS_DIVS_FILTER_BY_VALUE)}:`;if(!this.components.get("filter_by_condition")){const e=new f.ConditionComponent(this.hot,{id:"filter_by_condition",name:n,addSeparator:!1,menuContainer:o});e.addLocalHook("afterClose",(()=>I(D,this,Y).call(this))),this.components.set("filter_by_condition",s(e))}if(this.components.get("filter_operators")||this.components.set("filter_operators",new p.OperatorsComponent(this.hot,{id:"filter_operators",name:"Operators"})),!this.components.get("filter_by_condition2")){const e=new f.ConditionComponent(this.hot,{id:"filter_by_condition2",name:"",addSeparator:!0,menuContainer:o});e.addLocalHook("afterClose",(()=>I(D,this,Y).call(this))),this.components.set("filter_by_condition2",s(e))}if(this.components.get("filter_by_value")||this.components.set("filter_by_value",s(new m.ValueComponent(this.hot,{id:"filter_by_value",name:i}))),this.components.get("filter_action_bar")||this.components.set("filter_action_bar",s(new w.ActionBarComponent(this.hot,{id:"filter_action_bar",name:"Action bar"}))),this.conditionCollection||(this.conditionCollection=new C.default(this.hot)),this.conditionUpdateObserver||(this.conditionUpdateObserver=new y.default(this.hot,this.conditionCollection,(e=>this.getDataMapAtColumn(e))),this.conditionUpdateObserver.addLocalHook("update",(e=>I(D,this,G).call(this,e)))),this.components.forEach((e=>e.show())),this.addHook("afterDropdownMenuDefaultOptions",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return I(D,e,B).call(e,...o)})),this.addHook("beforeDropdownMenuShow",(()=>I(D,this,W).call(this))),this.addHook("afterDropdownMenuShow",(()=>I(D,this,V).call(this))),this.addHook("afterDropdownMenuHide",(()=>I(D,this,F).call(this))),this.addHook("afterChange",(e=>I(D,this,L).call(this,e))),this.hot.getSettings().dropdownMenu&&this.dropdownMenuPlugin&&(this.dropdownMenuPlugin.disablePlugin(),this.dropdownMenuPlugin.enablePlugin()),!O(x,this)&&this.dropdownMenuPlugin.enabled){const e=[{focus:()=>{const e=O(x,this).getMenu(),t=e.getNavigator(),o=O(x,this).getLastMenuPage();e.focus(),o>0?t.setCurrentPage(o):t.toFirstItem()}},...Array.from(this.components).map((e=>{let[,t]=e;return t.getElements()})).flat()];r=x,l=this,a=(0,S.createMenuFocusController)(this.dropdownMenuPlugin.menu,e),r.set(I(r,l),a);const t=e=>{O(x,this).listen(),e.preventDefault(),(0,u.isKey)(e.keyCode,"TAB")&&(e.shiftKey?O(x,this).toPreviousItem():O(x,this).toNextItem())};this.components.get("filter_by_value").addLocalHook("listTabKeydown",t),this.components.get("filter_by_condition").addLocalHook("selectTabKeydown",t)}var r,l,a;this.registerShortcuts(),super.enablePlugin()}disablePlugin(){var e;this.enabled&&(null!==(e=this.dropdownMenuPlugin)&&void 0!==e&&e.enabled&&this.dropdownMenuPlugin.menu.clearLocalHooks(),this.components.forEach(((e,t)=>{e.destroy(),this.components.set(t,null)})),this.conditionCollection.destroy(),this.conditionCollection=null,this.hot.rowIndexMapper.unregisterMap(this.pluginName));this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Alt","A"]],stopPropagation:!0,callback:()=>{const e=this.hot.getSelected();this.clearConditions(),this.filter(),e&&this.hot.selectCells(e)},group:P})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(P)}addCondition(e,t,o){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:R.OPERATION_AND;const n=this.hot.toPhysicalColumn(e);this.conditionCollection.addCondition(n,{command:{key:t},args:o},s)}removeConditions(e){const t=this.hot.toPhysicalColumn(e);this.conditionCollection.removeConditions(t)}clearConditions(e){if(void 0===e)this.conditionCollection.clean();else{const t=this.hot.toPhysicalColumn(e);this.conditionCollection.removeConditions(t)}}filter(){const{navigableHeaders:e}=this.hot.getSettings(),t=this._createDataFilter(),o=!this.conditionCollection.isEmpty();let s=[];const n=this.conditionCollection.exportAllConditions();if(!1!==this.hot.runHooks("beforeFilter",n,this.conditionCollection.previousConditionStack))if(o){const o=[];this.hot.batchExecution((()=>{this.filtersRowsMap.clear(),s=(0,r.arrayMap)(t.filter(),(e=>e.meta.visualRow));const e=(0,E.createArrayAssertion)(s);(0,h.rangeEach)(this.hot.countSourceRows()-1,(t=>{e(t)||o.push(t)})),(0,r.arrayEach)(o,(e=>{this.filtersRowsMap.setValueAtIndex(e,!0)}))}),!0),e||s.length||this.hot.deselectCell()}else this.filtersRowsMap.clear();this.hot.runHooks("afterFilter",n),this.conditionCollection.setPreviousConditionStack(null),this.hot.view.adjustElementsSize(),this.hot.render(),this.hot.selection.isSelected()&&this.hot.selectCell(e?-1:0,this.hot.getSelectedRangeLast().highlight.col)}getSelectedColumn(){var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t?{visualIndex:t.col,physicalIndex:this.hot.toPhysicalColumn(t.col)}:null}getDataMapAtColumn(e){const t=this.hot.toVisualColumn(e),o=[];return(0,r.arrayEach)(this.hot.getSourceDataAtCol(t),((e,s)=>{var n;const{row:i,col:r,visualCol:l,visualRow:a,type:h,instance:c,dateFormat:u,locale:d}=this.hot.getCellMeta(s,t),g=null!==(n=this.hot.getDataAtCell(this.hot.toVisualRow(s),t))&&void 0!==n?n:e;o.push({meta:{row:i,col:r,visualCol:l,visualRow:a,type:h,instance:c,dateFormat:u,locale:d},value:(0,E.toEmptyString)(g)})})),o}updateValueComponentCondition(e){const t=this.hot.getDataAtCol(e),o=(0,E.unifyColumnValues)(t);this.conditionUpdateObserver.updateStatesAtColumn(e,o)}restoreComponents(e){var t;const o=null===(t=this.getSelectedColumn())||void 0===t?void 0:t.physicalIndex;e.forEach((e=>{e.isHidden()||e.restoreState(o)})),this.updateDependentComponentsVisibility()}getOperationBasedOnArguments(e,t,o,s){let n=e;return n===R.OPERATION_OR&&t.command.key!==R.CONDITION_NONE&&o.command.key!==R.CONDITION_NONE&&s.command.key!==R.CONDITION_NONE?n=R.OPERATION_OR_THEN_VARIABLE:s.command.key!==R.CONDITION_NONE&&(t.command.key!==R.CONDITION_NONE&&o.command.key!==R.CONDITION_NONE||(n=R.OPERATION_AND)),n}setListeningDropdownMenu(){this.dropdownMenuPlugin&&this.dropdownMenuPlugin.setListening()}updateDependentComponentsVisibility(){const e=this.components.get("filter_by_condition"),{command:t}=e.getState(),o=[this.components.get("filter_by_condition2"),this.components.get("filter_operators")];t.showOperators?this.showComponents(...o):this.hideComponents(...o)}_createDataFilter(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.conditionCollection;return new v.default(e,(e=>this.getDataMapAtColumn(e)))}getIndexesOfComponents(){const e=[];if(!this.dropdownMenuPlugin)return e;const t=this.dropdownMenuPlugin.menu;for(var o=arguments.length,s=new Array(o),n=0;n<o;n++)s[n]=arguments[n];return(0,r.arrayEach)(s,(o=>{(0,r.arrayEach)(t.menuItems,((t,s)=>{t.key===o.getMenuItemDescriptor().key&&e.push(s)}))})),e}changeComponentsVisibility(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this.dropdownMenuPlugin)return;const t=this.dropdownMenuPlugin.menu.hotMenu,o=t.getPlugin("hiddenRows");for(var s=arguments.length,n=new Array(s>1?s-1:0),i=1;i<s;i++)n[i-1]=arguments[i];const r=this.getIndexesOfComponents(...n);e?o.showRows(r):o.hideRows(r),t.render()}hideComponents(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.changeComponentsVisibility(!1,...t)}showComponents(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.changeComponentsVisibility(!0,...t)}destroy(){this.enabled&&(this.components.forEach(((e,t)=>{null!==e&&(e.destroy(),this.components.set(t,null))})),this.conditionCollection.destroy(),this.conditionUpdateObserver.destroy(),this.hot.rowIndexMapper.unregisterMap(this.pluginName)),super.destroy()}}function L(e){e&&(0,r.arrayEach)(e,(e=>{const[,t]=e,o=this.hot.propToCol(t);this.conditionCollection.hasConditions(o)&&this.updateValueComponentCondition(o)}))}function V(){const e=this.dropdownMenuPlugin.menu;this.restoreComponents(Array.from(this.components.values())),e.updateMenuDimensions()}function F(){this.components.get("filter_by_condition").getSelectElement().closeOptions(),this.components.get("filter_by_condition2").getSelectElement().closeOptions()}function W(){const e=this.dropdownMenuPlugin.menu;O(H,this).has(e)||O(x,this).setMenu(e),O(H,this).add(e)}function B(e){e.items.push({name:d.SEPARATOR}),this.components.forEach((t=>{e.items.push(t.getMenuItemDescriptor())}))}function U(e){var t;if("accept"===e){const e=this.getSelectedColumn();var o;if(null===e)return void(null===(o=this.dropdownMenuPlugin)||void 0===o||o.close());const{physicalIndex:t}=e,s=this.components.get("filter_by_condition").getState(),n=this.components.get("filter_by_condition2").getState(),i=this.components.get("filter_by_value").getState(),r=this.getOperationBasedOnArguments(this.components.get("filter_operators").getActiveOperationId(),s,n,i);this.conditionUpdateObserver.groupChanges();let l=this.conditionCollection.getColumnStackPosition(t);-1===l&&(l=void 0),this.conditionCollection.removeConditions(t),s.command.key!==R.CONDITION_NONE&&(this.conditionCollection.addCondition(t,s,r,l),n.command.key!==R.CONDITION_NONE&&this.conditionCollection.addCondition(t,n,r,l)),i.command.key!==R.CONDITION_NONE&&this.conditionCollection.addCondition(t,i,r,l),this.conditionUpdateObserver.flush(),this.components.forEach((e=>e.saveState(t))),this.filtersRowsMap.clear(),this.filter()}null===(t=this.dropdownMenuPlugin)||void 0===t||t.close()}function j(e,t){this.updateDependentComponentsVisibility(),e.constructor!==f.ConditionComponent||t.inputsCount||this.setListeningDropdownMenu()}function Y(){this.setListeningDropdownMenu()}function z(e,t){const o=this.hot.toPhysicalColumn(e);this.enabled&&this.conditionCollection.hasConditions(o)?(0,c.addClass)(t,"htFiltersActive"):(0,c.removeClass)(t,"htFiltersActive")}function G(e){var t;if(null===(t=this.dropdownMenuPlugin)||void 0===t||!t.enabled)return;const{editedConditionStack:{conditions:o,column:s}}=e,n=o.filter((e=>e.name===R.CONDITION_BY_VALUE)),i=o.filter((e=>e.name!==R.CONDITION_BY_VALUE));if(n.length>=2||i.length>=3)(0,a.warn)(l.toSingleLine`The filter conditions have been applied properly, but couldn’t be displayed visually.\x20
72
72
  The overall amount of conditions exceed the capability of the dropdown menu.\x20
73
- For more details see the documentation.`);else{const t=this.conditionCollection.getOperation(s);this.components.get("filter_by_condition").updateState(i[0],s),this.components.get("filter_by_condition2").updateState(i[1],s),this.components.get("filter_operators").updateState(t,s),this.components.get("filter_by_value").updateState(e)}}t.Filters=H},85471:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(72100);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.Filters=s.Filters},36057:(e,t,o)=>{"use strict";t.__esModule=!0,t.getOperationFunc=function(e){if(!s[e])throw Error(`Operation with id "${e}" does not exist.`);const t=s[e].func;return function(e,o){return t(e,o)}},t.getOperationName=function(e){return s[e].name},t.registerOperation=function(e,t,o){s[e]={name:t,func:o}},o(67834);const s=t.operations={}},64709:(e,t,o)=>{"use strict";t.__esModule=!0,t.operationResult=a;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(36057);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}const r=t.OPERATION_ID="conjunction",l=t.SHORT_NAME_FOR_COMPONENT=s.FILTERS_LABELS_CONJUNCTION;function a(e,t){return e.every((e=>e.func(t)))}(0,n.registerOperation)(r,l,a)},75469:(e,t,o)=>{"use strict";t.__esModule=!0,t.operationResult=a;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(36057);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}const r=t.OPERATION_ID="disjunction",l=t.SHORT_NAME_FOR_COMPONENT=s.FILTERS_LABELS_DISJUNCTION;function a(e,t){return e.some((e=>e.func(t)))}(0,n.registerOperation)(r,l,a)},21106:(e,t,o)=>{"use strict";t.__esModule=!0,t.operationResult=a,o(67834);var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(36057);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}const r=t.OPERATION_ID="disjunctionWithExtraCondition",l=t.SHORT_NAME_FOR_COMPONENT=s.FILTERS_LABELS_DISJUNCTION;function a(e,t){if(e.length<3)throw Error("Operation doesn't work on less then three conditions.");return e.slice(0,e.length-1).some((e=>e.func(t)))&&e[e.length-1].func(t)}(0,n.registerOperation)(r,l,a)},2947:(e,t,o)=>{"use strict";t.__esModule=!0,t.createMenuFocusController=function(e,t){let o=-1;const a=(0,s.createFocusNavigator)(t),h=o=>()=>{e.isOpened()&&e.getKeyboardShortcutsCtrl().listen(l),a.setCurrentPage(t.indexOf(o))};function c(s){const h=e.getKeyboardShortcutsCtrl(),c=s.getKeyboardShortcutsCtrl();a.clear(),c.addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],forwardToContext:h.getContext(l),callback:()=>{s.isSubMenu()&&s.close(),h.listen(l)}}]),s.isSubMenu()||h.addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],callback:t=>{const s=e.getNavigator();s.getCurrentPage()>-1&&(o=s.getCurrentPage()),s.clear(),t.shiftKey?a.toPreviousItem():a.toNextItem()}},{keys:[["Escape"]],callback:()=>{e.close()}},{keys:[["Enter"],["Space"]],preventDefault:!1,callback:e=>{const o=t[a.getCurrentPage()];o instanceof n.SelectUI&&(o.openOptions(),e.preventDefault()),o instanceof r.LinkUI&&(o.activate(),e.preventDefault()),o instanceof i.BaseUI||e.preventDefault()}}],l)}return t.forEach((e=>{e instanceof i.BaseUI&&(e.addLocalHook("click",h(e)),e.addLocalHook("focus",h(e)),e.addLocalHook("afterClose",h(e)))})),e.addLocalHook("afterSelectionChange",(e=>{e.key.startsWith("filter_")||a.clear()})),e.addLocalHook("afterSubmenuOpen",c),e.addLocalHook("afterOpen",c),{...a,listen:function(){e.focus(),e.getKeyboardShortcutsCtrl().listen(l)},getLastMenuPage:function(){return o}}};var s=o(85326),n=o(92384),i=o(46026),r=o(88172);const l="filters"},85326:(e,t,o)=>{"use strict";t.__esModule=!0,t.createFocusNavigator=function(e){return(0,s.createPaginator)({initialPage:0,size:()=>e.length,onItemSelect:(t,o)=>{const s=e[t];return s instanceof i.MultipleSelectUI?o:!(s.element&&!(0,n.isVisible)(s.element))&&void s.focus()}})};var s=o(57625),n=o(9893),i=o(44068)},46026:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707)),i=o(13911),r=s(o(63870)),l=s(o(82629)),a=o(9893),h=o(9175),c=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=u(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884));function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(u=function(e){return e?o:t})(e)}const d="built",g="building",f=["click","input","keydown","keypress","keyup","focus","blur","change"];class p{static get DEFAULTS(){return(0,i.clone)({className:"",value:"",tagName:"div",children:[],wrapIt:!0})}constructor(e,t){(0,n.default)(this,"hot",void 0),(0,n.default)(this,"eventManager",new l.default(this)),(0,n.default)(this,"options",void 0),(0,n.default)(this,"_element",void 0),(0,n.default)(this,"buildState",void 0),this.hot=e,this.options=(0,i.extend)(p.DEFAULTS,t),this._element=this.hot.rootDocument.createElement(this.options.wrapIt?"div":this.options.tagName)}setValue(e){this.options.value=e,this.update()}getValue(){return this.options.value}get element(){return this.buildState===g?this._element:this.buildState===d?(this.update(),this._element):(this.buildState=g,this.build(),this.buildState=d,this._element)}isBuilt(){return this.buildState===d}translateIfPossible(e){return"string"==typeof e&&e.startsWith(c.FILTERS_NAMESPACE)?this.hot.getTranslatedPhrase(e):e}build(){const e=(e,t)=>{this.eventManager.addEventListener(e,t,(e=>this.runLocalHooks(t,e,this)))};if(this.buildState||(this.buildState=g),this._element.setAttribute("data-hot-input",!0),void 0!==this.options.tabIndex&&this._element.setAttribute("tabindex",this.options.tabIndex),void 0!==this.options.role&&this._element.setAttribute("role",this.options.role),this.options.className&&(0,a.addClass)(this._element,this.options.className),this.options.children.length)(0,h.arrayEach)(this.options.children,(e=>this._element.appendChild(e.element)));else if(this.options.wrapIt){const t=this.hot.rootDocument.createElement(this.options.tagName);t.setAttribute("data-hot-input",!0),(0,i.objectEach)(this.options,((e,o)=>{void 0!==t[o]&&"className"!==o&&"tagName"!==o&&"children"!==o&&(t[o]=this.translateIfPossible(e))})),this._element.appendChild(t),(0,h.arrayEach)(f,(o=>e(t,o)))}else(0,h.arrayEach)(f,(t=>e(this._element,t)))}update(){}reset(){this.options.value="",this.update()}show(){this.element.style.display=""}hide(){this.element.style.display="none"}focus(){}destroy(){this.eventManager.destroy(),this.eventManager=null,this.hot=null,this._element.parentNode&&this._element.parentNode.removeChild(this._element),this._element=null}}t.BaseUI=p,(0,i.mixin)(p,r.default)},22818:(e,t,o)=>{"use strict";t.__esModule=!0,o(67834);var s=o(9893),n=o(13911),i=o(46026);function r(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function l(e,t){return e.get(a(e,t))}function a(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var h=new WeakMap,c=new WeakSet;class u extends i.BaseUI{static get DEFAULTS(){return(0,n.clone)({placeholder:"",type:"text",tagName:"input",tabIndex:-1})}constructor(e,t){var o,s;super(e,(0,n.extend)(u.DEFAULTS,t)),r(o=this,s=c),s.add(o),function(e,t,o){r(e,t),t.set(e,o)}(this,h,void 0),this.registerHooks()}registerHooks(){this.addLocalHook("keyup",(e=>a(c,this,d).call(this,e)))}build(){super.build();const e=this.hot.rootDocument.createElement("div");var t,o,n;t=h,o=this,n=this._element.firstChild,t.set(a(t,o),n),(0,s.addClass)(this._element,"htUIInput"),(0,s.addClass)(e,"htUIInputIcon"),this._element.appendChild(e),this.update()}update(){this.isBuilt()&&(l(h,this).type=this.options.type,l(h,this).placeholder=this.translateIfPossible(this.options.placeholder),l(h,this).value=this.translateIfPossible(this.options.value))}focus(){this.isBuilt()&&l(h,this).focus()}}function d(e){this.options.value=e.target.value}t.InputUI=u},88172:(e,t,o)=>{"use strict";t.__esModule=!0,o(67834);var s=o(13911),n=o(46026);function i(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function r(e,t){return e.get(l(e,t))}function l(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var a=new WeakMap;class h extends n.BaseUI{static get DEFAULTS(){return(0,s.clone)({href:"#",tagName:"a",tabIndex:-1,role:"button"})}constructor(e,t){super(e,(0,s.extend)(h.DEFAULTS,t)),i(this,a,void 0)}build(){var e,t,o;super.build(),e=a,t=this,o=this._element.firstChild,e.set(l(e,t),o)}update(){this.isBuilt()&&(r(a,this).textContent=this.translateIfPossible(this.options.textContent))}focus(){this.isBuilt()&&r(a,this).focus()}activate(){r(a,this).click()}}t.LinkUI=h},44068:(e,t,o)=>{"use strict";t.__esModule=!0,o(67834),o(15724);var s=o(9893),n=o(13911),i=o(71257),r=o(78832),l=o(56216),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=f(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),h=o(79729),c=o(46026),u=o(22818),d=o(88172),g=o(23674);function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(f=function(e){return e?o:t})(e)}function p(e,t,o){m(e,t),t.set(e,o)}function m(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function w(e,t){return e.get(v(e,t))}function C(e,t,o){return e.set(v(e,t),o),o}function v(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}const y="multipleSelect.itemBox";var E=new WeakMap,S=new WeakMap,R=new WeakMap,b=new WeakMap,_=new WeakMap,T=new WeakMap,M=new WeakSet;class O extends c.BaseUI{static get DEFAULTS(){return(0,n.clone)({className:"htUIMultipleSelect",value:[]})}constructor(e,t){var o,s;super(e,(0,n.extend)(O.DEFAULTS,t)),m(o=this,s=M),s.add(o),p(this,E,[]),p(this,S,void 0),p(this,R,void 0),p(this,b,void 0),p(this,_,void 0),p(this,T,void 0),C(b,this,new u.InputUI(this.hot,{placeholder:a.FILTERS_BUTTONS_PLACEHOLDER_SEARCH,className:"htUIMultipleSelectSearch"})),C(_,this,new d.LinkUI(this.hot,{textContent:a.FILTERS_BUTTONS_SELECT_ALL,className:"htUISelectAll"})),C(T,this,new d.LinkUI(this.hot,{textContent:a.FILTERS_BUTTONS_CLEAR,className:"htUIClearAll"})),this.registerHooks()}getItemsBox(){return w(S,this)}registerHooks(){w(b,this).addLocalHook("keydown",(e=>v(M,this,N).call(this,e))),w(b,this).addLocalHook("input",(e=>v(M,this,I).call(this,e))),w(_,this).addLocalHook("click",(e=>v(M,this,A).call(this,e))),w(T,this).addLocalHook("click",(e=>v(M,this,P).call(this,e)))}setItems(e){var t;C(E,this,e),null===(t=w(S,this))||void 0===t||t.loadData(w(E,this))}setLocale(e){C(R,this,e)}getLocale(){return w(R,this)}getItems(){return[...w(E,this)]}getValue(){return function(e){const t=[];return e.forEach((e=>{e.checked&&t.push(e.value)})),t}(w(E,this))}getSearchInputElement(){return w(b,this)}getSelectAllElement(){return w(_,this)}getClearAllElement(){return w(T,this)}isSelectedAllValues(){return w(E,this).length===this.getValue().length}build(){super.build();const{rootDocument:e}=this.hot,t=e.createElement("div"),o=new c.BaseUI(this.hot,{className:"htUISelectionControls",children:[w(_,this),w(T,this)]});this._element.appendChild(w(b,this).element),this._element.appendChild(o.element),this._element.appendChild(t);const n=t=>{var o;if(!this._element)return;null===(o=w(S,this))||void 0===o||o.destroy(),(0,s.addClass)(t,"htUIMultipleSelectHot"),C(S,this,new this.hot.constructor(t,{data:w(E,this),columns:[{data:"checked",type:"checkbox",label:{property:"visualValue",position:"after"}}],beforeRenderer:(e,t,o,s,n,i)=>{e.title=i.instance.getDataAtRowProp(t,i.label.property)},afterListen:()=>{this.runLocalHooks("focus",this)},beforeOnCellMouseUp:()=>{w(S,this).listen()},colWidths:()=>w(S,this).container.scrollWidth-(0,s.getScrollbarWidth)(e),maxCols:1,autoWrapCol:!0,height:110,copyPaste:!1,disableVisualSelection:"area",fillHandle:!1,fragmentSelection:"cell",tabMoves:{row:1,col:0},layoutDirection:this.hot.isRtl()?"rtl":"ltr"})),w(S,this).init();const n=w(S,this).getShortcutManager().getContext("grid");n.removeShortcutsByKeys(["Tab"]),n.removeShortcutsByKeys(["Shift","Tab"]),n.addShortcut({keys:[["Escape"]],callback:e=>{this.runLocalHooks("keydown",e,this)},group:y}),n.addShortcut({keys:[["Tab"],["Shift","Tab"]],callback:e=>{w(S,this).deselectCell(),this.runLocalHooks("keydown",e,this),this.runLocalHooks("listTabKeydown",e,this)},group:y})};n(t),this.hot._registerTimeout((()=>n(t)),100)}focus(){this.isBuilt()&&w(S,this).listen()}reset(){w(b,this).reset(),w(_,this).reset(),w(T,this).reset()}update(){this.isBuilt()&&(w(S,this).loadData(function(e,t){const o=(0,g.createArrayAssertion)(t);return e.map((e=>(e.checked=o(e.value),e)))}(w(E,this),this.options.value)),super.update())}destroy(){var e;null===(e=w(S,this))||void 0===e||e.destroy(),w(b,this).destroy(),w(T,this).destroy(),w(_,this).destroy(),C(b,this,null),C(T,this,null),C(_,this,null),C(S,this,null),C(E,this,null),super.destroy()}}function I(e){const t=e.target.value.toLocaleLowerCase(this.getLocale());let o;o=""===t?[...w(E,this)]:w(E,this).filter((e=>`${e.value}`.toLocaleLowerCase(this.getLocale()).indexOf(t)>=0)),w(S,this).loadData(o)}function N(e){this.runLocalHooks("keydown",e,this);(0,r.partial)(i.isKey,e.keyCode)("ARROW_DOWN")&&(e.preventDefault(),(0,h.stopImmediatePropagation)(e),w(S,this).listen(),w(S,this).selectCell(0,0))}function A(e){const t=[];e.preventDefault(),w(S,this).getSourceData().forEach(((e,o)=>{e.checked=!0,t.push((0,l.dataRowToChangesArray)(e,o)[0])})),w(S,this).setSourceDataAtCell(t)}function P(e){const t=[];e.preventDefault(),w(S,this).getSourceData().forEach(((e,o)=>{e.checked=!1,t.push((0,l.dataRowToChangesArray)(e,o)[0])})),w(S,this).setSourceDataAtCell(t)}t.MultipleSelectUI=O;t.default=O},66733:(e,t,o)=>{"use strict";t.__esModule=!0,o(67834);var s=o(13911),n=o(46026);function i(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function r(e,t){return e.get(a(e,t))}function l(e,t,o){return e.set(a(e,t),o),o}function a(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var h=new WeakMap,c=new WeakMap;class u extends n.BaseUI{static get DEFAULTS(){return(0,s.clone)({type:"radio",tagName:"input",className:"htUIRadio",label:{}})}constructor(e,t){super(e,(0,s.extend)(u.DEFAULTS,t)),i(this,h,void 0),i(this,c,void 0)}build(){super.build();const e=this.hot.rootDocument.createElement("label");e.textContent=this.translateIfPossible(this.options.label.textContent),e.htmlFor=this.translateIfPossible(this.options.label.htmlFor),l(c,this,e),l(h,this,this._element.firstChild),r(h,this).checked=this.options.checked,this._element.appendChild(e),this.update()}update(){this.isBuilt()&&(r(c,this).textContent=this.translateIfPossible(this.options.label.textContent))}isChecked(){return!!this.isBuilt()&&r(h,this).checked}setChecked(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isBuilt()&&(r(h,this).checked=e)}focus(){this.isBuilt()&&r(h,this).focus()}}t.RadioInputUI=u},92384:(e,t,o)=>{"use strict";t.__esModule=!0,o(67834);var s=o(95586),n=o(13911),i=o(9175),r=o(9893),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=u(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),a=o(58653),h=o(46026),c=o(92692);function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(u=function(e){return e?o:t})(e)}function d(e,t,o){g(e,t),t.set(e,o)}function g(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function f(e,t,o){return e.set(m(e,t),o),o}function p(e,t){return e.get(m(e,t))}function m(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var w=new WeakMap,C=new WeakMap,v=new WeakMap,y=new WeakMap,E=new WeakMap,S=new WeakSet;class R extends h.BaseUI{static get DEFAULTS(){return(0,n.clone)({className:"htUISelect",wrapIt:!1,tabIndex:-1})}constructor(e,t){var o,s;super(e,(0,n.extend)(R.DEFAULTS,t)),g(o=this,s=S),s.add(o),d(this,w,null),d(this,C,[]),d(this,v,void 0),d(this,y,void 0),d(this,E,void 0),this.registerHooks()}getMenu(){return p(w,this)}registerHooks(){this.addLocalHook("click",(()=>m(S,this,T).call(this)))}setItems(e){f(C,this,this.translateNames(e)),p(w,this)&&p(w,this).setMenuItems(p(C,this))}translateNames(e){return(0,i.arrayEach)(e,(e=>{e.name=this.translateIfPossible(e.name)})),e}build(){super.build(),f(w,this,new s.Menu(this.hot,{className:"htSelectUI htFiltersConditionsMenu",keepInViewport:!1,standalone:!0,container:this.options.menuContainer})),p(w,this).setMenuItems(p(C,this));const e=new h.BaseUI(this.hot,{className:"htUISelectCaption"}),t=new h.BaseUI(this.hot,{className:"htUISelectDropdown"});f(v,this,e),f(y,this,e.element),f(E,this,t),this.hot.getSettings().ariaTags&&((0,r.setAttribute)(t.element,[(0,c.A11Y_HIDDEN)()]),(0,r.setAttribute)(this._element,[(0,c.A11Y_LISTBOX)()])),(0,i.arrayEach)([e,t],(e=>this._element.appendChild(e.element))),p(w,this).addLocalHook("select",(e=>m(S,this,b).call(this,e))),p(w,this).addLocalHook("afterClose",(()=>m(S,this,_).call(this))),this.update()}update(){if(!this.isBuilt())return;let e;e=this.options.value?this.options.value.name:p(w,this).hot.getTranslatedPhrase(l.FILTERS_CONDITIONS_NONE),p(y,this).textContent=e,super.update()}openOptions(){const e=this.element.getBoundingClientRect();p(w,this)&&(p(w,this).open(),p(w,this).setPosition({left:this.hot.isLtr()?e.left-5:e.left-31,top:e.top-1,width:e.width,height:e.height}),p(w,this).getNavigator().toFirstItem(),p(w,this).getKeyboardShortcutsCtrl().addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],callback:e=>{this.closeOptions(),this.runLocalHooks("tabKeydown",e)}},{keys:[["Control/Meta","A"]],callback:()=>!1}]))}closeOptions(){p(w,this)&&p(w,this).close()}focus(){this.isBuilt()&&this.element.focus()}destroy(){p(w,this)&&(p(w,this).destroy(),f(w,this,null)),p(v,this)&&p(v,this).destroy(),p(E,this)&&p(E,this).destroy(),super.destroy()}}function b(e){e.name!==a.SEPARATOR&&(this.options.value=e,this.update(),this.runLocalHooks("select",this.options.value))}function _(){this.runLocalHooks("afterClose")}function T(){this.openOptions()}t.SelectUI=R},23674:(e,t,o)=>{"use strict";t.__esModule=!0,t.createArrayAssertion=h,t.intersectValues=function(e,t,o,s){const i=[],l=e===t;let a;l||(a=h(t));return(0,n.arrayEach)(e,(e=>{let t=!1;(l||a(e))&&(t=!0);const n={checked:t,value:e,visualValue:r(e,o)};s&&s(n),i.push(n)})),i},t.sortComparison=function(e,t){if("number"==typeof e&&"number"==typeof t)return e-t;return i(e,t)},t.toEmptyString=function(e){return null==e?"":e},t.toVisualValue=r,t.unifyColumnValues=function(e){let t=e;t=a?Array.from(new Set(t)):(0,n.arrayUnique)(t);return t=t.sort(((e,t)=>"number"==typeof e&&"number"==typeof t?e-t:e===t?0:e>t?1:-1)),t},o(15724),o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var s=o(93980),n=o(9175);const i=(0,s.getComparisonFunction)();function r(e,t){let o=e;return""===o&&(o=`(${t})`),o}const l=new Set([1]).has(1),a=l&&"function"==typeof Array.from;function h(e){let t=e;return l&&(t=new Set(t)),function(e){let o;return o=l?t.has(e):!!~t.indexOf(e),o}}},89121:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.getRegisteredHotInstances=function(e){var t;const o=u(),s=0===o.size?[]:Array.from(null!==(t=o.get(e))&&void 0!==t?t:[]);return new Map(s.map((e=>[e.getPlugin("formulas").sheetId,e])))},t.registerCustomFunctions=f,t.registerEngine=g,t.registerLanguage=p,t.registerNamedExpressions=m,t.setupEngine=function(e){const t=e.getSettings(),o=t[h.PLUGIN_KEY],s=null==o?void 0:o.engine;if(!0===o)return null;if((0,i.isUndefined)(s))return null;var n;if("function"==typeof s.hyperformula||"function"==typeof s)return g(null!==(n=s.hyperformula)&&void 0!==n?n:s,t,e);if("object"==typeof s&&(0,i.isUndefined)(s.hyperformula)){const t=u(),o=d().get(s);return t.has(s)||t.set(s,[]),t.get(s).push(e),o&&o.push(e.guid),s.getConfig().licenseKey||s.updateConfig({licenseKey:c.DEFAULT_LICENSE_KEY}),s.getConfig().leapYear1900===c.DEFAULT_SETTINGS.leapYear1900&&!1!==(0,a.isObjectEqual)(s.getConfig().nullDate,c.DEFAULT_SETTINGS.nullDate)||(0,l.warn)(r.toSingleLine`If you use HyperFormula with Handsontable, keep the default \`leapYear1900\` and \`nullDate\`
74
- settings. Otherwise, HyperFormula's dates may not sync correctly with Handsontable's dates.`),s}return null},t.setupSheet=function(e,t){!(0,i.isUndefined)(t)&&e.doesSheetExist(t)||(t=e.addSheet(t));return t},t.unregisterEngine=function(e,t){if(e){const o=u(),s=o.get(e),n=d(),i=n.get(e);s&&s.includes(t)&&(s.splice(s.indexOf(t),1),0===s.length&&o.delete(e)),i&&i.includes(t.guid)&&(i.splice(i.indexOf(t.guid),1),0===i.length&&(n.delete(e),e.destroy()))}},o(15724);var n=s(o(71263)),i=o(38893),r=o(28927),l=o(83119),a=o(13911),h=o(66244),c=o(47329);function u(){const e="engine_relationship",t=(0,n.default)(h.PLUGIN_KEY);return t.hasItem(e)||t.register(e,new Map),t.getItem(e)}function d(){const e="shared_engine_usage",t=(0,n.default)(h.PLUGIN_KEY);return t.hasItem(e)||t.register(e,new Map),t.getItem(e)}function g(e,t,o){const s=t[h.PLUGIN_KEY],n=(0,c.getEngineSettingsWithDefaultsAndOverrides)(t),i=u(),r=d();f(e,s.functions),p(e,s.language);const l=e.buildEmpty(n);return i.set(l,[o]),r.set(l,[o.guid]),m(l,s.namedExpressions),l.on("sheetAdded",(()=>{l.rebuildAndRecalculate()})),l.on("sheetRemoved",(()=>{l.rebuildAndRecalculate()})),l}function f(e,t){t&&t.forEach((t=>{const{name:o,plugin:s,translations:n}=t;try{e.registerFunction(o,s,n)}catch(e){(0,l.warn)(e.message)}}))}function p(e,t){if(t){const{langCode:o}=t;try{e.registerLanguage(o,t)}catch(e){(0,l.warn)(e.message)}}}function m(e,t){t&&(e.suspendEvaluation(),t.forEach((t=>{const{name:o,expression:s,scope:n,options:i}=t;try{e.addNamedExpression(o,s,n,i)}catch(e){(0,l.warn)(e.message)}})),e.resumeEvaluation())}},47329:(e,t,o)=>{"use strict";t.__esModule=!0,t.getEngineSettingsOverrides=r,t.getEngineSettingsWithDefaultsAndOverrides=function(e){var t;const o=e[s.PLUGIN_KEY],n=l(null!=o&&null!==(t=o.engine)&&void 0!==t&&t.hyperformula?o.engine:{}),a=r(e);return{...i,...n,...a}},t.getEngineSettingsWithOverrides=function(e){var t;const o=e[s.PLUGIN_KEY],n=l(null!=o&&null!==(t=o.engine)&&void 0!==t&&t.hyperformula?o.engine:{}),i=r(e);return{...n,...i}},t.haveEngineSettingsChanged=function(e,t){return Object.keys(t).some((o=>void 0!==t[o]&&t[o]!==e[o]))};var s=o(66244);const n=t.DEFAULT_LICENSE_KEY="internal-use-in-handsontable",i=t.DEFAULT_SETTINGS={licenseKey:n,useArrayArithmetic:!0,useColumnIndex:!1,useStats:!1,evaluateNullToZero:!0,precisionEpsilon:1e-13,precisionRounding:14,smartRounding:!0,leapYear1900:!1,nullDate:{year:1899,month:12,day:30},nullYear:30,dateFormats:["DD/MM/YYYY","DD/MM/YY"],timeFormats:["hh:mm","hh:mm:ss.sss"],matchWholeCell:!0,useRegularExpressions:!1,useWildcards:!0,functionArgSeparator:",",thousandSeparator:"",decimalSeparator:".",language:"enGB"};function r(e){var t;return{maxColumns:e.maxColumns,maxRows:e.maxRows,language:null===(t=e[s.PLUGIN_KEY])||void 0===t||null===(t=t.language)||void 0===t?void 0:t.langCode}}function l(e){return Object.keys(e).reduce(((t,o)=>("hyperformula"!==o&&(t[o]=e[o]),t)),{})}},66244:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724),o(66184),o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var n=s(o(85707)),i=o(61205),r=s(o(71263)),l=o(83119),a=o(87485),h=o(38893),c=o(89121),u=o(92674),d=o(47329),g=o(56216),f=o(59777),p=s(o(56937)),m=s(o(27080));function w(e,t,o){C(e,t),t.set(e,o)}function C(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function v(e,t,o){return e.set(E(e,t),o),o}function y(e,t){return e.get(E(e,t))}function E(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}const S=t.PLUGIN_KEY="formulas",R=t.SETTING_KEYS=["maxRows","maxColumns","language"],b=t.PLUGIN_PRIORITY=260;p.default.getSingleton().register("afterNamedExpressionAdded"),p.default.getSingleton().register("afterNamedExpressionRemoved"),p.default.getSingleton().register("afterSheetAdded"),p.default.getSingleton().register("afterSheetRemoved"),p.default.getSingleton().register("afterSheetRenamed"),p.default.getSingleton().register("afterFormulasValuesUpdate");const _=e=>"UndoRedo.undo"===e||"UndoRedo.redo"===e||"auto"===e;var T=new WeakMap,M=new WeakMap,O=new WeakMap,I=new WeakSet;class N extends i.BasePlugin{constructor(){var e,t,o;super(...arguments),e=this,C(t=this,o=I),o.add(t),w(this,T,!1),w(this,M,!1),w(this,O,[["valuesUpdated",function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return E(I,e,X).call(e,...o)}],["namedExpressionAdded",function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return E(I,e,q).call(e,...o)}],["namedExpressionRemoved",function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return E(I,e,Q).call(e,...o)}],["sheetAdded",function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return E(I,e,J).call(e,...o)}],["sheetRenamed",function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return E(I,e,Z).call(e,...o)}],["sheetRemoved",function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return E(I,e,ee).call(e,...o)}]]),(0,n.default)(this,"staticRegister",(0,r.default)("formulas")),(0,n.default)(this,"engine",null),(0,n.default)(this,"sheetName",null),(0,n.default)(this,"indexSyncer",null),(0,n.default)(this,"rowAxisSyncer",null),(0,n.default)(this,"columnAxisSyncer",null)}static get PLUGIN_KEY(){return S}static get PLUGIN_PRIORITY(){return b}static get SETTING_KEYS(){return[S,...R]}get sheetId(){return null===this.sheetName?null:this.engine.getSheetId(this.sheetName)}isEnabled(){return!!this.hot.getSettings()[S]}enablePlugin(){var e,t=this;if(!this.enabled)if(this.engine=null!==(e=(0,c.setupEngine)(this.hot))&&void 0!==e?e:this.engine,this.engine){if(null!==this.sheetName&&!this.engine.doesSheetExist(this.sheetName)){const e=this.addSheet(this.sheetName,this.hot.getSourceDataArray());!1!==e&&(this.sheetName=e)}this.addHook("beforeLoadData",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,x).call(t,...o)})),this.addHook("afterLoadData",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,D).call(t,...o)})),this.addHook("beforeUpdateData",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,x).call(t,...o)})),this.addHook("afterUpdateData",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,D).call(t,...o)})),this.addHook("modifyData",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,L).call(t,...o)})),this.addHook("modifySourceData",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,k).call(t,...o)})),this.addHook("beforeValidate",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,A).call(t,...o)})),this.addHook("afterSetSourceDataAtCell",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,F).call(t,...o)})),this.addHook("afterSetDataAtCell",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,V).call(t,...o)})),this.addHook("afterSetDataAtRowProp",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,V).call(t,...o)})),this.addHook("beforeCreateRow",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,W).call(t,...o)})),this.addHook("beforeCreateCol",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,B).call(t,...o)})),this.addHook("afterCreateRow",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,Y).call(t,...o)})),this.addHook("afterCreateCol",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,z).call(t,...o)})),this.addHook("beforeRemoveRow",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,U).call(t,...o)})),this.addHook("beforeRemoveCol",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,j).call(t,...o)})),this.addHook("afterRemoveRow",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,G).call(t,...o)})),this.addHook("afterRemoveCol",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,$).call(t,...o)})),this.indexSyncer=new m.default(this.hot.rowIndexMapper,this.hot.columnIndexMapper,(e=>{this.hot.addHookOnce("init",(()=>{e()}))})),this.rowAxisSyncer=this.indexSyncer.getForAxis("row"),this.columnAxisSyncer=this.indexSyncer.getForAxis("column"),this.hot.addHook("afterRowSequenceChange",this.rowAxisSyncer.getIndexesChangeSyncMethod()),this.hot.addHook("afterColumnSequenceChange",this.columnAxisSyncer.getIndexesChangeSyncMethod()),this.hot.addHook("beforeRowMove",((e,t,o,s)=>{this.rowAxisSyncer.storeMovesInformation(e,t,s)})),this.hot.addHook("beforeColumnMove",((e,t,o,s)=>{this.columnAxisSyncer.storeMovesInformation(e,t,s)})),this.hot.addHook("afterRowMove",((e,t,o,s,n)=>{this.rowAxisSyncer.calculateAndSyncMoves(s,n)})),this.hot.addHook("afterColumnMove",((e,t,o,s,n)=>{this.columnAxisSyncer.calculateAndSyncMoves(s,n)})),this.hot.addHook("beforeColumnFreeze",((e,t)=>{this.columnAxisSyncer.storeMovesInformation([e],this.hot.getSettings().fixedColumnsStart,t)})),this.hot.addHook("afterColumnFreeze",((e,t)=>{this.columnAxisSyncer.calculateAndSyncMoves(t,t)})),this.hot.addHook("beforeColumnUnfreeze",((e,t)=>{this.columnAxisSyncer.storeMovesInformation([e],this.hot.getSettings().fixedColumnsStart-1,t)})),this.hot.addHook("afterColumnUnfreeze",((e,t)=>{this.columnAxisSyncer.calculateAndSyncMoves(t,t)})),this.addHook("afterCellMetaReset",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,H).call(t,...o)})),this.addHook("beforeUndo",(()=>{this.indexSyncer.setPerformUndo(!0),this.engine.undo()})),this.addHook("beforeRedo",(()=>{this.indexSyncer.setPerformRedo(!0),this.engine.redo()})),this.addHook("afterUndo",(()=>{this.indexSyncer.setPerformUndo(!1)})),this.addHook("afterUndo",(()=>{this.indexSyncer.setPerformRedo(!1)})),this.addHook("afterDetachChild",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,K).call(t,...o)})),this.addHook("beforeAutofill",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,P).call(t,...o)})),y(O,this).forEach((e=>{let[t,o]=e;return this.engine.on(t,o)})),super.enablePlugin()}else(0,l.warn)("Missing the required `engine` key in the Formulas settings. Please fill it with either an engine class or an engine instance.")}disablePlugin(){y(O,this).forEach((e=>{let[t,o]=e;return this.engine.off(t,o)})),(0,c.unregisterEngine)(this.engine,this.hot),this.engine=null,super.disablePlugin()}updatePlugin(e){const t=(0,d.getEngineSettingsWithOverrides)(this.hot.getSettings());(0,d.haveEngineSettingsChanged)(this.engine.getConfig(),t)&&this.engine.updateConfig(t);const o=this.hot.getSettings()[S];if((0,h.isDefined)(o)&&(0,h.isDefined)(o.sheetName)&&o.sheetName!==this.sheetName&&this.switchSheet(o.sheetName),!e.data&&null===this.sheetName){const e=this.hot.getSettings()[S].sheetName;e&&this.engine.doesSheetExist(e)?this.switchSheet(this.sheetName):this.sheetName=this.addSheet(null!=e?e:void 0,this.hot.getSourceDataArray())}super.updatePlugin(e)}destroy(){y(O,this).forEach((e=>{var t;let[o,s]=e;return null===(t=this.engine)||void 0===t?void 0:t.off(o,s)})),v(O,this,null),(0,c.unregisterEngine)(this.engine,this.hot),this.engine=null,super.destroy()}addSheet(e,t){if((0,h.isDefined)(t)&&!(0,g.isArrayOfArrays)(t))return(0,l.warn)("The provided data should be an array of arrays."),!1;if(null!=e&&this.engine.doesSheetExist(e))return(0,l.warn)("Sheet with the provided name already exists."),!1;try{const o=this.engine.addSheet(null!=e?e:void 0);return t&&this.engine.setSheetContent(this.engine.getSheetId(o),t),o}catch(e){return(0,l.warn)(e.message),!1}}switchSheet(e){if(!this.engine.doesSheetExist(e))return void(0,l.error)(`The sheet named \`${e}\` does not exist, switch aborted.`);this.sheetName=e;const t=this.engine.getSheetSerialized(this.sheetId);t.length>0&&this.hot.loadData(t,`${(0,f.toUpperCaseFirst)(S)}.switchSheet`)}getCellType(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.sheetId;const s=this.hot.toPhysicalRow(e),n=this.hot.toPhysicalColumn(t);return null!==s&&null!==n?this.engine.getCellType({sheet:o,row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t)}):"EMPTY"}isFormulaCellType(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.sheetId;return this.engine.doesCellHaveFormula({sheet:o,row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t)})}renderDependentSheets(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=new Set;e.forEach((e=>{var t;const s=null==e||null===(t=e.address)||void 0===t?void 0:t.sheet;void 0!==s&&(o.has(s)||o.add(s))})),(0,c.getRegisteredHotInstances)(this.engine).forEach(((e,s)=>{var n;(t||s!==this.sheetId)&&o.has(s)&&(e.render(),null===(n=e.view)||void 0===n||n.adjustElementsSize())}))}validateDependentCells(e){const t=e=>{var t;const{row:o,col:s,sheet:n}=null!==(t=null==e?void 0:e.address)&&void 0!==t?t:{};return(0,h.isDefined)(n)?`${n}:${o}x${s}`:""},o=new Set((arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).map((e=>t(e))));e.forEach((e=>{var s,n;const{row:i,col:r}=null!==(s=e.address)&&void 0!==s?s:{};if(!1===(0,h.isDefined)(i)||!1===(0,h.isDefined)(r)||i>=this.hot.countRows()||r>=this.hot.countCols())return;const l=null==e||null===(n=e.address)||void 0===n?void 0:n.sheet,a=t(e);if(void 0!==l&&!o.has(a)){const e=(0,c.getRegisteredHotInstances)(this.engine).get(l);if(!e)return;e.validateCell(e.getDataAtCell(i,r),e.getCellMeta(i,r),(()=>{}))}}))}syncChangeWithEngine(e,t,o){const s={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t),sheet:this.sheetId};if(!this.engine.isItPossibleToSetCellContents(s))return void(0,l.warn)(`Not possible to set cell data at ${JSON.stringify(s)}`);const n=this.hot.getCellMeta(e,t);return(0,u.isDate)(o,n.type)&&((0,u.isDateValid)(o,n.dateFormat)?o=(0,u.getDateInHfFormat)(o,n.dateFormat):!1===(0,u.isFormula)(o)&&(o=`'${o}`)),this.engine.setCellContents(s,o)}}function A(e,t,o){const s=this.hot.propToCol(o);if(this.isFormulaCellType(t,s)){const e={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(s),sheet:this.sheetId},o=this.hot.getCellMeta(t,s);let n=this.engine.getCellValue(e);return"date"===o.type&&(0,a.isNumeric)(n)&&(n=(0,u.getDateFromExcelDate)(n,o.dateFormat)),"object"==typeof n&&null!==n?n.value:n}return e}function P(e,t,o){const{row:s,col:n}=t.getTopStartCorner(),{row:i,col:r}=t.getBottomEndCorner(),{row:l,col:a}=o.getTopStartCorner(),{row:h,col:c}=o.getBottomEndCorner(),d={start:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(s),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(n),sheet:this.sheetId},end:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(i),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(r),sheet:this.sheetId}},g={start:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(l),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(a),sheet:this.sheetId},end:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(h),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(c),sheet:this.sheetId}};if(!1===this.engine.isItPossibleToSetCellContents(g))return!1;const f=this.engine.getFillRangeData(d,g),{row:p,col:m}=d.start,{row:w,col:C}=d.end,v=w-p+1,y=C-m+1;for(let e=0;e<f.length;e+=1)for(let t=0;t<f[e].length;t+=1){const o=f[e][t],s=p+e%v,n=m+t%y,i=this.hot.getCellMeta(s,n);(0,u.isDate)(o,i.type)&&(o.startsWith("'")?f[e][t]=o.slice(1):!1===this.isFormulaCellType(s,n,this.sheetId)&&(f[e][t]=(0,u.getDateInHotFormat)(o,i.dateFormat)))}return f}function x(e,t){(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"").includes((0,f.toUpperCaseFirst)(S))||v(M,this,(0,h.isUndefined)(this.hot.getSettings().data))}function H(){const e=this.hot.getSourceDataArray();let t=!1;e.forEach(((o,s)=>{o.forEach(((o,n)=>{const i=this.hot.getCellMeta(s,n),r=i.dateFormat;(0,u.isDate)(o,i.type)&&(t=!0,(0,u.isDateValid)(o,r)?e[s][n]=(0,u.getDateInHfFormat)(o,r):!1===this.isFormulaCellType(s,n)&&(e[s][n]=`'${o}`))}))})),!0===t&&(v(T,this,!0),this.engine.setSheetContent(this.sheetId,e),v(T,this,!1))}function D(e,t){if(!(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"").includes((0,f.toUpperCaseFirst)(S)))if(this.sheetName=(0,c.setupSheet)(this.engine,this.hot.getSettings()[S].sheetName),y(M,this))this.switchSheet(this.sheetName);else{const e=this.hot.getSourceDataArray();if(this.engine.isItPossibleToReplaceSheetContent(this.sheetId,e)){v(T,this,!0);const t=this.engine.setSheetContent(this.sheetId,e);this.indexSyncer.setupSyncEndpoint(this.engine,this.sheetId),this.renderDependentSheets(t),v(T,this,!1)}}}function L(e,t,o,s){if("get"!==s||y(T,this)||null===this.sheetName||!this.engine.doesSheetExist(this.sheetName))return;const n=this.hot.toVisualRow(e);if(null===n||null===t)return;if(!this.isFormulaCellType(n,t)){if("ARRAY"!==this.getCellType(n,t))return void((0,u.isEscapedFormulaExpression)(o.value)&&(o.value=(0,u.unescapeFormulaExpression)(o.value)))}const i={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(n),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t),sheet:this.sheetId};let r=this.engine.getCellValue(i),l=this.hot.getCellsMeta().find((e=>e.visualRow===n&&e.visualCol===t));void 0===l&&(l={}),"date"===l.type&&(0,a.isNumeric)(r)&&(r=(0,u.getDateFromExcelDate)(r,l.dateFormat));const h="object"==typeof r&&null!==r?r.value:r;o.value=h}function k(e,t,o,s){if("get"!==s||y(T,this)||null===this.sheetName||!this.engine.doesSheetExist(this.sheetName))return;const n=this.hot.toVisualRow(e),i=this.hot.propToCol(t);if(null===n||null===i)return;if(!this.isFormulaCellType(n,i)){if("ARRAY"!==this.getCellType(n,i))return}const r=this.engine.getSheetDimensions(this.engine.getSheetId(this.sheetName));if(0===r.width&&0===r.height)return;const l={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(n),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(i),sheet:this.sheetId};o.value=this.engine.getCellSerialized(l)}function V(e,t){if(_(t))return;const o=[],s=[],n=this.engine.batch((()=>{e.forEach((e=>{let[t,n,,i]=e;const r=this.hot.propToCol(n),l=this.hot.toPhysicalRow(t),a=this.hot.toPhysicalColumn(r),h={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(r),sheet:this.sheetId};null!==l&&null!==a?this.syncChangeWithEngine(t,r,i):o.push([t,r,i]),s.push({address:h})}))}));o.length&&this.hot.addHookOnce("afterChange",(()=>{const e=this.engine.batch((()=>{o.forEach((e=>{let[t,o,s]=e;this.syncChangeWithEngine(t,o,s)}))}));this.renderDependentSheets(e,!0)})),this.renderDependentSheets(n),this.validateDependentCells(n,s)}function F(e,t){if(_(t))return;const o=[],s=[];e.forEach((e=>{let[t,n,,i]=e;const r=this.hot.propToCol(n);if(!(0,a.isNumeric)(r))return;const h={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(r),sheet:this.sheetId};this.engine.isItPossibleToSetCellContents(h)?(s.push({address:h}),o.push(...this.engine.setCellContents(h,i))):(0,l.warn)(`Not possible to set source cell data at ${JSON.stringify(h)}`)})),this.renderDependentSheets(o),this.validateDependentCells(o,s)}function W(e,t){let o=this.rowAxisSyncer.getHfIndexFromVisualIndex(e);if(e>=this.hot.countRows()&&(o=e),null===this.sheetId||!this.engine.doesSheetExist(this.sheetName)||!this.engine.isItPossibleToAddRows(this.sheetId,[o,t]))return!1}function B(e,t){let o=this.columnAxisSyncer.getHfIndexFromVisualIndex(e);if(e>=this.hot.countCols()&&(o=e),null===this.sheetId||!this.engine.doesSheetExist(this.sheetName)||!this.engine.isItPossibleToAddColumns(this.sheetId,[o,t]))return!1}function U(e,t,o){return!1!==this.rowAxisSyncer.setRemovedHfIndexes(o).every((e=>this.engine.isItPossibleToRemoveRows(this.sheetId,[e,1])))&&void 0}function j(e,t,o){return!1!==this.columnAxisSyncer.setRemovedHfIndexes(o).every((e=>this.engine.isItPossibleToRemoveColumns(this.sheetId,[e,1])))&&void 0}function Y(e,t,o){if(_(o))return;const s=this.engine.addRows(this.sheetId,[this.rowAxisSyncer.getHfIndexFromVisualIndex(e),t]);this.renderDependentSheets(s)}function z(e,t,o){if(_(o))return;const s=this.engine.addColumns(this.sheetId,[this.columnAxisSyncer.getHfIndexFromVisualIndex(e),t]);this.renderDependentSheets(s)}function G(e,t,o,s){if(_(s))return;const n=this.rowAxisSyncer.getRemovedHfIndexes().sort(((e,t)=>t-e)),i=this.engine.batch((()=>{n.forEach((e=>{this.engine.removeRows(this.sheetId,[e,1])}))}));this.renderDependentSheets(i)}function $(e,t,o,s){if(_(s))return;const n=this.columnAxisSyncer.getRemovedHfIndexes().sort(((e,t)=>t-e)),i=this.engine.batch((()=>{n.forEach((e=>{this.engine.removeColumns(this.sheetId,[e,1])}))}));this.renderDependentSheets(i)}function K(e,t,o){var s;v(T,this,!0);const n=this.hot.getSourceDataArray(o,0,o+((null===(s=t.__children)||void 0===s?void 0:s.length)||0),this.hot.countSourceCols());v(T,this,!1),n.forEach(((e,t)=>{e.forEach(((e,s)=>{this.engine.setCellContents({col:s,row:o+t,sheet:this.sheetId},[[e]])}))}))}function X(e){this.hot.runHooks("afterFormulasValuesUpdate",e)}function q(e,t){this.hot.runHooks("afterNamedExpressionAdded",e,t)}function Q(e,t){this.hot.runHooks("afterNamedExpressionRemoved",e,t)}function J(e){this.hot.runHooks("afterSheetAdded",e)}function Z(e,t){this.sheetName=t,this.hot.runHooks("afterSheetRenamed",e,t)}function ee(e,t){this.hot.runHooks("afterSheetRemoved",e,t)}t.Formulas=N},1687:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(66244);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.Formulas=s.Formulas},28795:(e,t,o)=>{"use strict";t.__esModule=!0,o(67834),o(15724);var s=o(59777),n=o(77408);function i(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function r(e,t){return e.get(a(e,t))}function l(e,t,o){return e.set(a(e,t),o),o}function a(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var h=new WeakMap,c=new WeakMap,u=new WeakMap,d=new WeakMap,g=new WeakMap,f=new WeakMap,p=new WeakMap;t.default=class{constructor(e,t,o){i(this,h,void 0),i(this,c,void 0),i(this,u,void 0),i(this,d,[]),i(this,g,[]),i(this,f,void 0),i(this,p,[]),l(h,this,e),l(c,this,t),l(u,this,o)}setRemovedHfIndexes(e){return l(p,this,e.map((e=>{const t=r(c,this).getVisualFromPhysicalIndex(e);return this.getHfIndexFromVisualIndex(t)}))),r(p,this)}getRemovedHfIndexes(){return r(p,this)}getHfIndexFromVisualIndex(e){const t=r(c,this).getIndexesSequence(),o=r(c,this).getNotTrimmedIndexes();return t.indexOf(o[e])}syncMoves(e){const t=`move${(0,s.toUpperCaseFirst)(r(h,this))}s`;r(u,this).getEngine().batch((()=>{e.forEach((e=>{const o=e.from!==e.to,s=e.from+1!==e.to;o&&s&&r(u,this).getEngine()[t](r(u,this).getSheetId(),e.from,1,e.to)}))}))}storeMovesInformation(e,t,o){!1!==o&&(l(g,this,e.map((e=>this.getHfIndexFromVisualIndex(e)))),l(f,this,this.getHfIndexFromVisualIndex(t)))}calculateAndSyncMoves(e,t){if(r(u,this).isPerformingUndoRedo())return;if(!1===e||!1===t)return;const o=(0,n.getMoves)(r(g,this),r(f,this),r(c,this).getNumberOfIndexes());null===r(u,this).getSheetId()?r(u,this).getPostponeAction((()=>this.syncMoves(o))):this.syncMoves(o)}getIndexesChangeSyncMethod(){const e=`set${(0,s.toUpperCaseFirst)(r(h,this))}Order`;return t=>{if(r(u,this).isPerformingUndoRedo())return;const o=r(c,this).getIndexesSequence();if("update"===t&&o.length>0){const t=r(d,this).map((e=>o.indexOf(e))),s=r(u,this).getEngine().getSheetDimensions(r(u,this).getSheetId());let n;n="row"===r(h,this)?s.height:s.width;for(let e=t.length;e<n;e+=1)t.push(e);r(u,this).getEngine()[e](r(u,this).getSheetId(),t)}l(d,this,o)}}init(){l(d,this,r(c,this).getIndexesSequence())}}},27080:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=s(o(28795));function i(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function r(e,t){return e.get(a(e,t))}function l(e,t,o){return e.set(a(e,t),o),o}function a(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var h=new WeakMap,c=new WeakMap,u=new WeakMap,d=new WeakMap,g=new WeakMap,f=new WeakMap,p=new WeakMap;t.default=class{constructor(e,t,o){i(this,h,void 0),i(this,c,void 0),i(this,u,void 0),i(this,d,!1),i(this,g,!1),i(this,f,null),i(this,p,null),l(h,this,new n.default("row",e,this)),l(c,this,new n.default("column",t,this)),l(u,this,o)}getForAxis(e){return r("row"===e?h:c,this)}setPerformUndo(e){l(d,this,e)}setPerformRedo(e){l(g,this,e)}isPerformingUndoRedo(){return r(d,this)||r(g,this)}getSheetId(){return r(p,this)}getEngine(){return r(f,this)}getPostponeAction(){return r(u,this)}setupSyncEndpoint(e,t){l(f,this,e),l(p,this,t),r(h,this).init(),r(c,this).init()}}},92674:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.getDateFromExcelDate=function(e,t){const o=new Date(Date.UTC(0,0,e+-1));return(0,n.default)(o).format(t)},t.getDateInHfFormat=function(e,t){return(0,n.default)(e,t,!0).format(i)},t.getDateInHotFormat=function(e,t){return(0,n.default)(e,i,!0).format(t)},t.isDate=function(e,t){return"string"==typeof e&&"date"===t},t.isDateValid=function(e,t){return(0,n.default)(e,t,!0).isValid()},t.isEscapedFormulaExpression=r,t.isFormula=function(e){return"string"==typeof e&&e.startsWith("=")},t.unescapeFormulaExpression=function(e){return r(e)?e.substr(1):e};var n=s(o(86798));const i="DD/MM/YYYY";function r(e){return"string"==typeof e&&"'"===e.charAt(0)&&"="===e.charAt(1)}},63089:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"hidden_columns_hide",name(){const e=this.getSelectedLast();let t=0;if(Array.isArray(e)){const[,o,,s]=e;o-s!=0&&(t=1)}return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_HIDE_COLUMN,t)},callback(){const{from:t,to:o}=this.getSelectedRangeLast(),s=Math.max(Math.min(t.col,o.col),0),n=Math.max(t.col,o.col),i=[];for(let e=s;e<=n;e+=1)i.push(e);e.hideColumns(i);const r=i[i.length-1],l=this.columnIndexMapper.getNearestNotHiddenIndex(r,1,!0);Number.isInteger(l)&&l>=0?this.selectColumns(l):this.deselectCell(),this.render(),this.view.adjustElementsSize()},disabled:!1,hidden(){return!(this.selection.isSelectedByColumnHeader()||this.selection.isSelectedByCorner())}}},o(15724);var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=i?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}},29116:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=[];return{key:"hidden_columns_show",name(){const e=t.length>1?1:0;return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_SHOW_COLUMN,e)},callback(){var o,s;if(0===t.length)return;let n=t[0],i=t[t.length-1];n=null!==(o=this.columnIndexMapper.getNearestNotHiddenIndex(n-1,-1))&&void 0!==o?o:0,i=null!==(s=this.columnIndexMapper.getNearestNotHiddenIndex(i+1,1))&&void 0!==s?s:this.countCols()-1,e.showColumns(t),this.render(),this.view.adjustElementsSize();i-n+1===this.countCols()||this.selectColumns(n,i)},disabled:!1,hidden(){const o=(0,s.arrayMap)(e.getHiddenColumns(),(e=>this.toPhysicalColumn(e)));if(!this.selection.isSelectedByColumnHeader()&&!this.selection.isSelectedByCorner()||o.length<1)return!0;t.length=0;const n=this.getSelectedRangeLast(),i=n.getTopStartCorner().col,r=n.getBottomEndCorner().col,l=this.columnIndexMapper,a=l.getRenderableFromVisualIndex(i),h=l.getRenderableFromVisualIndex(r),c=l.getNotTrimmedIndexes(),u=[];if(i!==r){if(r-i+1>h-a+1){const e=c.slice(i,r+1);u.push(...e.filter((e=>o.includes(e))))}}else if(0===a&&a<i)u.push(...c.slice(0,i));else if(null===a)u.push(...c.slice(0,this.countCols()));else{const e=this.countCols()-1;h===l.getRenderableFromVisualIndex(l.getNearestNotHiddenIndex(e,-1))&&e>r&&u.push(...c.slice(r+1))}return(0,s.arrayEach)(u,(e=>{t.push(this.toVisualColumn(e))})),0===t.length}}},o(15724);var s=o(9175),n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}},10452:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724),o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var n=o(61205),i=o(9893),r=o(87485),l=o(9175),a=o(13911),h=o(38893),c=o(58653),u=s(o(56937)),d=s(o(63089)),g=s(o(29116)),f=o(93969);function p(e,t,o){m(e,t),t.set(e,o)}function m(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function w(e,t){return e.get(v(e,t))}function C(e,t,o){return e.set(v(e,t),o),o}function v(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}o(93975),u.default.getSingleton().register("beforeHideColumns"),u.default.getSingleton().register("afterHideColumns"),u.default.getSingleton().register("beforeUnhideColumns"),u.default.getSingleton().register("afterUnhideColumns");const y=t.PLUGIN_KEY="hiddenColumns",E=t.PLUGIN_PRIORITY=310;var S=new WeakMap,R=new WeakMap,b=new WeakSet;class _ extends n.BasePlugin{constructor(){var e,t;super(...arguments),m(e=this,t=b),t.add(e),p(this,S,{}),p(this,R,null)}static get PLUGIN_KEY(){return y}static get PLUGIN_PRIORITY(){return E}isEnabled(){return!!this.hot.getSettings()[y]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[y];(0,a.isObject)(t)&&(C(S,this,t),(0,h.isUndefined)(t.copyPasteEnabled)&&(t.copyPasteEnabled=!0)),C(R,this,new f.HidingMap),w(R,this).addLocalHook("init",(()=>v(b,this,A).call(this))),this.hot.columnIndexMapper.registerMap(this.pluginName,w(R,this)),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(b,e,N).call(e,...o)})),this.addHook("afterGetCellMeta",((e,t,o)=>v(b,this,M).call(this,e,t,o))),this.addHook("modifyColWidth",((e,t)=>v(b,this,T).call(this,e,t)),2),this.addHook("afterGetColHeader",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(b,e,I).call(e,...o)})),this.addHook("modifyCopyableRange",(e=>v(b,this,O).call(this,e))),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.hot.columnIndexMapper.unregisterMap(this.pluginName),C(S,this,{}),super.disablePlugin(),this.resetCellsMeta()}showColumns(e){const t=this.getHiddenColumns(),o=this.isValidConfig(e);let s=t;const n=w(R,this).getValues().slice(),i=e.length>0;if(o&&i){const t=e.map((e=>this.hot.toPhysicalColumn(e)));(0,l.arrayEach)(t,(e=>{n[e]=!1})),s=(0,l.arrayReduce)(n,((e,t,o)=>(t&&e.push(this.hot.toVisualColumn(o)),e)),[])}!1!==this.hot.runHooks("beforeUnhideColumns",t,s,o&&i)&&(o&&i&&w(R,this).setValues(n),this.hot.view.adjustElementsSize(),this.hot.runHooks("afterUnhideColumns",t,s,o&&i,o&&s.length<t.length))}showColumn(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.showColumns(t)}hideColumns(e){const t=this.getHiddenColumns(),o=this.isValidConfig(e);let s=t;o&&(s=Array.from(new Set(t.concat(e))));!1!==this.hot.runHooks("beforeHideColumns",t,s,o)&&(o&&this.hot.batchExecution((()=>{(0,l.arrayEach)(e,(e=>{w(R,this).setValueAtIndex(this.hot.toPhysicalColumn(e),!0)}))}),!0),this.hot.runHooks("afterHideColumns",t,s,o,o&&s.length>t.length))}hideColumn(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.hideColumns(t)}getHiddenColumns(){return(0,l.arrayMap)(w(R,this).getHiddenIndexes(),(e=>this.hot.toVisualColumn(e)))}isHidden(e){return w(R,this).getValueAtIndex(this.hot.toPhysicalColumn(e))||!1}isValidConfig(e){const t=this.hot.countCols();return!!(Array.isArray(e)&&e.length>0)&&e.every((e=>Number.isInteger(e)&&e>=0&&e<t))}resetCellsMeta(){(0,l.arrayEach)(this.hot.getCellsMeta(),(e=>{e&&(e.skipColumnOnPaste=!1)}))}destroy(){C(S,this,null),C(R,this,null),super.destroy()}}function T(e,t){return this.isHidden(t)?0:w(S,this).indicators&&(this.isHidden(t+1)||this.isHidden(t-1))&&"number"==typeof e&&this.hot.hasColHeaders()?e+15:void 0}function M(e,t,o){if(!1===w(S,this).copyPasteEnabled&&this.isHidden(t)&&(o.skipColumnOnPaste=!0),this.isHidden(t-1))o.className=o.className||"",-1===o.className.indexOf("afterHiddenColumn")&&(o.className+=" afterHiddenColumn");else if(o.className){const e=o.className.split(" ");if(e.length>0){const t=e.indexOf("afterHiddenColumn");t>-1&&e.splice(t,1),o.className=e.join(" ")}}}function O(e){if(w(S,this).copyPasteEnabled)return e;const t=[],o=(e,o,s,n)=>{t.push({startRow:e,endRow:o,startCol:s,endCol:n})};return(0,l.arrayEach)(e,(e=>{let t=!0,s=0;(0,r.rangeEach)(e.startCol,e.endCol,(n=>{this.isHidden(n)?(t||o(e.startRow,e.endRow,s,n-1),t=!0):(t&&(s=n),n===e.endCol&&o(e.startRow,e.endRow,s,n),t=!1)}))})),t}function I(e,t){if(!w(S,this).indicators||e<0)return;const o=[];e>=1&&this.isHidden(e-1)&&o.push("afterHiddenColumn"),e<this.hot.countCols()-1&&this.isHidden(e+1)&&o.push("beforeHiddenColumn"),(0,i.addClass)(t,o)}function N(e){e.items.push({name:c.SEPARATOR},(0,d.default)(this),(0,g.default)(this))}function A(){Array.isArray(w(S,this).columns)&&this.hideColumns(w(S,this).columns)}t.HiddenColumns=_},61275:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(10452);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.HiddenColumns=s.HiddenColumns},29969:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"hidden_rows_hide",name(){const e=this.getSelectedLast();let t=0;if(Array.isArray(e)){const[o,,s]=e;o-s!=0&&(t=1)}return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_HIDE_ROW,t)},callback(){const{from:t,to:o}=this.getSelectedRangeLast(),s=Math.max(Math.min(t.row,o.row),0),n=Math.max(t.row,o.row),i=[];for(let e=s;e<=n;e+=1)i.push(e);e.hideRows(i);const r=i[i.length-1],l=this.rowIndexMapper.getNearestNotHiddenIndex(r,1,!0);Number.isInteger(l)&&l>=0?this.selectRows(l):this.deselectCell(),this.render(),this.view.adjustElementsSize()},disabled:!1,hidden(){return!(this.selection.isSelectedByRowHeader()||this.selection.isSelectedByCorner())}}},o(15724);var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=i?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}},62526:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=[];return{key:"hidden_rows_show",name(){const e=t.length>1?1:0;return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_SHOW_ROW,e)},callback(){var o,s;if(0===t.length)return;let n=t[0],i=t[t.length-1];n=null!==(o=this.rowIndexMapper.getNearestNotHiddenIndex(n-1,-1))&&void 0!==o?o:0,i=null!==(s=this.rowIndexMapper.getNearestNotHiddenIndex(i+1,1))&&void 0!==s?s:this.countRows()-1,e.showRows(t),this.render(),this.view.adjustElementsSize();i-n+1===this.countRows()||this.selectRows(n,i)},disabled:!1,hidden(){const o=(0,s.arrayMap)(e.getHiddenRows(),(e=>this.toPhysicalRow(e)));if(!this.selection.isSelectedByRowHeader()&&!this.selection.isSelectedByCorner()||o.length<1)return!0;t.length=0;const n=this.getSelectedRangeLast(),i=n.getTopStartCorner().row,r=n.getBottomEndCorner().row,l=this.rowIndexMapper,a=l.getRenderableFromVisualIndex(i),h=l.getRenderableFromVisualIndex(r),c=l.getNotTrimmedIndexes(),u=[];if(i!==r){if(r-i+1>h-a+1){const e=c.slice(i,r+1);u.push(...e.filter((e=>o.includes(e))))}}else if(0===a&&a<i)u.push(...c.slice(0,i));else if(null===a)u.push(...c.slice(0,this.countRows()));else{const e=this.countRows()-1;h===l.getRenderableFromVisualIndex(l.getNearestNotHiddenIndex(e,-1))&&e>r&&u.push(...c.slice(r+1))}return(0,s.arrayEach)(u,(e=>{t.push(this.toVisualRow(e))})),0===t.length}}},o(15724);var s=o(9175),n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}},3572:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724),o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var n=o(61205),i=o(9893),r=o(87485),l=o(9175),a=o(13911),h=o(38893),c=o(58653),u=s(o(56937)),d=s(o(29969)),g=s(o(62526)),f=o(93969);function p(e,t,o){m(e,t),t.set(e,o)}function m(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function w(e,t){return e.get(v(e,t))}function C(e,t,o){return e.set(v(e,t),o),o}function v(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}o(87572),u.default.getSingleton().register("beforeHideRows"),u.default.getSingleton().register("afterHideRows"),u.default.getSingleton().register("beforeUnhideRows"),u.default.getSingleton().register("afterUnhideRows");const y=t.PLUGIN_KEY="hiddenRows",E=t.PLUGIN_PRIORITY=320;var S=new WeakMap,R=new WeakMap,b=new WeakSet;class _ extends n.BasePlugin{constructor(){var e,t;super(...arguments),m(e=this,t=b),t.add(e),p(this,S,{}),p(this,R,null)}static get PLUGIN_KEY(){return y}static get PLUGIN_PRIORITY(){return E}isEnabled(){return!!this.hot.getSettings()[y]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[y];(0,a.isObject)(t)&&(C(S,this,t),(0,h.isUndefined)(t.copyPasteEnabled)&&(t.copyPasteEnabled=!0)),C(R,this,new f.HidingMap),w(R,this).addLocalHook("init",(()=>v(b,this,A).call(this))),this.hot.rowIndexMapper.registerMap(this.pluginName,w(R,this)),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(b,e,N).call(e,...o)})),this.addHook("afterGetCellMeta",((e,t,o)=>v(b,this,M).call(this,e,t,o))),this.addHook("modifyRowHeight",((e,t)=>v(b,this,T).call(this,e,t))),this.addHook("afterGetRowHeader",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(b,e,I).call(e,...o)})),this.addHook("modifyCopyableRange",(e=>v(b,this,O).call(this,e))),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap(this.pluginName),C(S,this,{}),super.disablePlugin(),this.resetCellsMeta()}showRows(e){const t=this.getHiddenRows(),o=this.isValidConfig(e);let s=t;const n=w(R,this).getValues().slice(),i=e.length>0;if(o&&i){const t=e.map((e=>this.hot.toPhysicalRow(e)));(0,l.arrayEach)(t,(e=>{n[e]=!1})),s=(0,l.arrayReduce)(n,((e,t,o)=>(t&&e.push(this.hot.toVisualRow(o)),e)),[])}!1!==this.hot.runHooks("beforeUnhideRows",t,s,o&&i)&&(o&&i&&w(R,this).setValues(n),this.hot.runHooks("afterUnhideRows",t,s,o&&i,o&&s.length<t.length))}showRow(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.showRows(t)}hideRows(e){const t=this.getHiddenRows(),o=this.isValidConfig(e);let s=t;o&&(s=Array.from(new Set(t.concat(e))));!1!==this.hot.runHooks("beforeHideRows",t,s,o)&&(o&&this.hot.batchExecution((()=>{(0,l.arrayEach)(e,(e=>{w(R,this).setValueAtIndex(this.hot.toPhysicalRow(e),!0)}))}),!0),this.hot.runHooks("afterHideRows",t,s,o,o&&s.length>t.length))}hideRow(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.hideRows(t)}getHiddenRows(){return(0,l.arrayMap)(w(R,this).getHiddenIndexes(),(e=>this.hot.toVisualRow(e)))}isHidden(e){return w(R,this).getValueAtIndex(this.hot.toPhysicalRow(e))||!1}isValidConfig(e){const t=this.hot.countRows();return!!(Array.isArray(e)&&e.length>0)&&e.every((e=>Number.isInteger(e)&&e>=0&&e<t))}resetCellsMeta(){(0,l.arrayEach)(this.hot.getCellsMeta(),(e=>{e&&(e.skipRowOnPaste=!1)}))}destroy(){C(S,this,null),C(R,this,null),super.destroy()}}function T(e,t){return this.isHidden(t)?0:e}function M(e,t,o){if(!1===w(S,this).copyPasteEnabled&&this.isHidden(e)&&(o.skipRowOnPaste=!0),this.isHidden(e-1))o.className=o.className||"",-1===o.className.indexOf("afterHiddenRow")&&(o.className+=" afterHiddenRow");else if(o.className){const e=o.className.split(" ");if(e.length>0){const t=e.indexOf("afterHiddenRow");t>-1&&e.splice(t,1),o.className=e.join(" ")}}}function O(e){if(w(S,this).copyPasteEnabled)return e;const t=[],o=(e,o,s,n)=>{t.push({startRow:e,endRow:o,startCol:s,endCol:n})};return(0,l.arrayEach)(e,(e=>{let t=!0,s=0;(0,r.rangeEach)(e.startRow,e.endRow,(n=>{this.isHidden(n)?(t||o(s,n-1,e.startCol,e.endCol),t=!0):(t&&(s=n),n===e.endRow&&o(s,n,e.startCol,e.endCol),t=!1)}))})),t}function I(e,t){if(!w(S,this).indicators||e<0)return;const o=[];e>=1&&this.isHidden(e-1)&&o.push("afterHiddenRow"),e<this.hot.countRows()-1&&this.isHidden(e+1)&&o.push("beforeHiddenRow"),(0,i.addClass)(t,o)}function N(e){e.items.push({name:c.SEPARATOR},(0,d.default)(this),(0,g.default)(this))}function A(){Array.isArray(w(S,this).rows)&&this.hideRows(w(S,this).rows)}t.HiddenRows=_},23657:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(3572);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.HiddenRows=s.HiddenRows},90859:(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllPlugins=function(){(0,k.registerPlugin)(s.AutoColumnSize),(0,k.registerPlugin)(n.Autofill),(0,k.registerPlugin)(i.AutoRowSize),(0,k.registerPlugin)(l.BindRowsWithHeaders),(0,k.registerPlugin)(a.CollapsibleColumns),(0,k.registerPlugin)(h.ColumnSorting),(0,k.registerPlugin)(c.ColumnSummary),(0,k.registerPlugin)(u.Comments),(0,k.registerPlugin)(d.ContextMenu),(0,k.registerPlugin)(g.CopyPaste),(0,k.registerPlugin)(f.CustomBorders),(0,k.registerPlugin)(p.DragToScroll),(0,k.registerPlugin)(m.DropdownMenu),(0,k.registerPlugin)(w.ExportFile),(0,k.registerPlugin)(C.Filters),(0,k.registerPlugin)(v.Formulas),(0,k.registerPlugin)(y.HiddenColumns),(0,k.registerPlugin)(E.HiddenRows),(0,k.registerPlugin)(S.ManualColumnFreeze),(0,k.registerPlugin)(R.ManualColumnMove),(0,k.registerPlugin)(b.ManualColumnResize),(0,k.registerPlugin)(_.ManualRowMove),(0,k.registerPlugin)(T.ManualRowResize),(0,k.registerPlugin)(M.MergeCells),(0,k.registerPlugin)(O.MultiColumnSorting),(0,k.registerPlugin)(I.MultipleSelectionHandles),(0,k.registerPlugin)(N.NestedHeaders),(0,k.registerPlugin)(A.NestedRows),(0,k.registerPlugin)(P.PersistentState),(0,k.registerPlugin)(x.Search),(0,k.registerPlugin)(H.TouchScroll),(0,k.registerPlugin)(D.TrimRows),(0,k.registerPlugin)(L.UndoRedo)};var s=o(58764);t.AutoColumnSize=s.AutoColumnSize;var n=o(3018);t.Autofill=n.Autofill;var i=o(45452);t.AutoRowSize=i.AutoRowSize;var r=o(61205);t.BasePlugin=r.BasePlugin;var l=o(92860);t.BindRowsWithHeaders=l.BindRowsWithHeaders;var a=o(67607);t.CollapsibleColumns=a.CollapsibleColumns;var h=o(16050);t.ColumnSorting=h.ColumnSorting;var c=o(93642);t.ColumnSummary=c.ColumnSummary;var u=o(41270);t.Comments=u.Comments;var d=o(10668);t.ContextMenu=d.ContextMenu;var g=o(90112);t.CopyPaste=g.CopyPaste;var f=o(27470);t.CustomBorders=f.CustomBorders;var p=o(66762);t.DragToScroll=p.DragToScroll;var m=o(71110);t.DropdownMenu=m.DropdownMenu;var w=o(35472);t.ExportFile=w.ExportFile;var C=o(85471);t.Filters=C.Filters;var v=o(1687);t.Formulas=v.Formulas;var y=o(61275);t.HiddenColumns=y.HiddenColumns;var E=o(23657);t.HiddenRows=E.HiddenRows;var S=o(52339);t.ManualColumnFreeze=S.ManualColumnFreeze;var R=o(10297);t.ManualColumnMove=R.ManualColumnMove;var b=o(39996);t.ManualColumnResize=b.ManualColumnResize;var _=o(33283);t.ManualRowMove=_.ManualRowMove;var T=o(83610);t.ManualRowResize=T.ManualRowResize;var M=o(12897);t.MergeCells=M.MergeCells;var O=o(80657);t.MultiColumnSorting=O.MultiColumnSorting;var I=o(37917);t.MultipleSelectionHandles=I.MultipleSelectionHandles;var N=o(53495);t.NestedHeaders=N.NestedHeaders;var A=o(15434);t.NestedRows=A.NestedRows;var P=o(46634);t.PersistentState=P.PersistentState;var x=o(33004);t.Search=x.Search;var H=o(70618);t.TouchScroll=H.TouchScroll;var D=o(97089);t.TrimRows=D.TrimRows;var L=o(69922);t.UndoRedo=L.UndoRedo;var k=o(90532);t.registerPlugin=k.registerPlugin,t.getPlugin=k.getPlugin,t.getPluginsNames=k.getPluginsNames},74102:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"freeze_column",name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_FREEZE_COLUMN)},callback(t,o){const[{start:{col:s}}]=o;e.freezeColumn(s),this.render(),this.view.adjustElementsSize()},hidden(){const e=this.getSelectedRange();let t=!1;return(void 0===e||e.length>1||e[0].from.col!==e[0].to.col||e[0].from.col<=this.getSettings().fixedColumnsStart-1)&&(t=!0),t}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=i?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}},62157:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"unfreeze_column",name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN)},callback(t,o){const[{start:{col:s}}]=o;e.unfreezeColumn(s),this.render(),this.view.adjustElementsSize()},hidden(){const e=this.getSelectedRange();let t=!1;return(void 0===e||e.length>1||e[0].from.col!==e[0].to.col||e[0].from.col>=this.getSettings().fixedColumnsStart)&&(t=!0),t}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=i?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}},52339:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(45636);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualColumnFreeze=s.ManualColumnFreeze},45636:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=o(61205),i=s(o(56937)),r=s(o(74102)),l=s(o(62157));function a(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function h(e,t){return e.get(u(e,t))}function c(e,t,o){return e.set(u(e,t),o),o}function u(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}o(54228),i.default.getSingleton().register("beforeColumnFreeze"),i.default.getSingleton().register("afterColumnFreeze"),i.default.getSingleton().register("beforeColumnUnfreeze"),i.default.getSingleton().register("afterColumnUnfreeze");const d=t.PLUGIN_KEY="manualColumnFreeze",g=t.PLUGIN_PRIORITY=110;var f=new WeakMap,p=new WeakSet;class m extends n.BasePlugin{constructor(){var e,t;super(...arguments),a(e=this,t=p),t.add(e),function(e,t,o){a(e,t),t.set(e,o)}(this,f,!1)}static get PLUGIN_KEY(){return d}static get PLUGIN_PRIORITY(){return g}isEnabled(){return!!this.hot.getSettings()[d]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",(e=>u(p,this,w).call(this,e))),this.addHook("beforeColumnMove",((e,t)=>u(p,this,C).call(this,e,t))),super.enablePlugin())}disablePlugin(){c(f,this,!1),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}freezeColumn(e){const t=this.hot.getSettings(),o=t.fixedColumnsStart<this.hot.countCols()&&e>t.fixedColumnsStart-1;h(f,this)||c(f,this,!0);!1!==this.hot.runHooks("beforeColumnFreeze",e,o)&&(o&&(this.hot.columnIndexMapper.moveIndexes(e,t.fixedColumnsStart),t._fixedColumnsStart+=1),this.hot.runHooks("afterColumnFreeze",e,o))}unfreezeColumn(e){const t=this.hot.getSettings(),o=t.fixedColumnsStart>0&&e<=t.fixedColumnsStart-1;h(f,this)||c(f,this,!0);!1!==this.hot.runHooks("beforeColumnUnfreeze",e,o)&&(o&&(t._fixedColumnsStart-=1,this.hot.columnIndexMapper.moveIndexes(e,t.fixedColumnsStart)),this.hot.runHooks("afterColumnUnfreeze",e,o))}}function w(e){e.items.push({name:"---------"},(0,r.default)(this),(0,l.default)(this))}function C(e,t){if(h(f,this)){const o=this.hot.getSettings().fixedColumnsStart;if(t<o)return!1;if(e.some((e=>e<o)))return!1}}t.ManualColumnFreeze=m},10297:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(40408);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualColumnMove=s.ManualColumnMove},40408:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=o(61205),i=s(o(56937)),r=o(9175),l=o(9893),a=o(79729),h=o(87485),c=s(o(8965)),u=s(o(39822));function d(e,t,o){g(e,t),t.set(e,o)}function g(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function f(e,t,o){return e.set(m(e,t),o),o}function p(e,t){return e.get(m(e,t))}function m(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}o(54008),i.default.getSingleton().register("beforeColumnMove"),i.default.getSingleton().register("afterColumnMove");const w=t.PLUGIN_KEY="manualColumnMove",C=t.PLUGIN_PRIORITY=120,v="ht__manualColumnMove",y="show-ui",E="on-moving--columns",S="after-selection--columns";var R=new WeakMap,b=new WeakMap,_=new WeakMap,T=new WeakMap,M=new WeakMap,O=new WeakMap,I=new WeakMap,N=new WeakMap,A=new WeakMap,P=new WeakMap,x=new WeakMap,H=new WeakSet;class D extends n.BasePlugin{constructor(){var e,t;super(...arguments),g(e=this,t=H),t.add(e),d(this,R,new c.default(this.hot)),d(this,b,new u.default(this.hot)),d(this,_,[]),d(this,T,0),d(this,M,!1),d(this,O,{}),d(this,I,void 0),d(this,N,void 0),d(this,A,void 0),d(this,P,void 0),d(this,x,void 0)}static get PLUGIN_KEY(){return w}static get PLUGIN_PRIORITY(){return C}isEnabled(){return!!this.hot.getSettings()[w]}enablePlugin(){var e=this;this.enabled||(this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return m(H,e,L).call(e,...o)})),this.addHook("beforeOnCellMouseOver",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return m(H,e,V).call(e,...o)})),this.addHook("afterScrollVertically",(()=>m(H,this,W).call(this))),this.addHook("afterLoadData",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return m(H,e,B).call(e,...o)})),this.buildPluginUI(),this.registerEvents(),(0,l.addClass)(this.hot.rootElement,v),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){(0,l.removeClass)(this.hot.rootElement,v),this.unregisterEvents(),p(R,this).destroy(),p(b,this).destroy(),super.disablePlugin()}moveColumn(e,t){return this.moveColumns([e],t)}moveColumns(e,t){const o=p(I,this),s=this.isMovePossible(e,t),n=this.hot.runHooks("beforeColumnMove",e,t,o,s);if(f(I,this,void 0),!1===n)return;s&&this.hot.columnIndexMapper.moveIndexes(e,t);const i=s&&this.isColumnOrderChanged(e,t);return this.hot.runHooks("afterColumnMove",e,t,o,s,i),i}dragColumn(e,t){return this.dragColumns([e],t)}dragColumns(e,t){const o=this.countFinalIndex(e,t);return f(I,this,t),this.moveColumns(e,o)}isMovePossible(e,t){const o=this.hot.columnIndexMapper.getNotTrimmedIndexesLength(),s=e.length+t>o,n=t<0,i=e.some((e=>e<0)),r=e.some((e=>e>=o));return!(s||n||i||r)}isColumnOrderChanged(e,t){return e.some(((e,o)=>e-o!==t))}countFinalIndex(e,t){const o=(0,r.arrayReduce)(e,((e,o)=>(o<t&&(e+=1),e)),0);return t-o}getColumnsWidth(e,t){const o=this.hot.columnIndexMapper;let s=0;for(let n=e;n<=t;n+=1){const e=o.getRenderableFromVisualIndex(n);n<0?s+=this.hot.view._wt.wtViewport.getRowHeaderWidth()||0:null!==e&&(s+=this.hot.view._wt.wtTable.getStretchedColumnWidth(e)||0)}return s}moveBySettingsOrLoad(){const e=this.hot.getSettings()[w];if(Array.isArray(e))this.moveColumns(e,0);else if(void 0!==e){const e=this.persistentStateLoad();e.length&&this.moveColumns(e,0)}}isFixedColumnsStart(e){return e<this.hot.getSettings().fixedColumnsStart}persistentStateSave(){this.hot.runHooks("persistentStateSave","manualColumnMove",this.hot.columnIndexMapper.getIndexesSequence())}persistentStateLoad(){const e={};return this.hot.runHooks("persistentStateLoad","manualColumnMove",e),e.value?e.value:[]}prepareColumnsToMoving(e,t){const o=[];return(0,h.rangeEach)(e,t,(e=>{o.push(e)})),o}refreshPositions(){const e=this.hot.view.getFirstFullyVisibleColumn();this.isFixedColumnsStart(p(N,this))&&e>0&&this.hot.scrollViewportTo({col:this.hot.columnIndexMapper.getNearestNotHiddenIndex(e-1,-1)});const t=this.hot.view._wt.wtTable,o=this.hot.view._wt.wtOverlays.scrollableElement,s="number"==typeof o.scrollX?o.scrollX:o.scrollLeft;let n=this.hot.view.THEAD.offsetLeft+this.getColumnsWidth(0,p(N,this)-1);const i=t.hider.offsetWidth,r=t.TBODY.offsetLeft,a=p(R,this).getOffset().start,h=p(R,this).getSize().width;let c=0,u=0;if(this.hot.isRtl()){const e=this.hot.rootWindow,t=(0,l.outerWidth)(this.hot.rootElement),n=e.innerWidth-p(A,this)-t;u=e.innerWidth-p(O,this).eventPageX-n-(void 0===o.scrollX?s:0)}else u=p(O,this).eventPageX-(p(A,this)-(void 0===o.scrollX?s:0));if(p(P,this)&&(c=this.hot.view._wt.wtOverlays.inlineStartOverlay.clone.wtTable.getColumnHeader(-1).offsetWidth),this.isFixedColumnsStart(p(N,this))&&(n+=s),n+=c,p(N,this)<0)p(x,this)>0?p(O,this).col=0:p(O,this).col=e>0?e-1:e;else if(p(O,this).TD.offsetWidth/2+n<=u){const e=p(N,this)>=p(T,this)?p(T,this)-1:p(N,this);p(O,this).col=e+1,n+=p(O,this).TD.offsetWidth}else p(O,this).col=p(N,this);let d=u,g=n;u+h+a>=i?d=i-h-a:u+a<r+c&&(d=r+c+Math.abs(a)),n>=i-1?g=i-1:0===g?g=1:void 0!==o.scrollX&&p(N,this)<p(x,this)&&(g-=p(A,this)<=o.scrollX?p(A,this):0),p(R,this).setPosition(null,d),p(b,this).setPosition(null,g)}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mousemove",(e=>m(H,this,k).call(this,e))),this.eventManager.addEventListener(e,"mouseup",(()=>m(H,this,F).call(this)))}unregisterEvents(){this.eventManager.clear()}buildPluginUI(){p(R,this).build(),p(b,this).build()}destroy(){p(R,this).destroy(),p(b,this).destroy(),super.destroy()}}function L(e,t,o,s){const n=this.hot.view._wt.wtTable,i=this.hot.selection.isSelectedByColumnHeader(),r=this.hot.getSelectedRangeLast(),h=(0,l.hasClass)(e.target,"sortAction");if(!r||!i||p(M,this)||0!==e.button||h)return f(M,this,!1),p(_,this).length=0,void(0,l.removeClass)(this.hot.rootElement,[E,y]);const c=p(b,this).isBuilt()&&!p(b,this).isAppended(),u=p(R,this).isBuilt()&&!p(R,this).isAppended();c&&u&&(p(b,this).appendTo(n.hider),p(R,this).appendTo(n.hider));const{from:d,to:g}=r,m=Math.min(d.col,g.col),w=Math.max(d.col,g.col);if(t.row<0&&t.col>=m&&t.col<=w){s.column=!0,f(M,this,!0);const i=o.firstChild?(0,a.offsetRelativeTo)(e,o.firstChild).x:e.offsetX;p(O,this).eventPageX=e.pageX,f(N,this,t.col),p(O,this).TD=o,p(O,this).col=t.col,f(_,this,this.prepareColumnsToMoving(m,w)),f(P,this,!!this.hot.getSettings().rowHeaders),f(T,this,this.hot.countCols()),f(x,this,this.hot.getSettings().fixedColumnsStart),f(A,this,(0,l.offset)(this.hot.rootElement).left);const r=p(P,this)?-1:0,h=n.holder.scrollTop+n.getColumnHeaderHeight(0)+1,c=t.col<p(x,this),u=this.hot.view._wt.wtOverlays.inlineStartOverlay.getOverlayOffset(),d=Math.abs(i-(this.hot.isRtl()?o.offsetWidth:0)),g=this.getColumnsWidth(m,t.col-1)+d,C=this.getColumnsWidth(r,m-1)+(c?u:0)+g;p(R,this).setPosition(h,C),p(R,this).setSize(this.getColumnsWidth(m,w),n.hider.offsetHeight-h),p(R,this).setOffset(null,-g),(0,l.addClass)(this.hot.rootElement,E)}else(0,l.removeClass)(this.hot.rootElement,S),f(M,this,!1),p(_,this).length=0}function k(e){p(M,this)&&(p(O,this).eventPageX=e.pageX,this.refreshPositions())}function V(e,t,o,s){this.hot.getSelectedRangeLast()&&p(M,this)&&(p(_,this).indexOf(t.col)>-1?(0,l.removeClass)(this.hot.rootElement,y):(0,l.addClass)(this.hot.rootElement,y),s.row=!0,s.column=!0,s.cell=!0,f(N,this,t.col),p(O,this).TD=o)}function F(){const e=p(O,this).col,t=p(_,this).length;if(f(N,this,void 0),f(M,this,!1),(0,l.removeClass)(this.hot.rootElement,[E,y,S]),this.hot.selection.isSelectedByColumnHeader()&&(0,l.addClass)(this.hot.rootElement,S),t<1||void 0===e)return;const o=p(_,this)[0],s=this.hot.toPhysicalColumn(o),n=this.dragColumns(p(_,this),e);if(p(_,this).length=0,!0===n){this.persistentStateSave(),this.hot.render(),this.hot.view.adjustElementsSize();const e=this.hot.toVisualColumn(s),o=e+t-1;this.hot.selectColumns(e,o)}}function W(){const e=this.hot.view._wt.wtTable,t=e.getColumnHeaderHeight(0)+1+e.holder.scrollTop;p(R,this).setPosition(t),p(R,this).setSize(null,e.hider.offsetHeight-t)}function B(){this.moveBySettingsOrLoad()}t.ManualColumnMove=D},2444:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707)),i=o(87485),r=o(59777);const l="px";t.default=class{constructor(e){(0,n.default)(this,"hot",void 0),(0,n.default)(this,"_element",null),(0,n.default)(this,"state",0),(0,n.default)(this,"inlineProperty",void 0),this.hot=e,this.inlineProperty=e.isRtl()?"right":"left"}appendTo(e){e.appendChild(this._element),this.state=2}build(){0===this.state&&(this._element=this.hot.rootDocument.createElement("div"),this.state=1)}destroy(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=0}isAppended(){return 2===this.state}isBuilt(){return this.state>=1}setPosition(e,t){(0,i.isNumeric)(e)&&(this._element.style.top=e+l),(0,i.isNumeric)(t)&&(this._element.style[this.inlineProperty]=t+l)}getPosition(){const e=this._element.style;return{top:e.top?parseInt(e.top,10):0,start:e[this.inlineProperty]?parseInt(e[this.inlineProperty],10):0}}setSize(e,t){(0,i.isNumeric)(e)&&(this._element.style.width=e+l),(0,i.isNumeric)(t)&&(this._element.style.height=t+l)}getSize(){return{width:this._element.style.width?parseInt(this._element.style.width,10):0,height:this._element.style.height?parseInt(this._element.style.height,10):0}}setOffset(e,t){(0,i.isNumeric)(e)&&(this._element.style.marginTop=e+l),(0,i.isNumeric)(t)&&(this._element.style[`margin${(0,r.toUpperCaseFirst)(this.inlineProperty)}`]=t+l)}getOffset(){const e=this._element.style,t=`margin${(0,r.toUpperCaseFirst)(this.inlineProperty)}`;return{top:e.marginTop?parseInt(e.marginTop,10):0,start:e[t]?parseInt(e[t],10):0}}}},8965:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(2444)),i=o(9893);class r extends n.default{build(){super.build(),(0,i.addClass)(this._element,"ht__manualColumnMove--backlight")}}t.default=r},39822:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(2444)),i=o(9893);class r extends n.default{build(){super.build(),(0,i.addClass)(this._element,"ht__manualColumnMove--guideline")}}t.default=r},39996:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(23298);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualColumnResize=s.ManualColumnResize},23298:(e,t,o)=>{"use strict";t.__esModule=!0,o(67834),o(15724);var s=o(61205),n=o(9893),i=o(9175),r=o(87485),l=o(93969);function a(e,t,o){h(e,t),t.set(e,o)}function h(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function c(e,t,o){return e.set(d(e,t),o),o}function u(e,t){return e.get(d(e,t))}function d(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}const g=t.PLUGIN_KEY="manualColumnResize",f=t.PLUGIN_PRIORITY=130,p="manualColumnWidths";var m=new WeakMap,w=new WeakMap,C=new WeakMap,v=new WeakMap,y=new WeakMap,E=new WeakMap,S=new WeakMap,R=new WeakMap,b=new WeakMap,_=new WeakMap,T=new WeakMap,M=new WeakMap,O=new WeakMap,I=new WeakMap,N=new WeakMap,A=new WeakMap,P=new WeakSet;class x extends s.BasePlugin{static get PLUGIN_KEY(){return g}static get PLUGIN_PRIORITY(){return f}constructor(e){var t,o;super(e),h(t=this,o=P),o.add(t),a(this,m,null),a(this,w,null),a(this,C,[]),a(this,v,null),a(this,y,null),a(this,E,null),a(this,S,null),a(this,R,null),a(this,b,this.hot.rootDocument.createElement("DIV")),a(this,_,this.hot.rootDocument.createElement("DIV")),a(this,T,null),a(this,M,!1),a(this,O,0),a(this,I,null),a(this,N,void 0),a(this,A,void 0),(0,n.addClass)(u(b,this),"manualColumnResizer"),(0,n.addClass)(u(_,this),"manualColumnResizerGuide")}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[g]}enablePlugin(){this.enabled||(c(N,this,new l.PhysicalIndexToValueMap),u(N,this).addLocalHook("init",(()=>d(P,this,H).call(this))),this.hot.columnIndexMapper.registerMap(this.pluginName,u(N,this)),this.addHook("modifyColWidth",((e,t)=>d(P,this,W).call(this,e,t)),1),this.addHook("beforeStretchingColumnWidth",((e,t)=>d(P,this,B).call(this,e,t))),this.addHook("beforeColumnResize",((e,t,o)=>d(P,this,U).call(this,e,t,o))),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){c(A,this,u(N,this).getValues()),this.hot.columnIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}saveManualColumnWidths(){this.hot.runHooks("persistentStateSave",p,u(N,this).getValues())}loadManualColumnWidths(){const e={};return this.hot.runHooks("persistentStateLoad",p,e),e.value}setManualSize(e,t){const o=Math.max(t,20),s=this.hot.toPhysicalColumn(e);return u(N,this).setValueAtIndex(s,o),o}clearManualSize(e){const t=this.hot.toPhysicalColumn(e);u(N,this).setValueAtIndex(t,null)}setupHandlePosition(e){if(!e.parentNode)return;c(m,this,e);const{_wt:t}=this.hot.view,o=t.wtTable.getCoords(u(m,this)),s=o.col;if(s<0)return;const l=(0,n.outerHeight)(u(m,this)),a=u(m,this).getBoundingClientRect();let h;s<t.getSetting("fixedColumnsStart")&&(h=t.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(u(m,this),o.row,o.col)),h||(h=t.wtOverlays.topOverlay.getRelativeCellPosition(u(m,this),o.row,o.col)),c(w,this,this.hot.columnIndexMapper.getVisualFromRenderableIndex(s)),c(C,this,[]);const d=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByColumnHeader();if(this.hot.selection.isSelected()&&d){const e=this.hot.getSelectedRange();(0,i.arrayEach)(e,(e=>{const t=e.getTopStartCorner().col,o=e.getBottomEndCorner().col;(0,r.rangeEach)(t,o,(e=>{u(C,this).includes(e)||u(C,this).push(e)}))}))}u(C,this).includes(u(w,this))||c(C,this,[u(w,this)]),c(R,this,h.start-6),c(S,this,parseInt(a.width,10)),u(b,this).style.top=`${h.top}px`,u(b,this).style[this.inlineDir]=`${u(R,this)+u(S,this)}px`,u(b,this).style.height=`${l}px`,this.hot.rootElement.appendChild(u(b,this))}refreshHandlePosition(){u(b,this).style[this.inlineDir]=`${u(R,this)+u(v,this)}px`}setupGuidePosition(){const e=parseInt((0,n.outerHeight)(u(b,this)),10),t=parseInt(u(b,this).style.top,10)+e,o=parseInt(this.hot.view.maximumVisibleElementHeight(0),10);(0,n.addClass)(u(b,this),"active"),(0,n.addClass)(u(_,this),"active"),u(_,this).style.top=`${t}px`,this.refreshGuidePosition(),u(_,this).style.height=o-e+"px",this.hot.rootElement.appendChild(u(_,this))}refreshGuidePosition(){u(_,this).style[this.inlineDir]=u(b,this).style[this.inlineDir]}hideHandleAndGuide(){(0,n.removeClass)(u(b,this),"active"),(0,n.removeClass)(u(_,this),"active")}checkIfColumnHeader(e){const t=(0,n.closest)(e,["THEAD"],this.hot.rootElement),{topOverlay:o,topInlineStartCornerOverlay:s}=this.hot.view._wt.wtOverlays;return[o.clone.wtTable.THEAD,s.clone.wtTable.THEAD].includes(t)}getClosestTHParent(e){return"TABLE"!==e.tagName?"TH"===e.tagName?e:this.getClosestTHParent(e.parentNode):null}afterMouseDownTimeout(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize()},t=(t,o)=>{const s=this.hot.runHooks("beforeColumnResize",u(y,this),t,!0);void 0!==s&&c(y,this,s),"all"===this.hot.getSettings().stretchH?this.clearManualSize(t):this.setManualSize(t,u(y,this)),this.saveManualColumnWidths(),this.hot.runHooks("afterColumnResize",u(y,this),t,!0),o&&e()};if(u(O,this)>=2){u(C,this).length>1?((0,i.arrayEach)(u(C,this),(e=>{t(e)})),e()):(0,i.arrayEach)(u(C,this),(e=>{t(e,!0)}))}c(O,this,0),c(I,this,null)}bindEvents(){const{rootWindow:e,rootElement:t}=this.hot;this.eventManager.addEventListener(t,"mouseover",(e=>d(P,this,D).call(this,e))),this.eventManager.addEventListener(t,"mousedown",(e=>d(P,this,L).call(this,e))),this.eventManager.addEventListener(e,"mousemove",(e=>d(P,this,k).call(this,e))),this.eventManager.addEventListener(e,"mouseup",(()=>d(P,this,V).call(this))),this.eventManager.addEventListener(u(b,this),"contextmenu",(()=>d(P,this,F).call(this)))}destroy(){super.destroy()}}function H(){const e=this.hot.getSettings()[g],t=this.loadManualColumnWidths();void 0!==t?this.hot.batchExecution((()=>{t.forEach(((e,t)=>{u(N,this).setValueAtIndex(t,e)}))}),!0):Array.isArray(e)?(this.hot.batchExecution((()=>{e.forEach(((e,t)=>{u(N,this).setValueAtIndex(t,e)}))}),!0),c(A,this,e)):!0===e&&Array.isArray(u(A,this))&&this.hot.batchExecution((()=>{u(A,this).forEach(((e,t)=>{u(N,this).setValueAtIndex(t,e)}))}),!0)}function D(e){if(!(0,n.isDetached)(e.target)&&!0!==u(M,this)&&this.checkIfColumnHeader(e.target)){const t=this.getClosestTHParent(e.target);if(!t)return;const o=t.getAttribute("colspan");!t||null!==o&&"1"!==o||u(T,this)||this.setupHandlePosition(t)}}function L(e){e.target.parentNode===this.hot.rootElement&&(0,n.hasClass)(e.target,"manualColumnResizer")&&(this.setupHandlePosition(u(m,this)),this.setupGuidePosition(),c(T,this,!0),null===u(I,this)&&(c(I,this,setTimeout((()=>this.afterMouseDownTimeout()),500)),this.hot._registerTimeout(u(I,this))),c(O,this,u(O,this)+1),this.startX=e.pageX,c(y,this,u(S,this)))}function k(e){if(u(T,this)){const t=(e.pageX-this.startX)*this.hot.getDirectionFactor();c(v,this,u(S,this)+t),(0,i.arrayEach)(u(C,this),(e=>{c(y,this,this.setManualSize(e,u(v,this)))})),this.refreshHandlePosition(),this.refreshGuidePosition()}}function V(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize()},t=(t,o)=>{this.hot.runHooks("beforeColumnResize",u(y,this),t,!1),o&&e(),this.saveManualColumnWidths(),this.hot.runHooks("afterColumnResize",u(y,this),t,!1)};if(u(T,this)){if(this.hideHandleAndGuide(),c(T,this,!1),u(y,this)!==u(S,this)){u(C,this).length>1?((0,i.arrayEach)(u(C,this),(e=>{t(e)})),e()):(0,i.arrayEach)(u(C,this),(e=>{t(e,!0)}))}this.setupHandlePosition(u(m,this))}}function F(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild(u(b,this)),this.hot.rootElement.removeChild(u(_,this)),c(T,this,!1),c(M,this,!0),this.hot._registerImmediate((()=>{c(M,this,!1)}))}function W(e,t){let o=e;if(this.enabled){const e=this.hot.toPhysicalColumn(t),s=u(N,this).getValueAtIndex(e);this.hot.getSettings()[g]&&s&&(o=s)}return o}function B(e,t){let o=u(N,this).getValueAtIndex(t);return null===o&&(o=e),o}function U(){this.hot.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked()}t.ManualColumnResize=x},33283:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(65460);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualRowMove=s.ManualRowMove},65460:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=o(61205),i=s(o(56937)),r=o(9175),l=o(9893),a=o(87485),h=s(o(1651)),c=s(o(99068));function u(e,t,o){d(e,t),t.set(e,o)}function d(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function g(e,t,o){return e.set(p(e,t),o),o}function f(e,t){return e.get(p(e,t))}function p(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}o(19540),i.default.getSingleton().register("beforeRowMove"),i.default.getSingleton().register("afterRowMove");const m=t.PLUGIN_KEY="manualRowMove",w=t.PLUGIN_PRIORITY=140,C="ht__manualRowMove",v="show-ui",y="on-moving--rows",E="after-selection--rows";var S=new WeakMap,R=new WeakMap,b=new WeakMap,_=new WeakMap,T=new WeakMap,M=new WeakMap,O=new WeakSet;class I extends n.BasePlugin{constructor(){var e,t;super(...arguments),d(e=this,t=O),t.add(e),u(this,S,new h.default(this.hot)),u(this,R,new c.default(this.hot)),u(this,b,[]),u(this,_,void 0),u(this,T,{}),u(this,M,void 0)}static get PLUGIN_KEY(){return m}static get PLUGIN_PRIORITY(){return w}isEnabled(){return!!this.hot.getSettings()[m]}enablePlugin(){var e=this;this.enabled||(this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return p(O,e,N).call(e,...o)})),this.addHook("beforeOnCellMouseOver",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return p(O,e,P).call(e,...o)})),this.addHook("afterScrollHorizontally",(()=>p(O,this,H).call(this))),this.addHook("afterLoadData",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return p(O,e,D).call(e,...o)})),this.buildPluginUI(),this.registerEvents(),(0,l.addClass)(this.hot.rootElement,C),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){(0,l.removeClass)(this.hot.rootElement,C),this.unregisterEvents(),f(S,this).destroy(),f(R,this).destroy(),super.disablePlugin()}moveRow(e,t){return this.moveRows([e],t)}moveRows(e,t){const o=f(M,this),s=this.isMovePossible(e,t),n=this.hot.runHooks("beforeRowMove",e,t,o,s);if(g(M,this,void 0),!1===n)return;s&&this.hot.rowIndexMapper.moveIndexes(e,t);const i=s&&this.isRowOrderChanged(e,t);return this.hot.runHooks("afterRowMove",e,t,o,s,i),i}dragRow(e,t){return this.dragRows([e],t)}dragRows(e,t){const o=this.countFinalIndex(e,t);return g(M,this,t),this.moveRows(e,o)}isMovePossible(e,t){const o=this.hot.rowIndexMapper.getNotTrimmedIndexesLength(),s=e.length+t>o,n=t<0,i=e.some((e=>e<0)),r=e.some((e=>e>=o));return!(s||n||i||r)}isRowOrderChanged(e,t){return e.some(((e,o)=>e-o!==t))}countFinalIndex(e,t){const o=(0,r.arrayReduce)(e,((e,o)=>(o<t&&(e+=1),e)),0);return t-o}getRowsHeight(e,t){const o=this.hot.rowIndexMapper;let s=0;for(let n=e;n<=t;n++){const e=o.getRenderableFromVisualIndex(n);null!==e&&(s+=this.hot.view._wt.wtTable.getRowHeight(e)||23)}return s}moveBySettingsOrLoad(){const e=this.hot.getSettings()[m];if(Array.isArray(e))this.moveRows(e,0);else if(void 0!==e){const e=this.persistentStateLoad();e.length&&this.moveRows(e,0)}}isFixedRowTop(e){return e<this.hot.getSettings().fixedRowsTop}isFixedRowBottom(e){return e>this.hot.countRows()-1-this.hot.getSettings().fixedRowsBottom}persistentStateSave(){this.hot.runHooks("persistentStateSave","manualRowMove",this.hot.rowIndexMapper.getIndexesSequence())}persistentStateLoad(){const e={};return this.hot.runHooks("persistentStateLoad","manualRowMove",e),e.value?e.value:[]}prepareRowsToMoving(){const e=this.hot.getSelectedRangeLast(),t=[];if(!e)return t;const{from:o,to:s}=e,n=Math.min(o.row,s.row),i=Math.max(o.row,s.row);return(0,a.rangeEach)(n,i,(e=>{t.push(e)})),t}refreshPositions(){const e=f(T,this).coords,t=this.hot.view.getFirstFullyVisibleRow(),o=this.hot.view.getLastFullyVisibleRow(),s=this.hot.countRows();this.isFixedRowTop(e.row)&&t>0&&this.hot.scrollViewportTo(this.hot.rowIndexMapper.getNearestNotHiddenIndex(t-1,-1)),this.isFixedRowBottom(e.row)&&o<s&&this.hot.scrollViewportTo(this.hot.rowIndexMapper.getNearestNotHiddenIndex(o+1,1),void 0,!0);const n=this.hot.view._wt.wtTable,i=f(T,this).TD,r=this.hot.rootElement,a=(0,l.offset)(r),h=(0,l.getTrimmingContainer)(r),c=n.holder.scrollTop,u=this.hot.rootWindow!==h?h.scrollTop:0,d=a.top-u,g=f(T,this).eventPageY-d+c,p=n.hider.offsetHeight,m=n.TBODY.offsetTop,w=f(S,this).getOffset().top,C=f(S,this).getSize().height,v=i.offsetHeight/2,y=i.offsetHeight;let E=this.hot.view.THEAD.offsetHeight+this.getRowsHeight(0,e.row-1);const b=g>=E+v;this.isFixedRowTop(e.row)&&(E+=this.hot.view._wt.wtOverlays.topOverlay.getOverlayOffset()),e.row<0?f(T,this).row=t>0?t-1:t:b?(f(T,this).row=e.row+1,E+=0===e.row?y-1:y):f(T,this).row=e.row;let _=g,M=E;g+C+w>=p?_=p-C-w:g+w<m&&(_=m+Math.abs(w)),E>=p-1&&(M=p-1),f(S,this).setPosition(_),f(R,this).setPosition(M)}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mousemove",(e=>p(O,this,A).call(this,e))),this.eventManager.addEventListener(e,"mouseup",(()=>p(O,this,x).call(this)))}unregisterEvents(){this.eventManager.clear()}buildPluginUI(){f(S,this).build(),f(R,this).build()}destroy(){f(S,this).destroy(),f(R,this).destroy(),super.destroy()}}function N(e,t,o,s){const{wtTable:n,wtViewport:i}=this.hot.view._wt,r=this.hot.selection.isSelectedByRowHeader(),a=this.hot.getSelectedRangeLast();if(!a||!r||f(_,this)||0!==e.button)return g(_,this,!1),f(b,this).length=0,void(0,l.removeClass)(this.hot.rootElement,[y,v]);const h=f(R,this).isBuilt()&&!f(R,this).isAppended(),c=f(S,this).isBuilt()&&!f(S,this).isAppended();h&&c&&(f(R,this).appendTo(n.hider),f(S,this).appendTo(n.hider));const{from:u,to:d}=a,p=Math.min(u.row,d.row),m=Math.max(u.row,d.row);if(t.col<0&&t.row>=p&&t.row<=m){s.row=!0,g(_,this,!0),f(T,this).eventPageY=e.pageY,f(T,this).coords=t,f(T,this).TD=o,g(b,this,this.prepareRowsToMoving());const r=n.holder.scrollLeft+i.getRowHeaderWidth(),a=this.getRowsHeight(p,t.row-1)+e.offsetY;f(S,this).setPosition(null,r),f(S,this).setSize(n.hider.offsetWidth-r,this.getRowsHeight(p,m)),f(S,this).setOffset(-a,null),(0,l.addClass)(this.hot.rootElement,y),this.refreshPositions()}else(0,l.removeClass)(this.hot.rootElement,E),g(_,this,!1),f(b,this).length=0}function A(e){f(_,this)&&(f(T,this).eventPageY=e.pageY,this.refreshPositions())}function P(e,t,o,s){this.hot.getSelectedRangeLast()&&f(_,this)&&(f(b,this).indexOf(t.row)>-1?(0,l.removeClass)(this.hot.rootElement,v):(0,l.addClass)(this.hot.rootElement,v),s.row=!0,s.column=!0,s.cell=!0,f(T,this).coords=t,f(T,this).TD=o)}function x(){const e=f(T,this).row,t=f(b,this).length;if(g(_,this,!1),(0,l.removeClass)(this.hot.rootElement,[y,v,E]),this.hot.selection.isSelectedByRowHeader()&&(0,l.addClass)(this.hot.rootElement,E),t<1||void 0===e)return;const o=f(b,this)[0],s=this.hot.toPhysicalRow(o),n=this.dragRows(f(b,this),e);if(f(b,this).length=0,!0===n){this.persistentStateSave(),this.hot.render(),this.hot.view.adjustElementsSize();const e=this.hot.toVisualRow(s),o=e+t-1;this.hot.selectRows(e,o)}}function H(){const e=this.hot.view._wt.wtTable,t=this.hot.view._wt.wtViewport.getRowHeaderWidth()+e.holder.scrollLeft;f(S,this).setPosition(null,t),f(S,this).setSize(e.hider.offsetWidth-t)}function D(){this.moveBySettingsOrLoad()}t.ManualRowMove=I},62814:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707));const i="px";t.default=class{constructor(e){(0,n.default)(this,"hot",void 0),(0,n.default)(this,"_element",null),(0,n.default)(this,"state",0),this.hot=e}appendTo(e){e.appendChild(this._element),this.state=2}build(){0===this.state&&(this._element=this.hot.rootDocument.createElement("div"),this.state=1)}destroy(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=0}isAppended(){return 2===this.state}isBuilt(){return this.state>=1}setPosition(e,t){void 0!==e&&(this._element.style.top=e+i),void 0!==t&&(this._element.style.left=t+i)}getPosition(){return{top:this._element.style.top?parseInt(this._element.style.top,10):0,left:this._element.style.left?parseInt(this._element.style.left,10):0}}setSize(e,t){e&&(this._element.style.width=e+i),t&&(this._element.style.height=t+i)}getSize(){return{width:this._element.style.width?parseInt(this._element.style.width,10):0,height:this._element.style.height?parseInt(this._element.style.height,10):0}}setOffset(e,t){e&&(this._element.style.marginTop=e+i),t&&(this._element.style.marginLeft=t+i)}getOffset(){return{top:this._element.style.marginTop?parseInt(this._element.style.marginTop,10):0,left:this._element.style.marginLeft?parseInt(this._element.style.marginLeft,10):0}}}},1651:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(62814)),i=o(9893);class r extends n.default{build(){super.build(),(0,i.addClass)(this._element,"ht__manualRowMove--backlight")}}t.default=r},99068:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(62814)),i=o(9893);class r extends n.default{build(){super.build(),(0,i.addClass)(this._element,"ht__manualRowMove--guideline")}}t.default=r},83610:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(93992);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualRowResize=s.ManualRowResize},93992:(e,t,o)=>{"use strict";t.__esModule=!0,o(67834),o(15724);var s=o(61205),n=o(9893),i=o(9175),r=o(87485),l=o(93969),a=o(90);function h(e,t,o){c(e,t),t.set(e,o)}function c(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function u(e,t,o){return e.set(g(e,t),o),o}function d(e,t){return e.get(g(e,t))}function g(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}const f=t.PLUGIN_KEY="manualRowResize",p=t.PLUGIN_PRIORITY=30,m="manualRowHeights";var w=new WeakMap,C=new WeakMap,v=new WeakMap,y=new WeakMap,E=new WeakMap,S=new WeakMap,R=new WeakMap,b=new WeakMap,_=new WeakMap,T=new WeakMap,M=new WeakMap,O=new WeakMap,I=new WeakMap,N=new WeakMap,A=new WeakMap,P=new WeakMap,x=new WeakSet;class H extends s.BasePlugin{static get PLUGIN_KEY(){return f}static get PLUGIN_PRIORITY(){return p}constructor(e){var t,o;super(e),c(t=this,o=x),o.add(t),h(this,w,null),h(this,C,null),h(this,v,[]),h(this,y,null),h(this,E,null),h(this,S,null),h(this,R,null),h(this,b,null),h(this,_,this.hot.rootDocument.createElement("DIV")),h(this,T,this.hot.rootDocument.createElement("DIV")),h(this,M,!1),h(this,O,!1),h(this,I,0),h(this,N,null),h(this,A,void 0),h(this,P,void 0),(0,n.addClass)(d(_,this),"manualRowResizer"),(0,n.addClass)(d(T,this),"manualRowResizerGuide")}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[f]}enablePlugin(){this.enabled||(u(A,this,new l.PhysicalIndexToValueMap),d(A,this).addLocalHook("init",(()=>g(x,this,B).call(this))),this.hot.rowIndexMapper.registerMap(this.pluginName,d(A,this)),this.addHook("modifyRowHeight",((e,t)=>g(x,this,W).call(this,e,t))),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){u(P,this,d(A,this).getValues()),this.hot.rowIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}saveManualRowHeights(){this.hot.runHooks("persistentStateSave",m,d(A,this).getValues())}loadManualRowHeights(){const e={};return this.hot.runHooks("persistentStateLoad",m,e),e.value}setManualSize(e,t){const o=this.hot.toPhysicalRow(e),s=Math.max(t,a.DEFAULT_ROW_HEIGHT);return d(A,this).setValueAtIndex(o,s),s}getLastDesiredRowHeight(){return d(y,this)}setupHandlePosition(e){u(w,this,e);const{view:t}=this.hot,{_wt:o}=t,s=o.wtTable.getCoords(d(w,this)),l=s.row;if(l<0)return;const a=(0,n.outerWidth)(d(w,this)),h=d(w,this).getBoundingClientRect(),c=l<o.getSetting("fixedRowsTop"),g=l>=t.countNotHiddenRowIndexes(0,1)-o.getSetting("fixedRowsBottom");let f;c?f=o.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(d(w,this),s.row,s.col):g&&(f=o.wtOverlays.bottomInlineStartCornerOverlay.getRelativeCellPosition(d(w,this),s.row,s.col)),f||(f=o.wtOverlays.inlineStartOverlay.getRelativeCellPosition(d(w,this),s.row,s.col)),u(C,this,this.hot.rowIndexMapper.getVisualFromRenderableIndex(l)),u(v,this,[]);const p=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByRowHeader();if(this.hot.selection.isSelected()&&p){const e=this.hot.getSelectedRange();(0,i.arrayEach)(e,(e=>{const t=e.getTopStartCorner().row,o=e.getBottomStartCorner().row;(0,r.rangeEach)(t,o,(e=>{d(v,this).includes(e)||d(v,this).push(e)}))}))}d(v,this).includes(d(C,this))||u(v,this,[d(C,this)]),u(b,this,f.top-6),u(R,this,parseInt(h.height,10)),d(_,this).style.top=`${d(b,this)+d(R,this)}px`,d(_,this).style[this.inlineDir]=`${f.start}px`,d(_,this).style.width=`${a}px`,this.hot.rootElement.appendChild(d(_,this))}refreshHandlePosition(){d(_,this).style.top=`${d(b,this)+d(y,this)}px`}setupGuidePosition(){const e=parseInt((0,n.outerWidth)(d(_,this)),10),t=parseInt(d(_,this).style[this.inlineDir],10)+e,o=parseInt(this.hot.view.maximumVisibleElementWidth(0),10);(0,n.addClass)(d(_,this),"active"),(0,n.addClass)(d(T,this),"active"),d(T,this).style.top=d(_,this).style.top,d(T,this).style[this.inlineDir]=`${t}px`,d(T,this).style.width=o-e+"px",this.hot.rootElement.appendChild(d(T,this))}refreshGuidePosition(){d(T,this).style.top=d(_,this).style.top}hideHandleAndGuide(){(0,n.removeClass)(d(_,this),"active"),(0,n.removeClass)(d(T,this),"active")}checkIfRowHeader(e){const t=(0,n.closest)(e,["TBODY"],this.hot.rootElement),{inlineStartOverlay:o,topInlineStartCornerOverlay:s,bottomInlineStartCornerOverlay:i}=this.hot.view._wt.wtOverlays;return[o.clone.wtTable.TBODY,s.clone.wtTable.TBODY,i.clone.wtTable.TBODY].includes(t)}getClosestTHParent(e){return"TABLE"!==e.tagName?"TH"===e.tagName?e:this.getClosestTHParent(e.parentNode):null}getActualRowHeight(e){const t=this.hot.view._wt.wtTable.getRowHeight(e);return void 0!==t&&d(E,this)<t?t:d(E,this)}afterMouseDownTimeout(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize()},t=(t,o)=>{const s=this.hot.runHooks("beforeRowResize",this.getActualRowHeight(t),t,!0);void 0!==s&&u(E,this,s),this.setManualSize(t,d(E,this)),this.hot.runHooks("afterRowResize",this.getActualRowHeight(t),t,!0),o&&e()};if(d(I,this)>=2){d(v,this).length>1?((0,i.arrayEach)(d(v,this),(e=>{t(e)})),e()):(0,i.arrayEach)(d(v,this),(e=>{t(e,!0)}))}u(I,this,0),u(N,this,null)}bindEvents(){const{rootElement:e,rootWindow:t}=this.hot;this.eventManager.addEventListener(e,"mouseover",(e=>g(x,this,D).call(this,e))),this.eventManager.addEventListener(e,"mousedown",(e=>g(x,this,L).call(this,e))),this.eventManager.addEventListener(t,"mousemove",(e=>g(x,this,k).call(this,e))),this.eventManager.addEventListener(t,"mouseup",(()=>g(x,this,V).call(this))),this.eventManager.addEventListener(d(_,this),"contextmenu",(()=>g(x,this,F).call(this)))}destroy(){super.destroy()}}function D(e){if(!(0,n.isDetached)(e.target)&&!0!==d(O,this)&&this.checkIfRowHeader(e.target)){const t=this.getClosestTHParent(e.target);t&&(d(M,this)||this.setupHandlePosition(t))}}function L(e){(0,n.hasClass)(e.target,"manualRowResizer")&&(this.setupHandlePosition(d(w,this)),this.setupGuidePosition(),u(M,this,!0),null===d(N,this)&&(u(N,this,setTimeout((()=>this.afterMouseDownTimeout()),500)),this.hot._registerTimeout(d(N,this))),u(I,this,d(I,this)+1),u(S,this,e.pageY),u(E,this,d(R,this)))}function k(e){d(M,this)&&(u(y,this,d(R,this)+(e.pageY-d(S,this))),(0,i.arrayEach)(d(v,this),(e=>{u(E,this,this.setManualSize(e,d(y,this)))})),this.refreshHandlePosition(),this.refreshGuidePosition())}function V(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize()},t=(t,o)=>{this.hot.runHooks("beforeRowResize",this.getActualRowHeight(t),t,!1),o&&e(),this.saveManualRowHeights(),this.hot.runHooks("afterRowResize",this.getActualRowHeight(t),t,!1)};if(d(M,this)){if(this.hideHandleAndGuide(),u(M,this,!1),d(E,this)!==d(R,this)){d(v,this).length>1?((0,i.arrayEach)(d(v,this),(e=>{t(e)})),e()):(0,i.arrayEach)(d(v,this),(e=>{t(e,!0)}))}this.setupHandlePosition(d(w,this))}}function F(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild(d(_,this)),this.hot.rootElement.removeChild(d(T,this)),u(M,this,!1),u(O,this,!0),this.hot._registerImmediate((()=>{u(O,this,!1)}))}function W(e,t){let o=e;if(this.enabled){const e=this.hot.toPhysicalRow(t),s=d(A,this).getValueAtIndex(e);this.hot.getSettings()[f]&&s&&(o=s)}return o}function B(){const e=this.hot.getSettings()[f],t=this.loadManualRowHeights();this.hot.batchExecution((()=>{void 0!==t?t.forEach(((e,t)=>{d(A,this).setValueAtIndex(t,e)})):Array.isArray(e)?(e.forEach(((e,t)=>{d(A,this).setValueAtIndex(t,e)})),u(P,this,e)):!0===e&&Array.isArray(d(P,this))&&d(P,this).forEach(((e,t)=>{d(A,this).setValueAtIndex(t,e)}))}),!0)}t.ManualRowResize=H},54932:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707)),i=o(13911),r=o(9175);t.default=class{constructor(e){(0,n.default)(this,"plugin",void 0),(0,n.default)(this,"mergedCellsCollection",void 0),(0,n.default)(this,"currentFillData",null),this.plugin=e,this.mergedCellsCollection=this.plugin.mergedCellsCollection}correctSelectionAreaSize(e){if(e[0]===e[2]&&e[1]===e[3]){const t=this.mergedCellsCollection.get(e[0],e[1]);t&&(e[2]=e[0]+t.rowspan-1,e[3]=e[1]+t.colspan-1)}}getDirection(e,t){let o=null;return o=t[0]===e[0]&&t[1]===e[1]&&t[3]===e[3]?"down":t[2]===e[2]&&t[1]===e[1]&&t[3]===e[3]?"up":t[1]===e[1]&&t[2]===e[2]?"right":"left",o}snapDragArea(e,t,o,s){const n=t.slice(0),i=this.getAutofillSize(e,t,o),[r,l,a,h]=e,c=["up","down"].indexOf(o)>-1?a-r+1:h-l+1,u=i-Math.floor(i/c)*c,d=this.getFarthestCollection(e,t,o,s);if(d)if("down"===o){const e=d.row+d.rowspan-r-u;n[2]+e>=this.plugin.hot.countRows()?n[2]-=u:n[2]+=u?e:0}else if("right"===o){const e=d.col+d.colspan-l-u;n[3]+e>=this.plugin.hot.countCols()?n[3]-=u:n[3]+=u?e:0}else if("up"===o){const e=a-u-d.row+1;n[0]+e<0?n[0]+=u:n[0]-=u?e:0}else if("left"===o){const e=h-u-d.col+1;n[1]+e<0?n[1]+=u:n[1]-=u?e:0}return this.updateCurrentFillCache({baseArea:e,dragDirection:o,foundMergedCells:s,fillSize:i,dragArea:n,cycleLength:c}),n}updateCurrentFillCache(e){this.currentFillData||(this.currentFillData={}),(0,i.extend)(this.currentFillData,e)}getAutofillSize(e,t,o){const[s,n,i,r]=e,[l,a,h,c]=t;switch(o){case"up":return s-l;case"down":return h-i;case"left":return n-a;case"right":return c-r;default:return null}}getDragArea(e,t,o){const[s,n,i,r]=e,[l,a,h,c]=t;switch(o){case"up":return[l,a,s-1,r];case"down":return[i+1,n,h,r];case"left":return[l,a,i,n-1];case"right":return[s,r+1,h,c];default:return null}}getFarthestCollection(e,t,o,s){const[n,i,l,a]=e,h=["up","down"].indexOf(o)>-1,c=h?l:a,u=h?n:i,d=this.getAutofillSize(e,t,o),g=h?l-n+1:a-i+1,f=d-Math.floor(d/g)*g;let p=null,m=null,w=null;switch(o){case"up":p="includesVertically",w=c-f+1;break;case"left":p="includesHorizontally",w=c-f+1;break;case"down":p="includesVertically",w=u+f-1;break;case"right":p="includesHorizontally",w=u+f-1}return(0,r.arrayEach)(s,(e=>{e[p](w)&&e.isFarther(m,o)&&(m=e)})),m}recreateAfterDataPopulation(e){if(!this.currentFillData)return;const t=this.getRangeFromChanges(e),o=this.currentFillData.foundMergedCells,s=this.currentFillData.dragDirection,n=(e,o)=>{switch(s){case"up":return e.row-o>=t.from.row;case"down":return e.row+e.rowspan-1+o<=t.to.row;case"left":return e.col-o>=t.from.column;case"right":return e.col+e.colspan-1+o<=t.to.column;default:return null}};let i=0,r=null,l=1;do{for(let e=0;e<o.length;e+=1){if(r=o[e],i=l*this.currentFillData.cycleLength,n(r,i))switch(s){case"up":this.plugin.mergedCellsCollection.add({row:r.row-i,rowspan:r.rowspan,col:r.col,colspan:r.colspan});break;case"down":this.plugin.mergedCellsCollection.add({row:r.row+i,rowspan:r.rowspan,col:r.col,colspan:r.colspan});break;case"left":this.plugin.mergedCellsCollection.add({row:r.row,rowspan:r.rowspan,col:r.col-i,colspan:r.colspan});break;case"right":this.plugin.mergedCellsCollection.add({row:r.row,rowspan:r.rowspan,col:r.col+i,colspan:r.colspan})}e===o.length-1&&(l+=1)}}while(n(r,i));this.currentFillData=null,this.plugin.hot.render(),o.length>0&&this.plugin.ifChromeForceRepaint()}getRangeFromChanges(e){const t={min:null,max:null},o={min:null,max:null};return(0,r.arrayEach)(e,(e=>{const s=e[0],n=this.plugin.hot.propToCol(e[1]);(null===t.min||s<t.min)&&(t.min=s),(null===t.max||s>t.max)&&(t.max=s),(null===o.min||n<o.min)&&(o.min=n),(null===o.max||n>o.max)&&(o.max=n)})),{from:{row:t.min,column:o.min},to:{row:t.max,column:o.max}}}dragAreaOverlapsCollections(e,t,o){const s=this.getDragArea(e,t,o),[n,i,r,l]=s,a=this.plugin.hot._createCellCoords(n,i),h=this.plugin.hot._createCellCoords(r,l),c=this.plugin.hot._createCellRange(a,a,h);return this.mergedCellsCollection.getWithinRange(c,!0).length>0}}},85354:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(15724);var n=s(o(85707));t.default=class{constructor(e){(0,n.default)(this,"plugin",void 0),(0,n.default)(this,"hot",void 0),(0,n.default)(this,"fullySelectedMergedCellClassName","fullySelectedMergedCell"),this.plugin=e,this.hot=e.hot}getSelectedMergedCellClassName(e,t,o,s){const n=Math.min(o[0],o[2]),i=Math.min(o[1],o[3]),r=Math.max(o[0],o[2]),l=Math.max(o[1],o[3]);if(void 0===s)return;if(!this.plugin.mergedCellsCollection.isFirstRenderableMergedCell(e,t))return;const a=this.plugin.mergedCellsCollection.get(e,t);if(!a)return;const h=a.getLastRow(),c=a.getLastColumn();return n<=a.row&&i<=a.col&&r>=h&&l>=c?`${this.fullySelectedMergedCellClassName}-${s}`:this.isMergeCellFullySelected(a,this.plugin.hot.getSelectedRange())?`${this.fullySelectedMergedCellClassName}-multiple`:void 0}isMergeCellFullySelected(e,t){const o=[];if(!t||!e)return!1;for(let t=0;t<e.rowspan;t+=1)for(let s=0;s<e.colspan;s+=1)o.push(this.hot._createCellCoords(e.row+t,e.col+s));for(let e=0;e<o.length;e+=1){const s=[];for(let n=0;n<t.length;n+=1)s[n]=t[n].includes(o[e]);if(!s.includes(!0))return!1}return!0}getSelectedMergedCellClassNameToRemove(){const e=[];for(let t=0;t<=7;t+=1)e.push(`${this.fullySelectedMergedCellClassName}-${t}`);return e.push(`${this.fullySelectedMergedCellClassName}-multiple`),e}}},89443:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=s(o(85707)),i=o(28927);function r(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function l(e,t){return e.get(h(e,t))}function a(e,t,o){return e.set(h(e,t),o),o}function h(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var c=new WeakMap;t.default=class{constructor(e,t,o,s,i,l){(0,n.default)(this,"row",void 0),(0,n.default)(this,"col",void 0),(0,n.default)(this,"rowspan",void 0),(0,n.default)(this,"colspan",void 0),(0,n.default)(this,"removed",!1),(0,n.default)(this,"cellCoordsFactory",void 0),(0,n.default)(this,"cellRangeFactory",void 0),r(this,c,null),this.row=e,this.col=t,this.rowspan=o,this.colspan=s,this.cellCoordsFactory=i,this.cellRangeFactory=l}static NEGATIVE_VALUES_WARNING(e){let{row:t,col:o,rowspan:s,colspan:n}=e;return i.toSingleLine`The merged cell declared with {row: ${t}, col: ${o},\x20
73
+ For more details see the documentation.`);else{const t=this.conditionCollection.getOperation(s);this.components.get("filter_by_condition").updateState(i[0],s),this.components.get("filter_by_condition2").updateState(i[1],s),this.components.get("filter_operators").updateState(t,s),this.components.get("filter_by_value").updateState(e)}}t.Filters=k},85471:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(72100);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.Filters=s.Filters},36057:(e,t,o)=>{"use strict";t.__esModule=!0,t.getOperationFunc=function(e){if(!s[e])throw Error(`Operation with id "${e}" does not exist.`);const t=s[e].func;return function(e,o){return t(e,o)}},t.getOperationName=function(e){return s[e].name},t.registerOperation=function(e,t,o){s[e]={name:t,func:o}},o(67834);const s=t.operations={}},64709:(e,t,o)=>{"use strict";t.__esModule=!0,t.operationResult=a;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(36057);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}const r=t.OPERATION_ID="conjunction",l=t.SHORT_NAME_FOR_COMPONENT=s.FILTERS_LABELS_CONJUNCTION;function a(e,t){return e.every((e=>e.func(t)))}(0,n.registerOperation)(r,l,a)},75469:(e,t,o)=>{"use strict";t.__esModule=!0,t.operationResult=a;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(36057);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}const r=t.OPERATION_ID="disjunction",l=t.SHORT_NAME_FOR_COMPONENT=s.FILTERS_LABELS_DISJUNCTION;function a(e,t){return e.some((e=>e.func(t)))}(0,n.registerOperation)(r,l,a)},21106:(e,t,o)=>{"use strict";t.__esModule=!0,t.operationResult=a,o(67834);var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884)),n=o(36057);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}const r=t.OPERATION_ID="disjunctionWithExtraCondition",l=t.SHORT_NAME_FOR_COMPONENT=s.FILTERS_LABELS_DISJUNCTION;function a(e,t){if(e.length<3)throw Error("Operation doesn't work on less then three conditions.");return e.slice(0,e.length-1).some((e=>e.func(t)))&&e[e.length-1].func(t)}(0,n.registerOperation)(r,l,a)},2947:(e,t,o)=>{"use strict";t.__esModule=!0,t.createMenuFocusController=function(e,t){let o,a=-1;const h=(0,s.createFocusNavigator)(t),c=e=>()=>{o.isOpened()&&o.getKeyboardShortcutsCtrl().listen(l),h.setCurrentPage(t.indexOf(e))};function u(e){const s=o.getKeyboardShortcutsCtrl(),c=e.getKeyboardShortcutsCtrl();h.clear(),c.addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],forwardToContext:s.getContext(l),callback:()=>{e.isSubMenu()&&e.close(),s.listen(l)}}]),e.isSubMenu()||s.addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],callback:e=>{const t=o.getNavigator();t.getCurrentPage()>-1&&(a=t.getCurrentPage()),t.clear(),e.shiftKey?h.toPreviousItem():h.toNextItem()}},{keys:[["Escape"]],callback:()=>{o.close()}},{keys:[["Enter"],["Space"]],preventDefault:!1,callback:e=>{const o=t[h.getCurrentPage()];o instanceof n.SelectUI&&(o.openOptions(),e.preventDefault()),o instanceof r.LinkUI&&(o.activate(),e.preventDefault()),o instanceof i.BaseUI||e.preventDefault()}}],l)}function d(e){e.addLocalHook("afterSelectionChange",(e=>{e.key.startsWith("filter_")||h.clear()})),e.addLocalHook("afterSubmenuOpen",u),e.addLocalHook("afterOpen",u),o=e}return t.forEach((e=>{e instanceof i.BaseUI&&(e.addLocalHook("click",c(e)),e.addLocalHook("focus",c(e)),e.addLocalHook("afterClose",c(e)))})),d(e),{...h,listen:function(){o.focus(),o.getKeyboardShortcutsCtrl().listen(l)},setMenu:d,getMenu:function(){return o},getLastMenuPage:function(){return a}}};var s=o(85326),n=o(92384),i=o(46026),r=o(88172);const l="filters"},85326:(e,t,o)=>{"use strict";t.__esModule=!0,t.createFocusNavigator=function(e){return(0,s.createPaginator)({initialPage:0,size:()=>e.length,onItemSelect:(t,o)=>{const s=e[t];return s instanceof i.MultipleSelectUI?o:!(s.element&&!(0,n.isVisible)(s.element))&&void s.focus()}})};var s=o(57625),n=o(9893),i=o(44068)},46026:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707)),i=o(13911),r=s(o(63870)),l=s(o(82629)),a=o(9893),h=o(9175),c=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=u(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884));function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(u=function(e){return e?o:t})(e)}const d="built",g="building",f=["click","input","keydown","keypress","keyup","focus","blur","change"];class p{static get DEFAULTS(){return(0,i.clone)({className:"",value:"",tagName:"div",children:[],wrapIt:!0})}constructor(e,t){(0,n.default)(this,"hot",void 0),(0,n.default)(this,"eventManager",new l.default(this)),(0,n.default)(this,"options",void 0),(0,n.default)(this,"_element",void 0),(0,n.default)(this,"buildState",void 0),this.hot=e,this.options=(0,i.extend)(p.DEFAULTS,t),this._element=this.hot.rootDocument.createElement(this.options.wrapIt?"div":this.options.tagName)}setValue(e){this.options.value=e,this.update()}getValue(){return this.options.value}get element(){return this.buildState===g?this._element:this.buildState===d?(this.update(),this._element):(this.buildState=g,this.build(),this.buildState=d,this._element)}isBuilt(){return this.buildState===d}translateIfPossible(e){return"string"==typeof e&&e.startsWith(c.FILTERS_NAMESPACE)?this.hot.getTranslatedPhrase(e):e}build(){const e=(e,t)=>{this.eventManager.addEventListener(e,t,(e=>this.runLocalHooks(t,e,this)))};if(this.buildState||(this.buildState=g),this._element.setAttribute("data-hot-input",!0),void 0!==this.options.tabIndex&&this._element.setAttribute("tabindex",this.options.tabIndex),void 0!==this.options.role&&this._element.setAttribute("role",this.options.role),this.options.className&&(0,a.addClass)(this._element,this.options.className),this.options.children.length)(0,h.arrayEach)(this.options.children,(e=>this._element.appendChild(e.element)));else if(this.options.wrapIt){const t=this.hot.rootDocument.createElement(this.options.tagName);t.setAttribute("data-hot-input",!0),(0,i.objectEach)(this.options,((e,o)=>{void 0!==t[o]&&"className"!==o&&"tagName"!==o&&"children"!==o&&(t[o]=this.translateIfPossible(e))})),this._element.appendChild(t),(0,h.arrayEach)(f,(o=>e(t,o)))}else(0,h.arrayEach)(f,(t=>e(this._element,t)))}update(){}reset(){this.options.value="",this.update()}show(){this.element.style.display=""}hide(){this.element.style.display="none"}focus(){}destroy(){this.eventManager.destroy(),this.eventManager=null,this.hot=null,this._element.parentNode&&this._element.parentNode.removeChild(this._element),this._element=null}}t.BaseUI=p,(0,i.mixin)(p,r.default)},22818:(e,t,o)=>{"use strict";t.__esModule=!0,o(67834);var s=o(9893),n=o(13911),i=o(46026);function r(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function l(e,t){return e.get(a(e,t))}function a(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var h=new WeakMap,c=new WeakSet;class u extends i.BaseUI{static get DEFAULTS(){return(0,n.clone)({placeholder:"",type:"text",tagName:"input",tabIndex:-1})}constructor(e,t){var o,s;super(e,(0,n.extend)(u.DEFAULTS,t)),r(o=this,s=c),s.add(o),function(e,t,o){r(e,t),t.set(e,o)}(this,h,void 0),this.registerHooks()}registerHooks(){this.addLocalHook("keyup",(e=>a(c,this,d).call(this,e)))}build(){super.build();const e=this.hot.rootDocument.createElement("div");var t,o,n;t=h,o=this,n=this._element.firstChild,t.set(a(t,o),n),(0,s.addClass)(this._element,"htUIInput"),(0,s.addClass)(e,"htUIInputIcon"),this._element.appendChild(e),this.update()}update(){this.isBuilt()&&(l(h,this).type=this.options.type,l(h,this).placeholder=this.translateIfPossible(this.options.placeholder),l(h,this).value=this.translateIfPossible(this.options.value))}focus(){this.isBuilt()&&l(h,this).focus()}}function d(e){this.options.value=e.target.value}t.InputUI=u},88172:(e,t,o)=>{"use strict";t.__esModule=!0,o(67834);var s=o(13911),n=o(46026);function i(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function r(e,t){return e.get(l(e,t))}function l(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var a=new WeakMap;class h extends n.BaseUI{static get DEFAULTS(){return(0,s.clone)({href:"#",tagName:"a",tabIndex:-1,role:"button"})}constructor(e,t){super(e,(0,s.extend)(h.DEFAULTS,t)),i(this,a,void 0)}build(){var e,t,o;super.build(),e=a,t=this,o=this._element.firstChild,e.set(l(e,t),o)}update(){this.isBuilt()&&(r(a,this).textContent=this.translateIfPossible(this.options.textContent))}focus(){this.isBuilt()&&r(a,this).focus()}activate(){r(a,this).click()}}t.LinkUI=h},44068:(e,t,o)=>{"use strict";t.__esModule=!0,o(67834),o(15724);var s=o(9893),n=o(13911),i=o(71257),r=o(78832),l=o(56216),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=f(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),h=o(79729),c=o(46026),u=o(22818),d=o(88172),g=o(23674);function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(f=function(e){return e?o:t})(e)}function p(e,t,o){m(e,t),t.set(e,o)}function m(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function w(e,t){return e.get(v(e,t))}function C(e,t,o){return e.set(v(e,t),o),o}function v(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}const y="multipleSelect.itemBox";var E=new WeakMap,S=new WeakMap,R=new WeakMap,b=new WeakMap,_=new WeakMap,T=new WeakMap,M=new WeakSet;class O extends c.BaseUI{static get DEFAULTS(){return(0,n.clone)({className:"htUIMultipleSelect",value:[]})}constructor(e,t){var o,s;super(e,(0,n.extend)(O.DEFAULTS,t)),m(o=this,s=M),s.add(o),p(this,E,[]),p(this,S,void 0),p(this,R,void 0),p(this,b,void 0),p(this,_,void 0),p(this,T,void 0),C(b,this,new u.InputUI(this.hot,{placeholder:a.FILTERS_BUTTONS_PLACEHOLDER_SEARCH,className:"htUIMultipleSelectSearch"})),C(_,this,new d.LinkUI(this.hot,{textContent:a.FILTERS_BUTTONS_SELECT_ALL,className:"htUISelectAll"})),C(T,this,new d.LinkUI(this.hot,{textContent:a.FILTERS_BUTTONS_CLEAR,className:"htUIClearAll"})),this.registerHooks()}getItemsBox(){return w(S,this)}registerHooks(){w(b,this).addLocalHook("keydown",(e=>v(M,this,N).call(this,e))),w(b,this).addLocalHook("input",(e=>v(M,this,I).call(this,e))),w(_,this).addLocalHook("click",(e=>v(M,this,A).call(this,e))),w(T,this).addLocalHook("click",(e=>v(M,this,P).call(this,e)))}setItems(e){var t;C(E,this,e),null===(t=w(S,this))||void 0===t||t.loadData(w(E,this))}setLocale(e){C(R,this,e)}getLocale(){return w(R,this)}getItems(){return[...w(E,this)]}getValue(){return function(e){const t=[];return e.forEach((e=>{e.checked&&t.push(e.value)})),t}(w(E,this))}getSearchInputElement(){return w(b,this)}getSelectAllElement(){return w(_,this)}getClearAllElement(){return w(T,this)}isSelectedAllValues(){return w(E,this).length===this.getValue().length}build(){super.build();const{rootDocument:e}=this.hot,t=e.createElement("div"),o=new c.BaseUI(this.hot,{className:"htUISelectionControls",children:[w(_,this),w(T,this)]});this._element.appendChild(w(b,this).element),this._element.appendChild(o.element),this._element.appendChild(t);const n=t=>{var o;if(!this._element)return;null===(o=w(S,this))||void 0===o||o.destroy(),(0,s.addClass)(t,"htUIMultipleSelectHot"),C(S,this,new this.hot.constructor(t,{data:w(E,this),columns:[{data:"checked",type:"checkbox",label:{property:"visualValue",position:"after"}}],beforeRenderer:(e,t,o,s,n,i)=>{e.title=i.instance.getDataAtRowProp(t,i.label.property)},afterListen:()=>{this.runLocalHooks("focus",this)},beforeOnCellMouseUp:()=>{w(S,this).listen()},colWidths:()=>w(S,this).container.scrollWidth-(0,s.getScrollbarWidth)(e),maxCols:1,autoWrapCol:!0,height:110,copyPaste:!1,disableVisualSelection:"area",fillHandle:!1,fragmentSelection:"cell",tabMoves:{row:1,col:0},layoutDirection:this.hot.isRtl()?"rtl":"ltr"})),w(S,this).init();const n=w(S,this).getShortcutManager().getContext("grid");n.removeShortcutsByKeys(["Tab"]),n.removeShortcutsByKeys(["Shift","Tab"]),n.addShortcut({keys:[["Escape"]],callback:e=>{this.runLocalHooks("keydown",e,this)},group:y}),n.addShortcut({keys:[["Tab"],["Shift","Tab"]],callback:e=>{w(S,this).deselectCell(),this.runLocalHooks("keydown",e,this),this.runLocalHooks("listTabKeydown",e,this)},group:y})};n(t),this.hot._registerTimeout((()=>n(t)),100)}focus(){this.isBuilt()&&w(S,this).listen()}reset(){w(b,this).reset(),w(_,this).reset(),w(T,this).reset()}update(){this.isBuilt()&&(w(S,this).loadData(function(e,t){const o=(0,g.createArrayAssertion)(t);return e.map((e=>(e.checked=o(e.value),e)))}(w(E,this),this.options.value)),super.update())}destroy(){var e;null===(e=w(S,this))||void 0===e||e.destroy(),w(b,this).destroy(),w(T,this).destroy(),w(_,this).destroy(),C(b,this,null),C(T,this,null),C(_,this,null),C(S,this,null),C(E,this,null),super.destroy()}}function I(e){const t=e.target.value.toLocaleLowerCase(this.getLocale());let o;o=""===t?[...w(E,this)]:w(E,this).filter((e=>`${e.value}`.toLocaleLowerCase(this.getLocale()).indexOf(t)>=0)),w(S,this).loadData(o)}function N(e){this.runLocalHooks("keydown",e,this);(0,r.partial)(i.isKey,e.keyCode)("ARROW_DOWN")&&(e.preventDefault(),(0,h.stopImmediatePropagation)(e),w(S,this).listen(),w(S,this).selectCell(0,0))}function A(e){const t=[];e.preventDefault(),w(S,this).getSourceData().forEach(((e,o)=>{e.checked=!0,t.push((0,l.dataRowToChangesArray)(e,o)[0])})),w(S,this).setSourceDataAtCell(t)}function P(e){const t=[];e.preventDefault(),w(S,this).getSourceData().forEach(((e,o)=>{e.checked=!1,t.push((0,l.dataRowToChangesArray)(e,o)[0])})),w(S,this).setSourceDataAtCell(t)}t.MultipleSelectUI=O;t.default=O},66733:(e,t,o)=>{"use strict";t.__esModule=!0,o(67834);var s=o(13911),n=o(46026);function i(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function r(e,t){return e.get(a(e,t))}function l(e,t,o){return e.set(a(e,t),o),o}function a(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var h=new WeakMap,c=new WeakMap;class u extends n.BaseUI{static get DEFAULTS(){return(0,s.clone)({type:"radio",tagName:"input",className:"htUIRadio",label:{}})}constructor(e,t){super(e,(0,s.extend)(u.DEFAULTS,t)),i(this,h,void 0),i(this,c,void 0)}build(){super.build();const e=this.hot.rootDocument.createElement("label");e.textContent=this.translateIfPossible(this.options.label.textContent),e.htmlFor=this.translateIfPossible(this.options.label.htmlFor),l(c,this,e),l(h,this,this._element.firstChild),r(h,this).checked=this.options.checked,this._element.appendChild(e),this.update()}update(){this.isBuilt()&&(r(c,this).textContent=this.translateIfPossible(this.options.label.textContent))}isChecked(){return!!this.isBuilt()&&r(h,this).checked}setChecked(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isBuilt()&&(r(h,this).checked=e)}focus(){this.isBuilt()&&r(h,this).focus()}}t.RadioInputUI=u},92384:(e,t,o)=>{"use strict";t.__esModule=!0,o(67834);var s=o(95586),n=o(13911),i=o(9175),r=o(9893),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=u(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),a=o(58653),h=o(46026),c=o(92692);function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(u=function(e){return e?o:t})(e)}function d(e,t,o){g(e,t),t.set(e,o)}function g(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function f(e,t,o){return e.set(m(e,t),o),o}function p(e,t){return e.get(m(e,t))}function m(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var w=new WeakMap,C=new WeakMap,v=new WeakMap,y=new WeakMap,E=new WeakMap,S=new WeakSet;class R extends h.BaseUI{static get DEFAULTS(){return(0,n.clone)({className:"htUISelect",wrapIt:!1,tabIndex:-1})}constructor(e,t){var o,s;super(e,(0,n.extend)(R.DEFAULTS,t)),g(o=this,s=S),s.add(o),d(this,w,null),d(this,C,[]),d(this,v,void 0),d(this,y,void 0),d(this,E,void 0),this.registerHooks()}getMenu(){return p(w,this)}registerHooks(){this.addLocalHook("click",(()=>m(S,this,T).call(this)))}setItems(e){f(C,this,this.translateNames(e)),p(w,this)&&p(w,this).setMenuItems(p(C,this))}translateNames(e){return(0,i.arrayEach)(e,(e=>{e.name=this.translateIfPossible(e.name)})),e}build(){super.build(),f(w,this,new s.Menu(this.hot,{className:"htSelectUI htFiltersConditionsMenu",keepInViewport:!1,standalone:!0,container:this.options.menuContainer})),p(w,this).setMenuItems(p(C,this));const e=new h.BaseUI(this.hot,{className:"htUISelectCaption"}),t=new h.BaseUI(this.hot,{className:"htUISelectDropdown"});f(v,this,e),f(y,this,e.element),f(E,this,t),this.hot.getSettings().ariaTags&&((0,r.setAttribute)(t.element,[(0,c.A11Y_HIDDEN)()]),(0,r.setAttribute)(this._element,[(0,c.A11Y_LISTBOX)()])),(0,i.arrayEach)([e,t],(e=>this._element.appendChild(e.element))),p(w,this).addLocalHook("select",(e=>m(S,this,b).call(this,e))),p(w,this).addLocalHook("afterClose",(()=>m(S,this,_).call(this))),this.update()}update(){if(!this.isBuilt())return;let e;e=this.options.value?this.options.value.name:p(w,this).hot.getTranslatedPhrase(l.FILTERS_CONDITIONS_NONE),p(y,this).textContent=e,super.update()}openOptions(){const e=this.element.getBoundingClientRect();p(w,this)&&(p(w,this).open(),p(w,this).setPosition({left:this.hot.isLtr()?e.left-5:e.left-31,top:e.top-1,width:e.width,height:e.height}),p(w,this).getNavigator().toFirstItem(),p(w,this).getKeyboardShortcutsCtrl().addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],callback:e=>{this.closeOptions(),this.runLocalHooks("tabKeydown",e)}},{keys:[["Control/Meta","A"]],callback:()=>!1}]))}closeOptions(){p(w,this)&&p(w,this).close()}focus(){this.isBuilt()&&this.element.focus()}destroy(){p(w,this)&&(p(w,this).destroy(),f(w,this,null)),p(v,this)&&p(v,this).destroy(),p(E,this)&&p(E,this).destroy(),super.destroy()}}function b(e){e.name!==a.SEPARATOR&&(this.options.value=e,this.update(),this.runLocalHooks("select",this.options.value))}function _(){this.runLocalHooks("afterClose")}function T(){this.openOptions()}t.SelectUI=R},23674:(e,t,o)=>{"use strict";t.__esModule=!0,t.createArrayAssertion=h,t.intersectValues=function(e,t,o,s){const i=[],l=e===t;let a;l||(a=h(t));return(0,n.arrayEach)(e,(e=>{let t=!1;(l||a(e))&&(t=!0);const n={checked:t,value:e,visualValue:r(e,o)};s&&s(n),i.push(n)})),i},t.sortComparison=function(e,t){if("number"==typeof e&&"number"==typeof t)return e-t;return i(e,t)},t.toEmptyString=function(e){return null==e?"":e},t.toVisualValue=r,t.unifyColumnValues=function(e){let t=e;t=a?Array.from(new Set(t)):(0,n.arrayUnique)(t);return t=t.sort(((e,t)=>"number"==typeof e&&"number"==typeof t?e-t:e===t?0:e>t?1:-1)),t},o(15724),o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var s=o(93980),n=o(9175);const i=(0,s.getComparisonFunction)();function r(e,t){let o=e;return""===o&&(o=`(${t})`),o}const l=new Set([1]).has(1),a=l&&"function"==typeof Array.from;function h(e){let t=e;return l&&(t=new Set(t)),function(e){let o;return o=l?t.has(e):!!~t.indexOf(e),o}}},89121:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.getRegisteredHotInstances=function(e){var t;const o=u(),s=0===o.size?[]:Array.from(null!==(t=o.get(e))&&void 0!==t?t:[]);return new Map(s.map((e=>[e.getPlugin("formulas").sheetId,e])))},t.registerCustomFunctions=f,t.registerEngine=g,t.registerLanguage=p,t.registerNamedExpressions=m,t.setupEngine=function(e){const t=e.getSettings(),o=t[h.PLUGIN_KEY],s=null==o?void 0:o.engine;if(!0===o)return null;if((0,i.isUndefined)(s))return null;var n;if("function"==typeof s.hyperformula||"function"==typeof s)return g(null!==(n=s.hyperformula)&&void 0!==n?n:s,t,e);if("object"==typeof s&&(0,i.isUndefined)(s.hyperformula)){const t=u(),o=d().get(s);return t.has(s)||t.set(s,[]),t.get(s).push(e),o&&o.push(e.guid),s.getConfig().licenseKey||s.updateConfig({licenseKey:c.DEFAULT_LICENSE_KEY}),s.getConfig().leapYear1900===c.DEFAULT_SETTINGS.leapYear1900&&!1!==(0,a.isObjectEqual)(s.getConfig().nullDate,c.DEFAULT_SETTINGS.nullDate)||(0,l.warn)(r.toSingleLine`If you use HyperFormula with Handsontable, keep the default \`leapYear1900\` and \`nullDate\`
74
+ settings. Otherwise, HyperFormula's dates may not sync correctly with Handsontable's dates.`),s}return null},t.setupSheet=function(e,t){!(0,i.isUndefined)(t)&&e.doesSheetExist(t)||(t=e.addSheet(t));return t},t.unregisterEngine=function(e,t){if(e){const o=u(),s=o.get(e),n=d(),i=n.get(e);s&&s.includes(t)&&(s.splice(s.indexOf(t),1),0===s.length&&o.delete(e)),i&&i.includes(t.guid)&&(i.splice(i.indexOf(t.guid),1),0===i.length&&(n.delete(e),e.destroy()))}},o(15724);var n=s(o(71263)),i=o(38893),r=o(28927),l=o(83119),a=o(13911),h=o(66244),c=o(47329);function u(){const e="engine_relationship",t=(0,n.default)(h.PLUGIN_KEY);return t.hasItem(e)||t.register(e,new Map),t.getItem(e)}function d(){const e="shared_engine_usage",t=(0,n.default)(h.PLUGIN_KEY);return t.hasItem(e)||t.register(e,new Map),t.getItem(e)}function g(e,t,o){const s=t[h.PLUGIN_KEY],n=(0,c.getEngineSettingsWithDefaultsAndOverrides)(t),i=u(),r=d();f(e,s.functions),p(e,s.language);const l=e.buildEmpty(n);return i.set(l,[o]),r.set(l,[o.guid]),m(l,s.namedExpressions),l.on("sheetAdded",(()=>{l.rebuildAndRecalculate()})),l.on("sheetRemoved",(()=>{l.rebuildAndRecalculate()})),l}function f(e,t){t&&t.forEach((t=>{const{name:o,plugin:s,translations:n}=t;try{e.registerFunction(o,s,n)}catch(e){(0,l.warn)(e.message)}}))}function p(e,t){if(t){const{langCode:o}=t;try{e.registerLanguage(o,t)}catch(e){(0,l.warn)(e.message)}}}function m(e,t){t&&(e.suspendEvaluation(),t.forEach((t=>{const{name:o,expression:s,scope:n,options:i}=t;try{e.addNamedExpression(o,s,n,i)}catch(e){(0,l.warn)(e.message)}})),e.resumeEvaluation())}},47329:(e,t,o)=>{"use strict";t.__esModule=!0,t.getEngineSettingsOverrides=r,t.getEngineSettingsWithDefaultsAndOverrides=function(e){var t;const o=e[s.PLUGIN_KEY],n=l(null!=o&&null!==(t=o.engine)&&void 0!==t&&t.hyperformula?o.engine:{}),a=r(e);return{...i,...n,...a}},t.getEngineSettingsWithOverrides=function(e){var t;const o=e[s.PLUGIN_KEY],n=l(null!=o&&null!==(t=o.engine)&&void 0!==t&&t.hyperformula?o.engine:{}),i=r(e);return{...n,...i}},t.haveEngineSettingsChanged=function(e,t){return Object.keys(t).some((o=>void 0!==t[o]&&t[o]!==e[o]))};var s=o(66244);const n=t.DEFAULT_LICENSE_KEY="internal-use-in-handsontable",i=t.DEFAULT_SETTINGS={licenseKey:n,useArrayArithmetic:!0,useColumnIndex:!1,useStats:!1,evaluateNullToZero:!0,precisionEpsilon:1e-13,precisionRounding:14,smartRounding:!0,leapYear1900:!1,nullDate:{year:1899,month:12,day:30},nullYear:30,dateFormats:["DD/MM/YYYY","DD/MM/YY"],timeFormats:["hh:mm","hh:mm:ss.sss"],matchWholeCell:!0,useRegularExpressions:!1,useWildcards:!0,functionArgSeparator:",",thousandSeparator:"",decimalSeparator:".",language:"enGB"};function r(e){var t;return{maxColumns:e.maxColumns,maxRows:e.maxRows,language:null===(t=e[s.PLUGIN_KEY])||void 0===t||null===(t=t.language)||void 0===t?void 0:t.langCode}}function l(e){return Object.keys(e).reduce(((t,o)=>("hyperformula"!==o&&(t[o]=e[o]),t)),{})}},66244:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724),o(66184),o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var n=s(o(85707)),i=o(61205),r=s(o(71263)),l=o(83119),a=o(87485),h=o(38893),c=o(89121),u=o(92674),d=o(47329),g=o(56216),f=o(59777),p=s(o(56937)),m=s(o(27080));function w(e,t,o){C(e,t),t.set(e,o)}function C(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function v(e,t,o){return e.set(E(e,t),o),o}function y(e,t){return e.get(E(e,t))}function E(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}const S=t.PLUGIN_KEY="formulas",R=t.SETTING_KEYS=["maxRows","maxColumns","language"],b=t.PLUGIN_PRIORITY=260;p.default.getSingleton().register("afterNamedExpressionAdded"),p.default.getSingleton().register("afterNamedExpressionRemoved"),p.default.getSingleton().register("afterSheetAdded"),p.default.getSingleton().register("afterSheetRemoved"),p.default.getSingleton().register("afterSheetRenamed"),p.default.getSingleton().register("afterFormulasValuesUpdate");const _=e=>"UndoRedo.undo"===e||"UndoRedo.redo"===e||"auto"===e;var T=new WeakMap,M=new WeakMap,O=new WeakMap,I=new WeakSet;class N extends i.BasePlugin{constructor(){var e,t,o;super(...arguments),e=this,C(t=this,o=I),o.add(t),w(this,T,!1),w(this,M,!1),w(this,O,[["valuesUpdated",function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return E(I,e,X).call(e,...o)}],["namedExpressionAdded",function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return E(I,e,q).call(e,...o)}],["namedExpressionRemoved",function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return E(I,e,Q).call(e,...o)}],["sheetAdded",function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return E(I,e,J).call(e,...o)}],["sheetRenamed",function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return E(I,e,Z).call(e,...o)}],["sheetRemoved",function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return E(I,e,ee).call(e,...o)}]]),(0,n.default)(this,"staticRegister",(0,r.default)("formulas")),(0,n.default)(this,"engine",null),(0,n.default)(this,"sheetName",null),(0,n.default)(this,"indexSyncer",null),(0,n.default)(this,"rowAxisSyncer",null),(0,n.default)(this,"columnAxisSyncer",null)}static get PLUGIN_KEY(){return S}static get PLUGIN_PRIORITY(){return b}static get SETTING_KEYS(){return[S,...R]}get sheetId(){return null===this.sheetName?null:this.engine.getSheetId(this.sheetName)}isEnabled(){return!!this.hot.getSettings()[S]}enablePlugin(){var e,t=this;if(!this.enabled)if(this.engine=null!==(e=(0,c.setupEngine)(this.hot))&&void 0!==e?e:this.engine,this.engine){if(null!==this.sheetName&&!this.engine.doesSheetExist(this.sheetName)){const e=this.addSheet(this.sheetName,this.hot.getSourceDataArray());!1!==e&&(this.sheetName=e)}this.addHook("beforeLoadData",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,x).call(t,...o)})),this.addHook("afterLoadData",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,D).call(t,...o)})),this.addHook("beforeUpdateData",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,x).call(t,...o)})),this.addHook("afterUpdateData",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,D).call(t,...o)})),this.addHook("modifyData",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,k).call(t,...o)})),this.addHook("modifySourceData",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,L).call(t,...o)})),this.addHook("beforeValidate",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,A).call(t,...o)})),this.addHook("afterSetSourceDataAtCell",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,F).call(t,...o)})),this.addHook("afterSetDataAtCell",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,V).call(t,...o)})),this.addHook("afterSetDataAtRowProp",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,V).call(t,...o)})),this.addHook("beforeCreateRow",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,W).call(t,...o)})),this.addHook("beforeCreateCol",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,B).call(t,...o)})),this.addHook("afterCreateRow",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,Y).call(t,...o)})),this.addHook("afterCreateCol",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,z).call(t,...o)})),this.addHook("beforeRemoveRow",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,U).call(t,...o)})),this.addHook("beforeRemoveCol",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,j).call(t,...o)})),this.addHook("afterRemoveRow",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,G).call(t,...o)})),this.addHook("afterRemoveCol",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,$).call(t,...o)})),this.indexSyncer=new m.default(this.hot.rowIndexMapper,this.hot.columnIndexMapper,(e=>{this.hot.addHookOnce("init",(()=>{e()}))})),this.rowAxisSyncer=this.indexSyncer.getForAxis("row"),this.columnAxisSyncer=this.indexSyncer.getForAxis("column"),this.hot.addHook("afterRowSequenceChange",this.rowAxisSyncer.getIndexesChangeSyncMethod()),this.hot.addHook("afterColumnSequenceChange",this.columnAxisSyncer.getIndexesChangeSyncMethod()),this.hot.addHook("beforeRowMove",((e,t,o,s)=>{this.rowAxisSyncer.storeMovesInformation(e,t,s)})),this.hot.addHook("beforeColumnMove",((e,t,o,s)=>{this.columnAxisSyncer.storeMovesInformation(e,t,s)})),this.hot.addHook("afterRowMove",((e,t,o,s,n)=>{this.rowAxisSyncer.calculateAndSyncMoves(s,n)})),this.hot.addHook("afterColumnMove",((e,t,o,s,n)=>{this.columnAxisSyncer.calculateAndSyncMoves(s,n)})),this.hot.addHook("beforeColumnFreeze",((e,t)=>{this.columnAxisSyncer.storeMovesInformation([e],this.hot.getSettings().fixedColumnsStart,t)})),this.hot.addHook("afterColumnFreeze",((e,t)=>{this.columnAxisSyncer.calculateAndSyncMoves(t,t)})),this.hot.addHook("beforeColumnUnfreeze",((e,t)=>{this.columnAxisSyncer.storeMovesInformation([e],this.hot.getSettings().fixedColumnsStart-1,t)})),this.hot.addHook("afterColumnUnfreeze",((e,t)=>{this.columnAxisSyncer.calculateAndSyncMoves(t,t)})),this.addHook("afterCellMetaReset",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,H).call(t,...o)})),this.addHook("beforeUndo",(()=>{this.indexSyncer.setPerformUndo(!0),this.engine.undo()})),this.addHook("beforeRedo",(()=>{this.indexSyncer.setPerformRedo(!0),this.engine.redo()})),this.addHook("afterUndo",(()=>{this.indexSyncer.setPerformUndo(!1)})),this.addHook("afterUndo",(()=>{this.indexSyncer.setPerformRedo(!1)})),this.addHook("afterDetachChild",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,K).call(t,...o)})),this.addHook("beforeAutofill",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return E(I,t,P).call(t,...o)})),y(O,this).forEach((e=>{let[t,o]=e;return this.engine.on(t,o)})),super.enablePlugin()}else(0,l.warn)("Missing the required `engine` key in the Formulas settings. Please fill it with either an engine class or an engine instance.")}disablePlugin(){y(O,this).forEach((e=>{let[t,o]=e;return this.engine.off(t,o)})),(0,c.unregisterEngine)(this.engine,this.hot),this.engine=null,super.disablePlugin()}updatePlugin(e){const t=(0,d.getEngineSettingsWithOverrides)(this.hot.getSettings());(0,d.haveEngineSettingsChanged)(this.engine.getConfig(),t)&&this.engine.updateConfig(t);const o=this.hot.getSettings()[S];if((0,h.isDefined)(o)&&(0,h.isDefined)(o.sheetName)&&o.sheetName!==this.sheetName&&this.switchSheet(o.sheetName),!e.data&&null===this.sheetName){const e=this.hot.getSettings()[S].sheetName;e&&this.engine.doesSheetExist(e)?this.switchSheet(this.sheetName):this.sheetName=this.addSheet(null!=e?e:void 0,this.hot.getSourceDataArray())}super.updatePlugin(e)}destroy(){y(O,this).forEach((e=>{var t;let[o,s]=e;return null===(t=this.engine)||void 0===t?void 0:t.off(o,s)})),v(O,this,null),(0,c.unregisterEngine)(this.engine,this.hot),this.engine=null,super.destroy()}addSheet(e,t){if((0,h.isDefined)(t)&&!(0,g.isArrayOfArrays)(t))return(0,l.warn)("The provided data should be an array of arrays."),!1;if(null!=e&&this.engine.doesSheetExist(e))return(0,l.warn)("Sheet with the provided name already exists."),!1;try{const o=this.engine.addSheet(null!=e?e:void 0);return t&&this.engine.setSheetContent(this.engine.getSheetId(o),t),o}catch(e){return(0,l.warn)(e.message),!1}}switchSheet(e){if(!this.engine.doesSheetExist(e))return void(0,l.error)(`The sheet named \`${e}\` does not exist, switch aborted.`);this.sheetName=e;const t=this.engine.getSheetSerialized(this.sheetId);t.length>0&&this.hot.loadData(t,`${(0,f.toUpperCaseFirst)(S)}.switchSheet`)}getCellType(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.sheetId;const s=this.hot.toPhysicalRow(e),n=this.hot.toPhysicalColumn(t);return null!==s&&null!==n?this.engine.getCellType({sheet:o,row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t)}):"EMPTY"}isFormulaCellType(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.sheetId;return this.engine.doesCellHaveFormula({sheet:o,row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t)})}renderDependentSheets(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=new Set;e.forEach((e=>{var t;const s=null==e||null===(t=e.address)||void 0===t?void 0:t.sheet;void 0!==s&&(o.has(s)||o.add(s))})),(0,c.getRegisteredHotInstances)(this.engine).forEach(((e,s)=>{var n;(t||s!==this.sheetId)&&o.has(s)&&(e.render(),null===(n=e.view)||void 0===n||n.adjustElementsSize())}))}validateDependentCells(e){const t=e=>{var t;const{row:o,col:s,sheet:n}=null!==(t=null==e?void 0:e.address)&&void 0!==t?t:{};return(0,h.isDefined)(n)?`${n}:${o}x${s}`:""},o=new Set((arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).map((e=>t(e))));e.forEach((e=>{var s,n;const{row:i,col:r}=null!==(s=e.address)&&void 0!==s?s:{};if(!1===(0,h.isDefined)(i)||!1===(0,h.isDefined)(r)||i>=this.hot.countRows()||r>=this.hot.countCols())return;const l=null==e||null===(n=e.address)||void 0===n?void 0:n.sheet,a=t(e);if(void 0!==l&&!o.has(a)){const e=(0,c.getRegisteredHotInstances)(this.engine).get(l);if(!e)return;e.validateCell(e.getDataAtCell(i,r),e.getCellMeta(i,r),(()=>{}))}}))}syncChangeWithEngine(e,t,o){const s={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t),sheet:this.sheetId};if(!this.engine.isItPossibleToSetCellContents(s))return void(0,l.warn)(`Not possible to set cell data at ${JSON.stringify(s)}`);const n=this.hot.getCellMeta(e,t);return(0,u.isDate)(o,n.type)&&((0,u.isDateValid)(o,n.dateFormat)?o=(0,u.getDateInHfFormat)(o,n.dateFormat):!1===(0,u.isFormula)(o)&&(o=`'${o}`)),this.engine.setCellContents(s,o)}}function A(e,t,o){const s=this.hot.propToCol(o);if(this.isFormulaCellType(t,s)){const e={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(s),sheet:this.sheetId},o=this.hot.getCellMeta(t,s);let n=this.engine.getCellValue(e);return"date"===o.type&&(0,a.isNumeric)(n)&&(n=(0,u.getDateFromExcelDate)(n,o.dateFormat)),"object"==typeof n&&null!==n?n.value:n}return e}function P(e,t,o){const{row:s,col:n}=t.getTopStartCorner(),{row:i,col:r}=t.getBottomEndCorner(),{row:l,col:a}=o.getTopStartCorner(),{row:h,col:c}=o.getBottomEndCorner(),d={start:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(s),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(n),sheet:this.sheetId},end:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(i),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(r),sheet:this.sheetId}},g={start:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(l),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(a),sheet:this.sheetId},end:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(h),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(c),sheet:this.sheetId}};if(!1===this.engine.isItPossibleToSetCellContents(g))return!1;const f=this.engine.getFillRangeData(d,g),{row:p,col:m}=d.start,{row:w,col:C}=d.end,v=w-p+1,y=C-m+1;for(let e=0;e<f.length;e+=1)for(let t=0;t<f[e].length;t+=1){const o=f[e][t],s=p+e%v,n=m+t%y,i=this.hot.getCellMeta(s,n);(0,u.isDate)(o,i.type)&&(o.startsWith("'")?f[e][t]=o.slice(1):!1===this.isFormulaCellType(s,n,this.sheetId)&&(f[e][t]=(0,u.getDateInHotFormat)(o,i.dateFormat)))}return f}function x(e,t){(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"").includes((0,f.toUpperCaseFirst)(S))||v(M,this,(0,h.isUndefined)(this.hot.getSettings().data))}function H(){const e=this.hot.getSourceDataArray();let t=!1;e.forEach(((o,s)=>{o.forEach(((o,n)=>{const i=this.hot.getCellMeta(s,n),r=i.dateFormat;(0,u.isDate)(o,i.type)&&(t=!0,(0,u.isDateValid)(o,r)?e[s][n]=(0,u.getDateInHfFormat)(o,r):!1===this.isFormulaCellType(s,n)&&(e[s][n]=`'${o}`))}))})),!0===t&&(v(T,this,!0),this.engine.setSheetContent(this.sheetId,e),v(T,this,!1))}function D(e,t){if(!(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"").includes((0,f.toUpperCaseFirst)(S)))if(this.sheetName=(0,c.setupSheet)(this.engine,this.hot.getSettings()[S].sheetName),y(M,this))this.switchSheet(this.sheetName);else{const e=this.hot.getSourceDataArray();if(this.engine.isItPossibleToReplaceSheetContent(this.sheetId,e)){v(T,this,!0);const t=this.engine.setSheetContent(this.sheetId,e);this.indexSyncer.setupSyncEndpoint(this.engine,this.sheetId),this.renderDependentSheets(t),v(T,this,!1)}}}function k(e,t,o,s){if("get"!==s||y(T,this)||null===this.sheetName||!this.engine.doesSheetExist(this.sheetName))return;const n=this.hot.toVisualRow(e);if(null===n||null===t)return;if(!this.isFormulaCellType(n,t)){if("ARRAY"!==this.getCellType(n,t))return void((0,u.isEscapedFormulaExpression)(o.value)&&(o.value=(0,u.unescapeFormulaExpression)(o.value)))}const i={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(n),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t),sheet:this.sheetId};let r=this.engine.getCellValue(i),l=this.hot.getCellsMeta().find((e=>e.visualRow===n&&e.visualCol===t));void 0===l&&(l={}),"date"===l.type&&(0,a.isNumeric)(r)&&(r=(0,u.getDateFromExcelDate)(r,l.dateFormat));const h="object"==typeof r&&null!==r?r.value:r;o.value=h}function L(e,t,o,s){if("get"!==s||y(T,this)||null===this.sheetName||!this.engine.doesSheetExist(this.sheetName))return;const n=this.hot.toVisualRow(e),i=this.hot.propToCol(t);if(null===n||null===i)return;if(!this.isFormulaCellType(n,i)){if("ARRAY"!==this.getCellType(n,i))return}const r=this.engine.getSheetDimensions(this.engine.getSheetId(this.sheetName));if(0===r.width&&0===r.height)return;const l={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(n),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(i),sheet:this.sheetId};o.value=this.engine.getCellSerialized(l)}function V(e,t){if(_(t))return;const o=[],s=[],n=this.engine.batch((()=>{e.forEach((e=>{let[t,n,,i]=e;const r=this.hot.propToCol(n),l=this.hot.toPhysicalRow(t),a=this.hot.toPhysicalColumn(r),h={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(r),sheet:this.sheetId};null!==l&&null!==a?this.syncChangeWithEngine(t,r,i):o.push([t,r,i]),s.push({address:h})}))}));o.length&&this.hot.addHookOnce("afterChange",(()=>{const e=this.engine.batch((()=>{o.forEach((e=>{let[t,o,s]=e;this.syncChangeWithEngine(t,o,s)}))}));this.renderDependentSheets(e,!0)})),this.renderDependentSheets(n),this.validateDependentCells(n,s)}function F(e,t){if(_(t))return;const o=[],s=[];e.forEach((e=>{let[t,n,,i]=e;const r=this.hot.propToCol(n);if(!(0,a.isNumeric)(r))return;const h={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(r),sheet:this.sheetId};this.engine.isItPossibleToSetCellContents(h)?(s.push({address:h}),o.push(...this.engine.setCellContents(h,i))):(0,l.warn)(`Not possible to set source cell data at ${JSON.stringify(h)}`)})),this.renderDependentSheets(o),this.validateDependentCells(o,s)}function W(e,t){let o=this.rowAxisSyncer.getHfIndexFromVisualIndex(e);if(e>=this.hot.countRows()&&(o=e),null===this.sheetId||!this.engine.doesSheetExist(this.sheetName)||!this.engine.isItPossibleToAddRows(this.sheetId,[o,t]))return!1}function B(e,t){let o=this.columnAxisSyncer.getHfIndexFromVisualIndex(e);if(e>=this.hot.countCols()&&(o=e),null===this.sheetId||!this.engine.doesSheetExist(this.sheetName)||!this.engine.isItPossibleToAddColumns(this.sheetId,[o,t]))return!1}function U(e,t,o){return!1!==this.rowAxisSyncer.setRemovedHfIndexes(o).every((e=>this.engine.isItPossibleToRemoveRows(this.sheetId,[e,1])))&&void 0}function j(e,t,o){return!1!==this.columnAxisSyncer.setRemovedHfIndexes(o).every((e=>this.engine.isItPossibleToRemoveColumns(this.sheetId,[e,1])))&&void 0}function Y(e,t,o){if(_(o))return;const s=this.engine.addRows(this.sheetId,[this.rowAxisSyncer.getHfIndexFromVisualIndex(e),t]);this.renderDependentSheets(s)}function z(e,t,o){if(_(o))return;const s=this.engine.addColumns(this.sheetId,[this.columnAxisSyncer.getHfIndexFromVisualIndex(e),t]);this.renderDependentSheets(s)}function G(e,t,o,s){if(_(s))return;const n=this.rowAxisSyncer.getRemovedHfIndexes().sort(((e,t)=>t-e)),i=this.engine.batch((()=>{n.forEach((e=>{this.engine.removeRows(this.sheetId,[e,1])}))}));this.renderDependentSheets(i)}function $(e,t,o,s){if(_(s))return;const n=this.columnAxisSyncer.getRemovedHfIndexes().sort(((e,t)=>t-e)),i=this.engine.batch((()=>{n.forEach((e=>{this.engine.removeColumns(this.sheetId,[e,1])}))}));this.renderDependentSheets(i)}function K(e,t,o){var s;v(T,this,!0);const n=this.hot.getSourceDataArray(o,0,o+((null===(s=t.__children)||void 0===s?void 0:s.length)||0),this.hot.countSourceCols());v(T,this,!1),n.forEach(((e,t)=>{e.forEach(((e,s)=>{this.engine.setCellContents({col:s,row:o+t,sheet:this.sheetId},[[e]])}))}))}function X(e){this.hot.runHooks("afterFormulasValuesUpdate",e)}function q(e,t){this.hot.runHooks("afterNamedExpressionAdded",e,t)}function Q(e,t){this.hot.runHooks("afterNamedExpressionRemoved",e,t)}function J(e){this.hot.runHooks("afterSheetAdded",e)}function Z(e,t){this.sheetName=t,this.hot.runHooks("afterSheetRenamed",e,t)}function ee(e,t){this.hot.runHooks("afterSheetRemoved",e,t)}t.Formulas=N},1687:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(66244);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.Formulas=s.Formulas},28795:(e,t,o)=>{"use strict";t.__esModule=!0,o(67834),o(15724);var s=o(59777),n=o(77408);function i(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function r(e,t){return e.get(a(e,t))}function l(e,t,o){return e.set(a(e,t),o),o}function a(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var h=new WeakMap,c=new WeakMap,u=new WeakMap,d=new WeakMap,g=new WeakMap,f=new WeakMap,p=new WeakMap;t.default=class{constructor(e,t,o){i(this,h,void 0),i(this,c,void 0),i(this,u,void 0),i(this,d,[]),i(this,g,[]),i(this,f,void 0),i(this,p,[]),l(h,this,e),l(c,this,t),l(u,this,o)}setRemovedHfIndexes(e){return l(p,this,e.map((e=>{const t=r(c,this).getVisualFromPhysicalIndex(e);return this.getHfIndexFromVisualIndex(t)}))),r(p,this)}getRemovedHfIndexes(){return r(p,this)}getHfIndexFromVisualIndex(e){const t=r(c,this).getIndexesSequence(),o=r(c,this).getNotTrimmedIndexes();return t.indexOf(o[e])}syncMoves(e){const t=`move${(0,s.toUpperCaseFirst)(r(h,this))}s`;r(u,this).getEngine().batch((()=>{e.forEach((e=>{const o=e.from!==e.to,s=e.from+1!==e.to;o&&s&&r(u,this).getEngine()[t](r(u,this).getSheetId(),e.from,1,e.to)}))}))}storeMovesInformation(e,t,o){!1!==o&&(l(g,this,e.map((e=>this.getHfIndexFromVisualIndex(e)))),l(f,this,this.getHfIndexFromVisualIndex(t)))}calculateAndSyncMoves(e,t){if(r(u,this).isPerformingUndoRedo())return;if(!1===e||!1===t)return;const o=(0,n.getMoves)(r(g,this),r(f,this),r(c,this).getNumberOfIndexes());null===r(u,this).getSheetId()?r(u,this).getPostponeAction((()=>this.syncMoves(o))):this.syncMoves(o)}getIndexesChangeSyncMethod(){const e=`set${(0,s.toUpperCaseFirst)(r(h,this))}Order`;return t=>{if(r(u,this).isPerformingUndoRedo())return;const o=r(c,this).getIndexesSequence();if("update"===t&&o.length>0){const t=r(d,this).map((e=>o.indexOf(e))),s=r(u,this).getEngine().getSheetDimensions(r(u,this).getSheetId());let n;n="row"===r(h,this)?s.height:s.width;for(let e=t.length;e<n;e+=1)t.push(e);r(u,this).getEngine()[e](r(u,this).getSheetId(),t)}l(d,this,o)}}init(){l(d,this,r(c,this).getIndexesSequence())}}},27080:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=s(o(28795));function i(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function r(e,t){return e.get(a(e,t))}function l(e,t,o){return e.set(a(e,t),o),o}function a(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var h=new WeakMap,c=new WeakMap,u=new WeakMap,d=new WeakMap,g=new WeakMap,f=new WeakMap,p=new WeakMap;t.default=class{constructor(e,t,o){i(this,h,void 0),i(this,c,void 0),i(this,u,void 0),i(this,d,!1),i(this,g,!1),i(this,f,null),i(this,p,null),l(h,this,new n.default("row",e,this)),l(c,this,new n.default("column",t,this)),l(u,this,o)}getForAxis(e){return r("row"===e?h:c,this)}setPerformUndo(e){l(d,this,e)}setPerformRedo(e){l(g,this,e)}isPerformingUndoRedo(){return r(d,this)||r(g,this)}getSheetId(){return r(p,this)}getEngine(){return r(f,this)}getPostponeAction(){return r(u,this)}setupSyncEndpoint(e,t){l(f,this,e),l(p,this,t),r(h,this).init(),r(c,this).init()}}},92674:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.getDateFromExcelDate=function(e,t){const o=new Date(Date.UTC(0,0,e+-1));return(0,n.default)(o).format(t)},t.getDateInHfFormat=function(e,t){return(0,n.default)(e,t,!0).format(i)},t.getDateInHotFormat=function(e,t){return(0,n.default)(e,i,!0).format(t)},t.isDate=function(e,t){return"string"==typeof e&&"date"===t},t.isDateValid=function(e,t){return(0,n.default)(e,t,!0).isValid()},t.isEscapedFormulaExpression=r,t.isFormula=function(e){return"string"==typeof e&&e.startsWith("=")},t.unescapeFormulaExpression=function(e){return r(e)?e.substr(1):e};var n=s(o(86798));const i="DD/MM/YYYY";function r(e){return"string"==typeof e&&"'"===e.charAt(0)&&"="===e.charAt(1)}},63089:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"hidden_columns_hide",name(){const e=this.getSelectedLast();let t=0;if(Array.isArray(e)){const[,o,,s]=e;o-s!=0&&(t=1)}return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_HIDE_COLUMN,t)},callback(){const{from:t,to:o}=this.getSelectedRangeLast(),s=Math.max(Math.min(t.col,o.col),0),n=Math.max(t.col,o.col),i=[];for(let e=s;e<=n;e+=1)i.push(e);e.hideColumns(i);const r=i[i.length-1],l=this.columnIndexMapper.getNearestNotHiddenIndex(r,1,!0);Number.isInteger(l)&&l>=0?this.selectColumns(l):this.deselectCell(),this.render(),this.view.adjustElementsSize()},disabled:!1,hidden(){return!(this.selection.isSelectedByColumnHeader()||this.selection.isSelectedByCorner())}}},o(15724);var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=i?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}},29116:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=[];return{key:"hidden_columns_show",name(){const e=t.length>1?1:0;return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_SHOW_COLUMN,e)},callback(){var o,s;if(0===t.length)return;let n=t[0],i=t[t.length-1];n=null!==(o=this.columnIndexMapper.getNearestNotHiddenIndex(n-1,-1))&&void 0!==o?o:0,i=null!==(s=this.columnIndexMapper.getNearestNotHiddenIndex(i+1,1))&&void 0!==s?s:this.countCols()-1,e.showColumns(t),this.render(),this.view.adjustElementsSize();i-n+1===this.countCols()||this.selectColumns(n,i)},disabled:!1,hidden(){const o=(0,s.arrayMap)(e.getHiddenColumns(),(e=>this.toPhysicalColumn(e)));if(!this.selection.isSelectedByColumnHeader()&&!this.selection.isSelectedByCorner()||o.length<1)return!0;t.length=0;const n=this.getSelectedRangeLast(),i=n.getTopStartCorner().col,r=n.getBottomEndCorner().col,l=this.columnIndexMapper,a=l.getRenderableFromVisualIndex(i),h=l.getRenderableFromVisualIndex(r),c=l.getNotTrimmedIndexes(),u=[];if(i!==r){if(r-i+1>h-a+1){const e=c.slice(i,r+1);u.push(...e.filter((e=>o.includes(e))))}}else if(0===a&&a<i)u.push(...c.slice(0,i));else if(null===a)u.push(...c.slice(0,this.countCols()));else{const e=this.countCols()-1;h===l.getRenderableFromVisualIndex(l.getNearestNotHiddenIndex(e,-1))&&e>r&&u.push(...c.slice(r+1))}return(0,s.arrayEach)(u,(e=>{t.push(this.toVisualColumn(e))})),0===t.length}}},o(15724);var s=o(9175),n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}},10452:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724),o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var n=o(61205),i=o(9893),r=o(87485),l=o(9175),a=o(13911),h=o(38893),c=o(58653),u=s(o(56937)),d=s(o(63089)),g=s(o(29116)),f=o(93969);function p(e,t,o){m(e,t),t.set(e,o)}function m(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function w(e,t){return e.get(v(e,t))}function C(e,t,o){return e.set(v(e,t),o),o}function v(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}o(93975),u.default.getSingleton().register("beforeHideColumns"),u.default.getSingleton().register("afterHideColumns"),u.default.getSingleton().register("beforeUnhideColumns"),u.default.getSingleton().register("afterUnhideColumns");const y=t.PLUGIN_KEY="hiddenColumns",E=t.PLUGIN_PRIORITY=310;var S=new WeakMap,R=new WeakMap,b=new WeakSet;class _ extends n.BasePlugin{constructor(){var e,t;super(...arguments),m(e=this,t=b),t.add(e),p(this,S,{}),p(this,R,null)}static get PLUGIN_KEY(){return y}static get PLUGIN_PRIORITY(){return E}isEnabled(){return!!this.hot.getSettings()[y]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[y];(0,a.isObject)(t)&&(C(S,this,t),(0,h.isUndefined)(t.copyPasteEnabled)&&(t.copyPasteEnabled=!0)),C(R,this,new f.HidingMap),w(R,this).addLocalHook("init",(()=>v(b,this,A).call(this))),this.hot.columnIndexMapper.registerMap(this.pluginName,w(R,this)),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(b,e,N).call(e,...o)})),this.addHook("afterGetCellMeta",((e,t,o)=>v(b,this,M).call(this,e,t,o))),this.addHook("modifyColWidth",((e,t)=>v(b,this,T).call(this,e,t)),2),this.addHook("afterGetColHeader",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(b,e,I).call(e,...o)})),this.addHook("modifyCopyableRange",(e=>v(b,this,O).call(this,e))),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.hot.columnIndexMapper.unregisterMap(this.pluginName),C(S,this,{}),super.disablePlugin(),this.resetCellsMeta()}showColumns(e){const t=this.getHiddenColumns(),o=this.isValidConfig(e);let s=t;const n=w(R,this).getValues().slice(),i=e.length>0;if(o&&i){const t=e.map((e=>this.hot.toPhysicalColumn(e)));(0,l.arrayEach)(t,(e=>{n[e]=!1})),s=(0,l.arrayReduce)(n,((e,t,o)=>(t&&e.push(this.hot.toVisualColumn(o)),e)),[])}!1!==this.hot.runHooks("beforeUnhideColumns",t,s,o&&i)&&(o&&i&&w(R,this).setValues(n),this.hot.view.adjustElementsSize(),this.hot.runHooks("afterUnhideColumns",t,s,o&&i,o&&s.length<t.length))}showColumn(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.showColumns(t)}hideColumns(e){const t=this.getHiddenColumns(),o=this.isValidConfig(e);let s=t;o&&(s=Array.from(new Set(t.concat(e))));!1!==this.hot.runHooks("beforeHideColumns",t,s,o)&&(o&&this.hot.batchExecution((()=>{(0,l.arrayEach)(e,(e=>{w(R,this).setValueAtIndex(this.hot.toPhysicalColumn(e),!0)}))}),!0),this.hot.runHooks("afterHideColumns",t,s,o,o&&s.length>t.length))}hideColumn(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.hideColumns(t)}getHiddenColumns(){return(0,l.arrayMap)(w(R,this).getHiddenIndexes(),(e=>this.hot.toVisualColumn(e)))}isHidden(e){return w(R,this).getValueAtIndex(this.hot.toPhysicalColumn(e))||!1}isValidConfig(e){const t=this.hot.countCols();return!!(Array.isArray(e)&&e.length>0)&&e.every((e=>Number.isInteger(e)&&e>=0&&e<t))}resetCellsMeta(){(0,l.arrayEach)(this.hot.getCellsMeta(),(e=>{e&&(e.skipColumnOnPaste=!1)}))}destroy(){C(S,this,null),C(R,this,null),super.destroy()}}function T(e,t){return this.isHidden(t)?0:w(S,this).indicators&&(this.isHidden(t+1)||this.isHidden(t-1))&&"number"==typeof e&&this.hot.hasColHeaders()?e+15:void 0}function M(e,t,o){if(!1===w(S,this).copyPasteEnabled&&this.isHidden(t)&&(o.skipColumnOnPaste=!0),this.isHidden(t-1))o.className=o.className||"",-1===o.className.indexOf("afterHiddenColumn")&&(o.className+=" afterHiddenColumn");else if(o.className){const e=o.className.split(" ");if(e.length>0){const t=e.indexOf("afterHiddenColumn");t>-1&&e.splice(t,1),o.className=e.join(" ")}}}function O(e){if(w(S,this).copyPasteEnabled)return e;const t=[],o=(e,o,s,n)=>{t.push({startRow:e,endRow:o,startCol:s,endCol:n})};return(0,l.arrayEach)(e,(e=>{let t=!0,s=0;(0,r.rangeEach)(e.startCol,e.endCol,(n=>{this.isHidden(n)?(t||o(e.startRow,e.endRow,s,n-1),t=!0):(t&&(s=n),n===e.endCol&&o(e.startRow,e.endRow,s,n),t=!1)}))})),t}function I(e,t){if(!w(S,this).indicators||e<0)return;const o=[];e>=1&&this.isHidden(e-1)&&o.push("afterHiddenColumn"),e<this.hot.countCols()-1&&this.isHidden(e+1)&&o.push("beforeHiddenColumn"),(0,i.addClass)(t,o)}function N(e){e.items.push({name:c.SEPARATOR},(0,d.default)(this),(0,g.default)(this))}function A(){Array.isArray(w(S,this).columns)&&this.hideColumns(w(S,this).columns)}t.HiddenColumns=_},61275:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(10452);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.HiddenColumns=s.HiddenColumns},29969:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"hidden_rows_hide",name(){const e=this.getSelectedLast();let t=0;if(Array.isArray(e)){const[o,,s]=e;o-s!=0&&(t=1)}return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_HIDE_ROW,t)},callback(){const{from:t,to:o}=this.getSelectedRangeLast(),s=Math.max(Math.min(t.row,o.row),0),n=Math.max(t.row,o.row),i=[];for(let e=s;e<=n;e+=1)i.push(e);e.hideRows(i);const r=i[i.length-1],l=this.rowIndexMapper.getNearestNotHiddenIndex(r,1,!0);Number.isInteger(l)&&l>=0?this.selectRows(l):this.deselectCell(),this.render(),this.view.adjustElementsSize()},disabled:!1,hidden(){return!(this.selection.isSelectedByRowHeader()||this.selection.isSelectedByCorner())}}},o(15724);var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=i?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}},62526:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=[];return{key:"hidden_rows_show",name(){const e=t.length>1?1:0;return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_SHOW_ROW,e)},callback(){var o,s;if(0===t.length)return;let n=t[0],i=t[t.length-1];n=null!==(o=this.rowIndexMapper.getNearestNotHiddenIndex(n-1,-1))&&void 0!==o?o:0,i=null!==(s=this.rowIndexMapper.getNearestNotHiddenIndex(i+1,1))&&void 0!==s?s:this.countRows()-1,e.showRows(t),this.render(),this.view.adjustElementsSize();i-n+1===this.countRows()||this.selectRows(n,i)},disabled:!1,hidden(){const o=(0,s.arrayMap)(e.getHiddenRows(),(e=>this.toPhysicalRow(e)));if(!this.selection.isSelectedByRowHeader()&&!this.selection.isSelectedByCorner()||o.length<1)return!0;t.length=0;const n=this.getSelectedRangeLast(),i=n.getTopStartCorner().row,r=n.getBottomEndCorner().row,l=this.rowIndexMapper,a=l.getRenderableFromVisualIndex(i),h=l.getRenderableFromVisualIndex(r),c=l.getNotTrimmedIndexes(),u=[];if(i!==r){if(r-i+1>h-a+1){const e=c.slice(i,r+1);u.push(...e.filter((e=>o.includes(e))))}}else if(0===a&&a<i)u.push(...c.slice(0,i));else if(null===a)u.push(...c.slice(0,this.countRows()));else{const e=this.countRows()-1;h===l.getRenderableFromVisualIndex(l.getNearestNotHiddenIndex(e,-1))&&e>r&&u.push(...c.slice(r+1))}return(0,s.arrayEach)(u,(e=>{t.push(this.toVisualRow(e))})),0===t.length}}},o(15724);var s=o(9175),n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}},3572:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724),o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var n=o(61205),i=o(9893),r=o(87485),l=o(9175),a=o(13911),h=o(38893),c=o(58653),u=s(o(56937)),d=s(o(29969)),g=s(o(62526)),f=o(93969);function p(e,t,o){m(e,t),t.set(e,o)}function m(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function w(e,t){return e.get(v(e,t))}function C(e,t,o){return e.set(v(e,t),o),o}function v(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}o(87572),u.default.getSingleton().register("beforeHideRows"),u.default.getSingleton().register("afterHideRows"),u.default.getSingleton().register("beforeUnhideRows"),u.default.getSingleton().register("afterUnhideRows");const y=t.PLUGIN_KEY="hiddenRows",E=t.PLUGIN_PRIORITY=320;var S=new WeakMap,R=new WeakMap,b=new WeakSet;class _ extends n.BasePlugin{constructor(){var e,t;super(...arguments),m(e=this,t=b),t.add(e),p(this,S,{}),p(this,R,null)}static get PLUGIN_KEY(){return y}static get PLUGIN_PRIORITY(){return E}isEnabled(){return!!this.hot.getSettings()[y]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[y];(0,a.isObject)(t)&&(C(S,this,t),(0,h.isUndefined)(t.copyPasteEnabled)&&(t.copyPasteEnabled=!0)),C(R,this,new f.HidingMap),w(R,this).addLocalHook("init",(()=>v(b,this,A).call(this))),this.hot.rowIndexMapper.registerMap(this.pluginName,w(R,this)),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(b,e,N).call(e,...o)})),this.addHook("afterGetCellMeta",((e,t,o)=>v(b,this,M).call(this,e,t,o))),this.addHook("modifyRowHeight",((e,t)=>v(b,this,T).call(this,e,t))),this.addHook("afterGetRowHeader",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(b,e,I).call(e,...o)})),this.addHook("modifyCopyableRange",(e=>v(b,this,O).call(this,e))),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap(this.pluginName),C(S,this,{}),super.disablePlugin(),this.resetCellsMeta()}showRows(e){const t=this.getHiddenRows(),o=this.isValidConfig(e);let s=t;const n=w(R,this).getValues().slice(),i=e.length>0;if(o&&i){const t=e.map((e=>this.hot.toPhysicalRow(e)));(0,l.arrayEach)(t,(e=>{n[e]=!1})),s=(0,l.arrayReduce)(n,((e,t,o)=>(t&&e.push(this.hot.toVisualRow(o)),e)),[])}!1!==this.hot.runHooks("beforeUnhideRows",t,s,o&&i)&&(o&&i&&w(R,this).setValues(n),this.hot.runHooks("afterUnhideRows",t,s,o&&i,o&&s.length<t.length))}showRow(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.showRows(t)}hideRows(e){const t=this.getHiddenRows(),o=this.isValidConfig(e);let s=t;o&&(s=Array.from(new Set(t.concat(e))));!1!==this.hot.runHooks("beforeHideRows",t,s,o)&&(o&&this.hot.batchExecution((()=>{(0,l.arrayEach)(e,(e=>{w(R,this).setValueAtIndex(this.hot.toPhysicalRow(e),!0)}))}),!0),this.hot.runHooks("afterHideRows",t,s,o,o&&s.length>t.length))}hideRow(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.hideRows(t)}getHiddenRows(){return(0,l.arrayMap)(w(R,this).getHiddenIndexes(),(e=>this.hot.toVisualRow(e)))}isHidden(e){return w(R,this).getValueAtIndex(this.hot.toPhysicalRow(e))||!1}isValidConfig(e){const t=this.hot.countRows();return!!(Array.isArray(e)&&e.length>0)&&e.every((e=>Number.isInteger(e)&&e>=0&&e<t))}resetCellsMeta(){(0,l.arrayEach)(this.hot.getCellsMeta(),(e=>{e&&(e.skipRowOnPaste=!1)}))}destroy(){C(S,this,null),C(R,this,null),super.destroy()}}function T(e,t){return this.isHidden(t)?0:e}function M(e,t,o){if(!1===w(S,this).copyPasteEnabled&&this.isHidden(e)&&(o.skipRowOnPaste=!0),this.isHidden(e-1))o.className=o.className||"",-1===o.className.indexOf("afterHiddenRow")&&(o.className+=" afterHiddenRow");else if(o.className){const e=o.className.split(" ");if(e.length>0){const t=e.indexOf("afterHiddenRow");t>-1&&e.splice(t,1),o.className=e.join(" ")}}}function O(e){if(w(S,this).copyPasteEnabled)return e;const t=[],o=(e,o,s,n)=>{t.push({startRow:e,endRow:o,startCol:s,endCol:n})};return(0,l.arrayEach)(e,(e=>{let t=!0,s=0;(0,r.rangeEach)(e.startRow,e.endRow,(n=>{this.isHidden(n)?(t||o(s,n-1,e.startCol,e.endCol),t=!0):(t&&(s=n),n===e.endRow&&o(s,n,e.startCol,e.endCol),t=!1)}))})),t}function I(e,t){if(!w(S,this).indicators||e<0)return;const o=[];e>=1&&this.isHidden(e-1)&&o.push("afterHiddenRow"),e<this.hot.countRows()-1&&this.isHidden(e+1)&&o.push("beforeHiddenRow"),(0,i.addClass)(t,o)}function N(e){e.items.push({name:c.SEPARATOR},(0,d.default)(this),(0,g.default)(this))}function A(){Array.isArray(w(S,this).rows)&&this.hideRows(w(S,this).rows)}t.HiddenRows=_},23657:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(3572);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.HiddenRows=s.HiddenRows},90859:(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllPlugins=function(){(0,L.registerPlugin)(s.AutoColumnSize),(0,L.registerPlugin)(n.Autofill),(0,L.registerPlugin)(i.AutoRowSize),(0,L.registerPlugin)(l.BindRowsWithHeaders),(0,L.registerPlugin)(a.CollapsibleColumns),(0,L.registerPlugin)(h.ColumnSorting),(0,L.registerPlugin)(c.ColumnSummary),(0,L.registerPlugin)(u.Comments),(0,L.registerPlugin)(d.ContextMenu),(0,L.registerPlugin)(g.CopyPaste),(0,L.registerPlugin)(f.CustomBorders),(0,L.registerPlugin)(p.DragToScroll),(0,L.registerPlugin)(m.DropdownMenu),(0,L.registerPlugin)(w.ExportFile),(0,L.registerPlugin)(C.Filters),(0,L.registerPlugin)(v.Formulas),(0,L.registerPlugin)(y.HiddenColumns),(0,L.registerPlugin)(E.HiddenRows),(0,L.registerPlugin)(S.ManualColumnFreeze),(0,L.registerPlugin)(R.ManualColumnMove),(0,L.registerPlugin)(b.ManualColumnResize),(0,L.registerPlugin)(_.ManualRowMove),(0,L.registerPlugin)(T.ManualRowResize),(0,L.registerPlugin)(M.MergeCells),(0,L.registerPlugin)(O.MultiColumnSorting),(0,L.registerPlugin)(I.MultipleSelectionHandles),(0,L.registerPlugin)(N.NestedHeaders),(0,L.registerPlugin)(A.NestedRows),(0,L.registerPlugin)(P.PersistentState),(0,L.registerPlugin)(x.Search),(0,L.registerPlugin)(H.TouchScroll),(0,L.registerPlugin)(D.TrimRows),(0,L.registerPlugin)(k.UndoRedo)};var s=o(58764);t.AutoColumnSize=s.AutoColumnSize;var n=o(3018);t.Autofill=n.Autofill;var i=o(45452);t.AutoRowSize=i.AutoRowSize;var r=o(61205);t.BasePlugin=r.BasePlugin;var l=o(92860);t.BindRowsWithHeaders=l.BindRowsWithHeaders;var a=o(67607);t.CollapsibleColumns=a.CollapsibleColumns;var h=o(16050);t.ColumnSorting=h.ColumnSorting;var c=o(93642);t.ColumnSummary=c.ColumnSummary;var u=o(41270);t.Comments=u.Comments;var d=o(10668);t.ContextMenu=d.ContextMenu;var g=o(90112);t.CopyPaste=g.CopyPaste;var f=o(27470);t.CustomBorders=f.CustomBorders;var p=o(66762);t.DragToScroll=p.DragToScroll;var m=o(71110);t.DropdownMenu=m.DropdownMenu;var w=o(35472);t.ExportFile=w.ExportFile;var C=o(85471);t.Filters=C.Filters;var v=o(1687);t.Formulas=v.Formulas;var y=o(61275);t.HiddenColumns=y.HiddenColumns;var E=o(23657);t.HiddenRows=E.HiddenRows;var S=o(52339);t.ManualColumnFreeze=S.ManualColumnFreeze;var R=o(10297);t.ManualColumnMove=R.ManualColumnMove;var b=o(39996);t.ManualColumnResize=b.ManualColumnResize;var _=o(33283);t.ManualRowMove=_.ManualRowMove;var T=o(83610);t.ManualRowResize=T.ManualRowResize;var M=o(12897);t.MergeCells=M.MergeCells;var O=o(80657);t.MultiColumnSorting=O.MultiColumnSorting;var I=o(37917);t.MultipleSelectionHandles=I.MultipleSelectionHandles;var N=o(53495);t.NestedHeaders=N.NestedHeaders;var A=o(15434);t.NestedRows=A.NestedRows;var P=o(46634);t.PersistentState=P.PersistentState;var x=o(33004);t.Search=x.Search;var H=o(70618);t.TouchScroll=H.TouchScroll;var D=o(97089);t.TrimRows=D.TrimRows;var k=o(69922);t.UndoRedo=k.UndoRedo;var L=o(90532);t.registerPlugin=L.registerPlugin,t.getPlugin=L.getPlugin,t.getPluginsNames=L.getPluginsNames},74102:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"freeze_column",name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_FREEZE_COLUMN)},callback(t,o){const[{start:{col:s}}]=o;e.freezeColumn(s),this.render(),this.view.adjustElementsSize()},hidden(){const e=this.getSelectedRange();let t=!1;return(void 0===e||e.length>1||e[0].from.col!==e[0].to.col||e[0].from.col<=this.getSettings().fixedColumnsStart-1)&&(t=!0),t}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=i?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}},62157:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"unfreeze_column",name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN)},callback(t,o){const[{start:{col:s}}]=o;e.unfreezeColumn(s),this.render(),this.view.adjustElementsSize()},hidden(){const e=this.getSelectedRange();let t=!1;return(void 0===e||e.length>1||e[0].from.col!==e[0].to.col||e[0].from.col>=this.getSettings().fixedColumnsStart)&&(t=!0),t}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=i?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(50884));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}},52339:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(45636);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualColumnFreeze=s.ManualColumnFreeze},45636:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=o(61205),i=s(o(56937)),r=s(o(74102)),l=s(o(62157));function a(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function h(e,t){return e.get(u(e,t))}function c(e,t,o){return e.set(u(e,t),o),o}function u(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}o(54228),i.default.getSingleton().register("beforeColumnFreeze"),i.default.getSingleton().register("afterColumnFreeze"),i.default.getSingleton().register("beforeColumnUnfreeze"),i.default.getSingleton().register("afterColumnUnfreeze");const d=t.PLUGIN_KEY="manualColumnFreeze",g=t.PLUGIN_PRIORITY=110;var f=new WeakMap,p=new WeakSet;class m extends n.BasePlugin{constructor(){var e,t;super(...arguments),a(e=this,t=p),t.add(e),function(e,t,o){a(e,t),t.set(e,o)}(this,f,!1)}static get PLUGIN_KEY(){return d}static get PLUGIN_PRIORITY(){return g}isEnabled(){return!!this.hot.getSettings()[d]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",(e=>u(p,this,w).call(this,e))),this.addHook("beforeColumnMove",((e,t)=>u(p,this,C).call(this,e,t))),super.enablePlugin())}disablePlugin(){c(f,this,!1),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}freezeColumn(e){const t=this.hot.getSettings(),o=t.fixedColumnsStart<this.hot.countCols()&&e>t.fixedColumnsStart-1;h(f,this)||c(f,this,!0);!1!==this.hot.runHooks("beforeColumnFreeze",e,o)&&(o&&(this.hot.columnIndexMapper.moveIndexes(e,t.fixedColumnsStart),t._fixedColumnsStart+=1),this.hot.runHooks("afterColumnFreeze",e,o))}unfreezeColumn(e){const t=this.hot.getSettings(),o=t.fixedColumnsStart>0&&e<=t.fixedColumnsStart-1;h(f,this)||c(f,this,!0);!1!==this.hot.runHooks("beforeColumnUnfreeze",e,o)&&(o&&(t._fixedColumnsStart-=1,this.hot.columnIndexMapper.moveIndexes(e,t.fixedColumnsStart)),this.hot.runHooks("afterColumnUnfreeze",e,o))}}function w(e){e.items.push({name:"---------"},(0,r.default)(this),(0,l.default)(this))}function C(e,t){if(h(f,this)){const o=this.hot.getSettings().fixedColumnsStart;if(t<o)return!1;if(e.some((e=>e<o)))return!1}}t.ManualColumnFreeze=m},10297:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(40408);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualColumnMove=s.ManualColumnMove},40408:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=o(61205),i=s(o(56937)),r=o(9175),l=o(9893),a=o(79729),h=o(87485),c=s(o(8965)),u=s(o(39822));function d(e,t,o){g(e,t),t.set(e,o)}function g(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function f(e,t,o){return e.set(m(e,t),o),o}function p(e,t){return e.get(m(e,t))}function m(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}o(54008),i.default.getSingleton().register("beforeColumnMove"),i.default.getSingleton().register("afterColumnMove");const w=t.PLUGIN_KEY="manualColumnMove",C=t.PLUGIN_PRIORITY=120,v="ht__manualColumnMove",y="show-ui",E="on-moving--columns",S="after-selection--columns";var R=new WeakMap,b=new WeakMap,_=new WeakMap,T=new WeakMap,M=new WeakMap,O=new WeakMap,I=new WeakMap,N=new WeakMap,A=new WeakMap,P=new WeakMap,x=new WeakMap,H=new WeakSet;class D extends n.BasePlugin{constructor(){var e,t;super(...arguments),g(e=this,t=H),t.add(e),d(this,R,new c.default(this.hot)),d(this,b,new u.default(this.hot)),d(this,_,[]),d(this,T,0),d(this,M,!1),d(this,O,{}),d(this,I,void 0),d(this,N,void 0),d(this,A,void 0),d(this,P,void 0),d(this,x,void 0)}static get PLUGIN_KEY(){return w}static get PLUGIN_PRIORITY(){return C}isEnabled(){return!!this.hot.getSettings()[w]}enablePlugin(){var e=this;this.enabled||(this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return m(H,e,k).call(e,...o)})),this.addHook("beforeOnCellMouseOver",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return m(H,e,V).call(e,...o)})),this.addHook("afterScrollVertically",(()=>m(H,this,W).call(this))),this.addHook("afterLoadData",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return m(H,e,B).call(e,...o)})),this.buildPluginUI(),this.registerEvents(),(0,l.addClass)(this.hot.rootElement,v),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){(0,l.removeClass)(this.hot.rootElement,v),this.unregisterEvents(),p(R,this).destroy(),p(b,this).destroy(),super.disablePlugin()}moveColumn(e,t){return this.moveColumns([e],t)}moveColumns(e,t){const o=p(I,this),s=this.isMovePossible(e,t),n=this.hot.runHooks("beforeColumnMove",e,t,o,s);if(f(I,this,void 0),!1===n)return;s&&this.hot.columnIndexMapper.moveIndexes(e,t);const i=s&&this.isColumnOrderChanged(e,t);return this.hot.runHooks("afterColumnMove",e,t,o,s,i),i}dragColumn(e,t){return this.dragColumns([e],t)}dragColumns(e,t){const o=this.countFinalIndex(e,t);return f(I,this,t),this.moveColumns(e,o)}isMovePossible(e,t){const o=this.hot.columnIndexMapper.getNotTrimmedIndexesLength(),s=e.length+t>o,n=t<0,i=e.some((e=>e<0)),r=e.some((e=>e>=o));return!(s||n||i||r)}isColumnOrderChanged(e,t){return e.some(((e,o)=>e-o!==t))}countFinalIndex(e,t){const o=(0,r.arrayReduce)(e,((e,o)=>(o<t&&(e+=1),e)),0);return t-o}getColumnsWidth(e,t){const o=this.hot.columnIndexMapper;let s=0;for(let n=e;n<=t;n+=1){const e=o.getRenderableFromVisualIndex(n);n<0?s+=this.hot.view._wt.wtViewport.getRowHeaderWidth()||0:null!==e&&(s+=this.hot.view._wt.wtTable.getStretchedColumnWidth(e)||0)}return s}moveBySettingsOrLoad(){const e=this.hot.getSettings()[w];if(Array.isArray(e))this.moveColumns(e,0);else if(void 0!==e){const e=this.persistentStateLoad();e.length&&this.moveColumns(e,0)}}isFixedColumnsStart(e){return e<this.hot.getSettings().fixedColumnsStart}persistentStateSave(){this.hot.runHooks("persistentStateSave","manualColumnMove",this.hot.columnIndexMapper.getIndexesSequence())}persistentStateLoad(){const e={};return this.hot.runHooks("persistentStateLoad","manualColumnMove",e),e.value?e.value:[]}prepareColumnsToMoving(e,t){const o=[];return(0,h.rangeEach)(e,t,(e=>{o.push(e)})),o}refreshPositions(){const e=this.hot.view.getFirstFullyVisibleColumn();this.isFixedColumnsStart(p(N,this))&&e>0&&this.hot.scrollViewportTo({col:this.hot.columnIndexMapper.getNearestNotHiddenIndex(e-1,-1)});const t=this.hot.view._wt.wtTable,o=this.hot.view._wt.wtOverlays.scrollableElement,s="number"==typeof o.scrollX?o.scrollX:o.scrollLeft;let n=this.hot.view.THEAD.offsetLeft+this.getColumnsWidth(0,p(N,this)-1);const i=t.hider.offsetWidth,r=t.TBODY.offsetLeft,a=p(R,this).getOffset().start,h=p(R,this).getSize().width;let c=0,u=0;if(this.hot.isRtl()){const e=this.hot.rootWindow,t=(0,l.outerWidth)(this.hot.rootElement),n=e.innerWidth-p(A,this)-t;u=e.innerWidth-p(O,this).eventPageX-n-(void 0===o.scrollX?s:0)}else u=p(O,this).eventPageX-(p(A,this)-(void 0===o.scrollX?s:0));if(p(P,this)&&(c=this.hot.view._wt.wtOverlays.inlineStartOverlay.clone.wtTable.getColumnHeader(-1).offsetWidth),this.isFixedColumnsStart(p(N,this))&&(n+=s),n+=c,p(N,this)<0)p(x,this)>0?p(O,this).col=0:p(O,this).col=e>0?e-1:e;else if(p(O,this).TD.offsetWidth/2+n<=u){const e=p(N,this)>=p(T,this)?p(T,this)-1:p(N,this);p(O,this).col=e+1,n+=p(O,this).TD.offsetWidth}else p(O,this).col=p(N,this);let d=u,g=n;u+h+a>=i?d=i-h-a:u+a<r+c&&(d=r+c+Math.abs(a)),n>=i-1?g=i-1:0===g?g=1:void 0!==o.scrollX&&p(N,this)<p(x,this)&&(g-=p(A,this)<=o.scrollX?p(A,this):0),p(R,this).setPosition(null,d),p(b,this).setPosition(null,g)}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mousemove",(e=>m(H,this,L).call(this,e))),this.eventManager.addEventListener(e,"mouseup",(()=>m(H,this,F).call(this)))}unregisterEvents(){this.eventManager.clear()}buildPluginUI(){p(R,this).build(),p(b,this).build()}destroy(){p(R,this).destroy(),p(b,this).destroy(),super.destroy()}}function k(e,t,o,s){const n=this.hot.view._wt.wtTable,i=this.hot.selection.isSelectedByColumnHeader(),r=this.hot.getSelectedRangeLast(),h=(0,l.hasClass)(e.target,"sortAction");if(!r||!i||p(M,this)||0!==e.button||h)return f(M,this,!1),p(_,this).length=0,void(0,l.removeClass)(this.hot.rootElement,[E,y]);const c=p(b,this).isBuilt()&&!p(b,this).isAppended(),u=p(R,this).isBuilt()&&!p(R,this).isAppended();c&&u&&(p(b,this).appendTo(n.hider),p(R,this).appendTo(n.hider));const{from:d,to:g}=r,m=Math.min(d.col,g.col),w=Math.max(d.col,g.col);if(t.row<0&&t.col>=m&&t.col<=w){s.column=!0,f(M,this,!0);const i=o.firstChild?(0,a.offsetRelativeTo)(e,o.firstChild).x:e.offsetX;p(O,this).eventPageX=e.pageX,f(N,this,t.col),p(O,this).TD=o,p(O,this).col=t.col,f(_,this,this.prepareColumnsToMoving(m,w)),f(P,this,!!this.hot.getSettings().rowHeaders),f(T,this,this.hot.countCols()),f(x,this,this.hot.getSettings().fixedColumnsStart),f(A,this,(0,l.offset)(this.hot.rootElement).left);const r=p(P,this)?-1:0,h=n.holder.scrollTop+n.getColumnHeaderHeight(0)+1,c=t.col<p(x,this),u=this.hot.view._wt.wtOverlays.inlineStartOverlay.getOverlayOffset(),d=Math.abs(i-(this.hot.isRtl()?o.offsetWidth:0)),g=this.getColumnsWidth(m,t.col-1)+d,C=this.getColumnsWidth(r,m-1)+(c?u:0)+g;p(R,this).setPosition(h,C),p(R,this).setSize(this.getColumnsWidth(m,w),n.hider.offsetHeight-h),p(R,this).setOffset(null,-g),(0,l.addClass)(this.hot.rootElement,E)}else(0,l.removeClass)(this.hot.rootElement,S),f(M,this,!1),p(_,this).length=0}function L(e){p(M,this)&&(p(O,this).eventPageX=e.pageX,this.refreshPositions())}function V(e,t,o,s){this.hot.getSelectedRangeLast()&&p(M,this)&&(p(_,this).indexOf(t.col)>-1?(0,l.removeClass)(this.hot.rootElement,y):(0,l.addClass)(this.hot.rootElement,y),s.row=!0,s.column=!0,s.cell=!0,f(N,this,t.col),p(O,this).TD=o)}function F(){const e=p(O,this).col,t=p(_,this).length;if(f(N,this,void 0),f(M,this,!1),(0,l.removeClass)(this.hot.rootElement,[E,y,S]),this.hot.selection.isSelectedByColumnHeader()&&(0,l.addClass)(this.hot.rootElement,S),t<1||void 0===e)return;const o=p(_,this)[0],s=this.hot.toPhysicalColumn(o),n=this.dragColumns(p(_,this),e);if(p(_,this).length=0,!0===n){this.persistentStateSave(),this.hot.render(),this.hot.view.adjustElementsSize();const e=this.hot.toVisualColumn(s),o=e+t-1;this.hot.selectColumns(e,o)}}function W(){const e=this.hot.view._wt.wtTable,t=e.getColumnHeaderHeight(0)+1+e.holder.scrollTop;p(R,this).setPosition(t),p(R,this).setSize(null,e.hider.offsetHeight-t)}function B(){this.moveBySettingsOrLoad()}t.ManualColumnMove=D},2444:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707)),i=o(87485),r=o(59777);const l="px";t.default=class{constructor(e){(0,n.default)(this,"hot",void 0),(0,n.default)(this,"_element",null),(0,n.default)(this,"state",0),(0,n.default)(this,"inlineProperty",void 0),this.hot=e,this.inlineProperty=e.isRtl()?"right":"left"}appendTo(e){e.appendChild(this._element),this.state=2}build(){0===this.state&&(this._element=this.hot.rootDocument.createElement("div"),this.state=1)}destroy(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=0}isAppended(){return 2===this.state}isBuilt(){return this.state>=1}setPosition(e,t){(0,i.isNumeric)(e)&&(this._element.style.top=e+l),(0,i.isNumeric)(t)&&(this._element.style[this.inlineProperty]=t+l)}getPosition(){const e=this._element.style;return{top:e.top?parseInt(e.top,10):0,start:e[this.inlineProperty]?parseInt(e[this.inlineProperty],10):0}}setSize(e,t){(0,i.isNumeric)(e)&&(this._element.style.width=e+l),(0,i.isNumeric)(t)&&(this._element.style.height=t+l)}getSize(){return{width:this._element.style.width?parseInt(this._element.style.width,10):0,height:this._element.style.height?parseInt(this._element.style.height,10):0}}setOffset(e,t){(0,i.isNumeric)(e)&&(this._element.style.marginTop=e+l),(0,i.isNumeric)(t)&&(this._element.style[`margin${(0,r.toUpperCaseFirst)(this.inlineProperty)}`]=t+l)}getOffset(){const e=this._element.style,t=`margin${(0,r.toUpperCaseFirst)(this.inlineProperty)}`;return{top:e.marginTop?parseInt(e.marginTop,10):0,start:e[t]?parseInt(e[t],10):0}}}},8965:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(2444)),i=o(9893);class r extends n.default{build(){super.build(),(0,i.addClass)(this._element,"ht__manualColumnMove--backlight")}}t.default=r},39822:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(2444)),i=o(9893);class r extends n.default{build(){super.build(),(0,i.addClass)(this._element,"ht__manualColumnMove--guideline")}}t.default=r},39996:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(23298);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualColumnResize=s.ManualColumnResize},23298:(e,t,o)=>{"use strict";t.__esModule=!0,o(67834),o(15724);var s=o(61205),n=o(9893),i=o(9175),r=o(87485),l=o(93969);function a(e,t,o){h(e,t),t.set(e,o)}function h(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function c(e,t,o){return e.set(d(e,t),o),o}function u(e,t){return e.get(d(e,t))}function d(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}const g=t.PLUGIN_KEY="manualColumnResize",f=t.PLUGIN_PRIORITY=130,p="manualColumnWidths";var m=new WeakMap,w=new WeakMap,C=new WeakMap,v=new WeakMap,y=new WeakMap,E=new WeakMap,S=new WeakMap,R=new WeakMap,b=new WeakMap,_=new WeakMap,T=new WeakMap,M=new WeakMap,O=new WeakMap,I=new WeakMap,N=new WeakMap,A=new WeakMap,P=new WeakSet;class x extends s.BasePlugin{static get PLUGIN_KEY(){return g}static get PLUGIN_PRIORITY(){return f}constructor(e){var t,o;super(e),h(t=this,o=P),o.add(t),a(this,m,null),a(this,w,null),a(this,C,[]),a(this,v,null),a(this,y,null),a(this,E,null),a(this,S,null),a(this,R,null),a(this,b,this.hot.rootDocument.createElement("DIV")),a(this,_,this.hot.rootDocument.createElement("DIV")),a(this,T,null),a(this,M,!1),a(this,O,0),a(this,I,null),a(this,N,void 0),a(this,A,void 0),(0,n.addClass)(u(b,this),"manualColumnResizer"),(0,n.addClass)(u(_,this),"manualColumnResizerGuide")}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[g]}enablePlugin(){this.enabled||(c(N,this,new l.PhysicalIndexToValueMap),u(N,this).addLocalHook("init",(()=>d(P,this,H).call(this))),this.hot.columnIndexMapper.registerMap(this.pluginName,u(N,this)),this.addHook("modifyColWidth",((e,t)=>d(P,this,W).call(this,e,t)),1),this.addHook("beforeStretchingColumnWidth",((e,t)=>d(P,this,B).call(this,e,t))),this.addHook("beforeColumnResize",((e,t,o)=>d(P,this,U).call(this,e,t,o))),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){c(A,this,u(N,this).getValues()),this.hot.columnIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}saveManualColumnWidths(){this.hot.runHooks("persistentStateSave",p,u(N,this).getValues())}loadManualColumnWidths(){const e={};return this.hot.runHooks("persistentStateLoad",p,e),e.value}setManualSize(e,t){const o=Math.max(t,20),s=this.hot.toPhysicalColumn(e);return u(N,this).setValueAtIndex(s,o),o}clearManualSize(e){const t=this.hot.toPhysicalColumn(e);u(N,this).setValueAtIndex(t,null)}setupHandlePosition(e){if(!e.parentNode)return;c(m,this,e);const{_wt:t}=this.hot.view,o=t.wtTable.getCoords(u(m,this)),s=o.col;if(s<0)return;const l=(0,n.outerHeight)(u(m,this)),a=u(m,this).getBoundingClientRect();let h;s<t.getSetting("fixedColumnsStart")&&(h=t.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(u(m,this),o.row,o.col)),h||(h=t.wtOverlays.topOverlay.getRelativeCellPosition(u(m,this),o.row,o.col)),c(w,this,this.hot.columnIndexMapper.getVisualFromRenderableIndex(s)),c(C,this,[]);const d=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByColumnHeader();if(this.hot.selection.isSelected()&&d){const e=this.hot.getSelectedRange();(0,i.arrayEach)(e,(e=>{const t=e.getTopStartCorner().col,o=e.getBottomEndCorner().col;(0,r.rangeEach)(t,o,(e=>{u(C,this).includes(e)||u(C,this).push(e)}))}))}u(C,this).includes(u(w,this))||c(C,this,[u(w,this)]),c(R,this,h.start-6),c(S,this,parseInt(a.width,10)),u(b,this).style.top=`${h.top}px`,u(b,this).style[this.inlineDir]=`${u(R,this)+u(S,this)}px`,u(b,this).style.height=`${l}px`,this.hot.rootElement.appendChild(u(b,this))}refreshHandlePosition(){u(b,this).style[this.inlineDir]=`${u(R,this)+u(v,this)}px`}setupGuidePosition(){const e=parseInt((0,n.outerHeight)(u(b,this)),10),t=parseInt(u(b,this).style.top,10)+e,o=parseInt(this.hot.view.maximumVisibleElementHeight(0),10);(0,n.addClass)(u(b,this),"active"),(0,n.addClass)(u(_,this),"active"),u(_,this).style.top=`${t}px`,this.refreshGuidePosition(),u(_,this).style.height=o-e+"px",this.hot.rootElement.appendChild(u(_,this))}refreshGuidePosition(){u(_,this).style[this.inlineDir]=u(b,this).style[this.inlineDir]}hideHandleAndGuide(){(0,n.removeClass)(u(b,this),"active"),(0,n.removeClass)(u(_,this),"active")}checkIfColumnHeader(e){const t=(0,n.closest)(e,["THEAD"],this.hot.rootElement),{topOverlay:o,topInlineStartCornerOverlay:s}=this.hot.view._wt.wtOverlays;return[o.clone.wtTable.THEAD,s.clone.wtTable.THEAD].includes(t)}getClosestTHParent(e){return"TABLE"!==e.tagName?"TH"===e.tagName?e:this.getClosestTHParent(e.parentNode):null}afterMouseDownTimeout(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize()},t=(t,o)=>{const s=this.hot.runHooks("beforeColumnResize",u(y,this),t,!0);void 0!==s&&c(y,this,s),"all"===this.hot.getSettings().stretchH?this.clearManualSize(t):this.setManualSize(t,u(y,this)),this.saveManualColumnWidths(),this.hot.runHooks("afterColumnResize",u(y,this),t,!0),o&&e()};if(u(O,this)>=2){u(C,this).length>1?((0,i.arrayEach)(u(C,this),(e=>{t(e)})),e()):(0,i.arrayEach)(u(C,this),(e=>{t(e,!0)}))}c(O,this,0),c(I,this,null)}bindEvents(){const{rootWindow:e,rootElement:t}=this.hot;this.eventManager.addEventListener(t,"mouseover",(e=>d(P,this,D).call(this,e))),this.eventManager.addEventListener(t,"mousedown",(e=>d(P,this,k).call(this,e))),this.eventManager.addEventListener(e,"mousemove",(e=>d(P,this,L).call(this,e))),this.eventManager.addEventListener(e,"mouseup",(()=>d(P,this,V).call(this))),this.eventManager.addEventListener(u(b,this),"contextmenu",(()=>d(P,this,F).call(this)))}destroy(){super.destroy()}}function H(){const e=this.hot.getSettings()[g],t=this.loadManualColumnWidths();void 0!==t?this.hot.batchExecution((()=>{t.forEach(((e,t)=>{u(N,this).setValueAtIndex(t,e)}))}),!0):Array.isArray(e)?(this.hot.batchExecution((()=>{e.forEach(((e,t)=>{u(N,this).setValueAtIndex(t,e)}))}),!0),c(A,this,e)):!0===e&&Array.isArray(u(A,this))&&this.hot.batchExecution((()=>{u(A,this).forEach(((e,t)=>{u(N,this).setValueAtIndex(t,e)}))}),!0)}function D(e){if(!(0,n.isDetached)(e.target)&&!0!==u(M,this)&&this.checkIfColumnHeader(e.target)){const t=this.getClosestTHParent(e.target);if(!t)return;const o=t.getAttribute("colspan");!t||null!==o&&"1"!==o||u(T,this)||this.setupHandlePosition(t)}}function k(e){e.target.parentNode===this.hot.rootElement&&(0,n.hasClass)(e.target,"manualColumnResizer")&&(this.setupHandlePosition(u(m,this)),this.setupGuidePosition(),c(T,this,!0),null===u(I,this)&&(c(I,this,setTimeout((()=>this.afterMouseDownTimeout()),500)),this.hot._registerTimeout(u(I,this))),c(O,this,u(O,this)+1),this.startX=e.pageX,c(y,this,u(S,this)))}function L(e){if(u(T,this)){const t=(e.pageX-this.startX)*this.hot.getDirectionFactor();c(v,this,u(S,this)+t),(0,i.arrayEach)(u(C,this),(e=>{c(y,this,this.setManualSize(e,u(v,this)))})),this.refreshHandlePosition(),this.refreshGuidePosition()}}function V(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize()},t=(t,o)=>{this.hot.runHooks("beforeColumnResize",u(y,this),t,!1),o&&e(),this.saveManualColumnWidths(),this.hot.runHooks("afterColumnResize",u(y,this),t,!1)};if(u(T,this)){if(this.hideHandleAndGuide(),c(T,this,!1),u(y,this)!==u(S,this)){u(C,this).length>1?((0,i.arrayEach)(u(C,this),(e=>{t(e)})),e()):(0,i.arrayEach)(u(C,this),(e=>{t(e,!0)}))}this.setupHandlePosition(u(m,this))}}function F(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild(u(b,this)),this.hot.rootElement.removeChild(u(_,this)),c(T,this,!1),c(M,this,!0),this.hot._registerImmediate((()=>{c(M,this,!1)}))}function W(e,t){let o=e;if(this.enabled){const e=this.hot.toPhysicalColumn(t),s=u(N,this).getValueAtIndex(e);this.hot.getSettings()[g]&&s&&(o=s)}return o}function B(e,t){let o=u(N,this).getValueAtIndex(t);return null===o&&(o=e),o}function U(){this.hot.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked()}t.ManualColumnResize=x},33283:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(65460);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualRowMove=s.ManualRowMove},65460:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=o(61205),i=s(o(56937)),r=o(9175),l=o(9893),a=o(87485),h=s(o(1651)),c=s(o(99068));function u(e,t,o){d(e,t),t.set(e,o)}function d(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function g(e,t,o){return e.set(p(e,t),o),o}function f(e,t){return e.get(p(e,t))}function p(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}o(19540),i.default.getSingleton().register("beforeRowMove"),i.default.getSingleton().register("afterRowMove");const m=t.PLUGIN_KEY="manualRowMove",w=t.PLUGIN_PRIORITY=140,C="ht__manualRowMove",v="show-ui",y="on-moving--rows",E="after-selection--rows";var S=new WeakMap,R=new WeakMap,b=new WeakMap,_=new WeakMap,T=new WeakMap,M=new WeakMap,O=new WeakSet;class I extends n.BasePlugin{constructor(){var e,t;super(...arguments),d(e=this,t=O),t.add(e),u(this,S,new h.default(this.hot)),u(this,R,new c.default(this.hot)),u(this,b,[]),u(this,_,void 0),u(this,T,{}),u(this,M,void 0)}static get PLUGIN_KEY(){return m}static get PLUGIN_PRIORITY(){return w}isEnabled(){return!!this.hot.getSettings()[m]}enablePlugin(){var e=this;this.enabled||(this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return p(O,e,N).call(e,...o)})),this.addHook("beforeOnCellMouseOver",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return p(O,e,P).call(e,...o)})),this.addHook("afterScrollHorizontally",(()=>p(O,this,H).call(this))),this.addHook("afterLoadData",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return p(O,e,D).call(e,...o)})),this.buildPluginUI(),this.registerEvents(),(0,l.addClass)(this.hot.rootElement,C),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){(0,l.removeClass)(this.hot.rootElement,C),this.unregisterEvents(),f(S,this).destroy(),f(R,this).destroy(),super.disablePlugin()}moveRow(e,t){return this.moveRows([e],t)}moveRows(e,t){const o=f(M,this),s=this.isMovePossible(e,t),n=this.hot.runHooks("beforeRowMove",e,t,o,s);if(g(M,this,void 0),!1===n)return;s&&this.hot.rowIndexMapper.moveIndexes(e,t);const i=s&&this.isRowOrderChanged(e,t);return this.hot.runHooks("afterRowMove",e,t,o,s,i),i}dragRow(e,t){return this.dragRows([e],t)}dragRows(e,t){const o=this.countFinalIndex(e,t);return g(M,this,t),this.moveRows(e,o)}isMovePossible(e,t){const o=this.hot.rowIndexMapper.getNotTrimmedIndexesLength(),s=e.length+t>o,n=t<0,i=e.some((e=>e<0)),r=e.some((e=>e>=o));return!(s||n||i||r)}isRowOrderChanged(e,t){return e.some(((e,o)=>e-o!==t))}countFinalIndex(e,t){const o=(0,r.arrayReduce)(e,((e,o)=>(o<t&&(e+=1),e)),0);return t-o}getRowsHeight(e,t){const o=this.hot.rowIndexMapper;let s=0;for(let n=e;n<=t;n++){const e=o.getRenderableFromVisualIndex(n);null!==e&&(s+=this.hot.view._wt.wtTable.getRowHeight(e)||23)}return s}moveBySettingsOrLoad(){const e=this.hot.getSettings()[m];if(Array.isArray(e))this.moveRows(e,0);else if(void 0!==e){const e=this.persistentStateLoad();e.length&&this.moveRows(e,0)}}isFixedRowTop(e){return e<this.hot.getSettings().fixedRowsTop}isFixedRowBottom(e){return e>this.hot.countRows()-1-this.hot.getSettings().fixedRowsBottom}persistentStateSave(){this.hot.runHooks("persistentStateSave","manualRowMove",this.hot.rowIndexMapper.getIndexesSequence())}persistentStateLoad(){const e={};return this.hot.runHooks("persistentStateLoad","manualRowMove",e),e.value?e.value:[]}prepareRowsToMoving(){const e=this.hot.getSelectedRangeLast(),t=[];if(!e)return t;const{from:o,to:s}=e,n=Math.min(o.row,s.row),i=Math.max(o.row,s.row);return(0,a.rangeEach)(n,i,(e=>{t.push(e)})),t}refreshPositions(){const e=f(T,this).coords,t=this.hot.view.getFirstFullyVisibleRow(),o=this.hot.view.getLastFullyVisibleRow(),s=this.hot.countRows();this.isFixedRowTop(e.row)&&t>0&&this.hot.scrollViewportTo(this.hot.rowIndexMapper.getNearestNotHiddenIndex(t-1,-1)),this.isFixedRowBottom(e.row)&&o<s&&this.hot.scrollViewportTo(this.hot.rowIndexMapper.getNearestNotHiddenIndex(o+1,1),void 0,!0);const n=this.hot.view._wt.wtTable,i=f(T,this).TD,r=this.hot.rootElement,a=(0,l.offset)(r),h=(0,l.getTrimmingContainer)(r),c=n.holder.scrollTop,u=this.hot.rootWindow!==h?h.scrollTop:0,d=a.top-u,g=f(T,this).eventPageY-d+c,p=n.hider.offsetHeight,m=n.TBODY.offsetTop,w=f(S,this).getOffset().top,C=f(S,this).getSize().height,v=i.offsetHeight/2,y=i.offsetHeight;let E=this.hot.view.THEAD.offsetHeight+this.getRowsHeight(0,e.row-1);const b=g>=E+v;this.isFixedRowTop(e.row)&&(E+=this.hot.view._wt.wtOverlays.topOverlay.getOverlayOffset()),e.row<0?f(T,this).row=t>0?t-1:t:b?(f(T,this).row=e.row+1,E+=0===e.row?y-1:y):f(T,this).row=e.row;let _=g,M=E;g+C+w>=p?_=p-C-w:g+w<m&&(_=m+Math.abs(w)),E>=p-1&&(M=p-1),f(S,this).setPosition(_),f(R,this).setPosition(M)}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mousemove",(e=>p(O,this,A).call(this,e))),this.eventManager.addEventListener(e,"mouseup",(()=>p(O,this,x).call(this)))}unregisterEvents(){this.eventManager.clear()}buildPluginUI(){f(S,this).build(),f(R,this).build()}destroy(){f(S,this).destroy(),f(R,this).destroy(),super.destroy()}}function N(e,t,o,s){const{wtTable:n,wtViewport:i}=this.hot.view._wt,r=this.hot.selection.isSelectedByRowHeader(),a=this.hot.getSelectedRangeLast();if(!a||!r||f(_,this)||0!==e.button)return g(_,this,!1),f(b,this).length=0,void(0,l.removeClass)(this.hot.rootElement,[y,v]);const h=f(R,this).isBuilt()&&!f(R,this).isAppended(),c=f(S,this).isBuilt()&&!f(S,this).isAppended();h&&c&&(f(R,this).appendTo(n.hider),f(S,this).appendTo(n.hider));const{from:u,to:d}=a,p=Math.min(u.row,d.row),m=Math.max(u.row,d.row);if(t.col<0&&t.row>=p&&t.row<=m){s.row=!0,g(_,this,!0),f(T,this).eventPageY=e.pageY,f(T,this).coords=t,f(T,this).TD=o,g(b,this,this.prepareRowsToMoving());const r=n.holder.scrollLeft+i.getRowHeaderWidth(),a=this.getRowsHeight(p,t.row-1)+e.offsetY;f(S,this).setPosition(null,r),f(S,this).setSize(n.hider.offsetWidth-r,this.getRowsHeight(p,m)),f(S,this).setOffset(-a,null),(0,l.addClass)(this.hot.rootElement,y),this.refreshPositions()}else(0,l.removeClass)(this.hot.rootElement,E),g(_,this,!1),f(b,this).length=0}function A(e){f(_,this)&&(f(T,this).eventPageY=e.pageY,this.refreshPositions())}function P(e,t,o,s){this.hot.getSelectedRangeLast()&&f(_,this)&&(f(b,this).indexOf(t.row)>-1?(0,l.removeClass)(this.hot.rootElement,v):(0,l.addClass)(this.hot.rootElement,v),s.row=!0,s.column=!0,s.cell=!0,f(T,this).coords=t,f(T,this).TD=o)}function x(){const e=f(T,this).row,t=f(b,this).length;if(g(_,this,!1),(0,l.removeClass)(this.hot.rootElement,[y,v,E]),this.hot.selection.isSelectedByRowHeader()&&(0,l.addClass)(this.hot.rootElement,E),t<1||void 0===e)return;const o=f(b,this)[0],s=this.hot.toPhysicalRow(o),n=this.dragRows(f(b,this),e);if(f(b,this).length=0,!0===n){this.persistentStateSave(),this.hot.render(),this.hot.view.adjustElementsSize();const e=this.hot.toVisualRow(s),o=e+t-1;this.hot.selectRows(e,o)}}function H(){const e=this.hot.view._wt.wtTable,t=this.hot.view._wt.wtViewport.getRowHeaderWidth()+e.holder.scrollLeft;f(S,this).setPosition(null,t),f(S,this).setSize(e.hider.offsetWidth-t)}function D(){this.moveBySettingsOrLoad()}t.ManualRowMove=I},62814:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707));const i="px";t.default=class{constructor(e){(0,n.default)(this,"hot",void 0),(0,n.default)(this,"_element",null),(0,n.default)(this,"state",0),this.hot=e}appendTo(e){e.appendChild(this._element),this.state=2}build(){0===this.state&&(this._element=this.hot.rootDocument.createElement("div"),this.state=1)}destroy(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=0}isAppended(){return 2===this.state}isBuilt(){return this.state>=1}setPosition(e,t){void 0!==e&&(this._element.style.top=e+i),void 0!==t&&(this._element.style.left=t+i)}getPosition(){return{top:this._element.style.top?parseInt(this._element.style.top,10):0,left:this._element.style.left?parseInt(this._element.style.left,10):0}}setSize(e,t){e&&(this._element.style.width=e+i),t&&(this._element.style.height=t+i)}getSize(){return{width:this._element.style.width?parseInt(this._element.style.width,10):0,height:this._element.style.height?parseInt(this._element.style.height,10):0}}setOffset(e,t){e&&(this._element.style.marginTop=e+i),t&&(this._element.style.marginLeft=t+i)}getOffset(){return{top:this._element.style.marginTop?parseInt(this._element.style.marginTop,10):0,left:this._element.style.marginLeft?parseInt(this._element.style.marginLeft,10):0}}}},1651:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(62814)),i=o(9893);class r extends n.default{build(){super.build(),(0,i.addClass)(this._element,"ht__manualRowMove--backlight")}}t.default=r},99068:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(62814)),i=o(9893);class r extends n.default{build(){super.build(),(0,i.addClass)(this._element,"ht__manualRowMove--guideline")}}t.default=r},83610:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(93992);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualRowResize=s.ManualRowResize},93992:(e,t,o)=>{"use strict";t.__esModule=!0,o(67834),o(15724);var s=o(61205),n=o(9893),i=o(9175),r=o(87485),l=o(93969),a=o(90);function h(e,t,o){c(e,t),t.set(e,o)}function c(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function u(e,t,o){return e.set(g(e,t),o),o}function d(e,t){return e.get(g(e,t))}function g(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}const f=t.PLUGIN_KEY="manualRowResize",p=t.PLUGIN_PRIORITY=30,m="manualRowHeights";var w=new WeakMap,C=new WeakMap,v=new WeakMap,y=new WeakMap,E=new WeakMap,S=new WeakMap,R=new WeakMap,b=new WeakMap,_=new WeakMap,T=new WeakMap,M=new WeakMap,O=new WeakMap,I=new WeakMap,N=new WeakMap,A=new WeakMap,P=new WeakMap,x=new WeakSet;class H extends s.BasePlugin{static get PLUGIN_KEY(){return f}static get PLUGIN_PRIORITY(){return p}constructor(e){var t,o;super(e),c(t=this,o=x),o.add(t),h(this,w,null),h(this,C,null),h(this,v,[]),h(this,y,null),h(this,E,null),h(this,S,null),h(this,R,null),h(this,b,null),h(this,_,this.hot.rootDocument.createElement("DIV")),h(this,T,this.hot.rootDocument.createElement("DIV")),h(this,M,!1),h(this,O,!1),h(this,I,0),h(this,N,null),h(this,A,void 0),h(this,P,void 0),(0,n.addClass)(d(_,this),"manualRowResizer"),(0,n.addClass)(d(T,this),"manualRowResizerGuide")}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[f]}enablePlugin(){this.enabled||(u(A,this,new l.PhysicalIndexToValueMap),d(A,this).addLocalHook("init",(()=>g(x,this,B).call(this))),this.hot.rowIndexMapper.registerMap(this.pluginName,d(A,this)),this.addHook("modifyRowHeight",((e,t)=>g(x,this,W).call(this,e,t))),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){u(P,this,d(A,this).getValues()),this.hot.rowIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}saveManualRowHeights(){this.hot.runHooks("persistentStateSave",m,d(A,this).getValues())}loadManualRowHeights(){const e={};return this.hot.runHooks("persistentStateLoad",m,e),e.value}setManualSize(e,t){const o=this.hot.toPhysicalRow(e),s=Math.max(t,a.DEFAULT_ROW_HEIGHT);return d(A,this).setValueAtIndex(o,s),s}getLastDesiredRowHeight(){return d(y,this)}setupHandlePosition(e){u(w,this,e);const{view:t}=this.hot,{_wt:o}=t,s=o.wtTable.getCoords(d(w,this)),l=s.row;if(l<0)return;const a=(0,n.outerWidth)(d(w,this)),h=d(w,this).getBoundingClientRect(),c=l<o.getSetting("fixedRowsTop"),g=l>=t.countNotHiddenRowIndexes(0,1)-o.getSetting("fixedRowsBottom");let f;c?f=o.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(d(w,this),s.row,s.col):g&&(f=o.wtOverlays.bottomInlineStartCornerOverlay.getRelativeCellPosition(d(w,this),s.row,s.col)),f||(f=o.wtOverlays.inlineStartOverlay.getRelativeCellPosition(d(w,this),s.row,s.col)),u(C,this,this.hot.rowIndexMapper.getVisualFromRenderableIndex(l)),u(v,this,[]);const p=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByRowHeader();if(this.hot.selection.isSelected()&&p){const e=this.hot.getSelectedRange();(0,i.arrayEach)(e,(e=>{const t=e.getTopStartCorner().row,o=e.getBottomStartCorner().row;(0,r.rangeEach)(t,o,(e=>{d(v,this).includes(e)||d(v,this).push(e)}))}))}d(v,this).includes(d(C,this))||u(v,this,[d(C,this)]),u(b,this,f.top-6),u(R,this,parseInt(h.height,10)),d(_,this).style.top=`${d(b,this)+d(R,this)}px`,d(_,this).style[this.inlineDir]=`${f.start}px`,d(_,this).style.width=`${a}px`,this.hot.rootElement.appendChild(d(_,this))}refreshHandlePosition(){d(_,this).style.top=`${d(b,this)+d(y,this)}px`}setupGuidePosition(){const e=parseInt((0,n.outerWidth)(d(_,this)),10),t=parseInt(d(_,this).style[this.inlineDir],10)+e,o=parseInt(this.hot.view.maximumVisibleElementWidth(0),10);(0,n.addClass)(d(_,this),"active"),(0,n.addClass)(d(T,this),"active"),d(T,this).style.top=d(_,this).style.top,d(T,this).style[this.inlineDir]=`${t}px`,d(T,this).style.width=o-e+"px",this.hot.rootElement.appendChild(d(T,this))}refreshGuidePosition(){d(T,this).style.top=d(_,this).style.top}hideHandleAndGuide(){(0,n.removeClass)(d(_,this),"active"),(0,n.removeClass)(d(T,this),"active")}checkIfRowHeader(e){const t=(0,n.closest)(e,["TBODY"],this.hot.rootElement),{inlineStartOverlay:o,topInlineStartCornerOverlay:s,bottomInlineStartCornerOverlay:i}=this.hot.view._wt.wtOverlays;return[o.clone.wtTable.TBODY,s.clone.wtTable.TBODY,i.clone.wtTable.TBODY].includes(t)}getClosestTHParent(e){return"TABLE"!==e.tagName?"TH"===e.tagName?e:this.getClosestTHParent(e.parentNode):null}getActualRowHeight(e){const t=this.hot.view._wt.wtTable.getRowHeight(e);return void 0!==t&&d(E,this)<t?t:d(E,this)}afterMouseDownTimeout(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize()},t=(t,o)=>{const s=this.hot.runHooks("beforeRowResize",this.getActualRowHeight(t),t,!0);void 0!==s&&u(E,this,s),this.setManualSize(t,d(E,this)),this.hot.runHooks("afterRowResize",this.getActualRowHeight(t),t,!0),o&&e()};if(d(I,this)>=2){d(v,this).length>1?((0,i.arrayEach)(d(v,this),(e=>{t(e)})),e()):(0,i.arrayEach)(d(v,this),(e=>{t(e,!0)}))}u(I,this,0),u(N,this,null)}bindEvents(){const{rootElement:e,rootWindow:t}=this.hot;this.eventManager.addEventListener(e,"mouseover",(e=>g(x,this,D).call(this,e))),this.eventManager.addEventListener(e,"mousedown",(e=>g(x,this,k).call(this,e))),this.eventManager.addEventListener(t,"mousemove",(e=>g(x,this,L).call(this,e))),this.eventManager.addEventListener(t,"mouseup",(()=>g(x,this,V).call(this))),this.eventManager.addEventListener(d(_,this),"contextmenu",(()=>g(x,this,F).call(this)))}destroy(){super.destroy()}}function D(e){if(!(0,n.isDetached)(e.target)&&!0!==d(O,this)&&this.checkIfRowHeader(e.target)){const t=this.getClosestTHParent(e.target);t&&(d(M,this)||this.setupHandlePosition(t))}}function k(e){(0,n.hasClass)(e.target,"manualRowResizer")&&(this.setupHandlePosition(d(w,this)),this.setupGuidePosition(),u(M,this,!0),null===d(N,this)&&(u(N,this,setTimeout((()=>this.afterMouseDownTimeout()),500)),this.hot._registerTimeout(d(N,this))),u(I,this,d(I,this)+1),u(S,this,e.pageY),u(E,this,d(R,this)))}function L(e){d(M,this)&&(u(y,this,d(R,this)+(e.pageY-d(S,this))),(0,i.arrayEach)(d(v,this),(e=>{u(E,this,this.setManualSize(e,d(y,this)))})),this.refreshHandlePosition(),this.refreshGuidePosition())}function V(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize()},t=(t,o)=>{this.hot.runHooks("beforeRowResize",this.getActualRowHeight(t),t,!1),o&&e(),this.saveManualRowHeights(),this.hot.runHooks("afterRowResize",this.getActualRowHeight(t),t,!1)};if(d(M,this)){if(this.hideHandleAndGuide(),u(M,this,!1),d(E,this)!==d(R,this)){d(v,this).length>1?((0,i.arrayEach)(d(v,this),(e=>{t(e)})),e()):(0,i.arrayEach)(d(v,this),(e=>{t(e,!0)}))}this.setupHandlePosition(d(w,this))}}function F(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild(d(_,this)),this.hot.rootElement.removeChild(d(T,this)),u(M,this,!1),u(O,this,!0),this.hot._registerImmediate((()=>{u(O,this,!1)}))}function W(e,t){let o=e;if(this.enabled){const e=this.hot.toPhysicalRow(t),s=d(A,this).getValueAtIndex(e);this.hot.getSettings()[f]&&s&&(o=s)}return o}function B(){const e=this.hot.getSettings()[f],t=this.loadManualRowHeights();this.hot.batchExecution((()=>{void 0!==t?t.forEach(((e,t)=>{d(A,this).setValueAtIndex(t,e)})):Array.isArray(e)?(e.forEach(((e,t)=>{d(A,this).setValueAtIndex(t,e)})),u(P,this,e)):!0===e&&Array.isArray(d(P,this))&&d(P,this).forEach(((e,t)=>{d(A,this).setValueAtIndex(t,e)}))}),!0)}t.ManualRowResize=H},54932:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707)),i=o(13911),r=o(9175);t.default=class{constructor(e){(0,n.default)(this,"plugin",void 0),(0,n.default)(this,"mergedCellsCollection",void 0),(0,n.default)(this,"currentFillData",null),this.plugin=e,this.mergedCellsCollection=this.plugin.mergedCellsCollection}correctSelectionAreaSize(e){if(e[0]===e[2]&&e[1]===e[3]){const t=this.mergedCellsCollection.get(e[0],e[1]);t&&(e[2]=e[0]+t.rowspan-1,e[3]=e[1]+t.colspan-1)}}getDirection(e,t){let o=null;return o=t[0]===e[0]&&t[1]===e[1]&&t[3]===e[3]?"down":t[2]===e[2]&&t[1]===e[1]&&t[3]===e[3]?"up":t[1]===e[1]&&t[2]===e[2]?"right":"left",o}snapDragArea(e,t,o,s){const n=t.slice(0),i=this.getAutofillSize(e,t,o),[r,l,a,h]=e,c=["up","down"].indexOf(o)>-1?a-r+1:h-l+1,u=i-Math.floor(i/c)*c,d=this.getFarthestCollection(e,t,o,s);if(d)if("down"===o){const e=d.row+d.rowspan-r-u;n[2]+e>=this.plugin.hot.countRows()?n[2]-=u:n[2]+=u?e:0}else if("right"===o){const e=d.col+d.colspan-l-u;n[3]+e>=this.plugin.hot.countCols()?n[3]-=u:n[3]+=u?e:0}else if("up"===o){const e=a-u-d.row+1;n[0]+e<0?n[0]+=u:n[0]-=u?e:0}else if("left"===o){const e=h-u-d.col+1;n[1]+e<0?n[1]+=u:n[1]-=u?e:0}return this.updateCurrentFillCache({baseArea:e,dragDirection:o,foundMergedCells:s,fillSize:i,dragArea:n,cycleLength:c}),n}updateCurrentFillCache(e){this.currentFillData||(this.currentFillData={}),(0,i.extend)(this.currentFillData,e)}getAutofillSize(e,t,o){const[s,n,i,r]=e,[l,a,h,c]=t;switch(o){case"up":return s-l;case"down":return h-i;case"left":return n-a;case"right":return c-r;default:return null}}getDragArea(e,t,o){const[s,n,i,r]=e,[l,a,h,c]=t;switch(o){case"up":return[l,a,s-1,r];case"down":return[i+1,n,h,r];case"left":return[l,a,i,n-1];case"right":return[s,r+1,h,c];default:return null}}getFarthestCollection(e,t,o,s){const[n,i,l,a]=e,h=["up","down"].indexOf(o)>-1,c=h?l:a,u=h?n:i,d=this.getAutofillSize(e,t,o),g=h?l-n+1:a-i+1,f=d-Math.floor(d/g)*g;let p=null,m=null,w=null;switch(o){case"up":p="includesVertically",w=c-f+1;break;case"left":p="includesHorizontally",w=c-f+1;break;case"down":p="includesVertically",w=u+f-1;break;case"right":p="includesHorizontally",w=u+f-1}return(0,r.arrayEach)(s,(e=>{e[p](w)&&e.isFarther(m,o)&&(m=e)})),m}recreateAfterDataPopulation(e){if(!this.currentFillData)return;const t=this.getRangeFromChanges(e),o=this.currentFillData.foundMergedCells,s=this.currentFillData.dragDirection,n=(e,o)=>{switch(s){case"up":return e.row-o>=t.from.row;case"down":return e.row+e.rowspan-1+o<=t.to.row;case"left":return e.col-o>=t.from.column;case"right":return e.col+e.colspan-1+o<=t.to.column;default:return null}};let i=0,r=null,l=1;do{for(let e=0;e<o.length;e+=1){if(r=o[e],i=l*this.currentFillData.cycleLength,n(r,i))switch(s){case"up":this.plugin.mergedCellsCollection.add({row:r.row-i,rowspan:r.rowspan,col:r.col,colspan:r.colspan});break;case"down":this.plugin.mergedCellsCollection.add({row:r.row+i,rowspan:r.rowspan,col:r.col,colspan:r.colspan});break;case"left":this.plugin.mergedCellsCollection.add({row:r.row,rowspan:r.rowspan,col:r.col-i,colspan:r.colspan});break;case"right":this.plugin.mergedCellsCollection.add({row:r.row,rowspan:r.rowspan,col:r.col+i,colspan:r.colspan})}e===o.length-1&&(l+=1)}}while(n(r,i));this.currentFillData=null,this.plugin.hot.render(),o.length>0&&this.plugin.ifChromeForceRepaint()}getRangeFromChanges(e){const t={min:null,max:null},o={min:null,max:null};return(0,r.arrayEach)(e,(e=>{const s=e[0],n=this.plugin.hot.propToCol(e[1]);(null===t.min||s<t.min)&&(t.min=s),(null===t.max||s>t.max)&&(t.max=s),(null===o.min||n<o.min)&&(o.min=n),(null===o.max||n>o.max)&&(o.max=n)})),{from:{row:t.min,column:o.min},to:{row:t.max,column:o.max}}}dragAreaOverlapsCollections(e,t,o){const s=this.getDragArea(e,t,o),[n,i,r,l]=s,a=this.plugin.hot._createCellCoords(n,i),h=this.plugin.hot._createCellCoords(r,l),c=this.plugin.hot._createCellRange(a,a,h);return this.mergedCellsCollection.getWithinRange(c,!0).length>0}}},85354:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(15724);var n=s(o(85707));t.default=class{constructor(e){(0,n.default)(this,"plugin",void 0),(0,n.default)(this,"hot",void 0),(0,n.default)(this,"fullySelectedMergedCellClassName","fullySelectedMergedCell"),this.plugin=e,this.hot=e.hot}getSelectedMergedCellClassName(e,t,o,s){const n=Math.min(o[0],o[2]),i=Math.min(o[1],o[3]),r=Math.max(o[0],o[2]),l=Math.max(o[1],o[3]);if(void 0===s)return;if(!this.plugin.mergedCellsCollection.isFirstRenderableMergedCell(e,t))return;const a=this.plugin.mergedCellsCollection.get(e,t);if(!a)return;const h=a.getLastRow(),c=a.getLastColumn();return n<=a.row&&i<=a.col&&r>=h&&l>=c?`${this.fullySelectedMergedCellClassName}-${s}`:this.isMergeCellFullySelected(a,this.plugin.hot.getSelectedRange())?`${this.fullySelectedMergedCellClassName}-multiple`:void 0}isMergeCellFullySelected(e,t){const o=[];if(!t||!e)return!1;for(let t=0;t<e.rowspan;t+=1)for(let s=0;s<e.colspan;s+=1)o.push(this.hot._createCellCoords(e.row+t,e.col+s));for(let e=0;e<o.length;e+=1){const s=[];for(let n=0;n<t.length;n+=1)s[n]=t[n].includes(o[e]);if(!s.includes(!0))return!1}return!0}getSelectedMergedCellClassNameToRemove(){const e=[];for(let t=0;t<=7;t+=1)e.push(`${this.fullySelectedMergedCellClassName}-${t}`);return e.push(`${this.fullySelectedMergedCellClassName}-multiple`),e}}},89443:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=s(o(85707)),i=o(28927);function r(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function l(e,t){return e.get(h(e,t))}function a(e,t,o){return e.set(h(e,t),o),o}function h(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var c=new WeakMap;t.default=class{constructor(e,t,o,s,i,l){(0,n.default)(this,"row",void 0),(0,n.default)(this,"col",void 0),(0,n.default)(this,"rowspan",void 0),(0,n.default)(this,"colspan",void 0),(0,n.default)(this,"removed",!1),(0,n.default)(this,"cellCoordsFactory",void 0),(0,n.default)(this,"cellRangeFactory",void 0),r(this,c,null),this.row=e,this.col=t,this.rowspan=o,this.colspan=s,this.cellCoordsFactory=i,this.cellRangeFactory=l}static NEGATIVE_VALUES_WARNING(e){let{row:t,col:o,rowspan:s,colspan:n}=e;return i.toSingleLine`The merged cell declared with {row: ${t}, col: ${o},\x20
75
75
  rowspan: ${s}, colspan: ${n}} contains negative values, which is\x20
76
76
  not supported. It will not be added to the collection.`}static IS_OUT_OF_BOUNDS_WARNING(e){let{row:t,col:o}=e;return i.toSingleLine`The merged cell declared at [${t}, ${o}] is positioned\x20
77
77
  (or positioned partially) outside of the table range. It was not added to the table, please fix your setup.`}static IS_SINGLE_CELL(e){let{row:t,col:o}=e;return i.toSingleLine`The merged cell declared at [${t}, ${o}] has both "rowspan"\x20
78
78
  and "colspan" declared as "1", which makes it a single cell. It cannot be added to the collection.`}static ZERO_SPAN_WARNING(e){let{row:t,col:o}=e;return i.toSingleLine`The merged cell declared at [${t}, ${o}] has "rowspan"\x20
79
79
  or "colspan" declared as "0", which is not supported. It cannot be added to the collection.`}static containsNegativeValues(e){let{row:t,col:o,rowspan:s,colspan:n}=e;return t<0||o<0||s<0||n<0}static isSingleCell(e){let{rowspan:t,colspan:o}=e;return 1===o&&1===t}static containsZeroSpan(e){let{rowspan:t,colspan:o}=e;return 0===o||0===t}static isOutOfBounds(e,t,o){return e.row<0||e.col<0||e.row>=t||e.row+e.rowspan-1>=t||e.col>=o||e.col+e.colspan-1>=o}normalize(e){const t=e.countRows(),o=e.countCols();this.row<0?this.row=0:this.row>t-1&&(this.row=t-1),this.col<0?this.col=0:this.col>o-1&&(this.col=o-1),this.row+this.rowspan>t-1&&(this.rowspan=t-this.row),this.col+this.colspan>o-1&&(this.colspan=o-this.col),a(c,this,null)}includes(e,t){return this.row<=e&&this.col<=t&&this.row+this.rowspan-1>=e&&this.col+this.colspan-1>=t}includesHorizontally(e){return this.col<=e&&this.col+this.colspan-1>=e}includesVertically(e){return this.row<=e&&this.row+this.rowspan-1>=e}shift(e,t){const o=e[0]||e[1],s=t+Math.abs(e[0]||e[1])-1,n=e[0]?"colspan":"rowspan",i=e[0]?"col":"row",r=Math.min(t,s),l=Math.max(t,s),h=this[i],u=this[i]+this[n]-1;if(h>=t&&(this[i]+=o),o>0)t<=u&&t>h&&(this[n]+=o);else if(o<0){if(r<=h&&l>=u)return this.removed=!0,a(c,this,null),!1;if(h>=r&&h<=l){const e=l-h+1,t=Math.abs(o)-e;this[i]-=t+o,this[n]-=e}else if(h<=r&&u>=l)this[n]+=o;else if(h<=r&&u>=r&&u<l){const e=u-r+1;this[n]-=e}}return a(c,this,null),!0}isFarther(e,t){return!e||("down"===t?e.row+e.rowspan-1<this.row+this.rowspan-1:"up"===t?e.row>this.row:"right"===t?e.col+e.colspan-1<this.col+this.colspan-1:"left"===t?e.col>this.col:null)}getLastRow(){return this.row+this.rowspan-1}getLastColumn(){return this.col+this.colspan-1}getRange(){return l(c,this)||a(c,this,this.cellRangeFactory(this.cellCoordsFactory(this.row,this.col),this.cellCoordsFactory(this.row,this.col),this.cellCoordsFactory(this.getLastRow(),this.getLastColumn()))),l(c,this)}}},89144:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724),o(63979),o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var n=s(o(85707)),i=s(o(89443)),r=o(87485),l=o(83119),a=o(9175),h=o(28927);function c(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function u(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var d=new WeakSet;class g{constructor(e){c(this,d),(0,n.default)(this,"plugin",void 0),(0,n.default)(this,"mergedCells",[]),(0,n.default)(this,"mergedCellsMatrix",new Map),(0,n.default)(this,"hot",void 0),this.plugin=e,this.hot=e.hot}static IS_OVERLAPPING_WARNING(e){let{row:t,col:o}=e;return h.toSingleLine`The merged cell declared at [${t}, ${o}], overlaps\x20
80
80
  with the other declared merged cell. The overlapping merged cell was not added to the table, please\x20
81
- fix your setup.`}get(e,t){var o;return!!this.mergedCellsMatrix.has(e)&&(null!==(o=this.mergedCellsMatrix.get(e).get(t))&&void 0!==o&&o)}getByRange(e){let t=!1;return(0,a.arrayEach)(this.mergedCells,(o=>!(o.row<=e.from.row&&o.row+o.rowspan-1>=e.to.row&&o.col<=e.from.col&&o.col+o.colspan-1>=e.to.col)||(t=o,t))),t}filterOverlappingMergeCells(e){const t=new Set;this.mergedCells.forEach((e=>{const{row:o,col:s,colspan:n,rowspan:i}=e;for(let e=o;e<o+i;e++)for(let o=s;o<s+n;o++)t.add(`r${e},c${o}`)}));return e.filter((e=>{const{row:o,col:s,colspan:n,rowspan:i}=e,r=new Set;let a=!1;for(let h=o;h<o+i;h++){for(let o=s;o<s+n;o++){const s=`r${h},c${o}`;if(t.has(s)){(0,l.warn)(g.IS_OVERLAPPING_WARNING(e)),a=!0;break}r.add(s)}if(a)break}return a||t.add(...r),!a}))}getWithinRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{row:o,col:s}=e.getTopStartCorner(),{row:n,col:i}=e.getBottomEndCorner(),r=[];for(let e=o;e<=n;e++)for(let o=s;o<=i;o++){const s=this.get(e,o);s&&(t||!t&&s.row===e&&s.col===o)&&r.push(s)}return r}add(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=e.row,s=e.col,n=e.rowspan,r=e.colspan,a=new i.default(o,s,n,r,this.hot._createCellCoords,this.hot._createCellRange),h=this.get(o,s),c=!t&&this.isOverlapping(a);return h||c?((0,l.warn)(g.IS_OVERLAPPING_WARNING(a)),!1):(this.hot&&a.normalize(this.hot),this.mergedCells.push(a),u(d,this,p).call(this,a),a)}remove(e,t){const o=this.get(e,t),s=o?this.mergedCells.indexOf(o):-1;return!(!o||-1===s)&&(this.mergedCells.splice(s,1),u(d,this,m).call(this,o),o)}clear(){(0,a.arrayEach)(this.mergedCells,(e=>{let{row:t,col:o,rowspan:s,colspan:n}=e;(0,r.rangeEach)(t,t+s,(e=>{(0,r.rangeEach)(o,o+n,(t=>{const o=this.hot.getCell(e,t);o&&(o.removeAttribute("rowspan"),o.removeAttribute("colspan"),o.style.display="")}))}))})),this.mergedCells.length=0,this.mergedCellsMatrix=new Map}isOverlapping(e){const t=e.getRange();for(let e=0;e<this.mergedCells.length;e++){if(this.mergedCells[e].getRange().overlaps(t))return!0}return!1}isFirstRenderableMergedCell(e,t){const o=this.get(e,t);return o&&this.hot.rowIndexMapper.getNearestNotHiddenIndex(o.row,1)===e&&this.hot.columnIndexMapper.getNearestNotHiddenIndex(o.col,1)===t}getFirstRenderableCoords(e,t){const o=this.get(e,t);if(!o||this.isFirstRenderableMergedCell(e,t))return this.hot._createCellCoords(e,t);const s=this.hot.rowIndexMapper.getNearestNotHiddenIndex(o.row,1),n=this.hot.columnIndexMapper.getNearestNotHiddenIndex(o.col,1);return this.hot._createCellCoords(s,n)}getStartMostColumnIndex(e,t){const o=u(d,this,f).call(this,e,"col",-1);let s=t;for(let e=0;e<o.length;e++)if(o[e]<=t){s=o[e];break}return s}getEndMostColumnIndex(e,t){const o=u(d,this,f).call(this,e,"col",1);let s=t;for(let e=0;e<o.length;e++)if(o[e]>=t){s=o[e];break}return s}getTopMostRowIndex(e,t){const o=u(d,this,f).call(this,e,"row",-1);let s=t;for(let e=0;e<o.length;e++)if(o[e]<=t){s=o[e];break}return s}getBottomMostRowIndex(e,t){const o=u(d,this,f).call(this,e,"row",1);let s=t;for(let e=0;e<o.length;e++)if(o[e]>=t){s=o[e];break}return s}shiftCollections(e,t,o){const s=[0,0];switch(e){case"right":s[0]+=o;break;case"left":s[0]-=o;break;case"down":s[1]+=o;break;case"up":s[1]-=o}const n=[];this.mergedCells.forEach((e=>{e.shift(s,t),e.removed&&n.push(e)})),n.forEach((e=>{this.mergedCells.splice(this.mergedCells.indexOf(e),1)})),this.mergedCellsMatrix.clear(),this.mergedCells.forEach((e=>{u(d,this,p).call(this,e)}))}}function f(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const s=new Map,n=1===o?e.getTopStartCorner():e.getBottomEndCorner(),i=1===o?e.getBottomEndCorner():e.getTopStartCorner();for(let e=n.row;1===o?e<=i.row:e>=i.row;e+=o)for(let r=n.col;1===o?r<=i.col:r>=i.col;r+=o){const n="row"===t?e:r,i=this.get(e,r);let l=n;i&&(l=1===o?i[t]+i[`${t}span`]-1:i[t]),s.has(n)||s.set(n,new Set),s.get(n).add(l)}return Array.from(new Set(Array.from(s.entries()).filter((e=>{let[,t]=e;return 1===t.size})).flatMap((e=>{let[,t]=e;return Array.from(t)}))))}function p(e){for(let t=e.row;t<e.row+e.rowspan;t++)for(let o=e.col;o<e.col+e.colspan;o++)this.mergedCellsMatrix.has(t)||this.mergedCellsMatrix.set(t,new Map),this.mergedCellsMatrix.get(t).set(o,e)}function m(e){for(let t=e.row;t<e.row+e.rowspan;t++)for(let o=e.col;o<e.col+e.colspan;o++)this.mergedCellsMatrix.get(t).delete(o)}t.default=g},4213:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.default=function(e){return{key:"mergeCells",name(){const t=this.getSelectedLast();if(t){const o=e.mergedCellsCollection.get(t[0],t[1]);if(o.row===t[0]&&o.col===t[1]&&o.row+o.rowspan-1===t[2]&&o.col+o.colspan-1===t[3])return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_UNMERGE_CELLS)}return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_MERGE_CELLS)},callback(){const t=this.getSelectedRangeLast();if(!t)return;t.setDirection(this.isRtl()?"NE-SW":"NW-SE");const{from:o,to:s}=t;e.toggleMerge(t),this.selectCell(o.row,o.col,s.row,s.col,!1)},disabled(){const e=this.getSelectedLast();if(!e)return!0;return i.default.isSingleCell({row:e[0],col:e[1],rowspan:e[2]-e[0]+1,colspan:e[3]-e[1]+1})||this.selection.isSelectedByCorner()},hidden:!1}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),i=s(o(89443));function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}},45689:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(76892));function i(e,t,o){r(e,t),t.set(e,o)}function r(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function l(e,t){return e.get(h(e,t))}function a(e,t,o){return e.set(h(e,t),o),o}function h(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var c=new WeakMap,u=new WeakMap,d=new WeakMap,g=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,w=new WeakSet;function C(e,t,o,s,n){const i=e.getTopStartCorner(),r=e.getBottomEndCorner(),a=e.highlight.clone().normalize(),h=l(f,this).call(this,s,n);if(h&&o.has(h))return null;const c={colStart:n,colEnd:n,rowStart:s,rowEnd:s};if(h){if(o.add(h),h.row<i.row||h.row+h.rowspan-1>r.row||h.col<i.col||h.col+h.colspan-1>r.col)return null;c.colStart=h.col,c.colEnd=h.col+h.colspan-1,c.rowStart=h.row,c.rowEnd=h.row+h.rowspan-1}const u=t.push(c);return s===a.row&&n===a.col||h&&a.row>=h.row&&a.row<=h.row+h.rowspan-1&&a.col>=h.col&&a.col<=h.col+h.colspan-1?u:null}t.FocusOrder=class{constructor(e){let{mergedCellsGetter:t,rowIndexMapper:o,columnIndexMapper:s}=e;var l,h;r(l=this,h=w),h.add(l),i(this,c,new n.default),i(this,u,new n.default),i(this,d,null),i(this,g,null),i(this,f,null),i(this,p,null),i(this,m,null),a(f,this,t),a(p,this,o),a(m,this,s)}getCurrentVerticalNode(){return l(g,this).data}getFirstVerticalNode(){return l(u,this).first.data}getNextVerticalNode(){return l(g,this).next.data}getPrevVerticalNode(){return l(g,this).prev.data}getCurrentHorizontalNode(){return l(d,this).data}getFirstHorizontalNode(){return l(c,this).first.data}getNextHorizontalNode(){return l(d,this).next.data}getPrevHorizontalNode(){return l(d,this).prev.data}setPrevNodeAsActive(){a(g,this,l(g,this).prev),a(d,this,l(d,this).prev)}setNextNodeAsActive(){a(g,this,l(g,this).next),a(d,this,l(d,this).next)}buildFocusOrder(e){const t=e.getTopStartCorner(),o=e.getBottomEndCorner(),s=new WeakSet;a(c,this,new n.default);for(let n=t.row;n<=o.row;n++)if(!l(p,this).isHidden(n))for(let i=t.col;i<=o.col;i++){if(l(m,this).isHidden(i))continue;const t=h(w,this,C).call(this,e,l(c,this),s,n,i);t&&a(d,this,t)}l(c,this).first&&(l(c,this).first.prev=l(c,this).last,l(c,this).last.next=l(c,this).first);const i=new WeakSet;a(u,this,new n.default);for(let s=t.col;s<=o.col;s++)if(!l(m,this).isHidden(s))for(let n=t.row;n<=o.row;n++){if(l(p,this).isHidden(n))continue;const t=h(w,this,C).call(this,e,l(u,this),i,n,s);t&&a(g,this,t)}l(u,this).first&&(l(u,this).first.prev=l(u,this).last,l(u,this).last.next=l(u,this).first)}setActiveNode(e,t){return l(c,this).inorder((o=>{const{rowStart:s,rowEnd:n,colStart:i,colEnd:r}=o.data;if(e>=s&&e<=n&&t>=i&&t<=r)return a(d,this,o),!1})),l(u,this).inorder((o=>{const{rowStart:s,rowEnd:n,colStart:i,colEnd:r}=o.data;if(e>=s&&e<=n&&t>=i&&t<=r)return a(g,this,o),!1})),this}}},12897:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(29224);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.MergeCells=s.MergeCells},29224:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724),o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var n=s(o(85707)),i=o(61205),r=s(o(56937)),l=s(o(89144)),a=s(o(89443)),h=s(o(54932)),c=s(o(85354)),u=s(o(4213)),d=o(9175),g=o(13911),f=o(83119),p=o(87485);o(40248);var m=o(9893),w=o(28890),C=o(45689),v=o(97666);function y(e,t,o){E(e,t),t.set(e,o)}function E(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function S(e,t,o){return e.set(b(e,t),o),o}function R(e,t){return e.get(b(e,t))}function b(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}r.default.getSingleton().register("beforeMergeCells"),r.default.getSingleton().register("afterMergeCells"),r.default.getSingleton().register("beforeUnmergeCells"),r.default.getSingleton().register("afterUnmergeCells");const _=t.PLUGIN_KEY="mergeCells",T=t.PLUGIN_PRIORITY=150,M=_;var O=new WeakMap,I=new WeakMap,N=new WeakMap,A=new WeakMap,P=new WeakSet;class x extends i.BasePlugin{constructor(){var e,t;super(...arguments),E(e=this,t=P),t.add(e),(0,n.default)(this,"mergedCellsCollection",null),(0,n.default)(this,"autofillCalculations",null),(0,n.default)(this,"selectionCalculations",null),y(this,O,null),y(this,I,{row:0,col:0}),y(this,N,new C.FocusOrder({mergedCellsGetter:(e,t)=>this.mergedCellsCollection.get(e,t),rowIndexMapper:this.hot.rowIndexMapper,columnIndexMapper:this.hot.columnIndexMapper})),y(this,A,(0,v.createMergeCellRenderer)(this))}static get PLUGIN_KEY(){return _}static get PLUGIN_PRIORITY(){return T}isEnabled(){return!!this.hot.getSettings()[_]}enablePlugin(){var e=this;this.enabled||(this.mergedCellsCollection=new l.default(this),this.autofillCalculations=new h.default(this),this.selectionCalculations=new c.default(this),this.addHook("afterInit",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,H).call(e,...o)})),this.addHook("modifyTransformFocus",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,L).call(e,...o)})),this.addHook("modifyTransformStart",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,k).call(e,...o)})),this.addHook("modifyTransformEnd",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,V).call(e,...o)})),this.addHook("beforeSelectionHighlightSet",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,F).call(e,...o)})),this.addHook("beforeSetRangeStart",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,U).call(e,...o)})),this.addHook("beforeSetRangeStartOnly",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,U).call(e,...o)})),this.addHook("beforeSelectionFocusSet",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,j).call(e,...o)})),this.addHook("afterSelectionFocusSet",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,Y).call(e,...o)})),this.addHook("afterSelectionEnd",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,z).call(e,...o)})),this.addHook("modifyGetCellCoords",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,W).call(e,...o)})),this.addHook("afterIsMultipleSelection",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,D).call(e,...o)})),this.addHook("afterRenderer",(function(){return R(A,e).after(...arguments)})),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,B).call(e,...o)})),this.addHook("afterGetCellMeta",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,G).call(e,...o)})),this.addHook("afterViewportRowCalculatorOverride",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,$).call(e,...o)})),this.addHook("afterViewportColumnCalculatorOverride",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,K).call(e,...o)})),this.addHook("modifyAutofillRange",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,X).call(e,...o)})),this.addHook("afterCreateCol",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,q).call(e,...o)})),this.addHook("afterRemoveCol",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,Q).call(e,...o)})),this.addHook("afterCreateRow",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,J).call(e,...o)})),this.addHook("afterRemoveRow",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,Z).call(e,...o)})),this.addHook("afterChange",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,ee).call(e,...o)})),this.addHook("beforeDrawBorders",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,te).call(e,...o)})),this.addHook("afterDrawSelection",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,oe).call(e,...o)})),this.addHook("beforeRemoveCellClassNames",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,se).call(e,...o)})),this.addHook("beforeBeginEditing",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,ne).call(e,...o)})),this.addHook("modifyRowHeightByOverlayName",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,ie).call(e,...o)})),this.addHook("beforeUndoStackChange",((e,t)=>{if("MergeCells"===t)return!1})),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){this.clearCollections(),this.unregisterShortcuts(),this.hot.render(),super.disablePlugin()}updatePlugin(){const e=this.hot.getSettings()[_];this.disablePlugin(),this.enablePlugin(),this.generateFromSettings(e),super.updatePlugin()}ifChromeForceRepaint(){if(!(0,w.isChrome)())return;const e=[];let t=[];this.mergedCellsCollection.mergedCells.forEach((e=>{const{row:o,rowspan:s}=e;for(let e=o+1;e<o+s;e++)t.push(e)})),t=[...new Set(t)],t.forEach((t=>{const o=this.hot.rowIndexMapper.getRenderableFromVisualIndex(t);this.hot.view._wt.wtOverlays.getOverlays(!0).map((e=>"master"===(null==e?void 0:e.name)?e:e.clone.wtTable)).forEach((t=>{const s=t.getRow(o);s&&(s.style.background=(0,m.getStyle)(s,"backgroundColor").replace(")",", 0.99)"),e.push(s))}))})),this.hot._registerTimeout((()=>{e.forEach((e=>{e.style.background=(0,m.getStyle)(e,"backgroundColor").replace(", 0.99)",")")}))}),1)}validateSetting(e){return!!e&&(a.default.containsNegativeValues(e)?((0,f.warn)(a.default.NEGATIVE_VALUES_WARNING(e)),!1):a.default.isOutOfBounds(e,this.hot.countRows(),this.hot.countCols())?((0,f.warn)(a.default.IS_OUT_OF_BOUNDS_WARNING(e)),!1):a.default.isSingleCell(e)?((0,f.warn)(a.default.IS_SINGLE_CELL(e)),!1):!a.default.containsZeroSpan(e)||((0,f.warn)(a.default.ZERO_SPAN_WARNING(e)),!1))}generateFromSettings(e){if(!Array.isArray(e))return;const t=e.filter((e=>this.validateSetting(e))),o=this.mergedCellsCollection.filterOverlappingMergeCells(t),s=[];o.forEach((e=>{const{row:t,col:o,rowspan:n,colspan:i}=e,r=this.hot._createCellCoords(t,o),l=this.hot._createCellCoords(t+n-1,o+i-1),a=this.hot._createCellRange(r,r,l);this.mergeRange(a,!0,!0);for(let e=t;e<t+n;e++)for(let n=o;n<o+i;n++)e===t&&n===o||s.push([e,n,null])})),0!==s.length&&this.hot.setDataAtCell(s,void 0,void 0,this.pluginName)}clearCollections(){this.mergedCellsCollection.clear()}canMergeRange(e){return!!(arguments.length>1&&void 0!==arguments[1]&&arguments[1])||this.validateSetting(e)}mergeSelection(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hot.getSelectedRangeLast();if(!e)return;e.setDirection(this.hot.isRtl()?"NE-SW":"NW-SE");const{from:t,to:o}=e;this.unmergeRange(e,!0),this.mergeRange(e),this.hot.selectCell(t.row,t.col,o.row,o.col,!1)}unmergeSelection(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hot.getSelectedRangeLast();if(!e)return;const{from:t,to:o}=e;this.unmergeRange(e,!0),this.hot.selectCell(t.row,t.col,o.row,o.col,!1)}mergeRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=e.getTopStartCorner(),n=e.getBottomEndCorner(),i={row:s.row,col:s.col,rowspan:n.row-s.row+1,colspan:n.col-s.col+1},r=[];let l=null;if(!this.canMergeRange(i,t))return!1;this.hot.runHooks("beforeMergeCells",e,t),(0,p.rangeEach)(0,i.rowspan-1,(e=>{(0,p.rangeEach)(0,i.colspan-1,(t=>{let o=null;r[e]||(r[e]=[]),0===e&&0===t?o=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(i.row),this.hot.toPhysicalColumn(i.col)):this.hot.setCellMeta(i.row+e,i.col+t,"hidden",!0),r[e][t]=o}))})),this.hot.setCellMeta(i.row,i.col,"spanned",!0);return!this.mergedCellsCollection.add(i,t)||(o?l=[i.row,i.col,r]:this.hot.populateFromArray(i.row,i.col,r,void 0,void 0,this.pluginName),t||this.ifChromeForceRepaint(),this.hot.runHooks("afterMergeCells",e,i,t),l)}unmergeRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=this.mergedCellsCollection.getWithinRange(e);0!==o.length&&(this.hot.runHooks("beforeUnmergeCells",e,t),(0,d.arrayEach)(o,(e=>{this.mergedCellsCollection.remove(e.row,e.col),(0,p.rangeEach)(0,e.rowspan-1,(t=>{(0,p.rangeEach)(0,e.colspan-1,(o=>{this.hot.removeCellMeta(e.row+t,e.col+o,"hidden"),this.hot.removeCellMeta(e.row+t,e.col+o,"copyable")}))})),this.hot.removeCellMeta(e.row,e.col,"spanned")})),this.hot.runHooks("afterUnmergeCells",e,t),this.hot.render())}toggleMerge(e){const t=this.mergedCellsCollection.get(e.from.row,e.from.col);t.row===e.from.row&&t.col===e.from.col&&t.row+t.rowspan-1===e.to.row&&t.col+t.colspan-1===e.to.col?this.unmergeRange(e):this.mergeSelection(e)}merge(e,t,o,s){const n=this.hot._createCellCoords(e,t),i=this.hot._createCellCoords(o,s);this.mergeRange(this.hot._createCellRange(n,n,i))}unmerge(e,t,o,s){const n=this.hot._createCellCoords(e,t),i=this.hot._createCellCoords(o,s);this.unmergeRange(this.hot._createCellRange(n,n,i))}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Control","m"]],callback:()=>{const e=this.hot.getSelectedRangeLast();e&&!e.isSingleHeader()&&(this.toggleMerge(e),this.hot.render())},runOnlyIf:e=>!e.altKey,group:M})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(M)}modifyViewportRowStart(e,t){const o=this.hot.rowIndexMapper,s=o.getVisualFromRenderableIndex(e.startRow);for(let n=0;n<t;n+=1){const i=this.mergedCellsCollection.get(s,n);if((0,g.isObject)(i)){const s=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(i.row,1));if(s<e.startRow)return e.startRow=s,void this.modifyViewportRowStart(e,t)}}}modifyViewportRowEnd(e,t){const o=this.hot.rowIndexMapper,s=o.getVisualFromRenderableIndex(e.endRow);for(let n=0;n<t;n+=1){const i=this.mergedCellsCollection.get(s,n);if((0,g.isObject)(i)){const s=i.row+i.rowspan-1,n=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(s,-1));if(n>e.endRow)return e.endRow=n,void this.modifyViewportRowEnd(e,t)}}}modifyViewportColumnStart(e,t){const o=this.hot.columnIndexMapper,s=o.getVisualFromRenderableIndex(e.startColumn);for(let n=0;n<t;n+=1){const i=this.mergedCellsCollection.get(n,s);if((0,g.isObject)(i)){const s=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(i.col,1));if(s<e.startColumn)return e.startColumn=s,void this.modifyViewportColumnStart(e,t)}}}modifyViewportColumnEnd(e,t){const o=this.hot.columnIndexMapper,s=o.getVisualFromRenderableIndex(e.endColumn);for(let n=0;n<t;n+=1){const i=this.mergedCellsCollection.get(n,s);if((0,g.isObject)(i)){const s=i.col+i.colspan-1,n=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(s,-1));if(n>e.endColumn)return e.endColumn=n,void this.modifyViewportColumnEnd(e,t)}}}translateMergedCellToRenderable(e,t,o,s){const{rowIndexMapper:n,columnIndexMapper:i}=this.hot;let r,l;r=0===t?n.getNearestNotHiddenIndex(e,1):n.getNearestNotHiddenIndex(e+t-1,-1),l=0===s?i.getNearestNotHiddenIndex(o,1):i.getNearestNotHiddenIndex(o+s-1,-1);return[e>=0?n.getRenderableFromVisualIndex(r):e,o>=0?i.getRenderableFromVisualIndex(l):o]}}function H(){this.generateFromSettings(this.hot.getSettings()[_]),this.hot.render()}function D(e){if(e){const e=this.mergedCellsCollection.mergedCells,t=this.hot.getSelectedRangeLast(),o=t.getTopStartCorner(),s=t.getBottomEndCorner();for(let t=0;t<e.length;t+=1)if(o.row===e[t].row&&o.col===e[t].col&&s.row===e[t].row+e[t].rowspan-1&&s.col===e[t].col+e[t].colspan-1)return!1}return e}function L(e){R(I,this).row=e.row,R(I,this).col=e.col}function k(e){const t=this.hot.getSelectedRangeLast(),{highlight:o}=t,{columnIndexMapper:s,rowIndexMapper:n}=this.hot;R(O,this)&&(null!==n.getRenderableFromVisualIndex(R(O,this).row)&&(o.row=R(O,this).row),null!==s.getRenderableFromVisualIndex(R(O,this).col)&&(o.col=R(O,this).col),S(O,this,null));const i=this.mergedCellsCollection.get(o.row,o.col);if(!i)return;const r=i.col,l=i.col+i.colspan-1;if(e.col<0){const t=o.col>=r&&o.col<=l?r-1:l,n=s.getNearestNotHiddenIndex(t,-1);e.col=null===n?-this.hot.view.countRenderableColumnsInRange(0,o.col):-Math.max(this.hot.view.countRenderableColumnsInRange(n,o.col)-1,1)}else if(e.col>0){const t=o.col>=r&&o.col<=l?l+1:r,n=s.getNearestNotHiddenIndex(t,1);e.col=null===n?this.hot.view.countRenderableColumnsInRange(o.col,this.hot.countCols()):Math.max(this.hot.view.countRenderableColumnsInRange(o.col,n)-1,1)}const a=i.row,h=i.row+i.rowspan-1;if(e.row<0){const t=o.row>=a&&o.row<=h?a-1:h,s=n.getNearestNotHiddenIndex(t,-1);e.row=null===s?-this.hot.view.countRenderableRowsInRange(0,o.row):-Math.max(this.hot.view.countRenderableRowsInRange(s,o.row)-1,1)}else if(e.row>0){const t=o.row>=a&&o.row<=h?h+1:a,s=n.getNearestNotHiddenIndex(t,1);e.row=null===s?this.hot.view.countRenderableRowsInRange(o.row,this.hot.countRows()):Math.max(this.hot.view.countRenderableRowsInRange(o.row,s)-1,1)}}function V(e){const t=this.hot.getSelectedRangeLast(),o=t.clone(),{to:s}=t,{columnIndexMapper:n,rowIndexMapper:i}=this.hot,r=(e,t)=>{o.expand(this.hot._createCellCoords(e,t));for(let e=0;e<this.mergedCellsCollection.mergedCells.length;e+=1)o.expandByRange(this.mergedCellsCollection.mergedCells[e].getRange())};if(e.col<0){let i=this.mergedCellsCollection.getStartMostColumnIndex(t,s.col)+e.col;r(s.row,i),"E-W"===t.getHorizontalDirection()&&"E-W"===o.getHorizontalDirection()&&(i=o.getTopStartCorner().col);const l=n.getNearestNotHiddenIndex(i,1);null!==l&&(e.col=-Math.max(this.hot.view.countRenderableColumnsInRange(l,s.col)-1,1))}else if(e.col>0){let i=this.mergedCellsCollection.getEndMostColumnIndex(t,s.col)+e.col;r(s.row,i),"W-E"===t.getHorizontalDirection()&&"W-E"===o.getHorizontalDirection()&&(i=o.getBottomEndCorner().col);const l=n.getNearestNotHiddenIndex(i,-1);null!==l&&(e.col=Math.max(this.hot.view.countRenderableColumnsInRange(s.col,l)-1,1))}if(e.row<0){let n=this.mergedCellsCollection.getTopMostRowIndex(t,s.row)+e.row;r(n,s.col),"S-N"===t.getVerticalDirection()&&"S-N"===o.getVerticalDirection()&&(n=o.getTopStartCorner().row);const l=i.getNearestNotHiddenIndex(n,1);null!==l&&(e.row=-Math.max(this.hot.view.countRenderableRowsInRange(l,s.row)-1,1))}else if(e.row>0){let n=this.mergedCellsCollection.getBottomMostRowIndex(t,s.row)+e.row;r(n,s.col),"N-S"===t.getVerticalDirection()&&"N-S"===o.getVerticalDirection()&&(n=o.getBottomStartCorner().row);const l=i.getNearestNotHiddenIndex(n,-1);null!==l&&(e.row=Math.max(this.hot.view.countRenderableRowsInRange(s.row,l)-1,1))}}function F(){const e=this.hot.getSelectedRangeLast(),{highlight:t}=e;if(this.hot.selection.isSelectedByColumnHeader()||this.hot.selection.isSelectedByRowHeader())return void S(O,this,t.clone());for(let t=0;t<this.mergedCellsCollection.mergedCells.length;t+=1)e.expandByRange(this.mergedCellsCollection.mergedCells[t].getRange(),!1);for(let t=0;t<this.mergedCellsCollection.mergedCells.length;t+=1)e.expandByRange(this.mergedCellsCollection.mergedCells[t].getRange(),!1);const o=this.mergedCellsCollection.get(t.row,t.col);S(O,this,t.clone()),o&&t.assign(o)}function W(e,t){if(e<0||t<0)return;const o=this.mergedCellsCollection.get(e,t);if(!o)return;const{row:s,col:n,colspan:i,rowspan:r}=o;return[s,n,s+r-1,n+i-1]}function B(e){e.items.push({name:"---------"},(0,u.default)(this))}function U(){S(O,this,null)}function j(){if(R(O,this).isCell())return;const e=this.hot.getSelectedRangeLast(),t=e.getVerticalDirection(),o=e.getHorizontalDirection(),s=R(O,this).clone().normalize();R(N,this).setActiveNode(s.row,s.col),R(I,this).row>0||R(I,this).col>0?R(N,this).setPrevNodeAsActive():("E-W"===o&&R(I,this).col<0||"S-N"===t&&R(I,this).row<0)&&R(N,this).setNextNodeAsActive()}function Y(e,t){const o=this.hot.getSelectedRangeLast(),{columnIndexMapper:s,rowIndexMapper:n}=this.hot;let i=null,r=null;if(R(I,this).col<0){const{rowEnd:e,colEnd:t}=R(N,this).getPrevHorizontalNode();r=s.getNearestNotHiddenIndex(t,-1),i=n.getNearestNotHiddenIndex(e,-1)}else if(R(I,this).col>0){const{rowStart:e,colStart:t}=R(N,this).getNextHorizontalNode();r=s.getNearestNotHiddenIndex(t,1),i=n.getNearestNotHiddenIndex(e,1)}else if(R(I,this).row<0){const{rowEnd:e,colEnd:t}=R(N,this).getPrevVerticalNode();r=s.getNearestNotHiddenIndex(t,-1),i=n.getNearestNotHiddenIndex(e,-1)}else if(R(I,this).row>0){const{rowStart:e,colStart:t}=R(N,this).getNextVerticalNode();r=s.getNearestNotHiddenIndex(t,1),i=n.getNearestNotHiddenIndex(e,1)}if(null!==i||null!==r){const s=this.hot._createCellCoords(i,r),n=this.mergedCellsCollection.get(s.row,s.col),l=this.hot.selection.highlight.getFocus();e=s.row,t=s.col,n?o.highlight.assign({row:this.hot.rowIndexMapper.getNearestNotHiddenIndex(n.row,1),col:this.hot.columnIndexMapper.getNearestNotHiddenIndex(n.col,1)}):o.highlight.assign(s),l.clear(),l.add(s).commit()}R(N,this).setActiveNode(e,t),S(I,this,{row:0,col:0})}function z(){this.hot.getSelectedRangeLast().isHeader()||R(N,this).buildFocusOrder(this.hot.getSelectedRangeLast())}function G(e,t,o){const s=this.mergedCellsCollection.get(e,t);s&&(s.row!==e||s.col!==t?o.copyable=!1:(o.rowspan=s.rowspan,o.colspan=s.colspan))}function $(e){const t=this.hot.countCols();this.modifyViewportRowStart(e,t),this.modifyViewportRowEnd(e,t)}function K(e){const t=this.hot.countRows();this.modifyViewportColumnStart(e,t),this.modifyViewportColumnEnd(e,t)}function X(e,t){this.autofillCalculations.correctSelectionAreaSize(t);const o=this.autofillCalculations.getDirection(t,e);let s=e;if(this.autofillCalculations.dragAreaOverlapsCollections(t,s,o))return s=t,s;const n=this.hot._createCellCoords(t[0],t[1]),i=this.hot._createCellCoords(t[2],t[3]),r=this.hot._createCellRange(n,n,i),l=this.mergedCellsCollection.getWithinRange(r);return 0===l.length||(s=this.autofillCalculations.snapDragArea(t,s,o,l)),s}function q(e,t){this.mergedCellsCollection.shiftCollections("right",e,t)}function Q(e,t){this.mergedCellsCollection.shiftCollections("left",e,t)}function J(e,t,o){"auto"!==o&&this.mergedCellsCollection.shiftCollections("down",e,t)}function Z(e,t){this.mergedCellsCollection.shiftCollections("up",e,t)}function ee(e,t){"Autofill.fill"===t&&this.autofillCalculations.recreateAfterDataPopulation(e)}function te(e,t){if(t&&"area"===t){const t=this.hot.getSelectedRangeLast(),o=this.mergedCellsCollection.getWithinRange(t);(0,d.arrayEach)(o,(o=>{t.getBottomEndCorner().row===o.getLastRow()&&t.getBottomEndCorner().col===o.getLastColumn()&&(e[2]=o.row,e[3]=o.col)}))}}function oe(e,t,o,s){if(o)return this.selectionCalculations.getSelectedMergedCellClassName(e,t,o,s)}function se(){return this.selectionCalculations.getSelectedMergedCellClassNameToRemove()}function ne(e,t,o,s){if(!(s instanceof MouseEvent))return;const n=this.hot.getSelectedRangeLast(),i=this.mergedCellsCollection.getByRange(n);if(!i)return;const r=this.hot._createCellCoords(i.row,i.col),l=this.hot._createCellCoords(i.row+i.rowspan-1,i.col+i.colspan-1);return 0===this.hot.selection.getLayerLevel()&&n.isEqual(this.hot._createCellRange(r,r,l))}function ie(e,t,o){if(this.hot.getSettings().rowHeaders||"bottom"===o||"bottom_inline_start_corner"===o)return e;let s,n;if("master"===o)s=this.hot.view.getFirstRenderedVisibleColumn(),n=this.hot.view.getLastRenderedVisibleColumn();else{const e=this.hot.view.getOverlayByName(o);s=this.hot.columnIndexMapper.getVisualFromRenderableIndex(e.clone.wtTable.getFirstRenderedColumn()),n=this.hot.columnIndexMapper.getVisualFromRenderableIndex(e.clone.wtTable.getLastRenderedColumn())}if(!this.mergedCellsCollection.get(t,s))return e;const i=this.hot._createCellCoords(t,s),r=this.hot._createCellCoords(t,n),l=this.hot._createCellRange(i,i,r),a=this.mergedCellsCollection.getWithinRange(l),h=a.reduce(((e,t)=>{let{rowspan:o}=t;return Math.max(e,o)}),1);let c=0;return a.length>1&&a[0].rowspan<h&&(c=h-a[0].rowspan),a.forEach((s=>{var n;let{rowspan:i}=s,r=0;r="top"===o||"top_inline_start_corner"===o?Math.min(h,this.hot.view.countNotHiddenFixedRowsTop()-t):i-c,e=Math.max(null!==(n=e)&&void 0!==n?n:0,b(P,this,re).call(this,t,r))})),e}function re(e,t){const o=this.hot.view._wt.wtSettings.getSettingPure("defaultRowHeight"),s=this.hot.getPlugin("autoRowSize");let n=0;for(let r=e;r<e+t;r++){var i;if(!this.hot.rowIndexMapper.isHidden(r))n+=null!==(i=null==s?void 0:s.getRowHeight(r))&&void 0!==i?i:o}return n}t.MergeCells=x},97666:(e,t,o)=>{"use strict";t.__esModule=!0,t.createMergeCellRenderer=function(e){const{hot:t}=e,{rowIndexMapper:o,columnIndexMapper:n}=t;return{before:function(){},after:function(t,i,r){const l=e.mergedCellsCollection.get(i,r);if(!(0,s.isObject)(l))return t.removeAttribute("rowspan"),t.removeAttribute("colspan"),void(t.style.display="");const{row:a,col:h,colspan:c,rowspan:u}=l,[d,g]=e.translateMergedCellToRenderable(a,u,h,c),f=d-o.getRenderableFromVisualIndex(i)+1,p=g-n.getRenderableFromVisualIndex(r)+1,m=o.getNearestNotHiddenIndex(a,1),w=n.getNearestNotHiddenIndex(h,1),C=Math.min(u,f),v=Math.min(c,p);m===i&&w===r?(t.setAttribute("rowspan",C),t.setAttribute("colspan",v)):(t.removeAttribute("rowspan"),t.removeAttribute("colspan"),t.style.display="none")}}};var s=o(13911)},13936:(e,t,o)=>{"use strict";t.__esModule=!0,t.getClassesToAdd=function(e,t,o){const n=[];if(!1===o)return n;e.isColumnSorted(t)&&e.getNumberOfSortedColumns()>1&&n.push(`${s}-${e.getIndexOfColumnInSortQueue(t)+1}`);return n},t.getClassesToRemove=function(e){const t=e.className.split(" "),o=new RegExp(`^${s}-[0-9]{1,2}$`);return t.filter((e=>o.test(e)))},o(15724);const s="sort"},80657:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(55016);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.MultiColumnSorting=s.MultiColumnSorting},55016:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707)),i=o(16050),r=o(7426),l=o(78131),a=o(9893),h=o(11945),c=o(66172),u=o(13936),d=o(37947);o(34115);const g=t.PLUGIN_KEY="multiColumnSorting",f=t.PLUGIN_PRIORITY=170,p="columnSorting",m=g;(0,r.registerRootComparator)(g,h.rootComparator);class w extends i.ColumnSorting{constructor(){super(...arguments),(0,n.default)(this,"pluginKey",g)}static get PLUGIN_KEY(){return g}static get PLUGIN_PRIORITY(){return f}isEnabled(){return super.isEnabled()}enablePlugin(){!this.enabled&&this.hot.getSettings()[this.pluginKey]&&this.hot.getSettings()[p]&&((0,c.warnAboutPluginsConflict)(),this.hot.getPlugin(p).disablePlugin()),super.enablePlugin()}disablePlugin(){super.disablePlugin()}registerShortcuts(){super.registerShortcuts(),this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Shift","Enter"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();return-1===e.row&&e.col>=0&&this.sort(this.getNextSortConfig(e.col,i.APPEND_COLUMN_CONFIG_STRATEGY)),!1},runOnlyIf:()=>{var e,t;const o=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return o&&(null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.isSingle())&&this.hot.selection.isCellVisible(o)&&o.isHeader()},relativeToGroup:d.EDITOR_EDIT_GROUP,position:"before",group:m})}unregisterShortcuts(){super.unregisterShortcuts(),this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(m)}sort(e){super.sort(e)}clearSort(){super.clearSort()}isSorted(){return super.isSorted()}getSortConfig(e){return super.getSortConfig(e)}setSortConfig(e){super.setSortConfig(e)}getNormalizedSortConfigs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(e)?e:[e]}updateHeaderClasses(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];super.updateHeaderClasses(e,...o),(0,a.removeClass)(e,(0,u.getClassesToRemove)(e)),!1!==this.enabled&&(0,a.addClass)(e,(0,u.getClassesToAdd)(...o))}onUpdateSettings(e){this.hot.getSettings()[this.pluginKey]&&this.hot.getSettings()[p]&&(0,c.warnAboutPluginsConflict)(),super.onUpdateSettings(e)}onAfterOnCellMouseDown(e,t){!1!==(0,l.wasHeaderClickedProperly)(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)&&(this.hot.getShortcutManager().isCtrlPressed()?(this.hot.deselectCell(),this.hot.selectColumns(t.col),this.sort(this.getNextSortConfig(t.col,i.APPEND_COLUMN_CONFIG_STRATEGY))):this.sort(this.getColumnNextConfig(t.col)))}}t.MultiColumnSorting=w},11945:(e,t,o)=>{"use strict";t.__esModule=!0,t.rootComparator=function(e,t){return function(o,n){const[,...i]=o,[,...r]=n;return function o(n){const l=e[n],a=t[n],h=i[n],c=r[n],u=a.multiColumnSorting,d=(u.compareFunctionFactory?u.compareFunctionFactory:(0,s.getCompareFunctionFactory)(a.type))(l,a,u)(h,c);if(d===s.DO_NOT_SWAP){const e=n+1;if(void 0!==t[e])return o(e)}return d}(0)}};var s=o(7426)},66172:(e,t,o)=>{"use strict";t.__esModule=!0,t.warnAboutPluginsConflict=function(){(0,s.warn)(n.toSingleLine`Plugins \`columnSorting\` and \`multiColumnSorting\` should not be enabled simultaneously.
81
+ fix your setup.`}get(e,t){var o;return!!this.mergedCellsMatrix.has(e)&&(null!==(o=this.mergedCellsMatrix.get(e).get(t))&&void 0!==o&&o)}getByRange(e){let t=!1;return(0,a.arrayEach)(this.mergedCells,(o=>!(o.row<=e.from.row&&o.row+o.rowspan-1>=e.to.row&&o.col<=e.from.col&&o.col+o.colspan-1>=e.to.col)||(t=o,t))),t}filterOverlappingMergeCells(e){const t=new Set;this.mergedCells.forEach((e=>{const{row:o,col:s,colspan:n,rowspan:i}=e;for(let e=o;e<o+i;e++)for(let o=s;o<s+n;o++)t.add(`r${e},c${o}`)}));return e.filter((e=>{const{row:o,col:s,colspan:n,rowspan:i}=e,r=new Set;let a=!1;for(let h=o;h<o+i;h++){for(let o=s;o<s+n;o++){const s=`r${h},c${o}`;if(t.has(s)){(0,l.warn)(g.IS_OVERLAPPING_WARNING(e)),a=!0;break}r.add(s)}if(a)break}return a||t.add(...r),!a}))}getWithinRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{row:o,col:s}=e.getTopStartCorner(),{row:n,col:i}=e.getBottomEndCorner(),r=[];for(let e=o;e<=n;e++)for(let o=s;o<=i;o++){const s=this.get(e,o);s&&(t||!t&&s.row===e&&s.col===o)&&r.push(s)}return r}add(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=e.row,s=e.col,n=e.rowspan,r=e.colspan,a=new i.default(o,s,n,r,this.hot._createCellCoords,this.hot._createCellRange),h=this.get(o,s),c=!t&&this.isOverlapping(a);return h||c?((0,l.warn)(g.IS_OVERLAPPING_WARNING(a)),!1):(this.hot&&a.normalize(this.hot),this.mergedCells.push(a),u(d,this,p).call(this,a),a)}remove(e,t){const o=this.get(e,t),s=o?this.mergedCells.indexOf(o):-1;return!(!o||-1===s)&&(this.mergedCells.splice(s,1),u(d,this,m).call(this,o),o)}clear(){(0,a.arrayEach)(this.mergedCells,(e=>{let{row:t,col:o,rowspan:s,colspan:n}=e;(0,r.rangeEach)(t,t+s,(e=>{(0,r.rangeEach)(o,o+n,(t=>{const o=this.hot.getCell(e,t);o&&(o.removeAttribute("rowspan"),o.removeAttribute("colspan"),o.style.display="")}))}))})),this.mergedCells.length=0,this.mergedCellsMatrix=new Map}isOverlapping(e){const t=e.getRange();for(let e=0;e<this.mergedCells.length;e++){if(this.mergedCells[e].getRange().overlaps(t))return!0}return!1}isFirstRenderableMergedCell(e,t){const o=this.get(e,t);return o&&this.hot.rowIndexMapper.getNearestNotHiddenIndex(o.row,1)===e&&this.hot.columnIndexMapper.getNearestNotHiddenIndex(o.col,1)===t}getFirstRenderableCoords(e,t){const o=this.get(e,t);if(!o||this.isFirstRenderableMergedCell(e,t))return this.hot._createCellCoords(e,t);const s=this.hot.rowIndexMapper.getNearestNotHiddenIndex(o.row,1),n=this.hot.columnIndexMapper.getNearestNotHiddenIndex(o.col,1);return this.hot._createCellCoords(s,n)}getStartMostColumnIndex(e,t){const o=u(d,this,f).call(this,e,"col",-1);let s=t;for(let e=0;e<o.length;e++)if(o[e]<=t){s=o[e];break}return s}getEndMostColumnIndex(e,t){const o=u(d,this,f).call(this,e,"col",1);let s=t;for(let e=0;e<o.length;e++)if(o[e]>=t){s=o[e];break}return s}getTopMostRowIndex(e,t){const o=u(d,this,f).call(this,e,"row",-1);let s=t;for(let e=0;e<o.length;e++)if(o[e]<=t){s=o[e];break}return s}getBottomMostRowIndex(e,t){const o=u(d,this,f).call(this,e,"row",1);let s=t;for(let e=0;e<o.length;e++)if(o[e]>=t){s=o[e];break}return s}shiftCollections(e,t,o){const s=[0,0];switch(e){case"right":s[0]+=o;break;case"left":s[0]-=o;break;case"down":s[1]+=o;break;case"up":s[1]-=o}const n=[];this.mergedCells.forEach((e=>{e.shift(s,t),e.removed&&n.push(e)})),n.forEach((e=>{this.mergedCells.splice(this.mergedCells.indexOf(e),1)})),this.mergedCellsMatrix.clear(),this.mergedCells.forEach((e=>{u(d,this,p).call(this,e)}))}}function f(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const s=new Map,n=1===o?e.getTopStartCorner():e.getBottomEndCorner(),i=1===o?e.getBottomEndCorner():e.getTopStartCorner();for(let e=n.row;1===o?e<=i.row:e>=i.row;e+=o)for(let r=n.col;1===o?r<=i.col:r>=i.col;r+=o){const n="row"===t?e:r,i=this.get(e,r);let l=n;i&&(l=1===o?i[t]+i[`${t}span`]-1:i[t]),s.has(n)||s.set(n,new Set),s.get(n).add(l)}return Array.from(new Set(Array.from(s.entries()).filter((e=>{let[,t]=e;return 1===t.size})).flatMap((e=>{let[,t]=e;return Array.from(t)}))))}function p(e){for(let t=e.row;t<e.row+e.rowspan;t++)for(let o=e.col;o<e.col+e.colspan;o++)this.mergedCellsMatrix.has(t)||this.mergedCellsMatrix.set(t,new Map),this.mergedCellsMatrix.get(t).set(o,e)}function m(e){for(let t=e.row;t<e.row+e.rowspan;t++)for(let o=e.col;o<e.col+e.colspan;o++)this.mergedCellsMatrix.get(t).delete(o)}t.default=g},4213:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.default=function(e){return{key:"mergeCells",name(){const t=this.getSelectedLast();if(t){const o=e.mergedCellsCollection.get(t[0],t[1]);if(o.row===t[0]&&o.col===t[1]&&o.row+o.rowspan-1===t[2]&&o.col+o.colspan-1===t[3])return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_UNMERGE_CELLS)}return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_MERGE_CELLS)},callback(){const t=this.getSelectedRangeLast();if(!t)return;t.setDirection(this.isRtl()?"NE-SW":"NW-SE");const{from:o,to:s}=t;e.toggleMerge(t),this.selectCell(o.row,o.col,s.row,s.col,!1)},disabled(){const e=this.getSelectedLast();if(!e)return!0;return i.default.isSingleCell({row:e[0],col:e[1],rowspan:e[2]-e[0]+1,colspan:e[3]-e[1]+1})||this.selection.isSelectedByCorner()},hidden:!1}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),i=s(o(89443));function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}},45689:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(76892));function i(e,t,o){r(e,t),t.set(e,o)}function r(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function l(e,t){return e.get(h(e,t))}function a(e,t,o){return e.set(h(e,t),o),o}function h(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var c=new WeakMap,u=new WeakMap,d=new WeakMap,g=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,w=new WeakSet;function C(e,t,o,s,n){const i=e.getTopStartCorner(),r=e.getBottomEndCorner(),a=e.highlight.clone().normalize(),h=l(f,this).call(this,s,n);if(h&&o.has(h))return null;const c={colStart:n,colEnd:n,rowStart:s,rowEnd:s};if(h){if(o.add(h),h.row<i.row||h.row+h.rowspan-1>r.row||h.col<i.col||h.col+h.colspan-1>r.col)return null;c.colStart=h.col,c.colEnd=h.col+h.colspan-1,c.rowStart=h.row,c.rowEnd=h.row+h.rowspan-1}const u=t.push(c);return s===a.row&&n===a.col||h&&a.row>=h.row&&a.row<=h.row+h.rowspan-1&&a.col>=h.col&&a.col<=h.col+h.colspan-1?u:null}t.FocusOrder=class{constructor(e){let{mergedCellsGetter:t,rowIndexMapper:o,columnIndexMapper:s}=e;var l,h;r(l=this,h=w),h.add(l),i(this,c,new n.default),i(this,u,new n.default),i(this,d,null),i(this,g,null),i(this,f,null),i(this,p,null),i(this,m,null),a(f,this,t),a(p,this,o),a(m,this,s)}getCurrentVerticalNode(){return l(g,this).data}getFirstVerticalNode(){return l(u,this).first.data}getNextVerticalNode(){return l(g,this).next.data}getPrevVerticalNode(){return l(g,this).prev.data}getCurrentHorizontalNode(){return l(d,this).data}getFirstHorizontalNode(){return l(c,this).first.data}getNextHorizontalNode(){return l(d,this).next.data}getPrevHorizontalNode(){return l(d,this).prev.data}setPrevNodeAsActive(){a(g,this,l(g,this).prev),a(d,this,l(d,this).prev)}setNextNodeAsActive(){a(g,this,l(g,this).next),a(d,this,l(d,this).next)}buildFocusOrder(e){const t=e.getTopStartCorner(),o=e.getBottomEndCorner(),s=new WeakSet;a(c,this,new n.default);for(let n=t.row;n<=o.row;n++)if(!l(p,this).isHidden(n))for(let i=t.col;i<=o.col;i++){if(l(m,this).isHidden(i))continue;const t=h(w,this,C).call(this,e,l(c,this),s,n,i);t&&a(d,this,t)}l(c,this).first&&(l(c,this).first.prev=l(c,this).last,l(c,this).last.next=l(c,this).first);const i=new WeakSet;a(u,this,new n.default);for(let s=t.col;s<=o.col;s++)if(!l(m,this).isHidden(s))for(let n=t.row;n<=o.row;n++){if(l(p,this).isHidden(n))continue;const t=h(w,this,C).call(this,e,l(u,this),i,n,s);t&&a(g,this,t)}l(u,this).first&&(l(u,this).first.prev=l(u,this).last,l(u,this).last.next=l(u,this).first)}setActiveNode(e,t){return l(c,this).inorder((o=>{const{rowStart:s,rowEnd:n,colStart:i,colEnd:r}=o.data;if(e>=s&&e<=n&&t>=i&&t<=r)return a(d,this,o),!1})),l(u,this).inorder((o=>{const{rowStart:s,rowEnd:n,colStart:i,colEnd:r}=o.data;if(e>=s&&e<=n&&t>=i&&t<=r)return a(g,this,o),!1})),this}}},12897:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(29224);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.MergeCells=s.MergeCells},29224:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724),o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var n=s(o(85707)),i=o(61205),r=s(o(56937)),l=s(o(89144)),a=s(o(89443)),h=s(o(54932)),c=s(o(85354)),u=s(o(4213)),d=o(9175),g=o(13911),f=o(83119),p=o(87485);o(40248);var m=o(9893),w=o(28890),C=o(45689),v=o(97666);function y(e,t,o){E(e,t),t.set(e,o)}function E(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function S(e,t,o){return e.set(b(e,t),o),o}function R(e,t){return e.get(b(e,t))}function b(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}r.default.getSingleton().register("beforeMergeCells"),r.default.getSingleton().register("afterMergeCells"),r.default.getSingleton().register("beforeUnmergeCells"),r.default.getSingleton().register("afterUnmergeCells");const _=t.PLUGIN_KEY="mergeCells",T=t.PLUGIN_PRIORITY=150,M=_;var O=new WeakMap,I=new WeakMap,N=new WeakMap,A=new WeakMap,P=new WeakSet;class x extends i.BasePlugin{constructor(){var e,t;super(...arguments),E(e=this,t=P),t.add(e),(0,n.default)(this,"mergedCellsCollection",null),(0,n.default)(this,"autofillCalculations",null),(0,n.default)(this,"selectionCalculations",null),y(this,O,null),y(this,I,{row:0,col:0}),y(this,N,new C.FocusOrder({mergedCellsGetter:(e,t)=>this.mergedCellsCollection.get(e,t),rowIndexMapper:this.hot.rowIndexMapper,columnIndexMapper:this.hot.columnIndexMapper})),y(this,A,(0,v.createMergeCellRenderer)(this))}static get PLUGIN_KEY(){return _}static get PLUGIN_PRIORITY(){return T}isEnabled(){return!!this.hot.getSettings()[_]}enablePlugin(){var e=this;this.enabled||(this.mergedCellsCollection=new l.default(this),this.autofillCalculations=new h.default(this),this.selectionCalculations=new c.default(this),this.addHook("afterInit",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,H).call(e,...o)})),this.addHook("modifyTransformFocus",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,k).call(e,...o)})),this.addHook("modifyTransformStart",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,L).call(e,...o)})),this.addHook("modifyTransformEnd",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,V).call(e,...o)})),this.addHook("beforeSelectionHighlightSet",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,F).call(e,...o)})),this.addHook("beforeSetRangeStart",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,U).call(e,...o)})),this.addHook("beforeSetRangeStartOnly",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,U).call(e,...o)})),this.addHook("beforeSelectionFocusSet",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,j).call(e,...o)})),this.addHook("afterSelectionFocusSet",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,Y).call(e,...o)})),this.addHook("afterSelectionEnd",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,z).call(e,...o)})),this.addHook("modifyGetCellCoords",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,W).call(e,...o)})),this.addHook("afterIsMultipleSelection",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,D).call(e,...o)})),this.addHook("afterRenderer",(function(){return R(A,e).after(...arguments)})),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,B).call(e,...o)})),this.addHook("afterGetCellMeta",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,G).call(e,...o)})),this.addHook("afterViewportRowCalculatorOverride",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,$).call(e,...o)})),this.addHook("afterViewportColumnCalculatorOverride",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,K).call(e,...o)})),this.addHook("modifyAutofillRange",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,X).call(e,...o)})),this.addHook("afterCreateCol",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,q).call(e,...o)})),this.addHook("afterRemoveCol",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,Q).call(e,...o)})),this.addHook("afterCreateRow",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,J).call(e,...o)})),this.addHook("afterRemoveRow",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,Z).call(e,...o)})),this.addHook("afterChange",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,ee).call(e,...o)})),this.addHook("beforeDrawBorders",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,te).call(e,...o)})),this.addHook("afterDrawSelection",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,oe).call(e,...o)})),this.addHook("beforeRemoveCellClassNames",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,se).call(e,...o)})),this.addHook("beforeBeginEditing",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,ne).call(e,...o)})),this.addHook("modifyRowHeightByOverlayName",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return b(P,e,ie).call(e,...o)})),this.addHook("beforeUndoStackChange",((e,t)=>{if("MergeCells"===t)return!1})),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){this.clearCollections(),this.unregisterShortcuts(),this.hot.render(),super.disablePlugin()}updatePlugin(){const e=this.hot.getSettings()[_];this.disablePlugin(),this.enablePlugin(),this.generateFromSettings(e),super.updatePlugin()}ifChromeForceRepaint(){if(!(0,w.isChrome)())return;const e=[];let t=[];this.mergedCellsCollection.mergedCells.forEach((e=>{const{row:o,rowspan:s}=e;for(let e=o+1;e<o+s;e++)t.push(e)})),t=[...new Set(t)],t.forEach((t=>{const o=this.hot.rowIndexMapper.getRenderableFromVisualIndex(t);this.hot.view._wt.wtOverlays.getOverlays(!0).map((e=>"master"===(null==e?void 0:e.name)?e:e.clone.wtTable)).forEach((t=>{const s=t.getRow(o);s&&(s.style.background=(0,m.getStyle)(s,"backgroundColor").replace(")",", 0.99)"),e.push(s))}))})),this.hot._registerTimeout((()=>{e.forEach((e=>{e.style.background=(0,m.getStyle)(e,"backgroundColor").replace(", 0.99)",")")}))}),1)}validateSetting(e){return!!e&&(a.default.containsNegativeValues(e)?((0,f.warn)(a.default.NEGATIVE_VALUES_WARNING(e)),!1):a.default.isOutOfBounds(e,this.hot.countRows(),this.hot.countCols())?((0,f.warn)(a.default.IS_OUT_OF_BOUNDS_WARNING(e)),!1):a.default.isSingleCell(e)?((0,f.warn)(a.default.IS_SINGLE_CELL(e)),!1):!a.default.containsZeroSpan(e)||((0,f.warn)(a.default.ZERO_SPAN_WARNING(e)),!1))}generateFromSettings(e){if(!Array.isArray(e))return;const t=e.filter((e=>this.validateSetting(e))),o=this.mergedCellsCollection.filterOverlappingMergeCells(t),s=[];o.forEach((e=>{const{row:t,col:o,rowspan:n,colspan:i}=e,r=this.hot._createCellCoords(t,o),l=this.hot._createCellCoords(t+n-1,o+i-1),a=this.hot._createCellRange(r,r,l);this.mergeRange(a,!0,!0);for(let e=t;e<t+n;e++)for(let n=o;n<o+i;n++)e===t&&n===o||s.push([e,n,null])})),0!==s.length&&this.hot.setDataAtCell(s,void 0,void 0,this.pluginName)}clearCollections(){this.mergedCellsCollection.clear()}canMergeRange(e){return!!(arguments.length>1&&void 0!==arguments[1]&&arguments[1])||this.validateSetting(e)}mergeSelection(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hot.getSelectedRangeLast();if(!e)return;e.setDirection(this.hot.isRtl()?"NE-SW":"NW-SE");const{from:t,to:o}=e;this.unmergeRange(e,!0),this.mergeRange(e),this.hot.selectCell(t.row,t.col,o.row,o.col,!1)}unmergeSelection(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hot.getSelectedRangeLast();if(!e)return;const{from:t,to:o}=e;this.unmergeRange(e,!0),this.hot.selectCell(t.row,t.col,o.row,o.col,!1)}mergeRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=e.getTopStartCorner(),n=e.getBottomEndCorner(),i={row:s.row,col:s.col,rowspan:n.row-s.row+1,colspan:n.col-s.col+1},r=[];let l=null;if(!this.canMergeRange(i,t))return!1;this.hot.runHooks("beforeMergeCells",e,t),(0,p.rangeEach)(0,i.rowspan-1,(e=>{(0,p.rangeEach)(0,i.colspan-1,(t=>{let o=null;r[e]||(r[e]=[]),0===e&&0===t?o=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(i.row),this.hot.toPhysicalColumn(i.col)):this.hot.setCellMeta(i.row+e,i.col+t,"hidden",!0),r[e][t]=o}))})),this.hot.setCellMeta(i.row,i.col,"spanned",!0);return!this.mergedCellsCollection.add(i,t)||(o?l=[i.row,i.col,r]:this.hot.populateFromArray(i.row,i.col,r,void 0,void 0,this.pluginName),t||this.ifChromeForceRepaint(),this.hot.runHooks("afterMergeCells",e,i,t),l)}unmergeRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=this.mergedCellsCollection.getWithinRange(e);0!==o.length&&(this.hot.runHooks("beforeUnmergeCells",e,t),(0,d.arrayEach)(o,(e=>{this.mergedCellsCollection.remove(e.row,e.col),(0,p.rangeEach)(0,e.rowspan-1,(t=>{(0,p.rangeEach)(0,e.colspan-1,(o=>{this.hot.removeCellMeta(e.row+t,e.col+o,"hidden"),this.hot.removeCellMeta(e.row+t,e.col+o,"copyable")}))})),this.hot.removeCellMeta(e.row,e.col,"spanned")})),this.hot.runHooks("afterUnmergeCells",e,t),this.hot.render())}toggleMerge(e){const t=this.mergedCellsCollection.get(e.from.row,e.from.col);t.row===e.from.row&&t.col===e.from.col&&t.row+t.rowspan-1===e.to.row&&t.col+t.colspan-1===e.to.col?this.unmergeRange(e):this.mergeSelection(e)}merge(e,t,o,s){const n=this.hot._createCellCoords(e,t),i=this.hot._createCellCoords(o,s);this.mergeRange(this.hot._createCellRange(n,n,i))}unmerge(e,t,o,s){const n=this.hot._createCellCoords(e,t),i=this.hot._createCellCoords(o,s);this.unmergeRange(this.hot._createCellRange(n,n,i))}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Control","m"]],callback:()=>{const e=this.hot.getSelectedRangeLast();e&&!e.isSingleHeader()&&(this.toggleMerge(e),this.hot.render())},runOnlyIf:e=>!e.altKey,group:M})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(M)}modifyViewportRowStart(e,t){const o=this.hot.rowIndexMapper,s=o.getVisualFromRenderableIndex(e.startRow);for(let n=0;n<t;n+=1){const i=this.mergedCellsCollection.get(s,n);if((0,g.isObject)(i)){const s=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(i.row,1));if(s<e.startRow)return e.startRow=s,void this.modifyViewportRowStart(e,t)}}}modifyViewportRowEnd(e,t){const o=this.hot.rowIndexMapper,s=o.getVisualFromRenderableIndex(e.endRow);for(let n=0;n<t;n+=1){const i=this.mergedCellsCollection.get(s,n);if((0,g.isObject)(i)){const s=i.row+i.rowspan-1,n=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(s,-1));if(n>e.endRow)return e.endRow=n,void this.modifyViewportRowEnd(e,t)}}}modifyViewportColumnStart(e,t){const o=this.hot.columnIndexMapper,s=o.getVisualFromRenderableIndex(e.startColumn);for(let n=0;n<t;n+=1){const i=this.mergedCellsCollection.get(n,s);if((0,g.isObject)(i)){const s=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(i.col,1));if(s<e.startColumn)return e.startColumn=s,void this.modifyViewportColumnStart(e,t)}}}modifyViewportColumnEnd(e,t){const o=this.hot.columnIndexMapper,s=o.getVisualFromRenderableIndex(e.endColumn);for(let n=0;n<t;n+=1){const i=this.mergedCellsCollection.get(n,s);if((0,g.isObject)(i)){const s=i.col+i.colspan-1,n=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(s,-1));if(n>e.endColumn)return e.endColumn=n,void this.modifyViewportColumnEnd(e,t)}}}translateMergedCellToRenderable(e,t,o,s){const{rowIndexMapper:n,columnIndexMapper:i}=this.hot;let r,l;r=0===t?n.getNearestNotHiddenIndex(e,1):n.getNearestNotHiddenIndex(e+t-1,-1),l=0===s?i.getNearestNotHiddenIndex(o,1):i.getNearestNotHiddenIndex(o+s-1,-1);return[e>=0?n.getRenderableFromVisualIndex(r):e,o>=0?i.getRenderableFromVisualIndex(l):o]}}function H(){this.generateFromSettings(this.hot.getSettings()[_]),this.hot.render()}function D(e){if(e){const e=this.mergedCellsCollection.mergedCells,t=this.hot.getSelectedRangeLast(),o=t.getTopStartCorner(),s=t.getBottomEndCorner();for(let t=0;t<e.length;t+=1)if(o.row===e[t].row&&o.col===e[t].col&&s.row===e[t].row+e[t].rowspan-1&&s.col===e[t].col+e[t].colspan-1)return!1}return e}function k(e){R(I,this).row=e.row,R(I,this).col=e.col}function L(e){const t=this.hot.getSelectedRangeLast(),{highlight:o}=t,{columnIndexMapper:s,rowIndexMapper:n}=this.hot;R(O,this)&&(null!==n.getRenderableFromVisualIndex(R(O,this).row)&&(o.row=R(O,this).row),null!==s.getRenderableFromVisualIndex(R(O,this).col)&&(o.col=R(O,this).col),S(O,this,null));const i=this.mergedCellsCollection.get(o.row,o.col);if(!i)return;const r=i.col,l=i.col+i.colspan-1;if(e.col<0){const t=o.col>=r&&o.col<=l?r-1:l,n=s.getNearestNotHiddenIndex(t,-1);e.col=null===n?-this.hot.view.countRenderableColumnsInRange(0,o.col):-Math.max(this.hot.view.countRenderableColumnsInRange(n,o.col)-1,1)}else if(e.col>0){const t=o.col>=r&&o.col<=l?l+1:r,n=s.getNearestNotHiddenIndex(t,1);e.col=null===n?this.hot.view.countRenderableColumnsInRange(o.col,this.hot.countCols()):Math.max(this.hot.view.countRenderableColumnsInRange(o.col,n)-1,1)}const a=i.row,h=i.row+i.rowspan-1;if(e.row<0){const t=o.row>=a&&o.row<=h?a-1:h,s=n.getNearestNotHiddenIndex(t,-1);e.row=null===s?-this.hot.view.countRenderableRowsInRange(0,o.row):-Math.max(this.hot.view.countRenderableRowsInRange(s,o.row)-1,1)}else if(e.row>0){const t=o.row>=a&&o.row<=h?h+1:a,s=n.getNearestNotHiddenIndex(t,1);e.row=null===s?this.hot.view.countRenderableRowsInRange(o.row,this.hot.countRows()):Math.max(this.hot.view.countRenderableRowsInRange(o.row,s)-1,1)}}function V(e){const t=this.hot.getSelectedRangeLast(),o=t.clone(),{to:s}=t,{columnIndexMapper:n,rowIndexMapper:i}=this.hot,r=(e,t)=>{o.expand(this.hot._createCellCoords(e,t));for(let e=0;e<this.mergedCellsCollection.mergedCells.length;e+=1)o.expandByRange(this.mergedCellsCollection.mergedCells[e].getRange())};if(e.col<0){let i=this.mergedCellsCollection.getStartMostColumnIndex(t,s.col)+e.col;r(s.row,i),"E-W"===t.getHorizontalDirection()&&"E-W"===o.getHorizontalDirection()&&(i=o.getTopStartCorner().col);const l=n.getNearestNotHiddenIndex(i,1);null!==l&&(e.col=-Math.max(this.hot.view.countRenderableColumnsInRange(l,s.col)-1,1))}else if(e.col>0){let i=this.mergedCellsCollection.getEndMostColumnIndex(t,s.col)+e.col;r(s.row,i),"W-E"===t.getHorizontalDirection()&&"W-E"===o.getHorizontalDirection()&&(i=o.getBottomEndCorner().col);const l=n.getNearestNotHiddenIndex(i,-1);null!==l&&(e.col=Math.max(this.hot.view.countRenderableColumnsInRange(s.col,l)-1,1))}if(e.row<0){let n=this.mergedCellsCollection.getTopMostRowIndex(t,s.row)+e.row;r(n,s.col),"S-N"===t.getVerticalDirection()&&"S-N"===o.getVerticalDirection()&&(n=o.getTopStartCorner().row);const l=i.getNearestNotHiddenIndex(n,1);null!==l&&(e.row=-Math.max(this.hot.view.countRenderableRowsInRange(l,s.row)-1,1))}else if(e.row>0){let n=this.mergedCellsCollection.getBottomMostRowIndex(t,s.row)+e.row;r(n,s.col),"N-S"===t.getVerticalDirection()&&"N-S"===o.getVerticalDirection()&&(n=o.getBottomStartCorner().row);const l=i.getNearestNotHiddenIndex(n,-1);null!==l&&(e.row=Math.max(this.hot.view.countRenderableRowsInRange(s.row,l)-1,1))}}function F(){const e=this.hot.getSelectedRangeLast(),{highlight:t}=e;if(this.hot.selection.isSelectedByColumnHeader()||this.hot.selection.isSelectedByRowHeader())return void S(O,this,t.clone());for(let t=0;t<this.mergedCellsCollection.mergedCells.length;t+=1)e.expandByRange(this.mergedCellsCollection.mergedCells[t].getRange(),!1);for(let t=0;t<this.mergedCellsCollection.mergedCells.length;t+=1)e.expandByRange(this.mergedCellsCollection.mergedCells[t].getRange(),!1);const o=this.mergedCellsCollection.get(t.row,t.col);S(O,this,t.clone()),o&&t.assign(o)}function W(e,t){if(e<0||t<0)return;const o=this.mergedCellsCollection.get(e,t);if(!o)return;const{row:s,col:n,colspan:i,rowspan:r}=o;return[s,n,s+r-1,n+i-1]}function B(e){e.items.push({name:"---------"},(0,u.default)(this))}function U(){S(O,this,null)}function j(){if(R(O,this).isCell())return;const e=this.hot.getSelectedRangeLast(),t=e.getVerticalDirection(),o=e.getHorizontalDirection(),s=R(O,this).clone().normalize();R(N,this).setActiveNode(s.row,s.col),R(I,this).row>0||R(I,this).col>0?R(N,this).setPrevNodeAsActive():("E-W"===o&&R(I,this).col<0||"S-N"===t&&R(I,this).row<0)&&R(N,this).setNextNodeAsActive()}function Y(e,t){const o=this.hot.getSelectedRangeLast(),{columnIndexMapper:s,rowIndexMapper:n}=this.hot;let i=null,r=null;if(R(I,this).col<0){const{rowEnd:e,colEnd:t}=R(N,this).getPrevHorizontalNode();r=s.getNearestNotHiddenIndex(t,-1),i=n.getNearestNotHiddenIndex(e,-1)}else if(R(I,this).col>0){const{rowStart:e,colStart:t}=R(N,this).getNextHorizontalNode();r=s.getNearestNotHiddenIndex(t,1),i=n.getNearestNotHiddenIndex(e,1)}else if(R(I,this).row<0){const{rowEnd:e,colEnd:t}=R(N,this).getPrevVerticalNode();r=s.getNearestNotHiddenIndex(t,-1),i=n.getNearestNotHiddenIndex(e,-1)}else if(R(I,this).row>0){const{rowStart:e,colStart:t}=R(N,this).getNextVerticalNode();r=s.getNearestNotHiddenIndex(t,1),i=n.getNearestNotHiddenIndex(e,1)}if(null!==i||null!==r){const s=this.hot._createCellCoords(i,r),n=this.mergedCellsCollection.get(s.row,s.col),l=this.hot.selection.highlight.getFocus();e=s.row,t=s.col,n?o.highlight.assign({row:this.hot.rowIndexMapper.getNearestNotHiddenIndex(n.row,1),col:this.hot.columnIndexMapper.getNearestNotHiddenIndex(n.col,1)}):o.highlight.assign(s),l.clear(),l.add(s).commit()}R(N,this).setActiveNode(e,t),S(I,this,{row:0,col:0})}function z(){this.hot.getSelectedRangeLast().isHeader()||R(N,this).buildFocusOrder(this.hot.getSelectedRangeLast())}function G(e,t,o){const s=this.mergedCellsCollection.get(e,t);s&&(s.row!==e||s.col!==t?o.copyable=!1:(o.rowspan=s.rowspan,o.colspan=s.colspan))}function $(e){const t=this.hot.countCols();this.modifyViewportRowStart(e,t),this.modifyViewportRowEnd(e,t)}function K(e){const t=this.hot.countRows();this.modifyViewportColumnStart(e,t),this.modifyViewportColumnEnd(e,t)}function X(e,t){this.autofillCalculations.correctSelectionAreaSize(t);const o=this.autofillCalculations.getDirection(t,e);let s=e;if(this.autofillCalculations.dragAreaOverlapsCollections(t,s,o))return s=t,s;const n=this.hot._createCellCoords(t[0],t[1]),i=this.hot._createCellCoords(t[2],t[3]),r=this.hot._createCellRange(n,n,i),l=this.mergedCellsCollection.getWithinRange(r);return 0===l.length||(s=this.autofillCalculations.snapDragArea(t,s,o,l)),s}function q(e,t){this.mergedCellsCollection.shiftCollections("right",e,t)}function Q(e,t){this.mergedCellsCollection.shiftCollections("left",e,t)}function J(e,t,o){"auto"!==o&&this.mergedCellsCollection.shiftCollections("down",e,t)}function Z(e,t){this.mergedCellsCollection.shiftCollections("up",e,t)}function ee(e,t){"Autofill.fill"===t&&this.autofillCalculations.recreateAfterDataPopulation(e)}function te(e,t){if(t&&"area"===t){const t=this.hot.getSelectedRangeLast(),o=this.mergedCellsCollection.getWithinRange(t);(0,d.arrayEach)(o,(o=>{t.getBottomEndCorner().row===o.getLastRow()&&t.getBottomEndCorner().col===o.getLastColumn()&&(e[2]=o.row,e[3]=o.col)}))}}function oe(e,t,o,s){if(o)return this.selectionCalculations.getSelectedMergedCellClassName(e,t,o,s)}function se(){return this.selectionCalculations.getSelectedMergedCellClassNameToRemove()}function ne(e,t,o,s){if(!(s instanceof MouseEvent))return;const n=this.hot.getSelectedRangeLast(),i=this.mergedCellsCollection.getByRange(n);if(!i)return;const r=this.hot._createCellCoords(i.row,i.col),l=this.hot._createCellCoords(i.row+i.rowspan-1,i.col+i.colspan-1);return 0===this.hot.selection.getLayerLevel()&&n.isEqual(this.hot._createCellRange(r,r,l))}function ie(e,t,o){if(this.hot.getSettings().rowHeaders||"bottom"===o||"bottom_inline_start_corner"===o)return e;let s,n;if("master"===o)s=this.hot.view.getFirstRenderedVisibleColumn(),n=this.hot.view.getLastRenderedVisibleColumn();else{const e=this.hot.view.getOverlayByName(o);s=this.hot.columnIndexMapper.getVisualFromRenderableIndex(e.clone.wtTable.getFirstRenderedColumn()),n=this.hot.columnIndexMapper.getVisualFromRenderableIndex(e.clone.wtTable.getLastRenderedColumn())}if(!this.mergedCellsCollection.get(t,s))return e;const i=this.hot._createCellCoords(t,s),r=this.hot._createCellCoords(t,n),l=this.hot._createCellRange(i,i,r),a=this.mergedCellsCollection.getWithinRange(l),h=a.reduce(((e,t)=>{let{rowspan:o}=t;return Math.max(e,o)}),1);let c=0;return a.length>1&&a[0].rowspan<h&&(c=h-a[0].rowspan),a.forEach((s=>{var n;let{rowspan:i}=s,r=0;r="top"===o||"top_inline_start_corner"===o?Math.min(h,this.hot.view.countNotHiddenFixedRowsTop()-t):i-c,e=Math.max(null!==(n=e)&&void 0!==n?n:0,b(P,this,re).call(this,t,r))})),e}function re(e,t){const o=this.hot.view._wt.wtSettings.getSettingPure("defaultRowHeight"),s=this.hot.getPlugin("autoRowSize");let n=0;for(let r=e;r<e+t;r++){var i;if(!this.hot.rowIndexMapper.isHidden(r))n+=null!==(i=null==s?void 0:s.getRowHeight(r))&&void 0!==i?i:o}return n}t.MergeCells=x},97666:(e,t,o)=>{"use strict";t.__esModule=!0,t.createMergeCellRenderer=function(e){const{hot:t}=e,{rowIndexMapper:o,columnIndexMapper:n}=t;return{before:function(){},after:function(t,i,r){const l=e.mergedCellsCollection.get(i,r);if(!(0,s.isObject)(l))return t.removeAttribute("rowspan"),t.removeAttribute("colspan"),void(t.style.display="");const{row:a,col:h,colspan:c,rowspan:u}=l,[d,g]=e.translateMergedCellToRenderable(a,u,h,c),f=d-o.getRenderableFromVisualIndex(i)+1,p=g-n.getRenderableFromVisualIndex(r)+1,m=o.getNearestNotHiddenIndex(a,1),w=n.getNearestNotHiddenIndex(h,1),C=Math.min(u,f),v=Math.min(c,p);m===i&&w===r?(t.setAttribute("rowspan",C),t.setAttribute("colspan",v)):(t.removeAttribute("rowspan"),t.removeAttribute("colspan"),t.style.display="none")}}};var s=o(13911)},13936:(e,t,o)=>{"use strict";t.__esModule=!0,t.getClassesToAdd=function(e,t,o){const n=[];if(!1===o)return n;e.isColumnSorted(t)&&e.getNumberOfSortedColumns()>1&&n.push(`${s}-${e.getIndexOfColumnInSortQueue(t)+1}`);return n},t.getClassesToRemove=function(e){const t=e.className.split(" "),o=new RegExp(`^${s}-[0-9]{1,2}$`);return t.filter((e=>o.test(e)))},o(15724);const s="sort"},80657:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(55016);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.MultiColumnSorting=s.MultiColumnSorting},55016:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707)),i=o(16050),r=o(7426),l=o(78131),a=o(9893),h=o(11945),c=o(66172),u=o(13936),d=o(37947);o(34115);const g=t.PLUGIN_KEY="multiColumnSorting",f=t.PLUGIN_PRIORITY=170,p="columnSorting",m=g;(0,r.registerRootComparator)(g,h.rootComparator);class w extends i.ColumnSorting{constructor(){super(...arguments),(0,n.default)(this,"pluginKey",g)}static get PLUGIN_KEY(){return g}static get PLUGIN_PRIORITY(){return f}isEnabled(){return super.isEnabled()}enablePlugin(){!this.enabled&&this.hot.getSettings()[this.pluginKey]&&this.hot.getSettings()[p]&&((0,c.warnAboutPluginsConflict)(),this.hot.getPlugin(p).disablePlugin()),super.enablePlugin()}disablePlugin(){super.disablePlugin()}registerShortcuts(){super.registerShortcuts(),this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Shift","Enter"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();return-1===e.row&&e.col>=0&&this.sort(this.getNextSortConfig(e.col,i.APPEND_COLUMN_CONFIG_STRATEGY)),!1},runOnlyIf:()=>{var e,t;const o=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return o&&(null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.isSingle())&&this.hot.selection.isCellVisible(o)&&o.isHeader()},relativeToGroup:d.EDITOR_EDIT_GROUP,position:"before",group:m})}unregisterShortcuts(){super.unregisterShortcuts(),this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(m)}sort(e){super.sort(e)}clearSort(){super.clearSort()}isSorted(){return super.isSorted()}getSortConfig(e){return super.getSortConfig(e)}setSortConfig(e){super.setSortConfig(e)}getNormalizedSortConfigs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(e)?e:[e]}updateHeaderClasses(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];super.updateHeaderClasses(e,...o),(0,a.removeClass)(e,(0,u.getClassesToRemove)(e)),!1!==this.enabled&&(0,a.addClass)(e,(0,u.getClassesToAdd)(...o))}onUpdateSettings(e){this.hot.getSettings()[this.pluginKey]&&this.hot.getSettings()[p]&&(0,c.warnAboutPluginsConflict)(),super.onUpdateSettings(e)}onAfterOnCellMouseDown(e,t){!1!==(0,l.wasHeaderClickedProperly)(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)&&(this.hot.getShortcutManager().isCtrlPressed()?(this.hot.deselectCell(),this.hot.selectColumns(t.col),this.sort(this.getNextSortConfig(t.col,i.APPEND_COLUMN_CONFIG_STRATEGY))):this.sort(this.getColumnNextConfig(t.col)))}}t.MultiColumnSorting=w},11945:(e,t,o)=>{"use strict";t.__esModule=!0,t.rootComparator=function(e,t){return function(o,n){const[,...i]=o,[,...r]=n;return function o(n){const l=e[n],a=t[n],h=i[n],c=r[n],u=a.multiColumnSorting,d=(u.compareFunctionFactory?u.compareFunctionFactory:(0,s.getCompareFunctionFactory)(a.type))(l,a,u)(h,c);if(d===s.DO_NOT_SWAP){const e=n+1;if(void 0!==t[e])return o(e)}return d}(0)}};var s=o(7426)},66172:(e,t,o)=>{"use strict";t.__esModule=!0,t.warnAboutPluginsConflict=function(){(0,s.warn)(n.toSingleLine`Plugins \`columnSorting\` and \`multiColumnSorting\` should not be enabled simultaneously.
82
82
  Only \`multiColumnSorting\` will work. The \`columnSorting\` plugin will be disabled.`)};var s=o(83119),n=o(28927)},37917:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(1632);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.MultipleSelectionHandles=s.MultipleSelectionHandles},1632:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(15724);var n=s(o(85707)),i=o(9893),r=o(28890),l=o(61205);const a=t.PLUGIN_KEY="multipleSelectionHandles",h=t.PLUGIN_PRIORITY=160;class c extends l.BasePlugin{constructor(){super(...arguments),(0,n.default)(this,"dragged",[]),(0,n.default)(this,"lastSetCell",null)}static get PLUGIN_KEY(){return a}static get PLUGIN_PRIORITY(){return h}isEnabled(){return(0,r.isMobileBrowser)()}enablePlugin(){this.enabled||(this.registerListeners(),super.enablePlugin())}registerListeners(){const e=this,{rootElement:t}=this.hot;function o(t){if(1===e.dragged.length)return e.dragged.splice(0,e.dragged.length),!0;const o=e.dragged.indexOf(t);if(-1===o)return!1;0===o?e.dragged=e.dragged.slice(0,1):1===o&&(e.dragged=e.dragged.slice(-1))}this.eventManager.addEventListener(t,"touchstart",(t=>{let o;return(0,i.hasClass)(t.target,"topSelectionHandle-HitArea")?(o=e.hot.getSelectedRangeLast(),e.dragged.push("top"),e.touchStartRange={width:o.getWidth(),height:o.getHeight(),direction:o.getDirection()},t.preventDefault(),!1):(0,i.hasClass)(t.target,"bottomSelectionHandle-HitArea")?(o=e.hot.getSelectedRangeLast(),e.dragged.push("bottom"),e.touchStartRange={width:o.getWidth(),height:o.getHeight(),direction:o.getDirection()},t.preventDefault(),!1):void 0})),this.eventManager.addEventListener(t,"touchend",(t=>(0,i.hasClass)(t.target,"topSelectionHandle-HitArea")?(o.call(e,"top"),e.touchStartRange=void 0,t.preventDefault(),!1):(0,i.hasClass)(t.target,"bottomSelectionHandle-HitArea")?(o.call(e,"bottom"),e.touchStartRange=void 0,t.preventDefault(),!1):void 0)),this.eventManager.addEventListener(t,"touchmove",(t=>{const{rootDocument:o}=this.hot;let s,n,i,r,l,a;if(0===e.dragged.length)return;const h=o.elementFromPoint(t.touches[0].clientX,t.touches[0].clientY);h&&h!==e.lastSetCell&&("TD"!==h.nodeName&&"TH"!==h.nodeName||(s=e.hot.getCoords(h),-1===s.col&&(s.col=0),n=e.hot.getSelectedRangeLast(),i=n.getWidth(),r=n.getHeight(),l=n.getDirection(),1===i&&1===r&&e.hot.selection.setRangeEnd(s),a=e.getCurrentRangeCoords(n,s,e.touchStartRange.direction,l,e.dragged[0]),null!==a.start&&e.hot.selection.setRangeStart(a.start),e.hot.selection.setRangeEnd(a.end),e.lastSetCell=h),t.preventDefault())}))}getCurrentRangeCoords(e,t,o,s,n){const i=e.getTopStartCorner(),r=e.getBottomEndCorner(),l=e.getBottomStartCorner(),a=e.getTopEndCorner();let h={start:null,end:null};switch(o){case"NE-SW":switch(s){case"NE-SW":case"NW-SE":h="top"===n?{start:this.hot._createCellCoords(t.row,e.highlight.col),end:this.hot._createCellCoords(l.row,t.col)}:{start:this.hot._createCellCoords(e.highlight.row,t.col),end:this.hot._createCellCoords(t.row,i.col)};break;case"SE-NW":"bottom"===n&&(h={start:this.hot._createCellCoords(r.row,t.col),end:this.hot._createCellCoords(t.row,i.col)})}break;case"NW-SE":switch(s){case"NE-SW":"top"===n?h={start:t,end:l}:h.end=t;break;case"NW-SE":"top"===n?h={start:t,end:r}:h.end=t;break;case"SE-NW":"top"===n?h={start:t,end:i}:h.end=t;break;case"SW-NE":"top"===n?h={start:t,end:a}:h.end=t}break;case"SW-NE":switch(s){case"NW-SE":h="bottom"===n?{start:this.hot._createCellCoords(t.row,i.col),end:this.hot._createCellCoords(l.row,t.col)}:{start:this.hot._createCellCoords(i.row,t.col),end:this.hot._createCellCoords(t.row,r.col)};break;case"SW-NE":h="top"===n?{start:this.hot._createCellCoords(e.highlight.row,t.col),end:this.hot._createCellCoords(t.row,r.col)}:{start:this.hot._createCellCoords(t.row,i.col),end:this.hot._createCellCoords(i.row,t.col)};break;case"SE-NW":"bottom"===n?h={start:this.hot._createCellCoords(t.row,a.col),end:this.hot._createCellCoords(i.row,t.col)}:"top"===n&&(h={start:l,end:t})}break;case"SE-NW":switch(s){case"NW-SE":case"NE-SW":case"SW-NE":"top"===n&&(h.end=t);break;case"SE-NW":"top"===n?h.end=t:h={start:t,end:i}}}return h}isDragged(){return this.dragged.length>0}}t.MultipleSelectionHandles=c},53495:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(70612);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.NestedHeaders=s.NestedHeaders},70612:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(9893),r=o(87485),l=o(28927),a=o(79729),h=o(83119),c=o(73497),u=o(61205),d=s(o(80016)),g=s(o(52280));function f(e,t,o){p(e,t),t.set(e,o)}function p(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function m(e,t,o){return e.set(C(e,t),o),o}function w(e,t){return e.get(C(e,t))}function C(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}o(54100);const v=t.PLUGIN_KEY="nestedHeaders",y=t.PLUGIN_PRIORITY=280;var E=new WeakMap,S=new WeakMap,R=new WeakMap,b=new WeakMap,_=new WeakSet;class T extends u.BasePlugin{constructor(){var e,t;super(...arguments),p(e=this,t=_),t.add(e),f(this,E,new d.default),f(this,S,null),f(this,R,null),f(this,b,!1),(0,n.default)(this,"ghostTable",new g.default(this.hot,((e,t)=>this.getHeaderSettings(e,t)))),(0,n.default)(this,"detectedOverlappedHeaders",!1)}static get PLUGIN_KEY(){return v}static get PLUGIN_PRIORITY(){return y}isEnabled(){return!!this.hot.getSettings()[v]}enablePlugin(){var e=this;if(this.enabled)return;const{nestedHeaders:t}=this.hot.getSettings();Array.isArray(t)&&Array.isArray(t[0])||(0,h.warn)(l.toSingleLine`Your Nested Headers plugin configuration is invalid. The settings has to be\x20
83
- passed as an array of arrays e.q. [['A1', { label: 'A2', colspan: 2 }]]`),this.addHook("init",(()=>C(_,this,j).call(this))),this.addHook("afterLoadData",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return C(_,e,Y).call(e,...o)})),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return C(_,e,A).call(e,...o)})),this.addHook("afterOnCellMouseDown",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return C(_,e,P).call(e,...o)})),this.addHook("beforeOnCellMouseOver",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return C(_,e,x).call(e,...o)})),this.addHook("beforeOnCellMouseUp",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return C(_,e,H).call(e,...o)})),this.addHook("beforeSelectionHighlightSet",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return C(_,e,D).call(e,...o)})),this.addHook("modifyTransformStart",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return C(_,e,L).call(e,...o)})),this.addHook("afterSelection",(()=>C(_,this,M).call(this))),this.addHook("afterSelectionFocusSet",(()=>C(_,this,M).call(this))),this.addHook("beforeViewportScrollHorizontally",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return C(_,e,O).call(e,...o)})),this.addHook("afterGetColumnHeaderRenderers",(e=>C(_,this,V).call(this,e))),this.addHook("modifyColWidth",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return C(_,e,W).call(e,...o)})),this.addHook("modifyColumnHeaderValue",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return C(_,e,B).call(e,...o)})),this.addHook("beforeHighlightingColumnHeader",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return C(_,e,I).call(e,...o)})),this.addHook("beforeCopy",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return C(_,e,N).call(e,...o)})),this.addHook("beforeSelectColumns",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return C(_,e,k).call(e,...o)})),this.addHook("afterViewportColumnCalculatorOverride",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return C(_,e,F).call(e,...o)})),this.addHook("modifyFocusedElement",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return C(_,e,U).call(e,...o)})),this.hot.columnIndexMapper.addLocalHook("cacheUpdated",(()=>C(_,this,M).call(this))),this.hot.rowIndexMapper.addLocalHook("cacheUpdated",(()=>C(_,this,M).call(this))),super.enablePlugin(),this.updatePlugin()}updatePlugin(){if(!this.hot.view)return;const{nestedHeaders:e}=this.hot.getSettings();w(E,this).setColumnsLimit(this.hot.countCols()),Array.isArray(e)&&(this.detectedOverlappedHeaders=w(E,this).setState(e)),this.detectedOverlappedHeaders&&(0,h.warn)(l.toSingleLine`Your Nested Headers plugin setup contains overlapping headers. This kind of configuration\x20
84
- is currently not supported.`),this.enabled&&this.hot.columnIndexMapper.hidingMapsCollection.getMergedValues().forEach(((e,t)=>{const o=!0===e?"hide-column":"show-column";w(E,this).triggerColumnModification(o,t)})),!w(S,this)&&this.enabled&&m(S,this,this.hot.columnIndexMapper.createChangesObserver("hiding").subscribe((e=>{e.forEach((e=>{let{op:t,index:o,newValue:s}=e;if("replace"===t){const e=!0===s?"hide-column":"show-column";w(E,this).triggerColumnModification(e,o)}})),this.ghostTable.buildWidthsMap()}))),this.ghostTable.setLayersCount(this.getLayersCount()).buildWidthsMap(),super.updatePlugin()}disablePlugin(){this.clearColspans(),w(E,this).clear(),w(S,this).unsubscribe(),m(S,this,null),this.ghostTable.clear(),super.disablePlugin()}getStateManager(){return w(E,this)}getLayersCount(){return w(E,this).getLayersCount()}getHeaderSettings(e,t){return w(E,this).getHeaderSettings(e,t)}clearColspans(){if(!this.hot.view)return;const{_wt:e}=this.hot.view,t=e.getSetting("columnHeaders").length,o=e.wtTable.THEAD,s=e.wtOverlays.topOverlay.clone.wtTable.THEAD,n=e.wtOverlays.topInlineStartCornerOverlay?e.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.THEAD:null;for(let e=0;e<t;e++){const t=o.childNodes[e];if(!t)break;const r=s.childNodes[e],l=n?n.childNodes[e]:null;for(let e=0,o=t.childNodes.length;e<o;e++)t.childNodes[e].removeAttribute("colspan"),(0,i.removeClass)(t.childNodes[e],"hiddenHeader"),r&&r.childNodes[e]&&(r.childNodes[e].removeAttribute("colspan"),(0,i.removeClass)(r.childNodes[e],"hiddenHeader")),n&&l&&l.childNodes[e]&&(l.childNodes[e].removeAttribute("colspan"),(0,i.removeClass)(l.childNodes[e],"hiddenHeader"))}}headerRendererFactory(e){var t=this;const o=this.hot.view._wt.getSetting("fixedColumnsStart");return(s,n)=>{var r;const{columnIndexMapper:l,view:a}=this.hot;let h=l.getVisualFromRenderableIndex(s);null===h&&(h=s),n.removeAttribute("colspan"),(0,i.removeClass)(n,"hiddenHeader");const{colspan:c,isHidden:u,isPlaceholder:d,headerClassNames:g}=null!==(r=w(E,this).getHeaderSettings(e,h))&&void 0!==r?r:{label:""};if(d||u)(0,i.addClass)(n,"hiddenHeader");else if(c>1){var f,p;const{wtOverlays:e}=a._wt,t=null===(f=e.topInlineStartCornerOverlay)||void 0===f?void 0:f.clone.wtTable.THEAD.contains(n),i=null===(p=e.inlineStartOverlay)||void 0===p?void 0:p.clone.wtTable.THEAD.contains(n),r=t||i?Math.min(c,o-s):c;r>1&&n.setAttribute("colspan",r)}if(this.hot.view.appendColHeader(h,n,(function(){return t.getColumnHeaderValue(...arguments)}),e),!d&&!u){const e=n.querySelector("div.relative");e&&g&&g.length>0&&((0,i.removeClass)(e,this.hot.getColumnMeta(h).headerClassName),(0,i.addClass)(e,g))}}}getColumnHeaderValue(e,t){var o;const{isHidden:s,isPlaceholder:n}=null!==(o=w(E,this).getHeaderSettings(t,e))&&void 0!==o?o:{};return n||s?"":this.hot.getColHeader(e,t)}destroy(){m(E,this,null),null!==w(S,this)&&(w(S,this).unsubscribe(),m(S,this,null)),super.destroy()}_getHeaderTreeNodeDataByCoords(e){if(!(e.row>=0||e.col<0))return w(E,this).getHeaderTreeNodeData(e.row,e.col)}}function M(){var e;const t=null===(e=this.hot)||void 0===e?void 0:e.getSelectedRangeLast();if(!t)return;const{highlight:o}=t;if(o.isHeader()&&o.col>=0){const e=w(E,this).findLeftMostColumnIndex(o.row,o.col),t=this.hot.selection.highlight.getFocus();t.visualCellRange.highlight.col=e,t.visualCellRange.from.col=e,t.visualCellRange.to.col=e,t.commit()}}function O(e){const t=this.hot.getSelectedRangeLast();if(!t)return e;const{highlight:o}=t;if(!(o.isHeader()&&o.col>=0))return e;const s=this.hot.view.getFirstFullyVisibleColumn(),n=this.hot.view.getLastFullyVisibleColumn(),i=w(E,this).findLeftMostColumnIndex(o.row,o.col),r=w(E,this).findRightMostColumnIndex(o.row,o.col);return i<s&&r>n?e:i<s?i:r}function I(e,t,o){const s=w(E,this).getHeaderTreeNodeData(t,e);if(!s)return e;const{columnCursor:n,selectionType:i,selectionWidth:r}=o,{isRoot:l,colspan:a}=w(E,this).getHeaderSettings(t,e);if(i===c.HEADER_TYPE){if(!l)return s.columnIndex}else if(i===c.ACTIVE_HEADER_TYPE&&(a>r-n||!l))return null;return e}function N(e,t,o){let{columnHeadersCount:s}=o;if(0!==s)for(let o=0;o<t.length;o++){const{startRow:s,startCol:i,endRow:r,endCol:l}=t[o],a=r-s+1;if(s>=0||1===i-l+1)break;for(let t=i;t<=l;t++)for(let o=s;o<=r;o++){var n;const s=a+o,r=t-i;if(0===r)continue;!1===(null===(n=w(E,this).getHeaderTreeNodeData(o,t))||void 0===n?void 0:n.isRoot)&&(e[s][r]="")}}}function A(e,t,o,s){this._getHeaderTreeNodeDataByCoords(t)&&(s.column=!0)}function P(e,t){const o=this._getHeaderTreeNodeDataByCoords(t);if(!o)return;m(R,this,t.clone()),m(b,this,!0);const{selection:s}=this.hot,n=s.isSelected()?s.getSelectedRange().current():null,i=[],{columnIndex:r,origColspan:l}=o,h=!s.inInSelection(t);e.shiftKey&&n?t.col<n.from.col?i.push(n.getTopEndCorner().col,r,t.row):t.col>n.from.col?i.push(n.getTopStartCorner().col,r+l-1,t.row):i.push(r,r+l-1,t.row):((0,a.isLeftClick)(e)||(0,a.isRightClick)(e)&&h||(0,a.isTouchEvent)(e))&&i.push(r,r+l-1,t.row),s.selectColumns(...i)}function x(e,t,o,s){if(!this.hot.view.isMouseDown())return;const n=this._getHeaderTreeNodeDataByCoords(t);if(!n)return;const{columnIndex:i,origColspan:l}=n,a=this.hot.getSelectedRangeLast(),h=a.getTopStartCorner(),c=a.getBottomEndCorner(),{from:u}=a;s.column=!0,s.cell=!0;const d=[],g=(0,r.clamp)(t.row,-1/0,-1);t.col<u.col?d.push(c.col,i,g):t.col>u.col?d.push(h.col,i+l-1,g):d.push(i,i+l-1,g),this.hot.selection.selectColumns(...d)}function H(){m(b,this,!1)}function D(){const{navigableHeaders:e}=this.hot.getSettings();if(!this.hot.view.isMouseDown()||!w(b,this)||!e)return;const t=this.hot.getSelectedRangeLast(),o=t.getTopStartCorner().col,s=t.getBottomEndCorner().col,{columnIndex:n,origColspan:i}=w(E,this).getHeaderTreeNodeData(w(R,this).row,w(R,this).col);if(t.setHighlight(w(R,this)),i>t.getWidth()||n<o||n+i-1>s){const e=w(E,this).findTopMostEntireHeaderLevel((0,r.clamp)(o,n,n+i-1),(0,r.clamp)(s,n,n+i-1));t.highlight.row=e,t.highlight.col=t.from.col}}function L(e){const{highlight:t}=this.hot.getSelectedRangeLast(),o=this.hot._createCellCoords(t.row+e.row,t.col+e.col);if(!(o.isHeader()&&o.col>=0))return;const s=w(E,this).findLeftMostColumnIndex(o.row,o.col),n=w(E,this).findRightMostColumnIndex(o.row,o.col);if(e.col<0){const o=t.col>=s&&t.col<=n?s-1:n,i=this.hot.columnIndexMapper.getNearestNotHiddenIndex(o,-1);e.col=null===i?-this.hot.view.countRenderableColumnsInRange(0,t.col):-Math.max(this.hot.view.countRenderableColumnsInRange(i,t.col)-1,1)}else if(e.col>0){const o=t.col>=s&&t.col<=n?n+1:s,i=this.hot.columnIndexMapper.getNearestNotHiddenIndex(o,1);e.col=null===i?this.hot.view.countRenderableColumnsInRange(t.col,this.hot.countCols()):Math.max(this.hot.view.countRenderableColumnsInRange(t.col,i)-1,1)}}function k(e,t){const o=e.row,s=this._getHeaderTreeNodeDataByCoords({row:o,col:e.col}),n=this._getHeaderTreeNodeDataByCoords({row:o,col:t.col});t.col<e.col?(s&&(e.col=s.columnIndex+s.origColspan-1),n&&(t.col=n.columnIndex)):t.col>=e.col&&(s&&(e.col=s.columnIndex),n&&(t.col=n.columnIndex+n.origColspan-1))}function V(e){e.length=0;for(let t=0;t<w(E,this).getLayersCount();t++)e.push(this.headerRendererFactory(t))}function F(e){const t=w(E,this).getLayersCount();let o=e.startColumn,s=!!t;for(let n=0;n<t;n++){const t=w(E,this).findLeftMostColumnIndex(n,e.startColumn),i=this.hot.columnIndexMapper.getRenderableFromVisualIndex(t);if(t>=0&&(s=!1),(0,r.isNumeric)(i)&&i<e.startColumn){o=i;break}}e.startColumn=s?w(E,this).getHeaderTreeNodeData(0,o).columnIndex:o}function W(e,t){const o=this.ghostTable.getWidth(t);return e>o?e:o}function B(e,t,o){var s;const{label:n}=null!==(s=w(E,this).getHeaderTreeNodeData(o,t))&&void 0!==s?s:{label:""};return n}function U(e,t){if(e<0)return this.hot.getCell(e,w(E,this).findLeftMostColumnIndex(e,t),!0)}function j(){this.updatePlugin()}function Y(e,t){t||this.updatePlugin()}t.NestedHeaders=T},97922:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=o(9175),i=s(o(16957));function r(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function l(e,t){return e.get(a(e,t))}function a(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var h=new WeakMap,c=new WeakMap,u=new WeakMap;t.default=class{constructor(e){var t,o,s;r(this,h,new Map),r(this,c,new Map),r(this,u,null),o=this,s=e,(t=u).set(a(t,o),s)}getRoots(){return Array.from(l(h,this).values())}getRootByColumn(e){let t;return l(c,this).has(e)&&(t=l(h,this).get(l(c,this).get(e))),t}getNode(e,t){const o=this.getRootByColumn(t);if(!o)return;const s=t-l(c,this).get(t);let n,i=0;return o.walkDown((o=>{const{data:{origColspan:r,headerLevel:l}}=o;if(e===l){if(s>=i&&s<=i+r-1)return n=o,n.data.isRoot=t===n.data.columnIndex,!1;i+=r}})),n}rebuildTreeIndex(){let e=0;l(c,this).clear(),(0,n.arrayEach)(l(h,this),(t=>{let[,{data:{colspan:o}}]=t;for(let t=e;t<e+o;t++)l(c,this).set(t,e);e+=o}))}buildTree(){this.clear();const e=l(u,this).getColumnsCount();let t=0;for(;t<e;){const e=l(u,this).getHeaderSettings(0,t),o=new i.default;l(h,this).set(t,o),this.buildLeaves(o,t,0,e.origColspan),t+=e.origColspan}this.rebuildTreeIndex()}buildLeaves(e,t,o){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const r=l(u,this).getHeadersSettings(o,t,s);o+=1,(0,n.arrayEach)(r,(s=>{const n={...s,headerLevel:o-1,columnIndex:t};let r;1===o?(e.data=n,r=e):(r=new i.default(n),e.addChild(r)),o<l(u,this).getLayersCount()&&this.buildLeaves(r,t,o,s.origColspan),t+=s.origColspan}))}clear(){l(h,this).clear(),l(c,this).clear()}}},80016:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=o(9175),i=s(o(534)),r=s(o(97922)),l=o(35721),a=o(99394),h=o(16957);function c(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function u(e,t,o){return e.set(g(e,t),o),o}function d(e,t){return e.get(g(e,t))}function g(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var f=new WeakMap,p=new WeakMap,m=new WeakMap;t.default=class{constructor(){c(this,f,new i.default),c(this,p,new r.default(d(f,this))),c(this,m,[[]])}setState(e){d(f,this).setData(e);let t=!1;try{d(p,this).buildTree()}catch(e){d(p,this).clear(),d(f,this).clear(),t=!0}return u(m,this,(0,a.generateMatrix)(d(p,this).getRoots())),t}setColumnsLimit(e){d(f,this).setColumnsLimit(e)}mergeStateWith(e){const t=(0,n.arrayMap)(e,(e=>{let{row:t,...o}=e;return{row:t<0?this.rowCoordsToLevel(t):t,...o}}));d(f,this).mergeWith(t),d(p,this).buildTree(),u(m,this,(0,a.generateMatrix)(d(p,this).getRoots()))}mapState(e){d(f,this).map(e),d(p,this).buildTree(),u(m,this,(0,a.generateMatrix)(d(p,this).getRoots()))}mapNodes(e){return(0,n.arrayReduce)(d(p,this).getRoots(),((t,o)=>(o.walkDown((o=>{const s=e(o.data);void 0!==s&&t.push(s)})),t)),[])}triggerNodeModification(e,t,o){t<0&&(t=this.rowCoordsToLevel(t));const s=d(p,this).getNode(t,o);let n;return s&&(n=(0,l.triggerNodeModification)(e,s,o),u(m,this,(0,a.generateMatrix)(d(p,this).getRoots()))),n}triggerColumnModification(e,t){return this.triggerNodeModification(e,-1,t)}rowCoordsToLevel(e){if(e>=0)return null;const t=e+Math.max(this.getLayersCount(),1);return t<0?null:t}levelToRowCoords(e){if(e<0)return null;const t=e-Math.max(this.getLayersCount(),1);return t>=0?null:t}getHeaderSettings(e,t){var o,s;return e<0&&(e=this.rowCoordsToLevel(e)),null===e||e>=this.getLayersCount()?null:null!==(o=null===(s=d(m,this)[e])||void 0===s?void 0:s[t])&&void 0!==o?o:null}getHeaderTreeNodeData(e,t){const o=this.getHeaderTreeNode(e,t);return o?{...o.data}:null}getHeaderTreeNode(e,t){if(e<0&&(e=this.rowCoordsToLevel(e)),null===e||e>=this.getLayersCount())return null;const o=d(p,this).getNode(e,t);return o||null}findTopMostEntireHeaderLevel(e){var t;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const s=o-e+1;let n=!1,i=null;for(let t=e;t<=o;t++){const r=d(p,this).getRootByColumn(t);if(!r)break;n=!0,r.walkDown((t=>{const{columnIndex:n,headerLevel:r,origColspan:l,isHidden:a}=t.data;a||l<=s&&n>=e&&n+l-1<=o&&(null===i||r<i)&&(i=r)}),h.TRAVERSAL_DF_PRE)}return n&&null===i?-1:this.levelToRowCoords(null!==(t=i)&&void 0!==t?t:0)}findLeftMostColumnIndex(e,t){var o;const{isRoot:s}=null!==(o=this.getHeaderSettings(e,t))&&void 0!==o?o:{isRoot:!0};if(s)return t;let n=t-1;for(;n>=0;){var i;const{isRoot:t}=null!==(i=this.getHeaderSettings(e,n))&&void 0!==i?i:{isRoot:!0};if(t)break;n-=1}return n}findRightMostColumnIndex(e,t){var o;const{isRoot:s,origColspan:n}=null!==(o=this.getHeaderSettings(e,t))&&void 0!==o?o:{isRoot:!0,origColspan:1};if(s)return t+n-1;let i=t+1;for(;i<this.getColumnsCount();){var r;const{isRoot:t}=null!==(r=this.getHeaderSettings(e,i))&&void 0!==r?r:{isRoot:!0};if(t)break;i+=1}return i-1}getLayersCount(){return d(f,this).getLayersCount()}getColumnsCount(){return d(f,this).getColumnsCount()}clear(){u(m,this,[]),d(f,this).clear(),d(p,this).clear()}}},99394:(e,t,o)=>{"use strict";t.__esModule=!0,t.generateMatrix=function(e){const t=[];return(0,s.arrayEach)(e,(e=>{e.walkDown((e=>{const o=e.data,{origColspan:s,columnIndex:r,headerLevel:l,crossHiddenColumns:a}=o,h=function(e,t){let o;Array.isArray(e[t])?o=e[t]:(o=[],e[t]=o);return o}(t,l);let c=!1;for(let e=r;e<r+s;e++){if(a.includes(e)||c)h.push((0,n.createPlaceholderHeaderSettings)(o));else{const e=i(o);e.isRoot=!0,h.push(e),c=!0}}}))})),t},o(15724);var s=o(9175),n=o(7977);function i(e){const{crossHiddenColumns:t,...o}=(0,n.createDefaultHeaderSettings)(e);return o}},68510:(e,t,o)=>{"use strict";t.__esModule=!0,t.collapseNode=function e(t){var o;const{data:r,childs:l}=t;if(r.isCollapsed||r.isHidden||r.origColspan<=1)return{rollbackModification:()=>{},affectedColumns:[],colspanCompensation:0};if((0,i.isNodeReflectsFirstChildColspan)(t))return e(l[0]);r.isCollapsed=!0;const a=l.slice(1),h=new Set;if(a.length>0)(0,s.arrayEach)(a,(e=>{(0,i.traverseHiddenNodeColumnIndexes)(e,(e=>{h.add(e)})),e.data.clonedTree=e.cloneTree(),e.walkDown((e=>{let{data:t}=e;t.isHidden=!0}))}));else{const{origColspan:e,columnIndex:t}=r;for(let o=1;o<e;o++){const e=t+o;h.add(e)}}const c=r.colspan-(null!==(o=(0,i.getFirstChildProperty)(t,"colspan"))&&void 0!==o?o:1);return t.walkUp((e=>{const{data:t}=e;t.colspan-=c,t.colspan<=1?(t.colspan=1,t.isCollapsed=!0):(0,i.isNodeReflectsFirstChildColspan)(e)&&(t.isCollapsed=(0,i.getFirstChildProperty)(e,"isCollapsed"))})),{rollbackModification:()=>(0,n.expandNode)(t),affectedColumns:Array.from(h),colspanCompensation:c}},o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var s=o(9175),n=o(12161),i=o(11463)},12161:(e,t,o)=>{"use strict";t.__esModule=!0,t.expandNode=function e(t){const{data:o,childs:r}=t;if(!o.isCollapsed||o.isHidden||o.origColspan<=1)return{rollbackModification:()=>{},affectedColumns:[],colspanCompensation:0};if((0,i.isNodeReflectsFirstChildColspan)(t))return e(r[0]);o.isCollapsed=!1;const l=r.slice(1),a=new Set;let h=0;if(l.length>0)(0,s.arrayEach)(l,(e=>{e.replaceTreeWith(e.data.clonedTree),e.data.clonedTree=null;const t=e.data;h+=t.colspan,(0,i.traverseHiddenNodeColumnIndexes)(e,(e=>{a.add(e)}))}));else{const{colspan:e,origColspan:t,columnIndex:s}=o;h=t-e;for(let e=1;e<t;e++)a.add(s+e)}return t.walkUp((e=>{const{data:t}=e;t.colspan+=h,t.colspan>=t.origColspan?(t.colspan=t.origColspan,t.isCollapsed=!1):(0,i.isNodeReflectsFirstChildColspan)(e)&&(t.isCollapsed=(0,i.getFirstChildProperty)(e,"isCollapsed"))})),{rollbackModification:()=>(0,n.collapseNode)(t),affectedColumns:Array.from(a),colspanCompensation:h}},o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var s=o(9175),n=o(68510),i=o(11463)},69535:(e,t,o)=>{"use strict";t.__esModule=!0,t.hideColumn=function(e,t){if(!Number.isInteger(t))throw new Error("The passed gridColumnIndex argument has invalid type.");if(e.childs.length>0)throw new Error(s.toSingleLine`The passed node is not the last node on the tree. Only for\x20
83
+ passed as an array of arrays e.q. [['A1', { label: 'A2', colspan: 2 }]]`),this.addHook("init",(()=>C(_,this,j).call(this))),this.addHook("afterLoadData",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return C(_,e,Y).call(e,...o)})),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return C(_,e,A).call(e,...o)})),this.addHook("afterOnCellMouseDown",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return C(_,e,P).call(e,...o)})),this.addHook("beforeOnCellMouseOver",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return C(_,e,x).call(e,...o)})),this.addHook("beforeOnCellMouseUp",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return C(_,e,H).call(e,...o)})),this.addHook("beforeSelectionHighlightSet",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return C(_,e,D).call(e,...o)})),this.addHook("modifyTransformStart",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return C(_,e,k).call(e,...o)})),this.addHook("afterSelection",(()=>C(_,this,M).call(this))),this.addHook("afterSelectionFocusSet",(()=>C(_,this,M).call(this))),this.addHook("beforeViewportScrollHorizontally",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return C(_,e,O).call(e,...o)})),this.addHook("afterGetColumnHeaderRenderers",(e=>C(_,this,V).call(this,e))),this.addHook("modifyColWidth",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return C(_,e,W).call(e,...o)})),this.addHook("modifyColumnHeaderValue",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return C(_,e,B).call(e,...o)})),this.addHook("beforeHighlightingColumnHeader",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return C(_,e,I).call(e,...o)})),this.addHook("beforeCopy",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return C(_,e,N).call(e,...o)})),this.addHook("beforeSelectColumns",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return C(_,e,L).call(e,...o)})),this.addHook("afterViewportColumnCalculatorOverride",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return C(_,e,F).call(e,...o)})),this.addHook("modifyFocusedElement",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return C(_,e,U).call(e,...o)})),this.hot.columnIndexMapper.addLocalHook("cacheUpdated",(()=>C(_,this,M).call(this))),this.hot.rowIndexMapper.addLocalHook("cacheUpdated",(()=>C(_,this,M).call(this))),super.enablePlugin(),this.updatePlugin()}updatePlugin(){if(!this.hot.view)return;const{nestedHeaders:e}=this.hot.getSettings();w(E,this).setColumnsLimit(this.hot.countCols()),Array.isArray(e)&&(this.detectedOverlappedHeaders=w(E,this).setState(e)),this.detectedOverlappedHeaders&&(0,h.warn)(l.toSingleLine`Your Nested Headers plugin setup contains overlapping headers. This kind of configuration\x20
84
+ is currently not supported.`),this.enabled&&this.hot.columnIndexMapper.hidingMapsCollection.getMergedValues().forEach(((e,t)=>{const o=!0===e?"hide-column":"show-column";w(E,this).triggerColumnModification(o,t)})),!w(S,this)&&this.enabled&&m(S,this,this.hot.columnIndexMapper.createChangesObserver("hiding").subscribe((e=>{e.forEach((e=>{let{op:t,index:o,newValue:s}=e;if("replace"===t){const e=!0===s?"hide-column":"show-column";w(E,this).triggerColumnModification(e,o)}})),this.ghostTable.buildWidthsMap()}))),this.ghostTable.setLayersCount(this.getLayersCount()).buildWidthsMap(),super.updatePlugin()}disablePlugin(){this.clearColspans(),w(E,this).clear(),w(S,this).unsubscribe(),m(S,this,null),this.ghostTable.clear(),super.disablePlugin()}getStateManager(){return w(E,this)}getLayersCount(){return w(E,this).getLayersCount()}getHeaderSettings(e,t){return w(E,this).getHeaderSettings(e,t)}clearColspans(){if(!this.hot.view)return;const{_wt:e}=this.hot.view,t=e.getSetting("columnHeaders").length,o=e.wtTable.THEAD,s=e.wtOverlays.topOverlay.clone.wtTable.THEAD,n=e.wtOverlays.topInlineStartCornerOverlay?e.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.THEAD:null;for(let e=0;e<t;e++){const t=o.childNodes[e];if(!t)break;const r=s.childNodes[e],l=n?n.childNodes[e]:null;for(let e=0,o=t.childNodes.length;e<o;e++)t.childNodes[e].removeAttribute("colspan"),(0,i.removeClass)(t.childNodes[e],"hiddenHeader"),r&&r.childNodes[e]&&(r.childNodes[e].removeAttribute("colspan"),(0,i.removeClass)(r.childNodes[e],"hiddenHeader")),n&&l&&l.childNodes[e]&&(l.childNodes[e].removeAttribute("colspan"),(0,i.removeClass)(l.childNodes[e],"hiddenHeader"))}}headerRendererFactory(e){var t=this;const o=this.hot.view._wt.getSetting("fixedColumnsStart");return(s,n)=>{var r;const{columnIndexMapper:l,view:a}=this.hot;let h=l.getVisualFromRenderableIndex(s);null===h&&(h=s),n.removeAttribute("colspan"),(0,i.removeClass)(n,"hiddenHeader");const{colspan:c,isHidden:u,isPlaceholder:d,headerClassNames:g}=null!==(r=w(E,this).getHeaderSettings(e,h))&&void 0!==r?r:{label:""};if(d||u)(0,i.addClass)(n,"hiddenHeader");else if(c>1){var f,p;const{wtOverlays:e}=a._wt,t=null===(f=e.topInlineStartCornerOverlay)||void 0===f?void 0:f.clone.wtTable.THEAD.contains(n),i=null===(p=e.inlineStartOverlay)||void 0===p?void 0:p.clone.wtTable.THEAD.contains(n),r=t||i?Math.min(c,o-s):c;r>1&&n.setAttribute("colspan",r)}if(this.hot.view.appendColHeader(h,n,(function(){return t.getColumnHeaderValue(...arguments)}),e),!d&&!u){const e=n.querySelector("div.relative");e&&g&&g.length>0&&((0,i.removeClass)(e,this.hot.getColumnMeta(h).headerClassName),(0,i.addClass)(e,g))}}}getColumnHeaderValue(e,t){var o;const{isHidden:s,isPlaceholder:n}=null!==(o=w(E,this).getHeaderSettings(t,e))&&void 0!==o?o:{};return n||s?"":this.hot.getColHeader(e,t)}destroy(){m(E,this,null),null!==w(S,this)&&(w(S,this).unsubscribe(),m(S,this,null)),super.destroy()}_getHeaderTreeNodeDataByCoords(e){if(!(e.row>=0||e.col<0))return w(E,this).getHeaderTreeNodeData(e.row,e.col)}}function M(){var e;const t=null===(e=this.hot)||void 0===e?void 0:e.getSelectedRangeLast();if(!t)return;const{highlight:o}=t;if(o.isHeader()&&o.col>=0){const e=w(E,this).findLeftMostColumnIndex(o.row,o.col),t=this.hot.selection.highlight.getFocus();t.visualCellRange.highlight.col=e,t.visualCellRange.from.col=e,t.visualCellRange.to.col=e,t.commit()}}function O(e){const t=this.hot.getSelectedRangeLast();if(!t)return e;const{highlight:o}=t;if(!(o.isHeader()&&o.col>=0))return e;const s=this.hot.view.getFirstFullyVisibleColumn(),n=this.hot.view.getLastFullyVisibleColumn(),i=w(E,this).findLeftMostColumnIndex(o.row,o.col),r=w(E,this).findRightMostColumnIndex(o.row,o.col);return i<s&&r>n?e:i<s?i:r}function I(e,t,o){const s=w(E,this).getHeaderTreeNodeData(t,e);if(!s)return e;const{columnCursor:n,selectionType:i,selectionWidth:r}=o,{isRoot:l,colspan:a}=w(E,this).getHeaderSettings(t,e);if(i===c.HEADER_TYPE){if(!l)return s.columnIndex}else if(i===c.ACTIVE_HEADER_TYPE&&(a>r-n||!l))return null;return e}function N(e,t,o){let{columnHeadersCount:s}=o;if(0!==s)for(let o=0;o<t.length;o++){const{startRow:s,startCol:i,endRow:r,endCol:l}=t[o],a=r-s+1;if(s>=0||1===i-l+1)break;for(let t=i;t<=l;t++)for(let o=s;o<=r;o++){var n;const s=a+o,r=t-i;if(0===r)continue;!1===(null===(n=w(E,this).getHeaderTreeNodeData(o,t))||void 0===n?void 0:n.isRoot)&&(e[s][r]="")}}}function A(e,t,o,s){this._getHeaderTreeNodeDataByCoords(t)&&(s.column=!0)}function P(e,t){const o=this._getHeaderTreeNodeDataByCoords(t);if(!o)return;m(R,this,t.clone()),m(b,this,!0);const{selection:s}=this.hot,n=s.isSelected()?s.getSelectedRange().current():null,i=[],{columnIndex:r,origColspan:l}=o,h=!s.inInSelection(t);e.shiftKey&&n?t.col<n.from.col?i.push(n.getTopEndCorner().col,r,t.row):t.col>n.from.col?i.push(n.getTopStartCorner().col,r+l-1,t.row):i.push(r,r+l-1,t.row):((0,a.isLeftClick)(e)||(0,a.isRightClick)(e)&&h||(0,a.isTouchEvent)(e))&&i.push(r,r+l-1,t.row),s.selectColumns(...i)}function x(e,t,o,s){if(!this.hot.view.isMouseDown())return;const n=this._getHeaderTreeNodeDataByCoords(t);if(!n)return;const{columnIndex:i,origColspan:l}=n,a=this.hot.getSelectedRangeLast(),h=a.getTopStartCorner(),c=a.getBottomEndCorner(),{from:u}=a;s.column=!0,s.cell=!0;const d=[],g=(0,r.clamp)(t.row,-1/0,-1);t.col<u.col?d.push(c.col,i,g):t.col>u.col?d.push(h.col,i+l-1,g):d.push(i,i+l-1,g),this.hot.selection.selectColumns(...d)}function H(){m(b,this,!1)}function D(){const{navigableHeaders:e}=this.hot.getSettings();if(!this.hot.view.isMouseDown()||!w(b,this)||!e)return;const t=this.hot.getSelectedRangeLast(),o=t.getTopStartCorner().col,s=t.getBottomEndCorner().col,{columnIndex:n,origColspan:i}=w(E,this).getHeaderTreeNodeData(w(R,this).row,w(R,this).col);if(t.setHighlight(w(R,this)),i>t.getWidth()||n<o||n+i-1>s){const e=w(E,this).findTopMostEntireHeaderLevel((0,r.clamp)(o,n,n+i-1),(0,r.clamp)(s,n,n+i-1));t.highlight.row=e,t.highlight.col=t.from.col}}function k(e){const{highlight:t}=this.hot.getSelectedRangeLast(),o=this.hot._createCellCoords(t.row+e.row,t.col+e.col);if(!(o.isHeader()&&o.col>=0))return;const s=w(E,this).findLeftMostColumnIndex(o.row,o.col),n=w(E,this).findRightMostColumnIndex(o.row,o.col);if(e.col<0){const o=t.col>=s&&t.col<=n?s-1:n,i=this.hot.columnIndexMapper.getNearestNotHiddenIndex(o,-1);e.col=null===i?-this.hot.view.countRenderableColumnsInRange(0,t.col):-Math.max(this.hot.view.countRenderableColumnsInRange(i,t.col)-1,1)}else if(e.col>0){const o=t.col>=s&&t.col<=n?n+1:s,i=this.hot.columnIndexMapper.getNearestNotHiddenIndex(o,1);e.col=null===i?this.hot.view.countRenderableColumnsInRange(t.col,this.hot.countCols()):Math.max(this.hot.view.countRenderableColumnsInRange(t.col,i)-1,1)}}function L(e,t){const o=e.row,s=this._getHeaderTreeNodeDataByCoords({row:o,col:e.col}),n=this._getHeaderTreeNodeDataByCoords({row:o,col:t.col});t.col<e.col?(s&&(e.col=s.columnIndex+s.origColspan-1),n&&(t.col=n.columnIndex)):t.col>=e.col&&(s&&(e.col=s.columnIndex),n&&(t.col=n.columnIndex+n.origColspan-1))}function V(e){e.length=0;for(let t=0;t<w(E,this).getLayersCount();t++)e.push(this.headerRendererFactory(t))}function F(e){const t=w(E,this).getLayersCount();let o=e.startColumn,s=!!t;for(let n=0;n<t;n++){const t=w(E,this).findLeftMostColumnIndex(n,e.startColumn),i=this.hot.columnIndexMapper.getRenderableFromVisualIndex(t);if(t>=0&&(s=!1),(0,r.isNumeric)(i)&&i<e.startColumn){o=i;break}}e.startColumn=s?w(E,this).getHeaderTreeNodeData(0,o).columnIndex:o}function W(e,t){const o=this.ghostTable.getWidth(t);return e>o?e:o}function B(e,t,o){var s;const{label:n}=null!==(s=w(E,this).getHeaderTreeNodeData(o,t))&&void 0!==s?s:{label:""};return n}function U(e,t){if(e<0)return this.hot.getCell(e,w(E,this).findLeftMostColumnIndex(e,t),!0)}function j(){this.updatePlugin()}function Y(e,t){t||this.updatePlugin()}t.NestedHeaders=T},97922:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=o(9175),i=s(o(16957));function r(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function l(e,t){return e.get(a(e,t))}function a(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var h=new WeakMap,c=new WeakMap,u=new WeakMap;t.default=class{constructor(e){var t,o,s;r(this,h,new Map),r(this,c,new Map),r(this,u,null),o=this,s=e,(t=u).set(a(t,o),s)}getRoots(){return Array.from(l(h,this).values())}getRootByColumn(e){let t;return l(c,this).has(e)&&(t=l(h,this).get(l(c,this).get(e))),t}getNode(e,t){const o=this.getRootByColumn(t);if(!o)return;const s=t-l(c,this).get(t);let n,i=0;return o.walkDown((o=>{const{data:{origColspan:r,headerLevel:l}}=o;if(e===l){if(s>=i&&s<=i+r-1)return n=o,n.data.isRoot=t===n.data.columnIndex,!1;i+=r}})),n}rebuildTreeIndex(){let e=0;l(c,this).clear(),(0,n.arrayEach)(l(h,this),(t=>{let[,{data:{colspan:o}}]=t;for(let t=e;t<e+o;t++)l(c,this).set(t,e);e+=o}))}buildTree(){this.clear();const e=l(u,this).getColumnsCount();let t=0;for(;t<e;){const e=l(u,this).getHeaderSettings(0,t),o=new i.default;l(h,this).set(t,o),this.buildLeaves(o,t,0,e.origColspan),t+=e.origColspan}this.rebuildTreeIndex()}buildLeaves(e,t,o){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const r=l(u,this).getHeadersSettings(o,t,s);o+=1,(0,n.arrayEach)(r,(s=>{const n={...s,headerLevel:o-1,columnIndex:t};let r;1===o?(e.data=n,r=e):(r=new i.default(n),e.addChild(r)),o<l(u,this).getLayersCount()&&this.buildLeaves(r,t,o,s.origColspan),t+=s.origColspan}))}clear(){l(h,this).clear(),l(c,this).clear()}}},80016:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=o(9175),i=s(o(534)),r=s(o(97922)),l=o(35721),a=o(99394),h=o(16957);function c(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function u(e,t,o){return e.set(g(e,t),o),o}function d(e,t){return e.get(g(e,t))}function g(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var f=new WeakMap,p=new WeakMap,m=new WeakMap;t.default=class{constructor(){c(this,f,new i.default),c(this,p,new r.default(d(f,this))),c(this,m,[[]])}setState(e){d(f,this).setData(e);let t=!1;try{d(p,this).buildTree()}catch(e){d(p,this).clear(),d(f,this).clear(),t=!0}return u(m,this,(0,a.generateMatrix)(d(p,this).getRoots())),t}setColumnsLimit(e){d(f,this).setColumnsLimit(e)}mergeStateWith(e){const t=(0,n.arrayMap)(e,(e=>{let{row:t,...o}=e;return{row:t<0?this.rowCoordsToLevel(t):t,...o}}));d(f,this).mergeWith(t),d(p,this).buildTree(),u(m,this,(0,a.generateMatrix)(d(p,this).getRoots()))}mapState(e){d(f,this).map(e),d(p,this).buildTree(),u(m,this,(0,a.generateMatrix)(d(p,this).getRoots()))}mapNodes(e){return(0,n.arrayReduce)(d(p,this).getRoots(),((t,o)=>(o.walkDown((o=>{const s=e(o.data);void 0!==s&&t.push(s)})),t)),[])}triggerNodeModification(e,t,o){t<0&&(t=this.rowCoordsToLevel(t));const s=d(p,this).getNode(t,o);let n;return s&&(n=(0,l.triggerNodeModification)(e,s,o),u(m,this,(0,a.generateMatrix)(d(p,this).getRoots()))),n}triggerColumnModification(e,t){return this.triggerNodeModification(e,-1,t)}rowCoordsToLevel(e){if(e>=0)return null;const t=e+Math.max(this.getLayersCount(),1);return t<0?null:t}levelToRowCoords(e){if(e<0)return null;const t=e-Math.max(this.getLayersCount(),1);return t>=0?null:t}getHeaderSettings(e,t){var o,s;return e<0&&(e=this.rowCoordsToLevel(e)),null===e||e>=this.getLayersCount()?null:null!==(o=null===(s=d(m,this)[e])||void 0===s?void 0:s[t])&&void 0!==o?o:null}getHeaderTreeNodeData(e,t){const o=this.getHeaderTreeNode(e,t);return o?{...o.data}:null}getHeaderTreeNode(e,t){if(e<0&&(e=this.rowCoordsToLevel(e)),null===e||e>=this.getLayersCount())return null;const o=d(p,this).getNode(e,t);return o||null}findTopMostEntireHeaderLevel(e){var t;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const s=o-e+1;let n=!1,i=null;for(let t=e;t<=o;t++){const r=d(p,this).getRootByColumn(t);if(!r)break;n=!0,r.walkDown((t=>{const{columnIndex:n,headerLevel:r,origColspan:l,isHidden:a}=t.data;a||l<=s&&n>=e&&n+l-1<=o&&(null===i||r<i)&&(i=r)}),h.TRAVERSAL_DF_PRE)}return n&&null===i?-1:this.levelToRowCoords(null!==(t=i)&&void 0!==t?t:0)}findLeftMostColumnIndex(e,t){var o;const{isRoot:s}=null!==(o=this.getHeaderSettings(e,t))&&void 0!==o?o:{isRoot:!0};if(s)return t;let n=t-1;for(;n>=0;){var i;const{isRoot:t}=null!==(i=this.getHeaderSettings(e,n))&&void 0!==i?i:{isRoot:!0};if(t)break;n-=1}return n}findRightMostColumnIndex(e,t){var o;const{isRoot:s,origColspan:n}=null!==(o=this.getHeaderSettings(e,t))&&void 0!==o?o:{isRoot:!0,origColspan:1};if(s)return t+n-1;let i=t+1;for(;i<this.getColumnsCount();){var r;const{isRoot:t}=null!==(r=this.getHeaderSettings(e,i))&&void 0!==r?r:{isRoot:!0};if(t)break;i+=1}return i-1}getLayersCount(){return d(f,this).getLayersCount()}getColumnsCount(){return d(f,this).getColumnsCount()}clear(){u(m,this,[]),d(f,this).clear(),d(p,this).clear()}}},99394:(e,t,o)=>{"use strict";t.__esModule=!0,t.generateMatrix=function(e){const t=[];return(0,s.arrayEach)(e,(e=>{e.walkDown((e=>{const o=e.data,{origColspan:s,columnIndex:r,headerLevel:l,crossHiddenColumns:a}=o,h=function(e,t){let o;Array.isArray(e[t])?o=e[t]:(o=[],e[t]=o);return o}(t,l);let c=!1;for(let e=r;e<r+s;e++){if(a.includes(e)||c)h.push((0,n.createPlaceholderHeaderSettings)(o));else{const e=i(o);e.isRoot=!0,h.push(e),c=!0}}}))})),t},o(15724);var s=o(9175),n=o(7977);function i(e){const{crossHiddenColumns:t,...o}=(0,n.createDefaultHeaderSettings)(e);return o}},68510:(e,t,o)=>{"use strict";t.__esModule=!0,t.collapseNode=function e(t){var o;const{data:r,childs:l}=t;if(r.isCollapsed||r.isHidden||r.origColspan<=1)return{rollbackModification:()=>{},affectedColumns:[],colspanCompensation:0};if((0,i.isNodeReflectsFirstChildColspan)(t))return e(l[0]);r.isCollapsed=!0;const a=l.slice(1),h=new Set;if(a.length>0)(0,s.arrayEach)(a,(e=>{(0,i.traverseHiddenNodeColumnIndexes)(e,(e=>{h.add(e)})),e.data.clonedTree=e.cloneTree(),e.walkDown((e=>{let{data:t}=e;t.isHidden=!0}))}));else{const{origColspan:e,columnIndex:t}=r;for(let o=1;o<e;o++){const e=t+o;h.add(e)}}const c=r.colspan-(null!==(o=(0,i.getFirstChildProperty)(t,"colspan"))&&void 0!==o?o:1);return t.walkUp((e=>{const{data:t}=e;t.colspan-=c,t.colspan<=1?(t.colspan=1,t.isCollapsed=!0):(0,i.isNodeReflectsFirstChildColspan)(e)&&(t.isCollapsed=(0,i.getFirstChildProperty)(e,"isCollapsed"))})),{rollbackModification:()=>(0,n.expandNode)(t),affectedColumns:Array.from(h),colspanCompensation:c}},o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var s=o(9175),n=o(12161),i=o(11463)},12161:(e,t,o)=>{"use strict";t.__esModule=!0,t.expandNode=function e(t){const{data:o,childs:r}=t;if(!o.isCollapsed||o.isHidden||o.origColspan<=1)return{rollbackModification:()=>{},affectedColumns:[],colspanCompensation:0};if((0,i.isNodeReflectsFirstChildColspan)(t))return e(r[0]);o.isCollapsed=!1;const l=r.slice(1),a=new Set;let h=0;if(l.length>0)(0,s.arrayEach)(l,(e=>{e.replaceTreeWith(e.data.clonedTree),e.data.clonedTree=null;const t=e.data;h+=t.colspan,(0,i.traverseHiddenNodeColumnIndexes)(e,(e=>{a.add(e)}))}));else{const{colspan:e,origColspan:t,columnIndex:s}=o;h=t-e;for(let e=1;e<t;e++)a.add(s+e)}return t.walkUp((e=>{const{data:t}=e;t.colspan+=h,t.colspan>=t.origColspan?(t.colspan=t.origColspan,t.isCollapsed=!1):(0,i.isNodeReflectsFirstChildColspan)(e)&&(t.isCollapsed=(0,i.getFirstChildProperty)(e,"isCollapsed"))})),{rollbackModification:()=>(0,n.collapseNode)(t),affectedColumns:Array.from(a),colspanCompensation:h}},o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var s=o(9175),n=o(68510),i=o(11463)},69535:(e,t,o)=>{"use strict";t.__esModule=!0,t.hideColumn=function(e,t){if(!Number.isInteger(t))throw new Error("The passed gridColumnIndex argument has invalid type.");if(e.childs.length>0)throw new Error(s.toSingleLine`The passed node is not the last node on the tree. Only for\x20
85
85
  the last node, the hide column modification can be applied.`);const{crossHiddenColumns:o}=e.data;if(o.includes(t))return;let n=!1;if(e.walkUp((e=>{const{data:{collapsible:t}}=e;if(t)return n=!0,!1})),n)return;e.walkUp((e=>{const{data:o}=e;o.crossHiddenColumns.push(t),o.colspan>1?o.colspan-=1:o.isHidden=!0}))},o(67834),o(15724);var s=o(28927)},35721:(e,t,o)=>{"use strict";t.__esModule=!0,t.triggerNodeModification=function(e,t,o){if(!l.has(e))throw new Error(`The node modifier action ("${e}") does not exist.`);return l.get(e)(t,o)},o(67834);var s=o(68510),n=o(12161),i=o(69535),r=o(32422);const l=new Map([["collapse",s.collapseNode],["expand",n.expandNode],["hide-column",i.hideColumn],["show-column",r.showColumn]])},32422:(e,t,o)=>{"use strict";t.__esModule=!0,t.showColumn=function(e,t){if(!Number.isInteger(t))throw new Error("The passed gridColumnIndex argument has invalid type.");if(e.childs.length>0)throw new Error(s.toSingleLine`The passed node is not the last node on the tree. Only for\x20
86
- the last node, the show column modification can be applied.`);const{crossHiddenColumns:o}=e.data;if(!o.includes(t))return;let n=!1;if(e.walkUp((e=>{const{data:{collapsible:t}}=e;if(t)return n=!0,!1})),n)return;e.walkUp((e=>{const{data:o}=e;o.crossHiddenColumns.splice(o.crossHiddenColumns.indexOf(t),1),!o.isHidden&&o.colspan<o.origColspan&&(o.colspan+=1),o.isHidden=!1}))},o(67834);var s=o(28927)},11463:(e,t)=>{"use strict";function o(e,t){let{childs:o}=e;if(0!==o.length)return o[0].data[t]}t.__esModule=!0,t.getFirstChildProperty=o,t.isNodeReflectsFirstChildColspan=function(e){return o(e,"origColspan")===e.data.origColspan},t.traverseHiddenNodeColumnIndexes=function(e,t){e.walkDown((e=>{let{data:o,childs:s}=e;if(!o.isHidden&&(t(o.columnIndex),0===s.length))for(let e=1;e<o.colspan;e++)t(o.columnIndex+e)}))}},1096:(e,t,o)=>{"use strict";t.__esModule=!0,t.normalizeSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;const o=[];if(0===t)return o;(0,s.arrayEach)(e,(e=>{const l=[];let a=0;o.push(l),(0,s.arrayEach)(e,(e=>{const o=(0,r.createDefaultHeaderSettings)();if((0,n.isObject)(e)){const{label:t,colspan:s,headerClassName:n}=e;o.label=(0,i.stringify)(t),"number"==typeof s&&s>1&&(o.colspan=s,o.origColspan=s),"string"==typeof n&&(o.headerClassNames=[...n.split(" ")])}else o.label=(0,i.stringify)(e);a+=o.origColspan;let s=!1;if(a>=t&&(o.colspan=o.origColspan-(a-t),o.origColspan=o.colspan,s=!0),l.push(o),o.colspan>1)for(let e=0;e<o.colspan-1;e++)l.push((0,r.createPlaceholderHeaderSettings)());return!s}))}));const l=Math.max(...(0,s.arrayMap)(o,(e=>e.length)));return(0,s.arrayEach)(o,(e=>{if(e.length<l){const t=(0,s.arrayMap)(new Array(l-e.length),(()=>(0,r.createDefaultHeaderSettings)()));e.splice(e.length,0,...t)}})),o},o(15724);var s=o(9175),n=o(13911),i=o(38893),r=o(7977)},534:(e,t,o)=>{"use strict";t.__esModule=!0,o(67834),o(15724);var s=o(13911),n=o(9175),i=o(1096);function r(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function l(e,t){return e.get(h(e,t))}function a(e,t,o){return e.set(h(e,t),o),o}function h(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}const c=t.HEADER_CONFIGURABLE_PROPS=["label","collapsible"];var u=new WeakMap,d=new WeakMap,g=new WeakMap;t.default=class{constructor(){r(this,u,[]),r(this,d,0),r(this,g,1/0)}setColumnsLimit(e){a(g,this,e)}setData(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];a(u,this,(0,i.normalizeSettings)(e,l(g,this))),a(d,this,l(u,this).length)}getData(){return l(u,this)}mergeWith(e){(0,n.arrayEach)(e,(e=>{let{row:t,col:o,...n}=e;const i=this.getHeaderSettings(t,o);null!==i&&(0,s.extend)(i,n,c)}))}map(e){(0,n.arrayEach)(l(u,this),(t=>{(0,n.arrayEach)(t,(t=>{const o=e({...t});(0,s.isObject)(o)&&(0,s.extend)(t,o,c)}))}))}getHeaderSettings(e,t){var o;if(e>=l(d,this)||e<0)return null;const s=l(u,this)[e];return!1===Array.isArray(s)||t>=s.length?null:null!==(o=s[t])&&void 0!==o?o:null}getHeadersSettings(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const s=[];if(e>=l(d,this)||e<0)return s;const n=l(u,this)[e];let i=0;for(let e=t;e<n.length;e++){const t=n[e];if(t.isPlaceholder)throw new Error("The first column settings cannot overlap the other header layers");if(i+=t.colspan,s.push(t),t.colspan>1&&(e+=t.colspan-1),i===o)break;if(i>o)throw new Error("The last column settings cannot overlap the other header layers")}return s}getLayersCount(){return l(d,this)}getColumnsCount(){return l(d,this)>0?l(u,this)[0].length:0}clear(){a(u,this,[]),a(d,this,0)}}},7977:(e,t)=>{"use strict";t.__esModule=!0,t.createDefaultHeaderSettings=function(){let{label:e="",colspan:t=1,origColspan:o=1,collapsible:s=!1,crossHiddenColumns:n=[],isCollapsed:i=!1,isHidden:r=!1,isRoot:l=!1,isPlaceholder:a=!1,headerClassNames:h=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{label:e,colspan:t,origColspan:o,collapsible:s,isCollapsed:i,crossHiddenColumns:n,isHidden:r,isRoot:l,isPlaceholder:a,headerClassNames:h}},t.createPlaceholderHeaderSettings=function(){return{label:"",isPlaceholder:!0}}},52280:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707)),i=o(9893);t.default=class{constructor(e,t){(0,n.default)(this,"hot",void 0),(0,n.default)(this,"nestedHeaderSettingsGetter",void 0),(0,n.default)(this,"layersCount",0),(0,n.default)(this,"container",void 0),(0,n.default)(this,"widthsMap",void 0),this.hot=e,this.nestedHeaderSettingsGetter=t,this.widthsMap=this.hot.columnIndexMapper.createAndRegisterIndexMap("nestedHeaders.widthsMap","physicalIndexToValue")}setLayersCount(e){return this.layersCount=e,this}getWidth(e){return this.widthsMap.getValueAtIndex(this.hot.toPhysicalColumn(e))}buildWidthsMap(){this.container=this.hot.rootDocument.createElement("div"),this.container.classList.add("handsontable","htGhostTable","htAutoSize"),this._buildGhostTable(this.container),this.hot.rootDocument.body.appendChild(this.container);const e=this.container.querySelectorAll("tr:last-of-type th"),t=e.length;this.widthsMap.clear();for(let o=0;o<t;o++){const t=this.hot.columnIndexMapper.getVisualFromRenderableIndex(o),s=this.hot.toPhysicalColumn(t);this.widthsMap.setValueAtIndex(s,e[o].offsetWidth)}this.container.parentNode.removeChild(this.container),this.container=null}_buildGhostTable(e){const{rootDocument:t,columnIndexMapper:o}=this.hot,s=t.createDocumentFragment(),n=t.createElement("table"),r=!!this.hot.getSettings().dropdownMenu,l=o.getRenderableIndexesLength();for(let e=0;e<this.layersCount;e++){const s=t.createElement("tr");for(let n=0;n<l;n++){let l=o.getVisualFromRenderableIndex(n);null===l&&(l=n);const a=t.createElement("th"),h=this.nestedHeaderSettingsGetter(e,l);if(h&&(!h.isPlaceholder||h.isHidden)){let e=h.label;r&&(e+='<button class="changeType"></button>'),(0,i.fastInnerHTML)(a,e),a.colSpan=h.colspan,s.appendChild(a)}}n.appendChild(s)}s.appendChild(n),e.appendChild(s)}clear(){this.widthsMap.clear(),this.container=null}}},59632:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(15724);var n=s(o(85707)),i=o(87485),r=o(13911),l=o(9175);t.default=class{constructor(e,t){(0,n.default)(this,"hot",void 0),(0,n.default)(this,"data",null),(0,n.default)(this,"plugin",void 0),(0,n.default)(this,"parentReference",new WeakMap),(0,n.default)(this,"cache",{levels:[],levelCount:0,rows:[],nodeInfo:new WeakMap}),this.hot=t,this.plugin=e}setData(e){this.data=e}getData(){return this.data}getRawSourceData(){let e=null;return this.plugin.disableCoreAPIModifiers(),e=this.hot.getSourceData(),this.plugin.enableCoreAPIModifiers(),e}updateWithData(e){this.setData(e),this.rewriteCache()}rewriteCache(){this.cache={levels:[],levelCount:0,rows:[],nodeInfo:new WeakMap},(0,i.rangeEach)(0,this.data.length-1,(e=>{this.cacheNode(this.data[e],0,null)}))}cacheNode(e,t,o){this.cache.levels[t]||(this.cache.levels[t]=[],this.cache.levelCount+=1),this.cache.levels[t].push(e),this.cache.rows.push(e),this.cache.nodeInfo.set(e,{parent:o,row:this.cache.rows.length-1,level:t}),this.hasChildren(e)&&(0,l.arrayEach)(e.__children,(o=>{this.cacheNode(o,t+1,e)}))}getDataObject(e){return null==e?null:this.cache.rows[e]}readTreeNodes(e,t,o,s){let n=!1,i=t;if(isNaN(i)&&i.end)return i;let r=e;return r||(r={__children:this.data},n=!0,i-=1),null!=o&&i===o?{result:r,end:!0}:null!=s&&r===s?{result:i,end:!0}:(i+=1,r.__children&&(0,l.arrayEach)(r.__children,(e=>{if(this.parentReference.set(e,n?null:r),i=this.readTreeNodes(e,i,o,s),isNaN(i)&&i.end)return!1})),i)}mockParent(){const e=this.mockNode();return e.__children=this.data,e}mockNode(){const e={};return(0,r.objectEach)(this.data[0],((t,o)=>{e[o]=null})),e}getRowIndex(e){return null==e?null:this.cache.nodeInfo.get(e).row}getRowIndexWithinParent(e){let t=null;t=isNaN(e)?e:this.getDataObject(e);const o=this.getRowParent(e);return null==o?this.data.indexOf(t):o.__children.indexOf(t)}countAllRows(){const e={__children:this.data};return this.countChildren(e)}countChildren(e){let t=0,o=e;return isNaN(o)||(o=this.getDataObject(o)),o&&o.__children?((0,l.arrayEach)(o.__children,(e=>{t+=1,e.__children&&(t+=this.countChildren(e))})),t):0}getRowParent(e){let t;return t=isNaN(e)?e:this.getDataObject(e),this.getRowObjectParent(t)}getRowObjectParent(e){return e&&"object"==typeof e?this.cache.nodeInfo.get(e).parent:null}getRowLevel(e){let t=null;return t=isNaN(e)?e:this.getDataObject(e),t?this.getRowObjectLevel(t):null}getRowObjectLevel(e){return null==e?null:this.cache.nodeInfo.get(e).level}hasChildren(e){let t=e;return isNaN(t)||(t=this.getDataObject(t)),!(!t.__children||!t.__children.length)}isChild(e){return null!==this.getRowParent(e)}getChild(e,t){var o;return(null===(o=e.__children)||void 0===o?void 0:o[t])||null}isRowHighestLevel(e){return!this.isChild(e)}isParent(e){var t;let o=e;return isNaN(o)||(o=this.getDataObject(o)),o&&!!o.__children&&0!==(null===(t=o.__children)||void 0===t?void 0:t.length)}addChild(e,t){let o=t;this.hot.runHooks("beforeAddChild",e,o);let s=null;e&&(s=this.getRowIndex(e)),this.hot.runHooks("beforeCreateRow",s+this.countChildren(e)+1,1);let n=e;e||(n=this.mockParent()),n.__children||(n.__children=[]),o||(o=this.mockNode()),n.__children.push(o),this.rewriteCache();const i=this.getRowIndex(o);this.hot.rowIndexMapper.insertIndexes(i,1),this.hot.runHooks("afterCreateRow",i,1),this.hot.runHooks("afterAddChild",e,o)}addChildAtIndex(e,t,o){let s,n=o;if(n||(n=this.mockNode()),this.hot.runHooks("beforeAddChild",e,n,t),e){const o=this.getRowIndex(e)+t+1;this.hot.runHooks("beforeCreateRow",o,1),e.__children.splice(t,null,n),this.rewriteCache(),this.plugin.disableCoreAPIModifiers(),this.hot.setSourceDataAtCell(this.getRowIndexWithinParent(e),"__children",e.__children,"NestedRows.addChildAtIndex"),this.hot.rowIndexMapper.insertIndexes(o,1),this.plugin.enableCoreAPIModifiers(),this.hot.runHooks("afterCreateRow",o,1),s=o}else this.plugin.disableCoreAPIModifiers(),this.hot.alter("insert_row_above",t,1,"NestedRows.addChildAtIndex"),this.plugin.enableCoreAPIModifiers(),s=this.getRowIndex(this.data[t]);n=this.getDataObject(s),this.hot.runHooks("afterAddChild",e,n,t)}addSibling(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"below";const o=this.translateTrimmedRow(e),s=this.getRowParent(o),n=this.getRowIndexWithinParent(o);switch(t){case"below":this.addChildAtIndex(s,n+1,null);break;case"above":this.addChildAtIndex(s,n,null)}}detachFromParent(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=null;const s=[];Array.isArray(e)?((0,i.rangeEach)(e[0],e[2],(e=>{const t=this.translateTrimmedRow(e);s.push(this.getDataObject(t))})),(0,i.rangeEach)(0,s.length-2,(e=>{this.detachFromParent(s[e],!1)})),o=s[s.length-1]):o=e;const n=this.getRowIndex(o),r=this.countChildren(o),l=this.getRowIndexWithinParent(o),a=this.getRowParent(o),h=this.getRowParent(a),c=this.getRowIndex(h);let u=null;if(this.hot.runHooks("beforeDetachChild",a,o),null!=l){const e=Array.from(new Array(n+r+1).keys()).splice(-1*(r+1));if(this.hot.runHooks("beforeRemoveRow",n,r+1,e,this.plugin.pluginName),a.__children.splice(l,1),this.rewriteCache(),this.hot.runHooks("afterRemoveRow",n,r+1,e,this.plugin.pluginName),h){u=c+this.countChildren(h);const e=this.getChild(h,this.countChildren(h)-1),t=this.getRowIndex(e);this.hot.runHooks("beforeCreateRow",t+1,r+1,this.plugin.pluginName),h.__children.push(o)}else u=this.hot.countRows()+1,this.hot.runHooks("beforeCreateRow",u-2,r+1,this.plugin.pluginName),this.data.push(o)}this.rewriteCache(),this.hot.runHooks("afterCreateRow",u-2,r+1,this.plugin.pluginName),this.hot.runHooks("afterDetachChild",a,o,this.getRowIndex(o)),t&&this.hot.render()}filterData(e,t,o){const s=[];(0,l.arrayEach)(o,(e=>{s.push(this.getDataObject(e))})),(0,l.arrayEach)(s,(e=>{const t=this.getRowIndexWithinParent(e),o=this.getRowParent(e);null===o?this.data.splice(t,1):o.__children.splice(t,1)})),this.rewriteCache()}spliceData(e,t,o){const s=this.getDataObject(e-1);let n=null,i=e;s&&s.__children&&0===s.__children.length?(n=s,i=0):e<this.countAllRows()&&(n=this.getRowParent(e),i=this.getRowIndexWithinParent(e)),n?o?n.__children.splice(i,t,...o):n.__children.splice(i,t):o?this.data.splice(i,t,...o):this.data.splice(i,t),this.rewriteCache()}syncRowWithRawSource(e){let t=e,o=null;do{o=this.getRowParent(o),null!==o&&(t=o)}while(null!==o);this.plugin.disableCoreAPIModifiers(),this.hot.setSourceDataAtCell(this.getRowIndex(t),"__children",t.__children,"NestedRows.syncRowWithRawSource"),this.plugin.enableCoreAPIModifiers()}moveRow(e,t,o,s){const n=t===this.hot.countRows(),i=this.getRowParent(e),r=this.getRowIndexWithinParent(e),l=i.__children.slice(r,r+1),a=e>t;let h=n?this.getRowParent(t-1):this.getRowParent(t);null==h&&(h=this.getRowParent(t-1)),null==h&&(h=this.getDataObject(t-1)),h?h.__children||(h.__children=[]):(h=this.getDataObject(t),h.__children=[]);const c=n||o||s?h.__children.length:this.getRowIndexWithinParent(t),u=i===h;h.__children.splice(c,0,l[0]),i.__children.splice(r+(a&&u?1:0),1),this.syncRowWithRawSource(i),u||this.syncRowWithRawSource(h)}translateTrimmedRow(e){return this.plugin.collapsingUI?this.plugin.collapsingUI.translateTrimmedRow(e):e}untranslateTrimmedRow(e){return this.plugin.collapsingUI?this.plugin.collapsingUI.untranslateTrimmedRow(e):e}}},15434:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(99486);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.NestedRows=s.NestedRows},99486:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724),o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var n=s(o(85707)),i=o(61205),r=s(o(59632)),l=s(o(48985)),a=s(o(3263)),h=s(o(88269)),c=o(83119),u=o(56216),d=o(93969),g=o(37947),f=s(o(33809));function p(e,t,o){m(e,t),t.set(e,o)}function m(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function w(e,t){return e.get(v(e,t))}function C(e,t,o){return e.set(v(e,t),o),o}function v(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}o(98953);const y=t.PLUGIN_KEY="nestedRows",E=t.PLUGIN_PRIORITY=300,S=y;var R=new WeakMap,b=new WeakMap,_=new WeakSet;class T extends i.BasePlugin{constructor(){var e,t;super(...arguments),m(e=this,t=_),t.add(e),(0,n.default)(this,"dataManager",null),(0,n.default)(this,"headersUI",null),(0,n.default)(this,"collapsedRowsMap",null),p(this,R,!1),p(this,b,!1)}static get PLUGIN_KEY(){return y}static get PLUGIN_PRIORITY(){return E}isEnabled(){return!!this.hot.getSettings()[y]}enablePlugin(){var e=this;this.enabled||(this.collapsedRowsMap=this.hot.rowIndexMapper.registerMap("nestedRows",new d.TrimmingMap),this.dataManager=new r.default(this,this.hot),this.collapsingUI=new l.default(this,this.hot),this.headersUI=new a.default(this,this.hot),this.contextMenuUI=new h.default(this,this.hot),this.rowMoveController=new f.default(this),this.addHook("afterInit",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(_,e,W).call(e,...o)})),this.addHook("beforeViewRender",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(_,e,B).call(e,...o)})),this.addHook("modifyRowData",(function(){return e.onModifyRowData(...arguments)})),this.addHook("modifySourceLength",(function(){return e.onModifySourceLength(...arguments)})),this.addHook("beforeDataSplice",(function(){return e.onBeforeDataSplice(...arguments)})),this.addHook("filterData",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(_,e,I).call(e,...o)})),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(_,e,N).call(e,...o)})),this.addHook("afterGetRowHeader",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(_,e,A).call(e,...o)})),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(_,e,O).call(e,...o)})),this.addHook("beforeRemoveRow",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(_,e,H).call(e,...o)})),this.addHook("afterRemoveRow",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(_,e,x).call(e,...o)})),this.addHook("beforeAddChild",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(_,e,D).call(e,...o)})),this.addHook("afterAddChild",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(_,e,L).call(e,...o)})),this.addHook("beforeDetachChild",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(_,e,k).call(e,...o)})),this.addHook("afterDetachChild",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(_,e,V).call(e,...o)})),this.addHook("modifyRowHeaderWidth",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(_,e,P).call(e,...o)})),this.addHook("afterCreateRow",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(_,e,F).call(e,...o)})),this.addHook("beforeRowMove",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(_,e,M).call(e,...o)})),this.addHook("beforeLoadData",(e=>v(_,this,U).call(this,e))),this.addHook("beforeUpdateData",(e=>v(_,this,U).call(this,e))),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("nestedRows"),this.unregisterShortcuts(),super.disablePlugin()}updatePlugin(){this.disablePlugin();const e=this.dataManager.getData();this.enablePlugin(),this.dataManager.updateWithData(e),super.updatePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast(),t=this.collapsingUI.translateTrimmedRow(e.row);return this.collapsingUI.areChildrenCollapsed(t)?this.collapsingUI.expandChildren(t):this.collapsingUI.collapseChildren(t),!1},runOnlyIf:()=>{var e,t;const o=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return o&&(null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.isSingle())&&this.hot.selection.isCellVisible(o)&&-1===o.col&&o.row>=0},group:S,relativeToGroup:g.EDITOR_EDIT_GROUP,position:"before"})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(S)}disableCoreAPIModifiers(){C(b,this,!0)}enableCoreAPIModifiers(){C(b,this,!1)}onModifyRowData(e){if(!w(b,this))return this.dataManager.getDataObject(e)}onModifySourceLength(){if(!w(b,this))return this.dataManager.countAllRows()}onBeforeDataSplice(e,t,o){return!(!w(b,this)&&!this.dataManager.isRowHighestLevel(e))||(this.dataManager.spliceData(e,t,o),!1)}destroy(){super.destroy()}}function M(e,t,o,s){return this.rowMoveController.onBeforeRowMove(e,t,o,s)}function O(e,t,o){this.collapsingUI.toggleState(e,t,o)}function I(e,t,o){return this.collapsingUI.collapsedRowsStash.stash(),this.collapsingUI.collapsedRowsStash.trimStash(o[0],t),this.collapsingUI.collapsedRowsStash.shiftStash(o[0],null,-1*t),this.dataManager.filterData(e,t,o),C(R,this,!0),this.dataManager.getData().slice()}function N(e){return this.contextMenuUI.appendOptions(e)}function A(e,t){this.headersUI.appendLevelIndicators(e,t)}function P(e){return Math.max(this.headersUI.rowHeaderWidthCache,e)}function x(e,t,o,s){s!==this.pluginName&&this.hot._registerTimeout((()=>{C(R,this,!1),this.headersUI.updateRowHeaderWidth(),this.collapsingUI.collapsedRowsStash.applyStash()}))}function H(e,t,o){const s=Array.from(o.reduce(((e,t)=>{if(this.dataManager.isParent(t)){const o=this.dataManager.getDataObject(t).__children;return e.add(t),Array.isArray(o)&&o.forEach((t=>e.add(this.dataManager.getRowIndex(t)))),e}return e.add(t)}),new Set));o.length=0,o.push(...s)}function D(){this.collapsingUI.collapsedRowsStash.stash()}function L(e,t){this.collapsingUI.collapsedRowsStash.shiftStash(this.dataManager.getRowIndex(t)),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}function k(){this.collapsingUI.collapsedRowsStash.stash()}function V(e,t,o){this.collapsingUI.collapsedRowsStash.shiftStash(o,null,-1),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}function F(){this.dataManager.rewriteCache()}function W(){this.headersUI.updateRowHeaderWidth()}function B(e,t){w(R,this)&&(t.skipRender=!0)}function U(e){if(!(0,u.isArrayOfObjects)(e))return(0,c.error)("The Nested Rows plugin requires an Array of Objects as a dataset to be provided. The plugin has been disabled."),this.hot.getSettings()[y]=!1,void this.disablePlugin();this.dataManager.setData(e),this.dataManager.rewriteCache()}t.NestedRows=T},7437:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707));t.default=class{constructor(e,t){(0,n.default)(this,"hot",void 0),(0,n.default)(this,"plugin",void 0),this.hot=t,this.plugin=e}}},48985:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(15724);var n=o(79729),i=o(9175),r=o(87485),l=o(9893),a=s(o(7437)),h=s(o(3263));class c extends a.default{constructor(e,t){var o;super(e,t),o=this,this.dataManager=this.plugin.dataManager,this.collapsedRows=[],this.collapsedRowsStash={stash:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];o.lastCollapsedRows=o.collapsedRows.slice(0),o.expandMultipleChildren(o.lastCollapsedRows,e)},shiftStash:function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;null==t&&(t=1/0),(0,i.arrayEach)(o.lastCollapsedRows,((n,i)=>{n>=e&&n<t&&(o.lastCollapsedRows[i]=n+s)}))},applyStash:function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];o.collapseMultipleChildren(o.lastCollapsedRows,e),o.lastCollapsedRows=void 0},trimStash:(e,t)=>{(0,r.rangeEach)(e,e+t-1,(e=>{const t=this.lastCollapsedRows.indexOf(e);t>-1&&this.lastCollapsedRows.splice(t,1)}))}}}collapseChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const s=[];let n=null,r=null,l=null;return isNaN(e)?(n=e,r=this.dataManager.getRowIndex(n)):(n=this.dataManager.getDataObject(e),r=e),this.dataManager.hasChildren(n)&&(0,i.arrayEach)(n.__children,(e=>{s.push(this.dataManager.getRowIndex(e))})),l=this.collapseRows(s,!0,!1),o&&this.trimRows(l),t&&this.renderAndAdjust(),-1===this.collapsedRows.indexOf(r)&&this.collapsedRows.push(r),l}collapseMultipleChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const s=[];(0,i.arrayEach)(e,(e=>{s.push(...this.collapseChildren(e,!1,!1))})),o&&this.trimRows(s),t&&this.renderAndAdjust()}collapseRow(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.collapseRows([e],t)}collapseRows(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=[];return(0,i.arrayEach)(e,(e=>{s.push(e),t&&this.collapseChildRows(e,s)})),o&&this.trimRows(s),s}collapseChildRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.dataManager.hasChildren(e)){const o=this.dataManager.getDataObject(e);(0,i.arrayEach)(o.__children,(e=>{const o=this.dataManager.getRowIndex(e);t.push(o),this.collapseChildRows(o,t)}))}o&&this.trimRows(t)}expandRow(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.expandRows([e],t)}expandRows(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=[];return(0,i.arrayEach)(e,(e=>{s.push(e),t&&this.expandChildRows(e,s)})),o&&this.untrimRows(s),s}expandChildRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.dataManager.hasChildren(e)){const o=this.dataManager.getDataObject(e);(0,i.arrayEach)(o.__children,(e=>{if(!this.isAnyParentCollapsed(e)){const o=this.dataManager.getRowIndex(e);t.push(o),this.expandChildRows(o,t)}}))}o&&this.untrimRows(t)}expandChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const s=[];let n=null,r=null,l=null;return isNaN(e)?(n=e,r=this.dataManager.getRowIndex(e)):(n=this.dataManager.getDataObject(e),r=e),this.collapsedRows.splice(this.collapsedRows.indexOf(r),1),this.dataManager.hasChildren(n)&&(0,i.arrayEach)(n.__children,(e=>{const t=this.dataManager.getRowIndex(e);s.push(t)})),l=this.expandRows(s,!0,!1),o&&this.untrimRows(l),t&&this.renderAndAdjust(),l}expandMultipleChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const s=[];(0,i.arrayEach)(e,(e=>{s.push(...this.expandChildren(e,!1,!1))})),o&&this.untrimRows(s),t&&this.renderAndAdjust()}collapseAll(){const e=this.dataManager.getData(),t=[];(0,i.arrayEach)(e,(e=>{this.dataManager.hasChildren(e)&&t.push(e)})),this.collapseMultipleChildren(t),this.renderAndAdjust()}expandAll(){const e=this.dataManager.getData(),t=[];(0,i.arrayEach)(e,(e=>{this.dataManager.hasChildren(e)&&t.push(e)})),this.expandMultipleChildren(t),this.renderAndAdjust()}trimRows(e){this.hot.batchExecution((()=>{(0,i.arrayEach)(e,(e=>{this.plugin.collapsedRowsMap.setValueAtIndex(e,!0)}))}),!0)}untrimRows(e){this.hot.batchExecution((()=>{(0,i.arrayEach)(e,(e=>{this.plugin.collapsedRowsMap.setValueAtIndex(e,!1)}))}),!0)}areChildrenCollapsed(e){let t=isNaN(e)?e:this.dataManager.getDataObject(e),o=!0;return null===t&&(t={__children:this.dataManager.data}),this.dataManager.hasChildren(t)&&(0,i.arrayEach)(t.__children,(e=>{const t=this.dataManager.getRowIndex(e);if(!this.plugin.collapsedRowsMap.getValueAtIndex(t))return o=!1,!1})),o}isAnyParentCollapsed(e){let t=e;for(;null!==t;){t=this.dataManager.getRowParent(t);const e=this.dataManager.getRowIndex(t);if(this.collapsedRows.indexOf(e)>-1)return!0}return!1}toggleState(e,t){if(t.col>=0)return;const o=this.translateTrimmedRow(t.row);(0,l.hasClass)(e.target,h.default.CSS_CLASSES.button)&&(this.areChildrenCollapsed(o)?this.expandChildren(o):this.collapseChildren(o),(0,n.stopImmediatePropagation)(e))}translateTrimmedRow(e){return this.hot.toPhysicalRow(e)}untranslateTrimmedRow(e){return this.hot.toVisualRow(e)}renderAndAdjust(){this.hot.render(),this.hot.view.adjustElementsSize()}}t.default=c},88269:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=s(o(85707)),i=o(87485),r=o(9175),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=h(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),a=s(o(7437));function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(h=function(e){return e?o:t})(e)}function c(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function u(e,t){return e.get(function(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}(e,t))}var d=new WeakMap;class g extends a.default{constructor(){super(...arguments),(0,n.default)(this,"dataManager",this.plugin.dataManager),c(this,d,{row_above:(e,t)=>{const o=t[t.length-1];this.dataManager.addSibling(o.start.row,"above")},row_below:(e,t)=>{const o=t[t.length-1];this.dataManager.addSibling(o.start.row,"below")}})}appendOptions(e){const t=[{key:"add_child",name(){return this.getTranslatedPhrase(l.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD)},callback:()=>{const e=this.dataManager.translateTrimmedRow(this.hot.getSelectedLast()[0]),t=this.dataManager.getDataObject(e);this.dataManager.addChild(t)},disabled:()=>{const e=this.hot.getSelectedLast();return!e||e[0]<0||this.hot.selection.isSelectedByColumnHeader()||this.hot.countRows()>=this.hot.getSettings().maxRows}},{key:"detach_from_parent",name(){return this.getTranslatedPhrase(l.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD)},callback:()=>{this.dataManager.detachFromParent(this.hot.getSelectedLast())},disabled:()=>{const e=this.hot.getSelectedLast(),t=this.dataManager.translateTrimmedRow(e[0]);return!this.dataManager.getRowParent(t)||!e||e[0]<0||this.hot.selection.isSelectedByColumnHeader()||this.hot.countRows()>=this.hot.getSettings().maxRows}},{name:"---------"}];return(0,i.rangeEach)(0,e.items.length-1,(o=>{if(0===o)return(0,r.arrayEach)(t,((t,s)=>{e.items.splice(o+s,0,t)})),!1})),this.modifyRowInsertingOptions(e)}modifyRowInsertingOptions(e){return(0,i.rangeEach)(0,e.items.length-1,(t=>{const o=u(d,this)[e.items[t].key];null!=o&&(e.items[t].callback=o)})),e}}t.default=g},3263:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=o(9175),i=o(87485),r=o(9893),l=s(o(7437)),a=o(92692);class h extends l.default{static get CSS_CLASSES(){return{indicatorContainer:"ht_nestingLevels",parent:"ht_nestingParent",indicator:"ht_nestingLevel",emptyIndicator:"ht_nestingLevel_empty",button:"ht_nestingButton",expandButton:"ht_nestingExpand",collapseButton:"ht_nestingCollapse"}}constructor(e,t){super(e,t),this.dataManager=this.plugin.dataManager,this.collapsingUI=this.plugin.collapsingUI,this.rowHeaderWidthCache=null}appendLevelIndicators(e,t){const o=this.hot.toPhysicalRow(e),s=this.dataManager.getRowLevel(o),l=this.dataManager.getDataObject(o),c=t.getElementsByTagName("DIV")[0],u=c.querySelector("span.rowHeader"),d=c.querySelectorAll('[class^="ht_nesting"]'),g=this.hot.getSettings().ariaTags;if((0,n.arrayEach)(d,(e=>{e&&c.removeChild(e)})),(0,r.addClass)(t,h.CSS_CLASSES.indicatorContainer),s){const{rootDocument:e}=this.hot,t=u.cloneNode(!0);c.innerHTML="",(0,i.rangeEach)(0,s-1,(()=>{const t=e.createElement("SPAN");(0,r.addClass)(t,h.CSS_CLASSES.emptyIndicator),c.appendChild(t)})),c.appendChild(t)}if(this.dataManager.hasChildren(l)){const e=this.hot.rootDocument.createElement("DIV");g&&(0,r.setAttribute)(e,[(0,a.A11Y_HIDDEN)()]),(0,r.addClass)(t,h.CSS_CLASSES.parent),this.collapsingUI.areChildrenCollapsed(o)?((0,r.addClass)(e,`${h.CSS_CLASSES.button} ${h.CSS_CLASSES.expandButton}`),g&&(0,r.setAttribute)(t,[(0,a.A11Y_EXPANDED)(!1)])):((0,r.addClass)(e,`${h.CSS_CLASSES.button} ${h.CSS_CLASSES.collapseButton}`),g&&(0,r.setAttribute)(t,[(0,a.A11Y_EXPANDED)(!0)])),c.appendChild(e)}}updateRowHeaderWidth(e){let t=e;t||(t=this.dataManager.cache.levelCount),this.rowHeaderWidthCache=Math.max(50,11+10*t+25),this.hot.render()}}t.default=h},33809:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(15724);var n=s(o(85707)),i=o(38893),r=o(83119),l=o(28927);t.default=class{constructor(e){(0,n.default)(this,"plugin",void 0),(0,n.default)(this,"hot",void 0),(0,n.default)(this,"dataManager",void 0),(0,n.default)(this,"collapsingUI",void 0),this.plugin=e,this.hot=e.hot,this.dataManager=e.dataManager,this.collapsingUI=e.collapsingUI}onBeforeRowMove(e,t,o,s){if(this.displayAPICompatibilityWarning({rows:e,finalIndex:t,dropIndex:o,movePossible:s}))return!1;this.movedToCollapsed=!1;const n=o===this.hot.countRows(),i=n?this.hot.countSourceRows():this.dataManager.translateTrimmedRow(o);let r=!0;const l=e.map((e=>{if(!r)return!1;const t=this.dataManager.translateTrimmedRow(e);return r=this.shouldAllowMoving(t,i),t})),a=-1===l.indexOf(i);if(!r||!a)return!1;const h=this.getBaseParent(l),c=this.getTargetParent(n,i),u=h===c;return this.movedToCollapsed=this.collapsingUI.areChildrenCollapsed(c),this.collapsingUI.collapsedRowsStash.stash(),this.shiftCollapsibleParentsLocations(l,i,u),this.moveRows(l,i,c),this.dataManager.rewriteCache(),this.moveCellsMeta(l,i),this.collapsingUI.collapsedRowsStash.applyStash(!1),this.hot.runHooks("afterRowMove",e,t,o,s,s&&this.isRowOrderChanged(e,t)),this.hot.render(),this.selectCells(e,o),!1}displayAPICompatibilityWarning(e){const{rows:t,finalIndex:o,dropIndex:s,movePossible:n}=e;let a=!1;return(0,i.isUndefined)(s)&&((0,r.warn)(l.toSingleLine`Since version 8.0.0 of the Handsontable the 'moveRows' method isn't used for moving rows\x20
86
+ the last node, the show column modification can be applied.`);const{crossHiddenColumns:o}=e.data;if(!o.includes(t))return;let n=!1;if(e.walkUp((e=>{const{data:{collapsible:t}}=e;if(t)return n=!0,!1})),n)return;e.walkUp((e=>{const{data:o}=e;o.crossHiddenColumns.splice(o.crossHiddenColumns.indexOf(t),1),!o.isHidden&&o.colspan<o.origColspan&&(o.colspan+=1),o.isHidden=!1}))},o(67834);var s=o(28927)},11463:(e,t)=>{"use strict";function o(e,t){let{childs:o}=e;if(0!==o.length)return o[0].data[t]}t.__esModule=!0,t.getFirstChildProperty=o,t.isNodeReflectsFirstChildColspan=function(e){return o(e,"origColspan")===e.data.origColspan},t.traverseHiddenNodeColumnIndexes=function(e,t){e.walkDown((e=>{let{data:o,childs:s}=e;if(!o.isHidden&&(t(o.columnIndex),0===s.length))for(let e=1;e<o.colspan;e++)t(o.columnIndex+e)}))}},1096:(e,t,o)=>{"use strict";t.__esModule=!0,t.normalizeSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;const o=[];if(0===t)return o;(0,s.arrayEach)(e,(e=>{const l=[];let a=0;o.push(l),(0,s.arrayEach)(e,(e=>{const o=(0,r.createDefaultHeaderSettings)();if((0,n.isObject)(e)){const{label:t,colspan:s,headerClassName:n}=e;o.label=(0,i.stringify)(t),"number"==typeof s&&s>1&&(o.colspan=s,o.origColspan=s),"string"==typeof n&&(o.headerClassNames=[...n.split(" ")])}else o.label=(0,i.stringify)(e);a+=o.origColspan;let s=!1;if(a>=t&&(o.colspan=o.origColspan-(a-t),o.origColspan=o.colspan,s=!0),l.push(o),o.colspan>1)for(let e=0;e<o.colspan-1;e++)l.push((0,r.createPlaceholderHeaderSettings)());return!s}))}));const l=Math.max(...(0,s.arrayMap)(o,(e=>e.length)));return(0,s.arrayEach)(o,(e=>{if(e.length<l){const t=(0,s.arrayMap)(new Array(l-e.length),(()=>(0,r.createDefaultHeaderSettings)()));e.splice(e.length,0,...t)}})),o},o(15724);var s=o(9175),n=o(13911),i=o(38893),r=o(7977)},534:(e,t,o)=>{"use strict";t.__esModule=!0,o(67834),o(15724);var s=o(13911),n=o(9175),i=o(1096);function r(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function l(e,t){return e.get(h(e,t))}function a(e,t,o){return e.set(h(e,t),o),o}function h(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}const c=t.HEADER_CONFIGURABLE_PROPS=["label","collapsible"];var u=new WeakMap,d=new WeakMap,g=new WeakMap;t.default=class{constructor(){r(this,u,[]),r(this,d,0),r(this,g,1/0)}setColumnsLimit(e){a(g,this,e)}setData(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];a(u,this,(0,i.normalizeSettings)(e,l(g,this))),a(d,this,l(u,this).length)}getData(){return l(u,this)}mergeWith(e){(0,n.arrayEach)(e,(e=>{let{row:t,col:o,...n}=e;const i=this.getHeaderSettings(t,o);null!==i&&(0,s.extend)(i,n,c)}))}map(e){(0,n.arrayEach)(l(u,this),(t=>{(0,n.arrayEach)(t,(t=>{const o=e({...t});(0,s.isObject)(o)&&(0,s.extend)(t,o,c)}))}))}getHeaderSettings(e,t){var o;if(e>=l(d,this)||e<0)return null;const s=l(u,this)[e];return!1===Array.isArray(s)||t>=s.length?null:null!==(o=s[t])&&void 0!==o?o:null}getHeadersSettings(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const s=[];if(e>=l(d,this)||e<0)return s;const n=l(u,this)[e];let i=0;for(let e=t;e<n.length;e++){const t=n[e];if(t.isPlaceholder)throw new Error("The first column settings cannot overlap the other header layers");if(i+=t.colspan,s.push(t),t.colspan>1&&(e+=t.colspan-1),i===o)break;if(i>o)throw new Error("The last column settings cannot overlap the other header layers")}return s}getLayersCount(){return l(d,this)}getColumnsCount(){return l(d,this)>0?l(u,this)[0].length:0}clear(){a(u,this,[]),a(d,this,0)}}},7977:(e,t)=>{"use strict";t.__esModule=!0,t.createDefaultHeaderSettings=function(){let{label:e="",colspan:t=1,origColspan:o=1,collapsible:s=!1,crossHiddenColumns:n=[],isCollapsed:i=!1,isHidden:r=!1,isRoot:l=!1,isPlaceholder:a=!1,headerClassNames:h=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{label:e,colspan:t,origColspan:o,collapsible:s,isCollapsed:i,crossHiddenColumns:n,isHidden:r,isRoot:l,isPlaceholder:a,headerClassNames:h}},t.createPlaceholderHeaderSettings=function(){return{label:"",isPlaceholder:!0}}},52280:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707)),i=o(9893);t.default=class{constructor(e,t){(0,n.default)(this,"hot",void 0),(0,n.default)(this,"nestedHeaderSettingsGetter",void 0),(0,n.default)(this,"layersCount",0),(0,n.default)(this,"container",void 0),(0,n.default)(this,"widthsMap",void 0),this.hot=e,this.nestedHeaderSettingsGetter=t,this.widthsMap=this.hot.columnIndexMapper.createAndRegisterIndexMap("nestedHeaders.widthsMap","physicalIndexToValue")}setLayersCount(e){return this.layersCount=e,this}getWidth(e){return this.widthsMap.getValueAtIndex(this.hot.toPhysicalColumn(e))}buildWidthsMap(){this.container=this.hot.rootDocument.createElement("div"),this.container.classList.add("handsontable","htGhostTable","htAutoSize"),this._buildGhostTable(this.container),this.hot.rootDocument.body.appendChild(this.container);const e=this.container.querySelectorAll("tr:last-of-type th"),t=e.length;this.widthsMap.clear();for(let o=0;o<t;o++){const t=this.hot.columnIndexMapper.getVisualFromRenderableIndex(o),s=this.hot.toPhysicalColumn(t);this.widthsMap.setValueAtIndex(s,e[o].offsetWidth)}this.container.parentNode.removeChild(this.container),this.container=null}_buildGhostTable(e){const{rootDocument:t,columnIndexMapper:o}=this.hot,s=t.createDocumentFragment(),n=t.createElement("table"),r=!!this.hot.getSettings().dropdownMenu,l=o.getRenderableIndexesLength();for(let e=0;e<this.layersCount;e++){const s=t.createElement("tr");for(let n=0;n<l;n++){let l=o.getVisualFromRenderableIndex(n);null===l&&(l=n);const a=t.createElement("th"),h=this.nestedHeaderSettingsGetter(e,l);if(h&&(!h.isPlaceholder||h.isHidden)){let e=h.label;r&&(e+='<button class="changeType"></button>'),(0,i.fastInnerHTML)(a,e),a.colSpan=h.colspan,s.appendChild(a)}}n.appendChild(s)}s.appendChild(n),e.appendChild(s)}clear(){this.widthsMap.clear(),this.container=null}}},59632:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(15724);var n=s(o(85707)),i=o(87485),r=o(13911),l=o(9175);t.default=class{constructor(e,t){(0,n.default)(this,"hot",void 0),(0,n.default)(this,"data",null),(0,n.default)(this,"plugin",void 0),(0,n.default)(this,"parentReference",new WeakMap),(0,n.default)(this,"cache",{levels:[],levelCount:0,rows:[],nodeInfo:new WeakMap}),this.hot=t,this.plugin=e}setData(e){this.data=e}getData(){return this.data}getRawSourceData(){let e=null;return this.plugin.disableCoreAPIModifiers(),e=this.hot.getSourceData(),this.plugin.enableCoreAPIModifiers(),e}updateWithData(e){this.setData(e),this.rewriteCache()}rewriteCache(){this.cache={levels:[],levelCount:0,rows:[],nodeInfo:new WeakMap},(0,i.rangeEach)(0,this.data.length-1,(e=>{this.cacheNode(this.data[e],0,null)}))}cacheNode(e,t,o){this.cache.levels[t]||(this.cache.levels[t]=[],this.cache.levelCount+=1),this.cache.levels[t].push(e),this.cache.rows.push(e),this.cache.nodeInfo.set(e,{parent:o,row:this.cache.rows.length-1,level:t}),this.hasChildren(e)&&(0,l.arrayEach)(e.__children,(o=>{this.cacheNode(o,t+1,e)}))}getDataObject(e){return null==e?null:this.cache.rows[e]}readTreeNodes(e,t,o,s){let n=!1,i=t;if(isNaN(i)&&i.end)return i;let r=e;return r||(r={__children:this.data},n=!0,i-=1),null!=o&&i===o?{result:r,end:!0}:null!=s&&r===s?{result:i,end:!0}:(i+=1,r.__children&&(0,l.arrayEach)(r.__children,(e=>{if(this.parentReference.set(e,n?null:r),i=this.readTreeNodes(e,i,o,s),isNaN(i)&&i.end)return!1})),i)}mockParent(){const e=this.mockNode();return e.__children=this.data,e}mockNode(){const e={};return(0,r.objectEach)(this.data[0],((t,o)=>{e[o]=null})),e}getRowIndex(e){return null==e?null:this.cache.nodeInfo.get(e).row}getRowIndexWithinParent(e){let t=null;t=isNaN(e)?e:this.getDataObject(e);const o=this.getRowParent(e);return null==o?this.data.indexOf(t):o.__children.indexOf(t)}countAllRows(){const e={__children:this.data};return this.countChildren(e)}countChildren(e){let t=0,o=e;return isNaN(o)||(o=this.getDataObject(o)),o&&o.__children?((0,l.arrayEach)(o.__children,(e=>{t+=1,e.__children&&(t+=this.countChildren(e))})),t):0}getRowParent(e){let t;return t=isNaN(e)?e:this.getDataObject(e),this.getRowObjectParent(t)}getRowObjectParent(e){return e&&"object"==typeof e?this.cache.nodeInfo.get(e).parent:null}getRowLevel(e){let t=null;return t=isNaN(e)?e:this.getDataObject(e),t?this.getRowObjectLevel(t):null}getRowObjectLevel(e){return null==e?null:this.cache.nodeInfo.get(e).level}hasChildren(e){let t=e;return isNaN(t)||(t=this.getDataObject(t)),!(!t.__children||!t.__children.length)}isChild(e){return null!==this.getRowParent(e)}getChild(e,t){var o;return(null===(o=e.__children)||void 0===o?void 0:o[t])||null}isRowHighestLevel(e){return!this.isChild(e)}isParent(e){var t;let o=e;return isNaN(o)||(o=this.getDataObject(o)),o&&!!o.__children&&0!==(null===(t=o.__children)||void 0===t?void 0:t.length)}addChild(e,t){let o=t;this.hot.runHooks("beforeAddChild",e,o);let s=null;e&&(s=this.getRowIndex(e)),this.hot.runHooks("beforeCreateRow",s+this.countChildren(e)+1,1);let n=e;e||(n=this.mockParent()),n.__children||(n.__children=[]),o||(o=this.mockNode()),n.__children.push(o),this.rewriteCache();const i=this.getRowIndex(o);this.hot.rowIndexMapper.insertIndexes(i,1),this.hot.runHooks("afterCreateRow",i,1),this.hot.runHooks("afterAddChild",e,o)}addChildAtIndex(e,t,o){let s,n=o;if(n||(n=this.mockNode()),this.hot.runHooks("beforeAddChild",e,n,t),e){const o=this.getRowIndex(e)+t+1;this.hot.runHooks("beforeCreateRow",o,1),e.__children.splice(t,null,n),this.rewriteCache(),this.plugin.disableCoreAPIModifiers(),this.hot.setSourceDataAtCell(this.getRowIndexWithinParent(e),"__children",e.__children,"NestedRows.addChildAtIndex"),this.hot.rowIndexMapper.insertIndexes(o,1),this.plugin.enableCoreAPIModifiers(),this.hot.runHooks("afterCreateRow",o,1),s=o}else this.plugin.disableCoreAPIModifiers(),this.hot.alter("insert_row_above",t,1,"NestedRows.addChildAtIndex"),this.plugin.enableCoreAPIModifiers(),s=this.getRowIndex(this.data[t]);n=this.getDataObject(s),this.hot.runHooks("afterAddChild",e,n,t)}addSibling(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"below";const o=this.translateTrimmedRow(e),s=this.getRowParent(o),n=this.getRowIndexWithinParent(o);switch(t){case"below":this.addChildAtIndex(s,n+1,null);break;case"above":this.addChildAtIndex(s,n,null)}}detachFromParent(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=null;const s=[];Array.isArray(e)?((0,i.rangeEach)(e[0],e[2],(e=>{const t=this.translateTrimmedRow(e);s.push(this.getDataObject(t))})),(0,i.rangeEach)(0,s.length-2,(e=>{this.detachFromParent(s[e],!1)})),o=s[s.length-1]):o=e;const n=this.getRowIndex(o),r=this.countChildren(o),l=this.getRowIndexWithinParent(o),a=this.getRowParent(o),h=this.getRowParent(a),c=this.getRowIndex(h);let u=null;if(this.hot.runHooks("beforeDetachChild",a,o),null!=l){const e=Array.from(new Array(n+r+1).keys()).splice(-1*(r+1));if(this.hot.runHooks("beforeRemoveRow",n,r+1,e,this.plugin.pluginName),a.__children.splice(l,1),this.rewriteCache(),this.hot.runHooks("afterRemoveRow",n,r+1,e,this.plugin.pluginName),h){u=c+this.countChildren(h);const e=this.getChild(h,this.countChildren(h)-1),t=this.getRowIndex(e);this.hot.runHooks("beforeCreateRow",t+1,r+1,this.plugin.pluginName),h.__children.push(o)}else u=this.hot.countRows()+1,this.hot.runHooks("beforeCreateRow",u-2,r+1,this.plugin.pluginName),this.data.push(o)}this.rewriteCache(),this.hot.runHooks("afterCreateRow",u-2,r+1,this.plugin.pluginName),this.hot.runHooks("afterDetachChild",a,o,this.getRowIndex(o)),t&&this.hot.render()}filterData(e,t,o){const s=[];(0,l.arrayEach)(o,(e=>{s.push(this.getDataObject(e))})),(0,l.arrayEach)(s,(e=>{const t=this.getRowIndexWithinParent(e),o=this.getRowParent(e);null===o?this.data.splice(t,1):o.__children.splice(t,1)})),this.rewriteCache()}spliceData(e,t,o){const s=this.getDataObject(e-1);let n=null,i=e;s&&s.__children&&0===s.__children.length?(n=s,i=0):e<this.countAllRows()&&(n=this.getRowParent(e),i=this.getRowIndexWithinParent(e)),n?o?n.__children.splice(i,t,...o):n.__children.splice(i,t):o?this.data.splice(i,t,...o):this.data.splice(i,t),this.rewriteCache()}syncRowWithRawSource(e){let t=e,o=null;do{o=this.getRowParent(o),null!==o&&(t=o)}while(null!==o);this.plugin.disableCoreAPIModifiers(),this.hot.setSourceDataAtCell(this.getRowIndex(t),"__children",t.__children,"NestedRows.syncRowWithRawSource"),this.plugin.enableCoreAPIModifiers()}moveRow(e,t,o,s){const n=t===this.hot.countRows(),i=this.getRowParent(e),r=this.getRowIndexWithinParent(e),l=i.__children.slice(r,r+1),a=e>t;let h=n?this.getRowParent(t-1):this.getRowParent(t);null==h&&(h=this.getRowParent(t-1)),null==h&&(h=this.getDataObject(t-1)),h?h.__children||(h.__children=[]):(h=this.getDataObject(t),h.__children=[]);const c=n||o||s?h.__children.length:this.getRowIndexWithinParent(t),u=i===h;h.__children.splice(c,0,l[0]),i.__children.splice(r+(a&&u?1:0),1),this.syncRowWithRawSource(i),u||this.syncRowWithRawSource(h)}translateTrimmedRow(e){return this.plugin.collapsingUI?this.plugin.collapsingUI.translateTrimmedRow(e):e}untranslateTrimmedRow(e){return this.plugin.collapsingUI?this.plugin.collapsingUI.untranslateTrimmedRow(e):e}}},15434:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(99486);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.NestedRows=s.NestedRows},99486:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724),o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var n=s(o(85707)),i=o(61205),r=s(o(59632)),l=s(o(48985)),a=s(o(3263)),h=s(o(88269)),c=o(83119),u=o(56216),d=o(93969),g=o(37947),f=s(o(33809));function p(e,t,o){m(e,t),t.set(e,o)}function m(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function w(e,t){return e.get(v(e,t))}function C(e,t,o){return e.set(v(e,t),o),o}function v(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}o(98953);const y=t.PLUGIN_KEY="nestedRows",E=t.PLUGIN_PRIORITY=300,S=y;var R=new WeakMap,b=new WeakMap,_=new WeakSet;class T extends i.BasePlugin{constructor(){var e,t;super(...arguments),m(e=this,t=_),t.add(e),(0,n.default)(this,"dataManager",null),(0,n.default)(this,"headersUI",null),(0,n.default)(this,"collapsedRowsMap",null),p(this,R,!1),p(this,b,!1)}static get PLUGIN_KEY(){return y}static get PLUGIN_PRIORITY(){return E}isEnabled(){return!!this.hot.getSettings()[y]}enablePlugin(){var e=this;this.enabled||(this.collapsedRowsMap=this.hot.rowIndexMapper.registerMap("nestedRows",new d.TrimmingMap),this.dataManager=new r.default(this,this.hot),this.collapsingUI=new l.default(this,this.hot),this.headersUI=new a.default(this,this.hot),this.contextMenuUI=new h.default(this,this.hot),this.rowMoveController=new f.default(this),this.addHook("afterInit",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(_,e,W).call(e,...o)})),this.addHook("beforeViewRender",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(_,e,B).call(e,...o)})),this.addHook("modifyRowData",(function(){return e.onModifyRowData(...arguments)})),this.addHook("modifySourceLength",(function(){return e.onModifySourceLength(...arguments)})),this.addHook("beforeDataSplice",(function(){return e.onBeforeDataSplice(...arguments)})),this.addHook("filterData",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(_,e,I).call(e,...o)})),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(_,e,N).call(e,...o)})),this.addHook("afterGetRowHeader",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(_,e,A).call(e,...o)})),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(_,e,O).call(e,...o)})),this.addHook("beforeRemoveRow",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(_,e,H).call(e,...o)})),this.addHook("afterRemoveRow",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(_,e,x).call(e,...o)})),this.addHook("beforeAddChild",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(_,e,D).call(e,...o)})),this.addHook("afterAddChild",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(_,e,k).call(e,...o)})),this.addHook("beforeDetachChild",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(_,e,L).call(e,...o)})),this.addHook("afterDetachChild",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(_,e,V).call(e,...o)})),this.addHook("modifyRowHeaderWidth",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(_,e,P).call(e,...o)})),this.addHook("afterCreateRow",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(_,e,F).call(e,...o)})),this.addHook("beforeRowMove",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(_,e,M).call(e,...o)})),this.addHook("beforeLoadData",(e=>v(_,this,U).call(this,e))),this.addHook("beforeUpdateData",(e=>v(_,this,U).call(this,e))),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("nestedRows"),this.unregisterShortcuts(),super.disablePlugin()}updatePlugin(){this.disablePlugin();const e=this.dataManager.getData();this.enablePlugin(),this.dataManager.updateWithData(e),super.updatePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast(),t=this.collapsingUI.translateTrimmedRow(e.row);return this.collapsingUI.areChildrenCollapsed(t)?this.collapsingUI.expandChildren(t):this.collapsingUI.collapseChildren(t),!1},runOnlyIf:()=>{var e,t;const o=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return o&&(null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.isSingle())&&this.hot.selection.isCellVisible(o)&&-1===o.col&&o.row>=0},group:S,relativeToGroup:g.EDITOR_EDIT_GROUP,position:"before"})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(S)}disableCoreAPIModifiers(){C(b,this,!0)}enableCoreAPIModifiers(){C(b,this,!1)}onModifyRowData(e){if(!w(b,this))return this.dataManager.getDataObject(e)}onModifySourceLength(){if(!w(b,this))return this.dataManager.countAllRows()}onBeforeDataSplice(e,t,o){return!(!w(b,this)&&!this.dataManager.isRowHighestLevel(e))||(this.dataManager.spliceData(e,t,o),!1)}destroy(){super.destroy()}}function M(e,t,o,s){return this.rowMoveController.onBeforeRowMove(e,t,o,s)}function O(e,t,o){this.collapsingUI.toggleState(e,t,o)}function I(e,t,o){return this.collapsingUI.collapsedRowsStash.stash(),this.collapsingUI.collapsedRowsStash.trimStash(o[0],t),this.collapsingUI.collapsedRowsStash.shiftStash(o[0],null,-1*t),this.dataManager.filterData(e,t,o),C(R,this,!0),this.dataManager.getData().slice()}function N(e){return this.contextMenuUI.appendOptions(e)}function A(e,t){this.headersUI.appendLevelIndicators(e,t)}function P(e){return Math.max(this.headersUI.rowHeaderWidthCache,e)}function x(e,t,o,s){s!==this.pluginName&&this.hot._registerTimeout((()=>{C(R,this,!1),this.headersUI.updateRowHeaderWidth(),this.collapsingUI.collapsedRowsStash.applyStash()}))}function H(e,t,o){const s=Array.from(o.reduce(((e,t)=>{if(this.dataManager.isParent(t)){const o=this.dataManager.getDataObject(t).__children;return e.add(t),Array.isArray(o)&&o.forEach((t=>e.add(this.dataManager.getRowIndex(t)))),e}return e.add(t)}),new Set));o.length=0,o.push(...s)}function D(){this.collapsingUI.collapsedRowsStash.stash()}function k(e,t){this.collapsingUI.collapsedRowsStash.shiftStash(this.dataManager.getRowIndex(t)),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}function L(){this.collapsingUI.collapsedRowsStash.stash()}function V(e,t,o){this.collapsingUI.collapsedRowsStash.shiftStash(o,null,-1),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}function F(){this.dataManager.rewriteCache()}function W(){this.headersUI.updateRowHeaderWidth()}function B(e,t){w(R,this)&&(t.skipRender=!0)}function U(e){if(!(0,u.isArrayOfObjects)(e))return(0,c.error)("The Nested Rows plugin requires an Array of Objects as a dataset to be provided. The plugin has been disabled."),this.hot.getSettings()[y]=!1,void this.disablePlugin();this.dataManager.setData(e),this.dataManager.rewriteCache()}t.NestedRows=T},7437:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707));t.default=class{constructor(e,t){(0,n.default)(this,"hot",void 0),(0,n.default)(this,"plugin",void 0),this.hot=t,this.plugin=e}}},48985:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(15724);var n=o(79729),i=o(9175),r=o(87485),l=o(9893),a=s(o(7437)),h=s(o(3263));class c extends a.default{constructor(e,t){var o;super(e,t),o=this,this.dataManager=this.plugin.dataManager,this.collapsedRows=[],this.collapsedRowsStash={stash:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];o.lastCollapsedRows=o.collapsedRows.slice(0),o.expandMultipleChildren(o.lastCollapsedRows,e)},shiftStash:function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;null==t&&(t=1/0),(0,i.arrayEach)(o.lastCollapsedRows,((n,i)=>{n>=e&&n<t&&(o.lastCollapsedRows[i]=n+s)}))},applyStash:function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];o.collapseMultipleChildren(o.lastCollapsedRows,e),o.lastCollapsedRows=void 0},trimStash:(e,t)=>{(0,r.rangeEach)(e,e+t-1,(e=>{const t=this.lastCollapsedRows.indexOf(e);t>-1&&this.lastCollapsedRows.splice(t,1)}))}}}collapseChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const s=[];let n=null,r=null,l=null;return isNaN(e)?(n=e,r=this.dataManager.getRowIndex(n)):(n=this.dataManager.getDataObject(e),r=e),this.dataManager.hasChildren(n)&&(0,i.arrayEach)(n.__children,(e=>{s.push(this.dataManager.getRowIndex(e))})),l=this.collapseRows(s,!0,!1),o&&this.trimRows(l),t&&this.renderAndAdjust(),-1===this.collapsedRows.indexOf(r)&&this.collapsedRows.push(r),l}collapseMultipleChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const s=[];(0,i.arrayEach)(e,(e=>{s.push(...this.collapseChildren(e,!1,!1))})),o&&this.trimRows(s),t&&this.renderAndAdjust()}collapseRow(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.collapseRows([e],t)}collapseRows(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=[];return(0,i.arrayEach)(e,(e=>{s.push(e),t&&this.collapseChildRows(e,s)})),o&&this.trimRows(s),s}collapseChildRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.dataManager.hasChildren(e)){const o=this.dataManager.getDataObject(e);(0,i.arrayEach)(o.__children,(e=>{const o=this.dataManager.getRowIndex(e);t.push(o),this.collapseChildRows(o,t)}))}o&&this.trimRows(t)}expandRow(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.expandRows([e],t)}expandRows(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=[];return(0,i.arrayEach)(e,(e=>{s.push(e),t&&this.expandChildRows(e,s)})),o&&this.untrimRows(s),s}expandChildRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.dataManager.hasChildren(e)){const o=this.dataManager.getDataObject(e);(0,i.arrayEach)(o.__children,(e=>{if(!this.isAnyParentCollapsed(e)){const o=this.dataManager.getRowIndex(e);t.push(o),this.expandChildRows(o,t)}}))}o&&this.untrimRows(t)}expandChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const s=[];let n=null,r=null,l=null;return isNaN(e)?(n=e,r=this.dataManager.getRowIndex(e)):(n=this.dataManager.getDataObject(e),r=e),this.collapsedRows.splice(this.collapsedRows.indexOf(r),1),this.dataManager.hasChildren(n)&&(0,i.arrayEach)(n.__children,(e=>{const t=this.dataManager.getRowIndex(e);s.push(t)})),l=this.expandRows(s,!0,!1),o&&this.untrimRows(l),t&&this.renderAndAdjust(),l}expandMultipleChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const s=[];(0,i.arrayEach)(e,(e=>{s.push(...this.expandChildren(e,!1,!1))})),o&&this.untrimRows(s),t&&this.renderAndAdjust()}collapseAll(){const e=this.dataManager.getData(),t=[];(0,i.arrayEach)(e,(e=>{this.dataManager.hasChildren(e)&&t.push(e)})),this.collapseMultipleChildren(t),this.renderAndAdjust()}expandAll(){const e=this.dataManager.getData(),t=[];(0,i.arrayEach)(e,(e=>{this.dataManager.hasChildren(e)&&t.push(e)})),this.expandMultipleChildren(t),this.renderAndAdjust()}trimRows(e){this.hot.batchExecution((()=>{(0,i.arrayEach)(e,(e=>{this.plugin.collapsedRowsMap.setValueAtIndex(e,!0)}))}),!0)}untrimRows(e){this.hot.batchExecution((()=>{(0,i.arrayEach)(e,(e=>{this.plugin.collapsedRowsMap.setValueAtIndex(e,!1)}))}),!0)}areChildrenCollapsed(e){let t=isNaN(e)?e:this.dataManager.getDataObject(e),o=!0;return null===t&&(t={__children:this.dataManager.data}),this.dataManager.hasChildren(t)&&(0,i.arrayEach)(t.__children,(e=>{const t=this.dataManager.getRowIndex(e);if(!this.plugin.collapsedRowsMap.getValueAtIndex(t))return o=!1,!1})),o}isAnyParentCollapsed(e){let t=e;for(;null!==t;){t=this.dataManager.getRowParent(t);const e=this.dataManager.getRowIndex(t);if(this.collapsedRows.indexOf(e)>-1)return!0}return!1}toggleState(e,t){if(t.col>=0)return;const o=this.translateTrimmedRow(t.row);(0,l.hasClass)(e.target,h.default.CSS_CLASSES.button)&&(this.areChildrenCollapsed(o)?this.expandChildren(o):this.collapseChildren(o),(0,n.stopImmediatePropagation)(e))}translateTrimmedRow(e){return this.hot.toPhysicalRow(e)}untranslateTrimmedRow(e){return this.hot.toVisualRow(e)}renderAndAdjust(){this.hot.render(),this.hot.view.adjustElementsSize()}}t.default=c},88269:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=s(o(85707)),i=o(87485),r=o(9175),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=h(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(50884)),a=s(o(7437));function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(h=function(e){return e?o:t})(e)}function c(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function u(e,t){return e.get(function(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}(e,t))}var d=new WeakMap;class g extends a.default{constructor(){super(...arguments),(0,n.default)(this,"dataManager",this.plugin.dataManager),c(this,d,{row_above:(e,t)=>{const o=t[t.length-1];this.dataManager.addSibling(o.start.row,"above")},row_below:(e,t)=>{const o=t[t.length-1];this.dataManager.addSibling(o.start.row,"below")}})}appendOptions(e){const t=[{key:"add_child",name(){return this.getTranslatedPhrase(l.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD)},callback:()=>{const e=this.dataManager.translateTrimmedRow(this.hot.getSelectedLast()[0]),t=this.dataManager.getDataObject(e);this.dataManager.addChild(t)},disabled:()=>{const e=this.hot.getSelectedLast();return!e||e[0]<0||this.hot.selection.isSelectedByColumnHeader()||this.hot.countRows()>=this.hot.getSettings().maxRows}},{key:"detach_from_parent",name(){return this.getTranslatedPhrase(l.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD)},callback:()=>{this.dataManager.detachFromParent(this.hot.getSelectedLast())},disabled:()=>{const e=this.hot.getSelectedLast(),t=this.dataManager.translateTrimmedRow(e[0]);return!this.dataManager.getRowParent(t)||!e||e[0]<0||this.hot.selection.isSelectedByColumnHeader()||this.hot.countRows()>=this.hot.getSettings().maxRows}},{name:"---------"}];return(0,i.rangeEach)(0,e.items.length-1,(o=>{if(0===o)return(0,r.arrayEach)(t,((t,s)=>{e.items.splice(o+s,0,t)})),!1})),this.modifyRowInsertingOptions(e)}modifyRowInsertingOptions(e){return(0,i.rangeEach)(0,e.items.length-1,(t=>{const o=u(d,this)[e.items[t].key];null!=o&&(e.items[t].callback=o)})),e}}t.default=g},3263:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=o(9175),i=o(87485),r=o(9893),l=s(o(7437)),a=o(92692);class h extends l.default{static get CSS_CLASSES(){return{indicatorContainer:"ht_nestingLevels",parent:"ht_nestingParent",indicator:"ht_nestingLevel",emptyIndicator:"ht_nestingLevel_empty",button:"ht_nestingButton",expandButton:"ht_nestingExpand",collapseButton:"ht_nestingCollapse"}}constructor(e,t){super(e,t),this.dataManager=this.plugin.dataManager,this.collapsingUI=this.plugin.collapsingUI,this.rowHeaderWidthCache=null}appendLevelIndicators(e,t){const o=this.hot.toPhysicalRow(e),s=this.dataManager.getRowLevel(o),l=this.dataManager.getDataObject(o),c=t.getElementsByTagName("DIV")[0],u=c.querySelector("span.rowHeader"),d=c.querySelectorAll('[class^="ht_nesting"]'),g=this.hot.getSettings().ariaTags;if((0,n.arrayEach)(d,(e=>{e&&c.removeChild(e)})),(0,r.addClass)(t,h.CSS_CLASSES.indicatorContainer),s){const{rootDocument:e}=this.hot,t=u.cloneNode(!0);c.innerHTML="",(0,i.rangeEach)(0,s-1,(()=>{const t=e.createElement("SPAN");(0,r.addClass)(t,h.CSS_CLASSES.emptyIndicator),c.appendChild(t)})),c.appendChild(t)}if(this.dataManager.hasChildren(l)){const e=this.hot.rootDocument.createElement("DIV");g&&(0,r.setAttribute)(e,[(0,a.A11Y_HIDDEN)()]),(0,r.addClass)(t,h.CSS_CLASSES.parent),this.collapsingUI.areChildrenCollapsed(o)?((0,r.addClass)(e,`${h.CSS_CLASSES.button} ${h.CSS_CLASSES.expandButton}`),g&&(0,r.setAttribute)(t,[(0,a.A11Y_EXPANDED)(!1)])):((0,r.addClass)(e,`${h.CSS_CLASSES.button} ${h.CSS_CLASSES.collapseButton}`),g&&(0,r.setAttribute)(t,[(0,a.A11Y_EXPANDED)(!0)])),c.appendChild(e)}}updateRowHeaderWidth(e){let t=e;t||(t=this.dataManager.cache.levelCount),this.rowHeaderWidthCache=Math.max(50,11+10*t+25),this.hot.render()}}t.default=h},33809:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(15724);var n=s(o(85707)),i=o(38893),r=o(83119),l=o(28927);t.default=class{constructor(e){(0,n.default)(this,"plugin",void 0),(0,n.default)(this,"hot",void 0),(0,n.default)(this,"dataManager",void 0),(0,n.default)(this,"collapsingUI",void 0),this.plugin=e,this.hot=e.hot,this.dataManager=e.dataManager,this.collapsingUI=e.collapsingUI}onBeforeRowMove(e,t,o,s){if(this.displayAPICompatibilityWarning({rows:e,finalIndex:t,dropIndex:o,movePossible:s}))return!1;this.movedToCollapsed=!1;const n=o===this.hot.countRows(),i=n?this.hot.countSourceRows():this.dataManager.translateTrimmedRow(o);let r=!0;const l=e.map((e=>{if(!r)return!1;const t=this.dataManager.translateTrimmedRow(e);return r=this.shouldAllowMoving(t,i),t})),a=-1===l.indexOf(i);if(!r||!a)return!1;const h=this.getBaseParent(l),c=this.getTargetParent(n,i),u=h===c;return this.movedToCollapsed=this.collapsingUI.areChildrenCollapsed(c),this.collapsingUI.collapsedRowsStash.stash(),this.shiftCollapsibleParentsLocations(l,i,u),this.moveRows(l,i,c),this.dataManager.rewriteCache(),this.moveCellsMeta(l,i),this.collapsingUI.collapsedRowsStash.applyStash(!1),this.hot.runHooks("afterRowMove",e,t,o,s,s&&this.isRowOrderChanged(e,t)),this.hot.render(),this.selectCells(e,o),!1}displayAPICompatibilityWarning(e){const{rows:t,finalIndex:o,dropIndex:s,movePossible:n}=e;let a=!1;return(0,i.isUndefined)(s)&&((0,r.warn)(l.toSingleLine`Since version 8.0.0 of the Handsontable the 'moveRows' method isn't used for moving rows\x20
87
87
  when the NestedRows plugin is enabled. Please use the 'dragRows' method instead.`),this.hot.runHooks("afterRowMove",t,o,s,n,!1),a=!0),a}shouldAllowMoving(e,t){return!(this.dataManager.isParent(e)||this.dataManager.isRowHighestLevel(e)||e===t||0===t)}getBaseParent(e){return this.dataManager.getRowParent(e[0])}getTargetParent(e,t){let o=this.dataManager.getRowParent(e?t-1:t);return null==o&&(o=this.dataManager.getRowParent(t-1)),o}shiftCollapsibleParentsLocations(e,t,o){o||(Math.max(...e)<=t?this.collapsingUI.collapsedRowsStash.shiftStash(e[0],t,-1*e.length):this.collapsingUI.collapsedRowsStash.shiftStash(t,e[0],e.length))}moveRows(e,t,o){const s=t===this.dataManager.getRowIndex(o)+this.dataManager.countChildren(o)+1;this.hot.batchRender((()=>{e.forEach((e=>{this.dataManager.moveRow(e,t,this.movedToCollapsed,s)}))}))}moveCellsMeta(e,t){const o=[],s=Math.max(...e)<t;e.forEach((e=>{o.push(this.hot.getCellMetaAtRow(e))})),this.hot.spliceCellsMeta(e[0],e.length),this.hot.spliceCellsMeta(t-(s?o.length:0),0,...o)}selectCells(e,t){const o=e.length;let s=0,n=0,i=null,r=null;if(this.movedToCollapsed){let i=null;i=e[o-1]<t?this.dataManager.translateTrimmedRow(t-o):this.dataManager.translateTrimmedRow(t);const r=this.dataManager.getRowParent(null===i?this.hot.countSourceRows()-1:i-1),l=this.dataManager.getRowIndex(r);s=this.dataManager.untranslateTrimmedRow(l),n=s}else e[o-1]<t?(n=t-1,s=n-o+1):(s=t,n=s+o-1);i=this.hot.selection,r=this.hot.countCols()-1,i.setRangeStart(this.hot._createCellCoords(s,0)),i.setRangeEnd(this.hot._createCellCoords(n,r),!0)}isRowOrderChanged(e,t){return e.some(((e,o)=>e-o!==t))}}},46634:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(8072);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.PersistentState=s.PersistentState},8072:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707)),i=o(61205),r=s(o(88959)),l=s(o(56937));l.default.getSingleton().register("persistentStateSave"),l.default.getSingleton().register("persistentStateLoad"),l.default.getSingleton().register("persistentStateReset");const a=t.PLUGIN_KEY="persistentState",h=t.PLUGIN_PRIORITY=0;class c extends i.BasePlugin{constructor(){super(...arguments),(0,n.default)(this,"storage",void 0)}static get PLUGIN_KEY(){return a}static get PLUGIN_PRIORITY(){return h}isEnabled(){return!!this.hot.getSettings()[a]}enablePlugin(){this.enabled||(this.storage||(this.storage=new r.default(this.hot.rootElement.id,this.hot.rootWindow)),this.addHook("persistentStateSave",((e,t)=>this.saveValue(e,t))),this.addHook("persistentStateLoad",((e,t)=>this.loadValue(e,t))),this.addHook("persistentStateReset",(()=>this.resetValue())),super.enablePlugin())}disablePlugin(){this.storage=void 0,super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}loadValue(e,t){t.value=this.storage.loadValue(e)}saveValue(e,t){this.storage.saveValue(e,t)}resetValue(e){void 0===e?this.storage.resetAll():this.storage.reset(e)}destroy(){super.destroy()}}t.PersistentState=c},88959:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(15724),o(66184);var n=s(o(85707)),i=o(9175);t.default=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;(0,n.default)(this,"rootWindow",void 0),(0,n.default)(this,"prefix",void 0),(0,n.default)(this,"savedKeys",[]),this.rootWindow=t,this.prefix=e,this.loadSavedKeys()}saveValue(e,t){this.rootWindow.localStorage.setItem(`${this.prefix}_${e}`,JSON.stringify(t)),-1===this.savedKeys.indexOf(e)&&(this.savedKeys.push(e),this.saveSavedKeys())}loadValue(e,t){const o=void 0===e?t:e,s=this.rootWindow.localStorage.getItem(`${this.prefix}_${o}`);return null===s?void 0:JSON.parse(s)}reset(e){this.rootWindow.localStorage.removeItem(`${this.prefix}_${e}`)}resetAll(){(0,i.arrayEach)(this.savedKeys,((e,t)=>{this.rootWindow.localStorage.removeItem(`${this.prefix}_${this.savedKeys[t]}`)})),this.clearSavedKeys()}loadSavedKeys(){const e=this.rootWindow.localStorage.getItem(`${this.prefix}__persistentStateKeys`),t="string"==typeof e?JSON.parse(e):void 0;this.savedKeys=t||[]}saveSavedKeys(){this.rootWindow.localStorage.setItem(`${this.prefix}__persistentStateKeys`,JSON.stringify(this.savedKeys))}clearSavedKeys(){this.savedKeys.length=0,this.saveSavedKeys()}}},90532:(e,t,o)=>{"use strict";t.__esModule=!0,t.getPlugin=u,t.getPluginsNames=function(){return[...a.getItems(),...h.getItems()]},t.hasPlugin=function(e){return!!u(e)},t.registerPlugin=function(e,t,o){[e,t,o]=function(e,t,o){"function"==typeof e&&(e=(t=e).PLUGIN_KEY,o=t.PLUGIN_PRIORITY);return[e,t,o]}(e,t,o),void 0===u(e)&&function(e,t,o){const n=(0,s.toUpperCaseFirst)(e);if(c.hasItem(n))throw new Error(l(n));void 0===o?h.addItem(n):a.addItem(o,n);c.addItem(n,t)}(e,t,o)},o(67834);var s=o(59777),n=o(38867),i=o(84134),r=o(64788);const l=e=>`There is already registered "${e}" plugin.`,a=(0,n.createPriorityMap)({errorPriorityExists:e=>`There is already registered plugin on priority "${e}".`,errorPriorityNaN:e=>`The priority "${e}" is not a number.`}),h=(0,r.createUniqueSet)({errorItemExists:l}),c=(0,i.createUniqueMap)({errorIdExists:l});function u(e){const t=(0,s.toUpperCaseFirst)(e);return c.getItem(t)}},33004:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(47726);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.Search=s.Search},47726:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(61205),r=o(13911),l=o(87485),a=o(38893);function h(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function c(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}const u=t.PLUGIN_KEY="search",d=t.PLUGIN_PRIORITY=190,g=function(e,t,o,s,n){e.getCellMeta(t,o).isSearchResult=n},f=function(e,t,o){return!((0,a.isUndefined)(e)||null===e||!e.toLocaleLowerCase||0===e.length)&&(!(0,a.isUndefined)(t)&&null!==t&&-1!==t.toString().toLocaleLowerCase(o.locale).indexOf(e.toLocaleLowerCase(o.locale)))};var p=new WeakSet;class m extends i.BasePlugin{constructor(){super(...arguments),h(this,p),(0,n.default)(this,"callback",g),(0,n.default)(this,"queryMethod",f),(0,n.default)(this,"searchResultClass","htSearchResult")}static get PLUGIN_KEY(){return u}static get PLUGIN_PRIORITY(){return d}isEnabled(){return this.hot.getSettings()[u]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[u];this.updatePluginSettings(t),this.addHook("beforeRenderer",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return c(p,e,w).call(e,...o)})),super.enablePlugin()}disablePlugin(){var e=this;const t=function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return c(p,e,w).call(e,...o)};this.hot.addHook("beforeRenderer",t),this.hot.addHookOnce("afterViewRender",(()=>{this.hot.removeHook("beforeRenderer",t)})),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}query(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getCallback(),o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.getQueryMethod();const s=this.hot.countRows(),n=this.hot.countCols(),i=[],r=this.hot;return(0,l.rangeEach)(0,s-1,(s=>{(0,l.rangeEach)(0,n-1,(n=>{const l=this.hot.getDataAtCell(s,n),a=this.hot.getCellMeta(s,n),h=a.search.callback||t,c=(a.search.queryMethod||o)(e,l,a);if(c){const e={row:s,col:n,data:l};i.push(e)}h&&h(r,s,n,l,c)}))})),i}getCallback(){return this.callback}setCallback(e){this.callback=e}getQueryMethod(){return this.queryMethod}setQueryMethod(e){this.queryMethod=e}getSearchResultClass(){return this.searchResultClass}setSearchResultClass(e){this.searchResultClass=e}updatePluginSettings(e){(0,r.isObject)(e)&&(e.searchResultClass&&this.setSearchResultClass(e.searchResultClass),e.queryMethod&&this.setQueryMethod(e.queryMethod),e.callback&&this.setCallback(e.callback))}destroy(){super.destroy()}}function w(e,t,o,s,n,i){const r=i.className||[];let l=[];"string"==typeof r?l=r.split(" "):l.push(...r),this.isEnabled()&&i.isSearchResult?l.includes(this.searchResultClass)||l.push(`${this.searchResultClass}`):l.includes(this.searchResultClass)&&l.splice(l.indexOf(this.searchResultClass),1),i.className=l.join(" ")}t.Search=m},70618:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(17112);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.TouchScroll=s.TouchScroll},17112:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(9893),r=o(9175),l=o(61205),a=o(93980);function h(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function c(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}const u=t.PLUGIN_KEY="touchScroll",d=t.PLUGIN_PRIORITY=200;var g=new WeakSet;class f extends l.BasePlugin{constructor(){super(...arguments),h(this,g),(0,n.default)(this,"scrollbars",[]),(0,n.default)(this,"clones",[]),(0,n.default)(this,"lockedCollection",!1),(0,n.default)(this,"freezeOverlays",!1)}static get PLUGIN_KEY(){return u}static get PLUGIN_PRIORITY(){return d}static get SETTING_KEYS(){return!0}isEnabled(){return(0,a.isTouchSupported)()}enablePlugin(){this.enabled||(this.addHook("afterViewRender",(()=>c(g,this,p).call(this))),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.lockedCollection=!1,super.updatePlugin()}disablePlugin(){super.disablePlugin()}registerEvents(){this.addHook("beforeTouchScroll",(()=>c(g,this,m).call(this))),this.addHook("afterMomentumScroll",(()=>c(g,this,w).call(this)))}}function p(){if(this.lockedCollection)return;const{topOverlay:e,bottomOverlay:t,inlineStartOverlay:o,topInlineStartCornerOverlay:s,bottomInlineStartCornerOverlay:n}=this.hot.view._wt.wtOverlays;this.lockedCollection=!0,this.scrollbars.length=0,this.scrollbars.push(e),t.clone&&this.scrollbars.push(t),this.scrollbars.push(o),s&&this.scrollbars.push(s),n&&n.clone&&this.scrollbars.push(n),this.clones=[],e.needFullRender&&this.clones.push(e.clone.wtTable.holder.parentNode),t.needFullRender&&this.clones.push(t.clone.wtTable.holder.parentNode),o.needFullRender&&this.clones.push(o.clone.wtTable.holder.parentNode),s&&this.clones.push(s.clone.wtTable.holder.parentNode),n&&n.clone&&this.clones.push(n.clone.wtTable.holder.parentNode)}function m(){this.freezeOverlays=!0,(0,r.arrayEach)(this.clones,(e=>{(0,i.addClass)(e,"hide-tween")}))}function w(){this.freezeOverlays=!1,(0,r.arrayEach)(this.clones,(e=>{(0,i.removeClass)(e,"hide-tween"),(0,i.addClass)(e,"show-tween")})),this.hot._registerTimeout((()=>{(0,r.arrayEach)(this.clones,(e=>{(0,i.removeClass)(e,"show-tween")}))}),400),(0,r.arrayEach)(this.scrollbars,(e=>{e.refresh(),e.resetFixedPosition()})),this.hot.view._wt.wtOverlays.syncScrollWithMaster()}t.TouchScroll=f},97089:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(55156);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.TrimRows=s.TrimRows},55156:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724),o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var n=s(o(85707)),i=o(61205),r=o(93969),l=o(9175);function a(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}const h=t.PLUGIN_KEY="trimRows",c=t.PLUGIN_PRIORITY=330;var u=new WeakSet;class d extends i.BasePlugin{constructor(){super(...arguments),a(this,u),(0,n.default)(this,"trimmedRowsMap",null)}static get PLUGIN_KEY(){return h}static get PLUGIN_PRIORITY(){return c}isEnabled(){return!!this.hot.getSettings()[h]}enablePlugin(){this.enabled||(this.trimmedRowsMap=this.hot.rowIndexMapper.registerMap("trimRows",new r.TrimmingMap),this.trimmedRowsMap.addLocalHook("init",(()=>function(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}(u,this,g).call(this))),super.enablePlugin())}updatePlugin(){const e=this.hot.getSettings()[h];Array.isArray(e)&&this.hot.batchExecution((()=>{this.trimmedRowsMap.clear(),(0,l.arrayEach)(e,(e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)}))}),!0),super.updatePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("trimRows"),super.disablePlugin()}getTrimmedRows(){return this.trimmedRowsMap.getTrimmedIndexes()}trimRows(e){const t=this.getTrimmedRows(),o=this.isValidConfig(e);let s=t;o&&(s=Array.from(new Set(t.concat(e))));!1!==this.hot.runHooks("beforeTrimRow",t,s,o)&&(o&&this.hot.batchExecution((()=>{(0,l.arrayEach)(e,(e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)}))}),!0),this.hot.runHooks("afterTrimRow",t,s,o,o&&s.length>t.length))}trimRow(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.trimRows(t)}untrimRows(e){const t=this.getTrimmedRows(),o=this.isValidConfig(e);let s=t;const n=this.trimmedRowsMap.getValues().slice(),i=e.length>0;o&&i&&((0,l.arrayEach)(e,(e=>{n[e]=!1})),s=(0,l.arrayReduce)(n,((e,t,o)=>(t&&e.push(o),e)),[]));!1!==this.hot.runHooks("beforeUntrimRow",t,s,o&&i)&&(o&&i&&this.trimmedRowsMap.setValues(n),this.hot.runHooks("afterUntrimRow",t,s,o&&i,o&&s.length<t.length))}untrimRow(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.untrimRows(t)}isTrimmed(e){return this.trimmedRowsMap.getValueAtIndex(e)||!1}untrimAll(){this.untrimRows(this.getTrimmedRows())}isValidConfig(e){const t=this.hot.countSourceRows();return e.every((e=>Number.isInteger(e)&&e>=0&&e<t))}destroy(){super.destroy()}}function g(){const e=this.hot.getSettings()[h];Array.isArray(e)&&this.hot.batchExecution((()=>{(0,l.arrayEach)(e,(e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)}))}),!0)}t.TrimRows=d},69922:(e,t,o)=>{"use strict";t.__esModule=!0;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&{}.hasOwnProperty.call(e,r)){var l=i?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(46354));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}t.UndoRedo=s.default,t.PLUGIN_KEY=s.PLUGIN_KEY},46354:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(15724),o(75339);var n=s(o(56937)),i=o(9175),r=o(87485),l=o(13911),a=o(80485),h=o(77408);const c="undoRedo",u=t.PLUGIN_KEY="undoRedo";function d(e){const t=this;this.instance=e,this.doneActions=[],this.undoneActions=[],this.ignoreNewActions=!1,this.enabled=!1,e.addHook("afterChange",(function(o,s){const n=o&&o.length;if(!n)return;if(!o.find((e=>{const[,,t,o]=e;return t!==o})))return;t.done((()=>{const t=o.reduce(((e,t)=>(e.push([...t]),e)),[]);(0,i.arrayEach)(t,(t=>{t[1]=e.propToCol(t[1])}));const s=n>1?this.getSelected():[[t[0][0],t[0][1]]];return new d.ChangeAction(t,s)}),s)})),e.addHook("afterCreateRow",((e,o,s)=>{t.done((()=>new d.CreateRowAction(e,o)),s)}));const o=(t,o,s,n)=>{const i=["visualRow","visualCol","row","col","prop"],l=i.length,a=[];return(0,r.rangeEach)(s,n,(s=>{(0,r.rangeEach)(t,o,(t=>{const o=e.getCellMeta(t,s);if(Object.keys(o).length!==l){const e=Object.fromEntries(Object.entries(o).filter((e=>{let[t]=e;return!1===i.includes(t)})));a.push([o.visualRow,o.visualCol,e])}}))})),a};e.addHook("beforeRemoveRow",((s,n,i,r)=>{t.done((()=>{const i=e.toPhysicalRow(s),r=i+n-1,a=(0,l.deepClone)(t.instance.getSourceData(i,0,i+n-1,t.instance.countSourceCols()-1));return new d.RemoveRowAction(i,a,e.getSettings().fixedRowsBottom,e.getSettings().fixedRowsTop,e.rowIndexMapper.getIndexesSequence(),o(i,r,0,e.countCols()-1))}),r)})),e.addHook("afterCreateCol",((e,o,s)=>{t.done((()=>new d.CreateColumnAction(e,o)),s)})),e.addHook("beforeRemoveCol",((s,n,i,l)=>{t.done((()=>{const i=t.instance.getSourceDataArray(),l=(t.instance.countCols()+s)%t.instance.countCols(),a=l+n-1,h=[],c=[],u=[];(0,r.rangeEach)(i.length-1,(t=>{const o=[],s=i[t];(0,r.rangeEach)(l,a,(t=>{o.push(s[e.toPhysicalColumn(t)])})),h.push(o)})),(0,r.rangeEach)(n-1,(t=>{u.push(e.toPhysicalColumn(l+t))})),Array.isArray(e.getSettings().colHeaders)&&(0,r.rangeEach)(n-1,(t=>{c.push(e.getSettings().colHeaders[e.toPhysicalColumn(l+t)]||null)}));const g=e.columnIndexMapper.getIndexesSequence(),f=e.rowIndexMapper.getIndexesSequence();return new d.RemoveColumnAction(l,u,h,c,g,f,e.getSettings().fixedColumnsStart,o(0,e.countRows(),l,a))}),l)})),e.addHook("beforeCellAlignment",((e,o,s,n)=>{t.done((()=>new d.CellAlignmentAction(e,o,s,n)))})),e.addHook("beforeFilter",((e,o)=>{t.done((()=>new d.FiltersAction(e,o)))})),e.addHook("beforeRowMove",((e,o)=>{!1!==e&&t.done((()=>new d.RowMoveAction(e,o)))})),e.addHook("beforeColumnMove",((e,o)=>{!1!==e&&t.done((()=>new d.ColumnMoveAction(e,o)))})),e.addHook("beforeMergeCells",((o,s)=>{s||t.done((()=>new d.MergeCellsAction(e,o)))})),e.addHook("afterUnmergeCells",((o,s)=>{s||t.done((()=>new d.UnmergeCellsAction(e,o)))})),e.addHook("beforeColumnSort",((e,o,s)=>{s&&t.done((()=>new d.ColumnSortAction(e,o)))})),e.addHook("afterInit",(()=>{t.init()}))}d.prototype.done=function(e,t){if(this.ignoreNewActions)return;if("UndoRedo.undo"===t||"UndoRedo.redo"===t||"auto"===t)return;const o=this.doneActions.slice();if(!1===this.instance.runHooks("beforeUndoStackChange",o,t))return;const s=e(),n=this.undoneActions.slice();this.doneActions.push(s),this.instance.runHooks("afterUndoStackChange",o,this.doneActions.slice()),this.instance.runHooks("beforeRedoStackChange",n),this.undoneActions.length=0,this.instance.runHooks("afterRedoStackChange",n,this.undoneActions.slice())},d.prototype.undo=function(){if(this.isUndoAvailable()){const e=this.doneActions.slice();this.instance.runHooks("beforeUndoStackChange",e);const t=this.doneActions.pop();this.instance.runHooks("afterUndoStackChange",e,this.doneActions.slice());const o=(0,l.deepClone)(t);if(!1===this.instance.runHooks("beforeUndo",o))return;this.ignoreNewActions=!0;const s=this,n=this.undoneActions.slice();this.instance.runHooks("beforeRedoStackChange",n),t.undo(this.instance,(()=>{s.ignoreNewActions=!1,s.undoneActions.push(t)})),this.instance.runHooks("afterRedoStackChange",n,this.undoneActions.slice()),this.instance.runHooks("afterUndo",o)}},d.prototype.redo=function(){if(this.isRedoAvailable()){const e=this.undoneActions.slice();this.instance.runHooks("beforeRedoStackChange",e);const t=this.undoneActions.pop();this.instance.runHooks("afterRedoStackChange",e,this.undoneActions.slice());const o=(0,l.deepClone)(t);if(!1===this.instance.runHooks("beforeRedo",o))return;this.ignoreNewActions=!0;const s=this,n=this.doneActions.slice();this.instance.runHooks("beforeUndoStackChange",n),t.redo(this.instance,(()=>{s.ignoreNewActions=!1,s.doneActions.push(t)})),this.instance.runHooks("afterUndoStackChange",n,this.doneActions.slice()),this.instance.runHooks("afterRedo",o)}},d.prototype.isUndoAvailable=function(){return this.doneActions.length>0},d.prototype.isRedoAvailable=function(){return this.undoneActions.length>0},d.prototype.clear=function(){this.doneActions.length=0,this.undoneActions.length=0},d.prototype.isEnabled=function(){return this.enabled},d.prototype.enable=function(){if(this.isEnabled())return;const e=this.instance;var t;this.enabled=!0,(t=e).undo=function(){return t.undoRedo.undo()},t.redo=function(){return t.undoRedo.redo()},t.isUndoAvailable=function(){return t.undoRedo.isUndoAvailable()},t.isRedoAvailable=function(){return t.undoRedo.isRedoAvailable()},t.clearUndo=function(){return t.undoRedo.clear()},this.registerShortcuts(),e.addHook("afterChange",p)},d.prototype.disable=function(){if(!this.isEnabled())return;const e=this.instance;var t;this.enabled=!1,delete(t=e).undo,delete t.redo,delete t.isUndoAvailable,delete t.isRedoAvailable,delete t.clearUndo,this.unregisterShortcuts(),e.removeHook("afterChange",p)},d.prototype.destroy=function(){this.clear(),this.instance=null,this.doneActions=null,this.undoneActions=null},d.Action=function(){},d.Action.prototype.undo=function(){},d.Action.prototype.redo=function(){},d.ChangeAction=function(e,t){this.changes=e,this.selected=t,this.actionType="change"},(0,l.inherit)(d.ChangeAction,d.Action),d.ChangeAction.prototype.undo=function(e,t){const o=(0,l.deepClone)(this.changes),s=e.countEmptyRows(!0),n=e.countEmptyCols(!0);for(let e=0,t=o.length;e<t;e++)o[e].splice(3,1);e.addHookOnce("afterChange",t),e.setDataAtCell(o,null,null,"UndoRedo.undo");for(let t=0,i=o.length;t<i;t++){const[i,r]=o[t];e.getSettings().minSpareRows&&i+1+e.getSettings().minSpareRows===e.countRows()&&s===e.getSettings().minSpareRows&&(e.alter("remove_row",parseInt(i+1,10),e.getSettings().minSpareRows),e.undoRedo.doneActions.pop()),e.getSettings().minSpareCols&&r+1+e.getSettings().minSpareCols===e.countCols()&&n===e.getSettings().minSpareCols&&(e.alter("remove_col",parseInt(r+1,10),e.getSettings().minSpareCols),e.undoRedo.doneActions.pop())}const i=e.getSelectedLast();if(void 0!==i){const[t,s]=o[0],[n,r]=i,l=t>=e.view.getFirstFullyVisibleRow(),a=s>=e.view.getFirstFullyVisibleColumn();if(!1===(l&&a)&&!0===(n!==t||r!==s)){const o={row:t,col:s};!1===l&&(o.verticalSnap="top"),!1===a&&(o.horizontalSnap="start"),e.scrollViewportTo(o)}}e.selectCells(this.selected,!1,!1)},d.ChangeAction.prototype.redo=function(e,t){const o=(0,l.deepClone)(this.changes);for(let e=0,t=o.length;e<t;e++)o[e].splice(2,1);e.addHookOnce("afterChange",t),e.setDataAtCell(o,null,null,"UndoRedo.redo"),this.selected&&e.selectCells(this.selected,!1,!1)},d.CreateRowAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_row"},(0,l.inherit)(d.CreateRowAction,d.Action),d.CreateRowAction.prototype.undo=function(e,t){const o=e.countRows(),s=e.getSettings().minSpareRows;this.index>=o&&this.index-s<o&&(this.index-=s),e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.amount,"UndoRedo.undo")},d.CreateRowAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateRow",t),e.alter("insert_row_above",this.index,this.amount,"UndoRedo.redo")},d.RemoveRowAction=function(e,t,o,s,n,i){this.index=e,this.data=t,this.actionType="remove_row",this.fixedRowsBottom=o,this.fixedRowsTop=s,this.rowIndexesSequence=n,this.removedCellMetas=i},(0,l.inherit)(d.RemoveRowAction,d.Action),d.RemoveRowAction.prototype.undo=function(e,t){const o=e.getSettings(),s=[];o.fixedRowsBottom=this.fixedRowsBottom,o.fixedRowsTop=this.fixedRowsTop,this.data.forEach(((e,t)=>{Object.keys(e).forEach((o=>{const n=parseInt(o,10);s.push([this.index+t,isNaN(n)?o:n,e[o]])}))})),e.alter("insert_row_above",this.index,this.data.length,"UndoRedo.undo"),this.removedCellMetas.forEach((t=>{let[o,s,n]=t;e.setCellMetaObject(o,s,n)})),e.addHookOnce("afterViewRender",t),e.setSourceDataAtCell(s,null,null,"UndoRedo.undo"),e.rowIndexMapper.setIndexesSequence(this.rowIndexesSequence)},d.RemoveRowAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.data.length,"UndoRedo.redo")},d.CreateColumnAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_col"},(0,l.inherit)(d.CreateColumnAction,d.Action),d.CreateColumnAction.prototype.undo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.undo")},d.CreateColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateCol",t),e.alter("insert_col_start",this.index,this.amount,"UndoRedo.redo")},d.RemoveColumnAction=function(e,t,o,s,n,i,r,l){this.index=e,this.indexes=t,this.data=o,this.amount=this.data[0].length,this.headers=s,this.columnPositions=n.slice(0),this.rowPositions=i.slice(0),this.actionType="remove_col",this.fixedColumnsStart=r,this.removedCellMetas=l},(0,l.inherit)(d.RemoveColumnAction,d.Action),d.RemoveColumnAction.prototype.undo=function(e,t){e.getSettings().fixedColumnsStart=this.fixedColumnsStart;const o=this.indexes.slice(0).sort(),s=(e,t,s)=>s[this.indexes.indexOf(o[t])],n=this.data.length,r=[];for(let e=0;e<n;e++)r.push((0,i.arrayMap)(this.data[e],s));const l=(0,i.arrayMap)(this.headers,s),a=[];e.alter("insert_col_start",this.indexes[0],this.indexes.length,"UndoRedo.undo"),(0,i.arrayEach)(e.getSourceDataArray(),((e,t)=>{(0,i.arrayEach)(o,((o,s)=>{e[o]=r[t][s],a.push([t,o,e[o]])}))})),e.setSourceDataAtCell(a,void 0,void 0,"UndoRedo.undo"),void 0!==this.headers&&(0,i.arrayEach)(l,((t,s)=>{e.getSettings().colHeaders[o[s]]=t})),this.removedCellMetas.forEach((t=>{let[o,s,n]=t;e.setCellMetaObject(o,s,n)})),e.batchExecution((()=>{e.rowIndexMapper.setIndexesSequence(this.rowPositions),e.columnIndexMapper.setIndexesSequence(this.columnPositions)}),!0),e.addHookOnce("afterViewRender",t),e.render()},d.RemoveColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.redo")},d.CellAlignmentAction=function(e,t,o,s){this.stateBefore=e,this.range=t,this.type=o,this.alignment=s},d.CellAlignmentAction.prototype.undo=function(e,t){(0,i.arrayEach)(this.range,(t=>{t.forAll(((t,o)=>{t>=0&&o>=0&&e.setCellMeta(t,o,"className",this.stateBefore[t][o]||" htLeft")}))})),e.addHookOnce("afterViewRender",t),e.render()},d.CellAlignmentAction.prototype.redo=function(e,t){(0,a.align)(this.range,this.type,this.alignment,((t,o)=>e.getCellMeta(t,o)),((t,o,s,n)=>e.setCellMeta(t,o,s,n))),e.addHookOnce("afterViewRender",t),e.render()},d.FiltersAction=function(e,t){this.previousConditionsStack=t,this.conditionsStack=e,this.actionType="filter"},(0,l.inherit)(d.FiltersAction,d.Action),d.FiltersAction.prototype.undo=function(e,t){const o=e.getPlugin("filters");e.addHookOnce("afterViewRender",t),this.previousConditionsStack&&o.conditionCollection.importAllConditions(this.previousConditionsStack),o.filter()},d.FiltersAction.prototype.redo=function(e,t){const o=e.getPlugin("filters");e.addHookOnce("afterViewRender",t),o.conditionCollection.importAllConditions(this.conditionsStack),o.filter()};class g extends d.Action{constructor(e,t){super(),this.cellRange=t;const o=this.cellRange.getTopStartCorner(),s=this.cellRange.getBottomEndCorner();this.rangeData=e.getData(o.row,o.col,s.row,s.col)}undo(e,t){const o=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),o.unmergeRange(this.cellRange,!0);const s=this.cellRange.getTopStartCorner();e.populateFromArray(s.row,s.col,this.rangeData,void 0,void 0,"MergeCells")}redo(e,t){const o=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),o.mergeRange(this.cellRange)}}d.MergeCellsAction=g;class f extends d.Action{constructor(e,t){super(),this.cellRange=t}undo(e,t){const o=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),o.mergeRange(this.cellRange,!0)}redo(e,t){const o=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),o.unmergeRange(this.cellRange,!0),e.render()}}function p(e,t){if("loadData"===t)return this.undoRedo.clear()}d.UnmergeCellsAction=f,d.RowMoveAction=function(e,t){this.rows=e.slice(),this.finalRowIndex=t,this.actionType="row_move"},(0,l.inherit)(d.RowMoveAction,d.Action),d.RowMoveAction.prototype.undo=function(e,t){const o=e.getPlugin("manualRowMove");e.addHookOnce("afterViewRender",t);(0,h.getMoves)(this.rows,this.finalRowIndex,e.rowIndexMapper.getNumberOfIndexes()).reverse().forEach((e=>{let{from:t,to:s}=e;t<s&&(s-=1),o.moveRow(s,t)})),e.render(),e.deselectCell(),e.selectRows(this.rows[0],this.rows[0]+this.rows.length-1)},d.RowMoveAction.prototype.redo=function(e,t){const o=e.getPlugin("manualRowMove");e.addHookOnce("afterViewRender",t),o.moveRows(this.rows.slice(),this.finalRowIndex),e.render(),e.deselectCell(),e.selectRows(this.finalRowIndex,this.finalRowIndex+this.rows.length-1)},d.ColumnMoveAction=function(e,t){this.columns=e.slice(),this.finalColumnIndex=t,this.actionType="col_move"},(0,l.inherit)(d.ColumnMoveAction,d.Action),d.ColumnMoveAction.prototype.undo=function(e,t){const o=e.getPlugin("manualColumnMove");e.addHookOnce("afterViewRender",t);(0,h.getMoves)(this.columns,this.finalColumnIndex,e.columnIndexMapper.getNumberOfIndexes()).reverse().forEach((e=>{let{from:t,to:s}=e;t<s&&(s-=1),o.moveColumn(s,t)})),e.render(),e.deselectCell(),e.selectColumns(this.columns[0],this.columns[0]+this.columns.length-1)},d.ColumnMoveAction.prototype.redo=function(e,t){const o=e.getPlugin("manualColumnMove");e.addHookOnce("afterViewRender",t),o.moveColumns(this.columns.slice(),this.finalColumnIndex),e.render(),e.deselectCell(),e.selectColumns(this.finalColumnIndex,this.finalColumnIndex+this.columns.length-1)},d.ColumnSortAction=function(e,t){this.previousSortState=e,this.nextSortState=t},(0,l.inherit)(d.ColumnSortAction,d.Action),d.ColumnSortAction.prototype.undo=function(e,t){const o=e.getPlugin("columnSorting"),s=e.getPlugin("multiColumnSorting"),n=s.isEnabled()?s:o;this.previousSortState.length?n.sort(this.previousSortState):n.clearSort(),t()},d.ColumnSortAction.prototype.redo=function(e,t){const o=e.getPlugin("columnSorting"),s=e.getPlugin("multiColumnSorting");(s.isEnabled()?s:o).sort(this.nextSortState),t()},d.prototype.init=function(){const e=this.instance.getSettings().undo,t=void 0===e||e;this.instance.undoRedo||(this.instance.undoRedo=this),t?this.instance.undoRedo.enable():this.instance.undoRedo.disable()},d.prototype.registerShortcuts=function(){const e=this.instance.getShortcutManager().getContext("grid"),t={runOnlyIf:e=>!e.altKey,group:c};e.addShortcuts([{keys:[["Control/Meta","z"]],callback:()=>{this.undo()}},{keys:[["Control/Meta","y"],["Control/Meta","Shift","z"]],callback:()=>{this.redo()}}],t)},d.prototype.unregisterShortcuts=function(){this.instance.getShortcutManager().getContext("grid").removeShortcutsByGroup(c)};const m=n.default.getSingleton();m.add("afterUpdateSettings",(function(){var e;null===(e=this.getPlugin("undoRedo"))||void 0===e||e.init()})),m.register("beforeUndo"),m.register("afterUndo"),m.register("beforeRedo"),m.register("afterRedo"),d.PLUGIN_KEY=u,d.SETTING_KEYS=!0;t.default=d},79053:(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllModules=function(){(0,s.registerAllEditors)(),(0,n.registerAllRenderers)(),(0,i.registerAllValidators)(),(0,r.registerAllCellTypes)(),(0,l.registerAllPlugins)()};var s=o(83645);t.registerAllEditors=s.registerAllEditors;var n=o(70655);t.registerAllRenderers=n.registerAllRenderers;var i=o(85086);t.registerAllValidators=i.registerAllValidators;var r=o(10426);t.registerAllCellTypes=r.registerAllCellTypes;var l=o(90859);t.registerAllPlugins=l.registerAllPlugins},98320:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.autocompleteRenderer=c;var n=o(73006),i=o(36748),r=s(o(82629)),l=o(9893);o(10275);var a=o(92692);const h=t.RENDERER_TYPE="autocomplete";function c(e,t,o,s,h,c,u){const{rootDocument:d}=e,g=u.allowHtml?n.htmlRenderer:i.textRenderer,f=d.createElement("DIV"),p=e.getSettings().ariaTags;if(f.className="htAutocompleteArrow",p&&f.setAttribute(...(0,a.A11Y_HIDDEN)()),f.appendChild(d.createTextNode(String.fromCharCode(9660))),g.apply(this,[e,t,o,s,h,c,u]),t.firstChild||t.appendChild(d.createTextNode(String.fromCharCode(160))),t.insertBefore(f,t.firstChild),(0,l.addClass)(t,"htAutocomplete"),!e.acArrowListener){const n=new r.default(e);e.acArrowListener=function(n){(0,l.hasClass)(n.target,"htAutocompleteArrow")&&e.view._wt.getSetting("onCellDblClick",null,e._createCellCoords(o,s),t)},n.addEventListener(e.rootElement,"mousedown",e.acArrowListener),e.addHookOnce("afterDestroy",(()=>{n.destroy()}))}}c.RENDERER_TYPE=h},80827:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(98320);t.RENDERER_TYPE=s.RENDERER_TYPE,t.autocompleteRenderer=s.autocompleteRenderer},79474:(e,t,o)=>{"use strict";t.__esModule=!0,t.baseRenderer=r,o(15724);var s=o(9893),n=o(92692);const i=t.RENDERER_TYPE="base";function r(e,t,o,i,r,l,a){const h=a.ariaTags,c=[],u=[],d=[],g=[];a.className&&(0,s.addClass)(t,a.className),a.readOnly?(c.push(a.readOnlyCellClassName),h&&g.push((0,n.A11Y_READONLY)())):h&&d.push((0,n.A11Y_READONLY)()[0]),!1===a.valid&&a.invalidCellClassName?(c.push(a.invalidCellClassName),h&&g.push((0,n.A11Y_INVALID)())):(u.push(a.invalidCellClassName),h&&d.push((0,n.A11Y_INVALID)()[0])),!1===a.wordWrap&&a.noWordWrapClassName&&c.push(a.noWordWrapClassName),!l&&a.placeholder&&c.push(a.placeholderCellClassName),(0,s.removeClass)(t,u),(0,s.addClass)(t,c),(0,s.removeAttribute)(t,d),(0,s.setAttribute)(t,g)}r.RENDERER_TYPE=i},47694:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(79474);t.RENDERER_TYPE=s.RENDERER_TYPE,t.baseRenderer=s.baseRenderer},40906:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.checkboxRenderer=v,o(15724);var n=o(47694),i=s(o(82629)),r=o(9893),l=o(38893),a=o(37947),h=s(o(56937)),c=o(92692),u=o(50884);o(19498);const d=new WeakMap,g=new WeakMap,f="htBadValue",p="data-row",m="data-col",w="checkboxRenderer",C=t.RENDERER_TYPE="checkbox";function v(e,t,o,s,h,C,v){const{rootDocument:E}=e,S=e.getSettings().ariaTags;n.baseRenderer.apply(this,[e,t,o,s,h,C,v]),function(e){let t=g.get(e);if(!t){const{rootElement:o}=e;t=new i.default(e),t.addEventListener(o,"click",(t=>function(e,t){const{target:o}=e;if(!y(o))return;if(!o.hasAttribute(p)||!o.hasAttribute(m))return;const s=parseInt(o.getAttribute(p),10),n=parseInt(o.getAttribute(m),10),i=t.getCellMeta(s,n);i.readOnly&&e.preventDefault()}(t,e))),t.addEventListener(o,"mouseup",(t=>function(e,t){const{target:o}=e;if(!y(o))return;if(!o.hasAttribute(p)||!o.hasAttribute(m))return;setTimeout(t.listen,10)}(t,e))),t.addEventListener(o,"change",(t=>function(e,t){const{target:o}=e;if(!y(o))return;if(!o.hasAttribute(p)||!o.hasAttribute(m))return;const s=parseInt(o.getAttribute(p),10),n=parseInt(o.getAttribute(m),10),i=t.getCellMeta(s,n);if(!i.readOnly){let o=null;o=e.target.checked?void 0===i.uncheckedTemplate||i.checkedTemplate:void 0!==i.uncheckedTemplate&&i.uncheckedTemplate,t.setDataAtCell(s,n,o)}}(t,e))),g.set(e,t)}}(e);let R=function(e){const t=e.createElement("input");return t.className="htCheckboxRendererInput",t.type="checkbox",t.setAttribute("tabindex","-1"),t.cloneNode(!1)}(E);const b=v.label;let _=!1;if(void 0===v.checkedTemplate&&(v.checkedTemplate=!0),void 0===v.uncheckedTemplate&&(v.uncheckedTemplate=!1),(0,r.empty)(t),C===v.checkedTemplate||(0,l.stringify)(C).toLocaleLowerCase(v.locale)===(0,l.stringify)(v.checkedTemplate).toLocaleLowerCase(v.locale)?R.checked=!0:C===v.uncheckedTemplate||(0,l.stringify)(C).toLocaleLowerCase(v.locale)===(0,l.stringify)(v.uncheckedTemplate).toLocaleLowerCase(v.locale)?R.checked=!1:(0,l.isEmpty)(C)?(0,r.addClass)(R,"noValue"):(R.style.display="none",(0,r.addClass)(R,f),_=!0),(0,r.setAttribute)(R,[[p,o],[m,s]]),S&&(0,r.setAttribute)(R,[(0,c.A11Y_LABEL)(R.checked?e.getTranslatedPhrase(u.CHECKBOX_CHECKED):e.getTranslatedPhrase(u.CHECKBOX_UNCHECKED)),(0,c.A11Y_CHECKED)(R.checked),(0,c.A11Y_CHECKBOX)()]),!_&&b){let n="";if(b.value)n="function"==typeof b.value?b.value.call(this,o,s,h,C):b.value;else if(b.property){const t=e.getDataAtRowProp(o,b.property);n=null!==t?t:""}const i=function(e,t,o){const s=e.createElement("label");return s.className="htCheckboxRendererLabel "+(o?"fullWidth":""),s.appendChild(e.createTextNode(t)),s.cloneNode(!0)}(E,n,!0!==b.separated);"before"===b.position?b.separated?(t.appendChild(i),t.appendChild(R)):(i.appendChild(R),R=i):b.position&&"after"!==b.position||(b.separated?(t.appendChild(R),t.appendChild(i)):(i.insertBefore(R,i.firstChild),R=i))}function T(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const o=e.getSelectedRange(),s=[],n=new Map;let i=[],r=0;if(o){for(let l=0;l<o.length;l++){const{row:a,col:h}=o[l].getTopStartCorner(),{row:c,col:u}=o[l].getBottomEndCorner();for(let o=a;o<=c;o+=1)for(let l=h;l<=u;l+=1){const a=e.getCellMeta(o,l),h={checkedTemplate:a.checkedTemplate,uncheckedTemplate:a.uncheckedTemplate};if("checkbox"!==a.type){!0!==t||a.readOnly||(n.has(s.length)?n.set(s.length,[...n.get(s.length),[o,l,null]]):n.set(s.length,[[o,l,null]]));continue}if(!0===a.readOnly)continue;void 0===a.checkedTemplate&&(a.checkedTemplate=!0),void 0===a.uncheckedTemplate&&(a.uncheckedTemplate=!1);const c=e.getDataAtCell(o,l);!1===t?[a.checkedTemplate,a.checkedTemplate.toString()].includes(c)?i.push([o,l,a.uncheckedTemplate,h]):[a.uncheckedTemplate,a.uncheckedTemplate.toString(),null,void 0].includes(c)&&i.push([o,l,a.checkedTemplate,h]):i.push([o,l,a.uncheckedTemplate,h]),r+=1}s.push(r),r=0}i=i.every((e=>{let[,,t]=e;return t===i[0][2]}))?i.map((e=>{let[t,o,s]=e;return[t,o,s]})):i.map((e=>{let[t,o,,s]=e;return[t,o,s.checkedTemplate]})),i.length>0&&s.forEach(((t,o)=>{let s=i.splice(0,t);n.size&&n.has(o)&&(s=[...s,...n.get(o)]),e.setDataAtCell(s)}))}}function M(){const t=e.getSelectedRange();if(t){for(let o=0;o<t.length;o++){const s=t[o].getTopStartCorner(),n=t[o].getBottomEndCorner();for(let t=s.row;t<=n.row;t++)for(let o=s.col;o<=n.col;o++){const s=e.getCellMeta(t,o),n=e.getCell(t,o);if(null==n)return!0;if(n.querySelectorAll("input[type=checkbox]").length>0&&!s.readOnly)return!0}}return!1}}(!b||b&&!b.separated)&&t.appendChild(R),_&&t.appendChild(E.createTextNode("#bad-value#")),d.has(e)||(d.set(e,!0),function(){const t=e.getShortcutManager().getContext("grid"),o={group:w,relativeToGroup:a.EDITOR_EDIT_GROUP,position:"before"};t.addShortcuts([{keys:[["space"]],callback:()=>(T(),!M()),runOnlyIf:()=>{var t;return null===(t=e.getSelectedRangeLast())||void 0===t?void 0:t.highlight.isCell()}},{keys:[["enter"]],callback:()=>(T(),!M()),runOnlyIf:()=>{const t=e.getSelectedRangeLast();return e.getSettings().enterBeginsEditing&&(null==t?void 0:t.isSingle())&&t.highlight.isCell()}},{keys:[["delete"],["backspace"]],callback:()=>(T(!0),!M()),runOnlyIf:()=>{var t;return null===(t=e.getSelectedRangeLast())||void 0===t?void 0:t.highlight.isCell()}}],o)}())}function y(e){return"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}h.default.getSingleton().add("modifyAutoColumnSizeSeed",(function(e,t,o){const{label:s,type:n,row:i,column:r,prop:l}=t;if(n===C){if(s){const{value:t,property:n}=s;let a=o;if(t)a="function"==typeof t?t(i,r,l,o):t;else if(n){const e=this.getDataAtRowProp(i,n);a=null!==e?e:o}e=a}return e}})),v.RENDERER_TYPE=C},80730:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(40906);t.RENDERER_TYPE=s.RENDERER_TYPE,t.checkboxRenderer=s.checkboxRenderer},79904:(e,t,o)=>{"use strict";t.__esModule=!0,t.dateRenderer=i;var s=o(80827);const n=t.RENDERER_TYPE="date";function i(e,t,o,n,i,r,l){s.autocompleteRenderer.apply(this,[e,t,o,n,i,r,l])}i.RENDERER_TYPE=n},48075:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(79904);t.RENDERER_TYPE=s.RENDERER_TYPE,t.dateRenderer=s.dateRenderer},79550:(e,t,o)=>{"use strict";t.__esModule=!0,t.dropdownRenderer=i;var s=o(80827);const n=t.RENDERER_TYPE="dropdown";function i(e,t,o,n,i,r,l){s.autocompleteRenderer.apply(this,[e,t,o,n,i,r,l])}i.RENDERER_TYPE=n},82070:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(79550);t.RENDERER_TYPE=s.RENDERER_TYPE,t.dropdownRenderer=s.dropdownRenderer},65802:(e,t,o)=>{"use strict";t.__esModule=!0,t.handsontableRenderer=i;var s=o(80827);const n=t.RENDERER_TYPE="handsontable";function i(e,t,o,n,i,r,l){s.autocompleteRenderer.apply(this,[e,t,o,n,i,r,l])}i.RENDERER_TYPE=n},8218:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(65802);t.RENDERER_TYPE=s.RENDERER_TYPE,t.handsontableRenderer=s.handsontableRenderer},28050:(e,t,o)=>{"use strict";t.__esModule=!0,t.htmlRenderer=r;var s=o(47694),n=o(9893);const i=t.RENDERER_TYPE="html";function r(e,t,o,i,r,l,a){s.baseRenderer.apply(this,[e,t,o,i,r,l,a]),(0,n.fastInnerHTML)(t,null==l?"":l,!1)}r.RENDERER_TYPE=i},73006:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(28050);t.RENDERER_TYPE=s.RENDERER_TYPE,t.htmlRenderer=s.htmlRenderer},70655:(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllRenderers=function(){(0,f.registerRenderer)(s.autocompleteRenderer),(0,f.registerRenderer)(n.baseRenderer),(0,f.registerRenderer)(r.checkboxRenderer),(0,f.registerRenderer)(i.dropdownRenderer),(0,f.registerRenderer)(l.handsontableRenderer),(0,f.registerRenderer)(a.htmlRenderer),(0,f.registerRenderer)(h.numericRenderer),(0,f.registerRenderer)(c.passwordRenderer),(0,f.registerRenderer)(u.selectRenderer),(0,f.registerRenderer)(d.textRenderer),(0,f.registerRenderer)(g.timeRenderer)};var s=o(80827);t.autocompleteRenderer=s.autocompleteRenderer,t.AUTOCOMPLETE_RENDERER=s.RENDERER_TYPE;var n=o(47694);t.baseRenderer=n.baseRenderer,t.BASE_RENDERER=n.RENDERER_TYPE;var i=o(82070);t.dropdownRenderer=i.dropdownRenderer,t.DROPDOWN_RENDERER=i.RENDERER_TYPE;var r=o(80730);t.checkboxRenderer=r.checkboxRenderer,t.CHECKBOX_RENDERER=r.RENDERER_TYPE;var l=o(8218);t.handsontableRenderer=l.handsontableRenderer,t.HANDSONTABLE_RENDERER=l.RENDERER_TYPE;var a=o(73006);t.htmlRenderer=a.htmlRenderer,t.HTML_RENDERER=a.RENDERER_TYPE;var h=o(89760);t.numericRenderer=h.numericRenderer,t.NUMERIC_RENDERER=h.RENDERER_TYPE;var c=o(15074);t.passwordRenderer=c.passwordRenderer,t.PASSWORD_RENDERER=c.RENDERER_TYPE;var u=o(31151);t.selectRenderer=u.selectRenderer,t.SELECT_RENDERER=u.RENDERER_TYPE;var d=o(36748);t.textRenderer=d.textRenderer,t.TEXT_RENDERER=d.RENDERER_TYPE;var g=o(19698);t.timeRenderer=g.timeRenderer,t.TIME_RENDERER=g.RENDERER_TYPE;var f=o(44288);t.registerRenderer=f.registerRenderer,t.getRegisteredRendererNames=f.getRegisteredRendererNames,t.getRegisteredRenderers=f.getRegisteredRenderers,t.getRenderer=f.getRenderer,t.hasRenderer=f.hasRenderer},89760:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(81052);t.RENDERER_TYPE=s.RENDERER_TYPE,t.numericRenderer=s.numericRenderer,t.getRenderedValue=s.getRenderedValue},81052:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.getRenderedValue=a,t.numericRenderer=h,o(15724);var n=s(o(20846)),i=o(36748),r=o(87485);const l=t.RENDERER_TYPE="numeric";function a(e,t){if((0,r.isNumeric)(e)){const o=t.numericFormat,s=o&&o.culture||"-",i=o&&o.pattern;if(void 0!==s&&!n.default.languages()[s]){const e=s.replace("-",""),t=n.default.allLanguages?n.default.allLanguages[s]:n.default[e];t&&n.default.registerLanguage(t)}n.default.setLanguage(s),e=(0,n.default)(e).format(i||"0")}return e}function h(e,t,o,s,n,l,h){let c=l;if((0,r.isNumeric)(c)){const e=h.className||"",o=e.length?e.split(" "):[];c=a(c,h),o.indexOf("htLeft")<0&&o.indexOf("htCenter")<0&&o.indexOf("htRight")<0&&o.indexOf("htJustify")<0&&o.push("htRight"),o.indexOf("htNumeric")<0&&o.push("htNumeric"),h.className=o.join(" "),t.dir="ltr"}(0,i.textRenderer)(e,t,o,s,n,c,h)}h.RENDERER_TYPE=l},15074:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(47306);t.RENDERER_TYPE=s.RENDERER_TYPE,t.passwordRenderer=s.passwordRenderer},47306:(e,t,o)=>{"use strict";t.__esModule=!0,t.passwordRenderer=l;var s=o(36748),n=o(9893),i=o(87485);const r=t.RENDERER_TYPE="password";function l(e,t,o,r,l,a,h){s.textRenderer.apply(this,[e,t,o,r,l,a,h]);const c=h.hashLength||t.innerHTML.length,u=h.hashSymbol||"*";let d="";(0,i.rangeEach)(c-1,(()=>{d+=u})),(0,n.fastInnerHTML)(t,d)}l.RENDERER_TYPE=r},44288:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.getRenderer=function(e){if("function"==typeof e)return e;if(!l(e))throw Error(`No registered renderer found under "${e}" name`);return r(e)},t.registerRenderer=function(e,t){"string"!=typeof e&&(e=(t=e).RENDERER_TYPE);i(e,t)},o(67834);var n=s(o(71263));const{register:i,getItem:r,hasItem:l,getNames:a,getValues:h}=(0,n.default)("renderers");t.getRegisteredRenderers=h,t.getRegisteredRendererNames=a,t.hasRenderer=l},31151:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(5384);t.RENDERER_TYPE=s.RENDERER_TYPE,t.selectRenderer=s.selectRenderer},5384:(e,t,o)=>{"use strict";t.__esModule=!0,t.selectRenderer=i;var s=o(36748);const n=t.RENDERER_TYPE="select";function i(e,t,o,n,i,r,l){s.textRenderer.apply(this,[e,t,o,n,i,r,l])}i.RENDERER_TYPE=n},36748:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(11730);t.RENDERER_TYPE=s.RENDERER_TYPE,t.textRenderer=s.textRenderer},11730:(e,t,o)=>{"use strict";t.__esModule=!0,t.textRenderer=l;var s=o(47694),n=o(9893),i=o(38893);const r=t.RENDERER_TYPE="text";function l(e,t,o,r,l,a,h){s.baseRenderer.apply(this,[e,t,o,r,l,a,h]);let c=a;if(!c&&h.placeholder&&(c=h.placeholder),c=(0,i.stringify)(c),h.trimWhitespace&&(c=c.trim()),h.rendererTemplate){(0,n.empty)(t);const s=e.rootDocument.createElement("TEMPLATE");s.setAttribute("bind","{{}}"),s.innerHTML=h.rendererTemplate,HTMLTemplateElement.decorate(s),s.model=e.getSourceDataAtRow(o),t.appendChild(s)}else(0,n.fastInnerText)(t,c)}l.RENDERER_TYPE=r},19698:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(65762);t.RENDERER_TYPE=s.RENDERER_TYPE,t.timeRenderer=s.timeRenderer},65762:(e,t,o)=>{"use strict";t.__esModule=!0,t.timeRenderer=i;var s=o(36748);const n=t.RENDERER_TYPE="time";function i(e,t,o,n,i,r,l){s.textRenderer.apply(this,[e,t,o,n,i,r,l]),t.dir="ltr"}i.RENDERER_TYPE=n},61882:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(5097),r=o(25455),l=o(59083),a=o(29412),h=o(50880),c=o(17367),u=o(99415),d=o(96351),g=o(14176),f=o(90);t.ACTIVE_HEADER_TYPE=f.HIGHLIGHT_ACTIVE_HEADER_TYPE,t.AREA_TYPE=f.HIGHLIGHT_AREA_TYPE,t.FOCUS_TYPE=f.HIGHLIGHT_FOCUS_TYPE,t.CUSTOM_SELECTION_TYPE=f.HIGHLIGHT_CUSTOM_SELECTION_TYPE,t.FILL_TYPE=f.HIGHLIGHT_FILL_TYPE,t.HEADER_TYPE=f.HIGHLIGHT_HEADER_TYPE,t.ROW_TYPE=f.HIGHLIGHT_ROW_TYPE,t.COLUMN_TYPE=f.HIGHLIGHT_COLUMN_TYPE;var p=o(9175);function m(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function w(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var C=new WeakSet;class v{constructor(e){m(this,C),(0,n.default)(this,"options",void 0),(0,n.default)(this,"layerLevel",0),(0,n.default)(this,"focus",void 0),(0,n.default)(this,"fill",void 0),(0,n.default)(this,"layeredAreas",new Map),(0,n.default)(this,"areas",new Map),(0,n.default)(this,"rowHeaders",new Map),(0,n.default)(this,"columnHeaders",new Map),(0,n.default)(this,"activeRowHeaders",new Map),(0,n.default)(this,"activeColumnHeaders",new Map),(0,n.default)(this,"activeCornerHeaders",new Map),(0,n.default)(this,"rowHighlights",new Map),(0,n.default)(this,"columnHighlights",new Map),(0,n.default)(this,"customSelections",[]),this.options=e,this.focus=(0,h.createHighlight)(e),this.fill=(0,u.createHighlight)(e)}isEnabledFor(e,t){let o=e;e===f.HIGHLIGHT_FOCUS_TYPE&&(o="current");let s=this.options.disabledCellSelection(t.row,t.col);return"string"==typeof s&&(s=[s]),!1===s||Array.isArray(s)&&!s.includes(o)}useLayerLevel(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.layerLevel=e,this}getFocus(){return this.focus}getFill(){return this.fill}createLayeredArea(){return w(C,this,y).call(this,this.layeredAreas,r.createHighlight)}getLayeredAreas(){return[...this.layeredAreas.values()]}createArea(){return w(C,this,y).call(this,this.areas,l.createHighlight)}getAreas(){return[...this.areas.values()]}createRowHeader(){return w(C,this,y).call(this,this.rowHeaders,d.createHighlight)}getRowHeaders(){return[...this.rowHeaders.values()]}createColumnHeader(){return w(C,this,y).call(this,this.columnHeaders,d.createHighlight)}getColumnHeaders(){return[...this.columnHeaders.values()]}createActiveRowHeader(){return w(C,this,y).call(this,this.activeRowHeaders,i.createHighlight)}getActiveRowHeaders(){return[...this.activeRowHeaders.values()]}createActiveColumnHeader(){return w(C,this,y).call(this,this.activeColumnHeaders,i.createHighlight)}getActiveColumnHeaders(){return[...this.activeColumnHeaders.values()]}createActiveCornerHeader(){return w(C,this,y).call(this,this.activeCornerHeaders,i.createHighlight)}getActiveCornerHeaders(){return[...this.activeCornerHeaders.values()]}createRowHighlight(){return w(C,this,y).call(this,this.rowHighlights,g.createHighlight)}getRowHighlights(){return[...this.rowHighlights.values()]}createColumnHighlight(){return w(C,this,y).call(this,this.columnHighlights,a.createHighlight)}getColumnHighlights(){return[...this.columnHighlights.values()]}getCustomSelections(){return[...this.customSelections.values()]}addCustomSelection(e){this.customSelections.push((0,c.createHighlight)({...this.options,...e}))}clear(){this.focus.clear(),this.fill.clear(),(0,p.arrayEach)(this.areas.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.layeredAreas.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.rowHeaders.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.columnHeaders.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.activeRowHeaders.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.activeColumnHeaders.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.activeCornerHeaders.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.rowHighlights.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.columnHighlights.values(),(e=>{e.clear()}))}[Symbol.iterator](){return[this.focus,this.fill,...this.areas.values(),...this.layeredAreas.values(),...this.rowHeaders.values(),...this.columnHeaders.values(),...this.activeRowHeaders.values(),...this.activeColumnHeaders.values(),...this.activeCornerHeaders.values(),...this.rowHighlights.values(),...this.columnHighlights.values(),...this.customSelections][Symbol.iterator]()}}function y(e,t){const o=this.layerLevel;if(e.has(o))return e.get(o);const s=t({layerLevel:o,...this.options});return e.set(o,s),s}t.default=v},5097:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.createHighlight=function(e){let{activeHeaderClassName:t,...o}=e;return new i.default({className:t,...o,selectionType:n.HIGHLIGHT_ACTIVE_HEADER_TYPE})};var n=o(90),i=s(o(80672))},59083:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.createHighlight=function(e){let{...t}=e;return new i.default({className:"highlight",...t,selectionType:n.HIGHLIGHT_AREA_TYPE})};var n=o(90),i=s(o(80672))},25455:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.createHighlight=function(e){let{areaCornerVisible:t,...o}=e;return new i.default({className:"area",createLayers:!0,border:{width:1,color:"#4b89ff",cornerVisible:t},...o,selectionType:n.HIGHLIGHT_AREA_TYPE})};var n=o(90),i=s(o(80672))},29412:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.createHighlight=function(e){let{columnClassName:t,...o}=e;return new i.default({className:t,...o,selectionType:n.HIGHLIGHT_COLUMN_TYPE})};var n=o(90),i=s(o(80672))},17367:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.createHighlight=function(e){let{border:t,visualCellRange:o,...s}=e;return new i.default({...t,...s,selectionType:n.HIGHLIGHT_CUSTOM_SELECTION_TYPE},o)};var n=o(90),i=s(o(80672))},99415:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.createHighlight=function(e){let{...t}=e;return new i.default({className:"fill",border:{width:1,color:"#ff0000"},...t,selectionType:n.HIGHLIGHT_FILL_TYPE})};var n=o(90),i=s(o(80672))},50880:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.createHighlight=function(e){let{cellCornerVisible:t,...o}=e;return new i.default({className:"current",headerAttributes:[(0,r.A11Y_SELECTED)()],border:{width:2,color:"#4b89ff",cornerVisible:t},...o,selectionType:n.HIGHLIGHT_FOCUS_TYPE})};var n=o(90),i=s(o(80672)),r=o(92692)},96351:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.createHighlight=function(e){let{headerClassName:t,...o}=e;return new i.default({className:t,...o,selectionType:n.HIGHLIGHT_HEADER_TYPE})};var n=o(90),i=s(o(80672))},14176:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.createHighlight=function(e){let{rowClassName:t,...o}=e;return new i.default({className:t,...o,selectionType:n.HIGHLIGHT_ROW_TYPE})};var n=o(90),i=s(o(80672))},80672:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707)),i=o(90);class r extends i.Selection{constructor(e,t){super(e,null),(0,n.default)(this,"visualCellRange",null),this.visualCellRange=t||null,this.commit()}add(e){return null===this.visualCellRange?this.visualCellRange=this.settings.createCellRange(e):this.visualCellRange.expand(e),this}clear(){return this.visualCellRange=null,super.clear()}trimToVisibleCellsRangeOnly(e){let{from:t,to:o}=e,s=this.getNearestNotHiddenCoords(t,1),n=this.getNearestNotHiddenCoords(o,-1);return null===s||null===n?null:((s.row>n.row||s.col>n.col)&&(s=t,n=o),this.settings.createCellRange(s,s,n))}getNearestNotHiddenCoords(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;const s=this.getNearestNotHiddenIndex(this.settings.rowIndexMapper,e.row,t);if(null===s)return null;const n=this.getNearestNotHiddenIndex(this.settings.columnIndexMapper,e.col,o);return null===n?null:this.settings.createCellCoords(s,n)}getNearestNotHiddenIndex(e,t,o){return t<0?t:e.getNearestNotHiddenIndex(t,o)}commit(){if(null===this.visualCellRange)return this;const e=this.trimToVisibleCellsRangeOnly(this.visualCellRange);return this.cellRange=null===e?null:this.createRenderableCellRange(e.from,e.to),this}syncWith(e){const t=e.from.clone().normalize(),o="N-S"===e.getVerticalDirection()?1:-1,s="W-E"===e.getHorizontalDirection()?1:-1,n=this.settings.visualToRenderableCoords(this.visualCellRange.highlight);let i=null;if(null!==n&&null!==n.col&&null!==n.row||(i=this.getNearestNotHiddenCoords(t,o,s)),null!==i&&e.overlaps(i)){const t=e.highlight.clone();if(t.row>=0&&(t.row=i.row),t.col>=0&&(t.col=i.col),null===this.cellRange){const e=this.settings.visualToRenderableCoords(t);this.cellRange=this.settings.createCellRange(e)}e.setHighlight(t)}return"focus"===this.settings.selectionType&&null!==n&&null===i&&e.setHighlight(this.visualCellRange.highlight),this}getCorners(){const{from:e,to:t}=this.cellRange;return[Math.min(e.row,t.row),Math.min(e.col,t.col),Math.max(e.row,t.row),Math.max(e.col,t.col)]}getVisualCorners(){const e=this.settings.renderableToVisualCoords(this.cellRange.getTopStartCorner()),t=this.settings.renderableToVisualCoords(this.cellRange.getBottomEndCorner());return[e.row,e.col,t.row,t.col]}createRenderableCellRange(e,t){const o=this.settings.visualToRenderableCoords(e),s=this.settings.visualToRenderableCoords(t);return null===o.row||null===o.col||null===s.row||null===s.col?null:this.settings.createCellRange(o,o,s)}}t.default=r},73497:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n={Selection:!0,handleMouseEvent:!0,detectSelectionType:!0,normalizeSelectionFactory:!0},i=s(o(60731));t.Selection=i.default;var r=o(30870);t.handleMouseEvent=r.handleMouseEvent;var l=o(30580);t.detectSelectionType=l.detectSelectionType,t.normalizeSelectionFactory=l.normalizeSelectionFactory;var a=o(61882);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===a[e]||(t[e]=a[e]))}))},30870:(e,t,o)=>{"use strict";t.__esModule=!0,t.handleMouseEvent=function(e,t){let{coords:o,selection:n,controller:i,cellCoordsFactory:l}=t;r.get(e.type)({coords:o,selection:n,controller:i,cellCoordsFactory:l,isShiftKey:e.shiftKey,isLeftClick:(0,s.isLeftClick)(e)||"touchstart"===e.type,isRightClick:(0,s.isRightClick)(e)})},t.mouseDown=n,t.mouseOver=i;var s=o(79729);function n(e){let{isShiftKey:t,isLeftClick:o,isRightClick:s,coords:n,selection:i,controller:r,cellCoordsFactory:l}=e;const a=i.isSelected()?i.getSelectedRange().current():null,h=i.isSelectedByCorner(),c=i.isSelectedByRowHeader();if(i.markSource("mouse"),t&&a)n.row>=0&&n.col>=0&&!r.cell?i.setRangeEnd(n):(h||c)&&n.row>=0&&n.col>=0&&!r.cell?i.setRangeEnd(l(n.row,n.col)):h&&n.row<0&&!r.column?i.setRangeEnd(l(a.to.row,n.col)):c&&n.col<0&&!r.row?i.setRangeEnd(l(n.row,a.to.col)):(!h&&!c&&n.col<0||h&&n.col<0)&&!r.row?i.selectRows(Math.max(a.from.row,0),n.row,n.col):(!h&&!c&&n.row<0||c&&n.row<0)&&!r.column&&i.selectColumns(Math.max(a.from.col,0),n.col,n.row);else{const e=!i.inInSelection(n),t=o||s&&e;n.row<0&&n.col>=0&&!r.column?t&&i.selectColumns(n.col,n.col,n.row):n.col<0&&n.row>=0&&!r.row?t&&i.selectRows(n.row,n.row,n.col):n.col>=0&&n.row>=0&&!r.cell?t&&i.setRangeStart(n):n.col<0&&n.row<0&&i.selectAll(!0,!0,{disableHeadersHighlight:!0,focusPosition:{row:0,col:0}})}i.markEndSource()}function i(e){let{isLeftClick:t,coords:o,selection:s,controller:n,cellCoordsFactory:i}=e;if(!t)return;const r=s.isSelectedByRowHeader(),l=s.isSelectedByColumnHeader(),a=s.tableProps.countCols(),h=s.tableProps.countRows();s.markSource("mouse"),l&&!n.column?s.setRangeEnd(i(h-1,o.col)):r&&!n.row?s.setRangeEnd(i(o.row,a-1)):n.cell||s.setRangeEnd(o),s.markEndSource()}const r=new Map([["mousedown",n],["mouseover",i],["touchstart",n]])},65044:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(15724);var n=s(o(85707));class i{constructor(e){(0,n.default)(this,"ranges",[]),(0,n.default)(this,"createCellRange",void 0),this.createCellRange=e}isEmpty(){return 0===this.size()}set(e){return this.clear(),this.ranges.push(this.createCellRange(e)),this}add(e){return this.ranges.push(this.createCellRange(e)),this}pop(){return this.ranges.pop(),this}current(){return this.peekByIndex(this.size()-1)}previous(){return this.peekByIndex(this.size()-2)}includes(e){return this.ranges.some((t=>t.includes(e)))}clear(){return this.ranges.length=0,this}size(){return this.ranges.length}peekByIndex(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t>=0&&t<this.size()&&(e=this.ranges[t]),e}[Symbol.iterator](){return this.ranges[Symbol.iterator]()}}t.default=i},60731:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724),o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var n=s(o(85707)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=m(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(o(61882)),r=s(o(65044)),l=o(13911),a=o(38893),h=o(87485),c=o(9175),u=s(o(63870)),d=s(o(91064)),g=o(30580),f=o(28927),p=o(92692);function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(m=function(e){return e?o:t})(e)}function w(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function C(e,t){return e.get(y(e,t))}function v(e,t,o){return e.set(y(e,t),o),o}function y(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var E=new WeakMap,S=new WeakMap,R=new WeakMap,b=new WeakMap,_=new WeakMap,T=new WeakMap;class M{constructor(e,t){var o=this;(0,n.default)(this,"settings",void 0),(0,n.default)(this,"tableProps",void 0),(0,n.default)(this,"inProgress",!1),(0,n.default)(this,"selectedRange",new r.default(((e,t,o)=>this.tableProps.createCellRange(e,t,o)))),(0,n.default)(this,"highlight",void 0),w(this,E,void 0),w(this,S,void 0),(0,n.default)(this,"selectedByRowHeader",new Set),(0,n.default)(this,"selectedByColumnHeader",new Set),w(this,R,!1),w(this,b,!1),w(this,_,"unknown"),w(this,T,-1),this.settings=e,this.tableProps=t,this.highlight=new i.default({headerClassName:e.currentHeaderClassName,activeHeaderClassName:e.activeHeaderClassName,rowClassName:e.currentRowClassName,columnClassName:e.currentColClassName,cellAttributes:[(0,p.A11Y_SELECTED)()],rowIndexMapper:this.tableProps.rowIndexMapper,columnIndexMapper:this.tableProps.columnIndexMapper,disabledCellSelection:(e,t)=>this.tableProps.isDisabledCellSelection(e,t),cellCornerVisible:function(){return o.isCellCornerVisible(...arguments)},areaCornerVisible:function(){return o.isAreaCornerVisible(...arguments)},visualToRenderableCoords:e=>this.tableProps.visualToRenderableCoords(e),renderableToVisualCoords:e=>this.tableProps.renderableToVisualCoords(e),createCellCoords:(e,t)=>this.tableProps.createCellCoords(e,t),createCellRange:(e,t,o)=>this.tableProps.createCellRange(e,t,o)}),v(E,this,new d.default(this.selectedRange,{rowIndexMapper:this.tableProps.rowIndexMapper,columnIndexMapper:this.tableProps.columnIndexMapper,countRenderableRows:()=>this.tableProps.countRenderableRows(),countRenderableColumns:()=>this.tableProps.countRenderableColumns(),visualToRenderableCoords:e=>this.tableProps.visualToRenderableCoords(e),renderableToVisualCoords:e=>this.tableProps.renderableToVisualCoords(e),findFirstNonHiddenRenderableRow:function(){return o.tableProps.findFirstNonHiddenRenderableRow(...arguments)},findFirstNonHiddenRenderableColumn:function(){return o.tableProps.findFirstNonHiddenRenderableColumn(...arguments)},createCellCoords:(e,t)=>this.tableProps.createCellCoords(e,t),fixedRowsBottom:()=>e.fixedRowsBottom,minSpareRows:()=>e.minSpareRows,minSpareCols:()=>e.minSpareCols,autoWrapRow:()=>e.autoWrapRow,autoWrapCol:()=>e.autoWrapCol})),v(S,this,new d.default(this.selectedRange,{rowIndexMapper:this.tableProps.rowIndexMapper,columnIndexMapper:this.tableProps.columnIndexMapper,countRenderableRows:()=>{const e=this.selectedRange.current();return this.tableProps.countRenderableRowsInRange(0,e.getOuterBottomEndCorner().row)},countRenderableColumns:()=>{const e=this.selectedRange.current();return this.tableProps.countRenderableColumnsInRange(0,e.getOuterBottomEndCorner().col)},visualToRenderableCoords:e=>this.tableProps.visualToRenderableCoords(e),renderableToVisualCoords:e=>this.tableProps.renderableToVisualCoords(e),findFirstNonHiddenRenderableRow:function(){return o.tableProps.findFirstNonHiddenRenderableRow(...arguments)},findFirstNonHiddenRenderableColumn:function(){return o.tableProps.findFirstNonHiddenRenderableColumn(...arguments)},createCellCoords:(e,t)=>this.tableProps.createCellCoords(e,t),fixedRowsBottom:()=>0,minSpareRows:()=>0,minSpareCols:()=>0,autoWrapRow:()=>!0,autoWrapCol:()=>!0})),C(E,this).addLocalHook("beforeTransformStart",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("beforeModifyTransformStart",...t)})),C(E,this).addLocalHook("afterTransformStart",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("afterModifyTransformStart",...t)})),C(E,this).addLocalHook("beforeTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("beforeModifyTransformEnd",...t)})),C(E,this).addLocalHook("afterTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("afterModifyTransformEnd",...t)})),C(E,this).addLocalHook("insertRowRequire",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("insertRowRequire",...t)})),C(E,this).addLocalHook("insertColRequire",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("insertColRequire",...t)})),C(E,this).addLocalHook("beforeRowWrap",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("beforeRowWrap",...t)})),C(E,this).addLocalHook("beforeColumnWrap",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("beforeColumnWrap",...t)})),C(S,this).addLocalHook("beforeTransformStart",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("beforeModifyTransformFocus",...t)})),C(S,this).addLocalHook("afterTransformStart",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("afterModifyTransformFocus",...t)}))}getSelectedRange(){return this.selectedRange}markSource(e){v(_,this,e)}markEndSource(){v(_,this,"unknown")}getSelectionSource(){return C(_,this)}setExpectedLayers(e){v(T,this,e)}begin(){this.inProgress=!0}finish(){this.runLocalHooks("afterSelectionFinished",Array.from(this.selectedRange)),this.inProgress=!1,v(T,this,-1)}isInProgress(){return this.inProgress}setRangeStart(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e;const n="multiple"===this.settings.selectionMode,i=(0,a.isUndefined)(t)?this.tableProps.getShortcutManager().isCtrlPressed():t,r=e.clone();v(R,this,!1),this.runLocalHooks("beforeSetRangeStart"+(o?"Only":""),r),(!n||n&&!i&&(0,a.isUndefined)(t))&&this.selectedRange.clear(),this.selectedRange.add(r).current().setHighlight(s.clone()),0===this.getLayerLevel()&&(this.selectedByRowHeader.clear(),this.selectedByColumnHeader.clear()),o||this.setRangeEnd(e)}setRangeStartOnly(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;this.setRangeStart(e,t,!0,o)}setRangeEnd(e){if(this.selectedRange.isEmpty())return;const t=e.clone(),o=this.tableProps.countRows(),s=this.tableProps.countCols(),n=this.selectedRange.current().clone().setTo(e).isSingleHeader();if((o>0||s>0)&&(0===o&&t.col<0&&!n||0===s&&t.row<0&&!n))return;this.runLocalHooks("beforeSetRangeEnd",t),this.begin();const i=this.selectedRange.current();if(this.settings.navigableHeaders||i.highlight.normalize(),"single"===this.settings.selectionMode)i.setFrom(i.highlight),i.setTo(i.highlight);else{const e=i.getHorizontalDirection(),o=i.getVerticalDirection(),s=this.isMultiple();i.setTo(t),s&&(e!==i.getHorizontalDirection()||1===i.getWidth()&&!i.includes(i.highlight))&&i.from.assign({col:i.highlight.col}),s&&(o!==i.getVerticalDirection()||1===i.getHeight()&&!i.includes(i.highlight))&&i.from.assign({row:i.highlight.row})}o>0&&s>0&&(!this.settings.navigableHeaders||this.settings.navigableHeaders&&!i.isSingleHeader())&&i.to.normalize(),this.runLocalHooks("beforeHighlightSet"),this.setRangeFocus(this.selectedRange.current().highlight),this.applyAndCommit();const r=-1===C(T,this)||this.selectedRange.size()===C(T,this);this.runLocalHooks("afterSetRangeEnd",e,r)}applyAndCommit(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.selectedRange.current(),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLayerLevel();const o=this.tableProps.countRows(),s=this.tableProps.countCols();t<this.highlight.layerLevel&&((0,c.arrayEach)(this.highlight.getAreas(),(e=>{e.clear()})),(0,c.arrayEach)(this.highlight.getLayeredAreas(),(e=>{e.clear()})),(0,c.arrayEach)(this.highlight.getRowHeaders(),(e=>{e.clear()})),(0,c.arrayEach)(this.highlight.getColumnHeaders(),(e=>{e.clear()})),(0,c.arrayEach)(this.highlight.getActiveRowHeaders(),(e=>{e.clear()})),(0,c.arrayEach)(this.highlight.getActiveColumnHeaders(),(e=>{e.clear()})),(0,c.arrayEach)(this.highlight.getActiveCornerHeaders(),(e=>{e.clear()})),(0,c.arrayEach)(this.highlight.getRowHighlights(),(e=>{e.clear()})),(0,c.arrayEach)(this.highlight.getColumnHighlights(),(e=>{e.clear()}))),this.highlight.useLayerLevel(t);const n=this.highlight.createArea(),r=this.highlight.createLayeredArea(),l=this.highlight.createRowHeader(),a=this.highlight.createColumnHeader(),h=this.highlight.createActiveRowHeader(),u=this.highlight.createActiveColumnHeader(),d=this.highlight.createActiveCornerHeader(),g=this.highlight.createRowHighlight(),f=this.highlight.createColumnHighlight();if(n.clear(),r.clear(),l.clear(),a.clear(),h.clear(),u.clear(),d.clear(),g.clear(),f.clear(),this.highlight.isEnabledFor(i.AREA_TYPE,e.highlight)&&(this.isMultiple()||t>=1)&&(n.add(e.from).add(e.to).commit(),r.add(e.from).add(e.to).commit(),1===t)){const e=this.selectedRange.previous();this.highlight.useLayerLevel(t-1),this.highlight.createArea().add(e.from).commit().syncWith(e),this.highlight.createLayeredArea().add(e.from).commit().syncWith(e),this.highlight.useLayerLevel(t)}if(this.highlight.isEnabledFor(i.HEADER_TYPE,e.highlight)){if(!e.isSingleHeader()){const t=this.tableProps.createCellCoords(Math.max(e.from.row,0),-1),o=this.tableProps.createCellCoords(e.to.row,-1),s=this.tableProps.createCellCoords(-1,Math.max(e.from.col,0)),n=this.tableProps.createCellCoords(-1,e.to.col);"single"===this.settings.selectionMode?(l.add(t).commit(),a.add(s).commit(),g.add(t).commit(),f.add(s).commit()):(l.add(t).add(o).commit(),a.add(s).add(n).commit(),g.add(t).add(o).commit(),f.add(s).add(n).commit())}const t=!C(b,this)&&this.isEntireRowSelected()&&(s>0&&s===e.getWidth()||0===s&&this.isSelectedByRowHeader()),n=!C(b,this)&&this.isEntireColumnSelected()&&(o>0&&o===e.getHeight()||0===o&&this.isSelectedByColumnHeader());t&&h.add(this.tableProps.createCellCoords(Math.max(e.from.row,0),Math.min(-this.tableProps.countRowHeaders(),-1))).add(this.tableProps.createCellCoords(Math.max(e.to.row,0),-1)).commit(),n&&u.add(this.tableProps.createCellCoords(Math.min(-this.tableProps.countColHeaders(),-1),Math.max(e.from.col,0))).add(this.tableProps.createCellCoords(-1,Math.max(e.to.col,0))).commit(),t&&n&&d.add(this.tableProps.createCellCoords(-this.tableProps.countColHeaders(),-this.tableProps.countRowHeaders())).add(this.tableProps.createCellCoords(-1,-1)).commit()}}setRangeFocus(e){if(this.selectedRange.isEmpty())return;const t=this.selectedRange.current();this.inProgress||this.runLocalHooks("beforeSetFocus",e);const o=this.highlight.getFocus();o.clear(),t.setHighlight(e),this.inProgress||this.runLocalHooks("beforeHighlightSet"),this.highlight.isEnabledFor(i.FOCUS_TYPE,t.highlight)&&o.add(t.highlight).commit().syncWith(t),this.inProgress||(v(R,this,!0),this.runLocalHooks("afterSetFocus",t.highlight))}transformStart(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.settings.navigableHeaders?C(E,this).setOffsetSize({x:this.tableProps.countRowHeaders(),y:this.tableProps.countColHeaders()}):C(E,this).resetOffsetSize(),this.setRangeStart(C(E,this).transformStart(e,t,o))}transformEnd(e,t){this.settings.navigableHeaders?C(E,this).setOffsetSize({x:this.tableProps.countRowHeaders(),y:this.tableProps.countColHeaders()}):C(E,this).resetOffsetSize(),this.setRangeEnd(C(E,this).transformEnd(e,t))}transformFocus(e,t){const o=this.selectedRange.current(),{row:s,col:n}=o.getOuterTopStartCorner(),i=this.tableProps.countRenderableColumnsInRange(0,n-1),r=this.tableProps.countRenderableRowsInRange(0,s-1);o.highlight.isHeader()?C(S,this).setOffsetSize({x:n<0?Math.abs(n):-i,y:s<0?Math.abs(s):-r}):C(S,this).setOffsetSize({x:n<0?0:-i,y:s<0?0:-r});const l=C(S,this).transformStart(e,t);this.setRangeFocus(l.normalize())}shiftRows(e,t){if(!this.isSelected())return;const o=this.selectedRange.current();if(this.isSelectedByCorner())this.selectAll(!0,!0,{disableHeadersHighlight:!0});else if(this.isSelectedByColumnHeader()||o.getOuterTopStartCorner().row>=e){const{from:s,to:n,highlight:i}=o,r=this.tableProps.countRows(),l=this.isSelectedByRowHeader(),a=this.isSelectedByColumnHeader(),c=a?-1:0,u=a?0:t;this.getSelectedRange().pop();const d=this.tableProps.createCellCoords((0,h.clamp)(s.row+u,c,r-1),s.col),g=this.tableProps.createCellCoords((0,h.clamp)(n.row+t,c,r-1),n.col);this.markSource("shift"),i.row>=e?this.setRangeStartOnly(d,!0,this.tableProps.createCellCoords((0,h.clamp)(i.row+t,0,r-1),i.col)):this.setRangeStartOnly(d,!0),l&&this.selectedByRowHeader.add(this.getLayerLevel()),a&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(g),this.markEndSource()}}shiftColumns(e,t){if(!this.isSelected())return;const o=this.selectedRange.current();if(this.isSelectedByCorner())this.selectAll(!0,!0,{disableHeadersHighlight:!0});else if(this.isSelectedByRowHeader()||o.getOuterTopStartCorner().col>=e){const{from:s,to:n,highlight:i}=o,r=this.tableProps.countCols(),l=this.isSelectedByRowHeader(),a=this.isSelectedByColumnHeader(),c=l?-1:0,u=l?0:t;this.getSelectedRange().pop();const d=this.tableProps.createCellCoords(s.row,(0,h.clamp)(s.col+u,c,r-1)),g=this.tableProps.createCellCoords(n.row,(0,h.clamp)(n.col+t,c,r-1));this.markSource("shift"),i.col>=e?this.setRangeStartOnly(d,!0,this.tableProps.createCellCoords(i.row,(0,h.clamp)(i.col+t,0,r-1))):this.setRangeStartOnly(d,!0),l&&this.selectedByRowHeader.add(this.getLayerLevel()),a&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(g),this.markEndSource()}}getLayerLevel(){return this.selectedRange.size()-1}isSelected(){return!this.selectedRange.isEmpty()}isMultiple(){if(!this.isSelected())return!1;const e=(0,l.createObjectPropListener)(!this.selectedRange.current().isSingle());return this.runLocalHooks("afterIsMultipleSelection",e),e.value}isFocusSelectionChanged(){return this.isSelected()&&C(R,this)}isSelectedByRowHeader(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();return!this.isSelectedByCorner(e)&&(-1===e?this.selectedByRowHeader.size>0:this.selectedByRowHeader.has(e))}isEntireRowSelected(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();const t=e=>{const{col:t}=e.getOuterTopStartCorner(),o=this.tableProps.countRowHeaders(),s=this.tableProps.countCols();return(o>0&&t<0||0===o)&&e.getWidth()===s};if(-1===e)return Array.from(this.selectedRange).some((e=>t(e)));const o=this.selectedRange.peekByIndex(e);return!!o&&t(o)}isSelectedByColumnHeader(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();return!this.isSelectedByCorner()&&(-1===e?this.selectedByColumnHeader.size>0:this.selectedByColumnHeader.has(e))}isEntireColumnSelected(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();const t=e=>{const{row:t}=e.getOuterTopStartCorner(),o=this.tableProps.countColHeaders(),s=this.tableProps.countRows();return(o>0&&t<0||0===o)&&e.getHeight()===s};if(-1===e)return Array.from(this.selectedRange).some((e=>t(e)));const o=this.selectedRange.peekByIndex(e);return!!o&&t(o)}isSelectedByAnyHeader(){return this.isSelectedByRowHeader(-1)||this.isSelectedByColumnHeader(-1)||this.isSelectedByCorner()}isSelectedByCorner(){return this.selectedByColumnHeader.has(this.getLayerLevel())&&this.selectedByRowHeader.has(this.getLayerLevel())}inInSelection(e){return this.selectedRange.includes(e)}isCellCornerVisible(){return this.settings.fillHandle&&!this.tableProps.isEditorOpened()&&!this.isMultiple()}isCellVisible(e){const t=this.tableProps.visualToRenderableCoords(e);return null!==t.row&&null!==t.col}isAreaCornerVisible(e){return(!Number.isInteger(e)||e===this.getLayerLevel())&&(this.settings.fillHandle&&!this.tableProps.isEditorOpened()&&this.isMultiple())}clear(){this.selectedRange.clear(),this.highlight.clear()}deselect(){this.isSelected()&&(this.inProgress=!1,this.clear(),this.runLocalHooks("afterDeselect"))}selectAll(){var e;let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{focusPosition:!1,disableHeadersHighlight:!1};const n=this.tableProps.countRows(),i=this.tableProps.countCols(),r=this.tableProps.countRowHeaders(),l=this.tableProps.countColHeaders(),a=o?-l:0,c=t?-r:0;if(0===a&&0===c&&(0===n||0===i))return;let u=null===(e=this.getSelectedRange().current())||void 0===e?void 0:e.highlight;const{focusPosition:d,disableHeadersHighlight:g}=s;v(b,this,g),d&&Number.isInteger(null==d?void 0:d.row)&&Number.isInteger(null==d?void 0:d.col)&&(u=this.tableProps.createCellCoords((0,h.clamp)(d.row,a,n-1),(0,h.clamp)(d.col,c,i-1)));const f=this.tableProps.createCellCoords(a,c),p=this.tableProps.createCellCoords(n-1,i-1);this.clear(),this.setRangeStartOnly(f,void 0,u),c<0&&this.selectedByRowHeader.add(this.getLayerLevel()),a<0&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(p),this.finish(),v(b,this,!1)}selectCells(e){var t=this;const o=(0,g.detectSelectionType)(e);if(o===g.SELECTION_TYPE_EMPTY)return!1;if(o===g.SELECTION_TYPE_UNRECOGNIZED)throw new Error(f.toSingleLine`Unsupported format of the selection ranges was passed. To select cells pass\x20
88
88
  the coordinates as an array of arrays ([[rowStart, columnStart/columnPropStart, rowEnd,\x20
89
89
  columnEnd/columnPropEnd]]) or as an array of CellRange objects.`);const s=(0,g.normalizeSelectionFactory)(o,{createCellCoords:function(){return t.tableProps.createCellCoords(...arguments)},createCellRange:function(){return t.tableProps.createCellRange(...arguments)},propToCol:e=>this.tableProps.propToCol(e),keepDirection:!0}),n=this.settings.navigableHeaders,i={countRows:this.tableProps.countRows(),countCols:this.tableProps.countCols(),countRowHeaders:n?this.tableProps.countRowHeaders():0,countColHeaders:n?this.tableProps.countColHeaders():0},r=!e.some((e=>{const t=s(e),o=t.isValid(i);return!(o&&!t.containsHeaders()||o&&t.containsHeaders()&&t.isSingleHeader())}));return r&&(this.clear(),this.setExpectedLayers(e.length),(0,c.arrayEach)(e,(e=>{const{from:t,to:o}=s(e);this.setRangeStartOnly(t.clone(),!1),this.setRangeEnd(o.clone())})),this.finish()),r}selectColumns(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const s="string"==typeof e?this.tableProps.propToCol(e):e,n="string"==typeof t?this.tableProps.propToCol(t):t,i=this.tableProps.countRows(),r=this.tableProps.countCols(),l=this.tableProps.countColHeaders(),a=0===l?0:-l,c=this.tableProps.createCellCoords(a,s),u=this.tableProps.createCellCoords(i-1,n),d=this.tableProps.createCellRange(c,c,u).isValid({countRows:i,countCols:r,countRowHeaders:0,countColHeaders:l});if(d){let e=0,t=0;Number.isInteger(null==o?void 0:o.row)&&Number.isInteger(null==o?void 0:o.col)?(e=(0,h.clamp)(o.row,a,i-1),t=(0,h.clamp)(o.col,Math.min(s,n),Math.max(s,n))):(e=(0,h.clamp)(o,a,i-1),t=s);const r=this.tableProps.createCellCoords(e,t),c=0===l?0:(0,h.clamp)(r.row,a,-1),u=i-1,d=this.tableProps.createCellCoords(c,s),g=this.tableProps.createCellCoords(u,n);this.runLocalHooks("beforeSelectColumns",d,g,r),d.row=c,g.row=u,this.setRangeStartOnly(d,void 0,r),this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(g),this.runLocalHooks("afterSelectColumns",d,g,r),this.finish()}return d}selectRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const s=this.tableProps.countRows(),n=this.tableProps.countCols(),i=this.tableProps.countRowHeaders(),r=0===i?0:-i,l=this.tableProps.createCellCoords(e,r),a=this.tableProps.createCellCoords(t,n-1),c=this.tableProps.createCellRange(l,l,a).isValid({countRows:s,countCols:n,countRowHeaders:i,countColHeaders:0});if(c){let s=0,l=0;Number.isInteger(null==o?void 0:o.row)&&Number.isInteger(null==o?void 0:o.col)?(s=(0,h.clamp)(o.row,Math.min(e,t),Math.max(e,t)),l=(0,h.clamp)(o.col,r,n-1)):(s=e,l=(0,h.clamp)(o,r,n-1));const a=this.tableProps.createCellCoords(s,l),c=0===i?0:(0,h.clamp)(a.col,r,-1),u=n-1,d=this.tableProps.createCellCoords(e,c),g=this.tableProps.createCellCoords(t,u);this.runLocalHooks("beforeSelectRows",d,g,a),d.col=c,g.col=u,this.setRangeStartOnly(d,void 0,a),this.selectedByRowHeader.add(this.getLayerLevel()),this.setRangeEnd(g),this.runLocalHooks("afterSelectRows",d,g,a),this.finish()}return c}refresh(){if(!this.isSelected())return;const e=this.tableProps.countRows(),t=this.tableProps.countCols();if(0===e||0===t)return void this.deselect();const o=this.selectedRange.peekByIndex(this.selectedRange.size()-1),{from:s,to:n,highlight:i}=o;this.clear(),i.assign({row:(0,h.clamp)(i.row,-1/0,e-1),col:(0,h.clamp)(i.col,-1/0,t-1)}),s.assign({row:(0,h.clamp)(s.row,-1/0,e-1),col:(0,h.clamp)(s.col,-1/0,t-1)}),n.assign({row:(0,h.clamp)(n.row,0,e-1),col:(0,h.clamp)(n.col,0,t-1)}),this.selectedRange.ranges.push(o),this.highlight.getFocus().add(i).commit().syncWith(o),this.applyAndCommit(o)}commit(){if(this.highlight.getCustomSelections().forEach((e=>{e.commit()})),!this.isSelected())return;const e=this.highlight.getFocus(),t=this.getLayerLevel();e.commit().syncWith(this.selectedRange.current());for(let e=0;e<this.selectedRange.size();e+=1){this.highlight.useLayerLevel(e);const t=this.highlight.createArea(),o=this.highlight.createLayeredArea(),s=this.highlight.createRowHeader(),n=this.highlight.createColumnHeader(),i=this.highlight.createActiveRowHeader(),r=this.highlight.createActiveColumnHeader(),l=this.highlight.createActiveCornerHeader(),a=this.highlight.createRowHighlight(),h=this.highlight.createColumnHighlight();t.commit(),o.commit(),s.commit(),n.commit(),i.commit(),r.commit(),l.commit(),a.commit(),h.commit()}this.highlight.useLayerLevel(t)}}(0,l.mixin)(M,u.default);t.default=M},91064:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=o(13911),i=s(o(63870));function r(e,t,o){l(e,t),t.set(e,o)}function l(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function a(e,t){return e.get(c(e,t))}function h(e,t,o){return e.set(c(e,t),o),o}function c(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var u=new WeakMap,d=new WeakMap,g=new WeakMap,f=new WeakSet;class p{constructor(e,t){var o,s;l(o=this,s=f),s.add(o),r(this,u,void 0),r(this,d,void 0),r(this,g,{x:0,y:0}),h(u,this,e),h(d,this,t)}transformStart(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=a(d,this).createCellCoords(e,t);let i=a(u,this).current().highlight;const r=a(d,this).visualToRenderableCoords(i);let l=0,h=0;if(this.runLocalHooks("beforeTransformStart",s),null!==r.row&&null!==r.col){const{width:e,height:t}=c(f,this,w).call(this),{row:r,col:u}=c(f,this,y).call(this,i),g=a(d,this).fixedRowsBottom(),p=a(d,this).minSpareRows(),C=a(d,this).minSpareCols(),v=a(d,this).autoWrapRow(),S=a(d,this).autoWrapCol(),R=a(d,this).createCellCoords(r+s.row,u+s.col);if(R.row>=t){const s=(0,n.createObjectPropListener)(o&&p>0&&0===g),i=R.col+1,r=a(d,this).createCellCoords(R.row-t,i>=e?i-e:i);this.runLocalHooks("beforeColumnWrap",s,c(f,this,E).call(this,r),i>=e),s.value?this.runLocalHooks("insertRowRequire",a(d,this).countRenderableRows()):S&&R.assign(r)}else if(R.row<0){const o=(0,n.createObjectPropListener)(S),s=R.col-1,i=a(d,this).createCellCoords(t+R.row,s<0?e+s:s);this.runLocalHooks("beforeColumnWrap",o,c(f,this,E).call(this,i),s<0),S&&R.assign(i)}if(R.col>=e){const s=(0,n.createObjectPropListener)(o&&C>0),i=R.row+1,r=a(d,this).createCellCoords(i>=t?i-t:i,R.col-e);this.runLocalHooks("beforeRowWrap",s,c(f,this,E).call(this,r),i>=t),s.value?this.runLocalHooks("insertColRequire",a(d,this).countRenderableColumns()):v&&R.assign(r)}else if(R.col<0){const o=(0,n.createObjectPropListener)(v),s=R.row-1,i=a(d,this).createCellCoords(s<0?t+s:s,e+R.col);this.runLocalHooks("beforeRowWrap",o,c(f,this,E).call(this,i),s<0),v&&R.assign(i)}const{rowDir:b,colDir:_}=c(f,this,m).call(this,R);l=b,h=_,i=c(f,this,E).call(this,R)}return this.runLocalHooks("afterTransformStart",i,l,h),i}transformEnd(e,t){const o=a(d,this).createCellCoords(e,t),s=a(u,this).current(),n=a(d,this).visualToRenderableCoords(s.highlight),i=c(f,this,C).call(this,s.to.row,s.from.row),r=c(f,this,v).call(this,s.to.col,s.from.col),l=s.to.clone();let h=0,g=0;if(this.runLocalHooks("beforeTransformEnd",o),null!==n.row&&null!==n.col&&null!==i&&null!==r){const{row:e,col:t}=c(f,this,y).call(this,s.highlight),n=a(d,this).createCellCoords(i+o.row,r+o.col),u=s.getTopStartCorner(),p=s.getTopEndCorner(),w=s.getBottomEndCorner();if(o.col<0&&r>=t&&n.col<t){const e=n.col-t;n.col=c(f,this,v).call(this,u.col,p.col)+e}else if(o.col>0&&r<=t&&n.col>t){const e=c(f,this,v).call(this,p.col,u.col),t=Math.max(n.col-e,1);n.col=e+t}if(o.row<0&&i>=e&&n.row<e){const t=n.row-e;n.row=c(f,this,C).call(this,u.row,w.row)+t}else if(o.row>0&&i<=e&&n.row>e){const e=c(f,this,C).call(this,w.row,u.row),t=Math.max(n.row-e,1);n.row=e+t}const{rowDir:S,colDir:R}=c(f,this,m).call(this,n);h=S,g=R;const b=c(f,this,E).call(this,n);0===o.row&&0!==o.col?l.col=b.col:0!==o.row&&0===o.col?l.row=b.row:(l.row=b.row,l.col=b.col)}return this.runLocalHooks("afterTransformEnd",l,h,g),l}setOffsetSize(e){let{x:t,y:o}=e;h(g,this,{x:t,y:o})}resetOffsetSize(){h(g,this,{x:0,y:0})}}function m(e){const{width:t,height:o}=c(f,this,w).call(this);let s=0,n=0;return e.row<0?(s=-1,e.row=0):e.row>0&&e.row>=o&&(s=1,e.row=o-1),e.col<0?(n=-1,e.col=0):e.col>0&&e.col>=t&&(n=1,e.col=t-1),{rowDir:s,colDir:n}}function w(){return{width:a(g,this).x+a(d,this).countRenderableColumns(),height:a(g,this).y+a(d,this).countRenderableRows()}}function C(e,t){const o=a(d,this).findFirstNonHiddenRenderableRow(e,t);return null===o?null:a(g,this).y+o}function v(e,t){const o=a(d,this).findFirstNonHiddenRenderableColumn(e,t);return null===o?null:a(g,this).x+o}function y(e){const{row:t,col:o}=a(d,this).visualToRenderableCoords(e);if(null===t||null===o)throw new Error("Renderable coords are not visible.");return a(d,this).createCellCoords(a(g,this).y+t,a(g,this).x+o)}function E(e){const t=e.clone();return t.col=e.col-a(g,this).x,t.row=e.row-a(g,this).y,a(d,this).renderableToVisualCoords(t)}(0,n.mixin)(p,i.default);t.default=p},30580:(e,t,o)=>{"use strict";t.__esModule=!0,t.detectSelectionType=f,t.normalizeSelectionFactory=p,t.transformSelectionToColumnDistance=function(e){const t=f(e.getSelected());if(t===r||t===l)return[];const o=p(t,{createCellCoords:e._createCellCoords.bind(e),createCellRange:e._createCellRange.bind(e)}),s=new Set;(0,n.arrayEach)(e.getSelected(),(e=>{const{from:t,to:i}=o(e),r=Math.max(t.col,0),l=i.col-r+1;(0,n.arrayEach)(Array.from(new Array(l),((e,t)=>r+t)),(e=>{s.has(e)||s.add(e)}))}));const i=Array.from(s).sort(((e,t)=>e-t));return(0,n.arrayReduce)(i,((e,t,o,s)=>(0!==o&&t===s[o-1]+1?e[e.length-1][1]+=1:e.push([t,1]),e)),[])},t.transformSelectionToRowDistance=function(e){const t=f(e.getSelected());if(t===r||t===l)return[];const o=p(t,{createCellCoords:e._createCellCoords.bind(e),createCellRange:e._createCellRange.bind(e)}),s=new Set;(0,n.arrayEach)(e.getSelected(),(e=>{const{from:t,to:i}=o(e),r=Math.max(t.row,0),l=i.row-r+1;(0,n.arrayEach)(Array.from(new Array(l),((e,t)=>r+t)),(e=>{s.has(e)||s.add(e)}))}));const i=Array.from(s).sort(((e,t)=>e-t));return(0,n.arrayReduce)(i,((e,t,o,s)=>(0!==o&&t===s[o-1]+1?e[e.length-1][1]+=1:e.push([t,1]),e)),[])},o(67834),o(15724),o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var s=o(90),n=o(9175),i=o(38893);const r=t.SELECTION_TYPE_UNRECOGNIZED=0,l=t.SELECTION_TYPE_EMPTY=1,a=t.SELECTION_TYPE_ARRAY=2,h=t.SELECTION_TYPE_OBJECT=3,c=t.SELECTION_TYPES=[h,a],u=[["number"],["number","string"],["number","undefined"],["number","string","undefined"]],d=Symbol("root"),g=Symbol("child");function f(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d;if(t!==d&&t!==g)throw new Error("The second argument is used internally only and cannot be overwritten.");const o=Array.isArray(e),n=t===d;let i=r;if(o){const t=e[0];if(0===e.length)i=l;else if(n&&t instanceof s.CellRange)i=h;else if(n&&Array.isArray(t))i=f(t,g);else if(e.length>=2&&e.length<=4){!e.some(((e,t)=>!u[t].includes(typeof e)))&&(i=a)}}return i}function p(e){let{createCellCoords:t,createCellRange:o,keepDirection:s=!1,propToCol:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!c.includes(e))throw new Error("Unsupported selection ranges schema type was provided.");return function(r){const l=e===h;let a=l?r.from.row:r[0],c=l?r.from.col:r[1],u=l?r.to.row:r[2],d=l?r.to.col:r[3];if("function"==typeof n&&("string"==typeof c&&(c=n(c)),"string"==typeof d&&(d=n(d))),(0,i.isUndefined)(u)&&(u=a),(0,i.isUndefined)(d)&&(d=c),!s){const e=a,t=c,o=u,s=d;a=Math.min(e,o),c=Math.min(t,s),u=Math.max(e,o),d=Math.max(t,s)}const g=t(a,c),f=t(u,d);return o(g,g,f)}}},70764:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"editorCloseAndSave",callback(e){e._getEditorManager().closeEditorAndSaveChanges()}}},16196:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(52618);t.command={name:"editorCloseAndSaveByArrowKeys",callback(e,t,o){const n=e._getEditorManager(),i=n.getActiveEditor();i.isInFullEditMode()&&i.state===s.EDITOR_STATE.EDITING||(n.closeEditorAndSaveChanges(),e.getSelected()&&(o.includes("arrowdown")?e.selection.transformStart(1,0):o.includes("arrowup")?e.selection.transformStart(-1,0):o.includes("arrowleft")?e.selection.transformStart(0,-1*e.getDirectionFactor()):o.includes("arrowright")&&e.selection.transformStart(0,e.getDirectionFactor())),t.preventDefault())}}},29083:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"editorCloseAndSaveByEnter",callback(e,t){const o=e._getEditorManager();o.closeEditorAndSaveChanges(t.ctrlKey||t.metaKey),o.moveSelectionAfterEnter(t)}}},62518:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"editorCloseWithoutSaving",callback(e){const t=e._getEditorManager();t.closeEditorAndRestoreOriginalValue(e.getShortcutManager().isCtrlPressed()),t.activeEditor.focus()}}},6554:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"editorFastOpen",callback(e,t){const{highlight:o}=e.getSelectedRangeLast();o.isHeader()||e._getEditorManager().openEditor(null,t,!0)}}},61194:(e,t,o)=>{"use strict";t.__esModule=!0,t.getAllCommands=function(){return[s.command,n.command,i.command,r.command,l.command,a.command]};var s=o(70764),n=o(16196),i=o(29083),r=o(62518),l=o(6554),a=o(2044)},2044:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(79729);t.command={name:"editorOpen",callback(e,t,o){const n=e._getEditorManager(),i=e.getSelectedRangeLast(),{highlight:r}=i;if(e.selection.isMultiple()&&!i.isHeader()&&e.countRenderedCols()>0&&e.countRenderedRows()>0){const s=e.getSettings(),n="function"==typeof s.enterMoves?s.enterMoves(t):s.enterMoves;o.includes("shift")?e.selection.transformFocus(-n.row,-n.col):e.selection.transformFocus(n.row,n.col)}else r.isHeader()||(e.getSettings().enterBeginsEditing?n.cellProperties.readOnly?n.moveSelectionAfterEnter(t):n.openEditor(null,t,!0):n.moveSelectionAfterEnter(t),(0,s.stopImmediatePropagation)(t))}}},96801:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"emptySelectedCells",callback(e){e.emptySelectedCells(),e._getEditorManager().prepareEditor()}}},57832:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionDown",callback(e){const{highlight:t}=e.getSelectedRangeLast();e.selection.isSelectedByColumnHeader()||e.selection.isSelectedByCorner()||!(t.isCell()||t.isHeader()&&e.selection.isSelectedByRowHeader())||e.selection.transformEnd(1,0)}}},48216:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionDownByViewportHeight",callback(e){const{to:t}=e.getSelectedRangeLast(),o=Math.min(t.row+e.countVisibleRows(),e.countRows()-1),s=e.rowIndexMapper.getNearestNotHiddenIndex(o,-1);if(null!==s){const o=e._createCellCoords(s,t.col),n=t.row-e.view.getFirstFullyVisibleRow(),i=Math.min(o.row-n,e.countRows()-1);e.selection.setRangeEnd(o),e.scrollViewportTo({row:i,verticalSnap:"top",horizontalSnap:"start"})}}}},46174:(e,t,o)=>{"use strict";t.__esModule=!0,t.getAllCommands=function(){return[s.command,n.command,i.command,r.command,l.command,a.command,h.command,c.command,u.command,d.command,g.command,f.command,p.command,m.command]};var s=o(57832),n=o(48216),i=o(38153),r=o(18288),l=o(35970),a=o(13353),h=o(32062),c=o(59939),u=o(7515),d=o(69250),g=o(59551),f=o(70596),p=o(53485),m=o(40561)},38153:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionLeft",callback(e){const{highlight:t}=e.getSelectedRangeLast();e.selection.isSelectedByRowHeader()||e.selection.isSelectedByCorner()||!(t.isCell()||t.isHeader()&&e.selection.isSelectedByColumnHeader())||e.selection.transformEnd(0,-1*e.getDirectionFactor())}}},18288:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionRight",callback(e){const{highlight:t}=e.getSelectedRangeLast();e.selection.isSelectedByRowHeader()||e.selection.isSelectedByCorner()||!(t.isCell()||t.isHeader()&&e.selection.isSelectedByColumnHeader())||e.selection.transformEnd(0,e.getDirectionFactor())}}},35970:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionToColumns",callback(e){const{highlight:t,from:o,to:s}=e.getSelectedRangeLast();e.selection.isSelectedByRowHeader()?e.selection.selectAll(!0,!0):e.selectColumns(o.col,s.col,t)}}},13353:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionToMostBottom",callback(e){const{selection:t,rowIndexMapper:o}=e,{highlight:s,from:n,to:i}=e.getSelectedRangeLast(),r=s.isHeader()&&e.selection.isSelectedByRowHeader();if(s.isCell()||r){const l=o.getNearestNotHiddenIndex(e.countRows()-1,-1),a=n.clone();a.row=s.row,t.setRangeStart(a,void 0,!1,s.clone()),r&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(l,i.col))}}}},32062:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionToMostInlineEnd",callback(e){const{selection:t,columnIndexMapper:o}=e,{highlight:s,from:n,to:i}=e.getSelectedRangeLast();if(!e.selection.isSelectedByRowHeader()&&!e.selection.isSelectedByCorner()&&s.isCell()){const r=o.getNearestNotHiddenIndex(e.countCols()-1,-1),l=n.clone();l.col=s.col,t.setRangeStart(l,void 0,!1,s.clone()),t.setRangeEnd(e._createCellCoords(i.row,r))}}}},59939:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionToMostInlineStart",callback(e){const{selection:t,columnIndexMapper:o}=e,{highlight:s,from:n,to:i}=e.getSelectedRangeLast();if(!e.selection.isSelectedByRowHeader()&&!e.selection.isSelectedByCorner()&&s.isCell()){const r=parseInt(e.getSettings().fixedColumnsStart,10),l=o.getNearestNotHiddenIndex(r,1),a=n.clone();a.col=s.col,t.setRangeStart(a,void 0,!1,s.clone()),t.setRangeEnd(e._createCellCoords(i.row,l))}}}},7515:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionToMostLeft",callback(e){const{selection:t,columnIndexMapper:o}=e,{highlight:s,from:n,to:i}=e.getSelectedRangeLast(),r=s.isHeader()&&e.selection.isSelectedByColumnHeader();if(s.isCell()||r){const l=o.getNearestNotHiddenIndex(...e.isRtl()?[e.countCols()-1,-1]:[0,1]),a=n.clone();a.col=s.col,t.setRangeStart(a,void 0,!1,s.clone()),r&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(i.row,l))}}}},69250:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionToMostRight",callback(e){const{selection:t,columnIndexMapper:o}=e,{highlight:s,from:n,to:i}=e.getSelectedRangeLast(),r=s.isHeader()&&e.selection.isSelectedByColumnHeader();if(s.isCell()||r){const l=o.getNearestNotHiddenIndex(...e.isRtl()?[0,1]:[e.countCols()-1,-1]),a=n.clone();a.col=s.col,t.setRangeStart(a,void 0,!1,s.clone()),r&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(i.row,l))}}}},59551:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionToMostTop",callback(e){const{selection:t,rowIndexMapper:o}=e,{highlight:s,from:n,to:i}=e.getSelectedRangeLast(),r=s.isHeader()&&e.selection.isSelectedByRowHeader();if(s.isCell()||r){const l=o.getNearestNotHiddenIndex(0,1),a=n.clone();a.row=s.row,t.setRangeStart(a,void 0,!1,s.clone()),r&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(l,i.col))}}}},70596:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionToRows",callback(e){const{highlight:t,from:o,to:s}=e.getSelectedRangeLast();e.selection.isSelectedByColumnHeader()?e.selection.selectAll(!0,!0):e.selectRows(o.row,s.row,t)}}},53485:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionUp",callback(e){const{highlight:t}=e.getSelectedRangeLast();e.selection.isSelectedByColumnHeader()||e.selection.isSelectedByCorner()||!(t.isCell()||t.isHeader()&&e.selection.isSelectedByRowHeader())||e.selection.transformEnd(-1,0)}}},40561:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionUpByViewportHeight",callback(e){const{to:t}=e.getSelectedRangeLast(),o=Math.max(t.row-e.countVisibleRows(),0),s=e.rowIndexMapper.getNearestNotHiddenIndex(o,1);if(null!==s){const o=e._createCellCoords(s,t.col),n=t.row-e.view.getFirstFullyVisibleRow(),i=Math.max(o.row-n,0);e.selection.setRangeEnd(o),e.scrollViewportTo({row:i,verticalSnap:"top",horizontalSnap:"start"})}}}},40738:(e,t,o)=>{"use strict";t.__esModule=!0,t.createKeyboardShortcutCommandsPool=function(e){const t={};return u.forEach((o=>{let{name:s,callback:n}=o;t[s]=function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return n(e,...o)}})),t};var s=o(61194),n=o(46174),i=o(54604),r=o(96801),l=o(86091),a=o(30060),h=o(31749),c=o(86554);const u=[...(0,s.getAllCommands)(),...(0,n.getAllCommands)(),...(0,i.getAllCommands)(),r.command,l.command,a.command,h.command,c.command]},43490:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionDown",callback(e){let{selection:t}=e;t.transformStart(1,0)}}},8114:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionDownByViewportHeight",callback(e){const{navigableHeaders:t}=e.getSettings(),o=t?e.countColHeaders():0,{row:s}=e.getSelectedRangeLast().highlight;let n=e.countVisibleRows()+o;s===e.countRows()-1?n=1:s+n>e.countRows()&&(n=e.countRows()-s-1),e.selection.transformStart(n,0),e.getSelectedRangeLast().highlight.row<0&&e.scrollViewportTo({row:0})}}},54604:(e,t,o)=>{"use strict";t.__esModule=!0,t.getAllCommands=function(){return[s.command,n.command,i.command,r.command,l.command,a.command,h.command,c.command,u.command,d.command,g.command,f.command,p.command,m.command,w.command,C.command]};var s=o(43490),n=o(8114),i=o(37646),r=o(12371),l=o(75435),a=o(97906),h=o(1159),c=o(733),u=o(67816),d=o(76633),g=o(95601),f=o(70904),p=o(72065),m=o(33842),w=o(56027),C=o(58583)},37646:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionInlineEnd",callback(e,t){const o=e.getSettings(),s=e.getSelectedRangeLast(),n="function"==typeof o.tabMoves?o.tabMoves(t):o.tabMoves;e.selection.isMultiple()&&!s.isHeader()&&e.countRenderedCols()>0&&e.countRenderedRows()>0?e.selection.transformFocus(-n.row,-n.col):e.selection.transformStart(-n.row,-n.col)}}},12371:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionInlineStart",callback(e,t){const o=e.getSettings(),s=e.getSelectedRangeLast(),n="function"==typeof o.tabMoves?o.tabMoves(t):o.tabMoves;e.selection.isMultiple()&&!s.isHeader()&&e.countRenderedCols()>0&&e.countRenderedRows()>0?e.selection.transformFocus(n.row,n.col):e.selection.transformStart(n.row,n.col)}}},75435:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionLeft",callback(e){e.selection.transformStart(0,-1*e.getDirectionFactor())}}},97906:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionRight",callback(e){e.selection.transformStart(0,e.getDirectionFactor())}}},1159:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionToMostBottom",callback(e){const{col:t}=e.getSelectedRangeLast().highlight;let o=e.rowIndexMapper.getNearestNotHiddenIndex(e.countRows()-1,-1);null===o&&(o=-1),e.selection.setRangeStart(e._createCellCoords(o,t))}}},733:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionToMostBottomInlineEnd",callback(e){const{selection:t,rowIndexMapper:o,columnIndexMapper:s}=e,n=parseInt(e.getSettings().fixedRowsBottom,10),i=o.getNearestNotHiddenIndex(e.countRows()-n-1,-1),r=s.getNearestNotHiddenIndex(e.countCols()-1,-1);t.setRangeStart(e._createCellCoords(i,r))}}},67816:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionToMostInlineEnd",callback(e){const{selection:t,columnIndexMapper:o}=e;t.setRangeStart(e._createCellCoords(e.getSelectedRangeLast().highlight.row,o.getNearestNotHiddenIndex(e.countCols()-1,-1)))}}},76633:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionToMostInlineStart",callback(e){const{selection:t,columnIndexMapper:o}=e,s=parseInt(e.getSettings().fixedColumnsStart,10),n=e.getSelectedRangeLast().highlight.row,i=o.getNearestNotHiddenIndex(s,1);t.setRangeStart(e._createCellCoords(n,i))}}},95601:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionToMostLeft",callback(e){const{selection:t,columnIndexMapper:o}=e,s=e.getSelectedRangeLast().highlight.row;let n=o.getNearestNotHiddenIndex(...e.isRtl()?[e.countCols()-1,-1]:[0,1]);null===n&&(n=e.isRtl()?-1:-e.countRowHeaders()),t.setRangeStart(e._createCellCoords(s,n))}}},70904:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionToMostRight",callback(e){const{selection:t,columnIndexMapper:o}=e,{row:s}=e.getSelectedRangeLast().highlight;let n=o.getNearestNotHiddenIndex(...e.isRtl()?[0,1]:[e.countCols()-1,-1]);null===n&&(n=e.isRtl()?-e.countRowHeaders():-1),t.setRangeStart(e._createCellCoords(s,n))}}},72065:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionToMostTop",callback(e){const{col:t}=e.getSelectedRangeLast().highlight;let o=e.rowIndexMapper.getNearestNotHiddenIndex(0,1);null===o&&(o=-e.countColHeaders()),e.selection.setRangeStart(e._createCellCoords(o,t))}}},33842:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionToMostTopInlineStart",callback(e){const{selection:t,rowIndexMapper:o,columnIndexMapper:s}=e,n=parseInt(e.getSettings().fixedRowsTop,10),i=parseInt(e.getSettings().fixedColumnsStart,10),r=o.getNearestNotHiddenIndex(n,1),l=s.getNearestNotHiddenIndex(i,1);t.setRangeStart(e._createCellCoords(r,l))}}},56027:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionUp",callback(e){let{selection:t}=e;t.transformStart(-1,0)}}},58583:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionUpByViewportHight",callback(e){const{navigableHeaders:t}=e.getSettings(),o=t?e.countColHeaders():0,{row:s}=e.getSelectedRangeLast().highlight;let n=-(e.countVisibleRows()+o);s===-o?n=-1:s+n<o&&(n=-(s+o)),e.selection.transformStart(n,0),e.getSelectedRangeLast().highlight.row<0&&e.scrollViewportTo({row:0})}}},86554:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"populateSelectedCellsData",callback(e){const t=e.getSelectedRange(),{row:o,col:s}=t[t.length-1].highlight.normalize(),n=e.getDataAtCell(o,s),i=new Map;for(let r=0;r<t.length;r++)t[r].forAll(((t,r)=>{if(t>=0&&r>=0&&(t!==o||r!==s)){const{readOnly:o}=e.getCellMeta(t,r);o||i.set(`${t}x${r}`,[t,r,n])}}));e.setDataAtCell(Array.from(i.values()))}}},86091:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"scrollToFocusedCell",callback(e){const{highlight:t}=e.getSelectedRangeLast(),o=e.view.getFirstFullyVisibleRow()-1,s=e.view.getFirstFullyVisibleColumn()-1,n=e.view.getLastFullyVisibleRow()+1,i=e.view.getLastFullyVisibleColumn()+1,r=e._createCellCoords(o,s),l=e._createCellCoords(n,i);if(!e._createCellRange(r,r,l).includes(t)&&(t.row>=0||t.col>=0)){const o={};if(t.col>=0){const s=Math.floor(e.countVisibleCols()/2);o.col=Math.max(t.col-s,0)}if(t.row>=0){const s=Math.floor(e.countVisibleRows()/2);o.row=Math.max(t.row-s,0)}e.scrollViewportTo({...o,verticalSnap:"top",horizontalSnap:"start"})}}}},30060:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"selectAllCells",callback(e){e.selection.selectAll(!0,!0,{disableHeadersHighlight:!0})}}},31749:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"selectAllCellsAndHeaders",callback(e){e.selection.selectAll(!0,!0,{disableHeadersHighlight:!1})}}},27390:(e,t)=>{"use strict";t.__esModule=!0;t.GRID_GROUP="gridDefault",t.EDITOR_EDIT_GROUP="editorManager.handlingEditor"},33802:(e,t,o)=>{"use strict";t.__esModule=!0,t.shortcutsEditorContext=function(e){const t=e.getShortcutManager().addContext("editor"),o=(0,n.createKeyboardShortcutCommandsPool)(e),i={group:s.EDITOR_EDIT_GROUP};t.addShortcuts([{keys:[["Enter"],["Enter","Shift"]],callback:(e,t)=>o.editorCloseAndSaveByEnter(e,t)},{keys:[["Enter","Control/Meta"],["Enter","Control/Meta","Shift"]],captureCtrl:!0,callback:(e,t)=>o.editorCloseAndSaveByEnter(e,t)},{keys:[["Tab"],["Tab","Shift"],["PageDown"],["PageUp"]],forwardToContext:e.getShortcutManager().getContext("grid"),callback:(e,t)=>o.editorCloseAndSave(e,t)},{keys:[["ArrowDown"],["ArrowUp"],["ArrowLeft"],["ArrowRight"]],preventDefault:!1,callback:(e,t)=>o.editorCloseAndSaveByArrowKeys(e,t)},{keys:[["Escape"],["Escape","Control/Meta"]],callback:()=>o.editorCloseWithoutSaving()}],i)};var s=o(27390),n=o(40738)},10647:(e,t,o)=>{"use strict";t.__esModule=!0,t.shortcutsGridContext=function(e){const t=e.getShortcutManager().addContext("grid"),o=(0,i.createKeyboardShortcutCommandsPool)(e),r={runOnlyIf:()=>{const{navigableHeaders:t}=e.getSettings();return(0,s.isDefined)(e.getSelected())&&(t||!t&&e.countRenderedRows()>0&&e.countRenderedCols()>0)},group:n.GRID_GROUP};t.addShortcuts([{keys:[["F2"]],callback:e=>o.editorFastOpen(e)},{keys:[["Enter"],["Enter","Shift"]],callback:(e,t)=>o.editorOpen(e,t)},{keys:[["Backspace"],["Delete"]],callback:()=>o.emptySelectedCells()}],{group:n.EDITOR_EDIT_GROUP,runOnlyIf:()=>(0,s.isDefined)(e.getSelected())}),t.addShortcuts([{keys:[["Control/Meta","A"]],callback:()=>o.selectAllCells(),runOnlyIf:()=>{var t;return!(null!==(t=e.getSelectedRangeLast())&&void 0!==t&&t.highlight.isHeader())}},{keys:[["Control/Meta","A"]],callback:()=>{},runOnlyIf:()=>{var t;return null===(t=e.getSelectedRangeLast())||void 0===t?void 0:t.highlight.isHeader()},preventDefault:!0},{keys:[["Control/Meta","Shift","Space"]],callback:()=>o.selectAllCellsAndHeaders()},{keys:[["Control/Meta","Enter"]],callback:()=>o.populateSelectedCellsData(),runOnlyIf:()=>{var t,o;return!(null!==(t=e.getSelectedRangeLast())&&void 0!==t&&t.highlight.isHeader())&&(null===(o=e.getSelectedRangeLast())||void 0===o?void 0:o.getCellsCount())>1}},{keys:[["Control","Space"]],captureCtrl:!0,callback:()=>o.extendCellsSelectionToColumns()},{keys:[["Shift","Space"]],stopPropagation:!0,callback:()=>o.extendCellsSelectionToRows()},{keys:[["ArrowUp"]],callback:()=>o.moveCellSelectionUp()},{keys:[["ArrowUp","Control/Meta"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostTop()},{keys:[["ArrowUp","Shift"]],callback:()=>o.extendCellsSelectionUp()},{keys:[["ArrowUp","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>o.extendCellsSelectionToMostTop(),runOnlyIf:()=>!(e.selection.isSelectedByCorner()||e.selection.isSelectedByColumnHeader())},{keys:[["ArrowDown"]],callback:()=>o.moveCellSelectionDown()},{keys:[["ArrowDown","Control/Meta"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostBottom()},{keys:[["ArrowDown","Shift"]],callback:()=>o.extendCellsSelectionDown()},{keys:[["ArrowDown","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>o.extendCellsSelectionToMostBottom(),runOnlyIf:()=>!(e.selection.isSelectedByCorner()||e.selection.isSelectedByColumnHeader())},{keys:[["ArrowLeft"]],callback:()=>o.moveCellSelectionLeft()},{keys:[["ArrowLeft","Control/Meta"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostLeft()},{keys:[["ArrowLeft","Shift"]],callback:()=>o.extendCellsSelectionLeft()},{keys:[["ArrowLeft","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>o.extendCellsSelectionToMostLeft(),runOnlyIf:()=>!(e.selection.isSelectedByCorner()||e.selection.isSelectedByRowHeader())},{keys:[["ArrowRight"]],callback:()=>o.moveCellSelectionRight()},{keys:[["ArrowRight","Control/Meta"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostRight()},{keys:[["ArrowRight","Shift"]],callback:()=>o.extendCellsSelectionRight()},{keys:[["ArrowRight","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>o.extendCellsSelectionToMostRight(),runOnlyIf:()=>!(e.selection.isSelectedByCorner()||e.selection.isSelectedByRowHeader())},{keys:[["Home"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostInlineStart(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["Home","Shift"]],callback:()=>o.extendCellsSelectionToMostInlineStart()},{keys:[["Home","Control/Meta"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostTopInlineStart(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostInlineEnd(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End","Shift"]],callback:()=>o.extendCellsSelectionToMostInlineEnd()},{keys:[["End","Control/Meta"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostBottomInlineEnd(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["PageUp"]],callback:()=>o.moveCellSelectionUpByViewportHight()},{keys:[["PageUp","Shift"]],callback:()=>o.extendCellsSelectionUpByViewportHeight()},{keys:[["PageDown"]],callback:()=>o.moveCellSelectionDownByViewportHeight()},{keys:[["PageDown","Shift"]],callback:()=>o.extendCellsSelectionDownByViewportHeight()},{keys:[["Tab"]],preventDefault:!1,callback:e=>o.moveCellSelectionInlineStart(e)},{keys:[["Shift","Tab"]],preventDefault:!1,callback:e=>o.moveCellSelectionInlineEnd(e)},{keys:[["Control/Meta","Backspace"]],callback:()=>o.scrollToFocusedCell()}],r)};var s=o(38893),n=o(27390),i=o(40738)},37947:(e,t,o)=>{"use strict";t.__esModule=!0;var s={registerAllShortcutContexts:!0};t.registerAllShortcutContexts=function(e){[i.shortcutsGridContext,n.shortcutsEditorContext].forEach((t=>t(e)))};var n=o(33802),i=o(10647),r=o(27390);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===r[e]||(t[e]=r[e]))}))},8767:(e,t,o)=>{"use strict";t.__esModule=!0,t.isContextObject=c,o(67834),o(15724);var s=o(84134),n=o(94901),i=o(38893),r=o(78832),l=o(13911),a=o(28927);const h=Symbol("shortcut-context");function c(e){return(0,l.isObject)(e)&&e.__kindOf===h}t.createContext=e=>{const t=(0,s.createUniqueMap)({errorIdExists:t=>`The "${t}" shortcut is already registered in the "${e}" context.`}),o=function(){let{keys:e,callback:o,group:s,runOnlyIf:l=()=>!0,captureCtrl:h=!1,preventDefault:u=!0,stopPropagation:d=!1,relativeToGroup:g,position:f,forwardToContext:p}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((0,i.isUndefined)(s))throw new Error("You need to define the shortcut's group.");if(!1===(0,r.isFunction)(o))throw new Error("The shortcut's callback needs to be a function.");if(!1===Array.isArray(e))throw new Error(a.toSingleLine`Pass the shortcut\'s keys as an array of arrays,\x20
90
90
  using the KeyboardEvent.key properties:\x20
91
91
  https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values.`);const m={callback:o,group:s,runOnlyIf:l,captureCtrl:h,preventDefault:u,stopPropagation:d};(0,i.isDefined)(g)&&(m.relativeToGroup=g,m.position=f),c(p)&&(m.forwardToContext=p),e.forEach((e=>{const o=(0,n.normalizeKeys)(e);if(t.hasItem(o)){const e=t.getItem(o);let s=e.findIndex((e=>e.group===g));-1!==s?"before"===f?s-=1:s+=1:s=e.length,e.splice(s,0,m)}else t.addItem(o,[m])}))},u=e=>{const o=(0,n.normalizeKeys)(e);t.removeItem(o)};return{__kindOf:h,addShortcut:o,addShortcuts:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.forEach((e=>{(0,l.objectEach)(t,((o,s)=>{!1===Object.prototype.hasOwnProperty.call(e,s)&&(e[s]=t[s])})),o(e)}))},getShortcuts:e=>{const o=(0,n.normalizeKeys)(e),s=t.getItem(o);return(0,i.isDefined)(s)?s.slice():[]},hasShortcut:e=>{const o=(0,n.normalizeKeys)(e);return t.hasItem(o)},removeShortcutsByKeys:u,removeShortcutsByGroup:e=>{t.getItems().forEach((t=>{let[o,s]=t;const i=s.filter((t=>t.group!==e));0===i.length?u((0,n.getKeysList)(o)):(s.length=0,s.push(...i))}))}}}},57660:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(64431);t.createShortcutManager=s.createShortcutManager},60781:(e,t,o)=>{"use strict";t.__esModule=!0,t.createKeysObserver=function(){const e=new Set;return{press(t){e.add(t)},release(t){e.delete(t)},releaseAll(){e.clear()},isPressed:t=>e.has(t)}},o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371)},64431:(e,t,o)=>{"use strict";t.__esModule=!0,o(67834);var s=o(84134),n=o(79729),i=o(8767),r=o(51276),l=o(28927);t.createShortcutManager=e=>{let{ownerWindow:t,handleEvent:o,beforeKeyDown:a,afterKeyDown:h}=e;const c=(0,s.createUniqueMap)({errorIdExists:e=>`The "${e}" context name is already registered.`});let u="grid";const d=()=>u,g=e=>c.getItem(e);let f=!1;const p=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d();const s=(0,i.isContextObject)(o)?o:g(o);let r=!1;if(!s.hasShortcut(t))return r;const l=s.getShortcuts(t);for(let o=0;o<l.length;o++){const{callback:s,runOnlyIf:i,preventDefault:a,stopPropagation:h,captureCtrl:c,forwardToContext:u}=l[o];if(!0===i(e)){if(f=c,r=!1===s(e,t),f=!1,a&&e.preventDefault(),h&&((0,n.stopImmediatePropagation)(e),e.stopPropagation()),r)break;u&&p(e,t,u)}}return r},m=(0,r.useRecorder)(t,o,a,h,p);return m.mount(),{addContext:e=>{const t=(0,i.createContext)(e);return c.addItem(e,t),t},getActiveContextName:d,getContext:g,setActiveContextName:e=>{if(!c.hasItem(e))throw new Error(l.toSingleLine`You've tried to activate the "${e}" shortcut context\x20
92
- that does not exist. Before activation, register the context using the "addContext" method.`);u=e},isCtrlPressed:()=>!f&&(m.isPressed("control")||m.isPressed("meta")),releasePressedKeys:()=>m.releasePressedKeys(),destroy:()=>m.unmount()}}},51276:(e,t,o)=>{"use strict";t.__esModule=!0,t.useRecorder=function(e,t,o,s,d){const g=e=>a.includes(e),f=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=[];return e.altKey&&o.push("alt"),t&&(e.ctrlKey||e.metaKey)?o.push("control/meta"):(e.ctrlKey&&o.push("control"),e.metaKey&&o.push("meta")),e.shiftKey&&o.push("shift"),o},p=e=>{if(!1===t(e))return;const r=o(e);if(229===e.keyCode||!1===r||(0,i.isImmediatePropagationStopped)(e))return;const a=(0,n.normalizeEventKey)(e);let h=[];g(a)||(h=f(e));const c=[a].concat(h);!d(e,c)&&((0,l.isMacOS)()&&h.includes("meta")||!(0,l.isMacOS)()&&h.includes("control"))&&d(e,[a].concat(f(e,!0))),s(e)},m=e=>{if(e.key){const t=(0,n.normalizeEventKey)(e);g(t)&&h.press(t)}},w=e=>{if(e.key){const t=(0,n.normalizeEventKey)(e);g(t)&&h.release(t)}},C=()=>{h.releaseAll()};return{mount:()=>{let t=e;for(u+=1;t;)1===u&&(t.document.documentElement.addEventListener("keydown",m),c.push({event:"keydown",listener:m}),t.document.documentElement.addEventListener("keyup",w),c.push({event:"keyup",listener:w})),t.document.documentElement.addEventListener("keydown",p),t.document.documentElement.addEventListener("blur",C),t=(0,r.getParentWindow)(t)},unmount:()=>{let t=e;for(u-=1;t;){if(0===u){for(let e=0;e<c.length;e++){const{event:o,listener:s}=c[e];t.document.documentElement.removeEventListener(o,s)}c.length=0}t.document.documentElement.removeEventListener("keydown",p),t.document.documentElement.removeEventListener("blur",C),t=(0,r.getParentWindow)(t)}},isPressed:e=>h.isPressed(e),releasePressedKeys:()=>h.releaseAll()}},o(15724);var s=o(60781),n=o(94901),i=o(79729),r=o(9893),l=o(28890);const a=["meta","alt","shift","control"],h=(0,s.createKeysObserver)(),c=[];let u=0},94901:(e,t)=>{"use strict";t.__esModule=!0;const o=new Map([[" ","space"],["spacebar","space"],["scroll","scrolllock"],["del","delete"],["esc","escape"],["medianexttrack","mediatracknext"],["mediaprevioustrack","mediatrackprevious"],["volumeup","audiovolumeup"],["volumedown","audiovolumedown"],["volumemute","audiovolumemute"],["multiply","*"],["add","+"],["divide","/"],["subtract","-"],["left","arrowleft"],["right","arrowright"],["up","arrowup"],["down","arrowdown"]]);t.normalizeKeys=e=>e.map((e=>{const t=e.toLowerCase();return o.has(t)?o.get(t):t})).sort().join("+");t.getKeysList=e=>e.split("+");const s=new Map([[96,"numpad0"],[97,"numpad1"],[98,"numpad2"],[99,"numpad3"],[100,"numpad4"],[101,"numpad5"],[102,"numpad6"],[103,"numpad7"],[104,"numpad8"],[105,"numpad9"],[106,"multiply"],[107,"add"],[108,"decimal"],[109,"subtract"],[110,"decimal"],[111,"divide"],[112,"f1"],[113,"f2"],[114,"f3"],[115,"f4"],[116,"f5"],[117,"f6"],[118,"f7"],[119,"f8"],[120,"f9"],[121,"f10"],[122,"f11"],[123,"f12"],[186,"semicolon"],[187,"equal"],[188,"comma"],[189,"minus"],[190,"period"],[191,"slash"],[192,"backquote"],[219,"bracketleft"],[220,"backslash"],[221,"bracketright"],[222,"quote"]]);t.normalizeEventKey=e=>{let{which:t,key:o}=e;if(s.has(t))return s.get(t);const n=String.fromCharCode(t).toLowerCase();return/^[a-z0-9]$/.test(n)?n:o.toLowerCase()}},66801:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(9893),r=s(o(82629)),l=o(79729),a=s(o(90)),h=o(30870),c=o(11015),u=o(92692);function d(e,t,o){g(e,t),t.set(e,o)}function g(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function f(e,t){return e.get(m(e,t))}function p(e,t,o){return e.set(m(e,t),o),o}function m(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var w=new WeakMap,C=new WeakMap,v=new WeakMap,y=new WeakMap,E=new WeakMap,S=new WeakMap,R=new WeakMap,b=new WeakSet;function _(){return parseInt(this.hot.rootElement.getAttribute((0,u.A11Y_COLCOUNT)()[0]),10)}function T(e){const t=m(b,this,_).call(this)+e;(0,i.setAttribute)(this.hot.rootElement,...(0,u.A11Y_COLCOUNT)(t))}t.default=class{constructor(e){var t,o;g(t=this,o=b),o.add(t),(0,n.default)(this,"hot",void 0),(0,n.default)(this,"eventManager",void 0),(0,n.default)(this,"settings",void 0),(0,n.default)(this,"THEAD",void 0),(0,n.default)(this,"TBODY",void 0),(0,n.default)(this,"_wt",void 0),(0,n.default)(this,"activeWt",void 0),d(this,w,0),d(this,C,0),(0,n.default)(this,"postponedAdjustElementsSize",!1),d(this,v,!1),d(this,y,void 0),d(this,E,void 0),d(this,S,0),d(this,R,0),this.hot=e,this.eventManager=new r.default(this.hot),this.settings=this.hot.getSettings(),this.createElements(),this.registerEvents(),this.initializeWalkontable()}render(){this.hot.isRenderSuspended()||(this.hot.runHooks("beforeRender",this.hot.forceFullRender),this.postponedAdjustElementsSize&&(this.postponedAdjustElementsSize=!1,this.adjustElementsSize(!0)),this._wt.draw(!this.hot.forceFullRender),this.hot.runHooks("afterRender",this.hot.forceFullRender),this.hot.forceFullRender=!1,this.hot.renderCall=!1)}adjustElementsSize(){this.hot.isRenderSuspended()?this.postponedAdjustElementsSize=!0:this._wt.wtOverlays.adjustElementsSize()}getCellAtCoords(e,t){const o=this._wt.getCell(e,t);return o<0?null:o}scrollViewport(e,t,o,s,n){return this._wt.scrollViewport(e,t,o,s,n)}scrollViewportHorizontally(e,t,o){return this._wt.scrollViewportHorizontally(e,t,o)}scrollViewportVertically(e,t,o){return this._wt.scrollViewportVertically(e,t,o)}createElements(){const{rootElement:e,rootDocument:t}=this.hot,o=e.getAttribute("style");o&&e.setAttribute("data-originalstyle",o),(0,i.addClass)(e,"handsontable"),p(E,this,t.createElement("TABLE")),(0,i.addClass)(f(E,this),"htCore"),this.hot.getSettings().tableClassName&&(0,i.addClass)(f(E,this),this.hot.getSettings().tableClassName),this.settings.ariaTags&&((0,i.setAttribute)(f(E,this),[(0,u.A11Y_PRESENTATION)()]),(0,i.setAttribute)(e,[(0,u.A11Y_TREEGRID)(),(0,u.A11Y_ROWCOUNT)(-1),(0,u.A11Y_COLCOUNT)(this.hot.countCols()),(0,u.A11Y_MULTISELECTABLE)()])),this.THEAD=t.createElement("THEAD"),f(E,this).appendChild(this.THEAD),this.TBODY=t.createElement("TBODY"),f(E,this).appendChild(this.TBODY),this.hot.table=f(E,this),this.hot.container.insertBefore(f(E,this),this.hot.container.firstChild)}registerEvents(){const{rootElement:e,rootDocument:t,selection:o,rootWindow:s}=this.hot,n=t.documentElement;this.eventManager.addEventListener(e,"mousedown",(e=>{p(v,this,!0),this.isTextSelectionAllowed(e.target)||((0,i.clearTextSelection)(s),e.preventDefault(),s.focus())})),this.eventManager.addEventListener(e,"mouseup",(()=>{p(v,this,!1)})),this.eventManager.addEventListener(e,"mousemove",(e=>{f(v,this)&&!this.isTextSelectionAllowed(e.target)&&(this.settings.fragmentSelection&&(0,i.clearTextSelection)(s),e.preventDefault())})),this.eventManager.addEventListener(n,"keyup",(e=>{o.isInProgress()&&!e.shiftKey&&o.finish()})),this.eventManager.addEventListener(n,"mouseup",(s=>{o.isInProgress()&&(0,l.isLeftClick)(s)&&o.finish(),p(y,this,!1);const n=(0,i.isOutsideInput)(t.activeElement);(0,i.isInput)(t.activeElement)&&!n||!n&&(o.isSelected()||o.isSelectedByAnyHeader()||e.contains(s.target)||(0,l.isRightClick)(s))||this.hot.unlisten()})),this.eventManager.addEventListener(n,"contextmenu",(e=>{o.isInProgress()&&(0,l.isRightClick)(e)&&(o.finish(),p(y,this,!1))})),this.eventManager.addEventListener(n,"touchend",(()=>{o.isInProgress()&&o.finish(),p(y,this,!1)})),this.eventManager.addEventListener(n,"mousedown",(o=>{const s=o.target,r=o.x||o.clientX,l=o.y||o.clientY;let a=o.target;if(f(y,this)||!e||!this.hot.view)return;const{holder:h}=this._wt.wtTable;if(a===h){const e=(0,i.getScrollbarWidth)(t);if(t.elementFromPoint(r+e,l)!==h||t.elementFromPoint(r,l+e)!==h)return}else for(;a!==n;){if(null===a){if(o.isTargetWebComponent)break;return}if(a===e)return;a=a.parentNode}("function"==typeof this.settings.outsideClickDeselects?this.settings.outsideClickDeselects(s):this.settings.outsideClickDeselects)?this.hot.deselectCell():this.hot.destroyEditor(!1,!1)}));let r=(0,i.getParentWindow)(s);for(;null!==r;)this.eventManager.addEventListener(r.document.documentElement,"click",(()=>{this.hot.unlisten()})),r=(0,i.getParentWindow)(r);this.eventManager.addEventListener(f(E,this),"selectstart",(e=>{this.settings.fragmentSelection||(0,i.isInput)(e.target)||e.preventDefault()}))}translateFromRenderableToVisualCoords(e){let{row:t,col:o}=e;return this.hot._createCellCoords(...this.translateFromRenderableToVisualIndex(t,o))}translateFromRenderableToVisualIndex(e,t){let o=e>=0?this.hot.rowIndexMapper.getVisualFromRenderableIndex(e):e,s=t>=0?this.hot.columnIndexMapper.getVisualFromRenderableIndex(t):t;return null===o&&(o=e),null===s&&(s=t),[o,s]}countRenderableIndexes(e,t){const o=Math.min(e.getNotTrimmedIndexesLength(),t),s=e.getNearestNotHiddenIndex(o-1,-1);return null===s?0:e.getRenderableFromVisualIndex(s)+1}countRenderableColumns(){return this.countRenderableIndexes(this.hot.columnIndexMapper,this.settings.maxCols)}countRenderableRows(){return this.countRenderableIndexes(this.hot.rowIndexMapper,this.settings.maxRows)}countNotHiddenRowIndexes(e,t){return this.countNotHiddenIndexes(e,t,this.hot.rowIndexMapper,this.countRenderableRows())}countNotHiddenColumnIndexes(e,t){return this.countNotHiddenIndexes(e,t,this.hot.columnIndexMapper,this.countRenderableColumns())}countNotHiddenIndexes(e,t,o,s){if(isNaN(e)||e<0)return 0;const n=o.getNearestNotHiddenIndex(e,t),i=o.getRenderableFromVisualIndex(n);if(!Number.isInteger(i))return 0;let r=0;return t<0?r=i+1:t>0&&(r=s-i),r}countNotHiddenFixedColumnsStart(){const e=this.hot.countCols(),t=Math.min(parseInt(this.settings.fixedColumnsStart,10),e)-1;return this.countNotHiddenColumnIndexes(t,-1)}countNotHiddenFixedRowsTop(){const e=this.hot.countRows(),t=Math.min(parseInt(this.settings.fixedRowsTop,10),e)-1;return this.countNotHiddenRowIndexes(t,-1)}countNotHiddenFixedRowsBottom(){const e=this.hot.countRows(),t=Math.max(e-parseInt(this.settings.fixedRowsBottom,10),0);return this.countNotHiddenRowIndexes(t,1)}countRenderableColumnsInRange(e,t){let o=0;for(let s=e;s<=t;s++)null!==this.hot.columnIndexMapper.getRenderableFromVisualIndex(s)&&(o+=1);return o}countRenderableRowsInRange(e,t){let o=0;for(let s=e;s<=t;s++)null!==this.hot.rowIndexMapper.getRenderableFromVisualIndex(s)&&(o+=1);return o}isMainTableNotFullyCoveredByOverlays(){const e=this.countNotHiddenFixedRowsTop()+this.countNotHiddenFixedRowsBottom(),t=this.countNotHiddenFixedColumnsStart();return this.hot.countRenderedRows()>e&&this.hot.countRenderedCols()>t}initializeWalkontable(){const e={ariaTags:this.settings.ariaTags,rtlMode:this.hot.isRtl(),externalRowCalculator:this.hot.getPlugin("autoRowSize")&&this.hot.getPlugin("autoRowSize").isEnabled(),table:f(E,this),isDataViewInstance:()=>(0,c.isRootInstance)(this.hot),preventOverflow:()=>this.settings.preventOverflow,preventWheel:()=>this.settings.preventWheel,stretchH:()=>this.settings.stretchH,data:(e,t)=>this.hot.getDataAtCell(...this.translateFromRenderableToVisualIndex(e,t)),totalRows:()=>this.countRenderableRows(),totalColumns:()=>this.countRenderableColumns(),fixedColumnsStart:()=>this.countNotHiddenFixedColumnsStart(),fixedRowsTop:()=>this.countNotHiddenFixedRowsTop(),fixedRowsBottom:()=>this.countNotHiddenFixedRowsBottom(),shouldRenderInlineStartOverlay:()=>this.settings.fixedColumnsStart>0||e.rowHeaders().length>0,shouldRenderTopOverlay:()=>this.settings.fixedRowsTop>0||e.columnHeaders().length>0,shouldRenderBottomOverlay:()=>this.settings.fixedRowsBottom>0,minSpareRows:()=>this.settings.minSpareRows,renderAllRows:this.settings.renderAllRows,renderAllColumns:this.settings.renderAllColumns,rowHeaders:()=>{const e=[];return this.hot.hasRowHeaders()&&e.push(((e,t)=>{const o=e>=0?this.hot.rowIndexMapper.getVisualFromRenderableIndex(e):e;this.appendRowHeader(o,t)})),this.hot.runHooks("afterGetRowHeaderRenderers",e),p(C,this,e.length),this.hot.getSettings().ariaTags&&m(b,this,_).call(this)===this.hot.countCols()&&m(b,this,T).call(this,f(C,this)),e},columnHeaders:()=>{const e=[];return this.hot.hasColHeaders()&&e.push(((e,t)=>{const o=e>=0?this.hot.columnIndexMapper.getVisualFromRenderableIndex(e):e;this.appendColHeader(o,t)})),this.hot.runHooks("afterGetColumnHeaderRenderers",e),p(w,this,e.length),e},columnWidth:e=>{const t=this.hot.columnIndexMapper.getVisualFromRenderableIndex(e);return this.hot.getColWidth(null===t?e:t)},rowHeight:e=>{const t=this.hot.rowIndexMapper.getVisualFromRenderableIndex(e);return this.hot.getRowHeight(null===t?e:t)},rowHeightByOverlayName:(e,t)=>{const o=this.hot.rowIndexMapper.getVisualFromRenderableIndex(e),s=null===o?e:o;return this.hot.runHooks("modifyRowHeightByOverlayName",this.hot.getRowHeight(s),s,t)},cellRenderer:(e,t,o)=>{const[s,n]=this.translateFromRenderableToVisualIndex(e,t),i=this.hot.runHooks("modifyGetCellCoords",s,n);let r=s,l=n;Array.isArray(i)&&([r,l]=i);const a=this.hot.getCellMeta(r,l),h=this.hot.colToProp(l);let c=this.hot.getDataAtRowProp(r,h);this.hot.hasHook("beforeValueRender")&&(c=this.hot.runHooks("beforeValueRender",c,a)),this.hot.runHooks("beforeRenderer",o,s,n,h,c,a),this.hot.getCellRenderer(a)(this.hot,o,s,n,h,c,a),this.hot.runHooks("afterRenderer",o,s,n,h,c,a)},selections:this.hot.selection.highlight,hideBorderOnMouseDownOver:()=>this.settings.fragmentSelection,onWindowResize:()=>{this.hot&&!this.hot.isDestroyed&&this.hot.refreshDimensions()},onContainerElementResize:()=>{this.hot&&!this.hot.isDestroyed&&(0,i.isVisible)(this.hot.rootElement)&&this.hot.refreshDimensions()},onCellMouseDown:(e,t,o,s)=>{const n=this.translateFromRenderableToVisualCoords(t),i={row:!1,column:!1,cell:!1};this.hot.listen(),this.activeWt=s,p(y,this,!0),this.hot.runHooks("beforeOnCellMouseDown",e,n,o,i),(0,l.isImmediatePropagationStopped)(e)||((0,h.handleMouseEvent)(e,{coords:n,selection:this.hot.selection,controller:i,cellCoordsFactory:(e,t)=>this.hot._createCellCoords(e,t)}),this.hot.runHooks("afterOnCellMouseDown",e,n,o),this.activeWt=this._wt)},onCellContextMenu:(e,t,o,s)=>{const n=this.translateFromRenderableToVisualCoords(t);this.activeWt=s,p(y,this,!1),this.hot.selection.isInProgress()&&this.hot.selection.finish(),this.hot.runHooks("beforeOnCellContextMenu",e,n,o),(0,l.isImmediatePropagationStopped)(e)||(this.hot.runHooks("afterOnCellContextMenu",e,n,o),this.activeWt=this._wt)},onCellMouseOut:(e,t,o,s)=>{const n=this.translateFromRenderableToVisualCoords(t);this.activeWt=s,this.hot.runHooks("beforeOnCellMouseOut",e,n,o),(0,l.isImmediatePropagationStopped)(e)||(this.hot.runHooks("afterOnCellMouseOut",e,n,o),this.activeWt=this._wt)},onCellMouseOver:(e,t,o,s)=>{const n=this.translateFromRenderableToVisualCoords(t),i={row:!1,column:!1,cell:!1};this.activeWt=s,this.hot.runHooks("beforeOnCellMouseOver",e,n,o,i),(0,l.isImmediatePropagationStopped)(e)||(f(y,this)&&(0,h.handleMouseEvent)(e,{coords:n,selection:this.hot.selection,controller:i,cellCoordsFactory:(e,t)=>this.hot._createCellCoords(e,t)}),this.hot.runHooks("afterOnCellMouseOver",e,n,o),this.activeWt=this._wt)},onCellMouseUp:(e,t,o,s)=>{const n=this.translateFromRenderableToVisualCoords(t);this.activeWt=s,this.hot.runHooks("beforeOnCellMouseUp",e,n,o),(0,l.isImmediatePropagationStopped)(e)||this.hot.isDestroyed||(this.hot.runHooks("afterOnCellMouseUp",e,n,o),this.activeWt=this._wt)},onCellCornerMouseDown:e=>{e.preventDefault(),this.hot.runHooks("afterOnCellCornerMouseDown",e)},onCellCornerDblClick:e=>{e.preventDefault(),this.hot.runHooks("afterOnCellCornerDblClick",e)},beforeDraw:(e,t)=>this.beforeRender(e,t),onDraw:e=>this.afterRender(e),onBeforeViewportScrollVertically:e=>{const t=this.hot.rowIndexMapper,o=e<0;let s=e;return o||(s=t.getVisualFromRenderableIndex(e),null!==s)?(s=this.hot.runHooks("beforeViewportScrollVertically",s),this.hot.runHooks("beforeViewportScroll"),o?s:t.getRenderableFromVisualIndex(s)):e},onBeforeViewportScrollHorizontally:e=>{const t=this.hot.columnIndexMapper,o=e<0;let s=e;return o||(s=t.getVisualFromRenderableIndex(e),null!==s)?(s=this.hot.runHooks("beforeViewportScrollHorizontally",s),this.hot.runHooks("beforeViewportScroll"),o?s:t.getRenderableFromVisualIndex(s)):e},onScrollVertically:()=>{this.hot.runHooks("afterScrollVertically"),this.hot.runHooks("afterScroll")},onScrollHorizontally:()=>{this.hot.runHooks("afterScrollHorizontally"),this.hot.runHooks("afterScroll")},onBeforeRemoveCellClassNames:()=>this.hot.runHooks("beforeRemoveCellClassNames"),onBeforeHighlightingRowHeader:(e,t,o)=>{const s=this.hot.rowIndexMapper,n=e<0;let i=e;n||(i=s.getVisualFromRenderableIndex(e));const r=this.hot.runHooks("beforeHighlightingRowHeader",i,t,o);return n?r:s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(r,1))},onBeforeHighlightingColumnHeader:(e,t,o)=>{const s=this.hot.columnIndexMapper,n=e<0;let i=e;n||(i=s.getVisualFromRenderableIndex(e));const r=this.hot.runHooks("beforeHighlightingColumnHeader",i,t,o);return n?r:s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(r,1))},onAfterDrawSelection:(e,t,o)=>{let s;const[n,i]=this.translateFromRenderableToVisualIndex(e,t),r=this.hot.selection.getSelectedRange();if(r.size()>0){const e=r.peekByIndex(null!=o?o:0);s=[e.from.row,e.from.col,e.to.row,e.to.col]}return this.hot.runHooks("afterDrawSelection",n,i,s,o)},onBeforeDrawBorders:(e,t)=>{const[o,s,n,i]=e,r=[this.hot.rowIndexMapper.getVisualFromRenderableIndex(o),this.hot.columnIndexMapper.getVisualFromRenderableIndex(s),this.hot.rowIndexMapper.getVisualFromRenderableIndex(n),this.hot.columnIndexMapper.getVisualFromRenderableIndex(i)];return this.hot.runHooks("beforeDrawBorders",r,t)},onBeforeTouchScroll:()=>this.hot.runHooks("beforeTouchScroll"),onAfterMomentumScroll:()=>this.hot.runHooks("afterMomentumScroll"),onBeforeStretchingColumnWidth:(e,t)=>{const o=this.hot.columnIndexMapper.getVisualFromRenderableIndex(t);return this.hot.runHooks("beforeStretchingColumnWidth",e,o)},onModifyRowHeaderWidth:e=>this.hot.runHooks("modifyRowHeaderWidth",e),onModifyGetCellCoords:(e,t,o)=>{const s=this.hot.rowIndexMapper,n=this.hot.columnIndexMapper,i=t>=0?n.getVisualFromRenderableIndex(t):t,r=e>=0?s.getVisualFromRenderableIndex(e):e,l=this.hot.runHooks("modifyGetCellCoords",r,i,o);if(Array.isArray(l)){const[e,t,o,i]=l;return[e>=0?s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(e,1)):e,t>=0?n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(t,1)):t,o>=0?s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(o,-1)):o,i>=0?n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(i,-1)):i]}},viewportRowCalculatorOverride:e=>{let t=this.settings.viewportRowRenderingOffset;if("auto"===t&&this.settings.fixedRowsTop&&(t=10),t>0||"auto"===t){const o=this.countRenderableRows(),s=e.startRow,n=e.endRow;if("number"==typeof t)e.startRow=Math.max(s-t,0),e.endRow=Math.min(n+t,o-1);else if("auto"===t){const t=Math.ceil(n/o*12);e.startRow=Math.max(s-t,0),e.endRow=Math.min(n+t,o-1)}}this.hot.runHooks("afterViewportRowCalculatorOverride",e)},viewportColumnCalculatorOverride:e=>{let t=this.settings.viewportColumnRenderingOffset;if("auto"===t&&this.settings.fixedColumnsStart&&(t=10),t>0||"auto"===t){const o=this.countRenderableColumns(),s=e.startColumn,n=e.endColumn;if("number"==typeof t&&(e.startColumn=Math.max(s-t,0),e.endColumn=Math.min(n+t,o-1)),"auto"===t){const t=Math.ceil(n/o*6);e.startColumn=Math.max(s-t,0),e.endColumn=Math.min(n+t,o-1)}}this.hot.runHooks("afterViewportColumnCalculatorOverride",e)},rowHeaderWidth:()=>this.settings.rowHeaderWidth,columnHeaderHeight:()=>{const e=this.hot.runHooks("modifyColumnHeaderHeight");return this.settings.columnHeaderHeight||e}};this.hot.runHooks("beforeInitWalkontable",e),this._wt=new a.default(e),this.activeWt=this._wt;const t=this._wt.wtTable.spreader,{width:o,height:s}=this.hot.rootElement.getBoundingClientRect();this.setLastSize(o,s),this.eventManager.addEventListener(t,"mousedown",(e=>{e.target===t&&3===e.which&&e.stopPropagation()})),this.eventManager.addEventListener(t,"contextmenu",(e=>{e.target===t&&3===e.which&&e.stopPropagation()})),this.eventManager.addEventListener(this.hot.rootDocument.documentElement,"click",(()=>{this.settings.observeDOMVisibility&&this._wt.drawInterrupted&&(this.hot.forceFullRender=!0,this.render())}))}isTextSelectionAllowed(e){if((0,i.isInput)(e))return!0;const t=(0,i.isChildOf)(e,this._wt.wtTable.spreader);return!(!0!==this.settings.fragmentSelection||!t)||(!("cell"!==this.settings.fragmentSelection||!this.isSelectedOnlyCell()||!t)||!(this.settings.fragmentSelection||!this.isCellEdited()||!this.isSelectedOnlyCell()))}isMouseDown(){return f(y,this)}isSelectedOnlyCell(){var e,t;return null!==(e=null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.isSingleCell())&&void 0!==e&&e}isCellEdited(){const e=this.hot.getActiveEditor();return e&&e.isOpened()}beforeRender(e,t){e&&this.hot.runHooks("beforeViewRender",this.hot.forceFullRender,t)}afterRender(e){e&&this.hot.runHooks("afterViewRender",this.hot.forceFullRender)}appendRowHeader(e,t){if(t.firstChild){const o=t.firstChild;if(!(0,i.hasClass)(o,"relative"))return(0,i.empty)(t),void this.appendRowHeader(e,t);this.updateCellHeader(o.querySelector(".rowHeader"),e,this.hot.getRowHeader)}else{const{rootDocument:o,getRowHeader:s}=this.hot,n=o.createElement("div"),i=o.createElement("span");n.className="relative",i.className="rowHeader",this.updateCellHeader(i,e,s),n.appendChild(i),t.appendChild(n)}this.hot.runHooks("afterGetRowHeader",e,t)}appendColHeader(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hot.getColHeader,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const n=()=>{const t=e>=0?this.hot.getColumnMeta(e).headerClassName:null;return t?t.split(" "):[]};if(t.firstChild){const r=t.firstChild;(0,i.hasClass)(r,"relative")?(this.updateCellHeader(r.querySelector(".colHeader"),e,o,s),r.className="",(0,i.addClass)(r,["relative",...n()])):((0,i.empty)(t),this.appendColHeader(e,t,o,s))}else{const{rootDocument:r}=this.hot,l=r.createElement("div"),a=r.createElement("span"),h=n();l.classList.add("relative",...h),a.className="colHeader",this.settings.ariaTags&&((0,i.setAttribute)(l,...(0,u.A11Y_PRESENTATION)()),(0,i.setAttribute)(a,...(0,u.A11Y_PRESENTATION)())),this.updateCellHeader(a,e,o,s),l.appendChild(a),t.appendChild(l)}this.hot.runHooks("afterGetColHeader",e,t,s)}updateCellHeader(e,t,o){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=t;const r=this._wt.wtOverlays.getParentOverlay(e)||this._wt;e.parentNode&&((0,i.hasClass)(e,"colHeader")?n=r.wtTable.columnFilter.sourceToRendered(t):(0,i.hasClass)(e,"rowHeader")&&(n=r.wtTable.rowFilter.sourceToRendered(t))),n>-1?(0,i.fastInnerHTML)(e,o(t,s)):((0,i.fastInnerText)(e,String.fromCharCode(160)),(0,i.addClass)(e,"cornerHeader"))}maximumVisibleElementWidth(e){const t=this._wt.wtViewport.getWorkspaceWidth()-e;return t>0?t:0}maximumVisibleElementHeight(e){const t=this._wt.wtViewport.getWorkspaceHeight()-e;return t>0?t:0}setLastSize(e,t){p(S,this,e),p(R,this,t)}getLastSize(){return{width:f(S,this),height:f(R,this)}}getFirstRenderedVisibleRow(){return this._wt.wtViewport.rowsRenderCalculator?this.hot.rowIndexMapper.getNearestNotHiddenIndex(this._wt.wtTable.getFirstRenderedRow(),1):null}getLastRenderedVisibleRow(){return this._wt.wtViewport.rowsRenderCalculator?this.hot.rowIndexMapper.getNearestNotHiddenIndex(this._wt.wtTable.getLastRenderedRow(),-1):null}getFirstRenderedVisibleColumn(){return this._wt.wtViewport.columnsRenderCalculator?this.hot.columnIndexMapper.getNearestNotHiddenIndex(this._wt.wtTable.getFirstRenderedColumn(),1):null}getLastRenderedVisibleColumn(){return this._wt.wtViewport.columnsRenderCalculator?this.hot.columnIndexMapper.getNearestNotHiddenIndex(this._wt.wtTable.getLastRenderedColumn(),-1):null}getFirstFullyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getFirstVisibleRow())}getLastFullyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getLastVisibleRow())}getFirstFullyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getFirstVisibleColumn())}getLastFullyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getLastVisibleColumn())}getFirstPartiallyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getFirstPartiallyVisibleRow())}getLastPartiallyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getLastPartiallyVisibleRow())}getFirstPartiallyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getFirstPartiallyVisibleColumn())}getLastPartiallyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getLastPartiallyVisibleColumn())}getColumnHeadersCount(){return f(w,this)}getRowHeadersCount(){return f(C,this)}getViewportWidth(){return this._wt.wtViewport.getViewportWidth()}getWorkspaceWidth(){return this._wt.wtViewport.getWorkspaceWidth()}getViewportHeight(){return this._wt.wtViewport.getViewportHeight()}getWorkspaceHeight(){return this._wt.wtViewport.getWorkspaceHeight()}getElementOverlayName(e){var t;return(null!==(t=this._wt.wtOverlays.getParentOverlay(e))&&void 0!==t?t:this._wt).wtTable.name}getOverlayByName(e){return this._wt.getOverlayByName(e)}isVisible(){return this._wt.wtTable.isVisible()}hasVerticalScroll(){return this._wt.wtViewport.hasVerticalScroll()}hasHorizontalScroll(){return this._wt.wtViewport.hasHorizontalScroll()}getTableWidth(){return this._wt.wtTable.getWidth()}getTableHeight(){return this._wt.wtTable.getHeight()}destroy(){this._wt.destroy(),this.eventManager.destroy()}}},90941:(e,t,o)=>{"use strict";t.__esModule=!0,o(67834),o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var s=o(59954),n=o(72399);function i(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function r(e,t){return e.get(a(e,t))}function l(e,t,o){return e.set(a(e,t),o),o}function a(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var h=new WeakMap,c=new WeakMap,u=new WeakMap,d=new WeakMap,g=new WeakMap;t.ChangesObservable=class{constructor(){let{initialIndexValue:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,h,new Set),i(this,c,[]),i(this,u,[]),i(this,d,!1),i(this,g,!1),l(g,this,null!=e&&e)}createObserver(){const e=new s.ChangesObserver;return r(h,this).add(e),e.addLocalHook("unsubscribe",(()=>{r(h,this).delete(e)})),e._writeInitialChanges((0,n.arrayDiff)(r(c,this),r(u,this))),e}emit(e){let t=r(u,this);r(d,this)&&r(c,this).length===e.length||(0===e.length?e=new Array(t.length).fill(r(g,this)):l(c,this,new Array(e.length).fill(r(g,this))),r(d,this)||(l(d,this,!0),t=r(c,this)));const o=(0,n.arrayDiff)(t,e);r(h,this).forEach((e=>e._write(o))),l(u,this,e)}}},59954:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=o(13911),i=s(o(63870));function r(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function l(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var a=new WeakMap;class h{constructor(){r(this,a,[])}subscribe(e){var t,o;return this.addLocalHook("change",e),this._write((o=this,(t=a).get(l(t,o)))),this}unsubscribe(){return this.runLocalHooks("unsubscribe"),this.clearLocalHooks(),this}_write(e){return e.length>0&&this.runLocalHooks("change",e),this}_writeInitialChanges(e){var t,o,s;o=this,s=e,(t=a).set(l(t,o),s)}}t.ChangesObserver=h,(0,n.mixin)(h,i.default)},72399:(e,t,o)=>{"use strict";t.__esModule=!0,t.arrayDiff=function(e,t){const o=[];let s=0,n=0;for(;s<e.length&&n<t.length;s++,n++)e[s]!==t[n]&&o.push({op:"replace",index:n,oldValue:e[s],newValue:t[n]});for(;s<t.length;s++)o.push({op:"insert",index:s,oldValue:void 0,newValue:t[s]});for(;n<e.length;n++)o.push({op:"remove",index:n,oldValue:e[n],newValue:void 0});return o},o(15724)},93969:(e,t,o)=>{"use strict";t.__esModule=!0;var s={IndexMapper:!0,getRegisteredMapsCounter:!0,getIncreasedIndexes:!0,getDecreasedIndexes:!0,alterUtilsFactory:!0},n=o(70212);t.IndexMapper=n.IndexMapper;var i=o(12391);t.getRegisteredMapsCounter=i.getRegisteredMapsCounter;var r=o(73431);t.getIncreasedIndexes=r.getIncreasedIndexes,t.getDecreasedIndexes=r.getDecreasedIndexes,t.alterUtilsFactory=r.alterUtilsFactory;var l=o(45637);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===l[e]||(t[e]=l[e]))}))},70212:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707));o(67834),o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var i=o(9175),r=o(45637),l=o(29457),a=s(o(63870)),h=o(13911),c=o(38893),u=o(90941);new Set;class d{constructor(){(0,n.default)(this,"indexesSequence",new r.IndexesSequence),(0,n.default)(this,"trimmingMapsCollection",new l.AggregatedCollection((e=>e.some((e=>!0===e))),!1)),(0,n.default)(this,"hidingMapsCollection",new l.AggregatedCollection((e=>e.some((e=>!0===e))),!1)),(0,n.default)(this,"variousMapsCollection",new l.MapCollection),(0,n.default)(this,"hidingChangesObservable",new u.ChangesObservable({initialIndexValue:!1})),(0,n.default)(this,"notTrimmedIndexesCache",[]),(0,n.default)(this,"notHiddenIndexesCache",[]),(0,n.default)(this,"isBatched",!1),(0,n.default)(this,"indexesSequenceChanged",!1),(0,n.default)(this,"indexesChangeSource",void 0),(0,n.default)(this,"trimmedIndexesChanged",!1),(0,n.default)(this,"hiddenIndexesChanged",!1),(0,n.default)(this,"renderablePhysicalIndexesCache",[]),(0,n.default)(this,"fromPhysicalToVisualIndexesCache",new Map),(0,n.default)(this,"fromVisualToRenderableIndexesCache",new Map),this.indexesSequence.addLocalHook("change",(()=>{this.indexesSequenceChanged=!0,this.updateCache(),this.runLocalHooks("indexesSequenceChange",this.indexesChangeSource),this.runLocalHooks("change",this.indexesSequence,null)})),this.trimmingMapsCollection.addLocalHook("change",(e=>{this.trimmedIndexesChanged=!0,this.updateCache(),this.runLocalHooks("change",e,this.trimmingMapsCollection)})),this.hidingMapsCollection.addLocalHook("change",(e=>{this.hiddenIndexesChanged=!0,this.updateCache(),this.runLocalHooks("change",e,this.hidingMapsCollection)})),this.variousMapsCollection.addLocalHook("change",(e=>{this.runLocalHooks("change",e,this.variousMapsCollection)}))}suspendOperations(){this.isBatched=!0}resumeOperations(){this.isBatched=!1,this.updateCache()}createChangesObserver(e){if("hiding"!==e)throw new Error(`Unsupported index map type "${e}".`);return this.hidingChangesObservable.createObserver()}createAndRegisterIndexMap(e,t,o){return this.registerMap(e,(0,r.createIndexMap)(t,o))}registerMap(e,t){if(this.trimmingMapsCollection.get(e)||this.hidingMapsCollection.get(e)||this.variousMapsCollection.get(e))throw Error(`Map with name "${e}" has been already registered.`);t instanceof r.TrimmingMap?this.trimmingMapsCollection.register(e,t):t instanceof r.HidingMap?this.hidingMapsCollection.register(e,t):this.variousMapsCollection.register(e,t);const o=this.getNumberOfIndexes();return o>0&&t.init(o),t}unregisterMap(e){this.trimmingMapsCollection.unregister(e),this.hidingMapsCollection.unregister(e),this.variousMapsCollection.unregister(e)}unregisterAll(){this.trimmingMapsCollection.unregisterAll(),this.hidingMapsCollection.unregisterAll(),this.variousMapsCollection.unregisterAll()}getPhysicalFromVisualIndex(e){const t=this.notTrimmedIndexesCache[e];return(0,c.isDefined)(t)?t:null}getPhysicalFromRenderableIndex(e){const t=this.renderablePhysicalIndexesCache[e];return(0,c.isDefined)(t)?t:null}getVisualFromPhysicalIndex(e){const t=this.fromPhysicalToVisualIndexesCache.get(e);return(0,c.isDefined)(t)?t:null}getVisualFromRenderableIndex(e){return this.getVisualFromPhysicalIndex(this.getPhysicalFromRenderableIndex(e))}getRenderableFromVisualIndex(e){const t=this.fromVisualToRenderableIndexesCache.get(e);return(0,c.isDefined)(t)?t:null}getNearestNotHiddenIndex(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null===this.getPhysicalFromVisualIndex(e))return null;if(this.fromVisualToRenderableIndexesCache.has(e))return e;const s=Array.from(this.fromVisualToRenderableIndexesCache.keys());let n=-1;return n=t>0?s.findIndex((t=>t>e)):s.reverse().findIndex((t=>t<e)),-1===n?o?this.getNearestNotHiddenIndex(e,-t,!1):null:s[n]}initToLength(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getNumberOfIndexes();this.notTrimmedIndexesCache=[...new Array(e).keys()],this.notHiddenIndexesCache=[...new Array(e).keys()],this.suspendOperations(),this.indexesChangeSource="init",this.indexesSequence.init(e),this.indexesChangeSource=void 0,this.trimmingMapsCollection.initEvery(e),this.resumeOperations(),this.suspendOperations(),this.hidingMapsCollection.initEvery(e),this.variousMapsCollection.initEvery(e),this.resumeOperations(),this.runLocalHooks("init")}fitToLength(e){const t=this.getNumberOfIndexes();if(e<t){const t=[...Array(this.getNumberOfIndexes()-e).keys()].map((t=>t+e));this.removeIndexes(t)}else this.insertIndexes(t,e-t)}getIndexesSequence(){return this.indexesSequence.getValues()}setIndexesSequence(e){void 0===this.indexesChangeSource&&(this.indexesChangeSource="update"),this.indexesSequence.setValues(e),"update"===this.indexesChangeSource&&(this.indexesChangeSource=void 0)}getNotTrimmedIndexes(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.notTrimmedIndexesCache;return this.getIndexesSequence().filter((e=>!1===this.isTrimmed(e)))}getNotTrimmedIndexesLength(){return this.getNotTrimmedIndexes().length}getNotHiddenIndexes(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.notHiddenIndexesCache;return this.getIndexesSequence().filter((e=>!1===this.isHidden(e)))}getNotHiddenIndexesLength(){return this.getNotHiddenIndexes().length}getRenderableIndexes(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.renderablePhysicalIndexesCache;return this.getNotTrimmedIndexes().filter((e=>!1===this.isHidden(e)))}getRenderableIndexesLength(){return this.getRenderableIndexes().length}getNumberOfIndexes(){return this.getIndexesSequence().length}moveIndexes(e,t){"number"==typeof e&&(e=[e]);const o=(0,i.arrayMap)(e,(e=>this.getPhysicalFromVisualIndex(e))),s=this.getNotTrimmedIndexesLength(),n=e.length,l=(0,r.getListWithRemovedItems)(this.getIndexesSequence(),o),a=l.filter((e=>!1===this.isTrimmed(e)));let h=l.indexOf(a[a.length-1])+1;if(t+n<s){const e=a[t];h=l.indexOf(e)}this.indexesChangeSource="move",this.setIndexesSequence((0,r.getListWithInsertedItems)(l,h,o)),this.indexesChangeSource=void 0}isTrimmed(e){return this.trimmingMapsCollection.getMergedValueAtIndex(e)}isHidden(e){return this.hidingMapsCollection.getMergedValueAtIndex(e)}insertIndexes(e,t){const o=this.getNotTrimmedIndexes()[e],s=(0,c.isDefined)(o)?o:this.getNumberOfIndexes(),n=this.getIndexesSequence().includes(o)?this.getIndexesSequence().indexOf(o):this.getNumberOfIndexes(),r=(0,i.arrayMap)(new Array(t).fill(s),((e,t)=>e+t));this.suspendOperations(),this.indexesChangeSource="insert",this.indexesSequence.insert(n,r),this.indexesChangeSource=void 0,this.trimmingMapsCollection.insertToEvery(n,r),this.hidingMapsCollection.insertToEvery(n,r),this.variousMapsCollection.insertToEvery(n,r),this.resumeOperations()}removeIndexes(e){this.suspendOperations(),this.indexesChangeSource="remove",this.indexesSequence.remove(e),this.indexesChangeSource=void 0,this.trimmingMapsCollection.removeFromEvery(e),this.hidingMapsCollection.removeFromEvery(e),this.variousMapsCollection.removeFromEvery(e),this.resumeOperations()}updateCache(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.indexesSequenceChanged||this.trimmedIndexesChanged||this.hiddenIndexesChanged;(!0===e||!1===this.isBatched&&!0===t)&&(this.trimmingMapsCollection.updateCache(),this.hidingMapsCollection.updateCache(),this.notTrimmedIndexesCache=this.getNotTrimmedIndexes(!1),this.notHiddenIndexesCache=this.getNotHiddenIndexes(!1),this.renderablePhysicalIndexesCache=this.getRenderableIndexes(!1),this.cacheFromPhysicalToVisualIndexes(),this.cacheFromVisualToRenderableIndexes(),this.hiddenIndexesChanged&&this.hidingChangesObservable.emit(this.hidingMapsCollection.getMergedValues()),this.runLocalHooks("cacheUpdated",{indexesSequenceChanged:this.indexesSequenceChanged,trimmedIndexesChanged:this.trimmedIndexesChanged,hiddenIndexesChanged:this.hiddenIndexesChanged}),this.indexesSequenceChanged=!1,this.trimmedIndexesChanged=!1,this.hiddenIndexesChanged=!1)}cacheFromPhysicalToVisualIndexes(){const e=this.getNotTrimmedIndexesLength();this.fromPhysicalToVisualIndexesCache.clear();for(let t=0;t<e;t+=1){const e=this.getPhysicalFromVisualIndex(t);this.fromPhysicalToVisualIndexesCache.set(e,t)}}cacheFromVisualToRenderableIndexes(){const e=this.getRenderableIndexesLength();this.fromVisualToRenderableIndexesCache.clear();for(let t=0;t<e;t+=1){const e=this.getPhysicalFromRenderableIndex(t),o=this.getVisualFromPhysicalIndex(e);this.fromVisualToRenderableIndexesCache.set(o,t)}}}t.IndexMapper=d,(0,h.mixin)(d,a.default)},34508:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(15724);var n=s(o(85707)),i=o(12391),r=o(9175),l=o(38893);class a extends i.MapCollection{constructor(e,t){super(),(0,n.default)(this,"mergedValuesCache",[]),(0,n.default)(this,"aggregationFunction",void 0),(0,n.default)(this,"fallbackValue",void 0),this.aggregationFunction=e,this.fallbackValue=t}getMergedValues(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.mergedValuesCache;if(0===this.getLength())return[];const e=(0,r.arrayMap)(this.get(),(e=>e.getValues())),t=[],o=(0,l.isDefined)(e[0])&&e[0].length||0;for(let s=0;s<o;s+=1){const o=[];for(let t=0;t<this.getLength();t+=1)o.push(e[t][s]);t.push(o)}return(0,r.arrayMap)(t,this.aggregationFunction)}getMergedValueAtIndex(e,t){const o=this.getMergedValues(t)[e];return(0,l.isDefined)(o)?o:this.fallbackValue}updateCache(){this.mergedValuesCache=this.getMergedValues(!1)}}t.AggregatedCollection=a},29457:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(34508);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||(t[e]=s[e]))}));var n=o(12391);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||(t[e]=n[e]))}))},12391:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.getRegisteredMapsCounter=function(){return a};var n=s(o(85707)),i=o(38893),r=o(13911),l=s(o(63870));let a=0;class h{constructor(){(0,n.default)(this,"collection",new Map)}register(e,t){!1===this.collection.has(e)&&(this.collection.set(e,t),t.addLocalHook("change",(()=>this.runLocalHooks("change",t))),a+=1)}unregister(e){const t=this.collection.get(e);(0,i.isDefined)(t)&&(t.destroy(),this.collection.delete(e),this.runLocalHooks("change",t),a-=1)}unregisterAll(){this.collection.forEach(((e,t)=>this.unregister(t))),this.collection.clear()}get(e){return(0,i.isUndefined)(e)?Array.from(this.collection.values()):this.collection.get(e)}getLength(){return this.collection.size}removeFromEvery(e){this.collection.forEach((t=>{t.remove(e)}))}insertToEvery(e,t){this.collection.forEach((o=>{o.insert(e,t)}))}initEvery(e){this.collection.forEach((t=>{t.init(e)}))}}t.MapCollection=h,(0,r.mixin)(h,l.default)},69246:(e,t,o)=>{"use strict";t.__esModule=!0,o(15724);var s=o(47078),n=o(9175);class i extends s.PhysicalIndexToValueMap{constructor(){super(arguments.length>0&&void 0!==arguments[0]&&arguments[0])}getHiddenIndexes(){return(0,n.arrayReduce)(this.getValues(),((e,t,o)=>(t&&e.push(o),e)),[])}}t.HidingMap=i},45637:(e,t,o)=>{"use strict";t.__esModule=!0;var s={createIndexMap:!0,HidingMap:!0,IndexMap:!0,LinkedPhysicalIndexToValueMap:!0,PhysicalIndexToValueMap:!0,TrimmingMap:!0};t.createIndexMap=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!u.has(e))throw new Error(`The provided map type ("${e}") does not exist.`);return new(u.get(e))(t)},o(67834);var n=o(69246);t.HidingMap=n.HidingMap;var i=o(77955);t.IndexMap=i.IndexMap;var r=o(22809);t.LinkedPhysicalIndexToValueMap=r.LinkedPhysicalIndexToValueMap;var l=o(47078);t.PhysicalIndexToValueMap=l.PhysicalIndexToValueMap;var a=o(50684);t.TrimmingMap=a.TrimmingMap;var h=o(40976);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===h[e]||(t[e]=h[e]))}));var c=o(57354);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===c[e]||(t[e]=c[e]))}));const u=new Map([["hiding",n.HidingMap],["index",i.IndexMap],["linkedPhysicalIndexToValue",r.LinkedPhysicalIndexToValueMap],["physicalIndexToValue",l.PhysicalIndexToValueMap],["trimming",a.TrimmingMap]])},77955:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(15724);var n=s(o(85707)),i=o(87485),r=o(13911),l=o(78832),a=s(o(63870));class h{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,n.default)(this,"indexedValues",[]),(0,n.default)(this,"initValueOrFn",void 0),this.initValueOrFn=e}getValues(){return this.indexedValues}getValueAtIndex(e){const t=this.indexedValues;if(e<t.length)return t[e]}setValues(e){this.indexedValues=e.slice(),this.runLocalHooks("change")}setValueAtIndex(e,t){return e<this.indexedValues.length&&(this.indexedValues[e]=t,this.runLocalHooks("change"),!0)}clear(){this.setDefaultValues()}getLength(){return this.getValues().length}setDefaultValues(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.indexedValues.length;this.indexedValues.length=0,(0,l.isFunction)(this.initValueOrFn)?(0,i.rangeEach)(e-1,(e=>this.indexedValues.push(this.initValueOrFn(e)))):(0,i.rangeEach)(e-1,(()=>this.indexedValues.push(this.initValueOrFn))),this.runLocalHooks("change")}init(e){return this.setDefaultValues(e),this.runLocalHooks("init"),this}insert(){this.runLocalHooks("change")}remove(){this.runLocalHooks("change")}destroy(){this.clearLocalHooks(),this.indexedValues=null,this.initValueOrFn=null}}t.IndexMap=h,(0,r.mixin)(h,a.default)},40976:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(77955),n=o(57354),i=o(73431);class r extends s.IndexMap{constructor(){super((e=>e))}insert(e,t){const o=(0,i.getIncreasedIndexes)(this.indexedValues,t);this.indexedValues=(0,n.getListWithInsertedItems)(o,e,t),super.insert(e,t)}remove(e){const t=(0,n.getListWithRemovedItems)(this.indexedValues,e);this.indexedValues=(0,i.getDecreasedIndexes)(t,e),super.remove(e)}}t.IndexesSequence=r},22809:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707)),i=o(77955),r=o(72564),l=o(57354),a=o(20801),h=o(78832);class c extends i.IndexMap{constructor(){super(...arguments),(0,n.default)(this,"orderOfIndexes",[])}getValues(){return this.orderOfIndexes.map((e=>this.indexedValues[e]))}setValues(e){this.orderOfIndexes=[...Array(e.length).keys()],super.setValues(e)}setValueAtIndex(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.orderOfIndexes.length;return e<this.indexedValues.length&&(this.indexedValues[e]=t,!1===this.orderOfIndexes.includes(e)&&this.orderOfIndexes.splice(o,0,e),this.runLocalHooks("change"),!0)}clearValue(e){this.orderOfIndexes=(0,l.getListWithRemovedItems)(this.orderOfIndexes,[e]),(0,h.isFunction)(this.initValueOrFn)?super.setValueAtIndex(e,this.initValueOrFn(e)):super.setValueAtIndex(e,this.initValueOrFn)}getLength(){return this.orderOfIndexes.length}setDefaultValues(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.indexedValues.length;this.orderOfIndexes.length=0,super.setDefaultValues(e)}insert(e,t){this.indexedValues=(0,r.getListWithInsertedItems)(this.indexedValues,e,t,this.initValueOrFn),this.orderOfIndexes=(0,a.getIncreasedIndexes)(this.orderOfIndexes,t),super.insert(e,t)}remove(e){this.indexedValues=(0,r.getListWithRemovedItems)(this.indexedValues,e),this.orderOfIndexes=(0,l.getListWithRemovedItems)(this.orderOfIndexes,e),this.orderOfIndexes=(0,a.getDecreasedIndexes)(this.orderOfIndexes,e),super.remove(e)}getEntries(){return this.orderOfIndexes.map((e=>[e,this.getValueAtIndex(e)]))}}t.LinkedPhysicalIndexToValueMap=c},47078:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(77955),n=o(72564);class i extends s.IndexMap{insert(e,t){this.indexedValues=(0,n.getListWithInsertedItems)(this.indexedValues,e,t,this.initValueOrFn),super.insert(e,t)}remove(e){this.indexedValues=(0,n.getListWithRemovedItems)(this.indexedValues,e),super.remove(e)}}t.PhysicalIndexToValueMap=i},50684:(e,t,o)=>{"use strict";t.__esModule=!0,o(15724);var s=o(47078),n=o(9175);class i extends s.PhysicalIndexToValueMap{constructor(){super(arguments.length>0&&void 0!==arguments[0]&&arguments[0])}getTrimmedIndexes(){return(0,n.arrayReduce)(this.getValues(),((e,t,o)=>(t&&e.push(o),e)),[])}}t.TrimmingMap=i},20801:(e,t,o)=>{"use strict";t.__esModule=!0,t.getDecreasedIndexes=function(e,t){return(0,s.arrayMap)(e,(e=>e-t.filter((t=>t<e)).length))},t.getIncreasedIndexes=function(e,t){const o=t[0],n=t.length;return(0,s.arrayMap)(e,(e=>e>=o?e+n:e))};var s=o(9175)},73431:(e,t,o)=>{"use strict";t.__esModule=!0,o(67834);var s=o(20801);t.getDecreasedIndexes=s.getDecreasedIndexes,t.getIncreasedIndexes=s.getIncreasedIndexes;var n=o(57354),i=o(72564);const r=new Map([["indexesSequence",{getListWithInsertedItems:n.getListWithInsertedItems,getListWithRemovedItems:n.getListWithRemovedItems}],["physicallyIndexed",{getListWithInsertedItems:i.getListWithInsertedItems,getListWithRemovedItems:i.getListWithRemovedItems}]]);t.alterUtilsFactory=e=>{if(!1===r.has(e))throw new Error(`Alter strategy with ID '${e}' does not exist.`);return r.get(e)}},57354:(e,t,o)=>{"use strict";t.__esModule=!0,t.getListWithInsertedItems=function(e,t,o){return[...e.slice(0,t),...o,...e.slice(t)]},t.getListWithRemovedItems=function(e,t){return(0,s.arrayFilter)(e,(e=>!1===t.includes(e)))};var s=o(9175)},72564:(e,t,o)=>{"use strict";t.__esModule=!0,t.getListWithInsertedItems=function(e,t,o,n){const i=o.length?o[0]:void 0;return[...e.slice(0,i),...o.map(((e,t)=>(0,s.isFunction)(n)?n(e,t):n)),...void 0===i?[]:e.slice(i)]},t.getListWithRemovedItems=function(e,t){return(0,n.arrayFilter)(e,((e,o)=>!1===t.includes(o)))};var s=o(78832),n=o(9175)},11139:(e,t)=>{"use strict";function o(e,t,o){e.addEventListener(t,o,!1)}function s(e,t,o){e.removeEventListener(t,o,!1)}function n(e){return e.ownerDocument.defaultView.getComputedStyle(e)}t.__esModule=!0,t.createInputElementResizer=function(e){const t={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300},i=e.body,r=e.createTextNode(""),l=e.createElement("span");let a;function h(){r.textContent=a.value,l.style.position="absolute",l.style.fontSize=n(a).fontSize,l.style.fontFamily=n(a).fontFamily,l.style.whiteSpace="pre",i.appendChild(l);const e=l.clientWidth+2;i.removeChild(l);const o=a.style;o.height=`${t.minHeight}px`,t.minWidth>e?o.width=`${t.minWidth}px`:e>t.maxWidth?o.width=`${t.maxWidth}px`:o.width=`${e}px`;const s=a.scrollHeight?a.scrollHeight-1:0;t.minHeight>s?o.height=`${t.minHeight}px`:t.maxHeight<s?(o.height=`${t.maxHeight}px`,o.overflowY="visible"):o.height=`${s}px`}function c(){e.defaultView.setTimeout(h,0)}return{init:function(e,s){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];a=e,function(e){if(e&&e.minHeight)if("inherit"===e.minHeight)t.minHeight=a.clientHeight;else{const o=parseInt(e.minHeight,10);isNaN(o)||(t.minHeight=o)}if(e&&e.maxHeight)if("inherit"===e.maxHeight)t.maxHeight=a.clientHeight;else{const o=parseInt(e.maxHeight,10);isNaN(o)||(t.maxHeight=o)}if(e&&e.minWidth)if("inherit"===e.minWidth)t.minWidth=a.clientWidth;else{const o=parseInt(e.minWidth,10);isNaN(o)||(t.minWidth=o)}if(e&&e.maxWidth)if("inherit"===e.maxWidth)t.maxWidth=a.clientWidth;else{const o=parseInt(e.maxWidth,10);isNaN(o)||(t.maxWidth=o)}l.firstChild||(l.className="autoResize",l.style.display="inline-block",l.appendChild(r))}(s),"TEXTAREA"===a.nodeName&&(a.style.resize="none",a.style.height=`${t.minHeight}px`,a.style.minWidth=`${t.minWidth}px`,a.style.maxWidth=`${t.maxWidth}px`,a.style.overflowY="hidden"),n&&(o(a,"input",h),o(a,"keydown",c)),h()},resize:h,unObserve(){s(a,"input",h),s(a,"keydown",c)}}}},76892:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707));class i{constructor(e){(0,n.default)(this,"data",void 0),(0,n.default)(this,"next",null),(0,n.default)(this,"prev",null),this.data=e}}t.NodeStructure=i;t.default=class{constructor(){(0,n.default)(this,"first",null),(0,n.default)(this,"last",null)}push(e){const t=new i(e);if(null===this.first)this.first=t,this.last=t;else{const e=this.last;this.last=t,t.prev=e,e.next=t}return t}unshift(e){const t=new i(e);if(null===this.first)this.first=t,this.last=t;else{const e=this.first;this.first=t,t.next=e,e.prev=t}}inorder(e){let t=this.first;for(;t;){const o=e(t);if(t===this.last||!0===o)break;t=t.next}}remove(e){if(null===this.first)return!1;let t,o,s=this.first;for(;s;){if(s.data===e)return t=s.next,o=s.prev,t&&(t.prev=o),o&&(o.next=t),s===this.first&&(this.first=t),s===this.last&&(this.last=o),!0;s=s.next}return!1}hasCycle(){let e=this.first,t=this.first;for(;;){if(null===e)return!1;if(e=e.next,null===e)return!1;if(e=e.next,t=t.next,e===t)return!0}}pop(){if(null===this.last)return null;const e=this.last;return this.last=this.last.prev,e}shift(){if(null===this.first)return null;const e=this.first;return this.first=this.first.next,e}recursiveReverse(){if(!this.first)return;!function e(t,o){o&&(e(o,o.next),o.next=t)}(this.first,this.first.next),this.first.next=null;const e=this.first;this.first=this.last,this.last=e}reverse(){if(!this.first||!this.first.next)return;let e,t=this.first.next,o=this.first;for(;t;)e=t.next,t.next=o,o.prev=t,o=t,t=e;this.first.next=null,this.last.prev=null,e=this.first,this.first=o,this.last=e}}},38867:(e,t,o)=>{"use strict";t.__esModule=!0,t.createPriorityMap=function(){let{errorPriorityExists:e,errorPriorityNaN:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const o=new Map;return e=(0,n.isFunction)(e)?e:a,t=(0,n.isFunction)(t)?t:h,{addItem:function(n,i){if(!(0,s.isNumeric)(n))throw new Error(t(n));if(o.has(n))throw new Error(e(n));o.set(n,i)},getItems:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;const[t,s]=l.get(e)||l.get(i);return[...o].sort(((e,o)=>e[0]<o[0]?t:s)).map((e=>e[1]))}}},o(67834);var s=o(87485),n=o(78832);const i=t.ASC="asc",r=t.DESC="desc",l=new Map([[i,[-1,1]],[r,[1,-1]]]),a=e=>`The priority '${e}' is already declared in a map.`,h=e=>`The priority '${e}' is not a number.`},16957:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.depthFirstPreOrder=r;var n=s(o(85707));o(67834),o(15724);const i=t.TRAVERSAL_DF_PRE="DF-pre-order";function r(e,t){let o=e.call(t,this);for(let s=0;s<this.childs.length;s++){if(!1===o)return!1;o=r.call(this.childs[s],e,t)}return o}const l=t.TRAVERSAL_DF_POST="DF-post-order";const a=t.TRAVERSAL_BF="BF";const h=a,c=new Map([[i,r],[l,function e(t,o){for(let s=0;s<this.childs.length;s++){if(!1===e.call(this.childs[s],t,o))return!1}return t.call(o,this)}],[a,function(e,t){const o=[this];!function s(){if(0===o.length)return;const n=o.shift();o.push(...n.childs),!1!==e.call(t,n)&&s()}()}]]);class u{constructor(e){(0,n.default)(this,"data",{}),(0,n.default)(this,"parent",null),(0,n.default)(this,"childs",[]),this.data=e}addChild(e){e.parent=this,this.childs.push(e)}cloneTree(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this;const t=new u({...e.data});for(let o=0;o<e.childs.length;o++)t.addChild(this.cloneTree(e.childs[o]));return t}replaceTreeWith(e){this.data={...e.data},this.childs=[];for(let t=0;t<e.childs.length;t++)this.addChild(e.childs[t])}walkDown(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:h;if(!c.has(t))throw new Error(`Traversal strategy "${t}" does not exist`);c.get(t).call(this,e,this)}walkUp(e){const t=this,o=s=>{!1!==e.call(t,s)&&null!==s.parent&&o(s.parent)};o(this)}}t.default=u},84134:(e,t,o)=>{"use strict";t.__esModule=!0,t.createUniqueMap=function(){let{errorIdExists:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=new Map;function o(){return[...t]}function i(e){return t.has(e)}return e=(0,s.isFunction)(e)?e:n,{addItem:function(o,s){if(i(o))throw new Error(e(o));t.set(o,s)},clear:function(){t.clear()},getId:function(e){const[t]=o().find((t=>{let[o,s]=t;return e===s&&o}))||[null];return t},getItem:function(e){return t.get(e)},getItems:o,hasItem:i,removeItem:function(e){return t.delete(e)}}},o(67834);var s=o(78832);const n=e=>`The id '${e}' is already declared in a map.`},64788:(e,t,o)=>{"use strict";t.__esModule=!0,t.createUniqueSet=function(){let{errorItemExists:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=new Set;return e=(0,s.isFunction)(e)?e:n,{addItem:function(o){if(t.has(o))throw new Error(e(o));t.add(o)},clear:function(){t.clear()},getItems:function(){return[...t]}}},o(67834),o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var s=o(78832);const n=e=>`'${e}' value is already declared in a unique set.`},1817:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(9893),r=o(9175);t.default=class{constructor(e){(0,n.default)(this,"hot",null),(0,n.default)(this,"container",null),(0,n.default)(this,"injected",!1),(0,n.default)(this,"rows",[]),(0,n.default)(this,"columns",[]),(0,n.default)(this,"samples",null),(0,n.default)(this,"settings",{useHeaders:!0}),this.hot=e}addRow(e,t){if(this.columns.length)throw new Error("Doesn't support multi-dimensional table");this.rows.length||(this.container=this.createContainer(this.hot.rootElement.className));const o={row:e};this.rows.push(o),this.samples=t,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol(e)),this.table.tr.appendChild(this.createRow(e)),this.container.container.appendChild(this.table.fragment),o.table=this.table.table}addColumnHeadersRow(e){const t=this.hot.getColHeader(0);if(null!=t){const t={row:-1};this.rows.push(t),this.container=this.createContainer(this.hot.rootElement.className),this.samples=e,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol()),this.appendColumnHeadersRow(),this.container.container.appendChild(this.table.fragment),t.table=this.table.table}}addColumn(e,t){if(this.rows.length)throw new Error("Doesn't support multi-dimensional table");this.columns.length||(this.container=this.createContainer(this.hot.rootElement.className));const o={col:e};this.columns.push(o),this.samples=t,this.table=this.createTable(this.hot.table.className),this.getSetting("useHeaders")&&null!==this.hot.getColHeader(e)&&this.hot.view.appendColHeader(e,this.table.th),this.table.tBody.appendChild(this.createCol(e)),this.container.container.appendChild(this.table.fragment),o.table=this.table.table}getHeights(e){this.injected||this.injectTable(),(0,r.arrayEach)(this.rows,(t=>{const{height:o}=t.table.getBoundingClientRect();e(t.row,Math.ceil(o)-1)}))}getWidths(e){this.injected||this.injectTable(),(0,r.arrayEach)(this.columns,(t=>{const{width:o}=t.table.getBoundingClientRect();e(t.col,Math.ceil(o))}))}setSettings(e){this.settings=e}setSetting(e,t){this.settings||(this.settings={}),this.settings[e]=t}getSettings(){return this.settings}getSetting(e){return this.settings?this.settings[e]:null}createColGroupsCol(e){const t=this.hot.rootDocument.createDocumentFragment();return this.hot.hasRowHeaders()&&t.appendChild(this.createColElement(-1,-1)),this.samples.forEach((o=>{(0,r.arrayEach)(o.strings,(o=>{t.appendChild(this.createColElement(o.col,e))}))})),t}createRow(e){const{rootDocument:t}=this.hot,o=t.createDocumentFragment(),s=t.createElement("th");return this.hot.hasRowHeaders()&&(this.hot.view.appendRowHeader(e,s),o.appendChild(s)),this.samples.forEach((s=>{(0,r.arrayEach)(s.strings,(s=>{const n=s.col,i=this.hot.getCellMeta(e,n),r=this.hot.getCellRenderer(i),l=t.createElement("td");l.setAttribute("ghost-table",1),r(this.hot,l,e,n,this.hot.colToProp(n),s.value,i),o.appendChild(l)}))})),o}appendColumnHeadersRow(){const{rootDocument:e}=this.hot,t=e.createDocumentFragment(),o=[];if(this.hot.hasRowHeaders()){const s=e.createElement("th");o.push([-1,s]),t.appendChild(s)}this.samples.forEach((s=>{(0,r.arrayEach)(s.strings,(s=>{const n=s.col,i=e.createElement("th");o.push([n,i]),t.appendChild(i)}))})),this.table.tHead.appendChild(t),(0,r.arrayEach)(o,(e=>{const[t,o]=e;this.hot.view.appendColHeader(t,o)}))}createCol(e){const{rootDocument:t}=this.hot,o=t.createDocumentFragment();return this.samples.forEach((s=>{(0,r.arrayEach)(s.strings,(s=>{const n=s.row,i=this.hot.getCellMeta(n,e),r=this.hot.getCellRenderer(i),l=t.createElement("td"),a=t.createElement("tr");l.setAttribute("ghost-table",1),r(this.hot,l,n,e,this.hot.colToProp(e),s.value,i),a.appendChild(l),o.appendChild(a)}))})),o}clean(){this.rows.length=0,this.rows[-1]=void 0,this.columns.length=0,this.samples&&this.samples.clear(),this.samples=null,this.removeTable()}injectTable(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.injected||((e||this.hot.rootElement).appendChild(this.container.fragment),this.injected=!0)}removeTable(){this.injected&&this.container.container.parentNode&&(this.container.container.parentNode.removeChild(this.container.container),this.container=null,this.injected=!1)}createColElement(e,t){const o=this.hot.rootDocument.createElement("col");let s=0;t>=0&&e>=0&&(s=this.hot.getCellMeta(t,e).colspan);let n=this.hot.getColWidth(e);if(s>1)for(let t=e+1;t<e+s;t++)n+=this.hot.getColWidth(t);return o.style.width=`${n}px`,o}createTable(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{rootDocument:t}=this.hot,o=t.createDocumentFragment(),s=t.createElement("table"),n=t.createElement("thead"),r=t.createElement("tbody"),l=t.createElement("colgroup"),a=t.createElement("tr"),h=t.createElement("th");return this.isVertical()&&s.appendChild(l),this.isHorizontal()&&(a.appendChild(h),n.appendChild(a),s.style.tableLayout="auto",s.style.width="auto"),s.appendChild(n),this.isVertical()&&r.appendChild(a),s.appendChild(r),(0,i.addClass)(s,e),o.appendChild(s),{fragment:o,table:s,tHead:n,tBody:r,colGroup:l,tr:a,th:h}}createContainer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{rootDocument:t}=this.hot,o=t.createDocumentFragment(),s=t.createElement("div"),n=`htGhostTable htAutoSize ${e.trim()}`;return(0,i.addClass)(s,n),o.appendChild(s),{fragment:o,container:s}}isVertical(){return!(!this.rows.length||this.columns.length)}isHorizontal(){return!(!this.columns.length||this.rows.length)}}},57625:(e,t,o)=>{"use strict";t.__esModule=!0,t.createPaginator=function(e){let{initialPage:t=-1,size:o=()=>0,onItemSelect:n=()=>{},onClear:i=()=>{}}=e;const r=new Set;let l=(0,s.clamp)(t,-1,h()-1);function a(e,t){const o=h()-1;if(e<0&&(e=o),e>o&&(e=0),r.has(e))return-1;r.add(e);return!1===n(e,!1)&&(e=a(1===t?++e:--e,t)),e}function h(){return Math.max(o(),0)}return{setCurrentPage:function(e){e>-1&&e<h()&&!1!==n(e,!0)&&(l=e)},getCurrentPage:function(){return l},toFirstItem:function(){h()>0&&(r.clear(),l=a(0,1))},toLastItem:function(){h()>0&&(r.clear(),l=a(h()-1,-1))},toNextItem:function(){h()>0&&(r.clear(),l=a(++l,1))},toPreviousItem:function(){h()>0&&(r.clear(),l=a(--l,-1))},getSize:h,clear:function(){r.clear(),l=t,i()}}},o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var s=o(87485)},74737:(e,t,o)=>{"use strict";t.__esModule=!0,t._dataToHTML=function(e){const t=e.length,o=["<table>"];for(let n=0;n<t;n+=1){const i=e[n],r=i.length,l=[];0===n&&o.push("<tbody>");for(let e=0;e<r;e+=1){const t=i[e],o=(0,s.isEmpty)(t)?"":t.toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20{2,}/gi,(e=>`<span style="mso-spacerun: yes">${"&nbsp;".repeat(e.length-1)} </span>`)).replace(/\t/gi,"&#9;");l.push(`<td>${o}</td>`)}o.push("<tr>",...l,"</tr>"),n+1===t&&o.push("</tbody>")}return o.push("</table>"),o.join("")},t.htmlToGridSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;const o={},s=t.createDocumentFragment(),r=t.createElement("div");s.appendChild(r);let l=e;if("string"==typeof l){const e=l.replace(/<td\b[^>]*?>([\s\S]*?)<\/\s*td>/g,(e=>{const t=e.match(/<td\b[^>]*?>/g)[0];return`${t}${e.substring(t.length,e.lastIndexOf("<")).trim().replaceAll(/\n\s+/g," ").replaceAll(/<p.*?>/g,"\n").replace("\n","").replaceAll(/<\/(.*)>\s+$/gm,"</$1>").replace(/(<(?!br)([^>]+)>)/gi,"").replaceAll(/^&nbsp;$/gm,"")}</td>`}));r.insertAdjacentHTML("afterbegin",`${e}`),l=r.querySelector("table")}if(!l||!function(e){return"TABLE"===(e&&e.nodeName||"")}(l))return;const a=r.querySelector('meta[name$="enerator"]'),h=null!==l.querySelector("tbody th"),c=l.querySelector("tr"),u=c?Array.from(c.cells).reduce(((e,t)=>e+t.colSpan),0)-(h?1:0):0,d=l.tFoot&&Array.from(l.tFoot.rows)||[],g=[];let f=!1,p=0,m=0;if(l.tHead){const e=Array.from(l.tHead.rows).filter((e=>{const t=null!==e.querySelector("td");return t&&g.push(e),!t}));p=e.length,f=p>0,p>1?o.nestedHeaders=Array.from(e).reduce(((e,t)=>{const o=Array.from(t.cells).reduce(((e,t,o)=>{if(h&&0===o)return e;const{colSpan:s,innerHTML:n}=t,i=s>1?{label:n,colspan:s}:n;return e.push(i),e}),[]);return e.push(o),e}),[]):f&&(o.colHeaders=Array.from(e[0].children).reduce(((e,t,o)=>(h&&0===o||e.push(t.innerHTML),e)),[]))}g.length&&(o.fixedRowsTop=g.length);d.length&&(o.fixedRowsBottom=d.length);const w=[...g,...Array.from(l.tBodies).reduce(((e,t)=>(e.push(...Array.from(t.rows)),e)),[]),...d];m=w.length;const C=new Array(m);for(let e=0;e<m;e++)C[e]=new Array(u);const v=[],y=[];for(let e=0;e<m;e++){const t=w[e],o=Array.from(t.cells),s=o.length;for(let t=0;t<s;t++){const s=o[t],{nodeName:r,innerHTML:l,rowSpan:h,colSpan:c}=s,u=C[e].findIndex((e=>void 0===e));if("TD"===r){if(h>1||c>1){for(let t=e;t<e+h;t++)if(t<m)for(let e=u;e<u+c;e++)C[t][e]=null;const t=s.getAttribute("style");t&&t.includes("mso-ignore:colspan")||v.push({col:u,row:e,rowspan:h,colspan:c})}let t="";t=a&&/excel/gi.test(a.content)?l.replace(/[\r\n][\x20]{0,2}/g," ").replace(/<br(\s*|\/)>[\r\n]?[\x20]{0,3}/gim,"\r\n"):l.replace(/<br(\s*|\/)>[\r\n]?/gim,"\r\n"),C[e][u]=t.replace(i,(e=>n[e]))}else y.push(l)}}v.length&&(o.mergeCells=v);y.length&&(o.rowHeaders=y);C.length&&(o.data=C);return o},t.instanceToHTML=function(e){const t=e.hasColHeaders(),o=e.hasRowHeaders(),n=[t?-1:0,o?-1:0,e.countRows()-1,e.countCols()-1],i=e.getData(...n),r=i.length,l=r>0?i[0].length:0,a=["<table>","</table>"],h=t?["<thead>","</thead>"]:[],c=["<tbody>","</tbody>"],u=o?1:0,d=t?1:0;for(let n=0;n<r;n+=1){const r=t&&0===n,a=[];for(let t=0;t<l;t+=1){const l=!r&&o&&0===t;let h="";if(r)h=`<th>${e.getColHeader(t-u)}</th>`;else if(l)h=`<th>${e.getRowHeader(n-d)}</th>`;else{const o=i[n][t],{hidden:r,rowspan:l,colspan:a}=e.getCellMeta(n-d,t-u);if(!r){const e=[];if(l&&e.push(`rowspan="${l}"`),a&&e.push(`colspan="${a}"`),(0,s.isEmpty)(o))h=`<td ${e.join(" ")}></td>`;else{const t=o.toString().replace("<","&lt;").replace(">","&gt;").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20/gi,"&nbsp;").replace(/\t/gi,"&#9;");h=`<td ${e.join(" ")}>${t}</td>`}}}a.push(h)}const g=["<tr>",...a,"</tr>"].join("");r?h.splice(1,0,g):c.splice(-1,0,g)}return a.splice(1,0,h.join(""),c.join("")),a.join("")},o(15724),o(64552);var s=o(38893);const n={"&nbsp;":" ","&amp;":"&","&lt;":"<","&gt;":">"},i=new RegExp(Object.keys(n).map((e=>`(${e})`)).join("|"),"gi")},11015:(e,t)=>{"use strict";t.__esModule=!0,t.hasValidParameter=function(e){return e===s},t.isRootInstance=function(e){return o.has(e)},t.registerAsRootInstance=function(e){o.set(e,!0)};const o=t.holder=new WeakMap,s=t.rootInstanceSymbol=Symbol("rootInstance")},95532:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(13911),r=o(87485),l=o(38893);class a{static get SAMPLE_COUNT(){return 3}constructor(e){(0,n.default)(this,"samples",null),(0,n.default)(this,"dataFactory",null),(0,n.default)(this,"customSampleCount",null),(0,n.default)(this,"allowDuplicates",!1),this.dataFactory=e}getSampleCount(){return this.customSampleCount?this.customSampleCount:a.SAMPLE_COUNT}setSampleCount(e){this.customSampleCount=e}setAllowDuplicates(e){this.allowDuplicates=e}generateRowSamples(e,t){return this.generateSamples("row",t,e)}generateColumnSamples(e,t){return this.generateSamples("col",t,e)}generateSamples(e,t,o){const s=new Map,{from:n,to:i}="number"==typeof o?{from:o,to:o}:o;return(0,r.rangeEach)(n,i,(o=>{const n=this.generateSample(e,t,o);s.set(o,n)})),s}generateSample(e,t,o){if("row"!==e&&"col"!==e)throw new Error("Unsupported sample type");const s=new Map,n="row"===e?"col":"row",a=[];return(0,r.rangeEach)(t.from,t.to,(t=>{const r="row"===e?this.dataFactory(o,t):this.dataFactory(t,o);if(!1===r)return;const{value:h,bundleSeed:c}=r,u="string"==typeof c&&c.length>0;let d;d=u?c:(0,i.isObject)(h)?`${Object.keys(h).length}`:Array.isArray(h)?`${h.length}`:`${(0,l.stringify)(h).length}`,s.has(d)||s.set(d,{needed:this.getSampleCount(),strings:[]});const g=s.get(d);if(g.needed){(!(a.indexOf(h)>-1)||this.allowDuplicates||u)&&(g.strings.push({value:h,[n]:t}),a.push(h),g.needed-=1)}})),s}}t.default=a},71263:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"common";o.has(e)||o.set(e,new Map);const t=o.get(e);return{register:function(e,o){t.set(e,o)},getItem:function(e){return t.get(e)},hasItem:function(e){return t.has(e)},getNames:function(){return[...t.keys()]},getValues:function(){return[...t.values()]}}};const o=t.collection=new Map},37701:(e,t)=>{"use strict";t.__esModule=!0,t.autocompleteValidator=s;const o=t.VALIDATOR_TYPE="autocomplete";function s(e,t){let o=e;null==o&&(o=""),this.allowEmpty&&""===o?t(!0):this.strict&&this.source?"function"==typeof this.source?this.source(o,n(o,t)):n(o,t)(this.source):t(!0)}function n(e,t){const o=e;return function(e){let s=!1;for(let t=0,n=e.length;t<n;t++)if(o===e[t]){s=!0;break}t(s)}}s.VALIDATOR_TYPE=o},93307:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(37701);t.VALIDATOR_TYPE=s.VALIDATOR_TYPE,t.autocompleteValidator=s.autocompleteValidator},9085:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.correctFormat=c,t.dateValidator=h;var n=s(o(86798)),i=o(84558),r=o(59127),l=o(72484);const a=t.VALIDATOR_TYPE="date";function h(e,t){const o=(0,i.getEditorInstance)(r.EDITOR_TYPE,this.instance);let s=e,l=!0;null==s&&(s="");let a=(0,n.default)(s,this.dateFormat||o.defaultDateFormat,!0).isValid(),h=(0,n.default)(new Date(s)).isValid()||a;if(this.allowEmpty&&""===s&&(h=!0,a=!0),h||(l=!1),!h&&a&&(l=!0),h&&!a)if(!0===this.correctFormat){const e=c(s,this.dateFormat);this.instance.setDataAtCell(this.visualRow,this.visualCol,e,"dateValidator"),l=!0}else l=!1;t(l)}function c(e,t){const o=(0,n.default)((0,l.getNormalizedDate)(e)),s=(0,n.default)(e,t),i=e.search(/[A-z]/g)>-1;let r;return r=o.isValid()&&o.format("x")===s.format("x")||!s.isValid()||i?o:s,r.format(t)}h.VALIDATOR_TYPE=a},70323:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(9085);t.VALIDATOR_TYPE=s.VALIDATOR_TYPE,t.correctFormat=s.correctFormat,t.dateValidator=s.dateValidator},83741:(e,t,o)=>{"use strict";t.__esModule=!0,t.dropdownValidator=i;var s=o(37701);const n=t.VALIDATOR_TYPE="dropdown";function i(e,t){s.autocompleteValidator.apply(this,[e,t])}i.VALIDATOR_TYPE=n},7628:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(83741);t.VALIDATOR_TYPE=s.VALIDATOR_TYPE,t.dropdownValidator=s.dropdownValidator},85086:(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllValidators=function(){(0,a.registerValidator)(s.autocompleteValidator),(0,a.registerValidator)(i.dropdownValidator),(0,a.registerValidator)(n.dateValidator),(0,a.registerValidator)(r.numericValidator),(0,a.registerValidator)(l.timeValidator)};var s=o(93307);t.autocompleteValidator=s.autocompleteValidator,t.AUTOCOMPLETE_VALIDATOR=s.VALIDATOR_TYPE;var n=o(70323);t.dateValidator=n.dateValidator,t.DATE_VALIDATOR=n.VALIDATOR_TYPE;var i=o(7628);t.dropdownValidator=i.dropdownValidator,t.DROPDOWN_VALIDATOR=i.VALIDATOR_TYPE;var r=o(66640);t.numericValidator=r.numericValidator,t.NUMERIC_VALIDATOR=r.VALIDATOR_TYPE;var l=o(51284);t.timeValidator=l.timeValidator,t.TIME_VALIDATOR=l.VALIDATOR_TYPE;var a=o(51255);t.registerValidator=a.registerValidator,t.getRegisteredValidatorNames=a.getRegisteredValidatorNames,t.getRegisteredValidators=a.getRegisteredValidators,t.getValidator=a.getValidator,t.hasValidator=a.hasValidator},66640:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(1897);t.VALIDATOR_TYPE=s.VALIDATOR_TYPE,t.numericValidator=s.numericValidator},1897:(e,t,o)=>{"use strict";t.__esModule=!0,t.numericValidator=i;var s=o(87485);const n=t.VALIDATOR_TYPE="numeric";function i(e,t){let o=e;null==o&&(o=""),this.allowEmpty&&""===o?t(!0):t(""!==o&&(0,s.isNumeric)(e))}i.VALIDATOR_TYPE=n},51255:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.getValidator=function(e){if("function"==typeof e)return e;if(!l(e))throw Error(`No registered validator found under "${e}" name`);return r(e)},t.registerValidator=function(e,t){"string"!=typeof e&&(e=(t=e).VALIDATOR_TYPE);i(e,t)},o(67834);var n=s(o(71263));const{register:i,getItem:r,hasItem:l,getNames:a,getValues:h}=(0,n.default)("validators");t.getRegisteredValidators=h,t.getRegisteredValidatorNames=a,t.hasValidator=l},51284:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(38793);t.VALIDATOR_TYPE=s.VALIDATOR_TYPE,t.timeValidator=s.timeValidator},38793:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.timeValidator=l;var n=s(o(86798));const i=["YYYY-MM-DDTHH:mm:ss.SSSZ","X","x"],r=t.VALIDATOR_TYPE="time";function l(e,t){const o=this.timeFormat||"h:mm:ss a";let s=!0,r=e;null===r&&(r=""),r=/^\d{3,}$/.test(r)?parseInt(r,10):r;const l=/^\d{1,2}$/.test(r);l&&(r+=":00");const a=(0,n.default)(r,i,!0).isValid()?(0,n.default)(r):(0,n.default)(r,o);let h=a.isValid(),c=(0,n.default)(r,o,!0).isValid()&&!l;if(this.allowEmpty&&""===r&&(h=!0,c=!0),h||(s=!1),!h&&c&&(s=!0),h&&!c)if(!0===this.correctFormat){const e=a.format(o);this.instance.setDataAtCell(this.visualRow,this.visualCol,e,"timeValidator"),s=!0}else s=!1;t(s)}l.VALIDATOR_TYPE=r},20512:(e,t,o)=>{"use strict";o.r(t)},6254:(e,t,o)=>{"use strict";o.r(t)},23844:(e,t,o)=>{"use strict";o.r(t)},38594:(e,t,o)=>{"use strict";o.r(t)},78607:(e,t,o)=>{"use strict";o.r(t)},64019:(e,t,o)=>{"use strict";o.r(t)},19501:(e,t,o)=>{"use strict";o.r(t)},21151:(e,t,o)=>{"use strict";o.r(t)},42172:(e,t,o)=>{"use strict";o.r(t)},98885:(e,t,o)=>{"use strict";o.r(t)},72039:(e,t,o)=>{"use strict";o.r(t)},93975:(e,t,o)=>{"use strict";o.r(t)},87572:(e,t,o)=>{"use strict";o.r(t)},54228:(e,t,o)=>{"use strict";o.r(t)},54008:(e,t,o)=>{"use strict";o.r(t)},19540:(e,t,o)=>{"use strict";o.r(t)},40248:(e,t,o)=>{"use strict";o.r(t)},34115:(e,t,o)=>{"use strict";o.r(t)},54100:(e,t,o)=>{"use strict";o.r(t)},98953:(e,t,o)=>{"use strict";o.r(t)},10275:(e,t,o)=>{"use strict";o.r(t)},19498:(e,t,o)=>{"use strict";o.r(t)},65166:t=>{"use strict";t.exports=e},75972:e=>{"use strict";e.exports=t},86798:e=>{"use strict";e.exports=o},20846:e=>{"use strict";e.exports=s},85707:(e,t,o)=>{var s=o(45498);e.exports=function(e,t,o){return(t=s(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e},e.exports.__esModule=!0,e.exports.default=e.exports},96784:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},11327:(e,t,o)=>{var s=o(10564).default;e.exports=function(e,t){if("object"!=s(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},45498:(e,t,o)=>{var s=o(10564).default,n=o(11327);e.exports=function(e){var t=n(e,"string");return"symbol"==s(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},10564:e=>{function t(o){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(o)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},68120:(e,t,o)=>{"use strict";var s=o(1483),n=o(18761),i=TypeError;e.exports=function(e){if(s(e))return e;throw new i(n(e)+" is not a function")}},63852:(e,t,o)=>{"use strict";var s=o(40735),n=String,i=TypeError;e.exports=function(e){if(s(e))return e;throw new i("Can't set "+n(e)+" as a prototype")}},14246:(e,t,o)=>{"use strict";var s=o(36880).has;e.exports=function(e){return s(e),e}},37095:(e,t,o)=>{"use strict";var s=o(70001),n=o(25290),i=o(25835).f,r=s("unscopables"),l=Array.prototype;void 0===l[r]&&i(l,r,{configurable:!0,value:n(null)}),e.exports=function(e){l[r][e]=!0}},2293:(e,t,o)=>{"use strict";var s=o(71704),n=String,i=TypeError;e.exports=function(e){if(s(e))return e;throw new i(n(e)+" is not an object")}},86651:(e,t,o)=>{"use strict";var s=o(35599),n=o(33392),i=o(66960),r=function(e){return function(t,o,r){var l=s(t),a=i(l);if(0===a)return!e&&-1;var h,c=n(r,a);if(e&&o!=o){for(;a>c;)if((h=l[c++])!=h)return!0}else for(;a>c;c++)if((e||c in l)&&l[c]===o)return e||c||0;return!e&&-1}};e.exports={includes:r(!0),indexOf:r(!1)}},39273:(e,t,o)=>{"use strict";var s=o(20382),n=o(14914),i=TypeError,r=Object.getOwnPropertyDescriptor,l=s&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=l?function(e,t){if(n(e)&&!r(e,"length").writable)throw new i("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},61698:(e,t,o)=>{"use strict";var s=o(14762);e.exports=s([].slice)},91278:(e,t,o)=>{"use strict";var s=o(14762),n=s({}.toString),i=s("".slice);e.exports=function(e){return i(n(e),8,-1)}},26145:(e,t,o)=>{"use strict";var s=o(34338),n=o(1483),i=o(91278),r=o(70001)("toStringTag"),l=Object,a="Arguments"===i(function(){return arguments}());e.exports=s?i:function(e){var t,o,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(o=function(e,t){try{return e[t]}catch(e){}}(t=l(e),r))?o:a?i(t):"Object"===(s=i(t))&&n(t.callee)?"Arguments":s}},16726:(e,t,o)=>{"use strict";var s=o(55755),n=o(89497),i=o(4961),r=o(25835);e.exports=function(e,t,o){for(var l=n(t),a=r.f,h=i.f,c=0;c<l.length;c++){var u=l[c];s(e,u)||o&&s(o,u)||a(e,u,h(t,u))}}},69037:(e,t,o)=>{"use strict";var s=o(20382),n=o(25835),i=o(57738);e.exports=s?function(e,t,o){return n.f(e,t,i(1,o))}:function(e,t,o){return e[t]=o,e}},57738:e=>{"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},30670:(e,t,o)=>{"use strict";var s=o(20382),n=o(25835),i=o(57738);e.exports=function(e,t,o){s?n.f(e,t,i(0,o)):e[t]=o}},77914:(e,t,o)=>{"use strict";var s=o(1483),n=o(25835),i=o(90169),r=o(82095);e.exports=function(e,t,o,l){l||(l={});var a=l.enumerable,h=void 0!==l.name?l.name:t;if(s(o)&&i(o,h,l),l.global)a?e[t]=o:r(t,o);else{try{l.unsafe?e[t]&&(a=!0):delete e[t]}catch(e){}a?e[t]=o:n.f(e,t,{value:o,enumerable:!1,configurable:!l.nonConfigurable,writable:!l.nonWritable})}return e}},82095:(e,t,o)=>{"use strict";var s=o(58389),n=Object.defineProperty;e.exports=function(e,t){try{n(s,e,{value:t,configurable:!0,writable:!0})}catch(o){s[e]=t}return t}},16060:(e,t,o)=>{"use strict";var s=o(18761),n=TypeError;e.exports=function(e,t){if(!delete e[t])throw new n("Cannot delete property "+s(t)+" of "+s(e))}},20382:(e,t,o)=>{"use strict";var s=o(28473);e.exports=!s((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},3145:(e,t,o)=>{"use strict";var s=o(58389),n=o(71704),i=s.document,r=n(i)&&n(i.createElement);e.exports=function(e){return r?i.createElement(e):{}}},31091:e=>{"use strict";var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},35413:e=>{"use strict";e.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},28417:(e,t,o)=>{"use strict";var s=o(89966);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(s)},4334:(e,t,o)=>{"use strict";var s=o(58389),n=o(91278);e.exports="process"===n(s.process)},89966:e=>{"use strict";e.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},76170:(e,t,o)=>{"use strict";var s,n,i=o(58389),r=o(89966),l=i.process,a=i.Deno,h=l&&l.versions||a&&a.version,c=h&&h.v8;c&&(n=(s=c.split("."))[0]>0&&s[0]<4?1:+(s[0]+s[1])),!n&&r&&(!(s=r.match(/Edge\/(\d+)/))||s[1]>=74)&&(s=r.match(/Chrome\/(\d+)/))&&(n=+s[1]),e.exports=n},44741:e=>{"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},58223:(e,t,o)=>{"use strict";var s=o(14762),n=Error,i=s("".replace),r=String(new n("zxcasd").stack),l=/\n\s*at [^:]*:[^\n]*/,a=l.test(r);e.exports=function(e,t){if(a&&"string"==typeof e&&!n.prepareStackTrace)for(;t--;)e=i(e,l,"");return e}},27473:(e,t,o)=>{"use strict";var s=o(69037),n=o(58223),i=o(58541),r=Error.captureStackTrace;e.exports=function(e,t,o,l){i&&(r?r(e,t):s(e,"stack",n(o,l)))}},58541:(e,t,o)=>{"use strict";var s=o(28473),n=o(57738);e.exports=!s((function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",n(1,7)),7!==e.stack)}))},28612:(e,t,o)=>{"use strict";var s=o(58389),n=o(4961).f,i=o(69037),r=o(77914),l=o(82095),a=o(16726),h=o(98730);e.exports=function(e,t){var o,c,u,d,g,f=e.target,p=e.global,m=e.stat;if(o=p?s:m?s[f]||l(f,{}):s[f]&&s[f].prototype)for(c in t){if(d=t[c],u=e.dontCallGetSet?(g=n(o,c))&&g.value:o[c],!h(p?c:f+(m?".":"#")+c,e.forced)&&void 0!==u){if(typeof d==typeof u)continue;a(d,u)}(e.sham||u&&u.sham)&&i(d,"sham",!0),r(o,c,d,e)}}},28473:e=>{"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},73067:(e,t,o)=>{"use strict";var s=o(274),n=Function.prototype,i=n.apply,r=n.call;e.exports="object"==typeof Reflect&&Reflect.apply||(s?r.bind(i):function(){return r.apply(i,arguments)})},32914:(e,t,o)=>{"use strict";var s=o(23786),n=o(68120),i=o(274),r=s(s.bind);e.exports=function(e,t){return n(e),void 0===t?e:i?r(e,t):function(){return e.apply(t,arguments)}}},274:(e,t,o)=>{"use strict";var s=o(28473);e.exports=!s((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},21807:(e,t,o)=>{"use strict";var s=o(274),n=Function.prototype.call;e.exports=s?n.bind(n):function(){return n.apply(n,arguments)}},42048:(e,t,o)=>{"use strict";var s=o(20382),n=o(55755),i=Function.prototype,r=s&&Object.getOwnPropertyDescriptor,l=n(i,"name"),a=l&&"something"===function(){}.name,h=l&&(!s||s&&r(i,"name").configurable);e.exports={EXISTS:l,PROPER:a,CONFIGURABLE:h}},680:(e,t,o)=>{"use strict";var s=o(14762),n=o(68120);e.exports=function(e,t,o){try{return s(n(Object.getOwnPropertyDescriptor(e,t)[o]))}catch(e){}}},23786:(e,t,o)=>{"use strict";var s=o(91278),n=o(14762);e.exports=function(e){if("Function"===s(e))return n(e)}},14762:(e,t,o)=>{"use strict";var s=o(274),n=Function.prototype,i=n.call,r=s&&n.bind.bind(i,i);e.exports=s?r:function(e){return function(){return i.apply(e,arguments)}}},11409:(e,t,o)=>{"use strict";var s=o(58389),n=o(1483);e.exports=function(e,t){return arguments.length<2?(o=s[e],n(o)?o:void 0):s[e]&&s[e][t];var o}},40041:e=>{"use strict";e.exports=function(e){return{iterator:e,next:e.next,done:!1}}},26665:(e,t,o)=>{"use strict";var s=o(26145),n=o(92564),i=o(15983),r=o(86775),l=o(70001)("iterator");e.exports=function(e){if(!i(e))return n(e,l)||n(e,"@@iterator")||r[s(e)]}},14887:(e,t,o)=>{"use strict";var s=o(21807),n=o(68120),i=o(2293),r=o(18761),l=o(26665),a=TypeError;e.exports=function(e,t){var o=arguments.length<2?l(e):t;if(n(o))return i(s(o,e));throw new a(r(e)+" is not iterable")}},55215:(e,t,o)=>{"use strict";var s=o(14762),n=o(14914),i=o(1483),r=o(91278),l=o(26261),a=s([].push);e.exports=function(e){if(i(e))return e;if(n(e)){for(var t=e.length,o=[],s=0;s<t;s++){var h=e[s];"string"==typeof h?a(o,h):"number"!=typeof h&&"Number"!==r(h)&&"String"!==r(h)||a(o,l(h))}var c=o.length,u=!0;return function(e,t){if(u)return u=!1,t;if(n(this))return t;for(var s=0;s<c;s++)if(o[s]===e)return t}}}},92564:(e,t,o)=>{"use strict";var s=o(68120),n=o(15983);e.exports=function(e,t){var o=e[t];return n(o)?void 0:s(o)}},53131:(e,t,o)=>{"use strict";var s=o(68120),n=o(2293),i=o(21807),r=o(73005),l=o(40041),a="Invalid size",h=RangeError,c=TypeError,u=Math.max,d=function(e,t){this.set=e,this.size=u(t,0),this.has=s(e.has),this.keys=s(e.keys)};d.prototype={getIterator:function(){return l(n(i(this.keys,this.set)))},includes:function(e){return i(this.has,this.set,e)}},e.exports=function(e){n(e);var t=+e.size;if(t!=t)throw new c(a);var o=r(t);if(o<0)throw new h(a);return new d(e,o)}},20708:(e,t,o)=>{"use strict";var s=o(14762),n=o(22347),i=Math.floor,r=s("".charAt),l=s("".replace),a=s("".slice),h=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,c=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,o,s,u,d){var g=o+e.length,f=s.length,p=c;return void 0!==u&&(u=n(u),p=h),l(d,p,(function(n,l){var h;switch(r(l,0)){case"$":return"$";case"&":return e;case"`":return a(t,0,o);case"'":return a(t,g);case"<":h=u[a(l,1,-1)];break;default:var c=+l;if(0===c)return n;if(c>f){var d=i(c/10);return 0===d?n:d<=f?void 0===s[d-1]?r(l,1):s[d-1]+r(l,1):n}h=s[c-1]}return void 0===h?"":h}))}},58389:function(e){"use strict";var t=function(e){return e&&e.Math===Math&&e};e.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof global&&global)||t("object"==typeof this&&this)||function(){return this}()||Function("return this")()},55755:(e,t,o)=>{"use strict";var s=o(14762),n=o(22347),i=s({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return i(n(e),t)}},11507:e=>{"use strict";e.exports={}},42811:(e,t,o)=>{"use strict";var s=o(11409);e.exports=s("document","documentElement")},1799:(e,t,o)=>{"use strict";var s=o(20382),n=o(28473),i=o(3145);e.exports=!s&&!n((function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},32121:(e,t,o)=>{"use strict";var s=o(14762),n=o(28473),i=o(91278),r=Object,l=s("".split);e.exports=n((function(){return!r("z").propertyIsEnumerable(0)}))?function(e){return"String"===i(e)?l(e,""):r(e)}:r},32429:(e,t,o)=>{"use strict";var s=o(1483),n=o(71704),i=o(51953);e.exports=function(e,t,o){var r,l;return i&&s(r=t.constructor)&&r!==o&&n(l=r.prototype)&&l!==o.prototype&&i(e,l),e}},17268:(e,t,o)=>{"use strict";var s=o(14762),n=o(1483),i=o(91831),r=s(Function.toString);n(i.inspectSource)||(i.inspectSource=function(e){return r(e)}),e.exports=i.inspectSource},16866:(e,t,o)=>{"use strict";var s=o(71704),n=o(69037);e.exports=function(e,t){s(t)&&"cause"in t&&n(e,"cause",t.cause)}},64483:(e,t,o)=>{"use strict";var s,n,i,r=o(74644),l=o(58389),a=o(71704),h=o(69037),c=o(55755),u=o(91831),d=o(65409),g=o(11507),f="Object already initialized",p=l.TypeError,m=l.WeakMap;if(r||u.state){var w=u.state||(u.state=new m);w.get=w.get,w.has=w.has,w.set=w.set,s=function(e,t){if(w.has(e))throw new p(f);return t.facade=e,w.set(e,t),t},n=function(e){return w.get(e)||{}},i=function(e){return w.has(e)}}else{var C=d("state");g[C]=!0,s=function(e,t){if(c(e,C))throw new p(f);return t.facade=e,h(e,C,t),t},n=function(e){return c(e,C)?e[C]:{}},i=function(e){return c(e,C)}}e.exports={set:s,get:n,has:i,enforce:function(e){return i(e)?n(e):s(e,{})},getterFor:function(e){return function(t){var o;if(!a(t)||(o=n(t)).type!==e)throw new p("Incompatible receiver, "+e+" required");return o}}}},95299:(e,t,o)=>{"use strict";var s=o(70001),n=o(86775),i=s("iterator"),r=Array.prototype;e.exports=function(e){return void 0!==e&&(n.Array===e||r[i]===e)}},14914:(e,t,o)=>{"use strict";var s=o(91278);e.exports=Array.isArray||function(e){return"Array"===s(e)}},1483:e=>{"use strict";var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},98730:(e,t,o)=>{"use strict";var s=o(28473),n=o(1483),i=/#|\.prototype\./,r=function(e,t){var o=a[l(e)];return o===c||o!==h&&(n(t)?s(t):!!t)},l=r.normalize=function(e){return String(e).replace(i,".").toLowerCase()},a=r.data={},h=r.NATIVE="N",c=r.POLYFILL="P";e.exports=r},15983:e=>{"use strict";e.exports=function(e){return null==e}},71704:(e,t,o)=>{"use strict";var s=o(1483);e.exports=function(e){return"object"==typeof e?null!==e:s(e)}},40735:(e,t,o)=>{"use strict";var s=o(71704);e.exports=function(e){return s(e)||null===e}},19557:e=>{"use strict";e.exports=!1},84786:(e,t,o)=>{"use strict";var s=o(71704),n=o(91278),i=o(70001)("match");e.exports=function(e){var t;return s(e)&&(void 0!==(t=e[i])?!!t:"RegExp"===n(e))}},31423:(e,t,o)=>{"use strict";var s=o(11409),n=o(1483),i=o(4815),r=o(45022),l=Object;e.exports=r?function(e){return"symbol"==typeof e}:function(e){var t=s("Symbol");return n(t)&&i(t.prototype,l(e))}},76001:(e,t,o)=>{"use strict";var s=o(21807);e.exports=function(e,t,o){for(var n,i,r=o?e:e.iterator,l=e.next;!(n=s(l,r)).done;)if(void 0!==(i=t(n.value)))return i}},11506:(e,t,o)=>{"use strict";var s=o(32914),n=o(21807),i=o(2293),r=o(18761),l=o(95299),a=o(66960),h=o(4815),c=o(14887),u=o(26665),d=o(46721),g=TypeError,f=function(e,t){this.stopped=e,this.result=t},p=f.prototype;e.exports=function(e,t,o){var m,w,C,v,y,E,S,R=o&&o.that,b=!(!o||!o.AS_ENTRIES),_=!(!o||!o.IS_RECORD),T=!(!o||!o.IS_ITERATOR),M=!(!o||!o.INTERRUPTED),O=s(t,R),I=function(e){return m&&d(m,"normal",e),new f(!0,e)},N=function(e){return b?(i(e),M?O(e[0],e[1],I):O(e[0],e[1])):M?O(e,I):O(e)};if(_)m=e.iterator;else if(T)m=e;else{if(!(w=u(e)))throw new g(r(e)+" is not iterable");if(l(w)){for(C=0,v=a(e);v>C;C++)if((y=N(e[C]))&&h(p,y))return y;return new f(!1)}m=c(e,w)}for(E=_?e.next:m.next;!(S=n(E,m)).done;){try{y=N(S.value)}catch(e){d(m,"throw",e)}if("object"==typeof y&&y&&h(p,y))return y}return new f(!1)}},46721:(e,t,o)=>{"use strict";var s=o(21807),n=o(2293),i=o(92564);e.exports=function(e,t,o){var r,l;n(e);try{if(!(r=i(e,"return"))){if("throw"===t)throw o;return o}r=s(r,e)}catch(e){l=!0,r=e}if("throw"===t)throw o;if(l)throw r;return n(r),o}},86775:e=>{"use strict";e.exports={}},66960:(e,t,o)=>{"use strict";var s=o(58324);e.exports=function(e){return s(e.length)}},90169:(e,t,o)=>{"use strict";var s=o(14762),n=o(28473),i=o(1483),r=o(55755),l=o(20382),a=o(42048).CONFIGURABLE,h=o(17268),c=o(64483),u=c.enforce,d=c.get,g=String,f=Object.defineProperty,p=s("".slice),m=s("".replace),w=s([].join),C=l&&!n((function(){return 8!==f((function(){}),"length",{value:8}).length})),v=String(String).split("String"),y=e.exports=function(e,t,o){"Symbol("===p(g(t),0,7)&&(t="["+m(g(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),o&&o.getter&&(t="get "+t),o&&o.setter&&(t="set "+t),(!r(e,"name")||a&&e.name!==t)&&(l?f(e,"name",{value:t,configurable:!0}):e.name=t),C&&o&&r(o,"arity")&&e.length!==o.arity&&f(e,"length",{value:o.arity});try{o&&r(o,"constructor")&&o.constructor?l&&f(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var s=u(e);return r(s,"source")||(s.source=w(v,"string"==typeof t?t:"")),e};Function.prototype.toString=y((function(){return i(this)&&d(this).source||h(this)}),"toString")},61703:e=>{"use strict";var t=Math.ceil,o=Math.floor;e.exports=Math.trunc||function(e){var s=+e;return(s>0?o:t)(s)}},17969:(e,t,o)=>{"use strict";var s=o(26261);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:s(e)}},25290:(e,t,o)=>{"use strict";var s,n=o(2293),i=o(95799),r=o(44741),l=o(11507),a=o(42811),h=o(3145),c=o(65409),u="prototype",d="script",g=c("IE_PROTO"),f=function(){},p=function(e){return"<"+d+">"+e+"</"+d+">"},m=function(e){e.write(p("")),e.close();var t=e.parentWindow.Object;return e=null,t},w=function(){try{s=new ActiveXObject("htmlfile")}catch(e){}var e,t,o;w="undefined"!=typeof document?document.domain&&s?m(s):(t=h("iframe"),o="java"+d+":",t.style.display="none",a.appendChild(t),t.src=String(o),(e=t.contentWindow.document).open(),e.write(p("document.F=Object")),e.close(),e.F):m(s);for(var n=r.length;n--;)delete w[u][r[n]];return w()};l[g]=!0,e.exports=Object.create||function(e,t){var o;return null!==e?(f[u]=n(e),o=new f,f[u]=null,o[g]=e):o=w(),void 0===t?o:i.f(o,t)}},95799:(e,t,o)=>{"use strict";var s=o(20382),n=o(3896),i=o(25835),r=o(2293),l=o(35599),a=o(33658);t.f=s&&!n?Object.defineProperties:function(e,t){r(e);for(var o,s=l(t),n=a(t),h=n.length,c=0;h>c;)i.f(e,o=n[c++],s[o]);return e}},25835:(e,t,o)=>{"use strict";var s=o(20382),n=o(1799),i=o(3896),r=o(2293),l=o(83815),a=TypeError,h=Object.defineProperty,c=Object.getOwnPropertyDescriptor,u="enumerable",d="configurable",g="writable";t.f=s?i?function(e,t,o){if(r(e),t=l(t),r(o),"function"==typeof e&&"prototype"===t&&"value"in o&&g in o&&!o[g]){var s=c(e,t);s&&s[g]&&(e[t]=o.value,o={configurable:d in o?o[d]:s[d],enumerable:u in o?o[u]:s[u],writable:!1})}return h(e,t,o)}:h:function(e,t,o){if(r(e),t=l(t),r(o),n)try{return h(e,t,o)}catch(e){}if("get"in o||"set"in o)throw new a("Accessors not supported");return"value"in o&&(e[t]=o.value),e}},4961:(e,t,o)=>{"use strict";var s=o(20382),n=o(21807),i=o(37611),r=o(57738),l=o(35599),a=o(83815),h=o(55755),c=o(1799),u=Object.getOwnPropertyDescriptor;t.f=s?u:function(e,t){if(e=l(e),t=a(t),c)try{return u(e,t)}catch(e){}if(h(e,t))return r(!n(i.f,e,t),e[t])}},12278:(e,t,o)=>{"use strict";var s=o(56742),n=o(44741).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return s(e,n)}},74347:(e,t)=>{"use strict";t.f=Object.getOwnPropertySymbols},4815:(e,t,o)=>{"use strict";var s=o(14762);e.exports=s({}.isPrototypeOf)},56742:(e,t,o)=>{"use strict";var s=o(14762),n=o(55755),i=o(35599),r=o(86651).indexOf,l=o(11507),a=s([].push);e.exports=function(e,t){var o,s=i(e),h=0,c=[];for(o in s)!n(l,o)&&n(s,o)&&a(c,o);for(;t.length>h;)n(s,o=t[h++])&&(~r(c,o)||a(c,o));return c}},33658:(e,t,o)=>{"use strict";var s=o(56742),n=o(44741);e.exports=Object.keys||function(e){return s(e,n)}},37611:(e,t)=>{"use strict";var o={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,n=s&&!o.call({1:2},1);t.f=n?function(e){var t=s(this,e);return!!t&&t.enumerable}:o},51953:(e,t,o)=>{"use strict";var s=o(680),n=o(71704),i=o(53312),r=o(63852);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,o={};try{(e=s(Object.prototype,"__proto__","set"))(o,[]),t=o instanceof Array}catch(e){}return function(o,s){return i(o),r(s),n(o)?(t?e(o,s):o.__proto__=s,o):o}}():void 0)},348:(e,t,o)=>{"use strict";var s=o(21807),n=o(1483),i=o(71704),r=TypeError;e.exports=function(e,t){var o,l;if("string"===t&&n(o=e.toString)&&!i(l=s(o,e)))return l;if(n(o=e.valueOf)&&!i(l=s(o,e)))return l;if("string"!==t&&n(o=e.toString)&&!i(l=s(o,e)))return l;throw new r("Can't convert object to primitive value")}},89497:(e,t,o)=>{"use strict";var s=o(11409),n=o(14762),i=o(12278),r=o(74347),l=o(2293),a=n([].concat);e.exports=s("Reflect","ownKeys")||function(e){var t=i.f(l(e)),o=r.f;return o?a(t,o(e)):t}},7150:(e,t,o)=>{"use strict";var s=o(25835).f;e.exports=function(e,t,o){o in e||s(e,o,{configurable:!0,get:function(){return t[o]},set:function(e){t[o]=e}})}},36653:(e,t,o)=>{"use strict";var s=o(2293);e.exports=function(){var e=s(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},39736:(e,t,o)=>{"use strict";var s=o(21807),n=o(55755),i=o(4815),r=o(36653),l=RegExp.prototype;e.exports=function(e){var t=e.flags;return void 0!==t||"flags"in l||n(e,"flags")||!i(l,e)?t:s(r,e)}},53312:(e,t,o)=>{"use strict";var s=o(15983),n=TypeError;e.exports=function(e){if(s(e))throw new n("Can't call method on "+e);return e}},39570:(e,t,o)=>{"use strict";var s,n=o(58389),i=o(73067),r=o(1483),l=o(35413),a=o(89966),h=o(61698),c=o(4066),u=n.Function,d=/MSIE .\./.test(a)||l&&((s=n.Bun.version.split(".")).length<3||"0"===s[0]&&(s[1]<3||"3"===s[1]&&"0"===s[2]));e.exports=function(e,t){var o=t?2:1;return d?function(s,n){var l=c(arguments.length,1)>o,a=r(s)?s:u(s),d=l?h(arguments,o):[],g=l?function(){i(a,this,d)}:a;return t?e(g,n):e(g)}:e}},34824:(e,t,o)=>{"use strict";var s=o(36880),n=o(11639),i=s.Set,r=s.add;e.exports=function(e){var t=new i;return n(e,(function(e){r(t,e)})),t}},26006:(e,t,o)=>{"use strict";var s=o(14246),n=o(36880),i=o(34824),r=o(45828),l=o(53131),a=o(11639),h=o(76001),c=n.has,u=n.remove;e.exports=function(e){var t=s(this),o=l(e),n=i(t);return r(t)<=o.size?a(t,(function(e){o.includes(e)&&u(n,e)})):h(o.getIterator(),(function(e){c(t,e)&&u(n,e)})),n}},36880:(e,t,o)=>{"use strict";var s=o(14762),n=Set.prototype;e.exports={Set,add:s(n.add),has:s(n.has),remove:s(n.delete),proto:n}},25472:(e,t,o)=>{"use strict";var s=o(14246),n=o(36880),i=o(45828),r=o(53131),l=o(11639),a=o(76001),h=n.Set,c=n.add,u=n.has;e.exports=function(e){var t=s(this),o=r(e),n=new h;return i(t)>o.size?a(o.getIterator(),(function(e){u(t,e)&&c(n,e)})):l(t,(function(e){o.includes(e)&&c(n,e)})),n}},87035:(e,t,o)=>{"use strict";var s=o(14246),n=o(36880).has,i=o(45828),r=o(53131),l=o(11639),a=o(76001),h=o(46721);e.exports=function(e){var t=s(this),o=r(e);if(i(t)<=o.size)return!1!==l(t,(function(e){if(o.includes(e))return!1}),!0);var c=o.getIterator();return!1!==a(c,(function(e){if(n(t,e))return h(c,"normal",!1)}))}},51984:(e,t,o)=>{"use strict";var s=o(14246),n=o(45828),i=o(11639),r=o(53131);e.exports=function(e){var t=s(this),o=r(e);return!(n(t)>o.size)&&!1!==i(t,(function(e){if(!o.includes(e))return!1}),!0)}},33049:(e,t,o)=>{"use strict";var s=o(14246),n=o(36880).has,i=o(45828),r=o(53131),l=o(76001),a=o(46721);e.exports=function(e){var t=s(this),o=r(e);if(i(t)<o.size)return!1;var h=o.getIterator();return!1!==l(h,(function(e){if(!n(t,e))return a(h,"normal",!1)}))}},11639:(e,t,o)=>{"use strict";var s=o(14762),n=o(76001),i=o(36880),r=i.Set,l=i.proto,a=s(l.forEach),h=s(l.keys),c=h(new r).next;e.exports=function(e,t,o){return o?n({iterator:h(e),next:c},t):a(e,t)}},5242:(e,t,o)=>{"use strict";var s=o(11409),n=function(e){return{size:e,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}};e.exports=function(e){var t=s("Set");try{(new t)[e](n(0));try{return(new t)[e](n(-1)),!1}catch(e){return!0}}catch(e){return!1}}},45828:(e,t,o)=>{"use strict";var s=o(680),n=o(36880);e.exports=s(n.proto,"size","get")||function(e){return e.size}},61916:(e,t,o)=>{"use strict";var s=o(14246),n=o(36880),i=o(34824),r=o(53131),l=o(76001),a=n.add,h=n.has,c=n.remove;e.exports=function(e){var t=s(this),o=r(e).getIterator(),n=i(t);return l(o,(function(e){h(t,e)?c(n,e):a(n,e)})),n}},95790:(e,t,o)=>{"use strict";var s=o(14246),n=o(36880).add,i=o(34824),r=o(53131),l=o(76001);e.exports=function(e){var t=s(this),o=r(e).getIterator(),a=i(t);return l(o,(function(e){n(a,e)})),a}},65409:(e,t,o)=>{"use strict";var s=o(47255),n=o(81866),i=s("keys");e.exports=function(e){return i[e]||(i[e]=n(e))}},91831:(e,t,o)=>{"use strict";var s=o(19557),n=o(58389),i=o(82095),r="__core-js_shared__",l=e.exports=n[r]||i(r,{});(l.versions||(l.versions=[])).push({version:"3.37.1",mode:s?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE",source:"https://github.com/zloirock/core-js"})},47255:(e,t,o)=>{"use strict";var s=o(91831);e.exports=function(e,t){return s[e]||(s[e]=t||{})}},86029:(e,t,o)=>{"use strict";var s=o(76170),n=o(28473),i=o(58389).String;e.exports=!!Object.getOwnPropertySymbols&&!n((function(){var e=Symbol("symbol detection");return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&s&&s<41}))},17007:(e,t,o)=>{"use strict";var s,n,i,r,l=o(58389),a=o(73067),h=o(32914),c=o(1483),u=o(55755),d=o(28473),g=o(42811),f=o(61698),p=o(3145),m=o(4066),w=o(28417),C=o(4334),v=l.setImmediate,y=l.clearImmediate,E=l.process,S=l.Dispatch,R=l.Function,b=l.MessageChannel,_=l.String,T=0,M={},O="onreadystatechange";d((function(){s=l.location}));var I=function(e){if(u(M,e)){var t=M[e];delete M[e],t()}},N=function(e){return function(){I(e)}},A=function(e){I(e.data)},P=function(e){l.postMessage(_(e),s.protocol+"//"+s.host)};v&&y||(v=function(e){m(arguments.length,1);var t=c(e)?e:R(e),o=f(arguments,1);return M[++T]=function(){a(t,void 0,o)},n(T),T},y=function(e){delete M[e]},C?n=function(e){E.nextTick(N(e))}:S&&S.now?n=function(e){S.now(N(e))}:b&&!w?(r=(i=new b).port2,i.port1.onmessage=A,n=h(r.postMessage,r)):l.addEventListener&&c(l.postMessage)&&!l.importScripts&&s&&"file:"!==s.protocol&&!d(P)?(n=P,l.addEventListener("message",A,!1)):n=O in p("script")?function(e){g.appendChild(p("script"))[O]=function(){g.removeChild(this),I(e)}}:function(e){setTimeout(N(e),0)}),e.exports={set:v,clear:y}},33392:(e,t,o)=>{"use strict";var s=o(73005),n=Math.max,i=Math.min;e.exports=function(e,t){var o=s(e);return o<0?n(o+t,0):i(o,t)}},35599:(e,t,o)=>{"use strict";var s=o(32121),n=o(53312);e.exports=function(e){return s(n(e))}},73005:(e,t,o)=>{"use strict";var s=o(61703);e.exports=function(e){var t=+e;return t!=t||0===t?0:s(t)}},58324:(e,t,o)=>{"use strict";var s=o(73005),n=Math.min;e.exports=function(e){var t=s(e);return t>0?n(t,9007199254740991):0}},22347:(e,t,o)=>{"use strict";var s=o(53312),n=Object;e.exports=function(e){return n(s(e))}},22355:(e,t,o)=>{"use strict";var s=o(21807),n=o(71704),i=o(31423),r=o(92564),l=o(348),a=o(70001),h=TypeError,c=a("toPrimitive");e.exports=function(e,t){if(!n(e)||i(e))return e;var o,a=r(e,c);if(a){if(void 0===t&&(t="default"),o=s(a,e,t),!n(o)||i(o))return o;throw new h("Can't convert object to primitive value")}return void 0===t&&(t="number"),l(e,t)}},83815:(e,t,o)=>{"use strict";var s=o(22355),n=o(31423);e.exports=function(e){var t=s(e,"string");return n(t)?t:t+""}},34338:(e,t,o)=>{"use strict";var s={};s[o(70001)("toStringTag")]="z",e.exports="[object z]"===String(s)},26261:(e,t,o)=>{"use strict";var s=o(26145),n=String;e.exports=function(e){if("Symbol"===s(e))throw new TypeError("Cannot convert a Symbol value to a string");return n(e)}},18761:e=>{"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},81866:(e,t,o)=>{"use strict";var s=o(14762),n=0,i=Math.random(),r=s(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+r(++n+i,36)}},45022:(e,t,o)=>{"use strict";var s=o(86029);e.exports=s&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3896:(e,t,o)=>{"use strict";var s=o(20382),n=o(28473);e.exports=s&&n((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},4066:e=>{"use strict";var t=TypeError;e.exports=function(e,o){if(e<o)throw new t("Not enough arguments");return e}},74644:(e,t,o)=>{"use strict";var s=o(58389),n=o(1483),i=s.WeakMap;e.exports=n(i)&&/native code/.test(String(i))},70001:(e,t,o)=>{"use strict";var s=o(58389),n=o(47255),i=o(55755),r=o(81866),l=o(86029),a=o(45022),h=s.Symbol,c=n("wks"),u=a?h.for||h:h&&h.withoutSetter||r;e.exports=function(e){return i(c,e)||(c[e]=l&&i(h,e)?h[e]:u("Symbol."+e)),c[e]}},72335:(e,t,o)=>{"use strict";var s=o(11409),n=o(55755),i=o(69037),r=o(4815),l=o(51953),a=o(16726),h=o(7150),c=o(32429),u=o(17969),d=o(16866),g=o(27473),f=o(20382),p=o(19557);e.exports=function(e,t,o,m){var w="stackTraceLimit",C=m?2:1,v=e.split("."),y=v[v.length-1],E=s.apply(null,v);if(E){var S=E.prototype;if(!p&&n(S,"cause")&&delete S.cause,!o)return E;var R=s("Error"),b=t((function(e,t){var o=u(m?t:e,void 0),s=m?new E(e):new E;return void 0!==o&&i(s,"message",o),g(s,b,s.stack,2),this&&r(S,this)&&c(s,this,b),arguments.length>C&&d(s,arguments[C]),s}));if(b.prototype=S,"Error"!==y?l?l(b,R):a(b,R,{name:!0}):f&&w in E&&(h(b,E,w),h(b,E,"prepareStackTrace")),a(b,E),!p)try{S.name!==y&&i(S,"name",y),S.constructor=b}catch(e){}return b}}},95913:(e,t,o)=>{"use strict";var s=o(28612),n=o(22347),i=o(66960),r=o(73005),l=o(37095);s({target:"Array",proto:!0},{at:function(e){var t=n(this),o=i(t),s=r(e),l=s>=0?s:o+s;return l<0||l>=o?void 0:t[l]}}),l("at")},15724:(e,t,o)=>{"use strict";var s=o(28612),n=o(22347),i=o(66960),r=o(39273),l=o(31091);s({target:"Array",proto:!0,arity:1,forced:o(28473)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=n(this),o=i(t),s=arguments.length;l(o+s);for(var a=0;a<s;a++)t[o]=arguments[a],o++;return r(t,o),o}})},63979:(e,t,o)=>{"use strict";o(37095)("flatMap")},25352:(e,t,o)=>{"use strict";o(37095)("flat")},54999:(e,t,o)=>{"use strict";var s=o(28612),n=o(22347),i=o(66960),r=o(39273),l=o(16060),a=o(31091);s({target:"Array",proto:!0,arity:1,forced:1!==[].unshift(0)||!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}}()},{unshift:function(e){var t=n(this),o=i(t),s=arguments.length;if(s){a(o+s);for(var h=o;h--;){var c=h+s;h in t?t[c]=t[h]:l(t,c)}for(var u=0;u<s;u++)t[u]=arguments[u]}return r(t,o+s)}})},67834:(e,t,o)=>{"use strict";var s=o(28612),n=o(58389),i=o(73067),r=o(72335),l="WebAssembly",a=n[l],h=7!==new Error("e",{cause:7}).cause,c=function(e,t){var o={};o[e]=r(e,t,h),s({global:!0,constructor:!0,arity:1,forced:h},o)},u=function(e,t){if(a&&a[e]){var o={};o[e]=r(l+"."+e,t,h),s({target:l,stat:!0,constructor:!0,arity:1,forced:h},o)}};c("Error",(function(e){return function(t){return i(e,this,arguments)}})),c("EvalError",(function(e){return function(t){return i(e,this,arguments)}})),c("RangeError",(function(e){return function(t){return i(e,this,arguments)}})),c("ReferenceError",(function(e){return function(t){return i(e,this,arguments)}})),c("SyntaxError",(function(e){return function(t){return i(e,this,arguments)}})),c("TypeError",(function(e){return function(t){return i(e,this,arguments)}})),c("URIError",(function(e){return function(t){return i(e,this,arguments)}})),u("CompileError",(function(e){return function(t){return i(e,this,arguments)}})),u("LinkError",(function(e){return function(t){return i(e,this,arguments)}})),u("RuntimeError",(function(e){return function(t){return i(e,this,arguments)}}))},66184:(e,t,o)=>{"use strict";var s=o(28612),n=o(11409),i=o(73067),r=o(21807),l=o(14762),a=o(28473),h=o(1483),c=o(31423),u=o(61698),d=o(55215),g=o(86029),f=String,p=n("JSON","stringify"),m=l(/./.exec),w=l("".charAt),C=l("".charCodeAt),v=l("".replace),y=l(1..toString),E=/[\uD800-\uDFFF]/g,S=/^[\uD800-\uDBFF]$/,R=/^[\uDC00-\uDFFF]$/,b=!g||a((function(){var e=n("Symbol")("stringify detection");return"[null]"!==p([e])||"{}"!==p({a:e})||"{}"!==p(Object(e))})),_=a((function(){return'"\\udf06\\ud834"'!==p("\udf06\ud834")||'"\\udead"'!==p("\udead")})),T=function(e,t){var o=u(arguments),s=d(t);if(h(s)||void 0!==e&&!c(e))return o[1]=function(e,t){if(h(s)&&(t=r(s,this,f(e),t)),!c(t))return t},i(p,null,o)},M=function(e,t,o){var s=w(o,t-1),n=w(o,t+1);return m(S,e)&&!m(R,n)||m(R,e)&&!m(S,s)?"\\u"+y(C(e,0),16):e};p&&s({target:"JSON",stat:!0,arity:3,forced:b||_},{stringify:function(e,t,o){var s=u(arguments),n=i(b?T:p,null,s);return _&&"string"==typeof n?v(n,E,M):n}})},75339:(e,t,o)=>{"use strict";var s=o(28612),n=o(11506),i=o(30670);s({target:"Object",stat:!0},{fromEntries:function(e){var t={};return n(e,(function(e,o){i(t,e,o)}),{AS_ENTRIES:!0}),t}})},71336:(e,t,o)=>{"use strict";var s=o(28612),n=o(26006);s({target:"Set",proto:!0,real:!0,forced:!o(5242)("difference")},{difference:n})},41558:(e,t,o)=>{"use strict";var s=o(28612),n=o(28473),i=o(25472);s({target:"Set",proto:!0,real:!0,forced:!o(5242)("intersection")||n((function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))}))},{intersection:i})},17663:(e,t,o)=>{"use strict";var s=o(28612),n=o(87035);s({target:"Set",proto:!0,real:!0,forced:!o(5242)("isDisjointFrom")},{isDisjointFrom:n})},68630:(e,t,o)=>{"use strict";var s=o(28612),n=o(51984);s({target:"Set",proto:!0,real:!0,forced:!o(5242)("isSubsetOf")},{isSubsetOf:n})},79645:(e,t,o)=>{"use strict";var s=o(28612),n=o(33049);s({target:"Set",proto:!0,real:!0,forced:!o(5242)("isSupersetOf")},{isSupersetOf:n})},89858:(e,t,o)=>{"use strict";var s=o(28612),n=o(61916);s({target:"Set",proto:!0,real:!0,forced:!o(5242)("symmetricDifference")},{symmetricDifference:n})},8620:(e,t,o)=>{"use strict";var s=o(28612),n=o(95790);s({target:"Set",proto:!0,real:!0,forced:!o(5242)("union")},{union:n})},12587:(e,t,o)=>{"use strict";var s=o(28612),n=o(14762),i=o(53312),r=o(73005),l=o(26261),a=o(28473),h=n("".charAt);s({target:"String",proto:!0,forced:a((function(){return"\ud842"!=="𠮷".at(-2)}))},{at:function(e){var t=l(i(this)),o=t.length,s=r(e),n=s>=0?s:o+s;return n<0||n>=o?void 0:h(t,n)}})},64552:(e,t,o)=>{"use strict";var s=o(28612),n=o(21807),i=o(14762),r=o(53312),l=o(1483),a=o(15983),h=o(84786),c=o(26261),u=o(92564),d=o(39736),g=o(20708),f=o(70001),p=o(19557),m=f("replace"),w=TypeError,C=i("".indexOf),v=i("".replace),y=i("".slice),E=Math.max;s({target:"String",proto:!0},{replaceAll:function(e,t){var o,s,i,f,S,R,b,_,T,M=r(this),O=0,I=0,N="";if(!a(e)){if((o=h(e))&&(s=c(r(d(e))),!~C(s,"g")))throw new w("`.replaceAll` does not allow non-global regexes");if(i=u(e,m))return n(i,e,M,t);if(p&&o)return v(c(M),e,t)}for(f=c(M),S=c(e),(R=l(t))||(t=c(t)),b=S.length,_=E(1,b),O=C(f,S);-1!==O;)T=R?c(t(S,O,f)):g(S,f,O,[],void 0,t),N+=y(f,I,O)+T,I=O+b,O=O+_>f.length?-1:C(f,S,O+_);return I<f.length&&(N+=y(f,I)),N}})},36241:(e,t,o)=>{"use strict";o(71336)},85151:(e,t,o)=>{"use strict";o(41558)},49122:(e,t,o)=>{"use strict";o(17663)},75183:(e,t,o)=>{"use strict";o(68630)},40520:(e,t,o)=>{"use strict";o(79645)},32495:(e,t,o)=>{"use strict";o(89858)},72371:(e,t,o)=>{"use strict";o(8620)},31998:(e,t,o)=>{"use strict";var s=o(28612),n=o(58389),i=o(17007).clear;s({global:!0,bind:!0,enumerable:!0,forced:n.clearImmediate!==i},{clearImmediate:i})},71766:(e,t,o)=>{"use strict";o(31998),o(8615)},8615:(e,t,o)=>{"use strict";var s=o(28612),n=o(58389),i=o(17007).set,r=o(39570),l=n.setImmediate?r(i,!1):i;s({global:!0,bind:!0,enumerable:!0,forced:n.setImmediate!==l},{setImmediate:l})}},i={};function r(e){var t=i[e];if(void 0!==t)return t.exports;var o=i[e]={exports:{}};return n[e].call(o.exports,o,o.exports,r),o.exports}r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return(()=>{"use strict";var e=l,t=r(96784);var o=L(r(38715));o.CellCoords,o.CellRange;var s,n,i,a,h,c=r(79053),u=L(r(82629)),d=r(93969),g=t(r(12729)),f=t(r(1817)),p=L(r(74737)),m=L(r(9175)),w=L(r(28890)),C=L(r(56216)),v=L(r(72484)),y=L(r(93980)),E=L(r(78832)),S=L(r(38893)),R=L(r(87485)),b=L(r(13911)),_=L(r(59777)),T=L(r(71257)),M=L(r(9893)),O=L(r(79729)),I=r(84558),N=r(44288),A=r(51255),P=r(34299),x=r(90532),H=r(61205);function D(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(D=function(e){return e?o:t})(e)}function L(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=D(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(0,c.registerAllModules)(),(0,g.default)(o.default),o.default.__GhostTable=f.default,o.default._getListenersCounter=u.getListenersCounter,o.default._getRegisteredMapsCounter=d.getRegisteredMapsCounter,o.default.EventManager=u.default;const k=[m,w,C,v,y,E,S,R,b,_,T,p],V=[M,O];o.default.helper={},o.default.dom={},m.arrayEach(k,(e=>{m.arrayEach(Object.getOwnPropertyNames(e),(t=>{"_"!==t.charAt(0)&&(o.default.helper[t]=e[t])}))})),m.arrayEach(V,(e=>{m.arrayEach(Object.getOwnPropertyNames(e),(t=>{"_"!==t.charAt(0)&&(o.default.dom[t]=e[t])}))})),o.default.cellTypes=null!==(s=o.default.cellTypes)&&void 0!==s?s:{},m.arrayEach((0,P.getRegisteredCellTypeNames)(),(e=>{o.default.cellTypes[e]=(0,P.getCellType)(e)})),o.default.cellTypes.registerCellType=P.registerCellType,o.default.cellTypes.getCellType=P.getCellType,o.default.editors=null!==(n=o.default.editors)&&void 0!==n?n:{},m.arrayEach((0,I.getRegisteredEditorNames)(),(e=>{o.default.editors[`${_.toUpperCaseFirst(e)}Editor`]=(0,I.getEditor)(e)})),o.default.editors.registerEditor=I.registerEditor,o.default.editors.getEditor=I.getEditor,o.default.renderers=null!==(i=o.default.renderers)&&void 0!==i?i:{},m.arrayEach((0,N.getRegisteredRendererNames)(),(e=>{const t=(0,N.getRenderer)(e);"base"===e&&(o.default.renderers.cellDecorator=t),o.default.renderers[`${_.toUpperCaseFirst(e)}Renderer`]=t})),o.default.renderers.registerRenderer=N.registerRenderer,o.default.renderers.getRenderer=N.getRenderer,o.default.validators=null!==(a=o.default.validators)&&void 0!==a?a:{},m.arrayEach((0,A.getRegisteredValidatorNames)(),(e=>{o.default.validators[`${_.toUpperCaseFirst(e)}Validator`]=(0,A.getValidator)(e)})),o.default.validators.registerValidator=A.registerValidator,o.default.validators.getValidator=A.getValidator,o.default.plugins=null!==(h=o.default.plugins)&&void 0!==h?h:{},m.arrayEach((0,x.getPluginsNames)(),(e=>{o.default.plugins[e]=(0,x.getPlugin)(e)})),o.default.plugins[`${_.toUpperCaseFirst(H.BasePlugin.PLUGIN_KEY)}Plugin`]=H.BasePlugin,o.default.plugins.registerPlugin=x.registerPlugin,o.default.plugins.getPlugin=x.getPlugin;e.default=o.default})(),l=l.default})()));
92
+ that does not exist. Before activation, register the context using the "addContext" method.`);u=e},isCtrlPressed:()=>!f&&(m.isPressed("control")||m.isPressed("meta")),releasePressedKeys:()=>m.releasePressedKeys(),destroy:()=>m.unmount()}}},51276:(e,t,o)=>{"use strict";t.__esModule=!0,t.useRecorder=function(e,t,o,s,d){const g=e=>a.includes(e),f=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=[];return e.altKey&&o.push("alt"),t&&(e.ctrlKey||e.metaKey)?o.push("control/meta"):(e.ctrlKey&&o.push("control"),e.metaKey&&o.push("meta")),e.shiftKey&&o.push("shift"),o},p=e=>{if(!1===t(e))return;const r=o(e);if(229===e.keyCode||!1===r||(0,i.isImmediatePropagationStopped)(e))return;const a=(0,n.normalizeEventKey)(e);let h=[];g(a)||(h=f(e));const c=[a].concat(h);!d(e,c)&&((0,l.isMacOS)()&&h.includes("meta")||!(0,l.isMacOS)()&&h.includes("control"))&&d(e,[a].concat(f(e,!0))),s(e)},m=e=>{if(e.key){const t=(0,n.normalizeEventKey)(e);g(t)&&h.press(t)}},w=e=>{if(e.key){const t=(0,n.normalizeEventKey)(e);g(t)&&h.release(t)}},C=()=>{h.releaseAll()};return{mount:()=>{let t=e;for(u+=1;t;)1===u&&(t.document.documentElement.addEventListener("keydown",m),c.push({event:"keydown",listener:m}),t.document.documentElement.addEventListener("keyup",w),c.push({event:"keyup",listener:w})),t.document.documentElement.addEventListener("keydown",p),t.document.documentElement.addEventListener("blur",C),t=(0,r.getParentWindow)(t)},unmount:()=>{let t=e;for(u-=1;t;){if(0===u){for(let e=0;e<c.length;e++){const{event:o,listener:s}=c[e];t.document.documentElement.removeEventListener(o,s)}c.length=0}t.document.documentElement.removeEventListener("keydown",p),t.document.documentElement.removeEventListener("blur",C),t=(0,r.getParentWindow)(t)}},isPressed:e=>h.isPressed(e),releasePressedKeys:()=>h.releaseAll()}},o(15724);var s=o(60781),n=o(94901),i=o(79729),r=o(9893),l=o(28890);const a=["meta","alt","shift","control"],h=(0,s.createKeysObserver)(),c=[];let u=0},94901:(e,t)=>{"use strict";t.__esModule=!0;const o=new Map([[" ","space"],["spacebar","space"],["scroll","scrolllock"],["del","delete"],["esc","escape"],["medianexttrack","mediatracknext"],["mediaprevioustrack","mediatrackprevious"],["volumeup","audiovolumeup"],["volumedown","audiovolumedown"],["volumemute","audiovolumemute"],["multiply","*"],["add","+"],["divide","/"],["subtract","-"],["left","arrowleft"],["right","arrowright"],["up","arrowup"],["down","arrowdown"]]);t.normalizeKeys=e=>e.map((e=>{const t=e.toLowerCase();return o.has(t)?o.get(t):t})).sort().join("+");t.getKeysList=e=>e.split("+");const s=new Map([[96,"numpad0"],[97,"numpad1"],[98,"numpad2"],[99,"numpad3"],[100,"numpad4"],[101,"numpad5"],[102,"numpad6"],[103,"numpad7"],[104,"numpad8"],[105,"numpad9"],[106,"multiply"],[107,"add"],[108,"decimal"],[109,"subtract"],[110,"decimal"],[111,"divide"],[112,"f1"],[113,"f2"],[114,"f3"],[115,"f4"],[116,"f5"],[117,"f6"],[118,"f7"],[119,"f8"],[120,"f9"],[121,"f10"],[122,"f11"],[123,"f12"],[186,"semicolon"],[187,"equal"],[188,"comma"],[189,"minus"],[190,"period"],[191,"slash"],[192,"backquote"],[219,"bracketleft"],[220,"backslash"],[221,"bracketright"],[222,"quote"]]);t.normalizeEventKey=e=>{let{which:t,key:o}=e;if(s.has(t))return s.get(t);const n=String.fromCharCode(t).toLowerCase();return/^[a-z0-9]$/.test(n)?n:o.toLowerCase()}},66801:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(9893),r=s(o(82629)),l=o(79729),a=s(o(90)),h=o(30870),c=o(11015),u=o(92692);function d(e,t,o){g(e,t),t.set(e,o)}function g(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function f(e,t){return e.get(m(e,t))}function p(e,t,o){return e.set(m(e,t),o),o}function m(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var w=new WeakMap,C=new WeakMap,v=new WeakMap,y=new WeakMap,E=new WeakMap,S=new WeakMap,R=new WeakMap,b=new WeakSet;function _(){return parseInt(this.hot.rootElement.getAttribute((0,u.A11Y_COLCOUNT)()[0]),10)}function T(e){const t=m(b,this,_).call(this)+e;(0,i.setAttribute)(this.hot.rootElement,...(0,u.A11Y_COLCOUNT)(t))}t.default=class{constructor(e){var t,o;g(t=this,o=b),o.add(t),(0,n.default)(this,"hot",void 0),(0,n.default)(this,"eventManager",void 0),(0,n.default)(this,"settings",void 0),(0,n.default)(this,"THEAD",void 0),(0,n.default)(this,"TBODY",void 0),(0,n.default)(this,"_wt",void 0),(0,n.default)(this,"activeWt",void 0),d(this,w,0),d(this,C,0),(0,n.default)(this,"postponedAdjustElementsSize",!1),d(this,v,!1),d(this,y,void 0),d(this,E,void 0),d(this,S,0),d(this,R,0),this.hot=e,this.eventManager=new r.default(this.hot),this.settings=this.hot.getSettings(),this.createElements(),this.registerEvents(),this.initializeWalkontable()}render(){this.hot.isRenderSuspended()||(this.hot.runHooks("beforeRender",this.hot.forceFullRender),this.postponedAdjustElementsSize&&(this.postponedAdjustElementsSize=!1,this.adjustElementsSize(!0)),this._wt.draw(!this.hot.forceFullRender),this.hot.runHooks("afterRender",this.hot.forceFullRender),this.hot.forceFullRender=!1,this.hot.renderCall=!1)}adjustElementsSize(){this.hot.isRenderSuspended()?this.postponedAdjustElementsSize=!0:this._wt.wtOverlays.adjustElementsSize()}getCellAtCoords(e,t){const o=this._wt.getCell(e,t);return o<0?null:o}scrollViewport(e,t,o,s,n){return this._wt.scrollViewport(e,t,o,s,n)}scrollViewportHorizontally(e,t,o){return this._wt.scrollViewportHorizontally(e,t,o)}scrollViewportVertically(e,t,o){return this._wt.scrollViewportVertically(e,t,o)}createElements(){const{rootElement:e,rootDocument:t}=this.hot,o=e.getAttribute("style");o&&e.setAttribute("data-originalstyle",o),(0,i.addClass)(e,"handsontable"),p(E,this,t.createElement("TABLE")),(0,i.addClass)(f(E,this),"htCore"),this.hot.getSettings().tableClassName&&(0,i.addClass)(f(E,this),this.hot.getSettings().tableClassName),this.settings.ariaTags&&((0,i.setAttribute)(f(E,this),[(0,u.A11Y_PRESENTATION)()]),(0,i.setAttribute)(e,[(0,u.A11Y_TREEGRID)(),(0,u.A11Y_ROWCOUNT)(-1),(0,u.A11Y_COLCOUNT)(this.hot.countCols()),(0,u.A11Y_MULTISELECTABLE)()])),this.THEAD=t.createElement("THEAD"),f(E,this).appendChild(this.THEAD),this.TBODY=t.createElement("TBODY"),f(E,this).appendChild(this.TBODY),this.hot.table=f(E,this),this.hot.container.insertBefore(f(E,this),this.hot.container.firstChild)}registerEvents(){const{rootElement:e,rootDocument:t,selection:o,rootWindow:s}=this.hot,n=t.documentElement;this.eventManager.addEventListener(e,"mousedown",(e=>{p(v,this,!0),this.isTextSelectionAllowed(e.target)||((0,i.clearTextSelection)(s),e.preventDefault(),s.focus())})),this.eventManager.addEventListener(e,"mouseup",(()=>{p(v,this,!1)})),this.eventManager.addEventListener(e,"mousemove",(e=>{f(v,this)&&!this.isTextSelectionAllowed(e.target)&&(this.settings.fragmentSelection&&(0,i.clearTextSelection)(s),e.preventDefault())})),this.eventManager.addEventListener(n,"keyup",(e=>{o.isInProgress()&&!e.shiftKey&&o.finish()})),this.eventManager.addEventListener(n,"mouseup",(s=>{o.isInProgress()&&(0,l.isLeftClick)(s)&&o.finish(),p(y,this,!1);const n=(0,i.isOutsideInput)(t.activeElement);(0,i.isInput)(t.activeElement)&&!n||!n&&(o.isSelected()||o.isSelectedByAnyHeader()||e.contains(s.target)||(0,l.isRightClick)(s))||this.hot.unlisten()})),this.eventManager.addEventListener(n,"contextmenu",(e=>{o.isInProgress()&&(0,l.isRightClick)(e)&&(o.finish(),p(y,this,!1))})),this.eventManager.addEventListener(n,"touchend",(()=>{o.isInProgress()&&o.finish(),p(y,this,!1)})),this.eventManager.addEventListener(n,"mousedown",(o=>{const s=o.target,r=o.x||o.clientX,l=o.y||o.clientY;let a=o.target;if(f(y,this)||!e||!this.hot.view)return;const{holder:h}=this._wt.wtTable;if(a===h){const e=(0,i.getScrollbarWidth)(t);if(t.elementFromPoint(r+e,l)!==h||t.elementFromPoint(r,l+e)!==h)return}else for(;a!==n;){if(null===a){if(o.isTargetWebComponent)break;return}if(a===e)return;a=a.parentNode}("function"==typeof this.settings.outsideClickDeselects?this.settings.outsideClickDeselects(s):this.settings.outsideClickDeselects)?this.hot.deselectCell():this.hot.destroyEditor(!1,!1)}));let r=(0,i.getParentWindow)(s);for(;null!==r;)this.eventManager.addEventListener(r.document.documentElement,"click",(()=>{this.hot.unlisten()})),r=(0,i.getParentWindow)(r);this.eventManager.addEventListener(f(E,this),"selectstart",(e=>{this.settings.fragmentSelection||(0,i.isInput)(e.target)||e.preventDefault()}))}translateFromRenderableToVisualCoords(e){let{row:t,col:o}=e;return this.hot._createCellCoords(...this.translateFromRenderableToVisualIndex(t,o))}translateFromRenderableToVisualIndex(e,t){let o=e>=0?this.hot.rowIndexMapper.getVisualFromRenderableIndex(e):e,s=t>=0?this.hot.columnIndexMapper.getVisualFromRenderableIndex(t):t;return null===o&&(o=e),null===s&&(s=t),[o,s]}countRenderableIndexes(e,t){const o=Math.min(e.getNotTrimmedIndexesLength(),t),s=e.getNearestNotHiddenIndex(o-1,-1);return null===s?0:e.getRenderableFromVisualIndex(s)+1}countRenderableColumns(){return this.countRenderableIndexes(this.hot.columnIndexMapper,this.settings.maxCols)}countRenderableRows(){return this.countRenderableIndexes(this.hot.rowIndexMapper,this.settings.maxRows)}countNotHiddenRowIndexes(e,t){return this.countNotHiddenIndexes(e,t,this.hot.rowIndexMapper,this.countRenderableRows())}countNotHiddenColumnIndexes(e,t){return this.countNotHiddenIndexes(e,t,this.hot.columnIndexMapper,this.countRenderableColumns())}countNotHiddenIndexes(e,t,o,s){if(isNaN(e)||e<0)return 0;const n=o.getNearestNotHiddenIndex(e,t),i=o.getRenderableFromVisualIndex(n);if(!Number.isInteger(i))return 0;let r=0;return t<0?r=i+1:t>0&&(r=s-i),r}countNotHiddenFixedColumnsStart(){const e=this.hot.countCols(),t=Math.min(parseInt(this.settings.fixedColumnsStart,10),e)-1;return this.countNotHiddenColumnIndexes(t,-1)}countNotHiddenFixedRowsTop(){const e=this.hot.countRows(),t=Math.min(parseInt(this.settings.fixedRowsTop,10),e)-1;return this.countNotHiddenRowIndexes(t,-1)}countNotHiddenFixedRowsBottom(){const e=this.hot.countRows(),t=Math.max(e-parseInt(this.settings.fixedRowsBottom,10),0);return this.countNotHiddenRowIndexes(t,1)}countRenderableColumnsInRange(e,t){let o=0;for(let s=e;s<=t;s++)null!==this.hot.columnIndexMapper.getRenderableFromVisualIndex(s)&&(o+=1);return o}countRenderableRowsInRange(e,t){let o=0;for(let s=e;s<=t;s++)null!==this.hot.rowIndexMapper.getRenderableFromVisualIndex(s)&&(o+=1);return o}isMainTableNotFullyCoveredByOverlays(){const e=this.countNotHiddenFixedRowsTop()+this.countNotHiddenFixedRowsBottom(),t=this.countNotHiddenFixedColumnsStart();return this.hot.countRenderedRows()>e&&this.hot.countRenderedCols()>t}initializeWalkontable(){const e={ariaTags:this.settings.ariaTags,rtlMode:this.hot.isRtl(),externalRowCalculator:this.hot.getPlugin("autoRowSize")&&this.hot.getPlugin("autoRowSize").isEnabled(),table:f(E,this),isDataViewInstance:()=>(0,c.isRootInstance)(this.hot),preventOverflow:()=>this.settings.preventOverflow,preventWheel:()=>this.settings.preventWheel,stretchH:()=>this.settings.stretchH,data:(e,t)=>this.hot.getDataAtCell(...this.translateFromRenderableToVisualIndex(e,t)),totalRows:()=>this.countRenderableRows(),totalColumns:()=>this.countRenderableColumns(),fixedColumnsStart:()=>this.countNotHiddenFixedColumnsStart(),fixedRowsTop:()=>this.countNotHiddenFixedRowsTop(),fixedRowsBottom:()=>this.countNotHiddenFixedRowsBottom(),shouldRenderInlineStartOverlay:()=>this.settings.fixedColumnsStart>0||e.rowHeaders().length>0,shouldRenderTopOverlay:()=>this.settings.fixedRowsTop>0||e.columnHeaders().length>0,shouldRenderBottomOverlay:()=>this.settings.fixedRowsBottom>0,minSpareRows:()=>this.settings.minSpareRows,renderAllRows:this.settings.renderAllRows,renderAllColumns:this.settings.renderAllColumns,rowHeaders:()=>{const e=[];return this.hot.hasRowHeaders()&&e.push(((e,t)=>{const o=e>=0?this.hot.rowIndexMapper.getVisualFromRenderableIndex(e):e;this.appendRowHeader(o,t)})),this.hot.runHooks("afterGetRowHeaderRenderers",e),p(C,this,e.length),this.hot.getSettings().ariaTags&&m(b,this,_).call(this)===this.hot.countCols()&&m(b,this,T).call(this,f(C,this)),e},columnHeaders:()=>{const e=[];return this.hot.hasColHeaders()&&e.push(((e,t)=>{const o=e>=0?this.hot.columnIndexMapper.getVisualFromRenderableIndex(e):e;this.appendColHeader(o,t)})),this.hot.runHooks("afterGetColumnHeaderRenderers",e),p(w,this,e.length),e},columnWidth:e=>{const t=this.hot.columnIndexMapper.getVisualFromRenderableIndex(e);return this.hot.getColWidth(null===t?e:t)},rowHeight:e=>{const t=this.hot.rowIndexMapper.getVisualFromRenderableIndex(e);return this.hot.getRowHeight(null===t?e:t)},rowHeightByOverlayName:(e,t)=>{const o=this.hot.rowIndexMapper.getVisualFromRenderableIndex(e),s=null===o?e:o;return this.hot.runHooks("modifyRowHeightByOverlayName",this.hot.getRowHeight(s),s,t)},cellRenderer:(e,t,o)=>{const[s,n]=this.translateFromRenderableToVisualIndex(e,t),i=this.hot.runHooks("modifyGetCellCoords",s,n);let r=s,l=n;Array.isArray(i)&&([r,l]=i);const a=this.hot.getCellMeta(r,l),h=this.hot.colToProp(l);let c=this.hot.getDataAtRowProp(r,h);this.hot.hasHook("beforeValueRender")&&(c=this.hot.runHooks("beforeValueRender",c,a)),this.hot.runHooks("beforeRenderer",o,s,n,h,c,a),this.hot.getCellRenderer(a)(this.hot,o,s,n,h,c,a),this.hot.runHooks("afterRenderer",o,s,n,h,c,a)},selections:this.hot.selection.highlight,hideBorderOnMouseDownOver:()=>this.settings.fragmentSelection,onWindowResize:()=>{this.hot&&!this.hot.isDestroyed&&this.hot.refreshDimensions()},onContainerElementResize:()=>{this.hot&&!this.hot.isDestroyed&&(0,i.isVisible)(this.hot.rootElement)&&this.hot.refreshDimensions()},onCellMouseDown:(e,t,o,s)=>{const n=this.translateFromRenderableToVisualCoords(t),i={row:!1,column:!1,cell:!1};this.hot.listen(),this.activeWt=s,p(y,this,!0),this.hot.runHooks("beforeOnCellMouseDown",e,n,o,i),(0,l.isImmediatePropagationStopped)(e)||((0,h.handleMouseEvent)(e,{coords:n,selection:this.hot.selection,controller:i,cellCoordsFactory:(e,t)=>this.hot._createCellCoords(e,t)}),this.hot.runHooks("afterOnCellMouseDown",e,n,o),this.activeWt=this._wt)},onCellContextMenu:(e,t,o,s)=>{const n=this.translateFromRenderableToVisualCoords(t);this.activeWt=s,p(y,this,!1),this.hot.selection.isInProgress()&&this.hot.selection.finish(),this.hot.runHooks("beforeOnCellContextMenu",e,n,o),(0,l.isImmediatePropagationStopped)(e)||(this.hot.runHooks("afterOnCellContextMenu",e,n,o),this.activeWt=this._wt)},onCellMouseOut:(e,t,o,s)=>{const n=this.translateFromRenderableToVisualCoords(t);this.activeWt=s,this.hot.runHooks("beforeOnCellMouseOut",e,n,o),(0,l.isImmediatePropagationStopped)(e)||(this.hot.runHooks("afterOnCellMouseOut",e,n,o),this.activeWt=this._wt)},onCellMouseOver:(e,t,o,s)=>{const n=this.translateFromRenderableToVisualCoords(t),i={row:!1,column:!1,cell:!1};this.activeWt=s,this.hot.runHooks("beforeOnCellMouseOver",e,n,o,i),(0,l.isImmediatePropagationStopped)(e)||(f(y,this)&&(0,h.handleMouseEvent)(e,{coords:n,selection:this.hot.selection,controller:i,cellCoordsFactory:(e,t)=>this.hot._createCellCoords(e,t)}),this.hot.runHooks("afterOnCellMouseOver",e,n,o),this.activeWt=this._wt)},onCellMouseUp:(e,t,o,s)=>{const n=this.translateFromRenderableToVisualCoords(t);this.activeWt=s,this.hot.runHooks("beforeOnCellMouseUp",e,n,o),(0,l.isImmediatePropagationStopped)(e)||this.hot.isDestroyed||(this.hot.runHooks("afterOnCellMouseUp",e,n,o),this.activeWt=this._wt)},onCellCornerMouseDown:e=>{e.preventDefault(),this.hot.runHooks("afterOnCellCornerMouseDown",e)},onCellCornerDblClick:e=>{e.preventDefault(),this.hot.runHooks("afterOnCellCornerDblClick",e)},beforeDraw:(e,t)=>this.beforeRender(e,t),onDraw:e=>this.afterRender(e),onBeforeViewportScrollVertically:e=>{const t=this.hot.rowIndexMapper,o=e<0;let s=e;return o||(s=t.getVisualFromRenderableIndex(e),null!==s)?(s=this.hot.runHooks("beforeViewportScrollVertically",s),this.hot.runHooks("beforeViewportScroll"),o?s:t.getRenderableFromVisualIndex(s)):e},onBeforeViewportScrollHorizontally:e=>{const t=this.hot.columnIndexMapper,o=e<0;let s=e;return o||(s=t.getVisualFromRenderableIndex(e),null!==s)?(s=this.hot.runHooks("beforeViewportScrollHorizontally",s),this.hot.runHooks("beforeViewportScroll"),o?s:t.getRenderableFromVisualIndex(s)):e},onScrollVertically:()=>{this.hot.runHooks("afterScrollVertically"),this.hot.runHooks("afterScroll")},onScrollHorizontally:()=>{this.hot.runHooks("afterScrollHorizontally"),this.hot.runHooks("afterScroll")},onBeforeRemoveCellClassNames:()=>this.hot.runHooks("beforeRemoveCellClassNames"),onBeforeHighlightingRowHeader:(e,t,o)=>{const s=this.hot.rowIndexMapper,n=e<0;let i=e;n||(i=s.getVisualFromRenderableIndex(e));const r=this.hot.runHooks("beforeHighlightingRowHeader",i,t,o);return n?r:s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(r,1))},onBeforeHighlightingColumnHeader:(e,t,o)=>{const s=this.hot.columnIndexMapper,n=e<0;let i=e;n||(i=s.getVisualFromRenderableIndex(e));const r=this.hot.runHooks("beforeHighlightingColumnHeader",i,t,o);return n?r:s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(r,1))},onAfterDrawSelection:(e,t,o)=>{let s;const[n,i]=this.translateFromRenderableToVisualIndex(e,t),r=this.hot.selection.getSelectedRange();if(r.size()>0){const e=r.peekByIndex(null!=o?o:0);s=[e.from.row,e.from.col,e.to.row,e.to.col]}return this.hot.runHooks("afterDrawSelection",n,i,s,o)},onBeforeDrawBorders:(e,t)=>{const[o,s,n,i]=e,r=[this.hot.rowIndexMapper.getVisualFromRenderableIndex(o),this.hot.columnIndexMapper.getVisualFromRenderableIndex(s),this.hot.rowIndexMapper.getVisualFromRenderableIndex(n),this.hot.columnIndexMapper.getVisualFromRenderableIndex(i)];return this.hot.runHooks("beforeDrawBorders",r,t)},onBeforeTouchScroll:()=>this.hot.runHooks("beforeTouchScroll"),onAfterMomentumScroll:()=>this.hot.runHooks("afterMomentumScroll"),onBeforeStretchingColumnWidth:(e,t)=>{const o=this.hot.columnIndexMapper.getVisualFromRenderableIndex(t);return this.hot.runHooks("beforeStretchingColumnWidth",e,o)},onModifyRowHeaderWidth:e=>this.hot.runHooks("modifyRowHeaderWidth",e),onModifyGetCellCoords:(e,t,o)=>{const s=this.hot.rowIndexMapper,n=this.hot.columnIndexMapper,i=t>=0?n.getVisualFromRenderableIndex(t):t,r=e>=0?s.getVisualFromRenderableIndex(e):e,l=this.hot.runHooks("modifyGetCellCoords",r,i,o);if(Array.isArray(l)){const[e,t,o,i]=l;return[e>=0?s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(e,1)):e,t>=0?n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(t,1)):t,o>=0?s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(o,-1)):o,i>=0?n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(i,-1)):i]}},viewportRowCalculatorOverride:e=>{let t=this.settings.viewportRowRenderingOffset;if("auto"===t&&this.settings.fixedRowsTop&&(t=10),t>0||"auto"===t){const o=this.countRenderableRows(),s=e.startRow,n=e.endRow;if("number"==typeof t)e.startRow=Math.max(s-t,0),e.endRow=Math.min(n+t,o-1);else if("auto"===t){const t=Math.ceil(n/o*12);e.startRow=Math.max(s-t,0),e.endRow=Math.min(n+t,o-1)}}this.hot.runHooks("afterViewportRowCalculatorOverride",e)},viewportColumnCalculatorOverride:e=>{let t=this.settings.viewportColumnRenderingOffset;if("auto"===t&&this.settings.fixedColumnsStart&&(t=10),t>0||"auto"===t){const o=this.countRenderableColumns(),s=e.startColumn,n=e.endColumn;if("number"==typeof t&&(e.startColumn=Math.max(s-t,0),e.endColumn=Math.min(n+t,o-1)),"auto"===t){const t=Math.ceil(n/o*6);e.startColumn=Math.max(s-t,0),e.endColumn=Math.min(n+t,o-1)}}this.hot.runHooks("afterViewportColumnCalculatorOverride",e)},rowHeaderWidth:()=>this.settings.rowHeaderWidth,columnHeaderHeight:()=>{const e=this.hot.runHooks("modifyColumnHeaderHeight");return this.settings.columnHeaderHeight||e}};this.hot.runHooks("beforeInitWalkontable",e),this._wt=new a.default(e),this.activeWt=this._wt;const t=this._wt.wtTable.spreader,{width:o,height:s}=this.hot.rootElement.getBoundingClientRect();this.setLastSize(o,s),this.eventManager.addEventListener(t,"mousedown",(e=>{e.target===t&&3===e.which&&e.stopPropagation()})),this.eventManager.addEventListener(t,"contextmenu",(e=>{e.target===t&&3===e.which&&e.stopPropagation()})),this.eventManager.addEventListener(this.hot.rootDocument.documentElement,"click",(()=>{this.settings.observeDOMVisibility&&this._wt.drawInterrupted&&(this.hot.forceFullRender=!0,this.render())}))}isTextSelectionAllowed(e){if((0,i.isInput)(e))return!0;const t=(0,i.isChildOf)(e,this._wt.wtTable.spreader);return!(!0!==this.settings.fragmentSelection||!t)||(!("cell"!==this.settings.fragmentSelection||!this.isSelectedOnlyCell()||!t)||!(this.settings.fragmentSelection||!this.isCellEdited()||!this.isSelectedOnlyCell()))}isMouseDown(){return f(y,this)}isSelectedOnlyCell(){var e,t;return null!==(e=null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.isSingleCell())&&void 0!==e&&e}isCellEdited(){const e=this.hot.getActiveEditor();return e&&e.isOpened()}beforeRender(e,t){e&&this.hot.runHooks("beforeViewRender",this.hot.forceFullRender,t)}afterRender(e){e&&this.hot.runHooks("afterViewRender",this.hot.forceFullRender)}appendRowHeader(e,t){if(t.firstChild){const o=t.firstChild;if(!(0,i.hasClass)(o,"relative"))return(0,i.empty)(t),void this.appendRowHeader(e,t);this.updateCellHeader(o.querySelector(".rowHeader"),e,this.hot.getRowHeader)}else{const{rootDocument:o,getRowHeader:s}=this.hot,n=o.createElement("div"),i=o.createElement("span");n.className="relative",i.className="rowHeader",this.updateCellHeader(i,e,s),n.appendChild(i),t.appendChild(n)}this.hot.runHooks("afterGetRowHeader",e,t)}appendColHeader(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hot.getColHeader,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const n=()=>{const t=e>=0?this.hot.getColumnMeta(e).headerClassName:null;return t?t.split(" "):[]};if(t.firstChild){const r=t.firstChild;(0,i.hasClass)(r,"relative")?(this.updateCellHeader(r.querySelector(".colHeader"),e,o,s),r.className="",(0,i.addClass)(r,["relative",...n()])):((0,i.empty)(t),this.appendColHeader(e,t,o,s))}else{const{rootDocument:r}=this.hot,l=r.createElement("div"),a=r.createElement("span"),h=n();l.classList.add("relative",...h),a.className="colHeader",this.settings.ariaTags&&((0,i.setAttribute)(l,...(0,u.A11Y_PRESENTATION)()),(0,i.setAttribute)(a,...(0,u.A11Y_PRESENTATION)())),this.updateCellHeader(a,e,o,s),l.appendChild(a),t.appendChild(l)}this.hot.runHooks("afterGetColHeader",e,t,s)}updateCellHeader(e,t,o){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=t;const r=this._wt.wtOverlays.getParentOverlay(e)||this._wt;e.parentNode&&((0,i.hasClass)(e,"colHeader")?n=r.wtTable.columnFilter.sourceToRendered(t):(0,i.hasClass)(e,"rowHeader")&&(n=r.wtTable.rowFilter.sourceToRendered(t))),n>-1?(0,i.fastInnerHTML)(e,o(t,s)):((0,i.fastInnerText)(e,String.fromCharCode(160)),(0,i.addClass)(e,"cornerHeader"))}maximumVisibleElementWidth(e){const t=this._wt.wtViewport.getWorkspaceWidth()-e;return t>0?t:0}maximumVisibleElementHeight(e){const t=this._wt.wtViewport.getWorkspaceHeight()-e;return t>0?t:0}setLastSize(e,t){p(S,this,e),p(R,this,t)}getLastSize(){return{width:f(S,this),height:f(R,this)}}getFirstRenderedVisibleRow(){return this._wt.wtViewport.rowsRenderCalculator?this.hot.rowIndexMapper.getNearestNotHiddenIndex(this._wt.wtTable.getFirstRenderedRow(),1):null}getLastRenderedVisibleRow(){return this._wt.wtViewport.rowsRenderCalculator?this.hot.rowIndexMapper.getNearestNotHiddenIndex(this._wt.wtTable.getLastRenderedRow(),-1):null}getFirstRenderedVisibleColumn(){return this._wt.wtViewport.columnsRenderCalculator?this.hot.columnIndexMapper.getNearestNotHiddenIndex(this._wt.wtTable.getFirstRenderedColumn(),1):null}getLastRenderedVisibleColumn(){return this._wt.wtViewport.columnsRenderCalculator?this.hot.columnIndexMapper.getNearestNotHiddenIndex(this._wt.wtTable.getLastRenderedColumn(),-1):null}getFirstFullyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getFirstVisibleRow())}getLastFullyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getLastVisibleRow())}getFirstFullyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getFirstVisibleColumn())}getLastFullyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getLastVisibleColumn())}getFirstPartiallyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getFirstPartiallyVisibleRow())}getLastPartiallyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getLastPartiallyVisibleRow())}getFirstPartiallyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getFirstPartiallyVisibleColumn())}getLastPartiallyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getLastPartiallyVisibleColumn())}getColumnHeadersCount(){return f(w,this)}getRowHeadersCount(){return f(C,this)}getViewportWidth(){return this._wt.wtViewport.getViewportWidth()}getWorkspaceWidth(){return this._wt.wtViewport.getWorkspaceWidth()}getViewportHeight(){return this._wt.wtViewport.getViewportHeight()}getWorkspaceHeight(){return this._wt.wtViewport.getWorkspaceHeight()}getElementOverlayName(e){var t;return(null!==(t=this._wt.wtOverlays.getParentOverlay(e))&&void 0!==t?t:this._wt).wtTable.name}getOverlayByName(e){return this._wt.getOverlayByName(e)}isVisible(){return this._wt.wtTable.isVisible()}hasVerticalScroll(){return this._wt.wtViewport.hasVerticalScroll()}hasHorizontalScroll(){return this._wt.wtViewport.hasHorizontalScroll()}getTableWidth(){return this._wt.wtTable.getWidth()}getTableHeight(){return this._wt.wtTable.getHeight()}destroy(){this._wt.destroy(),this.eventManager.destroy()}}},90941:(e,t,o)=>{"use strict";t.__esModule=!0,o(67834),o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var s=o(59954),n=o(72399);function i(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function r(e,t){return e.get(a(e,t))}function l(e,t,o){return e.set(a(e,t),o),o}function a(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var h=new WeakMap,c=new WeakMap,u=new WeakMap,d=new WeakMap,g=new WeakMap;t.ChangesObservable=class{constructor(){let{initialIndexValue:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,h,new Set),i(this,c,[]),i(this,u,[]),i(this,d,!1),i(this,g,!1),l(g,this,null!=e&&e)}createObserver(){const e=new s.ChangesObserver;return r(h,this).add(e),e.addLocalHook("unsubscribe",(()=>{r(h,this).delete(e)})),e._writeInitialChanges((0,n.arrayDiff)(r(c,this),r(u,this))),e}emit(e){let t=r(u,this);r(d,this)&&r(c,this).length===e.length||(0===e.length?e=new Array(t.length).fill(r(g,this)):l(c,this,new Array(e.length).fill(r(g,this))),r(d,this)||(l(d,this,!0),t=r(c,this)));const o=(0,n.arrayDiff)(t,e);r(h,this).forEach((e=>e._write(o))),l(u,this,e)}}},59954:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834);var n=o(13911),i=s(o(63870));function r(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}function l(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}var a=new WeakMap;class h{constructor(){r(this,a,[])}subscribe(e){var t,o;return this.addLocalHook("change",e),this._write((o=this,(t=a).get(l(t,o)))),this}unsubscribe(){return this.runLocalHooks("unsubscribe"),this.clearLocalHooks(),this}_write(e){return e.length>0&&this.runLocalHooks("change",e),this}_writeInitialChanges(e){var t,o,s;o=this,s=e,(t=a).set(l(t,o),s)}}t.ChangesObserver=h,(0,n.mixin)(h,i.default)},72399:(e,t,o)=>{"use strict";t.__esModule=!0,t.arrayDiff=function(e,t){const o=[];let s=0,n=0;for(;s<e.length&&n<t.length;s++,n++)e[s]!==t[n]&&o.push({op:"replace",index:n,oldValue:e[s],newValue:t[n]});for(;s<t.length;s++)o.push({op:"insert",index:s,oldValue:void 0,newValue:t[s]});for(;n<e.length;n++)o.push({op:"remove",index:n,oldValue:e[n],newValue:void 0});return o},o(15724)},93969:(e,t,o)=>{"use strict";t.__esModule=!0;var s={IndexMapper:!0,getRegisteredMapsCounter:!0,getIncreasedIndexes:!0,getDecreasedIndexes:!0,alterUtilsFactory:!0},n=o(70212);t.IndexMapper=n.IndexMapper;var i=o(12391);t.getRegisteredMapsCounter=i.getRegisteredMapsCounter;var r=o(73431);t.getIncreasedIndexes=r.getIncreasedIndexes,t.getDecreasedIndexes=r.getDecreasedIndexes,t.alterUtilsFactory=r.alterUtilsFactory;var l=o(45637);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===l[e]||(t[e]=l[e]))}))},70212:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707));o(67834),o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var i=o(9175),r=o(45637),l=o(29457),a=s(o(63870)),h=o(13911),c=o(38893),u=o(90941);new Set;class d{constructor(){(0,n.default)(this,"indexesSequence",new r.IndexesSequence),(0,n.default)(this,"trimmingMapsCollection",new l.AggregatedCollection((e=>e.some((e=>!0===e))),!1)),(0,n.default)(this,"hidingMapsCollection",new l.AggregatedCollection((e=>e.some((e=>!0===e))),!1)),(0,n.default)(this,"variousMapsCollection",new l.MapCollection),(0,n.default)(this,"hidingChangesObservable",new u.ChangesObservable({initialIndexValue:!1})),(0,n.default)(this,"notTrimmedIndexesCache",[]),(0,n.default)(this,"notHiddenIndexesCache",[]),(0,n.default)(this,"isBatched",!1),(0,n.default)(this,"indexesSequenceChanged",!1),(0,n.default)(this,"indexesChangeSource",void 0),(0,n.default)(this,"trimmedIndexesChanged",!1),(0,n.default)(this,"hiddenIndexesChanged",!1),(0,n.default)(this,"renderablePhysicalIndexesCache",[]),(0,n.default)(this,"fromPhysicalToVisualIndexesCache",new Map),(0,n.default)(this,"fromVisualToRenderableIndexesCache",new Map),this.indexesSequence.addLocalHook("change",(()=>{this.indexesSequenceChanged=!0,this.updateCache(),this.runLocalHooks("indexesSequenceChange",this.indexesChangeSource),this.runLocalHooks("change",this.indexesSequence,null)})),this.trimmingMapsCollection.addLocalHook("change",(e=>{this.trimmedIndexesChanged=!0,this.updateCache(),this.runLocalHooks("change",e,this.trimmingMapsCollection)})),this.hidingMapsCollection.addLocalHook("change",(e=>{this.hiddenIndexesChanged=!0,this.updateCache(),this.runLocalHooks("change",e,this.hidingMapsCollection)})),this.variousMapsCollection.addLocalHook("change",(e=>{this.runLocalHooks("change",e,this.variousMapsCollection)}))}suspendOperations(){this.isBatched=!0}resumeOperations(){this.isBatched=!1,this.updateCache()}createChangesObserver(e){if("hiding"!==e)throw new Error(`Unsupported index map type "${e}".`);return this.hidingChangesObservable.createObserver()}createAndRegisterIndexMap(e,t,o){return this.registerMap(e,(0,r.createIndexMap)(t,o))}registerMap(e,t){if(this.trimmingMapsCollection.get(e)||this.hidingMapsCollection.get(e)||this.variousMapsCollection.get(e))throw Error(`Map with name "${e}" has been already registered.`);t instanceof r.TrimmingMap?this.trimmingMapsCollection.register(e,t):t instanceof r.HidingMap?this.hidingMapsCollection.register(e,t):this.variousMapsCollection.register(e,t);const o=this.getNumberOfIndexes();return o>0&&t.init(o),t}unregisterMap(e){this.trimmingMapsCollection.unregister(e),this.hidingMapsCollection.unregister(e),this.variousMapsCollection.unregister(e)}unregisterAll(){this.trimmingMapsCollection.unregisterAll(),this.hidingMapsCollection.unregisterAll(),this.variousMapsCollection.unregisterAll()}getPhysicalFromVisualIndex(e){const t=this.notTrimmedIndexesCache[e];return(0,c.isDefined)(t)?t:null}getPhysicalFromRenderableIndex(e){const t=this.renderablePhysicalIndexesCache[e];return(0,c.isDefined)(t)?t:null}getVisualFromPhysicalIndex(e){const t=this.fromPhysicalToVisualIndexesCache.get(e);return(0,c.isDefined)(t)?t:null}getVisualFromRenderableIndex(e){return this.getVisualFromPhysicalIndex(this.getPhysicalFromRenderableIndex(e))}getRenderableFromVisualIndex(e){const t=this.fromVisualToRenderableIndexesCache.get(e);return(0,c.isDefined)(t)?t:null}getNearestNotHiddenIndex(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null===this.getPhysicalFromVisualIndex(e))return null;if(this.fromVisualToRenderableIndexesCache.has(e))return e;const s=Array.from(this.fromVisualToRenderableIndexesCache.keys());let n=-1;return n=t>0?s.findIndex((t=>t>e)):s.reverse().findIndex((t=>t<e)),-1===n?o?this.getNearestNotHiddenIndex(e,-t,!1):null:s[n]}initToLength(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getNumberOfIndexes();this.notTrimmedIndexesCache=[...new Array(e).keys()],this.notHiddenIndexesCache=[...new Array(e).keys()],this.suspendOperations(),this.indexesChangeSource="init",this.indexesSequence.init(e),this.indexesChangeSource=void 0,this.trimmingMapsCollection.initEvery(e),this.resumeOperations(),this.suspendOperations(),this.hidingMapsCollection.initEvery(e),this.variousMapsCollection.initEvery(e),this.resumeOperations(),this.runLocalHooks("init")}fitToLength(e){const t=this.getNumberOfIndexes();if(e<t){const t=[...Array(this.getNumberOfIndexes()-e).keys()].map((t=>t+e));this.removeIndexes(t)}else this.insertIndexes(t,e-t)}getIndexesSequence(){return this.indexesSequence.getValues()}setIndexesSequence(e){void 0===this.indexesChangeSource&&(this.indexesChangeSource="update"),this.indexesSequence.setValues(e),"update"===this.indexesChangeSource&&(this.indexesChangeSource=void 0)}getNotTrimmedIndexes(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.notTrimmedIndexesCache;return this.getIndexesSequence().filter((e=>!1===this.isTrimmed(e)))}getNotTrimmedIndexesLength(){return this.getNotTrimmedIndexes().length}getNotHiddenIndexes(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.notHiddenIndexesCache;return this.getIndexesSequence().filter((e=>!1===this.isHidden(e)))}getNotHiddenIndexesLength(){return this.getNotHiddenIndexes().length}getRenderableIndexes(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.renderablePhysicalIndexesCache;return this.getNotTrimmedIndexes().filter((e=>!1===this.isHidden(e)))}getRenderableIndexesLength(){return this.getRenderableIndexes().length}getNumberOfIndexes(){return this.getIndexesSequence().length}moveIndexes(e,t){"number"==typeof e&&(e=[e]);const o=(0,i.arrayMap)(e,(e=>this.getPhysicalFromVisualIndex(e))),s=this.getNotTrimmedIndexesLength(),n=e.length,l=(0,r.getListWithRemovedItems)(this.getIndexesSequence(),o),a=l.filter((e=>!1===this.isTrimmed(e)));let h=l.indexOf(a[a.length-1])+1;if(t+n<s){const e=a[t];h=l.indexOf(e)}this.indexesChangeSource="move",this.setIndexesSequence((0,r.getListWithInsertedItems)(l,h,o)),this.indexesChangeSource=void 0}isTrimmed(e){return this.trimmingMapsCollection.getMergedValueAtIndex(e)}isHidden(e){return this.hidingMapsCollection.getMergedValueAtIndex(e)}insertIndexes(e,t){const o=this.getNotTrimmedIndexes()[e],s=(0,c.isDefined)(o)?o:this.getNumberOfIndexes(),n=this.getIndexesSequence().includes(o)?this.getIndexesSequence().indexOf(o):this.getNumberOfIndexes(),r=(0,i.arrayMap)(new Array(t).fill(s),((e,t)=>e+t));this.suspendOperations(),this.indexesChangeSource="insert",this.indexesSequence.insert(n,r),this.indexesChangeSource=void 0,this.trimmingMapsCollection.insertToEvery(n,r),this.hidingMapsCollection.insertToEvery(n,r),this.variousMapsCollection.insertToEvery(n,r),this.resumeOperations()}removeIndexes(e){this.suspendOperations(),this.indexesChangeSource="remove",this.indexesSequence.remove(e),this.indexesChangeSource=void 0,this.trimmingMapsCollection.removeFromEvery(e),this.hidingMapsCollection.removeFromEvery(e),this.variousMapsCollection.removeFromEvery(e),this.resumeOperations()}updateCache(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.indexesSequenceChanged||this.trimmedIndexesChanged||this.hiddenIndexesChanged;(!0===e||!1===this.isBatched&&!0===t)&&(this.trimmingMapsCollection.updateCache(),this.hidingMapsCollection.updateCache(),this.notTrimmedIndexesCache=this.getNotTrimmedIndexes(!1),this.notHiddenIndexesCache=this.getNotHiddenIndexes(!1),this.renderablePhysicalIndexesCache=this.getRenderableIndexes(!1),this.cacheFromPhysicalToVisualIndexes(),this.cacheFromVisualToRenderableIndexes(),this.hiddenIndexesChanged&&this.hidingChangesObservable.emit(this.hidingMapsCollection.getMergedValues()),this.runLocalHooks("cacheUpdated",{indexesSequenceChanged:this.indexesSequenceChanged,trimmedIndexesChanged:this.trimmedIndexesChanged,hiddenIndexesChanged:this.hiddenIndexesChanged}),this.indexesSequenceChanged=!1,this.trimmedIndexesChanged=!1,this.hiddenIndexesChanged=!1)}cacheFromPhysicalToVisualIndexes(){const e=this.getNotTrimmedIndexesLength();this.fromPhysicalToVisualIndexesCache.clear();for(let t=0;t<e;t+=1){const e=this.getPhysicalFromVisualIndex(t);this.fromPhysicalToVisualIndexesCache.set(e,t)}}cacheFromVisualToRenderableIndexes(){const e=this.getRenderableIndexesLength();this.fromVisualToRenderableIndexesCache.clear();for(let t=0;t<e;t+=1){const e=this.getPhysicalFromRenderableIndex(t),o=this.getVisualFromPhysicalIndex(e);this.fromVisualToRenderableIndexesCache.set(o,t)}}}t.IndexMapper=d,(0,h.mixin)(d,a.default)},34508:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(15724);var n=s(o(85707)),i=o(12391),r=o(9175),l=o(38893);class a extends i.MapCollection{constructor(e,t){super(),(0,n.default)(this,"mergedValuesCache",[]),(0,n.default)(this,"aggregationFunction",void 0),(0,n.default)(this,"fallbackValue",void 0),this.aggregationFunction=e,this.fallbackValue=t}getMergedValues(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.mergedValuesCache;if(0===this.getLength())return[];const e=(0,r.arrayMap)(this.get(),(e=>e.getValues())),t=[],o=(0,l.isDefined)(e[0])&&e[0].length||0;for(let s=0;s<o;s+=1){const o=[];for(let t=0;t<this.getLength();t+=1)o.push(e[t][s]);t.push(o)}return(0,r.arrayMap)(t,this.aggregationFunction)}getMergedValueAtIndex(e,t){const o=this.getMergedValues(t)[e];return(0,l.isDefined)(o)?o:this.fallbackValue}updateCache(){this.mergedValuesCache=this.getMergedValues(!1)}}t.AggregatedCollection=a},29457:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(34508);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||(t[e]=s[e]))}));var n=o(12391);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||(t[e]=n[e]))}))},12391:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.getRegisteredMapsCounter=function(){return a};var n=s(o(85707)),i=o(38893),r=o(13911),l=s(o(63870));let a=0;class h{constructor(){(0,n.default)(this,"collection",new Map)}register(e,t){!1===this.collection.has(e)&&(this.collection.set(e,t),t.addLocalHook("change",(()=>this.runLocalHooks("change",t))),a+=1)}unregister(e){const t=this.collection.get(e);(0,i.isDefined)(t)&&(t.destroy(),this.collection.delete(e),this.runLocalHooks("change",t),a-=1)}unregisterAll(){this.collection.forEach(((e,t)=>this.unregister(t))),this.collection.clear()}get(e){return(0,i.isUndefined)(e)?Array.from(this.collection.values()):this.collection.get(e)}getLength(){return this.collection.size}removeFromEvery(e){this.collection.forEach((t=>{t.remove(e)}))}insertToEvery(e,t){this.collection.forEach((o=>{o.insert(e,t)}))}initEvery(e){this.collection.forEach((t=>{t.init(e)}))}}t.MapCollection=h,(0,r.mixin)(h,l.default)},69246:(e,t,o)=>{"use strict";t.__esModule=!0,o(15724);var s=o(47078),n=o(9175);class i extends s.PhysicalIndexToValueMap{constructor(){super(arguments.length>0&&void 0!==arguments[0]&&arguments[0])}getHiddenIndexes(){return(0,n.arrayReduce)(this.getValues(),((e,t,o)=>(t&&e.push(o),e)),[])}}t.HidingMap=i},45637:(e,t,o)=>{"use strict";t.__esModule=!0;var s={createIndexMap:!0,HidingMap:!0,IndexMap:!0,LinkedPhysicalIndexToValueMap:!0,PhysicalIndexToValueMap:!0,TrimmingMap:!0};t.createIndexMap=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!u.has(e))throw new Error(`The provided map type ("${e}") does not exist.`);return new(u.get(e))(t)},o(67834);var n=o(69246);t.HidingMap=n.HidingMap;var i=o(77955);t.IndexMap=i.IndexMap;var r=o(22809);t.LinkedPhysicalIndexToValueMap=r.LinkedPhysicalIndexToValueMap;var l=o(47078);t.PhysicalIndexToValueMap=l.PhysicalIndexToValueMap;var a=o(50684);t.TrimmingMap=a.TrimmingMap;var h=o(40976);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===h[e]||(t[e]=h[e]))}));var c=o(57354);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===c[e]||(t[e]=c[e]))}));const u=new Map([["hiding",n.HidingMap],["index",i.IndexMap],["linkedPhysicalIndexToValue",r.LinkedPhysicalIndexToValueMap],["physicalIndexToValue",l.PhysicalIndexToValueMap],["trimming",a.TrimmingMap]])},77955:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(15724);var n=s(o(85707)),i=o(87485),r=o(13911),l=o(78832),a=s(o(63870));class h{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,n.default)(this,"indexedValues",[]),(0,n.default)(this,"initValueOrFn",void 0),this.initValueOrFn=e}getValues(){return this.indexedValues}getValueAtIndex(e){const t=this.indexedValues;if(e<t.length)return t[e]}setValues(e){this.indexedValues=e.slice(),this.runLocalHooks("change")}setValueAtIndex(e,t){return e<this.indexedValues.length&&(this.indexedValues[e]=t,this.runLocalHooks("change"),!0)}clear(){this.setDefaultValues()}getLength(){return this.getValues().length}setDefaultValues(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.indexedValues.length;this.indexedValues.length=0,(0,l.isFunction)(this.initValueOrFn)?(0,i.rangeEach)(e-1,(e=>this.indexedValues.push(this.initValueOrFn(e)))):(0,i.rangeEach)(e-1,(()=>this.indexedValues.push(this.initValueOrFn))),this.runLocalHooks("change")}init(e){return this.setDefaultValues(e),this.runLocalHooks("init"),this}insert(){this.runLocalHooks("change")}remove(){this.runLocalHooks("change")}destroy(){this.clearLocalHooks(),this.indexedValues=null,this.initValueOrFn=null}}t.IndexMap=h,(0,r.mixin)(h,a.default)},40976:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(77955),n=o(57354),i=o(73431);class r extends s.IndexMap{constructor(){super((e=>e))}insert(e,t){const o=(0,i.getIncreasedIndexes)(this.indexedValues,t);this.indexedValues=(0,n.getListWithInsertedItems)(o,e,t),super.insert(e,t)}remove(e){const t=(0,n.getListWithRemovedItems)(this.indexedValues,e);this.indexedValues=(0,i.getDecreasedIndexes)(t,e),super.remove(e)}}t.IndexesSequence=r},22809:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707)),i=o(77955),r=o(72564),l=o(57354),a=o(20801),h=o(78832);class c extends i.IndexMap{constructor(){super(...arguments),(0,n.default)(this,"orderOfIndexes",[])}getValues(){return this.orderOfIndexes.map((e=>this.indexedValues[e]))}setValues(e){this.orderOfIndexes=[...Array(e.length).keys()],super.setValues(e)}setValueAtIndex(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.orderOfIndexes.length;return e<this.indexedValues.length&&(this.indexedValues[e]=t,!1===this.orderOfIndexes.includes(e)&&this.orderOfIndexes.splice(o,0,e),this.runLocalHooks("change"),!0)}clearValue(e){this.orderOfIndexes=(0,l.getListWithRemovedItems)(this.orderOfIndexes,[e]),(0,h.isFunction)(this.initValueOrFn)?super.setValueAtIndex(e,this.initValueOrFn(e)):super.setValueAtIndex(e,this.initValueOrFn)}getLength(){return this.orderOfIndexes.length}setDefaultValues(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.indexedValues.length;this.orderOfIndexes.length=0,super.setDefaultValues(e)}insert(e,t){this.indexedValues=(0,r.getListWithInsertedItems)(this.indexedValues,e,t,this.initValueOrFn),this.orderOfIndexes=(0,a.getIncreasedIndexes)(this.orderOfIndexes,t),super.insert(e,t)}remove(e){this.indexedValues=(0,r.getListWithRemovedItems)(this.indexedValues,e),this.orderOfIndexes=(0,l.getListWithRemovedItems)(this.orderOfIndexes,e),this.orderOfIndexes=(0,a.getDecreasedIndexes)(this.orderOfIndexes,e),super.remove(e)}getEntries(){return this.orderOfIndexes.map((e=>[e,this.getValueAtIndex(e)]))}}t.LinkedPhysicalIndexToValueMap=c},47078:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(77955),n=o(72564);class i extends s.IndexMap{insert(e,t){this.indexedValues=(0,n.getListWithInsertedItems)(this.indexedValues,e,t,this.initValueOrFn),super.insert(e,t)}remove(e){this.indexedValues=(0,n.getListWithRemovedItems)(this.indexedValues,e),super.remove(e)}}t.PhysicalIndexToValueMap=i},50684:(e,t,o)=>{"use strict";t.__esModule=!0,o(15724);var s=o(47078),n=o(9175);class i extends s.PhysicalIndexToValueMap{constructor(){super(arguments.length>0&&void 0!==arguments[0]&&arguments[0])}getTrimmedIndexes(){return(0,n.arrayReduce)(this.getValues(),((e,t,o)=>(t&&e.push(o),e)),[])}}t.TrimmingMap=i},20801:(e,t,o)=>{"use strict";t.__esModule=!0,t.getDecreasedIndexes=function(e,t){return(0,s.arrayMap)(e,(e=>e-t.filter((t=>t<e)).length))},t.getIncreasedIndexes=function(e,t){const o=t[0],n=t.length;return(0,s.arrayMap)(e,(e=>e>=o?e+n:e))};var s=o(9175)},73431:(e,t,o)=>{"use strict";t.__esModule=!0,o(67834);var s=o(20801);t.getDecreasedIndexes=s.getDecreasedIndexes,t.getIncreasedIndexes=s.getIncreasedIndexes;var n=o(57354),i=o(72564);const r=new Map([["indexesSequence",{getListWithInsertedItems:n.getListWithInsertedItems,getListWithRemovedItems:n.getListWithRemovedItems}],["physicallyIndexed",{getListWithInsertedItems:i.getListWithInsertedItems,getListWithRemovedItems:i.getListWithRemovedItems}]]);t.alterUtilsFactory=e=>{if(!1===r.has(e))throw new Error(`Alter strategy with ID '${e}' does not exist.`);return r.get(e)}},57354:(e,t,o)=>{"use strict";t.__esModule=!0,t.getListWithInsertedItems=function(e,t,o){return[...e.slice(0,t),...o,...e.slice(t)]},t.getListWithRemovedItems=function(e,t){return(0,s.arrayFilter)(e,(e=>!1===t.includes(e)))};var s=o(9175)},72564:(e,t,o)=>{"use strict";t.__esModule=!0,t.getListWithInsertedItems=function(e,t,o,n){const i=o.length?o[0]:void 0;return[...e.slice(0,i),...o.map(((e,t)=>(0,s.isFunction)(n)?n(e,t):n)),...void 0===i?[]:e.slice(i)]},t.getListWithRemovedItems=function(e,t){return(0,n.arrayFilter)(e,((e,o)=>!1===t.includes(o)))};var s=o(78832),n=o(9175)},11139:(e,t)=>{"use strict";function o(e,t,o){e.addEventListener(t,o,!1)}function s(e,t,o){e.removeEventListener(t,o,!1)}function n(e){return e.ownerDocument.defaultView.getComputedStyle(e)}t.__esModule=!0,t.createInputElementResizer=function(e){const t={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300},i=e.body,r=e.createTextNode(""),l=e.createElement("span");let a;function h(){r.textContent=a.value,l.style.position="absolute",l.style.fontSize=n(a).fontSize,l.style.fontFamily=n(a).fontFamily,l.style.whiteSpace="pre",i.appendChild(l);const e=l.clientWidth+2;i.removeChild(l);const o=a.style;o.height=`${t.minHeight}px`,t.minWidth>e?o.width=`${t.minWidth}px`:e>t.maxWidth?o.width=`${t.maxWidth}px`:o.width=`${e}px`;const s=a.scrollHeight?a.scrollHeight-1:0;t.minHeight>s?o.height=`${t.minHeight}px`:t.maxHeight<s?(o.height=`${t.maxHeight}px`,o.overflowY="visible"):o.height=`${s}px`}function c(){e.defaultView.setTimeout(h,0)}return{init:function(e,s){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];a=e,function(e){if(e&&e.minHeight)if("inherit"===e.minHeight)t.minHeight=a.clientHeight;else{const o=parseInt(e.minHeight,10);isNaN(o)||(t.minHeight=o)}if(e&&e.maxHeight)if("inherit"===e.maxHeight)t.maxHeight=a.clientHeight;else{const o=parseInt(e.maxHeight,10);isNaN(o)||(t.maxHeight=o)}if(e&&e.minWidth)if("inherit"===e.minWidth)t.minWidth=a.clientWidth;else{const o=parseInt(e.minWidth,10);isNaN(o)||(t.minWidth=o)}if(e&&e.maxWidth)if("inherit"===e.maxWidth)t.maxWidth=a.clientWidth;else{const o=parseInt(e.maxWidth,10);isNaN(o)||(t.maxWidth=o)}l.firstChild||(l.className="autoResize",l.style.display="inline-block",l.appendChild(r))}(s),"TEXTAREA"===a.nodeName&&(a.style.resize="none",a.style.height=`${t.minHeight}px`,a.style.minWidth=`${t.minWidth}px`,a.style.maxWidth=`${t.maxWidth}px`,a.style.overflowY="hidden"),n&&(o(a,"input",h),o(a,"keydown",c)),h()},resize:h,unObserve(){s(a,"input",h),s(a,"keydown",c)}}}},76892:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0;var n=s(o(85707));class i{constructor(e){(0,n.default)(this,"data",void 0),(0,n.default)(this,"next",null),(0,n.default)(this,"prev",null),this.data=e}}t.NodeStructure=i;t.default=class{constructor(){(0,n.default)(this,"first",null),(0,n.default)(this,"last",null)}push(e){const t=new i(e);if(null===this.first)this.first=t,this.last=t;else{const e=this.last;this.last=t,t.prev=e,e.next=t}return t}unshift(e){const t=new i(e);if(null===this.first)this.first=t,this.last=t;else{const e=this.first;this.first=t,t.next=e,e.prev=t}}inorder(e){let t=this.first;for(;t;){const o=e(t);if(t===this.last||!0===o)break;t=t.next}}remove(e){if(null===this.first)return!1;let t,o,s=this.first;for(;s;){if(s.data===e)return t=s.next,o=s.prev,t&&(t.prev=o),o&&(o.next=t),s===this.first&&(this.first=t),s===this.last&&(this.last=o),!0;s=s.next}return!1}hasCycle(){let e=this.first,t=this.first;for(;;){if(null===e)return!1;if(e=e.next,null===e)return!1;if(e=e.next,t=t.next,e===t)return!0}}pop(){if(null===this.last)return null;const e=this.last;return this.last=this.last.prev,e}shift(){if(null===this.first)return null;const e=this.first;return this.first=this.first.next,e}recursiveReverse(){if(!this.first)return;!function e(t,o){o&&(e(o,o.next),o.next=t)}(this.first,this.first.next),this.first.next=null;const e=this.first;this.first=this.last,this.last=e}reverse(){if(!this.first||!this.first.next)return;let e,t=this.first.next,o=this.first;for(;t;)e=t.next,t.next=o,o.prev=t,o=t,t=e;this.first.next=null,this.last.prev=null,e=this.first,this.first=o,this.last=e}}},38867:(e,t,o)=>{"use strict";t.__esModule=!0,t.createPriorityMap=function(){let{errorPriorityExists:e,errorPriorityNaN:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const o=new Map;return e=(0,n.isFunction)(e)?e:a,t=(0,n.isFunction)(t)?t:h,{addItem:function(n,i){if(!(0,s.isNumeric)(n))throw new Error(t(n));if(o.has(n))throw new Error(e(n));o.set(n,i)},getItems:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;const[t,s]=l.get(e)||l.get(i);return[...o].sort(((e,o)=>e[0]<o[0]?t:s)).map((e=>e[1]))}}},o(67834);var s=o(87485),n=o(78832);const i=t.ASC="asc",r=t.DESC="desc",l=new Map([[i,[-1,1]],[r,[1,-1]]]),a=e=>`The priority '${e}' is already declared in a map.`,h=e=>`The priority '${e}' is not a number.`},16957:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.depthFirstPreOrder=r;var n=s(o(85707));o(67834),o(15724);const i=t.TRAVERSAL_DF_PRE="DF-pre-order";function r(e,t){let o=e.call(t,this);for(let s=0;s<this.childs.length;s++){if(!1===o)return!1;o=r.call(this.childs[s],e,t)}return o}const l=t.TRAVERSAL_DF_POST="DF-post-order";const a=t.TRAVERSAL_BF="BF";const h=a,c=new Map([[i,r],[l,function e(t,o){for(let s=0;s<this.childs.length;s++){if(!1===e.call(this.childs[s],t,o))return!1}return t.call(o,this)}],[a,function(e,t){const o=[this];!function s(){if(0===o.length)return;const n=o.shift();o.push(...n.childs),!1!==e.call(t,n)&&s()}()}]]);class u{constructor(e){(0,n.default)(this,"data",{}),(0,n.default)(this,"parent",null),(0,n.default)(this,"childs",[]),this.data=e}addChild(e){e.parent=this,this.childs.push(e)}cloneTree(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this;const t=new u({...e.data});for(let o=0;o<e.childs.length;o++)t.addChild(this.cloneTree(e.childs[o]));return t}replaceTreeWith(e){this.data={...e.data},this.childs=[];for(let t=0;t<e.childs.length;t++)this.addChild(e.childs[t])}walkDown(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:h;if(!c.has(t))throw new Error(`Traversal strategy "${t}" does not exist`);c.get(t).call(this,e,this)}walkUp(e){const t=this,o=s=>{!1!==e.call(t,s)&&null!==s.parent&&o(s.parent)};o(this)}}t.default=u},84134:(e,t,o)=>{"use strict";t.__esModule=!0,t.createUniqueMap=function(){let{errorIdExists:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=new Map;function o(){return[...t]}function i(e){return t.has(e)}return e=(0,s.isFunction)(e)?e:n,{addItem:function(o,s){if(i(o))throw new Error(e(o));t.set(o,s)},clear:function(){t.clear()},getId:function(e){const[t]=o().find((t=>{let[o,s]=t;return e===s&&o}))||[null];return t},getItem:function(e){return t.get(e)},getItems:o,hasItem:i,removeItem:function(e){return t.delete(e)}}},o(67834);var s=o(78832);const n=e=>`The id '${e}' is already declared in a map.`},64788:(e,t,o)=>{"use strict";t.__esModule=!0,t.createUniqueSet=function(){let{errorItemExists:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=new Set;return e=(0,s.isFunction)(e)?e:n,{addItem:function(o){if(t.has(o))throw new Error(e(o));t.add(o)},clear:function(){t.clear()},getItems:function(){return[...t]}}},o(67834),o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var s=o(78832);const n=e=>`'${e}' value is already declared in a unique set.`},1817:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(9893),r=o(9175);t.default=class{constructor(e){(0,n.default)(this,"hot",null),(0,n.default)(this,"container",null),(0,n.default)(this,"injected",!1),(0,n.default)(this,"rows",[]),(0,n.default)(this,"columns",[]),(0,n.default)(this,"samples",null),(0,n.default)(this,"settings",{useHeaders:!0}),this.hot=e}addRow(e,t){if(this.columns.length)throw new Error("Doesn't support multi-dimensional table");this.rows.length||(this.container=this.createContainer(this.hot.rootElement.className));const o={row:e};this.rows.push(o),this.samples=t,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol(e)),this.table.tr.appendChild(this.createRow(e)),this.container.container.appendChild(this.table.fragment),o.table=this.table.table}addColumnHeadersRow(e){const t=this.hot.getColHeader(0);if(null!=t){const t={row:-1};this.rows.push(t),this.container=this.createContainer(this.hot.rootElement.className),this.samples=e,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol()),this.appendColumnHeadersRow(),this.container.container.appendChild(this.table.fragment),t.table=this.table.table}}addColumn(e,t){if(this.rows.length)throw new Error("Doesn't support multi-dimensional table");this.columns.length||(this.container=this.createContainer(this.hot.rootElement.className));const o={col:e};this.columns.push(o),this.samples=t,this.table=this.createTable(this.hot.table.className),this.getSetting("useHeaders")&&null!==this.hot.getColHeader(e)&&this.hot.view.appendColHeader(e,this.table.th),this.table.tBody.appendChild(this.createCol(e)),this.container.container.appendChild(this.table.fragment),o.table=this.table.table}getHeights(e){this.injected||this.injectTable(),(0,r.arrayEach)(this.rows,(t=>{const{height:o}=t.table.getBoundingClientRect();e(t.row,Math.ceil(o)-1)}))}getWidths(e){this.injected||this.injectTable(),(0,r.arrayEach)(this.columns,(t=>{const{width:o}=t.table.getBoundingClientRect();e(t.col,Math.ceil(o))}))}setSettings(e){this.settings=e}setSetting(e,t){this.settings||(this.settings={}),this.settings[e]=t}getSettings(){return this.settings}getSetting(e){return this.settings?this.settings[e]:null}createColGroupsCol(e){const t=this.hot.rootDocument.createDocumentFragment();return this.hot.hasRowHeaders()&&t.appendChild(this.createColElement(-1,-1)),this.samples.forEach((o=>{(0,r.arrayEach)(o.strings,(o=>{t.appendChild(this.createColElement(o.col,e))}))})),t}createRow(e){const{rootDocument:t}=this.hot,o=t.createDocumentFragment(),s=t.createElement("th");return this.hot.hasRowHeaders()&&(this.hot.view.appendRowHeader(e,s),o.appendChild(s)),this.samples.forEach((s=>{(0,r.arrayEach)(s.strings,(s=>{const n=s.col,i=this.hot.getCellMeta(e,n),r=this.hot.getCellRenderer(i),l=t.createElement("td");l.setAttribute("ghost-table",1),r(this.hot,l,e,n,this.hot.colToProp(n),s.value,i),o.appendChild(l)}))})),o}appendColumnHeadersRow(){const{rootDocument:e}=this.hot,t=e.createDocumentFragment(),o=[];if(this.hot.hasRowHeaders()){const s=e.createElement("th");o.push([-1,s]),t.appendChild(s)}this.samples.forEach((s=>{(0,r.arrayEach)(s.strings,(s=>{const n=s.col,i=e.createElement("th");o.push([n,i]),t.appendChild(i)}))})),this.table.tHead.appendChild(t),(0,r.arrayEach)(o,(e=>{const[t,o]=e;this.hot.view.appendColHeader(t,o)}))}createCol(e){const{rootDocument:t}=this.hot,o=t.createDocumentFragment();return this.samples.forEach((s=>{(0,r.arrayEach)(s.strings,(s=>{const n=s.row,i=this.hot.getCellMeta(n,e),r=this.hot.getCellRenderer(i),l=t.createElement("td"),a=t.createElement("tr");l.setAttribute("ghost-table",1),r(this.hot,l,n,e,this.hot.colToProp(e),s.value,i),a.appendChild(l),o.appendChild(a)}))})),o}clean(){this.rows.length=0,this.rows[-1]=void 0,this.columns.length=0,this.samples&&this.samples.clear(),this.samples=null,this.removeTable()}injectTable(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.injected||((e||this.hot.rootElement).appendChild(this.container.fragment),this.injected=!0)}removeTable(){this.injected&&this.container.container.parentNode&&(this.container.container.parentNode.removeChild(this.container.container),this.container=null,this.injected=!1)}createColElement(e,t){const o=this.hot.rootDocument.createElement("col");let s=0;t>=0&&e>=0&&(s=this.hot.getCellMeta(t,e).colspan);let n=this.hot.getColWidth(e);if(s>1)for(let t=e+1;t<e+s;t++)n+=this.hot.getColWidth(t);return o.style.width=`${n}px`,o}createTable(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{rootDocument:t}=this.hot,o=t.createDocumentFragment(),s=t.createElement("table"),n=t.createElement("thead"),r=t.createElement("tbody"),l=t.createElement("colgroup"),a=t.createElement("tr"),h=t.createElement("th");return this.isVertical()&&s.appendChild(l),this.isHorizontal()&&(a.appendChild(h),n.appendChild(a),s.style.tableLayout="auto",s.style.width="auto"),s.appendChild(n),this.isVertical()&&r.appendChild(a),s.appendChild(r),(0,i.addClass)(s,e),o.appendChild(s),{fragment:o,table:s,tHead:n,tBody:r,colGroup:l,tr:a,th:h}}createContainer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{rootDocument:t}=this.hot,o=t.createDocumentFragment(),s=t.createElement("div"),n=`htGhostTable htAutoSize ${e.trim()}`;return(0,i.addClass)(s,n),o.appendChild(s),{fragment:o,container:s}}isVertical(){return!(!this.rows.length||this.columns.length)}isHorizontal(){return!(!this.columns.length||this.rows.length)}}},57625:(e,t,o)=>{"use strict";t.__esModule=!0,t.createPaginator=function(e){let{initialPage:t=-1,size:o=()=>0,onItemSelect:n=()=>{},onClear:i=()=>{}}=e;const r=new Set;let l=(0,s.clamp)(t,-1,h()-1);function a(e,t){const o=h()-1;if(e<0&&(e=o),e>o&&(e=0),r.has(e))return-1;r.add(e);return!1===n(e,!1)&&(e=a(1===t?++e:--e,t)),e}function h(){return Math.max(o(),0)}return{setCurrentPage:function(e){e>-1&&e<h()&&!1!==n(e,!0)&&(l=e)},getCurrentPage:function(){return l},toFirstItem:function(){h()>0&&(r.clear(),l=a(0,1))},toLastItem:function(){h()>0&&(r.clear(),l=a(h()-1,-1))},toNextItem:function(){h()>0&&(r.clear(),l=a(++l,1))},toPreviousItem:function(){h()>0&&(r.clear(),l=a(--l,-1))},getSize:h,clear:function(){r.clear(),l=t,i()}}},o(36241),o(85151),o(49122),o(75183),o(40520),o(32495),o(72371);var s=o(87485)},74737:(e,t,o)=>{"use strict";t.__esModule=!0,t._dataToHTML=function(e){const t=e.length,o=["<table>"];for(let n=0;n<t;n+=1){const i=e[n],r=i.length,l=[];0===n&&o.push("<tbody>");for(let e=0;e<r;e+=1){const t=i[e],o=(0,s.isEmpty)(t)?"":t.toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20{2,}/gi,(e=>`<span style="mso-spacerun: yes">${"&nbsp;".repeat(e.length-1)} </span>`)).replace(/\t/gi,"&#9;");l.push(`<td>${o}</td>`)}o.push("<tr>",...l,"</tr>"),n+1===t&&o.push("</tbody>")}return o.push("</table>"),o.join("")},t.htmlToGridSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;const o={},s=t.createDocumentFragment(),r=t.createElement("div");s.appendChild(r);let l=e;if("string"==typeof l){const e=l.replace(/<td\b[^>]*?>([\s\S]*?)<\/\s*td>/g,(e=>{const t=e.match(/<td\b[^>]*?>/g)[0];return`${t}${e.substring(t.length,e.lastIndexOf("<")).trim().replaceAll(/\n\s+/g," ").replaceAll(/<p.*?>/g,"\n").replace("\n","").replaceAll(/<\/(.*)>\s+$/gm,"</$1>").replace(/(<(?!br)([^>]+)>)/gi,"").replaceAll(/^&nbsp;$/gm,"")}</td>`}));r.insertAdjacentHTML("afterbegin",`${e}`),l=r.querySelector("table")}if(!l||!function(e){return"TABLE"===(e&&e.nodeName||"")}(l))return;const a=r.querySelector('meta[name$="enerator"]'),h=null!==l.querySelector("tbody th"),c=l.querySelector("tr"),u=c?Array.from(c.cells).reduce(((e,t)=>e+t.colSpan),0)-(h?1:0):0,d=l.tFoot&&Array.from(l.tFoot.rows)||[],g=[];let f=!1,p=0,m=0;if(l.tHead){const e=Array.from(l.tHead.rows).filter((e=>{const t=null!==e.querySelector("td");return t&&g.push(e),!t}));p=e.length,f=p>0,p>1?o.nestedHeaders=Array.from(e).reduce(((e,t)=>{const o=Array.from(t.cells).reduce(((e,t,o)=>{if(h&&0===o)return e;const{colSpan:s,innerHTML:n}=t,i=s>1?{label:n,colspan:s}:n;return e.push(i),e}),[]);return e.push(o),e}),[]):f&&(o.colHeaders=Array.from(e[0].children).reduce(((e,t,o)=>(h&&0===o||e.push(t.innerHTML),e)),[]))}g.length&&(o.fixedRowsTop=g.length);d.length&&(o.fixedRowsBottom=d.length);const w=[...g,...Array.from(l.tBodies).reduce(((e,t)=>(e.push(...Array.from(t.rows)),e)),[]),...d];m=w.length;const C=new Array(m);for(let e=0;e<m;e++)C[e]=new Array(u);const v=[],y=[];for(let e=0;e<m;e++){const t=w[e],o=Array.from(t.cells),s=o.length;for(let t=0;t<s;t++){const s=o[t],{nodeName:r,innerHTML:l,rowSpan:h,colSpan:c}=s,u=C[e].findIndex((e=>void 0===e));if("TD"===r){if(h>1||c>1){for(let t=e;t<e+h;t++)if(t<m)for(let e=u;e<u+c;e++)C[t][e]=null;const t=s.getAttribute("style");t&&t.includes("mso-ignore:colspan")||v.push({col:u,row:e,rowspan:h,colspan:c})}let t="";t=a&&/excel/gi.test(a.content)?l.replace(/[\r\n][\x20]{0,2}/g," ").replace(/<br(\s*|\/)>[\r\n]?[\x20]{0,3}/gim,"\r\n"):l.replace(/<br(\s*|\/)>[\r\n]?/gim,"\r\n"),C[e][u]=t.replace(i,(e=>n[e]))}else y.push(l)}}v.length&&(o.mergeCells=v);y.length&&(o.rowHeaders=y);C.length&&(o.data=C);return o},t.instanceToHTML=function(e){const t=e.hasColHeaders(),o=e.hasRowHeaders(),n=[t?-1:0,o?-1:0,e.countRows()-1,e.countCols()-1],i=e.getData(...n),r=i.length,l=r>0?i[0].length:0,a=["<table>","</table>"],h=t?["<thead>","</thead>"]:[],c=["<tbody>","</tbody>"],u=o?1:0,d=t?1:0;for(let n=0;n<r;n+=1){const r=t&&0===n,a=[];for(let t=0;t<l;t+=1){const l=!r&&o&&0===t;let h="";if(r)h=`<th>${e.getColHeader(t-u)}</th>`;else if(l)h=`<th>${e.getRowHeader(n-d)}</th>`;else{const o=i[n][t],{hidden:r,rowspan:l,colspan:a}=e.getCellMeta(n-d,t-u);if(!r){const e=[];if(l&&e.push(`rowspan="${l}"`),a&&e.push(`colspan="${a}"`),(0,s.isEmpty)(o))h=`<td ${e.join(" ")}></td>`;else{const t=o.toString().replace("<","&lt;").replace(">","&gt;").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20/gi,"&nbsp;").replace(/\t/gi,"&#9;");h=`<td ${e.join(" ")}>${t}</td>`}}}a.push(h)}const g=["<tr>",...a,"</tr>"].join("");r?h.splice(1,0,g):c.splice(-1,0,g)}return a.splice(1,0,h.join(""),c.join("")),a.join("")},o(15724),o(64552);var s=o(38893);const n={"&nbsp;":" ","&amp;":"&","&lt;":"<","&gt;":">"},i=new RegExp(Object.keys(n).map((e=>`(${e})`)).join("|"),"gi")},11015:(e,t)=>{"use strict";t.__esModule=!0,t.hasValidParameter=function(e){return e===s},t.isRootInstance=function(e){return o.has(e)},t.registerAsRootInstance=function(e){o.set(e,!0)};const o=t.holder=new WeakMap,s=t.rootInstanceSymbol=Symbol("rootInstance")},95532:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,o(67834),o(15724);var n=s(o(85707)),i=o(13911),r=o(87485),l=o(38893);class a{static get SAMPLE_COUNT(){return 3}constructor(e){(0,n.default)(this,"samples",null),(0,n.default)(this,"dataFactory",null),(0,n.default)(this,"customSampleCount",null),(0,n.default)(this,"allowDuplicates",!1),this.dataFactory=e}getSampleCount(){return this.customSampleCount?this.customSampleCount:a.SAMPLE_COUNT}setSampleCount(e){this.customSampleCount=e}setAllowDuplicates(e){this.allowDuplicates=e}generateRowSamples(e,t){return this.generateSamples("row",t,e)}generateColumnSamples(e,t){return this.generateSamples("col",t,e)}generateSamples(e,t,o){const s=new Map,{from:n,to:i}="number"==typeof o?{from:o,to:o}:o;return(0,r.rangeEach)(n,i,(o=>{const n=this.generateSample(e,t,o);s.set(o,n)})),s}generateSample(e,t,o){if("row"!==e&&"col"!==e)throw new Error("Unsupported sample type");const s=new Map,n="row"===e?"col":"row",a=[];return(0,r.rangeEach)(t.from,t.to,(t=>{const r="row"===e?this.dataFactory(o,t):this.dataFactory(t,o);if(!1===r)return;const{value:h,bundleSeed:c}=r,u="string"==typeof c&&c.length>0;let d;d=u?c:(0,i.isObject)(h)?`${Object.keys(h).length}`:Array.isArray(h)?`${h.length}`:`${(0,l.stringify)(h).length}`,s.has(d)||s.set(d,{needed:this.getSampleCount(),strings:[]});const g=s.get(d);if(g.needed){(!(a.indexOf(h)>-1)||this.allowDuplicates||u)&&(g.strings.push({value:h,[n]:t}),a.push(h),g.needed-=1)}})),s}}t.default=a},71263:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"common";o.has(e)||o.set(e,new Map);const t=o.get(e);return{register:function(e,o){t.set(e,o)},getItem:function(e){return t.get(e)},hasItem:function(e){return t.has(e)},getNames:function(){return[...t.keys()]},getValues:function(){return[...t.values()]}}};const o=t.collection=new Map},37701:(e,t)=>{"use strict";t.__esModule=!0,t.autocompleteValidator=s;const o=t.VALIDATOR_TYPE="autocomplete";function s(e,t){let o=e;null==o&&(o=""),this.allowEmpty&&""===o?t(!0):this.strict&&this.source?"function"==typeof this.source?this.source(o,n(o,t)):n(o,t)(this.source):t(!0)}function n(e,t){const o=e;return function(e){let s=!1;for(let t=0,n=e.length;t<n;t++)if(o===e[t]){s=!0;break}t(s)}}s.VALIDATOR_TYPE=o},93307:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(37701);t.VALIDATOR_TYPE=s.VALIDATOR_TYPE,t.autocompleteValidator=s.autocompleteValidator},9085:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.correctFormat=c,t.dateValidator=h;var n=s(o(86798)),i=o(84558),r=o(59127),l=o(72484);const a=t.VALIDATOR_TYPE="date";function h(e,t){const o=(0,i.getEditorInstance)(r.EDITOR_TYPE,this.instance);let s=e,l=!0;null==s&&(s="");let a=(0,n.default)(s,this.dateFormat||o.defaultDateFormat,!0).isValid(),h=(0,n.default)(new Date(s)).isValid()||a;if(this.allowEmpty&&""===s&&(h=!0,a=!0),h||(l=!1),!h&&a&&(l=!0),h&&!a)if(!0===this.correctFormat){const e=c(s,this.dateFormat);this.instance.setDataAtCell(this.visualRow,this.visualCol,e,"dateValidator"),l=!0}else l=!1;t(l)}function c(e,t){const o=(0,n.default)((0,l.getNormalizedDate)(e)),s=(0,n.default)(e,t),i=e.search(/[A-z]/g)>-1;let r;return r=o.isValid()&&o.format("x")===s.format("x")||!s.isValid()||i?o:s,r.format(t)}h.VALIDATOR_TYPE=a},70323:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(9085);t.VALIDATOR_TYPE=s.VALIDATOR_TYPE,t.correctFormat=s.correctFormat,t.dateValidator=s.dateValidator},83741:(e,t,o)=>{"use strict";t.__esModule=!0,t.dropdownValidator=i;var s=o(37701);const n=t.VALIDATOR_TYPE="dropdown";function i(e,t){s.autocompleteValidator.apply(this,[e,t])}i.VALIDATOR_TYPE=n},7628:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(83741);t.VALIDATOR_TYPE=s.VALIDATOR_TYPE,t.dropdownValidator=s.dropdownValidator},85086:(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllValidators=function(){(0,a.registerValidator)(s.autocompleteValidator),(0,a.registerValidator)(i.dropdownValidator),(0,a.registerValidator)(n.dateValidator),(0,a.registerValidator)(r.numericValidator),(0,a.registerValidator)(l.timeValidator)};var s=o(93307);t.autocompleteValidator=s.autocompleteValidator,t.AUTOCOMPLETE_VALIDATOR=s.VALIDATOR_TYPE;var n=o(70323);t.dateValidator=n.dateValidator,t.DATE_VALIDATOR=n.VALIDATOR_TYPE;var i=o(7628);t.dropdownValidator=i.dropdownValidator,t.DROPDOWN_VALIDATOR=i.VALIDATOR_TYPE;var r=o(66640);t.numericValidator=r.numericValidator,t.NUMERIC_VALIDATOR=r.VALIDATOR_TYPE;var l=o(51284);t.timeValidator=l.timeValidator,t.TIME_VALIDATOR=l.VALIDATOR_TYPE;var a=o(51255);t.registerValidator=a.registerValidator,t.getRegisteredValidatorNames=a.getRegisteredValidatorNames,t.getRegisteredValidators=a.getRegisteredValidators,t.getValidator=a.getValidator,t.hasValidator=a.hasValidator},66640:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(1897);t.VALIDATOR_TYPE=s.VALIDATOR_TYPE,t.numericValidator=s.numericValidator},1897:(e,t,o)=>{"use strict";t.__esModule=!0,t.numericValidator=i;var s=o(87485);const n=t.VALIDATOR_TYPE="numeric";function i(e,t){let o=e;null==o&&(o=""),this.allowEmpty&&""===o?t(!0):t(""!==o&&(0,s.isNumeric)(e))}i.VALIDATOR_TYPE=n},51255:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.getValidator=function(e){if("function"==typeof e)return e;if(!l(e))throw Error(`No registered validator found under "${e}" name`);return r(e)},t.registerValidator=function(e,t){"string"!=typeof e&&(e=(t=e).VALIDATOR_TYPE);i(e,t)},o(67834);var n=s(o(71263));const{register:i,getItem:r,hasItem:l,getNames:a,getValues:h}=(0,n.default)("validators");t.getRegisteredValidators=h,t.getRegisteredValidatorNames=a,t.hasValidator=l},51284:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(38793);t.VALIDATOR_TYPE=s.VALIDATOR_TYPE,t.timeValidator=s.timeValidator},38793:(e,t,o)=>{"use strict";var s=o(96784);t.__esModule=!0,t.timeValidator=l;var n=s(o(86798));const i=["YYYY-MM-DDTHH:mm:ss.SSSZ","X","x"],r=t.VALIDATOR_TYPE="time";function l(e,t){const o=this.timeFormat||"h:mm:ss a";let s=!0,r=e;null===r&&(r=""),r=/^\d{3,}$/.test(r)?parseInt(r,10):r;const l=/^\d{1,2}$/.test(r);l&&(r+=":00");const a=(0,n.default)(r,i,!0).isValid()?(0,n.default)(r):(0,n.default)(r,o);let h=a.isValid(),c=(0,n.default)(r,o,!0).isValid()&&!l;if(this.allowEmpty&&""===r&&(h=!0,c=!0),h||(s=!1),!h&&c&&(s=!0),h&&!c)if(!0===this.correctFormat){const e=a.format(o);this.instance.setDataAtCell(this.visualRow,this.visualCol,e,"timeValidator"),s=!0}else s=!1;t(s)}l.VALIDATOR_TYPE=r},20512:(e,t,o)=>{"use strict";o.r(t)},6254:(e,t,o)=>{"use strict";o.r(t)},23844:(e,t,o)=>{"use strict";o.r(t)},38594:(e,t,o)=>{"use strict";o.r(t)},78607:(e,t,o)=>{"use strict";o.r(t)},64019:(e,t,o)=>{"use strict";o.r(t)},19501:(e,t,o)=>{"use strict";o.r(t)},21151:(e,t,o)=>{"use strict";o.r(t)},42172:(e,t,o)=>{"use strict";o.r(t)},98885:(e,t,o)=>{"use strict";o.r(t)},72039:(e,t,o)=>{"use strict";o.r(t)},93975:(e,t,o)=>{"use strict";o.r(t)},87572:(e,t,o)=>{"use strict";o.r(t)},54228:(e,t,o)=>{"use strict";o.r(t)},54008:(e,t,o)=>{"use strict";o.r(t)},19540:(e,t,o)=>{"use strict";o.r(t)},40248:(e,t,o)=>{"use strict";o.r(t)},34115:(e,t,o)=>{"use strict";o.r(t)},54100:(e,t,o)=>{"use strict";o.r(t)},98953:(e,t,o)=>{"use strict";o.r(t)},10275:(e,t,o)=>{"use strict";o.r(t)},19498:(e,t,o)=>{"use strict";o.r(t)},65166:t=>{"use strict";t.exports=e},75972:e=>{"use strict";e.exports=t},86798:e=>{"use strict";e.exports=o},20846:e=>{"use strict";e.exports=s},85707:(e,t,o)=>{var s=o(45498);e.exports=function(e,t,o){return(t=s(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e},e.exports.__esModule=!0,e.exports.default=e.exports},96784:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},11327:(e,t,o)=>{var s=o(10564).default;e.exports=function(e,t){if("object"!=s(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},45498:(e,t,o)=>{var s=o(10564).default,n=o(11327);e.exports=function(e){var t=n(e,"string");return"symbol"==s(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},10564:e=>{function t(o){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(o)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},68120:(e,t,o)=>{"use strict";var s=o(1483),n=o(18761),i=TypeError;e.exports=function(e){if(s(e))return e;throw new i(n(e)+" is not a function")}},63852:(e,t,o)=>{"use strict";var s=o(40735),n=String,i=TypeError;e.exports=function(e){if(s(e))return e;throw new i("Can't set "+n(e)+" as a prototype")}},14246:(e,t,o)=>{"use strict";var s=o(36880).has;e.exports=function(e){return s(e),e}},37095:(e,t,o)=>{"use strict";var s=o(70001),n=o(25290),i=o(25835).f,r=s("unscopables"),l=Array.prototype;void 0===l[r]&&i(l,r,{configurable:!0,value:n(null)}),e.exports=function(e){l[r][e]=!0}},2293:(e,t,o)=>{"use strict";var s=o(71704),n=String,i=TypeError;e.exports=function(e){if(s(e))return e;throw new i(n(e)+" is not an object")}},86651:(e,t,o)=>{"use strict";var s=o(35599),n=o(33392),i=o(66960),r=function(e){return function(t,o,r){var l=s(t),a=i(l);if(0===a)return!e&&-1;var h,c=n(r,a);if(e&&o!=o){for(;a>c;)if((h=l[c++])!=h)return!0}else for(;a>c;c++)if((e||c in l)&&l[c]===o)return e||c||0;return!e&&-1}};e.exports={includes:r(!0),indexOf:r(!1)}},39273:(e,t,o)=>{"use strict";var s=o(20382),n=o(14914),i=TypeError,r=Object.getOwnPropertyDescriptor,l=s&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=l?function(e,t){if(n(e)&&!r(e,"length").writable)throw new i("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},61698:(e,t,o)=>{"use strict";var s=o(14762);e.exports=s([].slice)},91278:(e,t,o)=>{"use strict";var s=o(14762),n=s({}.toString),i=s("".slice);e.exports=function(e){return i(n(e),8,-1)}},26145:(e,t,o)=>{"use strict";var s=o(34338),n=o(1483),i=o(91278),r=o(70001)("toStringTag"),l=Object,a="Arguments"===i(function(){return arguments}());e.exports=s?i:function(e){var t,o,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(o=function(e,t){try{return e[t]}catch(e){}}(t=l(e),r))?o:a?i(t):"Object"===(s=i(t))&&n(t.callee)?"Arguments":s}},16726:(e,t,o)=>{"use strict";var s=o(55755),n=o(89497),i=o(4961),r=o(25835);e.exports=function(e,t,o){for(var l=n(t),a=r.f,h=i.f,c=0;c<l.length;c++){var u=l[c];s(e,u)||o&&s(o,u)||a(e,u,h(t,u))}}},69037:(e,t,o)=>{"use strict";var s=o(20382),n=o(25835),i=o(57738);e.exports=s?function(e,t,o){return n.f(e,t,i(1,o))}:function(e,t,o){return e[t]=o,e}},57738:e=>{"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},30670:(e,t,o)=>{"use strict";var s=o(20382),n=o(25835),i=o(57738);e.exports=function(e,t,o){s?n.f(e,t,i(0,o)):e[t]=o}},77914:(e,t,o)=>{"use strict";var s=o(1483),n=o(25835),i=o(90169),r=o(82095);e.exports=function(e,t,o,l){l||(l={});var a=l.enumerable,h=void 0!==l.name?l.name:t;if(s(o)&&i(o,h,l),l.global)a?e[t]=o:r(t,o);else{try{l.unsafe?e[t]&&(a=!0):delete e[t]}catch(e){}a?e[t]=o:n.f(e,t,{value:o,enumerable:!1,configurable:!l.nonConfigurable,writable:!l.nonWritable})}return e}},82095:(e,t,o)=>{"use strict";var s=o(58389),n=Object.defineProperty;e.exports=function(e,t){try{n(s,e,{value:t,configurable:!0,writable:!0})}catch(o){s[e]=t}return t}},16060:(e,t,o)=>{"use strict";var s=o(18761),n=TypeError;e.exports=function(e,t){if(!delete e[t])throw new n("Cannot delete property "+s(t)+" of "+s(e))}},20382:(e,t,o)=>{"use strict";var s=o(28473);e.exports=!s((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},3145:(e,t,o)=>{"use strict";var s=o(58389),n=o(71704),i=s.document,r=n(i)&&n(i.createElement);e.exports=function(e){return r?i.createElement(e):{}}},31091:e=>{"use strict";var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},35413:e=>{"use strict";e.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},28417:(e,t,o)=>{"use strict";var s=o(89966);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(s)},4334:(e,t,o)=>{"use strict";var s=o(58389),n=o(91278);e.exports="process"===n(s.process)},89966:e=>{"use strict";e.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},76170:(e,t,o)=>{"use strict";var s,n,i=o(58389),r=o(89966),l=i.process,a=i.Deno,h=l&&l.versions||a&&a.version,c=h&&h.v8;c&&(n=(s=c.split("."))[0]>0&&s[0]<4?1:+(s[0]+s[1])),!n&&r&&(!(s=r.match(/Edge\/(\d+)/))||s[1]>=74)&&(s=r.match(/Chrome\/(\d+)/))&&(n=+s[1]),e.exports=n},44741:e=>{"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},58223:(e,t,o)=>{"use strict";var s=o(14762),n=Error,i=s("".replace),r=String(new n("zxcasd").stack),l=/\n\s*at [^:]*:[^\n]*/,a=l.test(r);e.exports=function(e,t){if(a&&"string"==typeof e&&!n.prepareStackTrace)for(;t--;)e=i(e,l,"");return e}},27473:(e,t,o)=>{"use strict";var s=o(69037),n=o(58223),i=o(58541),r=Error.captureStackTrace;e.exports=function(e,t,o,l){i&&(r?r(e,t):s(e,"stack",n(o,l)))}},58541:(e,t,o)=>{"use strict";var s=o(28473),n=o(57738);e.exports=!s((function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",n(1,7)),7!==e.stack)}))},28612:(e,t,o)=>{"use strict";var s=o(58389),n=o(4961).f,i=o(69037),r=o(77914),l=o(82095),a=o(16726),h=o(98730);e.exports=function(e,t){var o,c,u,d,g,f=e.target,p=e.global,m=e.stat;if(o=p?s:m?s[f]||l(f,{}):s[f]&&s[f].prototype)for(c in t){if(d=t[c],u=e.dontCallGetSet?(g=n(o,c))&&g.value:o[c],!h(p?c:f+(m?".":"#")+c,e.forced)&&void 0!==u){if(typeof d==typeof u)continue;a(d,u)}(e.sham||u&&u.sham)&&i(d,"sham",!0),r(o,c,d,e)}}},28473:e=>{"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},73067:(e,t,o)=>{"use strict";var s=o(274),n=Function.prototype,i=n.apply,r=n.call;e.exports="object"==typeof Reflect&&Reflect.apply||(s?r.bind(i):function(){return r.apply(i,arguments)})},32914:(e,t,o)=>{"use strict";var s=o(23786),n=o(68120),i=o(274),r=s(s.bind);e.exports=function(e,t){return n(e),void 0===t?e:i?r(e,t):function(){return e.apply(t,arguments)}}},274:(e,t,o)=>{"use strict";var s=o(28473);e.exports=!s((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},21807:(e,t,o)=>{"use strict";var s=o(274),n=Function.prototype.call;e.exports=s?n.bind(n):function(){return n.apply(n,arguments)}},42048:(e,t,o)=>{"use strict";var s=o(20382),n=o(55755),i=Function.prototype,r=s&&Object.getOwnPropertyDescriptor,l=n(i,"name"),a=l&&"something"===function(){}.name,h=l&&(!s||s&&r(i,"name").configurable);e.exports={EXISTS:l,PROPER:a,CONFIGURABLE:h}},680:(e,t,o)=>{"use strict";var s=o(14762),n=o(68120);e.exports=function(e,t,o){try{return s(n(Object.getOwnPropertyDescriptor(e,t)[o]))}catch(e){}}},23786:(e,t,o)=>{"use strict";var s=o(91278),n=o(14762);e.exports=function(e){if("Function"===s(e))return n(e)}},14762:(e,t,o)=>{"use strict";var s=o(274),n=Function.prototype,i=n.call,r=s&&n.bind.bind(i,i);e.exports=s?r:function(e){return function(){return i.apply(e,arguments)}}},11409:(e,t,o)=>{"use strict";var s=o(58389),n=o(1483);e.exports=function(e,t){return arguments.length<2?(o=s[e],n(o)?o:void 0):s[e]&&s[e][t];var o}},40041:e=>{"use strict";e.exports=function(e){return{iterator:e,next:e.next,done:!1}}},26665:(e,t,o)=>{"use strict";var s=o(26145),n=o(92564),i=o(15983),r=o(86775),l=o(70001)("iterator");e.exports=function(e){if(!i(e))return n(e,l)||n(e,"@@iterator")||r[s(e)]}},14887:(e,t,o)=>{"use strict";var s=o(21807),n=o(68120),i=o(2293),r=o(18761),l=o(26665),a=TypeError;e.exports=function(e,t){var o=arguments.length<2?l(e):t;if(n(o))return i(s(o,e));throw new a(r(e)+" is not iterable")}},55215:(e,t,o)=>{"use strict";var s=o(14762),n=o(14914),i=o(1483),r=o(91278),l=o(26261),a=s([].push);e.exports=function(e){if(i(e))return e;if(n(e)){for(var t=e.length,o=[],s=0;s<t;s++){var h=e[s];"string"==typeof h?a(o,h):"number"!=typeof h&&"Number"!==r(h)&&"String"!==r(h)||a(o,l(h))}var c=o.length,u=!0;return function(e,t){if(u)return u=!1,t;if(n(this))return t;for(var s=0;s<c;s++)if(o[s]===e)return t}}}},92564:(e,t,o)=>{"use strict";var s=o(68120),n=o(15983);e.exports=function(e,t){var o=e[t];return n(o)?void 0:s(o)}},53131:(e,t,o)=>{"use strict";var s=o(68120),n=o(2293),i=o(21807),r=o(73005),l=o(40041),a="Invalid size",h=RangeError,c=TypeError,u=Math.max,d=function(e,t){this.set=e,this.size=u(t,0),this.has=s(e.has),this.keys=s(e.keys)};d.prototype={getIterator:function(){return l(n(i(this.keys,this.set)))},includes:function(e){return i(this.has,this.set,e)}},e.exports=function(e){n(e);var t=+e.size;if(t!=t)throw new c(a);var o=r(t);if(o<0)throw new h(a);return new d(e,o)}},20708:(e,t,o)=>{"use strict";var s=o(14762),n=o(22347),i=Math.floor,r=s("".charAt),l=s("".replace),a=s("".slice),h=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,c=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,o,s,u,d){var g=o+e.length,f=s.length,p=c;return void 0!==u&&(u=n(u),p=h),l(d,p,(function(n,l){var h;switch(r(l,0)){case"$":return"$";case"&":return e;case"`":return a(t,0,o);case"'":return a(t,g);case"<":h=u[a(l,1,-1)];break;default:var c=+l;if(0===c)return n;if(c>f){var d=i(c/10);return 0===d?n:d<=f?void 0===s[d-1]?r(l,1):s[d-1]+r(l,1):n}h=s[c-1]}return void 0===h?"":h}))}},58389:function(e){"use strict";var t=function(e){return e&&e.Math===Math&&e};e.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof global&&global)||t("object"==typeof this&&this)||function(){return this}()||Function("return this")()},55755:(e,t,o)=>{"use strict";var s=o(14762),n=o(22347),i=s({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return i(n(e),t)}},11507:e=>{"use strict";e.exports={}},42811:(e,t,o)=>{"use strict";var s=o(11409);e.exports=s("document","documentElement")},1799:(e,t,o)=>{"use strict";var s=o(20382),n=o(28473),i=o(3145);e.exports=!s&&!n((function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},32121:(e,t,o)=>{"use strict";var s=o(14762),n=o(28473),i=o(91278),r=Object,l=s("".split);e.exports=n((function(){return!r("z").propertyIsEnumerable(0)}))?function(e){return"String"===i(e)?l(e,""):r(e)}:r},32429:(e,t,o)=>{"use strict";var s=o(1483),n=o(71704),i=o(51953);e.exports=function(e,t,o){var r,l;return i&&s(r=t.constructor)&&r!==o&&n(l=r.prototype)&&l!==o.prototype&&i(e,l),e}},17268:(e,t,o)=>{"use strict";var s=o(14762),n=o(1483),i=o(91831),r=s(Function.toString);n(i.inspectSource)||(i.inspectSource=function(e){return r(e)}),e.exports=i.inspectSource},16866:(e,t,o)=>{"use strict";var s=o(71704),n=o(69037);e.exports=function(e,t){s(t)&&"cause"in t&&n(e,"cause",t.cause)}},64483:(e,t,o)=>{"use strict";var s,n,i,r=o(74644),l=o(58389),a=o(71704),h=o(69037),c=o(55755),u=o(91831),d=o(65409),g=o(11507),f="Object already initialized",p=l.TypeError,m=l.WeakMap;if(r||u.state){var w=u.state||(u.state=new m);w.get=w.get,w.has=w.has,w.set=w.set,s=function(e,t){if(w.has(e))throw new p(f);return t.facade=e,w.set(e,t),t},n=function(e){return w.get(e)||{}},i=function(e){return w.has(e)}}else{var C=d("state");g[C]=!0,s=function(e,t){if(c(e,C))throw new p(f);return t.facade=e,h(e,C,t),t},n=function(e){return c(e,C)?e[C]:{}},i=function(e){return c(e,C)}}e.exports={set:s,get:n,has:i,enforce:function(e){return i(e)?n(e):s(e,{})},getterFor:function(e){return function(t){var o;if(!a(t)||(o=n(t)).type!==e)throw new p("Incompatible receiver, "+e+" required");return o}}}},95299:(e,t,o)=>{"use strict";var s=o(70001),n=o(86775),i=s("iterator"),r=Array.prototype;e.exports=function(e){return void 0!==e&&(n.Array===e||r[i]===e)}},14914:(e,t,o)=>{"use strict";var s=o(91278);e.exports=Array.isArray||function(e){return"Array"===s(e)}},1483:e=>{"use strict";var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},98730:(e,t,o)=>{"use strict";var s=o(28473),n=o(1483),i=/#|\.prototype\./,r=function(e,t){var o=a[l(e)];return o===c||o!==h&&(n(t)?s(t):!!t)},l=r.normalize=function(e){return String(e).replace(i,".").toLowerCase()},a=r.data={},h=r.NATIVE="N",c=r.POLYFILL="P";e.exports=r},15983:e=>{"use strict";e.exports=function(e){return null==e}},71704:(e,t,o)=>{"use strict";var s=o(1483);e.exports=function(e){return"object"==typeof e?null!==e:s(e)}},40735:(e,t,o)=>{"use strict";var s=o(71704);e.exports=function(e){return s(e)||null===e}},19557:e=>{"use strict";e.exports=!1},84786:(e,t,o)=>{"use strict";var s=o(71704),n=o(91278),i=o(70001)("match");e.exports=function(e){var t;return s(e)&&(void 0!==(t=e[i])?!!t:"RegExp"===n(e))}},31423:(e,t,o)=>{"use strict";var s=o(11409),n=o(1483),i=o(4815),r=o(45022),l=Object;e.exports=r?function(e){return"symbol"==typeof e}:function(e){var t=s("Symbol");return n(t)&&i(t.prototype,l(e))}},76001:(e,t,o)=>{"use strict";var s=o(21807);e.exports=function(e,t,o){for(var n,i,r=o?e:e.iterator,l=e.next;!(n=s(l,r)).done;)if(void 0!==(i=t(n.value)))return i}},11506:(e,t,o)=>{"use strict";var s=o(32914),n=o(21807),i=o(2293),r=o(18761),l=o(95299),a=o(66960),h=o(4815),c=o(14887),u=o(26665),d=o(46721),g=TypeError,f=function(e,t){this.stopped=e,this.result=t},p=f.prototype;e.exports=function(e,t,o){var m,w,C,v,y,E,S,R=o&&o.that,b=!(!o||!o.AS_ENTRIES),_=!(!o||!o.IS_RECORD),T=!(!o||!o.IS_ITERATOR),M=!(!o||!o.INTERRUPTED),O=s(t,R),I=function(e){return m&&d(m,"normal",e),new f(!0,e)},N=function(e){return b?(i(e),M?O(e[0],e[1],I):O(e[0],e[1])):M?O(e,I):O(e)};if(_)m=e.iterator;else if(T)m=e;else{if(!(w=u(e)))throw new g(r(e)+" is not iterable");if(l(w)){for(C=0,v=a(e);v>C;C++)if((y=N(e[C]))&&h(p,y))return y;return new f(!1)}m=c(e,w)}for(E=_?e.next:m.next;!(S=n(E,m)).done;){try{y=N(S.value)}catch(e){d(m,"throw",e)}if("object"==typeof y&&y&&h(p,y))return y}return new f(!1)}},46721:(e,t,o)=>{"use strict";var s=o(21807),n=o(2293),i=o(92564);e.exports=function(e,t,o){var r,l;n(e);try{if(!(r=i(e,"return"))){if("throw"===t)throw o;return o}r=s(r,e)}catch(e){l=!0,r=e}if("throw"===t)throw o;if(l)throw r;return n(r),o}},86775:e=>{"use strict";e.exports={}},66960:(e,t,o)=>{"use strict";var s=o(58324);e.exports=function(e){return s(e.length)}},90169:(e,t,o)=>{"use strict";var s=o(14762),n=o(28473),i=o(1483),r=o(55755),l=o(20382),a=o(42048).CONFIGURABLE,h=o(17268),c=o(64483),u=c.enforce,d=c.get,g=String,f=Object.defineProperty,p=s("".slice),m=s("".replace),w=s([].join),C=l&&!n((function(){return 8!==f((function(){}),"length",{value:8}).length})),v=String(String).split("String"),y=e.exports=function(e,t,o){"Symbol("===p(g(t),0,7)&&(t="["+m(g(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),o&&o.getter&&(t="get "+t),o&&o.setter&&(t="set "+t),(!r(e,"name")||a&&e.name!==t)&&(l?f(e,"name",{value:t,configurable:!0}):e.name=t),C&&o&&r(o,"arity")&&e.length!==o.arity&&f(e,"length",{value:o.arity});try{o&&r(o,"constructor")&&o.constructor?l&&f(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var s=u(e);return r(s,"source")||(s.source=w(v,"string"==typeof t?t:"")),e};Function.prototype.toString=y((function(){return i(this)&&d(this).source||h(this)}),"toString")},61703:e=>{"use strict";var t=Math.ceil,o=Math.floor;e.exports=Math.trunc||function(e){var s=+e;return(s>0?o:t)(s)}},17969:(e,t,o)=>{"use strict";var s=o(26261);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:s(e)}},25290:(e,t,o)=>{"use strict";var s,n=o(2293),i=o(95799),r=o(44741),l=o(11507),a=o(42811),h=o(3145),c=o(65409),u="prototype",d="script",g=c("IE_PROTO"),f=function(){},p=function(e){return"<"+d+">"+e+"</"+d+">"},m=function(e){e.write(p("")),e.close();var t=e.parentWindow.Object;return e=null,t},w=function(){try{s=new ActiveXObject("htmlfile")}catch(e){}var e,t,o;w="undefined"!=typeof document?document.domain&&s?m(s):(t=h("iframe"),o="java"+d+":",t.style.display="none",a.appendChild(t),t.src=String(o),(e=t.contentWindow.document).open(),e.write(p("document.F=Object")),e.close(),e.F):m(s);for(var n=r.length;n--;)delete w[u][r[n]];return w()};l[g]=!0,e.exports=Object.create||function(e,t){var o;return null!==e?(f[u]=n(e),o=new f,f[u]=null,o[g]=e):o=w(),void 0===t?o:i.f(o,t)}},95799:(e,t,o)=>{"use strict";var s=o(20382),n=o(3896),i=o(25835),r=o(2293),l=o(35599),a=o(33658);t.f=s&&!n?Object.defineProperties:function(e,t){r(e);for(var o,s=l(t),n=a(t),h=n.length,c=0;h>c;)i.f(e,o=n[c++],s[o]);return e}},25835:(e,t,o)=>{"use strict";var s=o(20382),n=o(1799),i=o(3896),r=o(2293),l=o(83815),a=TypeError,h=Object.defineProperty,c=Object.getOwnPropertyDescriptor,u="enumerable",d="configurable",g="writable";t.f=s?i?function(e,t,o){if(r(e),t=l(t),r(o),"function"==typeof e&&"prototype"===t&&"value"in o&&g in o&&!o[g]){var s=c(e,t);s&&s[g]&&(e[t]=o.value,o={configurable:d in o?o[d]:s[d],enumerable:u in o?o[u]:s[u],writable:!1})}return h(e,t,o)}:h:function(e,t,o){if(r(e),t=l(t),r(o),n)try{return h(e,t,o)}catch(e){}if("get"in o||"set"in o)throw new a("Accessors not supported");return"value"in o&&(e[t]=o.value),e}},4961:(e,t,o)=>{"use strict";var s=o(20382),n=o(21807),i=o(37611),r=o(57738),l=o(35599),a=o(83815),h=o(55755),c=o(1799),u=Object.getOwnPropertyDescriptor;t.f=s?u:function(e,t){if(e=l(e),t=a(t),c)try{return u(e,t)}catch(e){}if(h(e,t))return r(!n(i.f,e,t),e[t])}},12278:(e,t,o)=>{"use strict";var s=o(56742),n=o(44741).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return s(e,n)}},74347:(e,t)=>{"use strict";t.f=Object.getOwnPropertySymbols},4815:(e,t,o)=>{"use strict";var s=o(14762);e.exports=s({}.isPrototypeOf)},56742:(e,t,o)=>{"use strict";var s=o(14762),n=o(55755),i=o(35599),r=o(86651).indexOf,l=o(11507),a=s([].push);e.exports=function(e,t){var o,s=i(e),h=0,c=[];for(o in s)!n(l,o)&&n(s,o)&&a(c,o);for(;t.length>h;)n(s,o=t[h++])&&(~r(c,o)||a(c,o));return c}},33658:(e,t,o)=>{"use strict";var s=o(56742),n=o(44741);e.exports=Object.keys||function(e){return s(e,n)}},37611:(e,t)=>{"use strict";var o={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,n=s&&!o.call({1:2},1);t.f=n?function(e){var t=s(this,e);return!!t&&t.enumerable}:o},51953:(e,t,o)=>{"use strict";var s=o(680),n=o(71704),i=o(53312),r=o(63852);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,o={};try{(e=s(Object.prototype,"__proto__","set"))(o,[]),t=o instanceof Array}catch(e){}return function(o,s){return i(o),r(s),n(o)?(t?e(o,s):o.__proto__=s,o):o}}():void 0)},348:(e,t,o)=>{"use strict";var s=o(21807),n=o(1483),i=o(71704),r=TypeError;e.exports=function(e,t){var o,l;if("string"===t&&n(o=e.toString)&&!i(l=s(o,e)))return l;if(n(o=e.valueOf)&&!i(l=s(o,e)))return l;if("string"!==t&&n(o=e.toString)&&!i(l=s(o,e)))return l;throw new r("Can't convert object to primitive value")}},89497:(e,t,o)=>{"use strict";var s=o(11409),n=o(14762),i=o(12278),r=o(74347),l=o(2293),a=n([].concat);e.exports=s("Reflect","ownKeys")||function(e){var t=i.f(l(e)),o=r.f;return o?a(t,o(e)):t}},7150:(e,t,o)=>{"use strict";var s=o(25835).f;e.exports=function(e,t,o){o in e||s(e,o,{configurable:!0,get:function(){return t[o]},set:function(e){t[o]=e}})}},36653:(e,t,o)=>{"use strict";var s=o(2293);e.exports=function(){var e=s(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},39736:(e,t,o)=>{"use strict";var s=o(21807),n=o(55755),i=o(4815),r=o(36653),l=RegExp.prototype;e.exports=function(e){var t=e.flags;return void 0!==t||"flags"in l||n(e,"flags")||!i(l,e)?t:s(r,e)}},53312:(e,t,o)=>{"use strict";var s=o(15983),n=TypeError;e.exports=function(e){if(s(e))throw new n("Can't call method on "+e);return e}},39570:(e,t,o)=>{"use strict";var s,n=o(58389),i=o(73067),r=o(1483),l=o(35413),a=o(89966),h=o(61698),c=o(4066),u=n.Function,d=/MSIE .\./.test(a)||l&&((s=n.Bun.version.split(".")).length<3||"0"===s[0]&&(s[1]<3||"3"===s[1]&&"0"===s[2]));e.exports=function(e,t){var o=t?2:1;return d?function(s,n){var l=c(arguments.length,1)>o,a=r(s)?s:u(s),d=l?h(arguments,o):[],g=l?function(){i(a,this,d)}:a;return t?e(g,n):e(g)}:e}},34824:(e,t,o)=>{"use strict";var s=o(36880),n=o(11639),i=s.Set,r=s.add;e.exports=function(e){var t=new i;return n(e,(function(e){r(t,e)})),t}},26006:(e,t,o)=>{"use strict";var s=o(14246),n=o(36880),i=o(34824),r=o(45828),l=o(53131),a=o(11639),h=o(76001),c=n.has,u=n.remove;e.exports=function(e){var t=s(this),o=l(e),n=i(t);return r(t)<=o.size?a(t,(function(e){o.includes(e)&&u(n,e)})):h(o.getIterator(),(function(e){c(t,e)&&u(n,e)})),n}},36880:(e,t,o)=>{"use strict";var s=o(14762),n=Set.prototype;e.exports={Set,add:s(n.add),has:s(n.has),remove:s(n.delete),proto:n}},25472:(e,t,o)=>{"use strict";var s=o(14246),n=o(36880),i=o(45828),r=o(53131),l=o(11639),a=o(76001),h=n.Set,c=n.add,u=n.has;e.exports=function(e){var t=s(this),o=r(e),n=new h;return i(t)>o.size?a(o.getIterator(),(function(e){u(t,e)&&c(n,e)})):l(t,(function(e){o.includes(e)&&c(n,e)})),n}},87035:(e,t,o)=>{"use strict";var s=o(14246),n=o(36880).has,i=o(45828),r=o(53131),l=o(11639),a=o(76001),h=o(46721);e.exports=function(e){var t=s(this),o=r(e);if(i(t)<=o.size)return!1!==l(t,(function(e){if(o.includes(e))return!1}),!0);var c=o.getIterator();return!1!==a(c,(function(e){if(n(t,e))return h(c,"normal",!1)}))}},51984:(e,t,o)=>{"use strict";var s=o(14246),n=o(45828),i=o(11639),r=o(53131);e.exports=function(e){var t=s(this),o=r(e);return!(n(t)>o.size)&&!1!==i(t,(function(e){if(!o.includes(e))return!1}),!0)}},33049:(e,t,o)=>{"use strict";var s=o(14246),n=o(36880).has,i=o(45828),r=o(53131),l=o(76001),a=o(46721);e.exports=function(e){var t=s(this),o=r(e);if(i(t)<o.size)return!1;var h=o.getIterator();return!1!==l(h,(function(e){if(!n(t,e))return a(h,"normal",!1)}))}},11639:(e,t,o)=>{"use strict";var s=o(14762),n=o(76001),i=o(36880),r=i.Set,l=i.proto,a=s(l.forEach),h=s(l.keys),c=h(new r).next;e.exports=function(e,t,o){return o?n({iterator:h(e),next:c},t):a(e,t)}},5242:(e,t,o)=>{"use strict";var s=o(11409),n=function(e){return{size:e,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}};e.exports=function(e){var t=s("Set");try{(new t)[e](n(0));try{return(new t)[e](n(-1)),!1}catch(e){return!0}}catch(e){return!1}}},45828:(e,t,o)=>{"use strict";var s=o(680),n=o(36880);e.exports=s(n.proto,"size","get")||function(e){return e.size}},61916:(e,t,o)=>{"use strict";var s=o(14246),n=o(36880),i=o(34824),r=o(53131),l=o(76001),a=n.add,h=n.has,c=n.remove;e.exports=function(e){var t=s(this),o=r(e).getIterator(),n=i(t);return l(o,(function(e){h(t,e)?c(n,e):a(n,e)})),n}},95790:(e,t,o)=>{"use strict";var s=o(14246),n=o(36880).add,i=o(34824),r=o(53131),l=o(76001);e.exports=function(e){var t=s(this),o=r(e).getIterator(),a=i(t);return l(o,(function(e){n(a,e)})),a}},65409:(e,t,o)=>{"use strict";var s=o(47255),n=o(81866),i=s("keys");e.exports=function(e){return i[e]||(i[e]=n(e))}},91831:(e,t,o)=>{"use strict";var s=o(19557),n=o(58389),i=o(82095),r="__core-js_shared__",l=e.exports=n[r]||i(r,{});(l.versions||(l.versions=[])).push({version:"3.37.1",mode:s?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE",source:"https://github.com/zloirock/core-js"})},47255:(e,t,o)=>{"use strict";var s=o(91831);e.exports=function(e,t){return s[e]||(s[e]=t||{})}},86029:(e,t,o)=>{"use strict";var s=o(76170),n=o(28473),i=o(58389).String;e.exports=!!Object.getOwnPropertySymbols&&!n((function(){var e=Symbol("symbol detection");return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&s&&s<41}))},17007:(e,t,o)=>{"use strict";var s,n,i,r,l=o(58389),a=o(73067),h=o(32914),c=o(1483),u=o(55755),d=o(28473),g=o(42811),f=o(61698),p=o(3145),m=o(4066),w=o(28417),C=o(4334),v=l.setImmediate,y=l.clearImmediate,E=l.process,S=l.Dispatch,R=l.Function,b=l.MessageChannel,_=l.String,T=0,M={},O="onreadystatechange";d((function(){s=l.location}));var I=function(e){if(u(M,e)){var t=M[e];delete M[e],t()}},N=function(e){return function(){I(e)}},A=function(e){I(e.data)},P=function(e){l.postMessage(_(e),s.protocol+"//"+s.host)};v&&y||(v=function(e){m(arguments.length,1);var t=c(e)?e:R(e),o=f(arguments,1);return M[++T]=function(){a(t,void 0,o)},n(T),T},y=function(e){delete M[e]},C?n=function(e){E.nextTick(N(e))}:S&&S.now?n=function(e){S.now(N(e))}:b&&!w?(r=(i=new b).port2,i.port1.onmessage=A,n=h(r.postMessage,r)):l.addEventListener&&c(l.postMessage)&&!l.importScripts&&s&&"file:"!==s.protocol&&!d(P)?(n=P,l.addEventListener("message",A,!1)):n=O in p("script")?function(e){g.appendChild(p("script"))[O]=function(){g.removeChild(this),I(e)}}:function(e){setTimeout(N(e),0)}),e.exports={set:v,clear:y}},33392:(e,t,o)=>{"use strict";var s=o(73005),n=Math.max,i=Math.min;e.exports=function(e,t){var o=s(e);return o<0?n(o+t,0):i(o,t)}},35599:(e,t,o)=>{"use strict";var s=o(32121),n=o(53312);e.exports=function(e){return s(n(e))}},73005:(e,t,o)=>{"use strict";var s=o(61703);e.exports=function(e){var t=+e;return t!=t||0===t?0:s(t)}},58324:(e,t,o)=>{"use strict";var s=o(73005),n=Math.min;e.exports=function(e){var t=s(e);return t>0?n(t,9007199254740991):0}},22347:(e,t,o)=>{"use strict";var s=o(53312),n=Object;e.exports=function(e){return n(s(e))}},22355:(e,t,o)=>{"use strict";var s=o(21807),n=o(71704),i=o(31423),r=o(92564),l=o(348),a=o(70001),h=TypeError,c=a("toPrimitive");e.exports=function(e,t){if(!n(e)||i(e))return e;var o,a=r(e,c);if(a){if(void 0===t&&(t="default"),o=s(a,e,t),!n(o)||i(o))return o;throw new h("Can't convert object to primitive value")}return void 0===t&&(t="number"),l(e,t)}},83815:(e,t,o)=>{"use strict";var s=o(22355),n=o(31423);e.exports=function(e){var t=s(e,"string");return n(t)?t:t+""}},34338:(e,t,o)=>{"use strict";var s={};s[o(70001)("toStringTag")]="z",e.exports="[object z]"===String(s)},26261:(e,t,o)=>{"use strict";var s=o(26145),n=String;e.exports=function(e){if("Symbol"===s(e))throw new TypeError("Cannot convert a Symbol value to a string");return n(e)}},18761:e=>{"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},81866:(e,t,o)=>{"use strict";var s=o(14762),n=0,i=Math.random(),r=s(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+r(++n+i,36)}},45022:(e,t,o)=>{"use strict";var s=o(86029);e.exports=s&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3896:(e,t,o)=>{"use strict";var s=o(20382),n=o(28473);e.exports=s&&n((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},4066:e=>{"use strict";var t=TypeError;e.exports=function(e,o){if(e<o)throw new t("Not enough arguments");return e}},74644:(e,t,o)=>{"use strict";var s=o(58389),n=o(1483),i=s.WeakMap;e.exports=n(i)&&/native code/.test(String(i))},70001:(e,t,o)=>{"use strict";var s=o(58389),n=o(47255),i=o(55755),r=o(81866),l=o(86029),a=o(45022),h=s.Symbol,c=n("wks"),u=a?h.for||h:h&&h.withoutSetter||r;e.exports=function(e){return i(c,e)||(c[e]=l&&i(h,e)?h[e]:u("Symbol."+e)),c[e]}},72335:(e,t,o)=>{"use strict";var s=o(11409),n=o(55755),i=o(69037),r=o(4815),l=o(51953),a=o(16726),h=o(7150),c=o(32429),u=o(17969),d=o(16866),g=o(27473),f=o(20382),p=o(19557);e.exports=function(e,t,o,m){var w="stackTraceLimit",C=m?2:1,v=e.split("."),y=v[v.length-1],E=s.apply(null,v);if(E){var S=E.prototype;if(!p&&n(S,"cause")&&delete S.cause,!o)return E;var R=s("Error"),b=t((function(e,t){var o=u(m?t:e,void 0),s=m?new E(e):new E;return void 0!==o&&i(s,"message",o),g(s,b,s.stack,2),this&&r(S,this)&&c(s,this,b),arguments.length>C&&d(s,arguments[C]),s}));if(b.prototype=S,"Error"!==y?l?l(b,R):a(b,R,{name:!0}):f&&w in E&&(h(b,E,w),h(b,E,"prepareStackTrace")),a(b,E),!p)try{S.name!==y&&i(S,"name",y),S.constructor=b}catch(e){}return b}}},95913:(e,t,o)=>{"use strict";var s=o(28612),n=o(22347),i=o(66960),r=o(73005),l=o(37095);s({target:"Array",proto:!0},{at:function(e){var t=n(this),o=i(t),s=r(e),l=s>=0?s:o+s;return l<0||l>=o?void 0:t[l]}}),l("at")},15724:(e,t,o)=>{"use strict";var s=o(28612),n=o(22347),i=o(66960),r=o(39273),l=o(31091);s({target:"Array",proto:!0,arity:1,forced:o(28473)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=n(this),o=i(t),s=arguments.length;l(o+s);for(var a=0;a<s;a++)t[o]=arguments[a],o++;return r(t,o),o}})},63979:(e,t,o)=>{"use strict";o(37095)("flatMap")},25352:(e,t,o)=>{"use strict";o(37095)("flat")},54999:(e,t,o)=>{"use strict";var s=o(28612),n=o(22347),i=o(66960),r=o(39273),l=o(16060),a=o(31091);s({target:"Array",proto:!0,arity:1,forced:1!==[].unshift(0)||!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}}()},{unshift:function(e){var t=n(this),o=i(t),s=arguments.length;if(s){a(o+s);for(var h=o;h--;){var c=h+s;h in t?t[c]=t[h]:l(t,c)}for(var u=0;u<s;u++)t[u]=arguments[u]}return r(t,o+s)}})},67834:(e,t,o)=>{"use strict";var s=o(28612),n=o(58389),i=o(73067),r=o(72335),l="WebAssembly",a=n[l],h=7!==new Error("e",{cause:7}).cause,c=function(e,t){var o={};o[e]=r(e,t,h),s({global:!0,constructor:!0,arity:1,forced:h},o)},u=function(e,t){if(a&&a[e]){var o={};o[e]=r(l+"."+e,t,h),s({target:l,stat:!0,constructor:!0,arity:1,forced:h},o)}};c("Error",(function(e){return function(t){return i(e,this,arguments)}})),c("EvalError",(function(e){return function(t){return i(e,this,arguments)}})),c("RangeError",(function(e){return function(t){return i(e,this,arguments)}})),c("ReferenceError",(function(e){return function(t){return i(e,this,arguments)}})),c("SyntaxError",(function(e){return function(t){return i(e,this,arguments)}})),c("TypeError",(function(e){return function(t){return i(e,this,arguments)}})),c("URIError",(function(e){return function(t){return i(e,this,arguments)}})),u("CompileError",(function(e){return function(t){return i(e,this,arguments)}})),u("LinkError",(function(e){return function(t){return i(e,this,arguments)}})),u("RuntimeError",(function(e){return function(t){return i(e,this,arguments)}}))},66184:(e,t,o)=>{"use strict";var s=o(28612),n=o(11409),i=o(73067),r=o(21807),l=o(14762),a=o(28473),h=o(1483),c=o(31423),u=o(61698),d=o(55215),g=o(86029),f=String,p=n("JSON","stringify"),m=l(/./.exec),w=l("".charAt),C=l("".charCodeAt),v=l("".replace),y=l(1..toString),E=/[\uD800-\uDFFF]/g,S=/^[\uD800-\uDBFF]$/,R=/^[\uDC00-\uDFFF]$/,b=!g||a((function(){var e=n("Symbol")("stringify detection");return"[null]"!==p([e])||"{}"!==p({a:e})||"{}"!==p(Object(e))})),_=a((function(){return'"\\udf06\\ud834"'!==p("\udf06\ud834")||'"\\udead"'!==p("\udead")})),T=function(e,t){var o=u(arguments),s=d(t);if(h(s)||void 0!==e&&!c(e))return o[1]=function(e,t){if(h(s)&&(t=r(s,this,f(e),t)),!c(t))return t},i(p,null,o)},M=function(e,t,o){var s=w(o,t-1),n=w(o,t+1);return m(S,e)&&!m(R,n)||m(R,e)&&!m(S,s)?"\\u"+y(C(e,0),16):e};p&&s({target:"JSON",stat:!0,arity:3,forced:b||_},{stringify:function(e,t,o){var s=u(arguments),n=i(b?T:p,null,s);return _&&"string"==typeof n?v(n,E,M):n}})},75339:(e,t,o)=>{"use strict";var s=o(28612),n=o(11506),i=o(30670);s({target:"Object",stat:!0},{fromEntries:function(e){var t={};return n(e,(function(e,o){i(t,e,o)}),{AS_ENTRIES:!0}),t}})},71336:(e,t,o)=>{"use strict";var s=o(28612),n=o(26006);s({target:"Set",proto:!0,real:!0,forced:!o(5242)("difference")},{difference:n})},41558:(e,t,o)=>{"use strict";var s=o(28612),n=o(28473),i=o(25472);s({target:"Set",proto:!0,real:!0,forced:!o(5242)("intersection")||n((function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))}))},{intersection:i})},17663:(e,t,o)=>{"use strict";var s=o(28612),n=o(87035);s({target:"Set",proto:!0,real:!0,forced:!o(5242)("isDisjointFrom")},{isDisjointFrom:n})},68630:(e,t,o)=>{"use strict";var s=o(28612),n=o(51984);s({target:"Set",proto:!0,real:!0,forced:!o(5242)("isSubsetOf")},{isSubsetOf:n})},79645:(e,t,o)=>{"use strict";var s=o(28612),n=o(33049);s({target:"Set",proto:!0,real:!0,forced:!o(5242)("isSupersetOf")},{isSupersetOf:n})},89858:(e,t,o)=>{"use strict";var s=o(28612),n=o(61916);s({target:"Set",proto:!0,real:!0,forced:!o(5242)("symmetricDifference")},{symmetricDifference:n})},8620:(e,t,o)=>{"use strict";var s=o(28612),n=o(95790);s({target:"Set",proto:!0,real:!0,forced:!o(5242)("union")},{union:n})},12587:(e,t,o)=>{"use strict";var s=o(28612),n=o(14762),i=o(53312),r=o(73005),l=o(26261),a=o(28473),h=n("".charAt);s({target:"String",proto:!0,forced:a((function(){return"\ud842"!=="𠮷".at(-2)}))},{at:function(e){var t=l(i(this)),o=t.length,s=r(e),n=s>=0?s:o+s;return n<0||n>=o?void 0:h(t,n)}})},64552:(e,t,o)=>{"use strict";var s=o(28612),n=o(21807),i=o(14762),r=o(53312),l=o(1483),a=o(15983),h=o(84786),c=o(26261),u=o(92564),d=o(39736),g=o(20708),f=o(70001),p=o(19557),m=f("replace"),w=TypeError,C=i("".indexOf),v=i("".replace),y=i("".slice),E=Math.max;s({target:"String",proto:!0},{replaceAll:function(e,t){var o,s,i,f,S,R,b,_,T,M=r(this),O=0,I=0,N="";if(!a(e)){if((o=h(e))&&(s=c(r(d(e))),!~C(s,"g")))throw new w("`.replaceAll` does not allow non-global regexes");if(i=u(e,m))return n(i,e,M,t);if(p&&o)return v(c(M),e,t)}for(f=c(M),S=c(e),(R=l(t))||(t=c(t)),b=S.length,_=E(1,b),O=C(f,S);-1!==O;)T=R?c(t(S,O,f)):g(S,f,O,[],void 0,t),N+=y(f,I,O)+T,I=O+b,O=O+_>f.length?-1:C(f,S,O+_);return I<f.length&&(N+=y(f,I)),N}})},36241:(e,t,o)=>{"use strict";o(71336)},85151:(e,t,o)=>{"use strict";o(41558)},49122:(e,t,o)=>{"use strict";o(17663)},75183:(e,t,o)=>{"use strict";o(68630)},40520:(e,t,o)=>{"use strict";o(79645)},32495:(e,t,o)=>{"use strict";o(89858)},72371:(e,t,o)=>{"use strict";o(8620)},31998:(e,t,o)=>{"use strict";var s=o(28612),n=o(58389),i=o(17007).clear;s({global:!0,bind:!0,enumerable:!0,forced:n.clearImmediate!==i},{clearImmediate:i})},71766:(e,t,o)=>{"use strict";o(31998),o(8615)},8615:(e,t,o)=>{"use strict";var s=o(28612),n=o(58389),i=o(17007).set,r=o(39570),l=n.setImmediate?r(i,!1):i;s({global:!0,bind:!0,enumerable:!0,forced:n.setImmediate!==l},{setImmediate:l})}},i={};function r(e){var t=i[e];if(void 0!==t)return t.exports;var o=i[e]={exports:{}};return n[e].call(o.exports,o,o.exports,r),o.exports}r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return(()=>{"use strict";var e=l,t=r(96784);var o=k(r(38715));o.CellCoords,o.CellRange;var s,n,i,a,h,c=r(79053),u=k(r(82629)),d=r(93969),g=t(r(12729)),f=t(r(1817)),p=k(r(74737)),m=k(r(9175)),w=k(r(28890)),C=k(r(56216)),v=k(r(72484)),y=k(r(93980)),E=k(r(78832)),S=k(r(38893)),R=k(r(87485)),b=k(r(13911)),_=k(r(59777)),T=k(r(71257)),M=k(r(9893)),O=k(r(79729)),I=r(84558),N=r(44288),A=r(51255),P=r(34299),x=r(90532),H=r(61205);function D(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(D=function(e){return e?o:t})(e)}function k(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=D(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var r=n?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(s,i,r):s[i]=e[i]}return s.default=e,o&&o.set(e,s),s}(0,c.registerAllModules)(),(0,g.default)(o.default),o.default.__GhostTable=f.default,o.default._getListenersCounter=u.getListenersCounter,o.default._getRegisteredMapsCounter=d.getRegisteredMapsCounter,o.default.EventManager=u.default;const L=[m,w,C,v,y,E,S,R,b,_,T,p],V=[M,O];o.default.helper={},o.default.dom={},m.arrayEach(L,(e=>{m.arrayEach(Object.getOwnPropertyNames(e),(t=>{"_"!==t.charAt(0)&&(o.default.helper[t]=e[t])}))})),m.arrayEach(V,(e=>{m.arrayEach(Object.getOwnPropertyNames(e),(t=>{"_"!==t.charAt(0)&&(o.default.dom[t]=e[t])}))})),o.default.cellTypes=null!==(s=o.default.cellTypes)&&void 0!==s?s:{},m.arrayEach((0,P.getRegisteredCellTypeNames)(),(e=>{o.default.cellTypes[e]=(0,P.getCellType)(e)})),o.default.cellTypes.registerCellType=P.registerCellType,o.default.cellTypes.getCellType=P.getCellType,o.default.editors=null!==(n=o.default.editors)&&void 0!==n?n:{},m.arrayEach((0,I.getRegisteredEditorNames)(),(e=>{o.default.editors[`${_.toUpperCaseFirst(e)}Editor`]=(0,I.getEditor)(e)})),o.default.editors.registerEditor=I.registerEditor,o.default.editors.getEditor=I.getEditor,o.default.renderers=null!==(i=o.default.renderers)&&void 0!==i?i:{},m.arrayEach((0,N.getRegisteredRendererNames)(),(e=>{const t=(0,N.getRenderer)(e);"base"===e&&(o.default.renderers.cellDecorator=t),o.default.renderers[`${_.toUpperCaseFirst(e)}Renderer`]=t})),o.default.renderers.registerRenderer=N.registerRenderer,o.default.renderers.getRenderer=N.getRenderer,o.default.validators=null!==(a=o.default.validators)&&void 0!==a?a:{},m.arrayEach((0,A.getRegisteredValidatorNames)(),(e=>{o.default.validators[`${_.toUpperCaseFirst(e)}Validator`]=(0,A.getValidator)(e)})),o.default.validators.registerValidator=A.registerValidator,o.default.validators.getValidator=A.getValidator,o.default.plugins=null!==(h=o.default.plugins)&&void 0!==h?h:{},m.arrayEach((0,x.getPluginsNames)(),(e=>{o.default.plugins[e]=(0,x.getPlugin)(e)})),o.default.plugins[`${_.toUpperCaseFirst(H.BasePlugin.PLUGIN_KEY)}Plugin`]=H.BasePlugin,o.default.plugins.registerPlugin=x.registerPlugin,o.default.plugins.getPlugin=x.getPlugin;e.default=o.default})(),l=l.default})()));