handsontable
Version:
Handsontable is a JavaScript Data Grid available for React, Angular and Vue.
31 lines • 1.34 MB
JavaScript
/*!
* Copyright (c) HANDSONCODE sp. z o. o.
*
* HANDSONTABLE is a software distributed by HANDSONCODE sp. z o. o., a Polish corporation based in
* Gdynia, Poland, at Aleja Zwyciestwa 96-98, registered by the District Court in Gdansk under number
* 538651, EU tax ID number: PL5862294002, share capital: PLN 62,800.00.
*
* This software is protected by applicable copyright laws, including international treaties, and dual-
* licensed - depending on whether your use for commercial purposes, meaning intended for or
* resulting in commercial advantage or monetary compensation, or not.
*
* If your use is strictly personal or solely for evaluation purposes, meaning for the purposes of testing
* the suitability, performance, and usefulness of this software outside the production environment,
* you agree to be bound by the terms included in the "handsontable-non-commercial-license.pdf" file.
*
* Your use of this software for commercial purposes is subject to the terms included in an applicable
* license agreement.
*
* In any case, you must not make any such use of this software as to develop software which may be
* considered competitive with this software.
*
* UNLESS EXPRESSLY AGREED OTHERWISE, HANDSONCODE PROVIDES THIS SOFTWARE ON AN "AS IS"
* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, AND IN NO EVENT AND UNDER NO
* LEGAL THEORY, SHALL HANDSONCODE BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT,
* INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
* USE OR INABILITY TO USE THIS SOFTWARE.
*
* Version: 17.0.1
* Release date: 25/03/2026 (built at 25/03/2026 09:28:06)
*/
!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)}(Object("undefined"!=typeof self?self:this),(e,t,o,r)=>(()=>{var n={78726(e,t){"use strict";t.__esModule=!0,t.parse=function(e){const t=[[""]];if(0===e.length)return t;let i,s=0,a=0;for(;e.length>0&&i!==e.length;)if(i=e.length,e.match(n))e=e.replace(n,""),s+=1,t[a][s]="";else if(e.match(o))e=e.replace(o,""),s=0,a+=1,t[a]=[""];else{let o="";if(e.startsWith('"')){let t=0,r=!0;for(;r;){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)&&(r=!1)}o=o.replace(/^"/,"").replace(/"$/,"").replace(/["]*/g,e=>new Array(Math.floor(e.length/2)).fill('"').join(""))}else{const t=e.match(r);o=t?t[0]:"",e=e.slice(o.length)}t[a][s]=o}return t},t.stringify=function(e){let t,o,r,n,i,s="";for(t=0,o=e.length;t<o;t+=1){for(n=e[t].length,r=0;r<n;r+=1)r>0&&(s+="\t"),i=e[t][r],"string"==typeof i?i.indexOf("\n")>-1?s+=`"${i.replace(/"/g,'""')}"`:s+=i:s+=null==i?"":i;t!==o-1&&(s+="\n")}return s};const o=/^(\r\n|\n\r|\r|\n)/,r=/^[^\t\r\n]+/,n=/^\t/},91083(e,t,o){"use strict";t.__esModule=!0;var r=o(78726);t.parse=r.parse,t.stringify=r.stringify},44823(e,t,o){"use strict";var r=o(36593);t.__esModule=!0;var n=r(o(59312));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:r,viewportWidth:n,columnWidth:i}=t;o>=r&&o+i<=r+(r>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:r,inlineStartOffset:n,zeroBasedScrollOffset:i,totalColumns:s,needReverse:a,startPositions:l,columnWidth:h}=e;if(this.endColumn===s-1&&a)for(this.startColumn=this.endColumn;this.startColumn>0;){const e=l[this.endColumn]+h-l[this.startColumn-1];if(e<=r&&(this.startColumn-=1),e>=r)break}this.startPosition=null!==(t=l[this.startColumn])&&void 0!==t?t:null;const d=o+r-(i>0?r+1:r),c=null===this.startColumn?0:e.getColumnWidth(this.startColumn);d<-1*n||o>l.at(-1)||-1*o-r>-1*c?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,s<this.endColumn&&(this.endColumn=s-1),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)}}},46651(e,t,o){"use strict";var r=o(36593);t.__esModule=!0;var n=r(o(59312));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:r,innerViewportHeight:n,rowHeight:i}=t;o>=r&&o+i<=n&&(null===this.startRow&&(this.startRow=e),this.endRow=e)}finalize(e){var t;const{scrollOffset:o,viewportHeight:r,horizontalScrollbarHeight:n,totalRows:i,needReverse:s,startPositions:a,rowHeight:l}=e;if(this.endRow===i-1&&s)for(this.startRow=this.endRow;this.startRow>0;){const e=a[this.endRow]+l-a[this.startRow-1];if(e<=r-n&&(this.startRow-=1),e>=r-n)break}this.startPosition=null!==(t=a[this.startRow])&&void 0!==t?t:null;o+r-n<(null===this.startRow?0:e.getRowHeight(this.startRow))||o>a.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)}}},19497(e,t,o){"use strict";var r=o(36593);t.__esModule=!0;var n=r(o(59312));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:r,viewportWidth:n}=t;o<=r&&(this.startColumn=e);o>=r&&o<=r+(r>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:r,inlineStartOffset:n,zeroBasedScrollOffset:i,totalColumns:s,needReverse:a,startPositions:l,columnWidth:h}=e;if(this.endColumn===s-1&&a)for(this.startColumn=this.endColumn;this.startColumn>0;){const e=l[this.endColumn]+h-l[this.startColumn-1];if(this.startColumn-=1,e>r)break}this.startPosition=null!==(t=l[this.startColumn])&&void 0!==t?t:null;o+r-(i>0?r+1:r)<-1*n||o>l.at(-1)+h||-1*o-r>0?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,s<this.endColumn&&(this.endColumn=s-1),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)}}},67113(e,t,o){"use strict";var r=o(36593);t.__esModule=!0;var n=r(o(59312));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:r,innerViewportHeight:n}=t;o<=r&&(this.startRow=e),o>=r&&o<=n&&null===this.startRow&&(this.startRow=e),this.endRow=e}finalize(e){var t;const{scrollOffset:o,viewportHeight:r,horizontalScrollbarHeight:n,totalRows:i,needReverse:s,startPositions:a,rowHeight:l}=e;if(this.endRow===i-1&&s)for(this.startRow=this.endRow;this.startRow>0;){const e=a[this.endRow]+l-a[this.startRow-1];if(this.startRow-=1,e>=r-n)break}this.startPosition=null!==(t=a[this.startRow])&&void 0!==t?t:null;o+r-n<0||o>a.at(-1)+l?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,i<this.endRow&&(this.endRow=i-1),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}}},22371(e,t,o){"use strict";var r=o(36593);t.__esModule=!0;var n=r(o(59312));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(){}}},33079(e,t,o){"use strict";var r=o(36593);t.__esModule=!0;var n=r(o(59312));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(){}}},19174(e,t,o){"use strict";var r=o(36593);t.__esModule=!0;var n=r(o(59312)),i=o(19497);class s extends i.PartiallyVisibleColumnsCalculationType{constructor(){super(...arguments),(0,n.default)(this,"columnStartOffset",0),(0,n.default)(this,"columnEndOffset",0)}finalize(e){var t;super.finalize(e);const{overrideFn:o,totalColumns:r,startPositions:n}=e;if(null!==this.startColumn&&"function"==typeof o){const e=this.startColumn,t=this.endColumn;o(this),this.columnStartOffset=e-this.startColumn,this.columnEndOffset=this.endColumn-t}this.startColumn<0&&(this.startColumn=0),this.startPosition=null!==(t=n[this.startColumn])&&void 0!==t?t:null,r<this.endColumn&&(this.endColumn=r-1),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)}}t.RenderedColumnsCalculationType=s},79960(e,t,o){"use strict";var r=o(36593);t.__esModule=!0;var n=r(o(59312)),i=o(67113);class s extends i.PartiallyVisibleRowsCalculationType{constructor(){super(...arguments),(0,n.default)(this,"rowStartOffset",0),(0,n.default)(this,"rowEndOffset",0)}finalize(e){var t;super.finalize(e);const{overrideFn:o,totalRows:r,startPositions:n}=e;if(null!==this.startRow&&"function"==typeof o){const e=this.startRow,t=this.endRow;o(this),this.rowStartOffset=e-this.startRow,this.rowEndOffset=this.endRow-t}this.startRow<0&&(this.startRow=0),this.startPosition=null!==(t=n[this.startRow])&&void 0!==t?t:null,r<this.endRow&&(this.endRow=r-1),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}}t.RenderedRowsCalculationType=s},74888(e,t,o){"use strict";t.__esModule=!0;var r=o(44823);t.FullyVisibleColumnsCalculationType=r.FullyVisibleColumnsCalculationType;var n=o(46651);t.FullyVisibleRowsCalculationType=n.FullyVisibleRowsCalculationType;var i=o(19497);t.PartiallyVisibleColumnsCalculationType=i.PartiallyVisibleColumnsCalculationType;var s=o(67113);t.PartiallyVisibleRowsCalculationType=s.PartiallyVisibleRowsCalculationType;var a=o(22371);t.RenderedAllColumnsCalculationType=a.RenderedAllColumnsCalculationType;var l=o(33079);t.RenderedAllRowsCalculationType=l.RenderedAllRowsCalculationType;var h=o(19174);t.RenderedColumnsCalculationType=h.RenderedColumnsCalculationType;var d=o(79960);t.RenderedRowsCalculationType=d.RenderedRowsCalculationType;var c=o(9513);t.ViewportColumnsCalculator=c.ViewportColumnsCalculator,t.DEFAULT_COLUMN_WIDTH=c.DEFAULT_WIDTH;var u=o(32041);t.ViewportRowsCalculator=u.ViewportRowsCalculator},22801(e,t,o){"use strict";var r=o(36593);t.__esModule=!0;var n=r(o(59312));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,r]=t;this.calculationResults.set(o,r),r.initialize(e)})}_process(e,t){this.calculationTypes.forEach(o=>{let[,r]=o;return r.process(e,t)})}_finalize(e){this.calculationTypes.forEach(t=>{let[,o]=t;return o.finalize(e)})}getResultsFor(e){return this.calculationResults.get(e)}}},9513(e,t,o){"use strict";var r=o(36593);t.__esModule=!0;var n=r(o(59312)),i=o(22801);const s=t.DEFAULT_WIDTH=50;class a extends i.ViewportBaseCalculator{constructor(e){let{calculationTypes:t,viewportWidth:o,scrollOffset:r,totalColumns:i,columnWidthFn:s,overrideFn:a,inlineStartOffset:l}=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=r,this.zeroBasedScrollOffset=Math.max(r,0),this.totalColumns=i,this.columnWidthFn=s,this.overrideFn=a,this.inlineStartOffset=l,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)?s:t}}t.ViewportColumnsCalculator=a},32041(e,t,o){"use strict";var r=o(36593);t.__esModule=!0;var n=r(o(59312)),i=o(22801);class s extends i.ViewportBaseCalculator{constructor(e){let{calculationTypes:t,viewportHeight:o,scrollOffset:r,totalRows:i,defaultRowHeight:s,rowHeightFn:a,overrideFn:l,horizontalScrollbarHeight:h}=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.defaultHeight=s,this.viewportHeight=o,this.scrollOffset=r,this.zeroBasedScrollOffset=Math.max(r,0),this.totalRows=i,this.rowHeightFn=a,this.overrideFn=l,this.horizontalScrollbarHeight=null!=h?h: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)?this.defaultHeight:t}}t.ViewportRowsCalculator=s},26640(e,t,o){"use strict";var r=o(36593);t.__esModule=!0;var n=r(o(59312));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 s(e,t){return e.get(l(e,t))}function a(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 h=new WeakMap;class d{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),a(h,this,o),void 0!==e&&void 0!==t&&(this.row=e,this.col=t)}isValid(e){const{countRows:t,countCols:o,countRowHeaders:r,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<-r)&&!(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 s(h,this)}isSouthEastOf(e){return this.row>=e.row&&(s(h,this)?this.col<=e.col:this.col>=e.col)}isNorthWestOf(e){return this.row<=e.row&&(s(h,this)?this.col>=e.col:this.col<=e.col)}isSouthWestOf(e){return this.row>=e.row&&(s(h,this)?this.col>=e.col:this.col<=e.col)}isNorthEastOf(e){return this.row<=e.row&&(s(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 d&&a(h,this,e.isRtl()),this}clone(){return new d(this.row,this.col,s(h,this))}toObject(){return{row:this.row,col:this.col}}}t.default=d},96065(e,t,o){"use strict";var r=o(36593);t.__esModule=!0;var n=r(o(59312)),i=r(o(26640));function s(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 a(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 h=new WeakMap;class d{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,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];var i,a,d;(0,n.default)(this,"highlight",null),(0,n.default)(this,"from",null),(0,n.default)(this,"to",null),s(this,h,!1),this.highlight=e.clone(),this.from=t.clone(),this.to=o.clone(),a=this,d=r,(i=h).set(l(i,a),d)}setHighlight(e){return this.highlight=e.clone(),this}setFrom(e){return this.from=e.clone(),this}setTo(e){return this.to=e.clone(),this}normalize(){return this.highlight.normalize(),this.from.normalize(),this.to.normalize(),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,r=this.getOuterTopStartCorner(),n=this.getOuterBottomEndCorner();return r.row<=t&&n.row>=t&&r.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(),r=this.getOuterBottomEndCorner(),n=this.getDirection(),i=e.getOuterTopStartCorner(),s=e.getOuterBottomEndCorner(),a=Math.min(o.row,i.row),l=Math.min(o.col,i.col),h=Math.max(r.row,s.row),d=Math.max(r.col,s.col),c=this._createCellCoords(a,l),u=this._createCellCoords(h,d);return this.from=c,this.to=u,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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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),r=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),s=Math.max(e.from.row,e.to.row),l=Math.min(e.from.col,e.to.col),d=Math.max(e.from.col,e.to.col),c=[];return t===i&&c.push("top"),n===d&&c.push(a(h,this)?"left":"right"),o===s&&c.push("bottom"),r===l&&c.push(a(h,this)?"right":"left"),c}getInner(){const e=this.getOuterTopStartCorner(),t=this.getOuterBottomEndCorner(),o=[];for(let r=e.row;r<=t.row;r++)for(let n=e.col;n<=t.col;n++)this.from.row===r&&this.from.col===n||this.to.row===r&&this.to.col===n||o.push(this._createCellCoords(r,n));return o}getAll(){const e=this.getOuterTopStartCorner(),t=this.getOuterBottomEndCorner(),o=[];for(let r=e.row;r<=t.row;r++)for(let n=e.col;n<=t.col;n++)e.row===r&&e.col===n?o.push(e):t.row===r&&t.col===n?o.push(t):o.push(this._createCellCoords(r,n));return o}forAll(e){const t=this.getOuterTopStartCorner(),o=this.getOuterBottomEndCorner();for(let r=t.row;r<=o.row;r++)for(let n=t.col;n<=o.col;n++){if(!1===e(r,n))return}}clone(){return new d(this.highlight,this.from,this.to,a(h,this))}toObject(){return{from:this.from.toObject(),to:this.to.toObject()}}_createCellCoords(e,t){return new i.default(e,t,a(h,this))}}t.default=d},98719(e,t,o){"use strict";var r=o(36593);t.__esModule=!0;var n=r(o(59312)),i=o(1786),s=o(55268),a=r(o(24200)),l=r(o(45866)),h=r(o(26640)),d=r(o(96065));t.default=class{get eventManager(){return new a.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,s.randomString)()}`),(0,n.default)(this,"drawInterrupted",!1),(0,n.default)(this,"drawn",!1),(0,n.default)(this,"activeOverlayName","master"),(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 l.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 d.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()||(0,i.hasZeroHeight)(this.wtTable.wtRootElement.parentNode)?this.drawInterrupted=!0:this.wtTable.draw(e),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"),r=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-r){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-r&&this.wtOverlays.bottomOverlay&&this.wtOverlays.bottomOverlay.clone)return this.wtOverlays.bottomOverlay.clone.wtTable.getCell(e)}return this.wtTable.getCell(e)}scrollViewport(e,t,o){return this.wtScroll.scrollViewport(e,t,o)}scrollViewportHorizontally(e,t){return this.wtScroll.scrollViewportHorizontally(e,t)}scrollViewportVertically(e,t){return this.wtScroll.scrollViewportVertically(e,t)}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")}}}}},42206(e,t,o){"use strict";var r=o(36593);t.__esModule=!0;var n=r(o(59312)),i=r(o(19839)),s=r(o(98719));class a extends s.default{constructor(e,t,o){super(e,t),(0,n.default)(this,"cloneSource",void 0),(0,n.default)(this,"cloneOverlay",void 0);const r=this.wtSettings.getSetting("facade",this);this.cloneSource=o.source,this.cloneOverlay=o.overlay,this.wtTable=this.cloneOverlay.createTable(this.getTableDao(),r,this.domBindings,this.wtSettings),this.wtViewport=o.viewport,this.selectionManager=o.selectionManager,this.wtEvent=new i.default(r,this.domBindings,this.wtSettings,this.eventManager,this.wtTable,this.selectionManager,o.event),this.findOriginalHeaders()}}t.default=a},81076(e,t,o){"use strict";var r=o(36593);t.__esModule=!0;var n=r(o(19839)),i=r(o(32778)),s=o(69800),a=r(o(93246)),l=r(o(78900)),h=r(o(1813)),d=r(o(98719)),c=o(99933),u=o(8678),g=o(1786);class p extends d.default{constructor(e,t){super(e,new a.default(t));const o=this.wtSettings.getSetting("facade",this);this.wtTable=new l.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 c.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,u.objectEach)({rowHeaders:"htRowHeaders",columnHeaders:"htColumnHeaders"},(o,r)=>{this.wtSettings.getSetting(r).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(!s.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=p},19839(e,t,o){"use strict";t.__esModule=!0;var r=o(1786),n=o(18357),i=o(12127),s=o(96709),a=o(44818);function l(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(c(e,t))}function d(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,g=new WeakMap,p=new WeakMap,f=new WeakMap,m=new WeakMap,C=new WeakMap,w=new WeakMap,b=new WeakMap,v=new WeakMap,y=new WeakMap;t.default=class{constructor(e,t,o,r,n,i){let s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;l(this,u,void 0),l(this,g,void 0),l(this,p,void 0),l(this,f,void 0),l(this,m,void 0),l(this,C,void 0),l(this,w,void 0),l(this,b,void 0),l(this,v,[null,null]),l(this,y,[null,null]),d(u,this,o),d(g,this,t),d(p,this,n),d(f,this,i),d(m,this,s),d(C,this,r),d(w,this,e),this.registerEvents()}registerEvents(){h(C,this).addEventListener(h(p,this).holder,"contextmenu",e=>this.onContextMenu(e)),h(C,this).addEventListener(h(p,this).TABLE,"mouseover",e=>this.onMouseOver(e)),h(C,this).addEventListener(h(p,this).TABLE,"mouseout",e=>this.onMouseOut(e));const e=()=>{h(C,this).addEventListener(h(p,this).holder,"touchstart",e=>this.onTouchStart(e)),h(C,this).addEventListener(h(p,this).holder,"touchend",e=>this.onTouchEnd(e)),this.momentumScrolling||(this.momentumScrolling={}),h(C,this).addEventListener(h(p,this).holder,"scroll",()=>{clearTimeout(this.momentumScrolling._timeout),this.momentumScrolling.ongoing||h(u,this).getSetting("onBeforeTouchScroll"),this.momentumScrolling.ongoing=!0,this.momentumScrolling._timeout=setTimeout(()=>{this.touchApplied||(this.momentumScrolling.ongoing=!1,h(u,this).getSetting("onAfterMomentumScroll"))},200)})},t=()=>{h(C,this).addEventListener(h(p,this).holder,"mouseup",e=>this.onMouseUp(e)),h(C,this).addEventListener(h(p,this).holder,"mousedown",e=>this.onMouseDown(e))};(0,s.isMobileBrowser)()?e():((0,i.isTouchSupported)()&&e(),t())}selectedCellWasTouched(e){const t=this.parentCell(e).coords;if(h(b,this)&&t){const[e,o]=[t.row,h(b,this).from.row],[r,n]=[t.col,h(b,this).from.col];return e===o&&r===n}return!1}parentCell(e){const t={},o=h(p,this).TABLE,n=(0,r.closestDown)(e,["TD","TH"],o);return n?(t.coords=h(p,this).getCoords(n),t.TD=n):(0,r.hasClass)(e,"wtBorder")&&(0,r.hasClass)(e,"current")?(t.coords=h(f,this).getFocusSelection().cellRange.highlight,t.TD=h(p,this).getCell(t.coords)):(0,r.hasClass)(e,"wtBorder")&&(0,r.hasClass)(e,"area")&&h(f,this).getAreaSelection().cellRange&&(t.coords=h(f,this).getAreaSelection().cellRange.to,t.TD=h(p,this).getCell(t.coords)),t}onMouseDown(e){const t=h(g,this).rootDocument.activeElement,o=(0,n.partial)(r.getParent,e.target),i=e.target;if(!["TD","TH"].includes(t.nodeName)&&(i===t||o(0)===t||o(1)===t))return;const s=this.parentCell(i);(0,r.hasClass)(i,"corner")?h(u,this).getSetting("onCellCornerMouseDown",e,i):s.TD&&h(u,this).has("onCellMouseDown")&&this.callListener("onCellMouseDown",e,s.coords,s.TD),(0===e.button||this.touchApplied)&&s.TD&&(h(y,this)[0]=s.TD,clearTimeout(h(v,this)[0]),h(v,this)[0]=setTimeout(()=>{h(y,this)[0]=null},1e3))}onContextMenu(e){if(h(u,this).has("onCellContextMenu")){const t=this.parentCell(e.target);t.TD&&this.callListener("onCellContextMenu",e,t.coords,t.TD)}}onMouseOver(e){if(!h(u,this).has("onCellMouseOver"))return;const t=h(p,this).TABLE,o=(0,r.closestDown)(e.target,["TD","TH"],t),n=h(m,this)||this;o&&o!==n.lastMouseOver&&(0,r.isChildOf)(o,t)&&(n.lastMouseOver=o,this.callListener("onCellMouseOver",e,h(p,this).getCoords(o),o))}onMouseOut(e){if(!h(u,this).has("onCellMouseOut"))return;const t=h(p,this).TABLE,o=(0,r.closestDown)(e.target,["TD","TH"],t),n=(0,r.closestDown)(e.relatedTarget,["TD","TH"],t),i=h(m,this)||this;o&&o!==n&&(0,r.isChildOf)(o,t)&&(this.callListener("onCellMouseOut",e,h(p,this).getCoords(o),o),null===n&&(i.lastMouseOver=null))}onMouseUp(e){const t=this.parentCell(e.target);t.TD&&h(u,this).has("onCellMouseUp")&&this.callListener("onCellMouseUp",e,t.coords,t.TD),(0===e.button||this.touchApplied)&&(t.TD===h(y,this)[0]&&t.TD===h(y,this)[1]?((0,r.hasClass)(e.target,"corner")?this.callListener("onCellCornerDblClick",e,t.coords,t.TD):this.callListener("onCellDblClick",e,t.coords,t.TD),h(y,this)[0]=null,h(y,this)[1]=null):t.TD===h(y,this)[0]&&(h(y,this)[1]=t.TD,clearTimeout(h(v,this)[1]),h(v,this)[1]=setTimeout(()=>{h(y,this)[1]=null},500)))}onTouchStart(e){d(b,this,h(f,this).getFocusSelection().cellRange),this.touchApplied=!0,this.onMouseDown(e)}onTouchEnd(e){var t;const o=e.target,r=null===(t=this.parentCell(o))||void 0===t?void 0:t.coords,n=(0,a.isDefined)(r)&&r.row>=0&&r.col>=0;if(e.cancelable&&n&&h(u,this).getSetting("isDataViewInstance")){const t=["A","BUTTON","INPUT"];(0,s.isIOS)()&&((0,s.isChromeWebKit)()||(0,s.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,r){const n=h(u,this).getSettingPure(e);n&&n(t,o,r,h(w,this).call(this))}destroy(){clearTimeout(h(v,this)[0]),clearTimeout(h(v,this)[1]),h(C,this).destroy()}}},39163(e,t,o){"use strict";var r=o(36593);t.__esModule=!0;var n=r(o(81076)),i=r(o(98719));class s{constructor(e){e instanceof i.default?this._wot=e:this._initFromSettings(e)}_initFromSettings(e){e.facade=e=>{const t=new s(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 activeOverlayName(){return this._wot.activeOverlayName}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){return this._wot.scrollViewport(e,t,o)}scrollViewportHorizontally(e,t){return this._wot.scrollViewportHorizontally(e,t)}scrollViewportVertically(e,t){return this._wot.scrollViewportVertically(e,t)}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,r,n){return this._wot.wtSettings.getSetting(e,t,o,r,n)}hasSetting(e){return this._wot.wtSettings.hasSetting(e)}destroy(){this._wot.destroy()}}t.default=s},29222(e,t,o){"use strict";var r=o(36593);t.__esModule=!0;var n=r(o(59312));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))}}},60742(e,t,o){"use strict";var r=o(36593);t.__esModule=!0;var n=r(o(59312));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))}}},29931(e,t,o){"use strict";var r=o(36593);t.__esModule=!0;var n=o(74888);t.ViewportColumnsCalculator=n.ViewportColumnsCalculator,t.ViewportRowsCalculator=n.ViewportRowsCalculator,t.DEFAULT_COLUMN_WIDTH=n.DEFAULT_COLUMN_WIDTH;var i=r(o(26640));t.CellCoords=i.default;var s=r(o(96065));t.CellRange=s.default;var a=r(o(39163));t.default=a.default,t.Core=a.default;var l=o(55234);t.Selection=l.Selection,t.HIGHLIGHT_ACTIVE_HEADER_TYPE=l.ACTIVE_HEADER_TYPE,t.HIGHLIGHT_AREA_TYPE=l.AREA_TYPE,t.HIGHLIGHT_FOCUS_TYPE=l.FOCUS_TYPE,t.HIGHLIGHT_FILL_TYPE=l.FILL_TYPE,t.HIGHLIGHT_HEADER_TYPE=l.HEADER_TYPE,t.HIGHLIGHT_ROW_TYPE=l.ROW_TYPE,t.HIGHLIGHT_COLUMN_TYPE=l.COLUMN_TYPE,t.HIGHLIGHT_CUSTOM_SELECTION_TYPE=l.CUSTOM_SELECTION_TYPE;var h=function(e,t){if("function"==typeof WeakMap)var o=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var n,i,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(n=t?r:o){if(n.has(e))return n.get(e);n.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(n=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?n(s,t,i):s[t]=e[t]);return s}(e,t)}(o(66203));t.Renderer=h;var d=o(57651);t.OrderView=d.OrderView,t.SharedOrderView=d.SharedOrderView;var c=o(44098);t.NodesPool=c.NodesPool;var u=o(24200);t.getListenersCounter=u.getListenersCounter},74472(e,t,o){"use strict";var r=o(36593);t.__esModule=!0;var n=r(o(59312)),i=o(1786),s=o(8678),a=o(34068),l=o(35421),h=r(o(42206)),d=o(25029),c=o(63258);t.Overlay=class{constructor(e,t,o,r,a){(0,n.default)(this,"wtSettings",null),(0,s.defineGetter)(this,"wot",e,{writable:!1}),this.domBindings=a,this.facadeGetter=t,this.wtSettings=r;const{TABLE:l,hider:h,spreader:d,holder:c,wtRootElement:u}=this.wot.wtTable;this.instance=this.wot,this.type=o,this.mainTableScrollableElement=null,this.TABLE=l,this.hider=h,this.spreader=d,this.holder=c,this.wtRootElement=u,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,o=t.getComputedStyle(e.wtRootElement.parentNode).getPropertyValue("overflow");this.mainTableScrollableElement="hidden"===o||"clip"===o?this.wot.wtTable.holder:(0,i.getScrollableElement)(e.TABLE)}getRelativeCellPosition(e,t,o){if(!1===this.clone.wtTable.holder.contains(e))return void(0,a.warn)(`The provided element is not a child of the ${this.type} overlay`);const r=this.mainTableScrollableElement===this.domBindings.rootWindow,n=o<this.wtSettings.getSetting("fixedColumnsStart"),i=t<this.wtSettings.getSetting("fixedRowsTop"),s=t>=this.wtSettings.getSetting("totalRows")-this.wtSettings.getSetting("fixedRowsBottom"),l=this.clone.wtTable.spreader,h={start:this.getRelativeStartPosition(l),top:l.offsetTop},d={start:this.getRelativeStartPosition(e),top:e.offsetTop};let c=null;return c=r?this.getRelativeCellPositionWithinWindow(i,n,d,h):this.getRelativeCellPositionWithinHolder(i,s,n,d,h),c}getRelativeStartPosition(e){return this.isRtl()?e.offsetParent.offsetWidth-e.offsetLeft-e.offsetWidth:e.offsetLeft}getRelativeCellPositionWithinWindow(e,t,o,r){const n=this.wot.wtTable.wtRootElement.getBoundingClientRect();let s=0,a=0;if(t){let e=n.left;this.isRtl()&&(e=this.domBindings.rootWindow.innerWidth-(n.left+n.width+(0,i.getScrollbarWidth)())),s=e<=0?-1*e:0}else s=r.start;if(e){a=this.clone.wtTable.TABLE.getBoundingClientRect().top-n.top}else a=r.top;return{start:o.start+s,top:o.top+a}}getRelativeCellPositionWithinHolder(e,t,o,r,n){const i=this.wot.wtOverlays.inlineStartOverlay.getScrollPosition(),s=this.wot.wtOverlays.topOverlay.getScrollPosition();let a=0,l=0;if(o||(a=i-n.start),t){const e=this.wot.wtTable.wtRootElement.getBoundingClientRect();l=-1*this.clone.wtTable.TABLE.getBoundingClientRect().top+e.top}else e||(l=s-n.top);return{start:r.start-a,top:r.top-l}}makeClone(){-1===l.CLONE_TYPES.indexOf(this.type)&&(0,c.throwWithCause)(`Clone type "${this.type}" is not supported.`);const{wtTable:e,wtSettings:t}=this.wot,{rootDocument:o,rootWindow:r}=this.domBindings,n=o.createElement("div"),s=o.createElement("table"),a=e.wtRootElement.parentNode;n.className=`${l.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,d.A11Y_PRESENTATION)()]),s.className=e.TABLE.className;e.TABLE.getAttribute("role")&&s.setAttribute("role",e.TABLE.getAttribute("role")),n.appendChild(s),a.appendChild(n);const u=this.wtSettings.getSetting("preventOverflow"),g=r.getComputedStyle(a).getPropertyValue("overflow");return!0===u||"horizontal"===u&&this.type===l.CLONE_TOP||"vertical"===u&&this.type===l.CLONE_INLINE_START?this.mainTableScrollableElement=r:this.mainTableScrollableElement="hidden"===g||"clip"===g?e.holder:(0,i.getScrollableElement)(e.TABLE),new h.default(s,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];if(this.needFullRender){const t=this.clone.cloneSource;t.activeOverlayName=this.clone.wtTable.name,this.clone.draw(e),t.activeOverlayName="master"}}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.des