handsontable 0.0.0-next-8d0643b-20230809 → 0.0.0-next-baf2fcf-20230809
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.
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/dist/handsontable.css +2 -2
- package/dist/handsontable.full.css +2 -2
- package/dist/handsontable.full.js +11 -5
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +2 -2
- package/dist/handsontable.js +11 -5
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +2 -2
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/package.json +1 -1
- package/plugins/manualColumnResize/manualColumnResize.js +6 -0
- package/plugins/manualColumnResize/manualColumnResize.mjs +7 -1
package/dist/handsontable.min.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("dompurify"),require("pikaday"),require("moment"),require("numbro")):"function"==typeof define&&define.amd?define("Handsontable",["dompurify","pikaday","moment","numbro"],t):"object"==typeof exports?exports.Handsontable=t(require("dompurify"),require("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=[,e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(3),o(4),o(5),o(6);var n=s(o(7)),r=o(209),i=o(253),l=s(o(123)),a=o(232),h=o(260),d=o(275),c=o(279),u=o(145);function g(e,t){const o=new n.default(e,t||{},r.rootInstanceSymbol);return o.init(),o}t.CellCoords=u.CellCoords,t.CellRange=u.CellRange,(0,h.registerCellType)(d.TextCellType),g.editors={BaseEditor:c.BaseEditor},g.Core=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new n.default(e,t,r.rootInstanceSymbol)},g.DefaultSettings=(0,i.metaSchemaFactory)(),g.hooks=l.default.getSingleton(),g.CellCoords=u.CellCoords,g.CellRange=u.CellRange,g.packageName="handsontable",g.buildDate="09/08/2023 10:27:09",g.version="0.0.0-next-8d0643b-20230809",g.languages={dictionaryKeys:a.dictionaryKeys,getLanguageDictionary:a.getLanguageDictionary,getLanguagesDictionaries:a.getLanguagesDictionaries,registerLanguageDictionary:a.registerLanguageDictionary,getTranslatedPhrase:a.getTranslatedPhrase};var f=g;t.default=f},(e,t,o)=>{"use strict";o.r(t)},(e,t,o)=>{"use strict";o.r(t)},(e,t,o)=>{"use strict";o.r(t)},(e,t,o)=>{"use strict";o.r(t)},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.default=function(e,t){var o;let s=arguments.length>2&&void 0!==arguments[2]&&arguments[2],D=!1,H=this;const L=new h.default(H);let k,V,F,W,B=!0;(0,R.hasValidParameter)(s)&&(0,R.registerAsRootInstance)(this);this.rootElement=e,this.rootDocument=e.ownerDocument,this.rootWindow=this.rootDocument.defaultView,this.isDestroyed=!1,this.renderSuspendedCounter=0,this.executionSuspendedCounter=0;const U=null!==(o=null==t?void 0:t.layoutDirection)&&void 0!==o?o:"inherit",j=["rtl","ltr"].includes(U)?U:this.rootWindow.getComputedStyle(this.rootElement).direction;this.rootElement.setAttribute("dir",j),this.isRtl=function(){return"rtl"===j},this.isLtr=function(){return!H.isRtl()},this.getDirectionFactor=function(){return H.isLtr()?1:-1},t.language=(0,_.getValidLanguageCode)(t.language);const Y=new I.MetaManager(H,t,[I.DynamicCellMetaMod,I.ExtendMetaPropertiesMod]),G=Y.getTableMeta(),z=Y.getGlobalMeta(),K=(0,N.createUniqueMap)();this.container=this.rootDocument.createElement("div"),this.renderCall=!1,e.insertBefore(this.container,e.firstChild),(0,R.isRootInstance)(this)&&(0,i._injectProductInfo)(t.licenseKey,e);this.guid=`ht_${(0,C.randomString)()}`,this.columnIndexMapper=new S.IndexMapper,this.rowIndexMapper=new S.IndexMapper,this.columnIndexMapper.addLocalHook("indexesSequenceChange",(e=>{H.runHooks("afterColumnSequenceChange",e)})),this.rowIndexMapper.addLocalHook("indexesSequenceChange",(e=>{H.runHooks("afterRowSequenceChange",e)})),V=new v.default(H),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid);const $=e=>{const{row:t,col:o}=e;return H._createCellCoords(t>=0?H.rowIndexMapper.getRenderableFromVisualIndex(t):t,o>=0?H.columnIndexMapper.getRenderableFromVisualIndex(o):o)};let X=new M.Selection(G,{rowIndexMapper:()=>H.rowIndexMapper,columnIndexMapper:()=>H.columnIndexMapper,countCols:()=>H.countCols(),countRows:()=>H.countRows(),propToCol:e=>k.propToCol(e),isEditorOpened:()=>!!H.getActiveEditor()&&H.getActiveEditor().isOpened(),countColsTranslated:()=>this.view.countRenderableColumns(),countRowsTranslated:()=>this.view.countRenderableRows(),getShortcutManager:()=>H.getShortcutManager(),createCellCoords:(e,t)=>H._createCellCoords(e,t),createCellRange:(e,t,o)=>H._createCellRange(e,t,o),visualToRenderableCoords:$,renderableToVisualCoords:e=>{const{row:t,col:o}=e;return H._createCellCoords(t>=0?H.rowIndexMapper.getVisualFromRenderableIndex(t):t,o>=0?H.columnIndexMapper.getVisualFromRenderableIndex(o):o)},isDisabledCellSelection:(e,t)=>H.getCellMeta(e,t).disableVisualSelection});this.selection=X;const q=e=>{let{hiddenIndexesChanged:t}=e;t&&this.selection.refresh()};function Q(e){const t=(0,O.normalizeLanguageCode)(e);(0,_.hasLanguageDictionary)(t)?(H.runHooks("beforeLanguageChange",t),z.language=t,H.runHooks("afterLanguageChange",t)):(0,O.warnUserAboutLanguageRegistration)(e)}function J(e,t){const o="className"===e?H.rootElement:H.table;if(B)(0,n.addClass)(o,t);else{let s=[],r=[];z[e]&&(s=Array.isArray(z[e])?z[e]:(0,c.stringToArray)(z[e])),t&&(r=Array.isArray(t)?t:(0,c.stringToArray)(t));const i=(0,c.getDifferenceOfArrays)(s,r),l=(0,c.getDifferenceOfArrays)(r,s);i.length&&(0,n.removeClass)(o,i),l.length&&(0,n.addClass)(o,l)}z[e]=t}function Z(){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 ee(e){const t=e.replace(",",".");return!1===isNaN(parseFloat(t))?parseFloat(t):e}function te(e,t,o){if(!e.length)return;const s=H.getActiveEditor(),r=new Z;let i=!0;r.onQueueEmpty=e=>{s&&i&&s.cancelChanges(),o(e)};for(let o=e.length-1;o>=0;o--){const[s,l,,a]=e[o],h=k.propToCol(l),d=H.getCellMeta(s,h);"numeric"===d.type&&"string"==typeof a&&(0,w.isNumericLike)(a)&&(e[o][3]=ee(a)),H.getCellValidator(d)&&(r.addValidatorToQueue(),H.validateCell(e[o][3],d,function(t,o){return function(s){if("boolean"!=typeof s)throw new Error("Validation error: result is not boolean");if(!1===s&&!1===o.allowInvalid){i=!1,e.splice(t,1),o.valid=!0;const s=H.getCell(o.visualRow,o.visualCol);null!==s&&(0,n.removeClass)(s,G.invalidCellClassName)}r.removeValidatorFormQueue()}}(o,d),t))}r.checkIfQueueIsEmpty()}function oe(e,t){let o=e.length-1;if(o<0)return;for(;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(G.allowInsertRow)for(;e[o][0]>H.countRows()-1;){const{delta:e}=k.createRow(void 0,void 0,{source:t});if(0===e){s=!0;break}}if("array"===H.dataType&&(!G.columns||0===G.columns.length)&&G.allowInsertColumn)for(;k.propToCol(e[o][1])>H.countCols()-1;){const{delta:e}=k.createCol(void 0,void 0,{source:t});if(0===e){s=!0;break}}s||k.set(e[o][0],e[o][1],e[o][3])}}else e.splice(o,1)}H.forceFullRender=!0,F.adjustRowsAndCols(),H.runHooks("beforeChangeRender",e,t),W.lockEditor(),H._refreshBorders(null),W.unlockEditor(),H.view.adjustElementsSize(),H.runHooks("afterChange",e,t||"edit");const s=H.getActiveEditor();s&&(0,i.isDefined)(s.refreshValue)&&s.refreshValue()}function se(e,t,o){return Array.isArray(e)?e:[[e,t,o]]}function ne(e,t){const o=H.getActiveEditor(),s=H.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",q),this.rowIndexMapper.addLocalHook("cacheUpdated",q),this.selection.addLocalHook("beforeSetRangeStart",(e=>{this.runHooks("beforeSetRangeStart",e)})),this.selection.addLocalHook("beforeSetRangeStartOnly",(e=>{this.runHooks("beforeSetRangeStartOnly",e)})),this.selection.addLocalHook("beforeSetRangeEnd",(e=>{this.runHooks("beforeSetRangeEnd",e),e.row<0&&(e.row=this.view._wt.wtTable.getFirstVisibleRow()),e.col<0&&(e.col=this.view._wt.wtTable.getFirstVisibleColumn())})),this.selection.addLocalHook("afterSetRangeEnd",(e=>{const t=(0,d.createObjectPropListener)(!1),o=this.selection.getSelectedRange(),{from:s,to:r}=o.current(),i=o.size()-1;this.runHooks("afterSelection",s.row,s.col,r.row,r.col,t,i),this.runHooks("afterSelectionByProp",s.row,H.colToProp(s.col),r.row,H.colToProp(r.col),t,i);const l=this.selection.isSelectedByAnyHeader(),a=this.selection.selectedRange.current();let h=!0;D&&(h=!1),t.isTouched()&&(h=!t.value);const c=this.selection.isSelectedByRowHeader(),u=this.selection.isSelectedByColumnHeader();!1!==h&&(l?c?this.view.scrollViewportVertically(H.rowIndexMapper.getRenderableFromVisualIndex(e.row)):u&&this.view.scrollViewportHorizontally(H.columnIndexMapper.getRenderableFromVisualIndex(e.col)):a&&!this.selection.isMultiple()?this.view.scrollViewport($(a.from)):this.view.scrollViewport($(e))),c&&u?(0,n.addClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]):c?((0,n.removeClass)(this.rootElement,"ht__selection--columns"),(0,n.addClass)(this.rootElement,"ht__selection--rows")):u?((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"]),this._refreshBorders(null)})),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,H.colToProp(o.col),s.row,H.colToProp(s.col),t)})),this.selection.addLocalHook("afterIsMultipleSelection",(e=>{const t=this.runHooks("afterIsMultipleSelection",e.value);e.value&&(e.value=t)})),this.selection.addLocalHook("beforeModifyTransformStart",(e=>{this.runHooks("modifyTransformStart",e)})),this.selection.addLocalHook("afterModifyTransformStart",((e,t,o)=>{this.runHooks("afterModifyTransformStart",e,t,o)})),this.selection.addLocalHook("beforeModifyTransformEnd",(e=>{this.runHooks("modifyTransformEnd",e)})),this.selection.addLocalHook("afterModifyTransformEnd",((e,t,o)=>{this.runHooks("afterModifyTransformEnd",e,t,o)})),this.selection.addLocalHook("afterDeselect",(()=>{W.destroyEditor(),this._refreshBorders(),(0,n.removeClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]),this.runHooks("afterDeselect")})),this.selection.addLocalHook("insertRowRequire",(e=>{this.alter("insert_row_above",e,1,"auto")})),this.selection.addLocalHook("insertColRequire",(e=>{this.alter("insert_col_start",e,1,"auto")})),F={alter(e,t){var o,s;let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=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,c.arrayReduce)(t,((e,t)=>{let[o,s]=t;const n=e[e.length-1],[r,i]=n,l=r+i;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=H.countSourceRows();if(G.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:d,startPhysicalIndex:u}=k.createRow(t,n,{source:r,mode:h});if(d){const e=X.selectedRange.current(),t=null==e?void 0:e.from,o=null==t?void 0:t.row,s=H.toVisualRow(u);if(X.isSelectedByCorner())H.selectAll();else if((0,i.isDefined)(o)&&o>=s){const{row:s,col:n}=e.to;let r=t.col;X.isSelectedByRowHeader()&&(r=-1),X.getSelectedRange().pop(),X.setRangeStartOnly(H._createCellCoords(o+d,r),!0),X.setRangeEnd(H._createCellCoords(s+d,n))}else H._refreshBorders()}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?H.countSourceCols():0;const{delta:f,startPhysicalIndex:p}=k.createCol(t,n,{source:r,mode:g});if(f){if(Array.isArray(G.colHeaders)){const e=[H.toVisualColumn(p),0];e.length+=f,Array.prototype.splice.apply(G.colHeaders,e)}const e=X.selectedRange.current(),t=null==e?void 0:e.from,o=null==t?void 0:t.col,s=H.toVisualColumn(p);if(X.isSelectedByCorner())H.selectAll();else if((0,i.isDefined)(o)&&o>=s){const{row:s,col:n}=e.to;let r=t.row;X.isSelectedByColumnHeader()&&(r=-1),X.getSelectedRange().pop(),X.setRangeStartOnly(H._createCellCoords(r,o+f),!0),X.setRangeEnd(H._createCellCoords(s,n+f))}else H._refreshBorders()}break;case"remove_row":const m=e=>{let t=0;(0,c.arrayEach)(e,(e=>{let[o,s]=e;const n=(0,i.isEmpty)(o)?H.countRows()-1:Math.max(o-t,0);Number.isInteger(o)&&(o=Math.max(o-t,0));if(!k.removeRow(o,s,r))return;const l=H.countRows(),a=G.fixedRowsTop;a>=n+1&&(G.fixedRowsTop-=Math.min(s,a-n));const h=G.fixedRowsBottom;h&&n>=l-h&&(G.fixedRowsBottom-=Math.min(s,h)),t+=s}))};Array.isArray(t)?m(a(t)):m([[t,n]]),F.adjustRowsAndCols(),H._refreshBorders();break;case"remove_col":const C=e=>{let t=0;(0,c.arrayEach)(e,(e=>{let[o,s]=e;const n=(0,i.isEmpty)(o)?H.countCols()-1:Math.max(o-t,0);let l=H.toPhysicalColumn(n);Number.isInteger(o)&&(o=Math.max(o-t,0));if(!k.removeCol(o,s,r))return;const a=G.fixedColumnsStart;a>=n+1&&(G.fixedColumnsStart-=Math.min(s,a-n)),Array.isArray(G.colHeaders)&&(void 0===l&&(l=-1),G.colHeaders.splice(l,s)),t+=s}))};Array.isArray(t)?C(a(t)):C([[t,n]]),F.adjustRowsAndCols(),H._refreshBorders();break;default:throw new Error(`There is no such action "${e}"`)}l||F.adjustRowsAndCols()},adjustRowsAndCols(){const e=G.minRows,t=G.minSpareRows,o=G.minCols,s=G.minSpareCols;if(0===H.countRows()&&0===H.countCols()&&X.deselect(),e){const t=H.countRows();t<e&&k.createRow(t,e-t,{source:"auto"})}if(t){const e=H.countEmptyRows(!0);if(e<t){const o=t-e,s=Math.min(o,G.maxRows-H.countSourceRows());k.createRow(H.countRows(),s,{source:"auto"})}}{let e;(o||s)&&(e=H.countEmptyCols(!0));let t=H.countCols();if(o&&!G.columns&&t<o){const s=o-t;e+=s,k.createCol(t,s,{source:"auto"})}if(s&&!G.columns&&"array"===H.dataType&&e<s){t=H.countCols();const o=s-e,n=Math.min(o,G.maxCols-t);k.createCol(t,n,{source:"auto"})}}if(X.isSelected()){const e=H.countRows(),t=H.countCols();(0,c.arrayEach)(X.selectedRange,(o=>{let s=!1,n=o.from.row,r=o.from.col,i=o.to.row,l=o.to.col;n>e-1?(n=e-1,s=!0,i>n&&(i=n)):i>e-1&&(i=e-1,s=!0,n>i&&(n=i)),r>t-1?(r=t-1,s=!0,l>r&&(l=r)):l>t-1&&(l=t-1,s=!0,r>l&&(r=l)),s&&H.selectCell(n,r,i,l)}))}H.view&&H.view.adjustElementsSize()},populateFromArray(e,t,o,s,n){let r,i,l,a;const h=[],u={},g=[],f=e.row,p=e.col;if(i=t.length,0===i)return!1;let m=0,C=0;switch((0,d.isObject)(o)&&(m=o.col-p+1,C=o.row-f+1),n){case"shift_down":const n=(0,c.pivot)(t),w=n.length,y=Math.max(w,m),v=H.getData().slice(f),E=(0,c.pivot)(v).slice(p,p+y);for(l=0;l<y;l+=1)if(l<w){for(r=0,i=n[l].length;r<C-i;r+=1)n[l].push(n[l][r%i]);l<E.length?g.push(n[l].concat(E[l])):g.push(n[l].concat(new Array(v.length).fill(null)))}else g.push(n[l%w].concat(E[l]));H.populateFromArray(f,p,(0,c.pivot)(g));break;case"shift_right":const S=t.length,R=Math.max(S,C),b=H.getData().slice(f).map((e=>e.slice(p)));for(r=0;r<R;r+=1)if(r<S){for(l=0,a=t[r].length;l<m-a;l+=1)t[r].push(t[r][l%a]);if(r<b.length)for(let e=0;e<b[r].length;e+=1)t[r].push(b[r][e]);else t[r].push(...new Array(b[0].length).fill(null))}else t.push(t[r%i].slice(0,R).concat(b[r]));H.populateFromArray(f,p,t);break;default:u.row=e.row,u.col=e.col;let T,_=0,O=0,M=!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(i=o?A:Math.max(N,A),r=0;r<i&&!(o&&u.row>o.row&&A>N||!G.allowInsertRow&&u.row>H.countRows()-1||u.row>=G.maxRows);r++){const t=r-_,n=I(t).length,c=o?o.col-e.col+1:0;if(a=o?c:Math.max(n,c),u.col=e.col,T=H.getCellMeta(u.row,u.col),"CopyPaste.paste"!==s&&"Autofill.fill"!==s||!T.skipRowOnPaste){for(O=0,l=0;l<a&&!(o&&u.col>o.col&&c>n||!G.allowInsertColumn&&u.col>H.countCols()-1||u.col>=G.maxCols);l++){if(T=H.getCellMeta(u.row,u.col),("CopyPaste.paste"===s||"Autofill.fill"===s)&&T.skipColumnOnPaste){O+=1,u.col+=1,a+=1;continue}if(T.readOnly&&"UndoRedo.undo"!==s){u.col+=1;continue}let e=I(t,l-O),o=H.getDataAtCell(u.row,u.col);if(null!==e&&"object"==typeof e)if(Array.isArray(e)&&null===o&&(o=[]),null===o||"object"!=typeof o)M=!1;else{const t=(0,d.duckSchema)(Array.isArray(o)?o:o[0]||o),s=(0,d.duckSchema)(Array.isArray(e)?e:e[0]||e);(0,d.isObjectEqual)(t,s)||Array.isArray(t)&&Array.isArray(s)?e=(0,d.deepClone)(e):M=!1}else null!==o&&"object"==typeof o&&(M=!1);M&&h.push([u.row,u.col,e]),M=!0,u.col+=1}u.row+=1}else _+=1,u.row+=1,i+=1}H.setDataAtCell(h,null,null,s||"populateFromArray")}}},this.init=function(){V.setData(G.data),H.runHooks("beforeInit"),((0,l.isMobileBrowser)()||(0,l.isIpadOS)())&&(0,n.addClass)(H.rootElement,"mobile"),this.updateSettings(G,!0),this.view=new y.default(this),W=a.default.getInstance(H,G,X),H.runHooks("init"),this.forceFullRender=!0,this.view.render(),B&&null===H.rootElement.offsetParent&&(0,n.observeVisibilityChangeOnce)(H.rootElement,(()=>{H.view._wt.wtOverlays.updateLastSpreaderSize(),H.render(),H.view.adjustElementsSize()})),"object"==typeof B&&(H.runHooks("afterChange",B[0],B[1]),B=!1),H.runHooks("afterInit")},this._createCellCoords=function(e,t){return H.view._wt.createCellCoords(e,t)},this._createCellRange=function(e,t,o){return H.view._wt.createCellRange(e,t,o)},this.validateCell=function(e,t,o,s){let n=H.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,r=H.getCell(n,s,!0);if(r&&"TH"!==r.nodeName){const e=H.rowIndexMapper.getRenderableFromVisualIndex(n),t=H.columnIndexMapper.getRenderableFromVisualIndex(s);H.view._wt.getSetting("cellRenderer",e,t,r)}o(e)}var a;(0,i.isRegExp)(n)&&(a=n,n=function(e,t){t(a.test(e))}),(0,r.isFunction)(n)?(e=H.runHooks("beforeValidate",e,t.visualRow,t.prop,s),H._registerImmediate((()=>{n.call(t,e,(o=>{H&&(o=H.runHooks("afterValidate",o,e,t.visualRow,t.prop,s),t.valid=o,l(o),H.runHooks("postAfterValidate",o,e,t.visualRow,t.prop,s))}))}))):H._registerImmediate((()=>{t.valid=!0,l(t.valid,!1)}))},this.setDataAtCell=function(e,t,o,s){const n=se(e,t,o),r=[];let i,l,a,h=s;for(i=0,l=n.length;i<l;i++){if("object"!=typeof n[i])throw new Error("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter");if("number"!=typeof n[i][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[i][1]>=this.countCols()?n[i][1]:k.colToProp(n[i][1]),r.push([n[i][0],a,V.getAtCell(this.toPhysicalRow(n[i][0]),n[i][1]),n[i][2]])}h||"object"!=typeof e||(h=t);const d=ne(r,s);H.runHooks("afterSetDataAtCell",d,h),te(d,h,(()=>{oe(d,h)}))},this.setDataAtRowProp=function(e,t,o,s){const n=se(e,t,o),r=[];let i,l,a=s;for(i=0,l=n.length;i<l;i++)r.push([n[i][0],n[i][1],V.getAtCell(this.toPhysicalRow(n[i][0]),n[i][1]),n[i][2]]);a||"object"!=typeof e||(a=t);const h=ne(r,s);H.runHooks("afterSetDataAtRowProp",h,a),te(h,a,(()=>{oe(h,a)}))},this.listen=function(){H&&!H.isListening()&&(x=H.guid,H.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(x=null,H.runHooks("afterUnlisten"))},this.isListening=function(){return x===H.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];H._refreshBorders(e,t)},this.populateFromArray=function(e,t,o,s,n,r,i){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?H._createCellCoords(s,n):null;return F.populateFromArray(H._createCellCoords(e,t),o,l,r,i)},this.spliceCol=function(e,t,o){for(var s=arguments.length,n=new Array(s>3?s-3:0),r=3;r<s;r++)n[r-3]=arguments[r];return k.spliceCol(e,t,o,...n)},this.spliceRow=function(e,t,o){for(var s=arguments.length,n=new Array(s>3?s-3:0),r=3;r<s;r++)n[r-3]=arguments[r];return k.spliceRow(e,t,o,...n)},this.getSelected=function(){if(X.isSelected())return(0,c.arrayMap)(X.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(X.isSelected())return Array.from(X.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(!X.isSelected()||0===this.countRows()||0===this.countCols())return;const t=[];(0,c.arrayEach)(X.getSelectedRange(),(e=>{const o=e.getTopStartCorner(),s=e.getBottomEndCorner();(0,w.rangeEach)(o.row,s.row,(e=>{(0,w.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():this._refreshBorders(null))},this.render=function(){this.view&&(this.renderCall=!0,this.forceFullRender=!0,this.isRenderSuspended()||(W.lockEditor(),this._refreshBorders(null),W.unlockEditor()))},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(!H.view)return;const{width:e,height:t}=H.view.getLastSize(),{width:o,height:s}=H.rootElement.getBoundingClientRect(),n=o!==e||s!==t;!1===H.runHooks("beforeRefreshDimensions",{width:e,height:t},{width:o,height:s},n)||((n||H.view._wt.wtOverlays.scrollableElement===H.rootWindow)&&(H.view.setLastSize(o,s),H.render()),H.runHooks("afterRefreshDimensions",{width:e,height:t},{width:o,height:s},n))},this.updateData=function(e,t){(0,I.replaceData)(e,(e=>{k=e}),(e=>{k=e,H.columnIndexMapper.fitToLength(this.getInitialColumnCount()),H.rowIndexMapper.fitToLength(this.countSourceRows()),F.adjustRowsAndCols()}),{hotInstance:H,dataMap:k,dataSource:V,internalSource:"updateData",source:t,metaManager:Y,firstRun:B})},this.loadData=function(e,t){(0,I.replaceData)(e,(e=>{k=e}),(()=>{Y.clearCellsCache(),H.initIndexMappers(),F.adjustRowsAndCols(),B&&(B=[null,"loadData"])}),{hotInstance:H,dataMap:k,dataSource:V,internalSource:"loadData",source:t,metaManager:Y,firstRun:B})},this.getInitialColumnCount=function(){const e=G.columns;let t=0;if(Array.isArray(e))t=e.length;else if((0,r.isFunction)(e))if("array"===H.dataType){const o=this.countSourceCols();for(let s=0;s<o;s+=1)e(s)&&(t+=1)}else"object"!==H.dataType&&"function"!==H.dataType||(t=k.colToPropCache.length);else if((0,i.isDefined)(G.dataSchema)){const e=k.getSchema();t=Array.isArray(e)?e.length:(0,d.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,i.isUndefined)(e)?k.getAll():k.getRange(H._createCellCoords(e,t),H._createCellCoords(o,s),k.DESTINATION_RENDERER)},this.getCopyableText=function(e,t,o,s){return k.getCopyableText(H._createCellCoords(e,t),H._createCellCoords(o,s))},this.getCopyableData=function(e,t){return k.getCopyable(e,k.colToProp(t))},this.getSchema=function(){return k.getSchema()},this.updateSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=(B?H.loadData:H.updateData).bind(this);let s,n,l=!1;if((0,i.isDefined)(e.rows))throw new Error('The "rows" setting is no longer supported. Do you mean startRows, minRows or maxRows?');if((0,i.isDefined)(e.cols))throw new Error('The "cols" setting is no longer supported. Do you mean startCols, minCols or maxCols?');if((0,i.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?Q(e.language):"className"===s?J("className",e.className):"tableClassName"===s&&H.table?(J("tableClassName",e.tableClassName),H.view._wt.wtOverlays.syncOverlayTableClassNames()):T.default.getSingleton().isRegistered(s)||T.default.getSingleton().isDeprecated(s)?((0,r.isFunction)(e[s])||Array.isArray(e[s]))&&(e[s].initialHook=!0,H.addHook(s,e[s])):!t&&(0,d.hasOwnProperty)(e,s)&&(z[s]=e[s]));void 0===e.data&&void 0===G.data?o(null,"updateSettings"):void 0!==e.data?o(e.data,"updateSettings"):void 0!==e.columns&&(k.createMap(),H.initIndexMappers());const a=H.countCols(),h=G.columns;if(h&&(0,r.isFunction)(h)&&(l=!0),void 0===e.cell&&void 0===e.cells&&void 0===e.columns||Y.clearCache(),a>0)for(s=0,n=0;s<a;s++){if(h){const e=l?h(s):h[n];e&&Y.updateColumnMeta(n,e)}n+=1}(0,i.isDefined)(e.cell)&&(0,d.objectEach)(e.cell,(e=>{H.setCellMetaObject(e.row,e.col,e)})),H.runHooks("afterCellMetaReset");let c=H.rootElement.style.height;""!==c&&(c=parseInt(H.rootElement.style.height,10));let u=e.height;if((0,r.isFunction)(u)&&(u=u()),t){H.rootElement.getAttribute("style")&&H.rootElement.setAttribute("data-initialstyle",H.rootElement.getAttribute("style"))}if(null===u){const e=H.rootElement.getAttribute("data-initialstyle");e&&(e.indexOf("height")>-1||e.indexOf("overflow")>-1)?H.rootElement.setAttribute("style",e):(H.rootElement.style.height="",H.rootElement.style.overflow="")}else void 0!==u&&(H.rootElement.style.height=isNaN(u)?`${u}`:`${u}px`,H.rootElement.style.overflow="hidden");if(void 0!==e.width){let t=e.width;(0,r.isFunction)(t)&&(t=t()),H.rootElement.style.width=isNaN(t)?`${t}`:`${t}px`}t||(H.view&&(H.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked(),H.view._wt.exportSettingsAsClassNames()),H.runHooks("afterUpdateSettings",e)),F.adjustRowsAndCols(),H.view&&!B&&(H.forceFullRender=!0,W.lockEditor(),H._refreshBorders(null),H.view._wt.wtOverlays.adjustElementsSize(),W.unlockEditor()),t||!H.view||""!==c&&""!==u&&void 0!==u||c===u||H.view._wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){const e=H.getSelectedLast();if(G.getValue){if((0,r.isFunction)(G.getValue))return G.getValue.call(H);if(e)return H.getData()[e[0][0]][G.getValue]}else if(e)return H.getDataAtCell(e[0],e[1])},this.getSettings=function(){return G},this.clear=function(){this.selectAll(),this.emptySelectedCells()},this.alter=function(e,t,o,s,n){F.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?null:H.view.getCellAtCoords(H._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,r=s;return o>=0&&(n=this.rowIndexMapper.getVisualFromRenderableIndex(o)),s>=0&&(r=this.columnIndexMapper.getVisualFromRenderableIndex(s)),H._createCellCoords(n,r)},this.colToProp=function(e){return k.colToProp(e)},this.propToCol=function(e){return k.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 k.get(e,k.colToProp(t))},this.getDataAtRowProp=function(e,t){return k.get(e,t)},this.getDataAtCol=function(e){const t=[],o=k.getRange(H._createCellCoords(0,e),H._createCellCoords(G.data.length-1,e),k.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=k.getRange(H._createCellCoords(0,k.propToCol(e)),H._createCellCoords(G.data.length-1,k.propToCol(e)),k.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?V.getData():V.getByRange(H._createCellCoords(e,t),H._createCellCoords(o,s)),n},this.getSourceDataArray=function(e,t,o,s){let n;return n=void 0===e?V.getData(!0):V.getByRange(H._createCellCoords(e,t),H._createCellCoords(o,s),!0),n},this.getSourceDataAtCol=function(e){return V.getAtColumn(e)},this.setSourceDataAtCell=function(e,t,o,s){const n=se(e,t,o),r=this.hasHook("afterSetSourceDataAtCell"),l=[];r&&(0,c.arrayEach)(n,(e=>{let[t,o,s]=e;l.push([t,o,V.getAtCell(t,o),s])})),(0,c.arrayEach)(n,(e=>{let[t,o,s]=e;V.setAtCell(t,o,s)})),r&&this.runHooks("afterSetSourceDataAtCell",l,s),this.render();const a=H.getActiveEditor();a&&(0,i.isDefined)(a.refreshValue)&&a.refreshValue()},this.getSourceDataAtRow=function(e){return V.getAtRow(e)},this.getSourceDataAtCell=function(e,t){return V.getAtCell(e,t)},this.getDataAtRow=function(e){return k.getRange(H._createCellCoords(e,0),H._createCellCoords(e,this.countCols()-1),k.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],[r,i]=n;let[,,l,a]=n,h=null,d=null;void 0===l&&(l=r),void 0===a&&(a=i);let c="mixed";return(0,w.rangeEach)(Math.max(Math.min(r,l),0),Math.max(r,l),(e=>{let t=!0;return(0,w.rangeEach)(Math.max(Math.min(i,a),0),Math.max(i,a),(o=>{const s=this.getCellMeta(e,o);return d=s.type,h?t=h===d:h=d,t})),c=t?d:"mixed",t})),c},this.removeCellMeta=function(e,t,o){const[s,n]=[this.toPhysicalRow(e),this.toPhysicalColumn(t)];let r=Y.getCellMetaKeyValue(s,n,o);!1!==H.runHooks("beforeRemoveCellMeta",e,t,o,r)&&(Y.removeCellMeta(s,n,o),H.runHooks("afterRemoveCellMeta",e,t,o,r)),r=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&&Y.removeRow(this.toPhysicalRow(e),t),s.length>0&&(0,c.arrayEach)(s.reverse(),(t=>{Y.createRow(this.toPhysicalRow(e)),(0,c.arrayEach)(t,((t,o)=>this.setCellMetaObject(e,o,t)))})),H.render()},this.setCellMetaObject=function(e,t,o){"object"==typeof o&&(0,d.objectEach)(o,((o,s)=>{this.setCellMeta(e,t,s,o)}))},this.setCellMeta=function(e,t,o,s){if(!1===H.runHooks("beforeSetCellMeta",e,t,o,s))return;let n=e,r=t;e<this.countRows()&&(n=this.toPhysicalRow(e)),t<this.countCols()&&(r=this.toPhysicalColumn(t)),Y.setCellMeta(n,r,o,s),H.runHooks("afterSetCellMeta",e,t,o,s)},this.getCellsMeta=function(){return Y.getCellsMeta()},this.getCellMeta=function(e,t){let o=this.toPhysicalRow(e),s=this.toPhysicalColumn(t);return null===o&&(o=e),null===s&&(s=t),Y.getCellMeta(o,s,{visualRow:e,visualColumn:t})},this.getCellMetaAtRow=function(e){return Y.getCellsMetaAtRow(e)},this.isColumnModificationAllowed=function(){return!("object"===H.dataType||G.columns)},this.getCellRenderer=function(e,t){const o="number"==typeof e?H.getCellMeta(e,t).renderer:e.renderer;return"string"==typeof o?(0,f.getRenderer)(o):(0,i.isUndefined)(o)?(0,f.getRenderer)("text"):o},this.getCellEditor=function(e,t){const o="number"==typeof e?H.getCellMeta(e,t).editor:e.editor;return"string"==typeof o?(0,p.getEditor)(o):(0,i.isUndefined)(o)?(0,p.getEditor)("text"):o},this.getCellValidator=function(e,t){const o="number"==typeof e?H.getCellMeta(e,t).validator:e.validator;return"string"==typeof o?(0,m.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 Z;e&&(s.onQueueEmpty=e);let n=H.countRows()-1;for(;n>=0;){if(void 0!==t&&-1===t.indexOf(n)){n-=1;continue}let e=H.countCols()-1;for(;e>=0;)void 0===o||-1!==o.indexOf(e)?(s.addValidatorToQueue(),H.validateCell(H.getDataAtCell(n,e),H.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=G.rowHeaders,o=e;return void 0!==o&&(o=H.runHooks("modifyRowHeader",o)),void 0===o?(t=[],(0,w.rangeEach)(H.countRows()-1,(e=>{t.push(H.getRowHeader(e))}))):Array.isArray(t)&&void 0!==t[o]?t=t[o]:(0,r.isFunction)(t)?t=t(o):t&&"string"!=typeof t&&"number"!=typeof t&&(t=o+1),t},this.hasRowHeaders=function(){return!!G.rowHeaders},this.hasColHeaders=function(){if(void 0!==G.colHeaders&&null!==G.colHeaders)return!!G.colHeaders;for(let e=0,t=H.countCols();e<t;e++)if(H.getColHeader(e))return!0;return!1},this.getColHeader=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;const o=H.runHooks("modifyColHeader",e);if(void 0===o){const e=[],t=H.countCols();for(let o=0;o<t;o++)e.push(H.getColHeader(o));return e}let s=G.colHeaders;const n=H.toPhysicalColumn(o),i=function(e){const t=[],o=H.countCols();let s=0;for(;s<o;s++)(0,r.isFunction)(G.columns)&&G.columns(s)&&t.push(s);return t[e]}(n);return!1===G.colHeaders?s=null:G.columns&&(0,r.isFunction)(G.columns)&&G.columns(i)&&G.columns(i).title?s=G.columns(i).title:G.columns&&G.columns[n]&&G.columns[n].title?s=G.columns[n].title:Array.isArray(G.colHeaders)&&void 0!==G.colHeaders[n]?s=G.colHeaders[n]:(0,r.isFunction)(G.colHeaders)?s=G.colHeaders(n):G.colHeaders&&"string"!=typeof G.colHeaders&&"number"!=typeof G.colHeaders&&(s=(0,E.spreadsheetColumnLabel)(o)),s=H.runHooks("modifyColumnHeaderValue",s,e,t),s},this._getColWidthFromSettings=function(e){let t;if(e>=0){t=H.getCellMeta(0,e).width}if(void 0!==t&&t!==G.width||(t=G.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=H._getColWidthFromSettings(e);return t=H.runHooks("modifyColWidth",t,e),void 0===t&&(t=b.ViewportColumnsCalculator.DEFAULT_WIDTH),t},this._getRowHeightFromSettings=function(e){let t=G.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=H._getRowHeightFromSettings(e);return t=H.runHooks("modifyRowHeight",t,e),t},this.countSourceRows=function(){return V.countRows()},this.countSourceCols=function(){return V.countFirstRowKeys()},this.countRows=function(){return k.getLength()},this.countCols=function(){const e=G.maxCols,t=this.columnIndexMapper.getNotTrimmedIndexesLength();return Math.min(e,t)},this.countRenderedRows=function(){return H.view._wt.drawn?H.view._wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return H.view._wt.drawn?H.view._wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return H.view._wt.drawn?H.view._wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return H.view._wt.drawn?H.view._wt.wtTable.getVisibleColumnsCount():-1},this.countEmptyRows=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return(0,w.rangeEachReverse)(H.countRows()-1,(o=>{if(H.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,w.rangeEachReverse)(H.countCols()-1,(o=>{if(H.isEmptyCol(o))t+=1;else if(!0===e)return!1})),t},this.isEmptyRow=function(e){return G.isEmptyRow.call(H,e)},this.isEmptyCol=function(e){return G.isEmptyCol.call(H,e)},this.selectCell=function(e,t,o,s){let n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];return!(0,i.isUndefined)(e)&&!(0,i.isUndefined)(t)&&this.selectCells([[e,t,o,s]],n,r)},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])&&(D=!0);const o=X.selectCells(e);return o&&t&&H.listen(),D=!1,o},this.selectColumns=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return X.selectColumns(e,t)},this.selectRows=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return X.selectRows(e,t)},this.deselectCell=function(){X.deselect()},this.selectAll=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=e&&this.hasRowHeaders(),o=e&&this.hasColHeaders();D=!0,X.selectAll(t,o),D=!1};const re=(e,t)=>e.getNearestNotHiddenIndex(t,1,!0);this.scrollViewportTo=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const n=!o,r=!s;let i=e,l=t;if(!(arguments.length>4&&void 0!==arguments[4])||arguments[4]){const o=Number.isInteger(e),s=Number.isInteger(t),n=o?re(this.rowIndexMapper,e):void 0,r=s?re(this.columnIndexMapper,t):void 0;if(null===n||null===r)return!1;i=o?H.rowIndexMapper.getRenderableFromVisualIndex(n):void 0,l=s?H.columnIndexMapper.getRenderableFromVisualIndex(r):void 0}const a=Number.isInteger(i),h=Number.isInteger(l);return a&&h?H.view.scrollViewport(H._createCellCoords(i,l),n,s,o,r):a&&!1===h?H.view.scrollViewportVertically(i,n,o):!(!h||!1!==a)&&H.view.scrollViewportHorizontally(l,s,r)},this.destroy=function(){if(H._clearTimeouts(),H._clearImmediates(),H.view&&H.view.destroy(),V&&V.destroy(),V=null,this.getShortcutManager().destroy(),Y.clearCache(),(0,R.isRootInstance)(H)){const e=this.rootDocument.querySelector(".hot-display-license-info");e&&e.parentNode.removeChild(e)}(0,n.empty)(H.rootElement),L.destroy(),W&&W.destroy(),H.batchExecution((()=>{H.rowIndexMapper.unregisterAll(),H.columnIndexMapper.unregisterAll(),K.getItems().forEach((e=>{let[,t]=e;t.destroy()})),K.clear(),H.runHooks("afterDestroy")}),!0),T.default.getSingleton().destroy(H),(0,d.objectEach)(H,((e,t,o)=>{var s;(0,r.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)})),H.isDestroyed=!0,k&&k.destroy(),k=null,F=null,X=null,W=null,H=null},this.getActiveEditor=function(){return W.getActiveEditor()},this.getPlugin=function(e){const t=(0,C.toUpperCaseFirst)(e);return"UndoRedo"===t?this.undoRedo:K.getItem(t)},this.getPluginName=function(e){return e===this.undoRedo?this.undoRedo.constructor.PLUGIN_KEY:K.getId(e)},this.getInstance=function(){return H},this.addHook=function(e,t){T.default.getSingleton().add(e,t,H)},this.hasHook=function(e){return T.default.getSingleton().has(e,H)||T.default.getSingleton().has(e)},this.addHookOnce=function(e,t){T.default.getSingleton().once(e,t,H)},this.removeHook=function(e,t){T.default.getSingleton().remove(e,t,H)},this.runHooks=function(e,t,o,s,n,r,i){return T.default.getSingleton().run(H,e,t,o,s,n,r,i)},this.getTranslatedPhrase=function(e,t){return(0,_.getTranslatedPhrase)(G.language,e,t)},this.toHTML=()=>(0,u.instanceToHTML)(this),this.toTableElement=()=>{const e=this.rootDocument.createElement("div");return e.insertAdjacentHTML("afterbegin",(0,u.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,c.arrayEach)(this.timeouts,(e=>{clearTimeout(e)}))},this.immediates=[],this._registerImmediate=function(e){this.immediates.push(setImmediate(e))},this._clearImmediates=function(){(0,c.arrayEach)(this.immediates,(e=>{clearImmediate(e)}))},this._refreshBorders=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];W.destroyEditor(e),H.view.render(),t&&X.isSelected()&&W.prepareEditor()},this.isRtl=function(){return"rtl"===H.rootWindow.getComputedStyle(H.rootElement).direction},this.isLtr=function(){return!H.isRtl()},this.getDirectionFactor=function(){return H.isLtr()?1:-1};const ie=(0,A.createShortcutManager)({handleEvent(e){const t=H.isListening(),o=void 0!==(null==e?void 0:e.key);return t&&o},beforeKeyDown:e=>this.runHooks("beforeKeyDown",e),afterKeyDown:e=>{this.isDestroyed||H.runHooks("afterDocumentKeyDown",e)},ownerWindow:this.rootWindow});this.addHook("beforeOnCellMouseDown",(e=>{!1===e.ctrlKey&&!1===e.metaKey&&ie.releasePressedKeys()})),this.getShortcutManager=function(){return ie};const le=ie.addContext("grid"),ae={runOnlyIf:()=>(0,i.isDefined)(H.getSelected())&&H.countRenderedRows()>0&&H.countRenderedCols()>0,group:P};ie.setActiveContextName("grid"),le.addShortcuts([{keys:[["Control/Meta","A"]],callback:()=>{H.selectAll()}},{keys:[["Control/Meta","Enter"]],callback:()=>{const e=H.getSelectedRange(),{row:t,col:o}=e[e.length-1].highlight,s=H.getDataAtCell(t,o),n=new Map;for(let r=0;r<e.length;r++)e[r].forAll(((e,r)=>{if(e>=0&&r>=0&&(e!==t||r!==o)){const{readOnly:t}=H.getCellMeta(e,r);t||n.set(`${e}x${r}`,[e,r,s])}}));H.setDataAtCell(Array.from(n.values()))},runOnlyIf:()=>H.getSelectedRangeLast().getCellsCount()>1},{keys:[["ArrowUp"]],callback:()=>{X.transformStart(-1,0)}},{keys:[["ArrowUp","Control/Meta"]],captureCtrl:!0,callback:()=>{X.setRangeStart(H._createCellCoords(H.rowIndexMapper.getNearestNotHiddenIndex(0,1),H.getSelectedRangeLast().highlight.col))}},{keys:[["ArrowUp","Shift"]],callback:()=>{X.transformEnd(-1,0)}},{keys:[["ArrowUp","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>{const{from:e,to:t}=H.getSelectedRangeLast(),o=H.rowIndexMapper.getNearestNotHiddenIndex(0,1);X.setRangeStart(e.clone()),X.setRangeEnd(H._createCellCoords(o,t.col))},runOnlyIf:()=>!(H.selection.isSelectedByCorner()||H.selection.isSelectedByColumnHeader())},{keys:[["ArrowDown"]],callback:()=>{X.transformStart(1,0)}},{keys:[["ArrowDown","Control/Meta"]],captureCtrl:!0,callback:()=>{X.setRangeStart(H._createCellCoords(H.rowIndexMapper.getNearestNotHiddenIndex(H.countRows()-1,-1),H.getSelectedRangeLast().highlight.col))}},{keys:[["ArrowDown","Shift"]],callback:()=>{X.transformEnd(1,0)}},{keys:[["ArrowDown","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>{const{from:e,to:t}=H.getSelectedRangeLast(),o=H.rowIndexMapper.getNearestNotHiddenIndex(H.countRows()-1,-1);X.setRangeStart(e.clone()),X.setRangeEnd(H._createCellCoords(o,t.col))},runOnlyIf:()=>!(H.selection.isSelectedByCorner()||H.selection.isSelectedByColumnHeader())},{keys:[["ArrowLeft"]],callback:()=>{X.transformStart(0,-1*H.getDirectionFactor())}},{keys:[["ArrowLeft","Control/Meta"]],captureCtrl:!0,callback:()=>{const e=H.getSelectedRangeLast().highlight.row,t=H.columnIndexMapper.getNearestNotHiddenIndex(...H.isRtl()?[H.countCols()-1,-1]:[0,1]);X.setRangeStart(H._createCellCoords(e,t))}},{keys:[["ArrowLeft","Shift"]],callback:()=>{X.transformEnd(0,-1*H.getDirectionFactor())}},{keys:[["ArrowLeft","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>{const{from:e,to:t}=H.getSelectedRangeLast(),o=H.columnIndexMapper.getNearestNotHiddenIndex(...H.isRtl()?[H.countCols()-1,-1]:[0,1]);X.setRangeStart(e.clone()),X.setRangeEnd(H._createCellCoords(t.row,o))},runOnlyIf:()=>!(H.selection.isSelectedByCorner()||H.selection.isSelectedByRowHeader())},{keys:[["ArrowRight"]],callback:()=>{X.transformStart(0,H.getDirectionFactor())}},{keys:[["ArrowRight","Control/Meta"]],captureCtrl:!0,callback:()=>{const e=H.getSelectedRangeLast().highlight.row,t=H.columnIndexMapper.getNearestNotHiddenIndex(...H.isRtl()?[0,1]:[H.countCols()-1,-1]);X.setRangeStart(H._createCellCoords(e,t))}},{keys:[["ArrowRight","Shift"]],callback:()=>{X.transformEnd(0,H.getDirectionFactor())}},{keys:[["ArrowRight","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>{const{from:e,to:t}=H.getSelectedRangeLast(),o=H.columnIndexMapper.getNearestNotHiddenIndex(...H.isRtl()?[0,1]:[H.countCols()-1,-1]);X.setRangeStart(e.clone()),X.setRangeEnd(H._createCellCoords(t.row,o))},runOnlyIf:()=>!(H.selection.isSelectedByCorner()||H.selection.isSelectedByRowHeader())},{keys:[["Home"]],captureCtrl:!0,callback:()=>{const e=parseInt(H.getSettings().fixedColumnsStart,10),t=H.getSelectedRangeLast().highlight.row,o=H.columnIndexMapper.getNearestNotHiddenIndex(e,1);X.setRangeStart(H._createCellCoords(t,o))},runOnlyIf:()=>H.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["Home","Shift"]],callback:()=>{X.setRangeEnd(H._createCellCoords(X.selectedRange.current().from.row,H.columnIndexMapper.getNearestNotHiddenIndex(0,1)))}},{keys:[["Home","Control/Meta"]],captureCtrl:!0,callback:()=>{const e=parseInt(H.getSettings().fixedRowsTop,10),t=parseInt(H.getSettings().fixedColumnsStart,10),o=H.rowIndexMapper.getNearestNotHiddenIndex(e,1),s=H.columnIndexMapper.getNearestNotHiddenIndex(t,1);X.setRangeStart(H._createCellCoords(o,s))},runOnlyIf:()=>H.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End"]],captureCtrl:!0,callback:()=>{X.setRangeStart(H._createCellCoords(H.getSelectedRangeLast().highlight.row,H.columnIndexMapper.getNearestNotHiddenIndex(H.countCols()-1,-1)))},runOnlyIf:()=>H.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End","Shift"]],callback:()=>{X.setRangeEnd(H._createCellCoords(X.selectedRange.current().from.row,H.columnIndexMapper.getNearestNotHiddenIndex(H.countCols()-1,-1)))}},{keys:[["End","Control/Meta"]],captureCtrl:!0,callback:()=>{const e=parseInt(H.getSettings().fixedRowsBottom,10),t=H.rowIndexMapper.getNearestNotHiddenIndex(H.countRows()-e-1,-1),o=H.columnIndexMapper.getNearestNotHiddenIndex(H.countCols()-1,-1);X.setRangeStart(H._createCellCoords(t,o))},runOnlyIf:()=>H.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["PageUp"]],callback:()=>{X.transformStart(-H.countVisibleRows(),0)}},{keys:[["PageUp","Shift"]],callback:()=>{const{to:e}=H.getSelectedRangeLast(),t=Math.max(e.row-H.countVisibleRows(),0),o=H.rowIndexMapper.getNearestNotHiddenIndex(t,1);if(null!==o){const t=H._createCellCoords(o,e.col),s=e.row-H.view.getFirstFullyVisibleRow(),n=Math.max(t.row-s,0);X.setRangeEnd(t),H.scrollViewportTo(n)}}},{keys:[["PageDown"]],callback:()=>{X.transformStart(H.countVisibleRows(),0)}},{keys:[["PageDown","Shift"]],callback:()=>{const{to:e}=H.getSelectedRangeLast(),t=Math.min(e.row+H.countVisibleRows(),H.countRows()-1),o=H.rowIndexMapper.getNearestNotHiddenIndex(t,-1);if(null!==o){const t=H._createCellCoords(o,e.col),s=e.row-H.view.getFirstFullyVisibleRow(),n=Math.min(t.row-s,H.countRows()-1);X.setRangeEnd(t),H.scrollViewportTo(n)}}},{keys:[["Tab"]],callback:e=>{const t="function"==typeof G.tabMoves?G.tabMoves(e):G.tabMoves;X.transformStart(t.row,t.col,!0)}},{keys:[["Shift","Tab"]],callback:e=>{const t="function"==typeof G.tabMoves?G.tabMoves(e):G.tabMoves;X.transformStart(-t.row,-t.col)}}],ae),(0,g.getPluginsNames)().forEach((e=>{const t=(0,g.getPlugin)(e);K.addItem(e,new t(this))})),T.default.getSingleton().run(H,"construct")},o(8),o(78),o(94);var n=o(107),r=o(114),i=o(110),l=o(115),a=s(o(119)),h=s(o(126)),d=o(116),c=o(113),u=o(127),g=o(128),f=o(133),p=o(122),m=o(134),C=o(108),w=o(130),y=s(o(135)),v=s(o(210)),E=o(211),S=o(212),R=o(209),b=o(145),T=s(o(123)),_=o(232),O=o(233),M=o(238),I=o(253),N=o(131),A=o(269);const P="gridDefault";let x=null;new Set},(e,t,o)=>{"use strict";var s=o(9),n=o(46),r=o(70),i=o(75),l=o(77);s({target:"Array",proto:!0,arity:1,forced:o(13)((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=r(t),s=arguments.length;l(o+s);for(var a=0;a<s;a++)t[o]=arguments[a],o++;return i(t,o),o}})},(e,t,o)=>{var s=o(10),n=o(11).f,r=o(50),i=o(54),l=o(44),a=o(62),h=o(74);e.exports=function(e,t){var o,d,c,u,g,f=e.target,p=e.global,m=e.stat;if(o=p?s:m?s[f]||l(f,{}):(s[f]||{}).prototype)for(d in t){if(u=t[d],c=e.dontCallGetSet?(g=n(o,d))&&g.value:o[d],!h(p?d:f+(m?".":"#")+d,e.forced)&&void 0!==c){if(typeof u==typeof c)continue;a(u,c)}(e.sham||c&&c.sham)&&r(u,"sham",!0),i(o,d,u,e)}}},function(e){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)||function(){return this}()||this||Function("return this")()},(e,t,o)=>{var s=o(12),n=o(14),r=o(16),i=o(17),l=o(18),a=o(24),h=o(45),d=o(48),c=Object.getOwnPropertyDescriptor;t.f=s?c:function(e,t){if(e=l(e),t=a(t),d)try{return c(e,t)}catch(e){}if(h(e,t))return i(!n(r.f,e,t),e[t])}},(e,t,o)=>{var s=o(13);e.exports=!s((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},(e,t,o)=>{var s=o(15),n=Function.prototype.call;e.exports=s?n.bind(n):function(){return n.apply(n,arguments)}},(e,t,o)=>{var s=o(13);e.exports=!s((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},(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},e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},(e,t,o)=>{var s=o(19),n=o(22);e.exports=function(e){return s(n(e))}},(e,t,o)=>{var s=o(20),n=o(13),r=o(21),i=Object,l=s("".split);e.exports=n((function(){return!i("z").propertyIsEnumerable(0)}))?function(e){return"String"==r(e)?l(e,""):i(e)}:i},(e,t,o)=>{var s=o(15),n=Function.prototype,r=n.call,i=s&&n.bind.bind(r,r);e.exports=s?i:function(e){return function(){return r.apply(e,arguments)}}},(e,t,o)=>{var s=o(20),n=s({}.toString),r=s("".slice);e.exports=function(e){return r(n(e),8,-1)}},(e,t,o)=>{var s=o(23),n=TypeError;e.exports=function(e){if(s(e))throw n("Can't call method on "+e);return e}},e=>{e.exports=function(e){return null==e}},(e,t,o)=>{var s=o(25),n=o(29);e.exports=function(e){var t=s(e,"string");return n(t)?t:t+""}},(e,t,o)=>{var s=o(14),n=o(26),r=o(29),i=o(36),l=o(39),a=o(40),h=TypeError,d=a("toPrimitive");e.exports=function(e,t){if(!n(e)||r(e))return e;var o,a=i(e,d);if(a){if(void 0===t&&(t="default"),o=s(a,e,t),!n(o)||r(o))return o;throw h("Can't convert object to primitive value")}return void 0===t&&(t="number"),l(e,t)}},(e,t,o)=>{var s=o(27),n=o(28),r=n.all;e.exports=n.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:s(e)||e===r}:function(e){return"object"==typeof e?null!==e:s(e)}},(e,t,o)=>{var s=o(28),n=s.all;e.exports=s.IS_HTMLDDA?function(e){return"function"==typeof e||e===n}:function(e){return"function"==typeof e}},e=>{var t="object"==typeof document&&document.all,o=void 0===t&&void 0!==t;e.exports={all:t,IS_HTMLDDA:o}},(e,t,o)=>{var s=o(30),n=o(27),r=o(31),i=o(32),l=Object;e.exports=i?function(e){return"symbol"==typeof e}:function(e){var t=s("Symbol");return n(t)&&r(t.prototype,l(e))}},(e,t,o)=>{var s=o(10),n=o(27);e.exports=function(e,t){return arguments.length<2?(o=s[e],n(o)?o:void 0):s[e]&&s[e][t];var o}},(e,t,o)=>{var s=o(20);e.exports=s({}.isPrototypeOf)},(e,t,o)=>{var s=o(33);e.exports=s&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},(e,t,o)=>{var s=o(34),n=o(13),r=o(10).String;e.exports=!!Object.getOwnPropertySymbols&&!n((function(){var e=Symbol();return!r(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&s&&s<41}))},(e,t,o)=>{var s,n,r=o(10),i=o(35),l=r.process,a=r.Deno,h=l&&l.versions||a&&a.version,d=h&&h.v8;d&&(n=(s=d.split("."))[0]>0&&s[0]<4?1:+(s[0]+s[1])),!n&&i&&(!(s=i.match(/Edge\/(\d+)/))||s[1]>=74)&&(s=i.match(/Chrome\/(\d+)/))&&(n=+s[1]),e.exports=n},e=>{e.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},(e,t,o)=>{var s=o(37),n=o(23);e.exports=function(e,t){var o=e[t];return n(o)?void 0:s(o)}},(e,t,o)=>{var s=o(27),n=o(38),r=TypeError;e.exports=function(e){if(s(e))return e;throw r(n(e)+" is not a function")}},e=>{var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},(e,t,o)=>{var s=o(14),n=o(27),r=o(26),i=TypeError;e.exports=function(e,t){var o,l;if("string"===t&&n(o=e.toString)&&!r(l=s(o,e)))return l;if(n(o=e.valueOf)&&!r(l=s(o,e)))return l;if("string"!==t&&n(o=e.toString)&&!r(l=s(o,e)))return l;throw i("Can't convert object to primitive value")}},(e,t,o)=>{var s=o(10),n=o(41),r=o(45),i=o(47),l=o(33),a=o(32),h=s.Symbol,d=n("wks"),c=a?h.for||h:h&&h.withoutSetter||i;e.exports=function(e){return r(d,e)||(d[e]=l&&r(h,e)?h[e]:c("Symbol."+e)),d[e]}},(e,t,o)=>{var s=o(42),n=o(43);(e.exports=function(e,t){return n[e]||(n[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.31.1",mode:s?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.31.1/LICENSE",source:"https://github.com/zloirock/core-js"})},e=>{e.exports=!1},(e,t,o)=>{var s=o(10),n=o(44),r="__core-js_shared__",i=s[r]||n(r,{});e.exports=i},(e,t,o)=>{var s=o(10),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}},(e,t,o)=>{var s=o(20),n=o(46),r=s({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return r(n(e),t)}},(e,t,o)=>{var s=o(22),n=Object;e.exports=function(e){return n(s(e))}},(e,t,o)=>{var s=o(20),n=0,r=Math.random(),i=s(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+i(++n+r,36)}},(e,t,o)=>{var s=o(12),n=o(13),r=o(49);e.exports=!s&&!n((function(){return 7!=Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a}))},(e,t,o)=>{var s=o(10),n=o(26),r=s.document,i=n(r)&&n(r.createElement);e.exports=function(e){return i?r.createElement(e):{}}},(e,t,o)=>{var s=o(12),n=o(51),r=o(17);e.exports=s?function(e,t,o){return n.f(e,t,r(1,o))}:function(e,t,o){return e[t]=o,e}},(e,t,o)=>{var s=o(12),n=o(48),r=o(52),i=o(53),l=o(24),a=TypeError,h=Object.defineProperty,d=Object.getOwnPropertyDescriptor,c="enumerable",u="configurable",g="writable";t.f=s?r?function(e,t,o){if(i(e),t=l(t),i(o),"function"==typeof e&&"prototype"===t&&"value"in o&&g in o&&!o[g]){var s=d(e,t);s&&s[g]&&(e[t]=o.value,o={configurable:u in o?o[u]:s[u],enumerable:c in o?o[c]:s[c],writable:!1})}return h(e,t,o)}:h:function(e,t,o){if(i(e),t=l(t),i(o),n)try{return h(e,t,o)}catch(e){}if("get"in o||"set"in o)throw a("Accessors not supported");return"value"in o&&(e[t]=o.value),e}},(e,t,o)=>{var s=o(12),n=o(13);e.exports=s&&n((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},(e,t,o)=>{var s=o(26),n=String,r=TypeError;e.exports=function(e){if(s(e))return e;throw r(n(e)+" is not an object")}},(e,t,o)=>{var s=o(27),n=o(51),r=o(55),i=o(44);e.exports=function(e,t,o,l){l||(l={});var a=l.enumerable,h=void 0!==l.name?l.name:t;if(s(o)&&r(o,h,l),l.global)a?e[t]=o:i(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}},(e,t,o)=>{var s=o(20),n=o(13),r=o(27),i=o(45),l=o(12),a=o(56).CONFIGURABLE,h=o(57),d=o(58),c=d.enforce,u=d.get,g=String,f=Object.defineProperty,p=s("".slice),m=s("".replace),C=s([].join),w=l&&!n((function(){return 8!==f((function(){}),"length",{value:8}).length})),y=String(String).split("String"),v=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),(!i(e,"name")||a&&e.name!==t)&&(l?f(e,"name",{value:t,configurable:!0}):e.name=t),w&&o&&i(o,"arity")&&e.length!==o.arity&&f(e,"length",{value:o.arity});try{o&&i(o,"constructor")&&o.constructor?l&&f(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var s=c(e);return i(s,"source")||(s.source=C(y,"string"==typeof t?t:"")),e};Function.prototype.toString=v((function(){return r(this)&&u(this).source||h(this)}),"toString")},(e,t,o)=>{var s=o(12),n=o(45),r=Function.prototype,i=s&&Object.getOwnPropertyDescriptor,l=n(r,"name"),a=l&&"something"===function(){}.name,h=l&&(!s||s&&i(r,"name").configurable);e.exports={EXISTS:l,PROPER:a,CONFIGURABLE:h}},(e,t,o)=>{var s=o(20),n=o(27),r=o(43),i=s(Function.toString);n(r.inspectSource)||(r.inspectSource=function(e){return i(e)}),e.exports=r.inspectSource},(e,t,o)=>{var s,n,r,i=o(59),l=o(10),a=o(26),h=o(50),d=o(45),c=o(43),u=o(60),g=o(61),f="Object already initialized",p=l.TypeError,m=l.WeakMap;if(i||c.state){var C=c.state||(c.state=new m);C.get=C.get,C.has=C.has,C.set=C.set,s=function(e,t){if(C.has(e))throw p(f);return t.facade=e,C.set(e,t),t},n=function(e){return C.get(e)||{}},r=function(e){return C.has(e)}}else{var w=u("state");g[w]=!0,s=function(e,t){if(d(e,w))throw p(f);return t.facade=e,h(e,w,t),t},n=function(e){return d(e,w)?e[w]:{}},r=function(e){return d(e,w)}}e.exports={set:s,get:n,has:r,enforce:function(e){return r(e)?n(e):s(e,{})},getterFor:function(e){return function(t){var o;if(!a(t)||(o=n(t)).type!==e)throw p("Incompatible receiver, "+e+" required");return o}}}},(e,t,o)=>{var s=o(10),n=o(27),r=s.WeakMap;e.exports=n(r)&&/native code/.test(String(r))},(e,t,o)=>{var s=o(41),n=o(47),r=s("keys");e.exports=function(e){return r[e]||(r[e]=n(e))}},e=>{e.exports={}},(e,t,o)=>{var s=o(45),n=o(63),r=o(11),i=o(51);e.exports=function(e,t,o){for(var l=n(t),a=i.f,h=r.f,d=0;d<l.length;d++){var c=l[d];s(e,c)||o&&s(o,c)||a(e,c,h(t,c))}}},(e,t,o)=>{var s=o(30),n=o(20),r=o(64),i=o(73),l=o(53),a=n([].concat);e.exports=s("Reflect","ownKeys")||function(e){var t=r.f(l(e)),o=i.f;return o?a(t,o(e)):t}},(e,t,o)=>{var s=o(65),n=o(72).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return s(e,n)}},(e,t,o)=>{var s=o(20),n=o(45),r=o(18),i=o(66).indexOf,l=o(61),a=s([].push);e.exports=function(e,t){var o,s=r(e),h=0,d=[];for(o in s)!n(l,o)&&n(s,o)&&a(d,o);for(;t.length>h;)n(s,o=t[h++])&&(~i(d,o)||a(d,o));return d}},(e,t,o)=>{var s=o(18),n=o(67),r=o(70),i=function(e){return function(t,o,i){var l,a=s(t),h=r(a),d=n(i,h);if(e&&o!=o){for(;h>d;)if((l=a[d++])!=l)return!0}else for(;h>d;d++)if((e||d in a)&&a[d]===o)return e||d||0;return!e&&-1}};e.exports={includes:i(!0),indexOf:i(!1)}},(e,t,o)=>{var s=o(68),n=Math.max,r=Math.min;e.exports=function(e,t){var o=s(e);return o<0?n(o+t,0):r(o,t)}},(e,t,o)=>{var s=o(69);e.exports=function(e){var t=+e;return t!=t||0===t?0:s(t)}},e=>{var t=Math.ceil,o=Math.floor;e.exports=Math.trunc||function(e){var s=+e;return(s>0?o:t)(s)}},(e,t,o)=>{var s=o(71);e.exports=function(e){return s(e.length)}},(e,t,o)=>{var s=o(68),n=Math.min;e.exports=function(e){return e>0?n(s(e),9007199254740991):0}},e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},(e,t)=>{t.f=Object.getOwnPropertySymbols},(e,t,o)=>{var s=o(13),n=o(27),r=/#|\.prototype\./,i=function(e,t){var o=a[l(e)];return o==d||o!=h&&(n(t)?s(t):!!t)},l=i.normalize=function(e){return String(e).replace(r,".").toLowerCase()},a=i.data={},h=i.NATIVE="N",d=i.POLYFILL="P";e.exports=i},(e,t,o)=>{"use strict";var s=o(12),n=o(76),r=TypeError,i=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)&&!i(e,"length").writable)throw r("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},(e,t,o)=>{var s=o(21);e.exports=Array.isArray||function(e){return"Array"==s(e)}},e=>{var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},(e,t,o)=>{var s=o(9),n=o(10),r=o(79),i=o(80),l="WebAssembly",a=n[l],h=7!==Error("e",{cause:7}).cause,d=function(e,t){var o={};o[e]=i(e,t,h),s({global:!0,constructor:!0,arity:1,forced:h},o)},c=function(e,t){if(a&&a[e]){var o={};o[e]=i(l+"."+e,t,h),s({target:l,stat:!0,constructor:!0,arity:1,forced:h},o)}};d("Error",(function(e){return function(t){return r(e,this,arguments)}})),d("EvalError",(function(e){return function(t){return r(e,this,arguments)}})),d("RangeError",(function(e){return function(t){return r(e,this,arguments)}})),d("ReferenceError",(function(e){return function(t){return r(e,this,arguments)}})),d("SyntaxError",(function(e){return function(t){return r(e,this,arguments)}})),d("TypeError",(function(e){return function(t){return r(e,this,arguments)}})),d("URIError",(function(e){return function(t){return r(e,this,arguments)}})),c("CompileError",(function(e){return function(t){return r(e,this,arguments)}})),c("LinkError",(function(e){return function(t){return r(e,this,arguments)}})),c("RuntimeError",(function(e){return function(t){return r(e,this,arguments)}}))},(e,t,o)=>{var s=o(15),n=Function.prototype,r=n.apply,i=n.call;e.exports="object"==typeof Reflect&&Reflect.apply||(s?i.bind(r):function(){return i.apply(r,arguments)})},(e,t,o)=>{"use strict";var s=o(30),n=o(45),r=o(50),i=o(31),l=o(81),a=o(62),h=o(84),d=o(85),c=o(86),u=o(90),g=o(91),f=o(12),p=o(42);e.exports=function(e,t,o,m){var C="stackTraceLimit",w=m?2:1,y=e.split("."),v=y[y.length-1],E=s.apply(null,y);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=c(m?t:e,void 0),s=m?new E(e):new E;return void 0!==o&&r(s,"message",o),g(s,b,s.stack,2),this&&i(S,this)&&d(s,this,b),arguments.length>w&&u(s,arguments[w]),s}));if(b.prototype=S,"Error"!==v?l?l(b,R):a(b,R,{name:!0}):f&&C in E&&(h(b,E,C),h(b,E,"prepareStackTrace")),a(b,E),!p)try{S.name!==v&&r(S,"name",v),S.constructor=b}catch(e){}return b}}},(e,t,o)=>{var s=o(82),n=o(53),r=o(83);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 n(o),r(s),t?e(o,s):o.__proto__=s,o}}():void 0)},(e,t,o)=>{var s=o(20),n=o(37);e.exports=function(e,t,o){try{return s(n(Object.getOwnPropertyDescriptor(e,t)[o]))}catch(e){}}},(e,t,o)=>{var s=o(27),n=String,r=TypeError;e.exports=function(e){if("object"==typeof e||s(e))return e;throw r("Can't set "+n(e)+" as a prototype")}},(e,t,o)=>{var s=o(51).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}})}},(e,t,o)=>{var s=o(27),n=o(26),r=o(81);e.exports=function(e,t,o){var i,l;return r&&s(i=t.constructor)&&i!==o&&n(l=i.prototype)&&l!==o.prototype&&r(e,l),e}},(e,t,o)=>{var s=o(87);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:s(e)}},(e,t,o)=>{var s=o(88),n=String;e.exports=function(e){if("Symbol"===s(e))throw TypeError("Cannot convert a Symbol value to a string");return n(e)}},(e,t,o)=>{var s=o(89),n=o(27),r=o(21),i=o(40)("toStringTag"),l=Object,a="Arguments"==r(function(){return arguments}());e.exports=s?r: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),i))?o:a?r(t):"Object"==(s=r(t))&&n(t.callee)?"Arguments":s}},(e,t,o)=>{var s={};s[o(40)("toStringTag")]="z",e.exports="[object z]"===String(s)},(e,t,o)=>{var s=o(26),n=o(50);e.exports=function(e,t){s(t)&&"cause"in t&&n(e,"cause",t.cause)}},(e,t,o)=>{var s=o(50),n=o(92),r=o(93),i=Error.captureStackTrace;e.exports=function(e,t,o,l){r&&(i?i(e,t):s(e,"stack",n(o,l)))}},(e,t,o)=>{var s=o(20),n=Error,r=s("".replace),i=String(n("zxcasd").stack),l=/\n\s*at [^:]*:[^\n]*/,a=l.test(i);e.exports=function(e,t){if(a&&"string"==typeof e&&!n.prepareStackTrace)for(;t--;)e=r(e,l,"");return e}},(e,t,o)=>{var s=o(13),n=o(17);e.exports=!s((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",n(1,7)),7!==e.stack)}))},(e,t,o)=>{o(95),o(104)},(e,t,o)=>{var s=o(9),n=o(10),r=o(96).clear;s({global:!0,bind:!0,enumerable:!0,forced:n.clearImmediate!==r},{clearImmediate:r})},(e,t,o)=>{var s,n,r,i,l=o(10),a=o(79),h=o(97),d=o(27),c=o(45),u=o(13),g=o(99),f=o(100),p=o(49),m=o(101),C=o(102),w=o(103),y=l.setImmediate,v=l.clearImmediate,E=l.process,S=l.Dispatch,R=l.Function,b=l.MessageChannel,T=l.String,_=0,O={},M="onreadystatechange";u((function(){s=l.location}));var I=function(e){if(c(O,e)){var t=O[e];delete O[e],t()}},N=function(e){return function(){I(e)}},A=function(e){I(e.data)},P=function(e){l.postMessage(T(e),s.protocol+"//"+s.host)};y&&v||(y=function(e){m(arguments.length,1);var t=d(e)?e:R(e),o=f(arguments,1);return O[++_]=function(){a(t,void 0,o)},n(_),_},v=function(e){delete O[e]},w?n=function(e){E.nextTick(N(e))}:S&&S.now?n=function(e){S.now(N(e))}:b&&!C?(i=(r=new b).port2,r.port1.onmessage=A,n=h(i.postMessage,i)):l.addEventListener&&d(l.postMessage)&&!l.importScripts&&s&&"file:"!==s.protocol&&!u(P)?(n=P,l.addEventListener("message",A,!1)):n=M in p("script")?function(e){g.appendChild(p("script"))[M]=function(){g.removeChild(this),I(e)}}:function(e){setTimeout(N(e),0)}),e.exports={set:y,clear:v}},(e,t,o)=>{var s=o(98),n=o(37),r=o(15),i=s(s.bind);e.exports=function(e,t){return n(e),void 0===t?e:r?i(e,t):function(){return e.apply(t,arguments)}}},(e,t,o)=>{var s=o(21),n=o(20);e.exports=function(e){if("Function"===s(e))return n(e)}},(e,t,o)=>{var s=o(30);e.exports=s("document","documentElement")},(e,t,o)=>{var s=o(20);e.exports=s([].slice)},e=>{var t=TypeError;e.exports=function(e,o){if(e<o)throw t("Not enough arguments");return e}},(e,t,o)=>{var s=o(35);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(s)},(e,t,o)=>{var s=o(21);e.exports="undefined"!=typeof process&&"process"==s(process)},(e,t,o)=>{var s=o(9),n=o(10),r=o(96).set,i=o(105),l=n.setImmediate?i(r,!1):r;s({global:!0,bind:!0,enumerable:!0,forced:n.setImmediate!==l},{setImmediate:l})},(e,t,o)=>{"use strict";var s,n=o(10),r=o(79),i=o(27),l=o(106),a=o(35),h=o(100),d=o(101),c=n.Function,u=/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 u?function(s,n){var l=d(arguments.length,1)>o,a=i(s)?s:c(s),u=l?h(arguments,o):[],g=l?function(){r(a,this,u)}:a;return t?e(g,n):e(g)}:e}},e=>{e.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},(e,t,o)=>{"use strict";t.__esModule=!0,t.addClass=function(e,t){"string"==typeof t&&(t=t.split(" "));(t=i(t)).length>0&&e.classList.add(...t)},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=l,t.fastInnerHTML=function(e,t){let o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];a.test(t)?e.innerHTML=o?(0,s.sanitize)(t):t:h(e,t)},t.fastInnerText=h,t.getCaretPosition=function(e){if(e.selectionStart)return e.selectionStart;return 0},t.getComputedStyle=u,t.getCssTransform=function(e){let t;if(e.style.transform&&""!==(t=e.style.transform))return["transform",t];return-1},t.getFrameElement=n,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 n(e)&&e.parent},t.getScrollLeft=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(e===t)return c(t);return e.scrollLeft},t.getScrollTop=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(e===t)return d(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:r}=n.style;if([e,t,r].includes("scroll"))return n;if(({overflow:e,overflowX:t,overflowY:r}=o.getComputedStyle(n)),s.includes(e)||s.includes(t)||s.includes(r))return n;if(n.clientHeight<=n.scrollHeight+1&&(s.includes(r)||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===g&&(g=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 g},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=u(e,o);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=u(s,o),t=["scroll","hidden","auto"],n=e.getPropertyValue("overflow"),r=e.getPropertyValue("overflow-y"),i=e.getPropertyValue("overflow-x");if(t.includes(n)||t.includes(r)||t.includes(i))return s;s=s.parentNode}return o},t.getWindowScrollLeft=c,t.getWindowScrollTop=d,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=f,t.isOutsideInput=p,t.isVisible=function e(t){const o=t.ownerDocument.documentElement;let s=t;for(;s!==o;){if(null===s)return!1;if(s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(s.host){if(s.host.impl)return e(s.host.impl);if(s.host)return e(s.host);throw new Error("Lost in Web Components world")}return!1}if(s.style&&"none"===s.style.display)return!1;s=s.parentNode}return!0},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,r,i,l=e;n=l.offsetLeft,r=l.offsetTop,i=l;for(;(l=l.offsetParent)&&l!==t.body;)n+=l.offsetLeft,r+=l.offsetTop,i=l;i&&"fixed"===i.style.position&&(n+=o.pageXOffset||s.scrollLeft,r+=o.pageYOffset||s.scrollTop);return{left:n,top:r}},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.removeClass=function(e,t){"string"==typeof t&&(t=t.split(" "));(t=i(t)).length>0&&e.classList.remove(...t)},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.selectElementIfAllowed=function(e){p(e.ownerDocument.activeElement)||e.select()},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,r=n.style.display;n.style.display="block",e.setSelectionRange(t,o),n.style.display=r}}},t.setOverlayPosition=function(e,t,o){e.style.transform=`translate3d(${t},${o},0)`},o(8),o(78);var s=o(108);function n(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 r=e;for(;null!=r&&r!==o;){const{nodeType:e,nodeName:o}=r;if(e===s&&(t.includes(o)||t.includes(r)))return r;const{host:i}=r;r=i&&e===n?i:r.parentNode}return null}function i(e){return e&&e.length?e.filter((e=>!!e)):[]}function l(e){let t;for(;t=e.lastChild;)e.removeChild(t)}const a=/(<(.*)>|&(.*);)/;function h(e,t){const o=e.firstChild;o&&3===o.nodeType&&null===o.nextSibling?o.textContent=t:(l(e),e.appendChild(e.ownerDocument.createTextNode(t)))}function d(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).scrollY}function c(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).scrollX}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e.currentStyle||t.getComputedStyle(e)}let g;function f(e){return e&&(["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function p(e){return f(e)&&!1===e.hasAttribute("data-hot-input")}t.HTML_CHARACTERS=a},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.equalsIgnoreCase=function(){const e=[];for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];let n=o.length;for(;n;){n-=1;const t=(0,r.stringify)(o[n]).toLowerCase();-1===e.indexOf(t)&&e.push(t)}return 1===e.length},t.isPercentValue=function(e){return/^([0-9][0-9]?%$)|(^100%$)/.test(e)},t.randomString=function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+e()+e()},t.sanitize=i,t.stripTags=function(e){return i(`${e}`,{ALLOWED_TAGS:[]})},t.substitute=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return`${e}`.replace(/(?:\\)?\[([^[\]]+)]/g,((e,o)=>"\\"===e.charAt(0)?e.substr(1,e.length-1):void 0===t[o]?"":t[o]))},t.toUpperCaseFirst=function(e){return e[0].toUpperCase()+e.substr(1)},o(8);var n=s(o(109)),r=o(110);function i(e,t){return n.default.sanitize(e,t)}},t=>{"use strict";t.exports=e},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t._injectProductInfo=function(e,t){const o=!l(e),s="string"==typeof e&&"non-commercial-and-evaluation"===e.toLowerCase(),r="0.0.0-next-8d0643b-20230809";let i,y="invalid",v="invalid";const E=function(e){let t=[][a],o=t;if(e[a]!==u("Z"))return!1;for(let t="",s="B<H4P+".split(""),n=u(s.shift());n;n=u(s.shift()||"A"))--n<""[a]?o|=(d(`${d(h(t)+(h(c(e,Math.abs(n),2))+[]).padStart(2,"0"))}`)%97||2)>>1:t=c(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)("22/06/2023","DD/MM/YYYY"),o=Math.floor(t.toDate().getTime()/864e5),s=f(e);i=(0,n.default)(864e5*(s+1),"x").format("MMMM DD, YYYY"),o>s?(y="expired",v="expired"):(y="valid",v="valid")}else s?(y="non_commercial",v="valid"):(y="invalid",v="invalid");else y="missing",v="missing";p()&&(y="valid",v="valid");if(!m&&"valid"!==y){C[y]({keyValidityDate:i,hotVersion:r})&&console["non_commercial"===y?"info":"warn"](C[y]({keyValidityDate:i,hotVersion:r})),m=!0}if("valid"!==v&&t.parentNode){if(w[v]({keyValidityDate:i,hotVersion:r})){const e=document.createElement("div");e.className="hot-display-license-info",e.innerHTML=w[v]({keyValidityDate:i,hotVersion:r}),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=i,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(111)),r=o(112);function i(e){return void 0===e}function l(e){return null===e||""===e||i(e)}const a="length",h=e=>parseInt(e,16),d=e=>parseInt(e,10),c=(e,t,o)=>e.substr(t,o),u=e=>e.codePointAt(0)-65,g=e=>`${e}`.replace(/\-/g,""),f=e=>h(c(g(e),h("12"),u("F")))/(h(c(g(e),u("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 C={invalid:()=>r.toSingleLine`
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("dompurify"),require("pikaday"),require("moment"),require("numbro")):"function"==typeof define&&define.amd?define("Handsontable",["dompurify","pikaday","moment","numbro"],t):"object"==typeof exports?exports.Handsontable=t(require("dompurify"),require("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=[,e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(3),o(4),o(5),o(6);var n=s(o(7)),r=o(209),i=o(253),l=s(o(123)),a=o(232),h=o(260),d=o(275),c=o(279),u=o(145);function g(e,t){const o=new n.default(e,t||{},r.rootInstanceSymbol);return o.init(),o}t.CellCoords=u.CellCoords,t.CellRange=u.CellRange,(0,h.registerCellType)(d.TextCellType),g.editors={BaseEditor:c.BaseEditor},g.Core=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new n.default(e,t,r.rootInstanceSymbol)},g.DefaultSettings=(0,i.metaSchemaFactory)(),g.hooks=l.default.getSingleton(),g.CellCoords=u.CellCoords,g.CellRange=u.CellRange,g.packageName="handsontable",g.buildDate="09/08/2023 12:07:38",g.version="0.0.0-next-baf2fcf-20230809",g.languages={dictionaryKeys:a.dictionaryKeys,getLanguageDictionary:a.getLanguageDictionary,getLanguagesDictionaries:a.getLanguagesDictionaries,registerLanguageDictionary:a.registerLanguageDictionary,getTranslatedPhrase:a.getTranslatedPhrase};var f=g;t.default=f},(e,t,o)=>{"use strict";o.r(t)},(e,t,o)=>{"use strict";o.r(t)},(e,t,o)=>{"use strict";o.r(t)},(e,t,o)=>{"use strict";o.r(t)},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.default=function(e,t){var o;let s=arguments.length>2&&void 0!==arguments[2]&&arguments[2],D=!1,H=this;const L=new h.default(H);let k,V,F,W,B=!0;(0,R.hasValidParameter)(s)&&(0,R.registerAsRootInstance)(this);this.rootElement=e,this.rootDocument=e.ownerDocument,this.rootWindow=this.rootDocument.defaultView,this.isDestroyed=!1,this.renderSuspendedCounter=0,this.executionSuspendedCounter=0;const U=null!==(o=null==t?void 0:t.layoutDirection)&&void 0!==o?o:"inherit",j=["rtl","ltr"].includes(U)?U:this.rootWindow.getComputedStyle(this.rootElement).direction;this.rootElement.setAttribute("dir",j),this.isRtl=function(){return"rtl"===j},this.isLtr=function(){return!H.isRtl()},this.getDirectionFactor=function(){return H.isLtr()?1:-1},t.language=(0,_.getValidLanguageCode)(t.language);const Y=new I.MetaManager(H,t,[I.DynamicCellMetaMod,I.ExtendMetaPropertiesMod]),G=Y.getTableMeta(),z=Y.getGlobalMeta(),K=(0,N.createUniqueMap)();this.container=this.rootDocument.createElement("div"),this.renderCall=!1,e.insertBefore(this.container,e.firstChild),(0,R.isRootInstance)(this)&&(0,i._injectProductInfo)(t.licenseKey,e);this.guid=`ht_${(0,C.randomString)()}`,this.columnIndexMapper=new S.IndexMapper,this.rowIndexMapper=new S.IndexMapper,this.columnIndexMapper.addLocalHook("indexesSequenceChange",(e=>{H.runHooks("afterColumnSequenceChange",e)})),this.rowIndexMapper.addLocalHook("indexesSequenceChange",(e=>{H.runHooks("afterRowSequenceChange",e)})),V=new v.default(H),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid);const $=e=>{const{row:t,col:o}=e;return H._createCellCoords(t>=0?H.rowIndexMapper.getRenderableFromVisualIndex(t):t,o>=0?H.columnIndexMapper.getRenderableFromVisualIndex(o):o)};let X=new M.Selection(G,{rowIndexMapper:()=>H.rowIndexMapper,columnIndexMapper:()=>H.columnIndexMapper,countCols:()=>H.countCols(),countRows:()=>H.countRows(),propToCol:e=>k.propToCol(e),isEditorOpened:()=>!!H.getActiveEditor()&&H.getActiveEditor().isOpened(),countColsTranslated:()=>this.view.countRenderableColumns(),countRowsTranslated:()=>this.view.countRenderableRows(),getShortcutManager:()=>H.getShortcutManager(),createCellCoords:(e,t)=>H._createCellCoords(e,t),createCellRange:(e,t,o)=>H._createCellRange(e,t,o),visualToRenderableCoords:$,renderableToVisualCoords:e=>{const{row:t,col:o}=e;return H._createCellCoords(t>=0?H.rowIndexMapper.getVisualFromRenderableIndex(t):t,o>=0?H.columnIndexMapper.getVisualFromRenderableIndex(o):o)},isDisabledCellSelection:(e,t)=>H.getCellMeta(e,t).disableVisualSelection});this.selection=X;const q=e=>{let{hiddenIndexesChanged:t}=e;t&&this.selection.refresh()};function Q(e){const t=(0,O.normalizeLanguageCode)(e);(0,_.hasLanguageDictionary)(t)?(H.runHooks("beforeLanguageChange",t),z.language=t,H.runHooks("afterLanguageChange",t)):(0,O.warnUserAboutLanguageRegistration)(e)}function J(e,t){const o="className"===e?H.rootElement:H.table;if(B)(0,n.addClass)(o,t);else{let s=[],r=[];z[e]&&(s=Array.isArray(z[e])?z[e]:(0,c.stringToArray)(z[e])),t&&(r=Array.isArray(t)?t:(0,c.stringToArray)(t));const i=(0,c.getDifferenceOfArrays)(s,r),l=(0,c.getDifferenceOfArrays)(r,s);i.length&&(0,n.removeClass)(o,i),l.length&&(0,n.addClass)(o,l)}z[e]=t}function Z(){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 ee(e){const t=e.replace(",",".");return!1===isNaN(parseFloat(t))?parseFloat(t):e}function te(e,t,o){if(!e.length)return;const s=H.getActiveEditor(),r=new Z;let i=!0;r.onQueueEmpty=e=>{s&&i&&s.cancelChanges(),o(e)};for(let o=e.length-1;o>=0;o--){const[s,l,,a]=e[o],h=k.propToCol(l),d=H.getCellMeta(s,h);"numeric"===d.type&&"string"==typeof a&&(0,w.isNumericLike)(a)&&(e[o][3]=ee(a)),H.getCellValidator(d)&&(r.addValidatorToQueue(),H.validateCell(e[o][3],d,function(t,o){return function(s){if("boolean"!=typeof s)throw new Error("Validation error: result is not boolean");if(!1===s&&!1===o.allowInvalid){i=!1,e.splice(t,1),o.valid=!0;const s=H.getCell(o.visualRow,o.visualCol);null!==s&&(0,n.removeClass)(s,G.invalidCellClassName)}r.removeValidatorFormQueue()}}(o,d),t))}r.checkIfQueueIsEmpty()}function oe(e,t){let o=e.length-1;if(o<0)return;for(;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(G.allowInsertRow)for(;e[o][0]>H.countRows()-1;){const{delta:e}=k.createRow(void 0,void 0,{source:t});if(0===e){s=!0;break}}if("array"===H.dataType&&(!G.columns||0===G.columns.length)&&G.allowInsertColumn)for(;k.propToCol(e[o][1])>H.countCols()-1;){const{delta:e}=k.createCol(void 0,void 0,{source:t});if(0===e){s=!0;break}}s||k.set(e[o][0],e[o][1],e[o][3])}}else e.splice(o,1)}H.forceFullRender=!0,F.adjustRowsAndCols(),H.runHooks("beforeChangeRender",e,t),W.lockEditor(),H._refreshBorders(null),W.unlockEditor(),H.view.adjustElementsSize(),H.runHooks("afterChange",e,t||"edit");const s=H.getActiveEditor();s&&(0,i.isDefined)(s.refreshValue)&&s.refreshValue()}function se(e,t,o){return Array.isArray(e)?e:[[e,t,o]]}function ne(e,t){const o=H.getActiveEditor(),s=H.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",q),this.rowIndexMapper.addLocalHook("cacheUpdated",q),this.selection.addLocalHook("beforeSetRangeStart",(e=>{this.runHooks("beforeSetRangeStart",e)})),this.selection.addLocalHook("beforeSetRangeStartOnly",(e=>{this.runHooks("beforeSetRangeStartOnly",e)})),this.selection.addLocalHook("beforeSetRangeEnd",(e=>{this.runHooks("beforeSetRangeEnd",e),e.row<0&&(e.row=this.view._wt.wtTable.getFirstVisibleRow()),e.col<0&&(e.col=this.view._wt.wtTable.getFirstVisibleColumn())})),this.selection.addLocalHook("afterSetRangeEnd",(e=>{const t=(0,d.createObjectPropListener)(!1),o=this.selection.getSelectedRange(),{from:s,to:r}=o.current(),i=o.size()-1;this.runHooks("afterSelection",s.row,s.col,r.row,r.col,t,i),this.runHooks("afterSelectionByProp",s.row,H.colToProp(s.col),r.row,H.colToProp(r.col),t,i);const l=this.selection.isSelectedByAnyHeader(),a=this.selection.selectedRange.current();let h=!0;D&&(h=!1),t.isTouched()&&(h=!t.value);const c=this.selection.isSelectedByRowHeader(),u=this.selection.isSelectedByColumnHeader();!1!==h&&(l?c?this.view.scrollViewportVertically(H.rowIndexMapper.getRenderableFromVisualIndex(e.row)):u&&this.view.scrollViewportHorizontally(H.columnIndexMapper.getRenderableFromVisualIndex(e.col)):a&&!this.selection.isMultiple()?this.view.scrollViewport($(a.from)):this.view.scrollViewport($(e))),c&&u?(0,n.addClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]):c?((0,n.removeClass)(this.rootElement,"ht__selection--columns"),(0,n.addClass)(this.rootElement,"ht__selection--rows")):u?((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"]),this._refreshBorders(null)})),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,H.colToProp(o.col),s.row,H.colToProp(s.col),t)})),this.selection.addLocalHook("afterIsMultipleSelection",(e=>{const t=this.runHooks("afterIsMultipleSelection",e.value);e.value&&(e.value=t)})),this.selection.addLocalHook("beforeModifyTransformStart",(e=>{this.runHooks("modifyTransformStart",e)})),this.selection.addLocalHook("afterModifyTransformStart",((e,t,o)=>{this.runHooks("afterModifyTransformStart",e,t,o)})),this.selection.addLocalHook("beforeModifyTransformEnd",(e=>{this.runHooks("modifyTransformEnd",e)})),this.selection.addLocalHook("afterModifyTransformEnd",((e,t,o)=>{this.runHooks("afterModifyTransformEnd",e,t,o)})),this.selection.addLocalHook("afterDeselect",(()=>{W.destroyEditor(),this._refreshBorders(),(0,n.removeClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]),this.runHooks("afterDeselect")})),this.selection.addLocalHook("insertRowRequire",(e=>{this.alter("insert_row_above",e,1,"auto")})),this.selection.addLocalHook("insertColRequire",(e=>{this.alter("insert_col_start",e,1,"auto")})),F={alter(e,t){var o,s;let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=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,c.arrayReduce)(t,((e,t)=>{let[o,s]=t;const n=e[e.length-1],[r,i]=n,l=r+i;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=H.countSourceRows();if(G.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:d,startPhysicalIndex:u}=k.createRow(t,n,{source:r,mode:h});if(d){const e=X.selectedRange.current(),t=null==e?void 0:e.from,o=null==t?void 0:t.row,s=H.toVisualRow(u);if(X.isSelectedByCorner())H.selectAll();else if((0,i.isDefined)(o)&&o>=s){const{row:s,col:n}=e.to;let r=t.col;X.isSelectedByRowHeader()&&(r=-1),X.getSelectedRange().pop(),X.setRangeStartOnly(H._createCellCoords(o+d,r),!0),X.setRangeEnd(H._createCellCoords(s+d,n))}else H._refreshBorders()}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?H.countSourceCols():0;const{delta:f,startPhysicalIndex:p}=k.createCol(t,n,{source:r,mode:g});if(f){if(Array.isArray(G.colHeaders)){const e=[H.toVisualColumn(p),0];e.length+=f,Array.prototype.splice.apply(G.colHeaders,e)}const e=X.selectedRange.current(),t=null==e?void 0:e.from,o=null==t?void 0:t.col,s=H.toVisualColumn(p);if(X.isSelectedByCorner())H.selectAll();else if((0,i.isDefined)(o)&&o>=s){const{row:s,col:n}=e.to;let r=t.row;X.isSelectedByColumnHeader()&&(r=-1),X.getSelectedRange().pop(),X.setRangeStartOnly(H._createCellCoords(r,o+f),!0),X.setRangeEnd(H._createCellCoords(s,n+f))}else H._refreshBorders()}break;case"remove_row":const m=e=>{let t=0;(0,c.arrayEach)(e,(e=>{let[o,s]=e;const n=(0,i.isEmpty)(o)?H.countRows()-1:Math.max(o-t,0);Number.isInteger(o)&&(o=Math.max(o-t,0));if(!k.removeRow(o,s,r))return;const l=H.countRows(),a=G.fixedRowsTop;a>=n+1&&(G.fixedRowsTop-=Math.min(s,a-n));const h=G.fixedRowsBottom;h&&n>=l-h&&(G.fixedRowsBottom-=Math.min(s,h)),t+=s}))};Array.isArray(t)?m(a(t)):m([[t,n]]),F.adjustRowsAndCols(),H._refreshBorders();break;case"remove_col":const C=e=>{let t=0;(0,c.arrayEach)(e,(e=>{let[o,s]=e;const n=(0,i.isEmpty)(o)?H.countCols()-1:Math.max(o-t,0);let l=H.toPhysicalColumn(n);Number.isInteger(o)&&(o=Math.max(o-t,0));if(!k.removeCol(o,s,r))return;const a=G.fixedColumnsStart;a>=n+1&&(G.fixedColumnsStart-=Math.min(s,a-n)),Array.isArray(G.colHeaders)&&(void 0===l&&(l=-1),G.colHeaders.splice(l,s)),t+=s}))};Array.isArray(t)?C(a(t)):C([[t,n]]),F.adjustRowsAndCols(),H._refreshBorders();break;default:throw new Error(`There is no such action "${e}"`)}l||F.adjustRowsAndCols()},adjustRowsAndCols(){const e=G.minRows,t=G.minSpareRows,o=G.minCols,s=G.minSpareCols;if(0===H.countRows()&&0===H.countCols()&&X.deselect(),e){const t=H.countRows();t<e&&k.createRow(t,e-t,{source:"auto"})}if(t){const e=H.countEmptyRows(!0);if(e<t){const o=t-e,s=Math.min(o,G.maxRows-H.countSourceRows());k.createRow(H.countRows(),s,{source:"auto"})}}{let e;(o||s)&&(e=H.countEmptyCols(!0));let t=H.countCols();if(o&&!G.columns&&t<o){const s=o-t;e+=s,k.createCol(t,s,{source:"auto"})}if(s&&!G.columns&&"array"===H.dataType&&e<s){t=H.countCols();const o=s-e,n=Math.min(o,G.maxCols-t);k.createCol(t,n,{source:"auto"})}}if(X.isSelected()){const e=H.countRows(),t=H.countCols();(0,c.arrayEach)(X.selectedRange,(o=>{let s=!1,n=o.from.row,r=o.from.col,i=o.to.row,l=o.to.col;n>e-1?(n=e-1,s=!0,i>n&&(i=n)):i>e-1&&(i=e-1,s=!0,n>i&&(n=i)),r>t-1?(r=t-1,s=!0,l>r&&(l=r)):l>t-1&&(l=t-1,s=!0,r>l&&(r=l)),s&&H.selectCell(n,r,i,l)}))}H.view&&H.view.adjustElementsSize()},populateFromArray(e,t,o,s,n){let r,i,l,a;const h=[],u={},g=[],f=e.row,p=e.col;if(i=t.length,0===i)return!1;let m=0,C=0;switch((0,d.isObject)(o)&&(m=o.col-p+1,C=o.row-f+1),n){case"shift_down":const n=(0,c.pivot)(t),w=n.length,y=Math.max(w,m),v=H.getData().slice(f),E=(0,c.pivot)(v).slice(p,p+y);for(l=0;l<y;l+=1)if(l<w){for(r=0,i=n[l].length;r<C-i;r+=1)n[l].push(n[l][r%i]);l<E.length?g.push(n[l].concat(E[l])):g.push(n[l].concat(new Array(v.length).fill(null)))}else g.push(n[l%w].concat(E[l]));H.populateFromArray(f,p,(0,c.pivot)(g));break;case"shift_right":const S=t.length,R=Math.max(S,C),b=H.getData().slice(f).map((e=>e.slice(p)));for(r=0;r<R;r+=1)if(r<S){for(l=0,a=t[r].length;l<m-a;l+=1)t[r].push(t[r][l%a]);if(r<b.length)for(let e=0;e<b[r].length;e+=1)t[r].push(b[r][e]);else t[r].push(...new Array(b[0].length).fill(null))}else t.push(t[r%i].slice(0,R).concat(b[r]));H.populateFromArray(f,p,t);break;default:u.row=e.row,u.col=e.col;let T,_=0,O=0,M=!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(i=o?A:Math.max(N,A),r=0;r<i&&!(o&&u.row>o.row&&A>N||!G.allowInsertRow&&u.row>H.countRows()-1||u.row>=G.maxRows);r++){const t=r-_,n=I(t).length,c=o?o.col-e.col+1:0;if(a=o?c:Math.max(n,c),u.col=e.col,T=H.getCellMeta(u.row,u.col),"CopyPaste.paste"!==s&&"Autofill.fill"!==s||!T.skipRowOnPaste){for(O=0,l=0;l<a&&!(o&&u.col>o.col&&c>n||!G.allowInsertColumn&&u.col>H.countCols()-1||u.col>=G.maxCols);l++){if(T=H.getCellMeta(u.row,u.col),("CopyPaste.paste"===s||"Autofill.fill"===s)&&T.skipColumnOnPaste){O+=1,u.col+=1,a+=1;continue}if(T.readOnly&&"UndoRedo.undo"!==s){u.col+=1;continue}let e=I(t,l-O),o=H.getDataAtCell(u.row,u.col);if(null!==e&&"object"==typeof e)if(Array.isArray(e)&&null===o&&(o=[]),null===o||"object"!=typeof o)M=!1;else{const t=(0,d.duckSchema)(Array.isArray(o)?o:o[0]||o),s=(0,d.duckSchema)(Array.isArray(e)?e:e[0]||e);(0,d.isObjectEqual)(t,s)||Array.isArray(t)&&Array.isArray(s)?e=(0,d.deepClone)(e):M=!1}else null!==o&&"object"==typeof o&&(M=!1);M&&h.push([u.row,u.col,e]),M=!0,u.col+=1}u.row+=1}else _+=1,u.row+=1,i+=1}H.setDataAtCell(h,null,null,s||"populateFromArray")}}},this.init=function(){V.setData(G.data),H.runHooks("beforeInit"),((0,l.isMobileBrowser)()||(0,l.isIpadOS)())&&(0,n.addClass)(H.rootElement,"mobile"),this.updateSettings(G,!0),this.view=new y.default(this),W=a.default.getInstance(H,G,X),H.runHooks("init"),this.forceFullRender=!0,this.view.render(),B&&null===H.rootElement.offsetParent&&(0,n.observeVisibilityChangeOnce)(H.rootElement,(()=>{H.view._wt.wtOverlays.updateLastSpreaderSize(),H.render(),H.view.adjustElementsSize()})),"object"==typeof B&&(H.runHooks("afterChange",B[0],B[1]),B=!1),H.runHooks("afterInit")},this._createCellCoords=function(e,t){return H.view._wt.createCellCoords(e,t)},this._createCellRange=function(e,t,o){return H.view._wt.createCellRange(e,t,o)},this.validateCell=function(e,t,o,s){let n=H.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,r=H.getCell(n,s,!0);if(r&&"TH"!==r.nodeName){const e=H.rowIndexMapper.getRenderableFromVisualIndex(n),t=H.columnIndexMapper.getRenderableFromVisualIndex(s);H.view._wt.getSetting("cellRenderer",e,t,r)}o(e)}var a;(0,i.isRegExp)(n)&&(a=n,n=function(e,t){t(a.test(e))}),(0,r.isFunction)(n)?(e=H.runHooks("beforeValidate",e,t.visualRow,t.prop,s),H._registerImmediate((()=>{n.call(t,e,(o=>{H&&(o=H.runHooks("afterValidate",o,e,t.visualRow,t.prop,s),t.valid=o,l(o),H.runHooks("postAfterValidate",o,e,t.visualRow,t.prop,s))}))}))):H._registerImmediate((()=>{t.valid=!0,l(t.valid,!1)}))},this.setDataAtCell=function(e,t,o,s){const n=se(e,t,o),r=[];let i,l,a,h=s;for(i=0,l=n.length;i<l;i++){if("object"!=typeof n[i])throw new Error("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter");if("number"!=typeof n[i][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[i][1]>=this.countCols()?n[i][1]:k.colToProp(n[i][1]),r.push([n[i][0],a,V.getAtCell(this.toPhysicalRow(n[i][0]),n[i][1]),n[i][2]])}h||"object"!=typeof e||(h=t);const d=ne(r,s);H.runHooks("afterSetDataAtCell",d,h),te(d,h,(()=>{oe(d,h)}))},this.setDataAtRowProp=function(e,t,o,s){const n=se(e,t,o),r=[];let i,l,a=s;for(i=0,l=n.length;i<l;i++)r.push([n[i][0],n[i][1],V.getAtCell(this.toPhysicalRow(n[i][0]),n[i][1]),n[i][2]]);a||"object"!=typeof e||(a=t);const h=ne(r,s);H.runHooks("afterSetDataAtRowProp",h,a),te(h,a,(()=>{oe(h,a)}))},this.listen=function(){H&&!H.isListening()&&(x=H.guid,H.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(x=null,H.runHooks("afterUnlisten"))},this.isListening=function(){return x===H.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];H._refreshBorders(e,t)},this.populateFromArray=function(e,t,o,s,n,r,i){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?H._createCellCoords(s,n):null;return F.populateFromArray(H._createCellCoords(e,t),o,l,r,i)},this.spliceCol=function(e,t,o){for(var s=arguments.length,n=new Array(s>3?s-3:0),r=3;r<s;r++)n[r-3]=arguments[r];return k.spliceCol(e,t,o,...n)},this.spliceRow=function(e,t,o){for(var s=arguments.length,n=new Array(s>3?s-3:0),r=3;r<s;r++)n[r-3]=arguments[r];return k.spliceRow(e,t,o,...n)},this.getSelected=function(){if(X.isSelected())return(0,c.arrayMap)(X.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(X.isSelected())return Array.from(X.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(!X.isSelected()||0===this.countRows()||0===this.countCols())return;const t=[];(0,c.arrayEach)(X.getSelectedRange(),(e=>{const o=e.getTopStartCorner(),s=e.getBottomEndCorner();(0,w.rangeEach)(o.row,s.row,(e=>{(0,w.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():this._refreshBorders(null))},this.render=function(){this.view&&(this.renderCall=!0,this.forceFullRender=!0,this.isRenderSuspended()||(W.lockEditor(),this._refreshBorders(null),W.unlockEditor()))},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(!H.view)return;const{width:e,height:t}=H.view.getLastSize(),{width:o,height:s}=H.rootElement.getBoundingClientRect(),n=o!==e||s!==t;!1===H.runHooks("beforeRefreshDimensions",{width:e,height:t},{width:o,height:s},n)||((n||H.view._wt.wtOverlays.scrollableElement===H.rootWindow)&&(H.view.setLastSize(o,s),H.render()),H.runHooks("afterRefreshDimensions",{width:e,height:t},{width:o,height:s},n))},this.updateData=function(e,t){(0,I.replaceData)(e,(e=>{k=e}),(e=>{k=e,H.columnIndexMapper.fitToLength(this.getInitialColumnCount()),H.rowIndexMapper.fitToLength(this.countSourceRows()),F.adjustRowsAndCols()}),{hotInstance:H,dataMap:k,dataSource:V,internalSource:"updateData",source:t,metaManager:Y,firstRun:B})},this.loadData=function(e,t){(0,I.replaceData)(e,(e=>{k=e}),(()=>{Y.clearCellsCache(),H.initIndexMappers(),F.adjustRowsAndCols(),B&&(B=[null,"loadData"])}),{hotInstance:H,dataMap:k,dataSource:V,internalSource:"loadData",source:t,metaManager:Y,firstRun:B})},this.getInitialColumnCount=function(){const e=G.columns;let t=0;if(Array.isArray(e))t=e.length;else if((0,r.isFunction)(e))if("array"===H.dataType){const o=this.countSourceCols();for(let s=0;s<o;s+=1)e(s)&&(t+=1)}else"object"!==H.dataType&&"function"!==H.dataType||(t=k.colToPropCache.length);else if((0,i.isDefined)(G.dataSchema)){const e=k.getSchema();t=Array.isArray(e)?e.length:(0,d.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,i.isUndefined)(e)?k.getAll():k.getRange(H._createCellCoords(e,t),H._createCellCoords(o,s),k.DESTINATION_RENDERER)},this.getCopyableText=function(e,t,o,s){return k.getCopyableText(H._createCellCoords(e,t),H._createCellCoords(o,s))},this.getCopyableData=function(e,t){return k.getCopyable(e,k.colToProp(t))},this.getSchema=function(){return k.getSchema()},this.updateSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=(B?H.loadData:H.updateData).bind(this);let s,n,l=!1;if((0,i.isDefined)(e.rows))throw new Error('The "rows" setting is no longer supported. Do you mean startRows, minRows or maxRows?');if((0,i.isDefined)(e.cols))throw new Error('The "cols" setting is no longer supported. Do you mean startCols, minCols or maxCols?');if((0,i.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?Q(e.language):"className"===s?J("className",e.className):"tableClassName"===s&&H.table?(J("tableClassName",e.tableClassName),H.view._wt.wtOverlays.syncOverlayTableClassNames()):T.default.getSingleton().isRegistered(s)||T.default.getSingleton().isDeprecated(s)?((0,r.isFunction)(e[s])||Array.isArray(e[s]))&&(e[s].initialHook=!0,H.addHook(s,e[s])):!t&&(0,d.hasOwnProperty)(e,s)&&(z[s]=e[s]));void 0===e.data&&void 0===G.data?o(null,"updateSettings"):void 0!==e.data?o(e.data,"updateSettings"):void 0!==e.columns&&(k.createMap(),H.initIndexMappers());const a=H.countCols(),h=G.columns;if(h&&(0,r.isFunction)(h)&&(l=!0),void 0===e.cell&&void 0===e.cells&&void 0===e.columns||Y.clearCache(),a>0)for(s=0,n=0;s<a;s++){if(h){const e=l?h(s):h[n];e&&Y.updateColumnMeta(n,e)}n+=1}(0,i.isDefined)(e.cell)&&(0,d.objectEach)(e.cell,(e=>{H.setCellMetaObject(e.row,e.col,e)})),H.runHooks("afterCellMetaReset");let c=H.rootElement.style.height;""!==c&&(c=parseInt(H.rootElement.style.height,10));let u=e.height;if((0,r.isFunction)(u)&&(u=u()),t){H.rootElement.getAttribute("style")&&H.rootElement.setAttribute("data-initialstyle",H.rootElement.getAttribute("style"))}if(null===u){const e=H.rootElement.getAttribute("data-initialstyle");e&&(e.indexOf("height")>-1||e.indexOf("overflow")>-1)?H.rootElement.setAttribute("style",e):(H.rootElement.style.height="",H.rootElement.style.overflow="")}else void 0!==u&&(H.rootElement.style.height=isNaN(u)?`${u}`:`${u}px`,H.rootElement.style.overflow="hidden");if(void 0!==e.width){let t=e.width;(0,r.isFunction)(t)&&(t=t()),H.rootElement.style.width=isNaN(t)?`${t}`:`${t}px`}t||(H.view&&(H.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked(),H.view._wt.exportSettingsAsClassNames()),H.runHooks("afterUpdateSettings",e)),F.adjustRowsAndCols(),H.view&&!B&&(H.forceFullRender=!0,W.lockEditor(),H._refreshBorders(null),H.view._wt.wtOverlays.adjustElementsSize(),W.unlockEditor()),t||!H.view||""!==c&&""!==u&&void 0!==u||c===u||H.view._wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){const e=H.getSelectedLast();if(G.getValue){if((0,r.isFunction)(G.getValue))return G.getValue.call(H);if(e)return H.getData()[e[0][0]][G.getValue]}else if(e)return H.getDataAtCell(e[0],e[1])},this.getSettings=function(){return G},this.clear=function(){this.selectAll(),this.emptySelectedCells()},this.alter=function(e,t,o,s,n){F.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?null:H.view.getCellAtCoords(H._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,r=s;return o>=0&&(n=this.rowIndexMapper.getVisualFromRenderableIndex(o)),s>=0&&(r=this.columnIndexMapper.getVisualFromRenderableIndex(s)),H._createCellCoords(n,r)},this.colToProp=function(e){return k.colToProp(e)},this.propToCol=function(e){return k.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 k.get(e,k.colToProp(t))},this.getDataAtRowProp=function(e,t){return k.get(e,t)},this.getDataAtCol=function(e){const t=[],o=k.getRange(H._createCellCoords(0,e),H._createCellCoords(G.data.length-1,e),k.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=k.getRange(H._createCellCoords(0,k.propToCol(e)),H._createCellCoords(G.data.length-1,k.propToCol(e)),k.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?V.getData():V.getByRange(H._createCellCoords(e,t),H._createCellCoords(o,s)),n},this.getSourceDataArray=function(e,t,o,s){let n;return n=void 0===e?V.getData(!0):V.getByRange(H._createCellCoords(e,t),H._createCellCoords(o,s),!0),n},this.getSourceDataAtCol=function(e){return V.getAtColumn(e)},this.setSourceDataAtCell=function(e,t,o,s){const n=se(e,t,o),r=this.hasHook("afterSetSourceDataAtCell"),l=[];r&&(0,c.arrayEach)(n,(e=>{let[t,o,s]=e;l.push([t,o,V.getAtCell(t,o),s])})),(0,c.arrayEach)(n,(e=>{let[t,o,s]=e;V.setAtCell(t,o,s)})),r&&this.runHooks("afterSetSourceDataAtCell",l,s),this.render();const a=H.getActiveEditor();a&&(0,i.isDefined)(a.refreshValue)&&a.refreshValue()},this.getSourceDataAtRow=function(e){return V.getAtRow(e)},this.getSourceDataAtCell=function(e,t){return V.getAtCell(e,t)},this.getDataAtRow=function(e){return k.getRange(H._createCellCoords(e,0),H._createCellCoords(e,this.countCols()-1),k.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],[r,i]=n;let[,,l,a]=n,h=null,d=null;void 0===l&&(l=r),void 0===a&&(a=i);let c="mixed";return(0,w.rangeEach)(Math.max(Math.min(r,l),0),Math.max(r,l),(e=>{let t=!0;return(0,w.rangeEach)(Math.max(Math.min(i,a),0),Math.max(i,a),(o=>{const s=this.getCellMeta(e,o);return d=s.type,h?t=h===d:h=d,t})),c=t?d:"mixed",t})),c},this.removeCellMeta=function(e,t,o){const[s,n]=[this.toPhysicalRow(e),this.toPhysicalColumn(t)];let r=Y.getCellMetaKeyValue(s,n,o);!1!==H.runHooks("beforeRemoveCellMeta",e,t,o,r)&&(Y.removeCellMeta(s,n,o),H.runHooks("afterRemoveCellMeta",e,t,o,r)),r=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&&Y.removeRow(this.toPhysicalRow(e),t),s.length>0&&(0,c.arrayEach)(s.reverse(),(t=>{Y.createRow(this.toPhysicalRow(e)),(0,c.arrayEach)(t,((t,o)=>this.setCellMetaObject(e,o,t)))})),H.render()},this.setCellMetaObject=function(e,t,o){"object"==typeof o&&(0,d.objectEach)(o,((o,s)=>{this.setCellMeta(e,t,s,o)}))},this.setCellMeta=function(e,t,o,s){if(!1===H.runHooks("beforeSetCellMeta",e,t,o,s))return;let n=e,r=t;e<this.countRows()&&(n=this.toPhysicalRow(e)),t<this.countCols()&&(r=this.toPhysicalColumn(t)),Y.setCellMeta(n,r,o,s),H.runHooks("afterSetCellMeta",e,t,o,s)},this.getCellsMeta=function(){return Y.getCellsMeta()},this.getCellMeta=function(e,t){let o=this.toPhysicalRow(e),s=this.toPhysicalColumn(t);return null===o&&(o=e),null===s&&(s=t),Y.getCellMeta(o,s,{visualRow:e,visualColumn:t})},this.getCellMetaAtRow=function(e){return Y.getCellsMetaAtRow(e)},this.isColumnModificationAllowed=function(){return!("object"===H.dataType||G.columns)},this.getCellRenderer=function(e,t){const o="number"==typeof e?H.getCellMeta(e,t).renderer:e.renderer;return"string"==typeof o?(0,f.getRenderer)(o):(0,i.isUndefined)(o)?(0,f.getRenderer)("text"):o},this.getCellEditor=function(e,t){const o="number"==typeof e?H.getCellMeta(e,t).editor:e.editor;return"string"==typeof o?(0,p.getEditor)(o):(0,i.isUndefined)(o)?(0,p.getEditor)("text"):o},this.getCellValidator=function(e,t){const o="number"==typeof e?H.getCellMeta(e,t).validator:e.validator;return"string"==typeof o?(0,m.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 Z;e&&(s.onQueueEmpty=e);let n=H.countRows()-1;for(;n>=0;){if(void 0!==t&&-1===t.indexOf(n)){n-=1;continue}let e=H.countCols()-1;for(;e>=0;)void 0===o||-1!==o.indexOf(e)?(s.addValidatorToQueue(),H.validateCell(H.getDataAtCell(n,e),H.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=G.rowHeaders,o=e;return void 0!==o&&(o=H.runHooks("modifyRowHeader",o)),void 0===o?(t=[],(0,w.rangeEach)(H.countRows()-1,(e=>{t.push(H.getRowHeader(e))}))):Array.isArray(t)&&void 0!==t[o]?t=t[o]:(0,r.isFunction)(t)?t=t(o):t&&"string"!=typeof t&&"number"!=typeof t&&(t=o+1),t},this.hasRowHeaders=function(){return!!G.rowHeaders},this.hasColHeaders=function(){if(void 0!==G.colHeaders&&null!==G.colHeaders)return!!G.colHeaders;for(let e=0,t=H.countCols();e<t;e++)if(H.getColHeader(e))return!0;return!1},this.getColHeader=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;const o=H.runHooks("modifyColHeader",e);if(void 0===o){const e=[],t=H.countCols();for(let o=0;o<t;o++)e.push(H.getColHeader(o));return e}let s=G.colHeaders;const n=H.toPhysicalColumn(o),i=function(e){const t=[],o=H.countCols();let s=0;for(;s<o;s++)(0,r.isFunction)(G.columns)&&G.columns(s)&&t.push(s);return t[e]}(n);return!1===G.colHeaders?s=null:G.columns&&(0,r.isFunction)(G.columns)&&G.columns(i)&&G.columns(i).title?s=G.columns(i).title:G.columns&&G.columns[n]&&G.columns[n].title?s=G.columns[n].title:Array.isArray(G.colHeaders)&&void 0!==G.colHeaders[n]?s=G.colHeaders[n]:(0,r.isFunction)(G.colHeaders)?s=G.colHeaders(n):G.colHeaders&&"string"!=typeof G.colHeaders&&"number"!=typeof G.colHeaders&&(s=(0,E.spreadsheetColumnLabel)(o)),s=H.runHooks("modifyColumnHeaderValue",s,e,t),s},this._getColWidthFromSettings=function(e){let t;if(e>=0){t=H.getCellMeta(0,e).width}if(void 0!==t&&t!==G.width||(t=G.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=H._getColWidthFromSettings(e);return t=H.runHooks("modifyColWidth",t,e),void 0===t&&(t=b.ViewportColumnsCalculator.DEFAULT_WIDTH),t},this._getRowHeightFromSettings=function(e){let t=G.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=H._getRowHeightFromSettings(e);return t=H.runHooks("modifyRowHeight",t,e),t},this.countSourceRows=function(){return V.countRows()},this.countSourceCols=function(){return V.countFirstRowKeys()},this.countRows=function(){return k.getLength()},this.countCols=function(){const e=G.maxCols,t=this.columnIndexMapper.getNotTrimmedIndexesLength();return Math.min(e,t)},this.countRenderedRows=function(){return H.view._wt.drawn?H.view._wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return H.view._wt.drawn?H.view._wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return H.view._wt.drawn?H.view._wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return H.view._wt.drawn?H.view._wt.wtTable.getVisibleColumnsCount():-1},this.countEmptyRows=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return(0,w.rangeEachReverse)(H.countRows()-1,(o=>{if(H.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,w.rangeEachReverse)(H.countCols()-1,(o=>{if(H.isEmptyCol(o))t+=1;else if(!0===e)return!1})),t},this.isEmptyRow=function(e){return G.isEmptyRow.call(H,e)},this.isEmptyCol=function(e){return G.isEmptyCol.call(H,e)},this.selectCell=function(e,t,o,s){let n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];return!(0,i.isUndefined)(e)&&!(0,i.isUndefined)(t)&&this.selectCells([[e,t,o,s]],n,r)},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])&&(D=!0);const o=X.selectCells(e);return o&&t&&H.listen(),D=!1,o},this.selectColumns=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return X.selectColumns(e,t)},this.selectRows=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return X.selectRows(e,t)},this.deselectCell=function(){X.deselect()},this.selectAll=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=e&&this.hasRowHeaders(),o=e&&this.hasColHeaders();D=!0,X.selectAll(t,o),D=!1};const re=(e,t)=>e.getNearestNotHiddenIndex(t,1,!0);this.scrollViewportTo=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const n=!o,r=!s;let i=e,l=t;if(!(arguments.length>4&&void 0!==arguments[4])||arguments[4]){const o=Number.isInteger(e),s=Number.isInteger(t),n=o?re(this.rowIndexMapper,e):void 0,r=s?re(this.columnIndexMapper,t):void 0;if(null===n||null===r)return!1;i=o?H.rowIndexMapper.getRenderableFromVisualIndex(n):void 0,l=s?H.columnIndexMapper.getRenderableFromVisualIndex(r):void 0}const a=Number.isInteger(i),h=Number.isInteger(l);return a&&h?H.view.scrollViewport(H._createCellCoords(i,l),n,s,o,r):a&&!1===h?H.view.scrollViewportVertically(i,n,o):!(!h||!1!==a)&&H.view.scrollViewportHorizontally(l,s,r)},this.destroy=function(){if(H._clearTimeouts(),H._clearImmediates(),H.view&&H.view.destroy(),V&&V.destroy(),V=null,this.getShortcutManager().destroy(),Y.clearCache(),(0,R.isRootInstance)(H)){const e=this.rootDocument.querySelector(".hot-display-license-info");e&&e.parentNode.removeChild(e)}(0,n.empty)(H.rootElement),L.destroy(),W&&W.destroy(),H.batchExecution((()=>{H.rowIndexMapper.unregisterAll(),H.columnIndexMapper.unregisterAll(),K.getItems().forEach((e=>{let[,t]=e;t.destroy()})),K.clear(),H.runHooks("afterDestroy")}),!0),T.default.getSingleton().destroy(H),(0,d.objectEach)(H,((e,t,o)=>{var s;(0,r.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)})),H.isDestroyed=!0,k&&k.destroy(),k=null,F=null,X=null,W=null,H=null},this.getActiveEditor=function(){return W.getActiveEditor()},this.getPlugin=function(e){const t=(0,C.toUpperCaseFirst)(e);return"UndoRedo"===t?this.undoRedo:K.getItem(t)},this.getPluginName=function(e){return e===this.undoRedo?this.undoRedo.constructor.PLUGIN_KEY:K.getId(e)},this.getInstance=function(){return H},this.addHook=function(e,t){T.default.getSingleton().add(e,t,H)},this.hasHook=function(e){return T.default.getSingleton().has(e,H)||T.default.getSingleton().has(e)},this.addHookOnce=function(e,t){T.default.getSingleton().once(e,t,H)},this.removeHook=function(e,t){T.default.getSingleton().remove(e,t,H)},this.runHooks=function(e,t,o,s,n,r,i){return T.default.getSingleton().run(H,e,t,o,s,n,r,i)},this.getTranslatedPhrase=function(e,t){return(0,_.getTranslatedPhrase)(G.language,e,t)},this.toHTML=()=>(0,u.instanceToHTML)(this),this.toTableElement=()=>{const e=this.rootDocument.createElement("div");return e.insertAdjacentHTML("afterbegin",(0,u.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,c.arrayEach)(this.timeouts,(e=>{clearTimeout(e)}))},this.immediates=[],this._registerImmediate=function(e){this.immediates.push(setImmediate(e))},this._clearImmediates=function(){(0,c.arrayEach)(this.immediates,(e=>{clearImmediate(e)}))},this._refreshBorders=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];W.destroyEditor(e),H.view.render(),t&&X.isSelected()&&W.prepareEditor()},this.isRtl=function(){return"rtl"===H.rootWindow.getComputedStyle(H.rootElement).direction},this.isLtr=function(){return!H.isRtl()},this.getDirectionFactor=function(){return H.isLtr()?1:-1};const ie=(0,A.createShortcutManager)({handleEvent(e){const t=H.isListening(),o=void 0!==(null==e?void 0:e.key);return t&&o},beforeKeyDown:e=>this.runHooks("beforeKeyDown",e),afterKeyDown:e=>{this.isDestroyed||H.runHooks("afterDocumentKeyDown",e)},ownerWindow:this.rootWindow});this.addHook("beforeOnCellMouseDown",(e=>{!1===e.ctrlKey&&!1===e.metaKey&&ie.releasePressedKeys()})),this.getShortcutManager=function(){return ie};const le=ie.addContext("grid"),ae={runOnlyIf:()=>(0,i.isDefined)(H.getSelected())&&H.countRenderedRows()>0&&H.countRenderedCols()>0,group:P};ie.setActiveContextName("grid"),le.addShortcuts([{keys:[["Control/Meta","A"]],callback:()=>{H.selectAll()}},{keys:[["Control/Meta","Enter"]],callback:()=>{const e=H.getSelectedRange(),{row:t,col:o}=e[e.length-1].highlight,s=H.getDataAtCell(t,o),n=new Map;for(let r=0;r<e.length;r++)e[r].forAll(((e,r)=>{if(e>=0&&r>=0&&(e!==t||r!==o)){const{readOnly:t}=H.getCellMeta(e,r);t||n.set(`${e}x${r}`,[e,r,s])}}));H.setDataAtCell(Array.from(n.values()))},runOnlyIf:()=>H.getSelectedRangeLast().getCellsCount()>1},{keys:[["ArrowUp"]],callback:()=>{X.transformStart(-1,0)}},{keys:[["ArrowUp","Control/Meta"]],captureCtrl:!0,callback:()=>{X.setRangeStart(H._createCellCoords(H.rowIndexMapper.getNearestNotHiddenIndex(0,1),H.getSelectedRangeLast().highlight.col))}},{keys:[["ArrowUp","Shift"]],callback:()=>{X.transformEnd(-1,0)}},{keys:[["ArrowUp","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>{const{from:e,to:t}=H.getSelectedRangeLast(),o=H.rowIndexMapper.getNearestNotHiddenIndex(0,1);X.setRangeStart(e.clone()),X.setRangeEnd(H._createCellCoords(o,t.col))},runOnlyIf:()=>!(H.selection.isSelectedByCorner()||H.selection.isSelectedByColumnHeader())},{keys:[["ArrowDown"]],callback:()=>{X.transformStart(1,0)}},{keys:[["ArrowDown","Control/Meta"]],captureCtrl:!0,callback:()=>{X.setRangeStart(H._createCellCoords(H.rowIndexMapper.getNearestNotHiddenIndex(H.countRows()-1,-1),H.getSelectedRangeLast().highlight.col))}},{keys:[["ArrowDown","Shift"]],callback:()=>{X.transformEnd(1,0)}},{keys:[["ArrowDown","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>{const{from:e,to:t}=H.getSelectedRangeLast(),o=H.rowIndexMapper.getNearestNotHiddenIndex(H.countRows()-1,-1);X.setRangeStart(e.clone()),X.setRangeEnd(H._createCellCoords(o,t.col))},runOnlyIf:()=>!(H.selection.isSelectedByCorner()||H.selection.isSelectedByColumnHeader())},{keys:[["ArrowLeft"]],callback:()=>{X.transformStart(0,-1*H.getDirectionFactor())}},{keys:[["ArrowLeft","Control/Meta"]],captureCtrl:!0,callback:()=>{const e=H.getSelectedRangeLast().highlight.row,t=H.columnIndexMapper.getNearestNotHiddenIndex(...H.isRtl()?[H.countCols()-1,-1]:[0,1]);X.setRangeStart(H._createCellCoords(e,t))}},{keys:[["ArrowLeft","Shift"]],callback:()=>{X.transformEnd(0,-1*H.getDirectionFactor())}},{keys:[["ArrowLeft","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>{const{from:e,to:t}=H.getSelectedRangeLast(),o=H.columnIndexMapper.getNearestNotHiddenIndex(...H.isRtl()?[H.countCols()-1,-1]:[0,1]);X.setRangeStart(e.clone()),X.setRangeEnd(H._createCellCoords(t.row,o))},runOnlyIf:()=>!(H.selection.isSelectedByCorner()||H.selection.isSelectedByRowHeader())},{keys:[["ArrowRight"]],callback:()=>{X.transformStart(0,H.getDirectionFactor())}},{keys:[["ArrowRight","Control/Meta"]],captureCtrl:!0,callback:()=>{const e=H.getSelectedRangeLast().highlight.row,t=H.columnIndexMapper.getNearestNotHiddenIndex(...H.isRtl()?[0,1]:[H.countCols()-1,-1]);X.setRangeStart(H._createCellCoords(e,t))}},{keys:[["ArrowRight","Shift"]],callback:()=>{X.transformEnd(0,H.getDirectionFactor())}},{keys:[["ArrowRight","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>{const{from:e,to:t}=H.getSelectedRangeLast(),o=H.columnIndexMapper.getNearestNotHiddenIndex(...H.isRtl()?[0,1]:[H.countCols()-1,-1]);X.setRangeStart(e.clone()),X.setRangeEnd(H._createCellCoords(t.row,o))},runOnlyIf:()=>!(H.selection.isSelectedByCorner()||H.selection.isSelectedByRowHeader())},{keys:[["Home"]],captureCtrl:!0,callback:()=>{const e=parseInt(H.getSettings().fixedColumnsStart,10),t=H.getSelectedRangeLast().highlight.row,o=H.columnIndexMapper.getNearestNotHiddenIndex(e,1);X.setRangeStart(H._createCellCoords(t,o))},runOnlyIf:()=>H.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["Home","Shift"]],callback:()=>{X.setRangeEnd(H._createCellCoords(X.selectedRange.current().from.row,H.columnIndexMapper.getNearestNotHiddenIndex(0,1)))}},{keys:[["Home","Control/Meta"]],captureCtrl:!0,callback:()=>{const e=parseInt(H.getSettings().fixedRowsTop,10),t=parseInt(H.getSettings().fixedColumnsStart,10),o=H.rowIndexMapper.getNearestNotHiddenIndex(e,1),s=H.columnIndexMapper.getNearestNotHiddenIndex(t,1);X.setRangeStart(H._createCellCoords(o,s))},runOnlyIf:()=>H.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End"]],captureCtrl:!0,callback:()=>{X.setRangeStart(H._createCellCoords(H.getSelectedRangeLast().highlight.row,H.columnIndexMapper.getNearestNotHiddenIndex(H.countCols()-1,-1)))},runOnlyIf:()=>H.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End","Shift"]],callback:()=>{X.setRangeEnd(H._createCellCoords(X.selectedRange.current().from.row,H.columnIndexMapper.getNearestNotHiddenIndex(H.countCols()-1,-1)))}},{keys:[["End","Control/Meta"]],captureCtrl:!0,callback:()=>{const e=parseInt(H.getSettings().fixedRowsBottom,10),t=H.rowIndexMapper.getNearestNotHiddenIndex(H.countRows()-e-1,-1),o=H.columnIndexMapper.getNearestNotHiddenIndex(H.countCols()-1,-1);X.setRangeStart(H._createCellCoords(t,o))},runOnlyIf:()=>H.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["PageUp"]],callback:()=>{X.transformStart(-H.countVisibleRows(),0)}},{keys:[["PageUp","Shift"]],callback:()=>{const{to:e}=H.getSelectedRangeLast(),t=Math.max(e.row-H.countVisibleRows(),0),o=H.rowIndexMapper.getNearestNotHiddenIndex(t,1);if(null!==o){const t=H._createCellCoords(o,e.col),s=e.row-H.view.getFirstFullyVisibleRow(),n=Math.max(t.row-s,0);X.setRangeEnd(t),H.scrollViewportTo(n)}}},{keys:[["PageDown"]],callback:()=>{X.transformStart(H.countVisibleRows(),0)}},{keys:[["PageDown","Shift"]],callback:()=>{const{to:e}=H.getSelectedRangeLast(),t=Math.min(e.row+H.countVisibleRows(),H.countRows()-1),o=H.rowIndexMapper.getNearestNotHiddenIndex(t,-1);if(null!==o){const t=H._createCellCoords(o,e.col),s=e.row-H.view.getFirstFullyVisibleRow(),n=Math.min(t.row-s,H.countRows()-1);X.setRangeEnd(t),H.scrollViewportTo(n)}}},{keys:[["Tab"]],callback:e=>{const t="function"==typeof G.tabMoves?G.tabMoves(e):G.tabMoves;X.transformStart(t.row,t.col,!0)}},{keys:[["Shift","Tab"]],callback:e=>{const t="function"==typeof G.tabMoves?G.tabMoves(e):G.tabMoves;X.transformStart(-t.row,-t.col)}}],ae),(0,g.getPluginsNames)().forEach((e=>{const t=(0,g.getPlugin)(e);K.addItem(e,new t(this))})),T.default.getSingleton().run(H,"construct")},o(8),o(78),o(94);var n=o(107),r=o(114),i=o(110),l=o(115),a=s(o(119)),h=s(o(126)),d=o(116),c=o(113),u=o(127),g=o(128),f=o(133),p=o(122),m=o(134),C=o(108),w=o(130),y=s(o(135)),v=s(o(210)),E=o(211),S=o(212),R=o(209),b=o(145),T=s(o(123)),_=o(232),O=o(233),M=o(238),I=o(253),N=o(131),A=o(269);const P="gridDefault";let x=null;new Set},(e,t,o)=>{"use strict";var s=o(9),n=o(46),r=o(70),i=o(75),l=o(77);s({target:"Array",proto:!0,arity:1,forced:o(13)((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=r(t),s=arguments.length;l(o+s);for(var a=0;a<s;a++)t[o]=arguments[a],o++;return i(t,o),o}})},(e,t,o)=>{var s=o(10),n=o(11).f,r=o(50),i=o(54),l=o(44),a=o(62),h=o(74);e.exports=function(e,t){var o,d,c,u,g,f=e.target,p=e.global,m=e.stat;if(o=p?s:m?s[f]||l(f,{}):(s[f]||{}).prototype)for(d in t){if(u=t[d],c=e.dontCallGetSet?(g=n(o,d))&&g.value:o[d],!h(p?d:f+(m?".":"#")+d,e.forced)&&void 0!==c){if(typeof u==typeof c)continue;a(u,c)}(e.sham||c&&c.sham)&&r(u,"sham",!0),i(o,d,u,e)}}},function(e){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)||function(){return this}()||this||Function("return this")()},(e,t,o)=>{var s=o(12),n=o(14),r=o(16),i=o(17),l=o(18),a=o(24),h=o(45),d=o(48),c=Object.getOwnPropertyDescriptor;t.f=s?c:function(e,t){if(e=l(e),t=a(t),d)try{return c(e,t)}catch(e){}if(h(e,t))return i(!n(r.f,e,t),e[t])}},(e,t,o)=>{var s=o(13);e.exports=!s((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},(e,t,o)=>{var s=o(15),n=Function.prototype.call;e.exports=s?n.bind(n):function(){return n.apply(n,arguments)}},(e,t,o)=>{var s=o(13);e.exports=!s((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},(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},e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},(e,t,o)=>{var s=o(19),n=o(22);e.exports=function(e){return s(n(e))}},(e,t,o)=>{var s=o(20),n=o(13),r=o(21),i=Object,l=s("".split);e.exports=n((function(){return!i("z").propertyIsEnumerable(0)}))?function(e){return"String"==r(e)?l(e,""):i(e)}:i},(e,t,o)=>{var s=o(15),n=Function.prototype,r=n.call,i=s&&n.bind.bind(r,r);e.exports=s?i:function(e){return function(){return r.apply(e,arguments)}}},(e,t,o)=>{var s=o(20),n=s({}.toString),r=s("".slice);e.exports=function(e){return r(n(e),8,-1)}},(e,t,o)=>{var s=o(23),n=TypeError;e.exports=function(e){if(s(e))throw n("Can't call method on "+e);return e}},e=>{e.exports=function(e){return null==e}},(e,t,o)=>{var s=o(25),n=o(29);e.exports=function(e){var t=s(e,"string");return n(t)?t:t+""}},(e,t,o)=>{var s=o(14),n=o(26),r=o(29),i=o(36),l=o(39),a=o(40),h=TypeError,d=a("toPrimitive");e.exports=function(e,t){if(!n(e)||r(e))return e;var o,a=i(e,d);if(a){if(void 0===t&&(t="default"),o=s(a,e,t),!n(o)||r(o))return o;throw h("Can't convert object to primitive value")}return void 0===t&&(t="number"),l(e,t)}},(e,t,o)=>{var s=o(27),n=o(28),r=n.all;e.exports=n.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:s(e)||e===r}:function(e){return"object"==typeof e?null!==e:s(e)}},(e,t,o)=>{var s=o(28),n=s.all;e.exports=s.IS_HTMLDDA?function(e){return"function"==typeof e||e===n}:function(e){return"function"==typeof e}},e=>{var t="object"==typeof document&&document.all,o=void 0===t&&void 0!==t;e.exports={all:t,IS_HTMLDDA:o}},(e,t,o)=>{var s=o(30),n=o(27),r=o(31),i=o(32),l=Object;e.exports=i?function(e){return"symbol"==typeof e}:function(e){var t=s("Symbol");return n(t)&&r(t.prototype,l(e))}},(e,t,o)=>{var s=o(10),n=o(27);e.exports=function(e,t){return arguments.length<2?(o=s[e],n(o)?o:void 0):s[e]&&s[e][t];var o}},(e,t,o)=>{var s=o(20);e.exports=s({}.isPrototypeOf)},(e,t,o)=>{var s=o(33);e.exports=s&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},(e,t,o)=>{var s=o(34),n=o(13),r=o(10).String;e.exports=!!Object.getOwnPropertySymbols&&!n((function(){var e=Symbol();return!r(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&s&&s<41}))},(e,t,o)=>{var s,n,r=o(10),i=o(35),l=r.process,a=r.Deno,h=l&&l.versions||a&&a.version,d=h&&h.v8;d&&(n=(s=d.split("."))[0]>0&&s[0]<4?1:+(s[0]+s[1])),!n&&i&&(!(s=i.match(/Edge\/(\d+)/))||s[1]>=74)&&(s=i.match(/Chrome\/(\d+)/))&&(n=+s[1]),e.exports=n},e=>{e.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},(e,t,o)=>{var s=o(37),n=o(23);e.exports=function(e,t){var o=e[t];return n(o)?void 0:s(o)}},(e,t,o)=>{var s=o(27),n=o(38),r=TypeError;e.exports=function(e){if(s(e))return e;throw r(n(e)+" is not a function")}},e=>{var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},(e,t,o)=>{var s=o(14),n=o(27),r=o(26),i=TypeError;e.exports=function(e,t){var o,l;if("string"===t&&n(o=e.toString)&&!r(l=s(o,e)))return l;if(n(o=e.valueOf)&&!r(l=s(o,e)))return l;if("string"!==t&&n(o=e.toString)&&!r(l=s(o,e)))return l;throw i("Can't convert object to primitive value")}},(e,t,o)=>{var s=o(10),n=o(41),r=o(45),i=o(47),l=o(33),a=o(32),h=s.Symbol,d=n("wks"),c=a?h.for||h:h&&h.withoutSetter||i;e.exports=function(e){return r(d,e)||(d[e]=l&&r(h,e)?h[e]:c("Symbol."+e)),d[e]}},(e,t,o)=>{var s=o(42),n=o(43);(e.exports=function(e,t){return n[e]||(n[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.31.1",mode:s?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.31.1/LICENSE",source:"https://github.com/zloirock/core-js"})},e=>{e.exports=!1},(e,t,o)=>{var s=o(10),n=o(44),r="__core-js_shared__",i=s[r]||n(r,{});e.exports=i},(e,t,o)=>{var s=o(10),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}},(e,t,o)=>{var s=o(20),n=o(46),r=s({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return r(n(e),t)}},(e,t,o)=>{var s=o(22),n=Object;e.exports=function(e){return n(s(e))}},(e,t,o)=>{var s=o(20),n=0,r=Math.random(),i=s(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+i(++n+r,36)}},(e,t,o)=>{var s=o(12),n=o(13),r=o(49);e.exports=!s&&!n((function(){return 7!=Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a}))},(e,t,o)=>{var s=o(10),n=o(26),r=s.document,i=n(r)&&n(r.createElement);e.exports=function(e){return i?r.createElement(e):{}}},(e,t,o)=>{var s=o(12),n=o(51),r=o(17);e.exports=s?function(e,t,o){return n.f(e,t,r(1,o))}:function(e,t,o){return e[t]=o,e}},(e,t,o)=>{var s=o(12),n=o(48),r=o(52),i=o(53),l=o(24),a=TypeError,h=Object.defineProperty,d=Object.getOwnPropertyDescriptor,c="enumerable",u="configurable",g="writable";t.f=s?r?function(e,t,o){if(i(e),t=l(t),i(o),"function"==typeof e&&"prototype"===t&&"value"in o&&g in o&&!o[g]){var s=d(e,t);s&&s[g]&&(e[t]=o.value,o={configurable:u in o?o[u]:s[u],enumerable:c in o?o[c]:s[c],writable:!1})}return h(e,t,o)}:h:function(e,t,o){if(i(e),t=l(t),i(o),n)try{return h(e,t,o)}catch(e){}if("get"in o||"set"in o)throw a("Accessors not supported");return"value"in o&&(e[t]=o.value),e}},(e,t,o)=>{var s=o(12),n=o(13);e.exports=s&&n((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},(e,t,o)=>{var s=o(26),n=String,r=TypeError;e.exports=function(e){if(s(e))return e;throw r(n(e)+" is not an object")}},(e,t,o)=>{var s=o(27),n=o(51),r=o(55),i=o(44);e.exports=function(e,t,o,l){l||(l={});var a=l.enumerable,h=void 0!==l.name?l.name:t;if(s(o)&&r(o,h,l),l.global)a?e[t]=o:i(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}},(e,t,o)=>{var s=o(20),n=o(13),r=o(27),i=o(45),l=o(12),a=o(56).CONFIGURABLE,h=o(57),d=o(58),c=d.enforce,u=d.get,g=String,f=Object.defineProperty,p=s("".slice),m=s("".replace),C=s([].join),w=l&&!n((function(){return 8!==f((function(){}),"length",{value:8}).length})),y=String(String).split("String"),v=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),(!i(e,"name")||a&&e.name!==t)&&(l?f(e,"name",{value:t,configurable:!0}):e.name=t),w&&o&&i(o,"arity")&&e.length!==o.arity&&f(e,"length",{value:o.arity});try{o&&i(o,"constructor")&&o.constructor?l&&f(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var s=c(e);return i(s,"source")||(s.source=C(y,"string"==typeof t?t:"")),e};Function.prototype.toString=v((function(){return r(this)&&u(this).source||h(this)}),"toString")},(e,t,o)=>{var s=o(12),n=o(45),r=Function.prototype,i=s&&Object.getOwnPropertyDescriptor,l=n(r,"name"),a=l&&"something"===function(){}.name,h=l&&(!s||s&&i(r,"name").configurable);e.exports={EXISTS:l,PROPER:a,CONFIGURABLE:h}},(e,t,o)=>{var s=o(20),n=o(27),r=o(43),i=s(Function.toString);n(r.inspectSource)||(r.inspectSource=function(e){return i(e)}),e.exports=r.inspectSource},(e,t,o)=>{var s,n,r,i=o(59),l=o(10),a=o(26),h=o(50),d=o(45),c=o(43),u=o(60),g=o(61),f="Object already initialized",p=l.TypeError,m=l.WeakMap;if(i||c.state){var C=c.state||(c.state=new m);C.get=C.get,C.has=C.has,C.set=C.set,s=function(e,t){if(C.has(e))throw p(f);return t.facade=e,C.set(e,t),t},n=function(e){return C.get(e)||{}},r=function(e){return C.has(e)}}else{var w=u("state");g[w]=!0,s=function(e,t){if(d(e,w))throw p(f);return t.facade=e,h(e,w,t),t},n=function(e){return d(e,w)?e[w]:{}},r=function(e){return d(e,w)}}e.exports={set:s,get:n,has:r,enforce:function(e){return r(e)?n(e):s(e,{})},getterFor:function(e){return function(t){var o;if(!a(t)||(o=n(t)).type!==e)throw p("Incompatible receiver, "+e+" required");return o}}}},(e,t,o)=>{var s=o(10),n=o(27),r=s.WeakMap;e.exports=n(r)&&/native code/.test(String(r))},(e,t,o)=>{var s=o(41),n=o(47),r=s("keys");e.exports=function(e){return r[e]||(r[e]=n(e))}},e=>{e.exports={}},(e,t,o)=>{var s=o(45),n=o(63),r=o(11),i=o(51);e.exports=function(e,t,o){for(var l=n(t),a=i.f,h=r.f,d=0;d<l.length;d++){var c=l[d];s(e,c)||o&&s(o,c)||a(e,c,h(t,c))}}},(e,t,o)=>{var s=o(30),n=o(20),r=o(64),i=o(73),l=o(53),a=n([].concat);e.exports=s("Reflect","ownKeys")||function(e){var t=r.f(l(e)),o=i.f;return o?a(t,o(e)):t}},(e,t,o)=>{var s=o(65),n=o(72).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return s(e,n)}},(e,t,o)=>{var s=o(20),n=o(45),r=o(18),i=o(66).indexOf,l=o(61),a=s([].push);e.exports=function(e,t){var o,s=r(e),h=0,d=[];for(o in s)!n(l,o)&&n(s,o)&&a(d,o);for(;t.length>h;)n(s,o=t[h++])&&(~i(d,o)||a(d,o));return d}},(e,t,o)=>{var s=o(18),n=o(67),r=o(70),i=function(e){return function(t,o,i){var l,a=s(t),h=r(a),d=n(i,h);if(e&&o!=o){for(;h>d;)if((l=a[d++])!=l)return!0}else for(;h>d;d++)if((e||d in a)&&a[d]===o)return e||d||0;return!e&&-1}};e.exports={includes:i(!0),indexOf:i(!1)}},(e,t,o)=>{var s=o(68),n=Math.max,r=Math.min;e.exports=function(e,t){var o=s(e);return o<0?n(o+t,0):r(o,t)}},(e,t,o)=>{var s=o(69);e.exports=function(e){var t=+e;return t!=t||0===t?0:s(t)}},e=>{var t=Math.ceil,o=Math.floor;e.exports=Math.trunc||function(e){var s=+e;return(s>0?o:t)(s)}},(e,t,o)=>{var s=o(71);e.exports=function(e){return s(e.length)}},(e,t,o)=>{var s=o(68),n=Math.min;e.exports=function(e){return e>0?n(s(e),9007199254740991):0}},e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},(e,t)=>{t.f=Object.getOwnPropertySymbols},(e,t,o)=>{var s=o(13),n=o(27),r=/#|\.prototype\./,i=function(e,t){var o=a[l(e)];return o==d||o!=h&&(n(t)?s(t):!!t)},l=i.normalize=function(e){return String(e).replace(r,".").toLowerCase()},a=i.data={},h=i.NATIVE="N",d=i.POLYFILL="P";e.exports=i},(e,t,o)=>{"use strict";var s=o(12),n=o(76),r=TypeError,i=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)&&!i(e,"length").writable)throw r("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},(e,t,o)=>{var s=o(21);e.exports=Array.isArray||function(e){return"Array"==s(e)}},e=>{var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},(e,t,o)=>{var s=o(9),n=o(10),r=o(79),i=o(80),l="WebAssembly",a=n[l],h=7!==Error("e",{cause:7}).cause,d=function(e,t){var o={};o[e]=i(e,t,h),s({global:!0,constructor:!0,arity:1,forced:h},o)},c=function(e,t){if(a&&a[e]){var o={};o[e]=i(l+"."+e,t,h),s({target:l,stat:!0,constructor:!0,arity:1,forced:h},o)}};d("Error",(function(e){return function(t){return r(e,this,arguments)}})),d("EvalError",(function(e){return function(t){return r(e,this,arguments)}})),d("RangeError",(function(e){return function(t){return r(e,this,arguments)}})),d("ReferenceError",(function(e){return function(t){return r(e,this,arguments)}})),d("SyntaxError",(function(e){return function(t){return r(e,this,arguments)}})),d("TypeError",(function(e){return function(t){return r(e,this,arguments)}})),d("URIError",(function(e){return function(t){return r(e,this,arguments)}})),c("CompileError",(function(e){return function(t){return r(e,this,arguments)}})),c("LinkError",(function(e){return function(t){return r(e,this,arguments)}})),c("RuntimeError",(function(e){return function(t){return r(e,this,arguments)}}))},(e,t,o)=>{var s=o(15),n=Function.prototype,r=n.apply,i=n.call;e.exports="object"==typeof Reflect&&Reflect.apply||(s?i.bind(r):function(){return i.apply(r,arguments)})},(e,t,o)=>{"use strict";var s=o(30),n=o(45),r=o(50),i=o(31),l=o(81),a=o(62),h=o(84),d=o(85),c=o(86),u=o(90),g=o(91),f=o(12),p=o(42);e.exports=function(e,t,o,m){var C="stackTraceLimit",w=m?2:1,y=e.split("."),v=y[y.length-1],E=s.apply(null,y);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=c(m?t:e,void 0),s=m?new E(e):new E;return void 0!==o&&r(s,"message",o),g(s,b,s.stack,2),this&&i(S,this)&&d(s,this,b),arguments.length>w&&u(s,arguments[w]),s}));if(b.prototype=S,"Error"!==v?l?l(b,R):a(b,R,{name:!0}):f&&C in E&&(h(b,E,C),h(b,E,"prepareStackTrace")),a(b,E),!p)try{S.name!==v&&r(S,"name",v),S.constructor=b}catch(e){}return b}}},(e,t,o)=>{var s=o(82),n=o(53),r=o(83);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 n(o),r(s),t?e(o,s):o.__proto__=s,o}}():void 0)},(e,t,o)=>{var s=o(20),n=o(37);e.exports=function(e,t,o){try{return s(n(Object.getOwnPropertyDescriptor(e,t)[o]))}catch(e){}}},(e,t,o)=>{var s=o(27),n=String,r=TypeError;e.exports=function(e){if("object"==typeof e||s(e))return e;throw r("Can't set "+n(e)+" as a prototype")}},(e,t,o)=>{var s=o(51).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}})}},(e,t,o)=>{var s=o(27),n=o(26),r=o(81);e.exports=function(e,t,o){var i,l;return r&&s(i=t.constructor)&&i!==o&&n(l=i.prototype)&&l!==o.prototype&&r(e,l),e}},(e,t,o)=>{var s=o(87);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:s(e)}},(e,t,o)=>{var s=o(88),n=String;e.exports=function(e){if("Symbol"===s(e))throw TypeError("Cannot convert a Symbol value to a string");return n(e)}},(e,t,o)=>{var s=o(89),n=o(27),r=o(21),i=o(40)("toStringTag"),l=Object,a="Arguments"==r(function(){return arguments}());e.exports=s?r: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),i))?o:a?r(t):"Object"==(s=r(t))&&n(t.callee)?"Arguments":s}},(e,t,o)=>{var s={};s[o(40)("toStringTag")]="z",e.exports="[object z]"===String(s)},(e,t,o)=>{var s=o(26),n=o(50);e.exports=function(e,t){s(t)&&"cause"in t&&n(e,"cause",t.cause)}},(e,t,o)=>{var s=o(50),n=o(92),r=o(93),i=Error.captureStackTrace;e.exports=function(e,t,o,l){r&&(i?i(e,t):s(e,"stack",n(o,l)))}},(e,t,o)=>{var s=o(20),n=Error,r=s("".replace),i=String(n("zxcasd").stack),l=/\n\s*at [^:]*:[^\n]*/,a=l.test(i);e.exports=function(e,t){if(a&&"string"==typeof e&&!n.prepareStackTrace)for(;t--;)e=r(e,l,"");return e}},(e,t,o)=>{var s=o(13),n=o(17);e.exports=!s((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",n(1,7)),7!==e.stack)}))},(e,t,o)=>{o(95),o(104)},(e,t,o)=>{var s=o(9),n=o(10),r=o(96).clear;s({global:!0,bind:!0,enumerable:!0,forced:n.clearImmediate!==r},{clearImmediate:r})},(e,t,o)=>{var s,n,r,i,l=o(10),a=o(79),h=o(97),d=o(27),c=o(45),u=o(13),g=o(99),f=o(100),p=o(49),m=o(101),C=o(102),w=o(103),y=l.setImmediate,v=l.clearImmediate,E=l.process,S=l.Dispatch,R=l.Function,b=l.MessageChannel,T=l.String,_=0,O={},M="onreadystatechange";u((function(){s=l.location}));var I=function(e){if(c(O,e)){var t=O[e];delete O[e],t()}},N=function(e){return function(){I(e)}},A=function(e){I(e.data)},P=function(e){l.postMessage(T(e),s.protocol+"//"+s.host)};y&&v||(y=function(e){m(arguments.length,1);var t=d(e)?e:R(e),o=f(arguments,1);return O[++_]=function(){a(t,void 0,o)},n(_),_},v=function(e){delete O[e]},w?n=function(e){E.nextTick(N(e))}:S&&S.now?n=function(e){S.now(N(e))}:b&&!C?(i=(r=new b).port2,r.port1.onmessage=A,n=h(i.postMessage,i)):l.addEventListener&&d(l.postMessage)&&!l.importScripts&&s&&"file:"!==s.protocol&&!u(P)?(n=P,l.addEventListener("message",A,!1)):n=M in p("script")?function(e){g.appendChild(p("script"))[M]=function(){g.removeChild(this),I(e)}}:function(e){setTimeout(N(e),0)}),e.exports={set:y,clear:v}},(e,t,o)=>{var s=o(98),n=o(37),r=o(15),i=s(s.bind);e.exports=function(e,t){return n(e),void 0===t?e:r?i(e,t):function(){return e.apply(t,arguments)}}},(e,t,o)=>{var s=o(21),n=o(20);e.exports=function(e){if("Function"===s(e))return n(e)}},(e,t,o)=>{var s=o(30);e.exports=s("document","documentElement")},(e,t,o)=>{var s=o(20);e.exports=s([].slice)},e=>{var t=TypeError;e.exports=function(e,o){if(e<o)throw t("Not enough arguments");return e}},(e,t,o)=>{var s=o(35);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(s)},(e,t,o)=>{var s=o(21);e.exports="undefined"!=typeof process&&"process"==s(process)},(e,t,o)=>{var s=o(9),n=o(10),r=o(96).set,i=o(105),l=n.setImmediate?i(r,!1):r;s({global:!0,bind:!0,enumerable:!0,forced:n.setImmediate!==l},{setImmediate:l})},(e,t,o)=>{"use strict";var s,n=o(10),r=o(79),i=o(27),l=o(106),a=o(35),h=o(100),d=o(101),c=n.Function,u=/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 u?function(s,n){var l=d(arguments.length,1)>o,a=i(s)?s:c(s),u=l?h(arguments,o):[],g=l?function(){r(a,this,u)}:a;return t?e(g,n):e(g)}:e}},e=>{e.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},(e,t,o)=>{"use strict";t.__esModule=!0,t.addClass=function(e,t){"string"==typeof t&&(t=t.split(" "));(t=i(t)).length>0&&e.classList.add(...t)},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=l,t.fastInnerHTML=function(e,t){let o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];a.test(t)?e.innerHTML=o?(0,s.sanitize)(t):t:h(e,t)},t.fastInnerText=h,t.getCaretPosition=function(e){if(e.selectionStart)return e.selectionStart;return 0},t.getComputedStyle=u,t.getCssTransform=function(e){let t;if(e.style.transform&&""!==(t=e.style.transform))return["transform",t];return-1},t.getFrameElement=n,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 n(e)&&e.parent},t.getScrollLeft=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(e===t)return c(t);return e.scrollLeft},t.getScrollTop=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(e===t)return d(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:r}=n.style;if([e,t,r].includes("scroll"))return n;if(({overflow:e,overflowX:t,overflowY:r}=o.getComputedStyle(n)),s.includes(e)||s.includes(t)||s.includes(r))return n;if(n.clientHeight<=n.scrollHeight+1&&(s.includes(r)||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===g&&(g=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 g},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=u(e,o);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=u(s,o),t=["scroll","hidden","auto"],n=e.getPropertyValue("overflow"),r=e.getPropertyValue("overflow-y"),i=e.getPropertyValue("overflow-x");if(t.includes(n)||t.includes(r)||t.includes(i))return s;s=s.parentNode}return o},t.getWindowScrollLeft=c,t.getWindowScrollTop=d,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=f,t.isOutsideInput=p,t.isVisible=function e(t){const o=t.ownerDocument.documentElement;let s=t;for(;s!==o;){if(null===s)return!1;if(s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(s.host){if(s.host.impl)return e(s.host.impl);if(s.host)return e(s.host);throw new Error("Lost in Web Components world")}return!1}if(s.style&&"none"===s.style.display)return!1;s=s.parentNode}return!0},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,r,i,l=e;n=l.offsetLeft,r=l.offsetTop,i=l;for(;(l=l.offsetParent)&&l!==t.body;)n+=l.offsetLeft,r+=l.offsetTop,i=l;i&&"fixed"===i.style.position&&(n+=o.pageXOffset||s.scrollLeft,r+=o.pageYOffset||s.scrollTop);return{left:n,top:r}},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.removeClass=function(e,t){"string"==typeof t&&(t=t.split(" "));(t=i(t)).length>0&&e.classList.remove(...t)},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.selectElementIfAllowed=function(e){p(e.ownerDocument.activeElement)||e.select()},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,r=n.style.display;n.style.display="block",e.setSelectionRange(t,o),n.style.display=r}}},t.setOverlayPosition=function(e,t,o){e.style.transform=`translate3d(${t},${o},0)`},o(8),o(78);var s=o(108);function n(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 r=e;for(;null!=r&&r!==o;){const{nodeType:e,nodeName:o}=r;if(e===s&&(t.includes(o)||t.includes(r)))return r;const{host:i}=r;r=i&&e===n?i:r.parentNode}return null}function i(e){return e&&e.length?e.filter((e=>!!e)):[]}function l(e){let t;for(;t=e.lastChild;)e.removeChild(t)}const a=/(<(.*)>|&(.*);)/;function h(e,t){const o=e.firstChild;o&&3===o.nodeType&&null===o.nextSibling?o.textContent=t:(l(e),e.appendChild(e.ownerDocument.createTextNode(t)))}function d(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).scrollY}function c(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).scrollX}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e.currentStyle||t.getComputedStyle(e)}let g;function f(e){return e&&(["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function p(e){return f(e)&&!1===e.hasAttribute("data-hot-input")}t.HTML_CHARACTERS=a},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.equalsIgnoreCase=function(){const e=[];for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];let n=o.length;for(;n;){n-=1;const t=(0,r.stringify)(o[n]).toLowerCase();-1===e.indexOf(t)&&e.push(t)}return 1===e.length},t.isPercentValue=function(e){return/^([0-9][0-9]?%$)|(^100%$)/.test(e)},t.randomString=function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+e()+e()},t.sanitize=i,t.stripTags=function(e){return i(`${e}`,{ALLOWED_TAGS:[]})},t.substitute=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return`${e}`.replace(/(?:\\)?\[([^[\]]+)]/g,((e,o)=>"\\"===e.charAt(0)?e.substr(1,e.length-1):void 0===t[o]?"":t[o]))},t.toUpperCaseFirst=function(e){return e[0].toUpperCase()+e.substr(1)},o(8);var n=s(o(109)),r=o(110);function i(e,t){return n.default.sanitize(e,t)}},t=>{"use strict";t.exports=e},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t._injectProductInfo=function(e,t){const o=!l(e),s="string"==typeof e&&"non-commercial-and-evaluation"===e.toLowerCase(),r="0.0.0-next-baf2fcf-20230809";let i,y="invalid",v="invalid";const E=function(e){let t=[][a],o=t;if(e[a]!==u("Z"))return!1;for(let t="",s="B<H4P+".split(""),n=u(s.shift());n;n=u(s.shift()||"A"))--n<""[a]?o|=(d(`${d(h(t)+(h(c(e,Math.abs(n),2))+[]).padStart(2,"0"))}`)%97||2)>>1:t=c(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)("22/06/2023","DD/MM/YYYY"),o=Math.floor(t.toDate().getTime()/864e5),s=f(e);i=(0,n.default)(864e5*(s+1),"x").format("MMMM DD, YYYY"),o>s?(y="expired",v="expired"):(y="valid",v="valid")}else s?(y="non_commercial",v="valid"):(y="invalid",v="invalid");else y="missing",v="missing";p()&&(y="valid",v="valid");if(!m&&"valid"!==y){C[y]({keyValidityDate:i,hotVersion:r})&&console["non_commercial"===y?"info":"warn"](C[y]({keyValidityDate:i,hotVersion:r})),m=!0}if("valid"!==v&&t.parentNode){if(w[v]({keyValidityDate:i,hotVersion:r})){const e=document.createElement("div");e.className="hot-display-license-info",e.innerHTML=w[v]({keyValidityDate:i,hotVersion:r}),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=i,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(111)),r=o(112);function i(e){return void 0===e}function l(e){return null===e||""===e||i(e)}const a="length",h=e=>parseInt(e,16),d=e=>parseInt(e,10),c=(e,t,o)=>e.substr(t,o),u=e=>e.codePointAt(0)-65,g=e=>`${e}`.replace(/\-/g,""),f=e=>h(c(g(e),h("12"),u("F")))/(h(c(g(e),u("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 C={invalid:()=>r.toSingleLine`
|
2
2
|
The license key for Handsontable is invalid.\x20
|
3
3
|
If you need any help, contact us at support@handsontable.com.`,expired:e=>{let{keyValidityDate:t,hotVersion:o}=e;return r.toSingleLine`
|
4
4
|
The license key for Handsontable expired on ${t}, and is not valid for the installed\x20
|
@@ -35,7 +35,7 @@
|
|
35
35
|
Mind that you cannot mix different types of operations (for instance, if you use \`conjunction\`,\x20
|
36
36
|
use it consequently for a particular column).`)}else if((0,c.isUndefined)(d.operations[o]))throw new Error(i.toSingleLine`Unexpected operation named \`${o}\`. Possible ones are\x20
|
37
37
|
\`disjunction\` and \`conjunction\`.`);const f=this.getConditions(e);0===f.length?this.filteringStates.setValueAtIndex(e,{operation:o,conditions:[{name:u,args:l,func:(0,a.getCondition)(u,l)}]},s):f.push({name:u,args:l,func:(0,a.getCondition)(u,l)}),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,n.arrayReduce)(this.filteringStates.getEntries(),((e,t)=>{let[o,{operation:s,conditions:r}]=t;return e.push({column:o,operation:s,conditions:(0,n.arrayMap)(r,(e=>{let{name:t,args:o}=e;return{name:t,args:o}}))}),e}),[])}importAllConditions(e){this.clean(),(0,n.arrayEach)(e,(e=>{(0,n.arrayEach)(e.conditions,(t=>this.addCondition(e.column,t)))}))}removeConditions(e){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}destroy(){this.isMapRegistrable&&this.hot.columnIndexMapper.unregisterMap(g),this.filteringStates=null,this.clearLocalHooks()}}(0,r.mixin)(f,l.default);var p=f;t.default=p},(e,t,o)=>{"use strict";t.__esModule=!0,o(8);var s=o(113);var n=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>[];this.conditionCollection=e,this.columnDataFactory=t}filter(){let e=[];return(0,s.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,s.arrayEach)(t,(t=>{void 0!==t&&this.conditionCollection.isMatch(t,e)&&o.push(t)})),o}_getIntersectData(e,t){const o=[];return(0,s.arrayEach)(t,(t=>{const s=t.meta.visualRow;void 0!==e[s]&&(o[s]=e[s])})),o}};t.default=n},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(8);var n=o(113),r=o(116),i=o(114),l=s(o(218)),a=s(o(493)),h=s(o(494)),d=o(477);class c{constructor(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>[];this.hot=e,this.conditionCollection=t,this.columnDataFactory=o,this.changes=[],this.grouping=!1,this.latestEditedColumnPosition=-1,this.latestOrderStack=[],this.conditionCollection.addLocalHook("beforeRemove",(e=>this._onConditionBeforeModify(e))),this.conditionCollection.addLocalHook("afterRemove",(e=>this.updateStatesAtColumn(e))),this.conditionCollection.addLocalHook("afterAdd",(e=>this.updateStatesAtColumn(e))),this.conditionCollection.addLocalHook("beforeClean",(()=>this._onConditionBeforeClean())),this.conditionCollection.addLocalHook("afterClean",(()=>this._onConditionAfterClean()))}groupChanges(){this.grouping=!0}flush(){this.grouping=!1,(0,n.arrayEach)(this.changes,(e=>{this.updateStatesAtColumn(e)})),this.changes.length=0}_onConditionBeforeModify(e){this.latestEditedColumnPosition=this.conditionCollection.getColumnStackPosition(e)}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 r=this.conditionCollection.getColumnStackPosition(e);-1===r&&(r=this.latestEditedColumnPosition);const l=s.slice(0,r),c=s.slice(r);c.length&&c[0].column===e&&c.shift();const u=(0,i.curry)((function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const r=new a.default(o.hot,!1),i=[].concat(e,s);r.importAllConditions(i);const l=o.columnDataFactory(t);let c;c=r.isEmpty()?l:new h.default(r,(e=>o.columnDataFactory(e))).filter(),c=(0,n.arrayMap)(c,(e=>e.meta.visualRow));const u=(0,d.createArrayAssertion)(c);return r.destroy(),(0,n.arrayFilter)(l,(e=>u(e.meta.visualRow)))}))(l),g=[].concat(this.conditionCollection.getConditions(e));this.runLocalHooks("update",{editedConditionStack:{column:e,conditions:g},dependentConditionStacks:c,filteredRowsFactory:u,conditionArgsChange:t})}_onConditionBeforeClean(){this.latestOrderStack=this.conditionCollection.getFilteredColumns()}_onConditionAfterClean(){(0,n.arrayEach)(this.latestOrderStack,(e=>{this.updateStatesAtColumn(e)}))}destroy(){this.clearLocalHooks(),(0,r.objectEach)(this,((e,t)=>{this[t]=null}))}}(0,r.mixin)(c,l.default);var u=c;t.default=u},(e,t,o)=>{"use strict";o.r(t)},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(498);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.Formulas=s.Formulas},(e,t,o)=>{"use strict";o(78);var s=o(1);t.__esModule=!0,o(117),o(8);var n=s(o(136)),r=s(o(143)),i=s(o(140)),l=o(357),a=s(o(125)),h=o(124),d=o(130),c=o(110),u=o(499),g=o(501),f=o(500),p=o(211),m=o(108),C=s(o(123)),w=s(o(502));function y(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)}const v="formulas";t.PLUGIN_KEY=v;const E=["maxRows","maxColumns","language"];t.SETTING_KEYS=E;t.PLUGIN_PRIORITY=260,C.default.getSingleton().register("afterNamedExpressionAdded"),C.default.getSingleton().register("afterNamedExpressionRemoved"),C.default.getSingleton().register("afterSheetAdded"),C.default.getSingleton().register("afterSheetRemoved"),C.default.getSingleton().register("afterSheetRenamed"),C.default.getSingleton().register("afterFormulasValuesUpdate");const S=e=>"UndoRedo.undo"===e||"UndoRedo.redo"===e||"auto"===e;var R=new WeakMap,b=new WeakMap,T=new WeakMap;class _ extends l.BasePlugin{constructor(){var e;super(...arguments),e=this,y(this,R,{writable:!0,value:!1}),y(this,b,{writable:!0,value:!1}),y(this,T,{writable:!0,value:[["valuesUpdated",function(){return e.onEngineValuesUpdated(...arguments)}],["namedExpressionAdded",function(){return e.onEngineNamedExpressionsAdded(...arguments)}],["namedExpressionRemoved",function(){return e.onEngineNamedExpressionsRemoved(...arguments)}],["sheetAdded",function(){return e.onEngineSheetAdded(...arguments)}],["sheetRenamed",function(){return e.onEngineSheetRenamed(...arguments)}],["sheetRemoved",function(){return e.onEngineSheetRemoved(...arguments)}]]}),(0,n.default)(this,"staticRegister",(0,a.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 v}static get PLUGIN_PRIORITY(){return 260}static get SETTING_KEYS(){return[v,...E]}get sheetId(){return null===this.sheetName?null:this.engine.getSheetId(this.sheetName)}isEnabled(){return!!this.hot.getSettings()[v]}enablePlugin(){var e,t=this;if(!this.enabled)if(this.engine=null!==(e=(0,u.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(){return t.onBeforeLoadData(...arguments)})),this.addHook("afterLoadData",(function(){return t.onAfterLoadData(...arguments)})),this.addHook("beforeUpdateData",(function(){return t.onBeforeLoadData(...arguments)})),this.addHook("afterUpdateData",(function(){return t.onAfterLoadData(...arguments)})),this.addHook("modifyData",(function(){return t.onModifyData(...arguments)})),this.addHook("modifySourceData",(function(){return t.onModifySourceData(...arguments)})),this.addHook("beforeValidate",(function(){return t.onBeforeValidate(...arguments)})),this.addHook("afterSetSourceDataAtCell",(function(){return t.onAfterSetSourceDataAtCell(...arguments)})),this.addHook("afterSetDataAtCell",(function(){return t.onAfterSetDataAtCell(...arguments)})),this.addHook("afterSetDataAtRowProp",(function(){return t.onAfterSetDataAtCell(...arguments)})),this.addHook("beforeCreateRow",(function(){return t.onBeforeCreateRow(...arguments)})),this.addHook("beforeCreateCol",(function(){return t.onBeforeCreateCol(...arguments)})),this.addHook("afterCreateRow",(function(){return t.onAfterCreateRow(...arguments)})),this.addHook("afterCreateCol",(function(){return t.onAfterCreateCol(...arguments)})),this.addHook("beforeRemoveRow",(function(){return t.onBeforeRemoveRow(...arguments)})),this.addHook("beforeRemoveCol",(function(){return t.onBeforeRemoveCol(...arguments)})),this.addHook("afterRemoveRow",(function(){return t.onAfterRemoveRow(...arguments)})),this.addHook("afterRemoveCol",(function(){return t.onAfterRemoveCol(...arguments)})),this.indexSyncer=new w.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(){return t.onAfterCellMetaReset(...arguments)})),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(){return t.onAfterDetachChild(...arguments)})),this.addHook("beforeAutofill",(function(){return t.onBeforeAutofill(...arguments)})),(0,i.default)(this,T).forEach((e=>{let[t,o]=e;return this.engine.on(t,o)})),super.enablePlugin()}else(0,h.warn)("Missing the required `engine` key in the Formulas settings. Please fill it with either an engine class or an engine instance.")}disablePlugin(){(0,i.default)(this,T).forEach((e=>{let[t,o]=e;return this.engine.off(t,o)})),(0,u.unregisterEngine)(this.engine,this.hot),this.engine=null,super.disablePlugin()}updatePlugin(e){const t=(0,f.getEngineSettingsWithOverrides)(this.hot.getSettings());(0,f.haveEngineSettingsChanged)(this.engine.getConfig(),t)&&this.engine.updateConfig(t);const o=this.hot.getSettings()[v];if((0,c.isDefined)(o)&&(0,c.isDefined)(o.sheetName)&&o.sheetName!==this.sheetName&&this.switchSheet(o.sheetName),!e.data&&null===this.sheetName){const e=this.hot.getSettings()[v].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(){(0,i.default)(this,T).forEach((e=>{var t;let[o,s]=e;return null===(t=this.engine)||void 0===t?void 0:t.off(o,s)})),(0,r.default)(this,T,null),(0,u.unregisterEngine)(this.engine,this.hot),this.engine=null,super.destroy()}addSheet(e,t){if((0,c.isDefined)(t)&&!(0,p.isArrayOfArrays)(t))return(0,h.warn)("The provided data should be an array of arrays."),!1;if(null!=e&&this.engine.doesSheetExist(e))return(0,h.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,h.warn)(e.message),!1}}switchSheet(e){if(!this.engine.doesSheetExist(e))return void(0,h.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,m.toUpperCaseFirst)(v)}.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,u.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,c.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:r,col:i}=null!==(s=e.address)&&void 0!==s?s:{};if(!1===(0,c.isDefined)(r)||!1===(0,c.isDefined)(i)||r>=this.hot.countRows()||i>=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,u.getRegisteredHotInstances)(this.engine).get(l);if(!e)return;e.validateCell(e.getDataAtCell(r,i),e.getCellMeta(r,i),(()=>{}))}}))}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,h.warn)(`Not possible to set cell data at ${JSON.stringify(s)}`);const n=this.hot.getCellMeta(e,t);return(0,g.isDate)(o,n.type)&&((0,g.isDateValid)(o,n.dateFormat)?o=(0,g.getDateInHfFormat)(o,n.dateFormat):!1===(0,g.isFormula)(o)&&(o=`'${o}`)),this.engine.setCellContents(s,o)}onBeforeValidate(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,d.isNumeric)(n)&&(n=(0,g.getDateFromExcelDate)(n,o.dateFormat)),"object"==typeof n&&null!==n?n.value:n}return e}onBeforeAutofill(e,t,o){const{row:s,col:n}=t.getTopStartCorner(),{row:r,col:i}=t.getBottomEndCorner(),{row:l,col:a}=o.getTopStartCorner(),{row:h,col:d}=o.getBottomEndCorner(),c={start:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(s),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(n),sheet:this.sheetId},end:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(r),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(i),sheet:this.sheetId}},u={start:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(l),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(a),sheet:this.sheetId},end:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(h),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(d),sheet:this.sheetId}};if(!1===this.engine.isItPossibleToSetCellContents(u))return!1;const f=this.engine.getFillRangeData(c,u),{row:p,col:m}=c.start,{row:C,col:w}=c.end,y=C-p+1,v=w-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=e%y,n=t%v,r=this.hot.getCellMeta(s,n);(0,g.isDate)(o,r.type)&&(o.startsWith("'")?f[e][t]=o.slice(1):!1===this.isFormulaCellType(s,n,this.sheetId)&&(f[e][t]=(0,g.getDateInHotFormat)(o,r.dateFormat)))}return f}onBeforeLoadData(e,t){(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"").includes((0,m.toUpperCaseFirst)(v))||(0,r.default)(this,b,(0,c.isUndefined)(this.hot.getSettings().data))}onAfterCellMetaReset(){const e=this.hot.getSourceDataArray();let t=!1;e.forEach(((o,s)=>{o.forEach(((o,n)=>{const r=this.hot.getCellMeta(s,n),i=r.dateFormat;(0,g.isDate)(o,r.type)&&(t=!0,(0,g.isDateValid)(o,i)?e[s][n]=(0,g.getDateInHfFormat)(o,i):!1===this.isFormulaCellType(s,n)&&(e[s][n]=`'${o}`))}))})),!0===t&&((0,r.default)(this,R,!0),this.engine.setSheetContent(this.sheetId,e),(0,r.default)(this,R,!1))}onAfterLoadData(e,t){if(!(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"").includes((0,m.toUpperCaseFirst)(v)))if(this.sheetName=(0,u.setupSheet)(this.engine,this.hot.getSettings()[v].sheetName),(0,i.default)(this,b))this.switchSheet(this.sheetName);else{const e=this.hot.getSourceDataArray();if(this.engine.isItPossibleToReplaceSheetContent(this.sheetId,e)){(0,r.default)(this,R,!0);const t=this.engine.setSheetContent(this.sheetId,e);this.indexSyncer.setupSyncEndpoint(this.engine,this.sheetId),this.renderDependentSheets(t),(0,r.default)(this,R,!1)}}}onModifyData(e,t,o,s){if("get"!==s||(0,i.default)(this,R)||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,g.isEscapedFormulaExpression)(o.value)&&(o.value=(0,g.unescapeFormulaExpression)(o.value)))}const r={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(n),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t),sheet:this.sheetId};let l=this.engine.getCellValue(r);const a=this.hot.getCellMeta(n,t);"date"===a.type&&(0,d.isNumeric)(l)&&(l=(0,g.getDateFromExcelDate)(l,a.dateFormat));const h="object"==typeof l&&null!==l?l.value:l;o.value=h}onModifySourceData(e,t,o,s){if("get"!==s||(0,i.default)(this,R)||null===this.sheetName||!this.engine.doesSheetExist(this.sheetName))return;const n=this.hot.toVisualRow(e),r=this.hot.propToCol(t);if(null===n||null===r)return;if(!this.isFormulaCellType(n,r)){if("ARRAY"!==this.getCellType(n,r))return}const l=this.engine.getSheetDimensions(this.engine.getSheetId(this.sheetName));if(0===l.width&&0===l.height)return;const a={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(n),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(r),sheet:this.sheetId};o.value=this.engine.getCellSerialized(a)}onAfterSetDataAtCell(e,t){if(S(t))return;const o=[],s=[],n=this.engine.batch((()=>{e.forEach((e=>{let[t,n,,r]=e;const i=this.hot.propToCol(n),l=this.hot.toPhysicalRow(t),a=this.hot.toPhysicalColumn(i),h={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(i),sheet:this.sheetId};null!==l&&null!==a?this.syncChangeWithEngine(t,i,r):o.push([t,i,r]),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)}onAfterSetSourceDataAtCell(e,t){if(S(t))return;const o=[],s=[];e.forEach((e=>{let[t,n,,r]=e;const i=this.hot.propToCol(n);if(!(0,d.isNumeric)(i))return;const l={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(i),sheet:this.sheetId};this.engine.isItPossibleToSetCellContents(l)?(s.push({address:l}),o.push(...this.engine.setCellContents(l,r))):(0,h.warn)(`Not possible to set source cell data at ${JSON.stringify(l)}`)})),this.renderDependentSheets(o),this.validateDependentCells(o,s)}onBeforeCreateRow(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}onBeforeCreateCol(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}onBeforeRemoveRow(e,t,o){return!1!==this.rowAxisSyncer.setRemovedHfIndexes(o).every((e=>this.engine.isItPossibleToRemoveRows(this.sheetId,[e,1])))&&void 0}onBeforeRemoveCol(e,t,o){return!1!==this.columnAxisSyncer.setRemovedHfIndexes(o).every((e=>this.engine.isItPossibleToRemoveColumns(this.sheetId,[e,1])))&&void 0}onAfterCreateRow(e,t,o){if(S(o))return;const s=this.engine.addRows(this.sheetId,[this.rowAxisSyncer.getHfIndexFromVisualIndex(e),t]);this.renderDependentSheets(s)}onAfterCreateCol(e,t,o){if(S(o))return;const s=this.engine.addColumns(this.sheetId,[this.columnAxisSyncer.getHfIndexFromVisualIndex(e),t]);this.renderDependentSheets(s)}onAfterRemoveRow(e,t,o,s){if(S(s))return;const n=this.rowAxisSyncer.getRemovedHfIndexes().sort().reverse(),r=this.engine.batch((()=>{n.forEach((e=>{this.engine.removeRows(this.sheetId,[e,1])}))}));this.renderDependentSheets(r)}onAfterRemoveCol(e,t,o,s){if(S(s))return;const n=this.columnAxisSyncer.getRemovedHfIndexes().sort().reverse(),r=this.engine.batch((()=>{n.forEach((e=>{this.engine.removeColumns(this.sheetId,[e,1])}))}));this.renderDependentSheets(r)}onAfterDetachChild(e,t,o){var s;(0,r.default)(this,R,!0);const n=this.hot.getSourceDataArray(o,0,o+((null===(s=t.__children)||void 0===s?void 0:s.length)||0),this.hot.countSourceCols());(0,r.default)(this,R,!1),n.forEach(((e,t)=>{e.forEach(((e,s)=>{this.engine.setCellContents({col:s,row:o+t,sheet:this.sheetId},[[e]])}))}))}onEngineValuesUpdated(e){this.hot.runHooks("afterFormulasValuesUpdate",e)}onEngineNamedExpressionsAdded(e,t){this.hot.runHooks("afterNamedExpressionAdded",e,t)}onEngineNamedExpressionsRemoved(e,t){this.hot.runHooks("afterNamedExpressionRemoved",e,t)}onEngineSheetAdded(e){this.hot.runHooks("afterSheetAdded",e)}onEngineSheetRenamed(e,t){this.hot.runHooks("afterSheetRenamed",e,t)}onEngineSheetRemoved(e,t){this.hot.runHooks("afterSheetRemoved",e,t)}}t.Formulas=_},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.getRegisteredHotInstances=function(e){var t;const o=c(),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,r.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,r.isUndefined)(s.hyperformula)){const t=c(),o=u().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:d.DEFAULT_LICENSE_KEY}),s.getConfig().leapYear1900===d.DEFAULT_SETTINGS.leapYear1900&&!1!==(0,a.isObjectEqual)(s.getConfig().nullDate,d.DEFAULT_SETTINGS.nullDate)||(0,l.warn)(i.toSingleLine`If you use HyperFormula with Handsontable, keep the default \`leapYear1900\` and \`nullDate\`
|
38
|
-
settings. Otherwise, HyperFormula's dates may not sync correctly with Handsontable's dates.`),s}return null},t.setupSheet=function(e,t){!(0,r.isUndefined)(t)&&e.doesSheetExist(t)||(t=e.addSheet(t));return t},t.unregisterEngine=function(e,t){if(e){const o=c(),s=o.get(e),n=u(),r=n.get(e);s&&s.includes(t)&&(s.splice(s.indexOf(t),1),0===s.length&&o.delete(e)),r&&r.includes(t.guid)&&(r.splice(r.indexOf(t.guid),1),0===r.length&&(n.delete(e),e.destroy()))}},o(8);var n=s(o(125)),r=o(110),i=o(112),l=o(124),a=o(116),h=o(498),d=o(500);function c(){const e="engine_relationship",t=(0,n.default)(h.PLUGIN_KEY);return t.hasItem(e)||t.register(e,new Map),t.getItem(e)}function u(){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,d.getEngineSettingsWithDefaultsAndOverrides)(t),r=c(),i=u();f(e,s.functions),p(e,s.language);const l=e.buildEmpty(n);return r.set(l,[o]),i.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:r}=t;try{e.addNamedExpression(o,s,n,r)}catch(e){(0,l.warn)(e.message)}})),e.resumeEvaluation())}},(e,t,o)=>{"use strict";t.__esModule=!0,t.getEngineSettingsOverrides=i,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=i(e);return{...r,...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:{}),r=i(e);return{...n,...r}},t.haveEngineSettingsChanged=function(e,t){return Object.keys(t).some((o=>void 0!==t[o]&&t[o]!==e[o]))};var s=o(498);const n="internal-use-in-handsontable";t.DEFAULT_LICENSE_KEY=n;const r={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 i(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)),{})}t.DEFAULT_SETTINGS=r},(e,t,o)=>{"use strict";var s=o(1);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(r)},t.getDateInHotFormat=function(e,t){return(0,n.default)(e,r,!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=i,t.isFormula=function(e){return"string"==typeof e&&e.startsWith("=")},t.unescapeFormulaExpression=function(e){return i(e)?e.substr(1):e};var n=s(o(111));const r="DD/MM/YYYY";function i(e){return"string"==typeof e&&"'"===e.charAt(0)&&"="===e.charAt(1)}},(e,t,o)=>{"use strict";o(78);var s=o(1);t.__esModule=!0;var n=s(o(140)),r=s(o(143)),i=s(o(503));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)}var a=new WeakMap,h=new WeakMap,d=new WeakMap,c=new WeakMap,u=new WeakMap,g=new WeakMap,f=new WeakMap;var p=class{constructor(e,t,o){l(this,a,{writable:!0,value:void 0}),l(this,h,{writable:!0,value:void 0}),l(this,d,{writable:!0,value:void 0}),l(this,c,{writable:!0,value:!1}),l(this,u,{writable:!0,value:!1}),l(this,g,{writable:!0,value:null}),l(this,f,{writable:!0,value:null}),(0,r.default)(this,a,new i.default("row",e,this)),(0,r.default)(this,h,new i.default("column",t,this)),(0,r.default)(this,d,o)}getForAxis(e){return"row"===e?(0,n.default)(this,a):(0,n.default)(this,h)}setPerformUndo(e){(0,r.default)(this,c,e)}setPerformRedo(e){(0,r.default)(this,u,e)}isPerformingUndoRedo(){return(0,n.default)(this,c)||(0,n.default)(this,u)}getSheetId(){return(0,n.default)(this,f)}getEngine(){return(0,n.default)(this,g)}getPostponeAction(){return(0,n.default)(this,d)}setupSyncEndpoint(e,t){(0,r.default)(this,g,e),(0,r.default)(this,f,t),(0,n.default)(this,a).init(),(0,n.default)(this,h).init()}};t.default=p},(e,t,o)=>{"use strict";o(78);var s=o(1);t.__esModule=!0,o(8);var n=s(o(140)),r=s(o(143)),i=o(108);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)}var a=new WeakMap,h=new WeakMap,d=new WeakMap,c=new WeakMap,u=new WeakMap,g=new WeakMap,f=new WeakMap;var p=class{constructor(e,t,o){l(this,a,{writable:!0,value:void 0}),l(this,h,{writable:!0,value:void 0}),l(this,d,{writable:!0,value:void 0}),l(this,c,{writable:!0,value:[]}),l(this,u,{writable:!0,value:[]}),l(this,g,{writable:!0,value:void 0}),l(this,f,{writable:!0,value:[]}),(0,r.default)(this,a,e),(0,r.default)(this,h,t),(0,r.default)(this,d,o)}setRemovedHfIndexes(e){return(0,r.default)(this,f,e.map((e=>{const t=(0,n.default)(this,h).getVisualFromPhysicalIndex(e);return this.getHfIndexFromVisualIndex(t)}))),(0,n.default)(this,f)}getRemovedHfIndexes(){return(0,n.default)(this,f)}getHfIndexFromVisualIndex(e){const t=(0,n.default)(this,h).getIndexesSequence(),o=(0,n.default)(this,h).getNotTrimmedIndexes();return t.indexOf(o[e])}syncMoves(e){const t=`move${(0,i.toUpperCaseFirst)((0,n.default)(this,a))}s`;(0,n.default)(this,d).getEngine().batch((()=>{e.forEach((e=>{const o=e.from!==e.to,s=e.from+1!==e.to;o&&s&&(0,n.default)(this,d).getEngine()[t]((0,n.default)(this,d).getSheetId(),e.from,1,e.to)}))}))}storeMovesInformation(e,t,o){!1!==o&&((0,r.default)(this,u,e.map((e=>this.getHfIndexFromVisualIndex(e)))),(0,r.default)(this,g,this.getHfIndexFromVisualIndex(t)))}getMoveLine(e,t){const o=(0,n.default)(this,h).getNumberOfIndexes(),s=Array.from(Array(o).keys()).filter((t=>!1===e.includes(t)));var r;return 0===t?null!==(r=s[t])&&void 0!==r?r:0:s[t-1]+1}getInitiallyCalculatedMoves(e,t){let o=this.getMoveLine(e,t);const s=[];return e.forEach((e=>{const t={from:e,to:o};s.forEach((e=>{const o=e.from>e.to,s=e.to<=t.from;e.from>t.from&&s&&o&&(t.from+=1)})),t.from>=o&&(o+=1),s.push(t)})),s}adjustedCalculatedMoves(e){return e.forEach(((t,o)=>{e.slice(o+1).forEach((e=>{const o=e.from<e.to;e.from>t.from&&o&&(e.from-=1)}))})),e}calculateAndSyncMoves(e,t){if((0,n.default)(this,d).isPerformingUndoRedo())return;if(!1===e||!1===t)return;const o=this.adjustedCalculatedMoves(this.getInitiallyCalculatedMoves((0,n.default)(this,u),(0,n.default)(this,g)));null===(0,n.default)(this,d).getSheetId()?(0,n.default)(this,d).getPostponeAction((()=>this.syncMoves(o))):this.syncMoves(o)}getIndexesChangeSyncMethod(){const e=`set${(0,i.toUpperCaseFirst)((0,n.default)(this,a))}Order`;return t=>{if((0,n.default)(this,d).isPerformingUndoRedo())return;const o=(0,n.default)(this,h).getIndexesSequence();if("update"===t){const t=(0,n.default)(this,c).map((e=>o.indexOf(e))),s=(0,n.default)(this,d).getEngine().getSheetDimensions((0,n.default)(this,d).getSheetId());let r;r="row"===(0,n.default)(this,a)?s.height:s.width;for(let e=t.length;e<r;e+=1)t.push(e);(0,n.default)(this,d).getEngine()[e]((0,n.default)(this,d).getSheetId(),t)}(0,r.default)(this,c,o)}}init(){(0,r.default)(this,c,(0,n.default)(this,h).getIndexesSequence())}};t.default=p},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(505);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.HiddenColumns=s.HiddenColumns},(e,t,o)=>{"use strict";o(78);var s=o(1);t.__esModule=!0,o(8);var n=s(o(140)),r=s(o(143)),i=o(357),l=o(107),a=o(130),h=o(113),d=o(116),c=o(110),u=o(402),g=s(o(123)),f=s(o(506)),p=s(o(507)),m=o(212);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)}o(508),g.default.getSingleton().register("beforeHideColumns"),g.default.getSingleton().register("afterHideColumns"),g.default.getSingleton().register("beforeUnhideColumns"),g.default.getSingleton().register("afterUnhideColumns");const w="hiddenColumns";t.PLUGIN_KEY=w;t.PLUGIN_PRIORITY=310;var y=new WeakMap,v=new WeakMap;class E extends i.BasePlugin{constructor(){super(...arguments),C(this,y,{writable:!0,value:{}}),C(this,v,{writable:!0,value:null})}static get PLUGIN_KEY(){return w}static get PLUGIN_PRIORITY(){return 310}isEnabled(){return!!this.hot.getSettings()[w]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[w];(0,d.isObject)(t)&&((0,r.default)(this,y,t),(0,c.isUndefined)(t.copyPasteEnabled)&&(t.copyPasteEnabled=!0)),(0,r.default)(this,v,new m.HidingMap),(0,n.default)(this,v).addLocalHook("init",(()=>this.onMapInit())),this.hot.columnIndexMapper.registerMap(this.pluginName,(0,n.default)(this,v)),this.addHook("afterContextMenuDefaultOptions",(function(){return e.onAfterContextMenuDefaultOptions(...arguments)})),this.addHook("afterGetCellMeta",((e,t,o)=>this.onAfterGetCellMeta(e,t,o))),this.addHook("modifyColWidth",((e,t)=>this.onModifyColWidth(e,t))),this.addHook("afterGetColHeader",(function(){return e.onAfterGetColHeader(...arguments)})),this.addHook("modifyCopyableRange",(e=>this.onModifyCopyableRange(e))),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.hot.columnIndexMapper.unregisterMap(this.pluginName),(0,r.default)(this,y,{}),super.disablePlugin(),this.resetCellsMeta()}showColumns(e){const t=this.getHiddenColumns(),o=this.isValidConfig(e);let s=t;const r=(0,n.default)(this,v).getValues().slice(),i=e.length>0;if(o&&i){const t=e.map((e=>this.hot.toPhysicalColumn(e)));(0,h.arrayEach)(t,(e=>{r[e]=!1})),s=(0,h.arrayReduce)(r,((e,t,o)=>(t&&e.push(this.hot.toVisualColumn(o)),e)),[])}!1!==this.hot.runHooks("beforeUnhideColumns",t,s,o&&i)&&(o&&i&&(0,n.default)(this,v).setValues(r),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,h.arrayEach)(e,(e=>{(0,n.default)(this,v).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,h.arrayMap)((0,n.default)(this,v).getHiddenIndexes(),(e=>this.hot.toVisualColumn(e)))}isHidden(e){return(0,n.default)(this,v).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,h.arrayEach)(this.hot.getCellsMeta(),(e=>{e&&(e.skipColumnOnPaste=!1)}))}onModifyColWidth(e,t){return this.isHidden(t)?0:(0,n.default)(this,y).indicators&&(this.isHidden(t+1)||this.isHidden(t-1))&&"number"==typeof e&&this.hot.hasColHeaders()?e+15:void 0}onAfterGetCellMeta(e,t,o){if(!1===(0,n.default)(this,y).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(" ")}}}onModifyCopyableRange(e){if((0,n.default)(this,y).copyPasteEnabled)return e;const t=[],o=(e,o,s,n)=>{t.push({startRow:e,endRow:o,startCol:s,endCol:n})};return(0,h.arrayEach)(e,(e=>{let t=!0,s=0;(0,a.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}onAfterGetColHeader(e,t){if(!(0,n.default)(this,y).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,l.addClass)(t,o)}onAfterContextMenuDefaultOptions(e){e.items.push({name:u.SEPARATOR},(0,f.default)(this),(0,p.default)(this))}onMapInit(){Array.isArray((0,n.default)(this,y).columns)&&this.hideColumns((0,n.default)(this,y).columns)}destroy(){(0,r.default)(this,y,null),(0,r.default)(this,v,null),super.destroy()}}t.HiddenColumns=E},(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),r=[];for(let e=s;e<=n;e+=1)r.push(e);e.hideColumns(r);const i=r[r.length-1],l=this.columnIndexMapper.getNearestNotHiddenIndex(i,1,!0);Number.isInteger(l)&&l>=0?this.selectColumns(l):this.deselectCell(),this.render(),this.view.adjustElementsSize(!0)},disabled:!1,hidden(){return!(this.selection.isSelectedByColumnHeader()||this.selection.isSelectedByCorner())}}},o(8);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={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=r?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(237));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)}},(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],r=t[t.length-1];n=null!==(o=this.columnIndexMapper.getNearestNotHiddenIndex(n-1,-1))&&void 0!==o?o:0,r=null!==(s=this.columnIndexMapper.getNearestNotHiddenIndex(r+1,1))&&void 0!==s?s:this.countCols()-1,e.showColumns(t),this.render(),this.view.adjustElementsSize(!0);r-n+1===this.countCols()||this.selectColumns(n,r)},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(),r=n.getTopStartCorner().col,i=n.getBottomEndCorner().col,l=this.columnIndexMapper,a=l.getRenderableFromVisualIndex(r),h=l.getRenderableFromVisualIndex(i),d=l.getNotTrimmedIndexes(),c=[];if(r!==i){if(i-r+1>h-a+1){const e=d.slice(r,i+1);c.push(...e.filter((e=>o.includes(e))))}}else if(0===a&&a<r)c.push(...d.slice(0,r));else if(null===a)c.push(...d.slice(0,this.countCols()));else{const e=this.countCols()-1;h===l.getRenderableFromVisualIndex(l.getNearestNotHiddenIndex(e,-1))&&e>i&&c.push(...d.slice(i+1))}return(0,s.arrayEach)(c,(e=>{t.push(this.toVisualColumn(e))})),0===t.length}}},o(8);var s=o(113),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={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.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]}s.default=e,o&&o.set(e,s);return s}(o(237));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)}},(e,t,o)=>{"use strict";o.r(t)},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(510);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.HiddenRows=s.HiddenRows},(e,t,o)=>{"use strict";o(78);var s=o(1);t.__esModule=!0,o(8);var n=s(o(140)),r=s(o(143)),i=o(357),l=o(107),a=o(130),h=o(113),d=o(116),c=o(110),u=o(402),g=s(o(123)),f=s(o(511)),p=s(o(512)),m=o(212);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)}o(513),g.default.getSingleton().register("beforeHideRows"),g.default.getSingleton().register("afterHideRows"),g.default.getSingleton().register("beforeUnhideRows"),g.default.getSingleton().register("afterUnhideRows");const w="hiddenRows";t.PLUGIN_KEY=w;t.PLUGIN_PRIORITY=320;var y=new WeakMap,v=new WeakMap;class E extends i.BasePlugin{constructor(){super(...arguments),C(this,y,{writable:!0,value:{}}),C(this,v,{writable:!0,value:null})}static get PLUGIN_KEY(){return w}static get PLUGIN_PRIORITY(){return 320}isEnabled(){return!!this.hot.getSettings()[w]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[w];(0,d.isObject)(t)&&((0,r.default)(this,y,t),(0,c.isUndefined)(t.copyPasteEnabled)&&(t.copyPasteEnabled=!0)),(0,r.default)(this,v,new m.HidingMap),(0,n.default)(this,v).addLocalHook("init",(()=>this.onMapInit())),this.hot.rowIndexMapper.registerMap(this.pluginName,(0,n.default)(this,v)),this.addHook("afterContextMenuDefaultOptions",(function(){return e.onAfterContextMenuDefaultOptions(...arguments)})),this.addHook("afterGetCellMeta",((e,t,o)=>this.onAfterGetCellMeta(e,t,o))),this.addHook("modifyRowHeight",((e,t)=>this.onModifyRowHeight(e,t))),this.addHook("afterGetRowHeader",(function(){return e.onAfterGetRowHeader(...arguments)})),this.addHook("modifyCopyableRange",(e=>this.onModifyCopyableRange(e))),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap(this.pluginName),(0,r.default)(this,y,{}),super.disablePlugin(),this.resetCellsMeta()}showRows(e){const t=this.getHiddenRows(),o=this.isValidConfig(e);let s=t;const r=(0,n.default)(this,v).getValues().slice(),i=e.length>0;if(o&&i){const t=e.map((e=>this.hot.toPhysicalRow(e)));(0,h.arrayEach)(t,(e=>{r[e]=!1})),s=(0,h.arrayReduce)(r,((e,t,o)=>(t&&e.push(this.hot.toVisualRow(o)),e)),[])}!1!==this.hot.runHooks("beforeUnhideRows",t,s,o&&i)&&(o&&i&&(0,n.default)(this,v).setValues(r),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,h.arrayEach)(e,(e=>{(0,n.default)(this,v).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,h.arrayMap)((0,n.default)(this,v).getHiddenIndexes(),(e=>this.hot.toVisualRow(e)))}isHidden(e){return(0,n.default)(this,v).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,h.arrayEach)(this.hot.getCellsMeta(),(e=>{e&&(e.skipRowOnPaste=!1)}))}onModifyRowHeight(e,t){return this.isHidden(t)?0:e}onAfterGetCellMeta(e,t,o){if(!1===(0,n.default)(this,y).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(" ")}}}onModifyCopyableRange(e){if((0,n.default)(this,y).copyPasteEnabled)return e;const t=[],o=(e,o,s,n)=>{t.push({startRow:e,endRow:o,startCol:s,endCol:n})};return(0,h.arrayEach)(e,(e=>{let t=!0,s=0;(0,a.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}onAfterGetRowHeader(e,t){if(!(0,n.default)(this,y).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,l.addClass)(t,o)}onAfterContextMenuDefaultOptions(e){e.items.push({name:u.SEPARATOR},(0,f.default)(this),(0,p.default)(this))}onMapInit(){Array.isArray((0,n.default)(this,y).rows)&&this.hideRows((0,n.default)(this,y).rows)}destroy(){(0,r.default)(this,y,null),(0,r.default)(this,v,null),super.destroy()}}t.HiddenRows=E},(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),r=[];for(let e=s;e<=n;e+=1)r.push(e);e.hideRows(r);const i=r[r.length-1],l=this.rowIndexMapper.getNearestNotHiddenIndex(i,1,!0);Number.isInteger(l)&&l>=0?this.selectRows(l):this.deselectCell(),this.render(),this.view.adjustElementsSize(!0)},disabled:!1,hidden(){return!(this.selection.isSelectedByRowHeader()||this.selection.isSelectedByCorner())}}},o(8);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={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=r?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(237));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)}},(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],r=t[t.length-1];n=null!==(o=this.rowIndexMapper.getNearestNotHiddenIndex(n-1,-1))&&void 0!==o?o:0,r=null!==(s=this.rowIndexMapper.getNearestNotHiddenIndex(r+1,1))&&void 0!==s?s:this.countRows()-1,e.showRows(t),this.render(),this.view.adjustElementsSize(!0);r-n+1===this.countRows()||this.selectRows(n,r)},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(),r=n.getTopStartCorner().row,i=n.getBottomEndCorner().row,l=this.rowIndexMapper,a=l.getRenderableFromVisualIndex(r),h=l.getRenderableFromVisualIndex(i),d=l.getNotTrimmedIndexes(),c=[];if(r!==i){if(i-r+1>h-a+1){const e=d.slice(r,i+1);c.push(...e.filter((e=>o.includes(e))))}}else if(0===a&&a<r)c.push(...d.slice(0,r));else if(null===a)c.push(...d.slice(0,this.countRows()));else{const e=this.countRows()-1;h===l.getRenderableFromVisualIndex(l.getNearestNotHiddenIndex(e,-1))&&e>i&&c.push(...d.slice(i+1))}return(0,s.arrayEach)(c,(e=>{t.push(this.toVisualRow(e))})),0===t.length}}},o(8);var s=o(113),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={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.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]}s.default=e,o&&o.set(e,s);return s}(o(237));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)}},(e,t,o)=>{"use strict";o.r(t)},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(515);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualColumnFreeze=s.ManualColumnFreeze},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(8);var n=o(357),r=s(o(123)),i=s(o(516)),l=s(o(517));o(518),r.default.getSingleton().register("beforeColumnFreeze"),r.default.getSingleton().register("afterColumnFreeze"),r.default.getSingleton().register("beforeColumnUnfreeze"),r.default.getSingleton().register("afterColumnUnfreeze");const a="manualColumnFreeze";t.PLUGIN_KEY=a;t.PLUGIN_PRIORITY=110;const h=new WeakMap;class d extends n.BasePlugin{static get PLUGIN_KEY(){return a}static get PLUGIN_PRIORITY(){return 110}constructor(e){super(e),h.set(this,{afterFirstUse:!1})}isEnabled(){return!!this.hot.getSettings()[a]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",(e=>this.addContextMenuEntry(e))),this.addHook("beforeColumnMove",((e,t)=>this.onBeforeColumnMove(e,t))),super.enablePlugin())}disablePlugin(){h.get(this).afterFirstUse=!1,super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}freezeColumn(e){const t=h.get(this),o=this.hot.getSettings(),s=o.fixedColumnsStart<this.hot.countCols()&&e>o.fixedColumnsStart-1;t.afterFirstUse||(t.afterFirstUse=!0);!1!==this.hot.runHooks("beforeColumnFreeze",e,s)&&(s&&(this.hot.columnIndexMapper.moveIndexes(e,o.fixedColumnsStart),o._fixedColumnsStart+=1),this.hot.runHooks("afterColumnFreeze",e,s))}unfreezeColumn(e){const t=h.get(this),o=this.hot.getSettings(),s=o.fixedColumnsStart>0&&e<=o.fixedColumnsStart-1;t.afterFirstUse||(t.afterFirstUse=!0);!1!==this.hot.runHooks("beforeColumnUnfreeze",e,s)&&(s&&(o._fixedColumnsStart-=1,this.hot.columnIndexMapper.moveIndexes(e,o.fixedColumnsStart)),this.hot.runHooks("afterColumnUnfreeze",e,s))}addContextMenuEntry(e){e.items.push({name:"---------"},(0,i.default)(this),(0,l.default)(this))}onBeforeColumnMove(e,t){if(h.get(this).afterFirstUse){const o=this.hot.getSettings().fixedColumnsStart;if(t<o)return!1;if(e.some((e=>e<o)))return!1}}}t.ManualColumnFreeze=d},(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(!0)},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={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=r?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(237));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)}},(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(!0)},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={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=r?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(237));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)}},(e,t,o)=>{"use strict";o.r(t)},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(520);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualColumnMove=s.ManualColumnMove},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(8);var n=o(357),r=s(o(123)),i=o(113),l=o(107),a=o(130),h=s(o(126)),d=s(o(521)),c=s(o(523));o(524),r.default.getSingleton().register("beforeColumnMove"),r.default.getSingleton().register("afterColumnMove");const u="manualColumnMove";t.PLUGIN_KEY=u;t.PLUGIN_PRIORITY=120;const g=new WeakMap,f="ht__manualColumnMove",p="show-ui",m="on-moving--columns",C="after-selection--columns";class w extends n.BasePlugin{static get PLUGIN_KEY(){return u}static get PLUGIN_PRIORITY(){return 120}constructor(e){super(e),g.set(this,{columnsToMove:[],countCols:0,fixedColumns:0,pressed:void 0,target:{eventPageX:void 0,coords:void 0,TD:void 0,col:void 0},cachedDropIndex:void 0}),this.eventManager=new h.default(this),this.backlight=new d.default(e),this.guideline=new c.default(e)}isEnabled(){return!!this.hot.getSettings()[u]}enablePlugin(){var e=this;this.enabled||(this.addHook("beforeOnCellMouseDown",(function(){return e.onBeforeOnCellMouseDown(...arguments)})),this.addHook("beforeOnCellMouseOver",(function(){return e.onBeforeOnCellMouseOver(...arguments)})),this.addHook("afterScrollVertically",(()=>this.onAfterScrollVertically())),this.addHook("afterLoadData",(function(){return e.onAfterLoadData(...arguments)})),this.buildPluginUI(),this.registerEvents(),(0,l.addClass)(this.hot.rootElement,f),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){(0,l.removeClass)(this.hot.rootElement,f),this.unregisterEvents(),this.backlight.destroy(),this.guideline.destroy(),super.disablePlugin()}moveColumn(e,t){return this.moveColumns([e],t)}moveColumns(e,t){const o=g.get(this),s=o.cachedDropIndex,n=this.isMovePossible(e,t),r=this.hot.runHooks("beforeColumnMove",e,t,s,n);if(o.cachedDropIndex=void 0,!1===r)return;n&&this.hot.columnIndexMapper.moveIndexes(e,t);const i=n&&this.isColumnOrderChanged(e,t);return this.hot.runHooks("afterColumnMove",e,t,s,n,i),i}dragColumn(e,t){return this.dragColumns([e],t)}dragColumns(e,t){const o=this.countFinalIndex(e,t);return g.get(this).cachedDropIndex=t,this.moveColumns(e,o)}isMovePossible(e,t){const o=this.hot.columnIndexMapper.getNotTrimmedIndexesLength(),s=e.length+t>o,n=t<0,r=e.some((e=>e<0)),i=e.some((e=>e>=o));return!(s||n||r||i)}isColumnOrderChanged(e,t){return e.some(((e,o)=>e-o!==t))}countFinalIndex(e,t){const o=(0,i.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()[u];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,a.rangeEach)(e,t,(e=>{o.push(e)})),o}refreshPositions(){const e=g.get(this),t=this.hot.view.getFirstFullyVisibleColumn();this.isFixedColumnsStart(e.hoveredColumn)&&t>0&&this.hot.scrollViewportTo(void 0,this.hot.columnIndexMapper.getNearestNotHiddenIndex(t-1,-1));const o=this.hot.view._wt.wtTable,s=this.hot.view._wt.wtOverlays.scrollableElement,n="number"==typeof s.scrollX?s.scrollX:s.scrollLeft;let r=this.hot.view.THEAD.offsetLeft+this.getColumnsWidth(0,e.hoveredColumn-1);const i=o.hider.offsetWidth,a=o.TBODY.offsetLeft,h=this.backlight.getOffset().start,d=this.backlight.getSize().width;let c=0,u=0;if(this.hot.isRtl()){const t=this.hot.rootWindow,o=(0,l.outerWidth)(this.hot.rootElement),r=t.innerWidth-e.rootElementOffset-o;u=t.innerWidth-e.target.eventPageX-r-(void 0===s.scrollX?n:0)}else u=e.target.eventPageX-(e.rootElementOffset-(void 0===s.scrollX?n:0));if(e.hasRowHeaders&&(c=this.hot.view._wt.wtOverlays.inlineStartOverlay.clone.wtTable.getColumnHeader(-1).offsetWidth),this.isFixedColumnsStart(e.hoveredColumn)&&(r+=n),r+=c,e.hoveredColumn<0)e.fixedColumnsStart>0?e.target.col=0:e.target.col=t>0?t-1:t;else if(e.target.TD.offsetWidth/2+r<=u){const t=e.hoveredColumn>=e.countCols?e.countCols-1:e.hoveredColumn;e.target.col=t+1,r+=e.target.TD.offsetWidth}else e.target.col=e.hoveredColumn;let f=u,p=r;u+d+h>=i?f=i-d-h:u+h<a+c&&(f=a+c+Math.abs(h)),r>=i-1?p=i-1:0===p?p=1:void 0!==s.scrollX&&e.hoveredColumn<e.fixedColumnsStart&&(p-=e.rootElementOffset<=s.scrollX?e.rootElementOffset:0),this.backlight.setPosition(null,f),this.guideline.setPosition(null,p)}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mousemove",(e=>this.onMouseMove(e))),this.eventManager.addEventListener(e,"mouseup",(()=>this.onMouseUp()))}unregisterEvents(){this.eventManager.clear()}onBeforeOnCellMouseDown(e,t,o,s){const n=this.hot.view._wt.wtTable,r=this.hot.selection.isSelectedByColumnHeader(),i=this.hot.getSelectedRangeLast(),a=g.get(this),h=(0,l.hasClass)(e.target,"sortAction");if(!i||!r||a.pressed||0!==e.button||h)return a.pressed=!1,a.columnsToMove.length=0,void(0,l.removeClass)(this.hot.rootElement,[m,p]);const d=this.guideline.isBuilt()&&!this.guideline.isAppended(),c=this.backlight.isBuilt()&&!this.backlight.isAppended();d&&c&&(this.guideline.appendTo(n.hider),this.backlight.appendTo(n.hider));const{from:u,to:f}=i,w=Math.min(u.col,f.col),y=Math.max(u.col,f.col);if(t.row<0&&t.col>=w&&t.col<=y){s.column=!0,a.pressed=!0,a.target.eventPageX=e.pageX,a.target.eventOffsetX=e.offsetX,a.hoveredColumn=t.col,a.target.TD=o,a.target.col=t.col,a.columnsToMove=this.prepareColumnsToMoving(w,y),a.hasRowHeaders=!!this.hot.getSettings().rowHeaders,a.countCols=this.hot.countCols(),a.fixedColumnsStart=this.hot.getSettings().fixedColumnsStart,a.rootElementOffset=(0,l.offset)(this.hot.rootElement).left;const r=a.hasRowHeaders?-1:0,i=n.holder.scrollTop+n.getColumnHeaderHeight(0)+1,h=t.col<a.fixedColumnsStart,d=Math.abs(this.hot.view._wt.wtOverlays.inlineStartOverlay.getScrollPosition()),c=Math.abs(e.offsetX-(this.hot.isRtl()?e.target.offsetWidth:0)),u=this.getColumnsWidth(w,t.col-1)+c,g=this.getColumnsWidth(r,w-1)+(h?d:0)+u;this.backlight.setPosition(i,g),this.backlight.setSize(this.getColumnsWidth(w,y),n.hider.offsetHeight-i),this.backlight.setOffset(null,-u),(0,l.addClass)(this.hot.rootElement,m)}else(0,l.removeClass)(this.hot.rootElement,C),a.pressed=!1,a.columnsToMove.length=0}onMouseMove(e){const t=g.get(this);if(t.pressed){if(e.target===this.backlight.element){const e=this.backlight.getSize().width;this.backlight.setSize(0),setTimeout((function(){this.backlight.setPosition(e)}))}t.target.eventPageX=e.pageX,this.refreshPositions()}}onBeforeOnCellMouseOver(e,t,o,s){const n=this.hot.getSelectedRangeLast(),r=g.get(this);n&&r.pressed&&(r.columnsToMove.indexOf(t.col)>-1?(0,l.removeClass)(this.hot.rootElement,p):(0,l.addClass)(this.hot.rootElement,p),s.row=!0,s.column=!0,s.cell=!0,r.hoveredColumn=t.col,r.target.TD=o)}onMouseUp(){const e=g.get(this),t=e.target.col,o=e.columnsToMove.length;if(e.hoveredColumn=void 0,e.pressed=!1,e.backlightWidth=0,(0,l.removeClass)(this.hot.rootElement,[m,p,C]),this.hot.selection.isSelectedByColumnHeader()&&(0,l.addClass)(this.hot.rootElement,C),o<1||void 0===t)return;const s=e.columnsToMove[0],n=this.hot.toPhysicalColumn(s),r=this.dragColumns(e.columnsToMove,t);if(e.columnsToMove.length=0,!0===r){this.persistentStateSave(),this.hot.render(),this.hot.view.adjustElementsSize(!0);const e=this.hot.toVisualColumn(n),t=e+o-1;this.hot.selectColumns(e,t)}}onAfterScrollVertically(){const e=this.hot.view._wt.wtTable,t=e.getColumnHeaderHeight(0)+1+e.holder.scrollTop;this.backlight.setPosition(t),this.backlight.setSize(null,e.hider.offsetHeight-t)}buildPluginUI(){this.backlight.build(),this.guideline.build()}onAfterLoadData(){this.moveBySettingsOrLoad()}destroy(){this.backlight.destroy(),this.guideline.destroy(),super.destroy()}}t.ManualColumnMove=w},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(522)),r=o(107);class i extends n.default{build(){super.build(),(0,r.addClass)(this._element,"ht__manualColumnMove--backlight")}}var l=i;t.default=l},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(130),n=o(108);const r="px";var i=class{constructor(e){this.hot=e,this._element=null,this.state=0,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,s.isNumeric)(e)&&(this._element.style.top=e+r),(0,s.isNumeric)(t)&&(this._element.style[this.inlineProperty]=t+r)}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,s.isNumeric)(e)&&(this._element.style.width=e+r),(0,s.isNumeric)(t)&&(this._element.style.height=t+r)}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,s.isNumeric)(e)&&(this._element.style.marginTop=e+r),(0,s.isNumeric)(t)&&(this._element.style[`margin${(0,n.toUpperCaseFirst)(this.inlineProperty)}`]=t+r)}getOffset(){const e=this._element.style,t=`margin${(0,n.toUpperCaseFirst)(this.inlineProperty)}`;return{top:e.marginTop?parseInt(e.marginTop,10):0,start:e[t]?parseInt(e[t],10):0}}};t.default=i},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(522)),r=o(107);class i extends n.default{build(){super.build(),(0,r.addClass)(this._element,"ht__manualColumnMove--guideline")}}var l=i;t.default=l},(e,t,o)=>{"use strict";o.r(t)},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(526);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualColumnResize=s.ManualColumnResize},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(8);var n=o(357),r=o(107),i=s(o(126)),l=o(113),a=o(130),h=o(212);const d="manualColumnResize";t.PLUGIN_KEY=d;t.PLUGIN_PRIORITY=130;const c="manualColumnWidths",u=new WeakMap;class g extends n.BasePlugin{static get PLUGIN_KEY(){return d}static get PLUGIN_PRIORITY(){return 130}constructor(e){super(e);const{rootDocument:t}=this.hot;this.currentTH=null,this.currentCol=null,this.selectedCols=[],this.currentWidth=null,this.newSize=null,this.startY=null,this.startWidth=null,this.startOffset=null,this.handle=t.createElement("DIV"),this.guide=t.createElement("DIV"),this.eventManager=new i.default(this),this.pressed=null,this.isTriggeredByRMB=!1,this.dblclick=0,this.autoresizeTimeout=null,this.columnWidthsMap=void 0,u.set(this,{config:void 0}),(0,r.addClass)(this.handle,"manualColumnResizer"),(0,r.addClass)(this.guide,"manualColumnResizerGuide")}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[d]}enablePlugin(){this.enabled||(this.columnWidthsMap=new h.PhysicalIndexToValueMap,this.columnWidthsMap.addLocalHook("init",(()=>this.onMapInit())),this.hot.columnIndexMapper.registerMap(this.pluginName,this.columnWidthsMap),this.addHook("modifyColWidth",((e,t)=>this.onModifyColWidth(e,t))),this.addHook("beforeStretchingColumnWidth",((e,t)=>this.onBeforeStretchingColumnWidth(e,t))),this.addHook("beforeColumnResize",((e,t,o)=>this.onBeforeColumnResize(e,t,o))),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){u.get(this).config=this.columnWidthsMap.getValues(),this.hot.columnIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}saveManualColumnWidths(){this.hot.runHooks("persistentStateSave",c,this.columnWidthsMap.getValues())}loadManualColumnWidths(){const e={};return this.hot.runHooks("persistentStateLoad",c,e),e.value}setManualSize(e,t){const o=Math.max(t,20),s=this.hot.toPhysicalColumn(e);return this.columnWidthsMap.setValueAtIndex(s,o),o}clearManualSize(e){const t=this.hot.toPhysicalColumn(e);this.columnWidthsMap.setValueAtIndex(t,null)}onMapInit(){const e=u.get(this),t=this.hot.getSettings()[d],o=this.loadManualColumnWidths();void 0!==o?this.hot.batchExecution((()=>{o.forEach(((e,t)=>{this.columnWidthsMap.setValueAtIndex(t,e)}))}),!0):Array.isArray(t)?(this.hot.batchExecution((()=>{t.forEach(((e,t)=>{this.columnWidthsMap.setValueAtIndex(t,e)}))}),!0),e.config=t):!0===t&&Array.isArray(e.config)&&this.hot.batchExecution((()=>{e.config.forEach(((e,t)=>{this.columnWidthsMap.setValueAtIndex(t,e)}))}),!0)}setupHandlePosition(e){if(!e.parentNode)return;this.currentTH=e;const{_wt:t}=this.hot.view,o=t.wtTable.getCoords(this.currentTH),s=o.col;if(s<0)return;const n=(0,r.outerHeight)(this.currentTH),i=this.currentTH.getBoundingClientRect();let h;s<t.getSetting("fixedColumnsStart")&&(h=t.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(this.currentTH,o.row,o.col)),h||(h=t.wtOverlays.topOverlay.getRelativeCellPosition(this.currentTH,o.row,o.col)),this.currentCol=this.hot.columnIndexMapper.getVisualFromRenderableIndex(s),this.selectedCols=[];const d=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByColumnHeader();if(this.hot.selection.isSelected()&&d){const e=this.hot.getSelectedRange();(0,l.arrayEach)(e,(e=>{const t=e.getTopStartCorner().col,o=e.getBottomEndCorner().col;(0,a.rangeEach)(t,o,(e=>{this.selectedCols.includes(e)||this.selectedCols.push(e)}))}))}this.selectedCols.includes(this.currentCol)||(this.selectedCols=[this.currentCol]),this.startOffset=h.start-6,this.startWidth=parseInt(i.width,10),this.handle.style.top=`${h.top}px`,this.handle.style[this.inlineDir]=`${this.startOffset+this.startWidth}px`,this.handle.style.height=`${n}px`,this.hot.rootElement.appendChild(this.handle)}refreshHandlePosition(){this.handle.style[this.inlineDir]=`${this.startOffset+this.currentWidth}px`}setupGuidePosition(){const e=parseInt((0,r.outerHeight)(this.handle),10),t=parseInt(this.handle.style.top,10)+e,o=parseInt(this.hot.view.maximumVisibleElementHeight(0),10);(0,r.addClass)(this.handle,"active"),(0,r.addClass)(this.guide,"active"),this.guide.style.top=`${t}px`,this.refreshGuidePosition(),this.guide.style.height=o-e+"px",this.hot.rootElement.appendChild(this.guide)}refreshGuidePosition(){this.guide.style[this.inlineDir]=this.handle.style[this.inlineDir]}hideHandleAndGuide(){(0,r.removeClass)(this.handle,"active"),(0,r.removeClass)(this.guide,"active")}checkIfColumnHeader(e){return!!(0,r.closest)(e,["THEAD"],this.hot.rootElement)}getClosestTHParent(e){return"TABLE"!==e.tagName?"TH"===e.tagName?e:this.getClosestTHParent(e.parentNode):null}onMouseOver(e){if(!(0,r.isDetached)(e.target)&&!0!==this.isTriggeredByRMB&&this.checkIfColumnHeader(e.target)){const t=this.getClosestTHParent(e.target);if(!t)return;const o=t.getAttribute("colspan");!t||null!==o&&"1"!==o||this.pressed||this.setupHandlePosition(t)}}afterMouseDownTimeout(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize(!0)},t=(t,o)=>{const s=this.hot.runHooks("beforeColumnResize",this.newSize,t,!0);void 0!==s&&(this.newSize=s),"all"===this.hot.getSettings().stretchH?this.clearManualSize(t):this.setManualSize(t,this.newSize),this.saveManualColumnWidths(),this.hot.runHooks("afterColumnResize",this.newSize,t,!0),o&&e()};if(this.dblclick>=2){this.selectedCols.length>1?((0,l.arrayEach)(this.selectedCols,(e=>{t(e)})),e()):(0,l.arrayEach)(this.selectedCols,(e=>{t(e,!0)}))}this.dblclick=0,this.autoresizeTimeout=null}onMouseDown(e){(0,r.hasClass)(e.target,"manualColumnResizer")&&(this.setupHandlePosition(this.currentTH),this.setupGuidePosition(),this.pressed=!0,null===this.autoresizeTimeout&&(this.autoresizeTimeout=setTimeout((()=>this.afterMouseDownTimeout()),500),this.hot._registerTimeout(this.autoresizeTimeout)),this.dblclick+=1,this.startX=e.pageX,this.newSize=this.startWidth)}onMouseMove(e){if(this.pressed){const t=(e.pageX-this.startX)*this.hot.getDirectionFactor();this.currentWidth=this.startWidth+t,(0,l.arrayEach)(this.selectedCols,(e=>{this.newSize=this.setManualSize(e,this.currentWidth)})),this.refreshHandlePosition(),this.refreshGuidePosition()}}onMouseUp(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize(!0)},t=(t,o)=>{this.hot.runHooks("beforeColumnResize",this.newSize,t,!1),o&&e(),this.saveManualColumnWidths(),this.hot.runHooks("afterColumnResize",this.newSize,t,!1)};if(this.pressed){if(this.hideHandleAndGuide(),this.pressed=!1,this.newSize!==this.startWidth){this.selectedCols.length>1?((0,l.arrayEach)(this.selectedCols,(e=>{t(e)})),e()):(0,l.arrayEach)(this.selectedCols,(e=>{t(e,!0)}))}this.setupHandlePosition(this.currentTH)}}onContextMenu(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild(this.handle),this.hot.rootElement.removeChild(this.guide),this.pressed=!1,this.isTriggeredByRMB=!0,this.hot._registerImmediate((()=>{this.isTriggeredByRMB=!1}))}bindEvents(){const{rootWindow:e,rootElement:t}=this.hot;this.eventManager.addEventListener(t,"mouseover",(e=>this.onMouseOver(e))),this.eventManager.addEventListener(t,"mousedown",(e=>this.onMouseDown(e))),this.eventManager.addEventListener(e,"mousemove",(e=>this.onMouseMove(e))),this.eventManager.addEventListener(e,"mouseup",(()=>this.onMouseUp())),this.eventManager.addEventListener(this.handle,"contextmenu",(()=>this.onContextMenu()))}onModifyColWidth(e,t){let o=e;if(this.enabled){const e=this.hot.toPhysicalColumn(t),s=this.columnWidthsMap.getValueAtIndex(e);this.hot.getSettings()[d]&&s&&(o=s)}return o}onBeforeStretchingColumnWidth(e,t){let o=this.columnWidthsMap.getValueAtIndex(t);return null===o&&(o=e),o}onBeforeColumnResize(){this.hot.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked()}destroy(){super.destroy()}}t.ManualColumnResize=g},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(528);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualRowMove=s.ManualRowMove},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(8);var n=o(357),r=s(o(123)),i=o(113),l=o(107),a=o(130),h=s(o(126)),d=s(o(529)),c=s(o(531));o(532),r.default.getSingleton().register("beforeRowMove"),r.default.getSingleton().register("afterRowMove");const u="manualRowMove";t.PLUGIN_KEY=u;t.PLUGIN_PRIORITY=140;const g=new WeakMap,f="ht__manualRowMove",p="show-ui",m="on-moving--rows",C="after-selection--rows";class w extends n.BasePlugin{static get PLUGIN_KEY(){return u}static get PLUGIN_PRIORITY(){return 140}constructor(e){super(e),g.set(this,{rowsToMove:[],pressed:void 0,target:{eventPageY:void 0,coords:void 0,TD:void 0,row:void 0},cachedDropIndex:void 0}),this.eventManager=new h.default(this),this.backlight=new d.default(e),this.guideline=new c.default(e)}isEnabled(){return!!this.hot.getSettings()[u]}enablePlugin(){var e=this;this.enabled||(this.addHook("beforeOnCellMouseDown",(function(){return e.onBeforeOnCellMouseDown(...arguments)})),this.addHook("beforeOnCellMouseOver",(function(){return e.onBeforeOnCellMouseOver(...arguments)})),this.addHook("afterScrollHorizontally",(()=>this.onAfterScrollHorizontally())),this.addHook("afterLoadData",(function(){return e.onAfterLoadData(...arguments)})),this.buildPluginUI(),this.registerEvents(),(0,l.addClass)(this.hot.rootElement,f),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){(0,l.removeClass)(this.hot.rootElement,f),this.unregisterEvents(),this.backlight.destroy(),this.guideline.destroy(),super.disablePlugin()}moveRow(e,t){return this.moveRows([e],t)}moveRows(e,t){const o=g.get(this),s=o.cachedDropIndex,n=this.isMovePossible(e,t),r=this.hot.runHooks("beforeRowMove",e,t,s,n);if(o.cachedDropIndex=void 0,!1===r)return;n&&this.hot.rowIndexMapper.moveIndexes(e,t);const i=n&&this.isRowOrderChanged(e,t);return this.hot.runHooks("afterRowMove",e,t,s,n,i),i}dragRow(e,t){return this.dragRows([e],t)}dragRows(e,t){const o=this.countFinalIndex(e,t);return g.get(this).cachedDropIndex=t,this.moveRows(e,o)}isMovePossible(e,t){const o=this.hot.rowIndexMapper.getNotTrimmedIndexesLength(),s=e.length+t>o,n=t<0,r=e.some((e=>e<0)),i=e.some((e=>e>=o));return!(s||n||r||i)}isRowOrderChanged(e,t){return e.some(((e,o)=>e-o!==t))}countFinalIndex(e,t){const o=(0,i.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()[u];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),r=Math.max(o.row,s.row);return(0,a.rangeEach)(n,r,(e=>{t.push(e)})),t}refreshPositions(){const e=g.get(this),t=e.target.coords,o=this.hot.view.getFirstFullyVisibleRow(),s=this.hot.view.getLastFullyVisibleRow(),n=this.hot.countRows();this.isFixedRowTop(t.row)&&o>0&&this.hot.scrollViewportTo(this.hot.rowIndexMapper.getNearestNotHiddenIndex(o-1,-1)),this.isFixedRowBottom(t.row)&&s<n&&this.hot.scrollViewportTo(this.hot.rowIndexMapper.getNearestNotHiddenIndex(s+1,1),void 0,!0);const r=this.hot.view._wt.wtTable,i=e.target.TD,a=this.hot.rootElement,h=(0,l.offset)(a),d=(0,l.getTrimmingContainer)(a),c=r.holder.scrollTop;let u;u=this.hot.rootWindow===d?d.scrollY:d.scrollTop;const f=h.top-u,p=e.target.eventPageY-f+c,m=r.hider.offsetHeight,C=r.TBODY.offsetTop,w=this.backlight.getOffset().top,y=this.backlight.getSize().height,v=i.offsetHeight/2,E=i.offsetHeight;let S=this.hot.view.THEAD.offsetHeight+this.getRowsHeight(0,t.row-1);const R=p>=S+v;this.isFixedRowTop(t.row)&&(S+=r.holder.scrollTop),t.row<0?e.target.row=o>0?o-1:o:R?(e.target.row=t.row+1,S+=0===t.row?E-1:E):e.target.row=t.row;let b=p,T=S;p+y+w>=m?b=m-y-w:p+w<C&&(b=C+Math.abs(w)),S>=m-1&&(T=m-1),this.backlight.setPosition(b),this.guideline.setPosition(T)}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mousemove",(e=>this.onMouseMove(e))),this.eventManager.addEventListener(e,"mouseup",(()=>this.onMouseUp()))}unregisterEvents(){this.eventManager.clear()}onBeforeOnCellMouseDown(e,t,o,s){const{wtTable:n,wtViewport:r}=this.hot.view._wt,i=this.hot.selection.isSelectedByRowHeader(),a=this.hot.getSelectedRangeLast(),h=g.get(this);if(!a||!i||h.pressed||0!==e.button)return h.pressed=!1,h.rowsToMove.length=0,void(0,l.removeClass)(this.hot.rootElement,[m,p]);const d=this.guideline.isBuilt()&&!this.guideline.isAppended(),c=this.backlight.isBuilt()&&!this.backlight.isAppended();d&&c&&(this.guideline.appendTo(n.hider),this.backlight.appendTo(n.hider));const{from:u,to:f}=a,w=Math.min(u.row,f.row),y=Math.max(u.row,f.row);if(t.col<0&&t.row>=w&&t.row<=y){s.row=!0,h.pressed=!0,h.target.eventPageY=e.pageY,h.target.coords=t,h.target.TD=o,h.rowsToMove=this.prepareRowsToMoving();const i=n.holder.scrollLeft+r.getRowHeaderWidth();this.backlight.setPosition(null,i),this.backlight.setSize(n.hider.offsetWidth-i,this.getRowsHeight(w,y)),this.backlight.setOffset(-1*(this.getRowsHeight(w,t.row-1)+e.offsetY),null),(0,l.addClass)(this.hot.rootElement,m),this.refreshPositions()}else(0,l.removeClass)(this.hot.rootElement,C),h.pressed=!1,h.rowsToMove.length=0}onMouseMove(e){const t=g.get(this);if(t.pressed){if(e.target===this.backlight.element){const e=this.backlight.getSize().height;this.backlight.setSize(null,0),setTimeout((function(){this.backlight.setPosition(null,e)}))}t.target.eventPageY=e.pageY,this.refreshPositions()}}onBeforeOnCellMouseOver(e,t,o,s){const n=this.hot.getSelectedRangeLast(),r=g.get(this);n&&r.pressed&&(r.rowsToMove.indexOf(t.row)>-1?(0,l.removeClass)(this.hot.rootElement,p):(0,l.addClass)(this.hot.rootElement,p),s.row=!0,s.column=!0,s.cell=!0,r.target.coords=t,r.target.TD=o)}onMouseUp(){const e=g.get(this),t=e.target.row,o=e.rowsToMove.length;if(e.pressed=!1,e.backlightHeight=0,(0,l.removeClass)(this.hot.rootElement,[m,p,C]),this.hot.selection.isSelectedByRowHeader()&&(0,l.addClass)(this.hot.rootElement,C),o<1||void 0===t)return;const s=e.rowsToMove[0],n=this.hot.toPhysicalRow(s),r=this.dragRows(e.rowsToMove,t);if(e.rowsToMove.length=0,!0===r){this.persistentStateSave(),this.hot.render(),this.hot.view.adjustElementsSize(!0);const e=this.hot.toVisualRow(n),t=e+o-1;this.hot.selectRows(e,t)}}onAfterScrollHorizontally(){const e=this.hot.view._wt.wtTable,t=this.hot.view._wt.wtViewport.getRowHeaderWidth()+e.holder.scrollLeft;this.backlight.setPosition(null,t),this.backlight.setSize(e.hider.offsetWidth-t)}buildPluginUI(){this.backlight.build(),this.guideline.build()}onAfterLoadData(){this.moveBySettingsOrLoad()}destroy(){this.backlight.destroy(),this.guideline.destroy(),super.destroy()}}t.ManualRowMove=w},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(530)),r=o(107);class i extends n.default{build(){super.build(),(0,r.addClass)(this._element,"ht__manualRowMove--backlight")}}var l=i;t.default=l},(e,t)=>{"use strict";t.__esModule=!0;const o="px";var s=class{constructor(e){this.hot=e,this._element=null,this.state=0}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+o),void 0!==t&&(this._element.style.left=t+o)}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+o),t&&(this._element.style.height=t+o)}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+o),t&&(this._element.style.marginLeft=t+o)}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}}};t.default=s},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(530)),r=o(107);class i extends n.default{build(){super.build(),(0,r.addClass)(this._element,"ht__manualRowMove--guideline")}}var l=i;t.default=l},(e,t,o)=>{"use strict";o.r(t)},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(534);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualRowResize=s.ManualRowResize},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(8);var n=o(357),r=o(107),i=s(o(126)),l=o(113),a=o(130),h=o(212),d=o(145);const c="manualRowResize";t.PLUGIN_KEY=c;t.PLUGIN_PRIORITY=30;const u="manualRowHeights",g=new WeakMap;class f extends n.BasePlugin{static get PLUGIN_KEY(){return c}static get PLUGIN_PRIORITY(){return 30}constructor(e){super(e);const{rootDocument:t}=this.hot;this.currentTH=null,this.currentRow=null,this.selectedRows=[],this.currentHeight=null,this.newSize=null,this.startY=null,this.startHeight=null,this.startOffset=null,this.handle=t.createElement("DIV"),this.guide=t.createElement("DIV"),this.eventManager=new i.default(this),this.pressed=null,this.isTriggeredByRMB=!1,this.dblclick=0,this.autoresizeTimeout=null,this.rowHeightsMap=void 0,g.set(this,{config:void 0}),(0,r.addClass)(this.handle,"manualRowResizer"),(0,r.addClass)(this.guide,"manualRowResizerGuide")}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[c]}enablePlugin(){this.enabled||(this.rowHeightsMap=new h.PhysicalIndexToValueMap,this.rowHeightsMap.addLocalHook("init",(()=>this.onMapInit())),this.hot.rowIndexMapper.registerMap(this.pluginName,this.rowHeightsMap),this.addHook("modifyRowHeight",((e,t)=>this.onModifyRowHeight(e,t))),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){g.get(this).config=this.rowHeightsMap.getValues(),this.hot.rowIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}saveManualRowHeights(){this.hot.runHooks("persistentStateSave",u,this.rowHeightsMap.getValues())}loadManualRowHeights(){const e={};return this.hot.runHooks("persistentStateLoad",u,e),e.value}setManualSize(e,t){const o=this.hot.toPhysicalRow(e),s=Math.max(t,d.ViewportRowsCalculator.DEFAULT_HEIGHT);return this.rowHeightsMap.setValueAtIndex(o,s),s}setupHandlePosition(e){this.currentTH=e;const{view:t}=this.hot,{_wt:o}=t,s=o.wtTable.getCoords(this.currentTH),n=s.row;if(n<0)return;const i=(0,r.outerWidth)(this.currentTH),h=this.currentTH.getBoundingClientRect(),d=n<o.getSetting("fixedRowsTop"),c=n>=t.countNotHiddenRowIndexes(0,1)-o.getSetting("fixedRowsBottom");let u;d?u=o.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(this.currentTH,s.row,s.col):c&&(u=o.wtOverlays.bottomInlineStartCornerOverlay.getRelativeCellPosition(this.currentTH,s.row,s.col)),u||(u=o.wtOverlays.inlineStartOverlay.getRelativeCellPosition(this.currentTH,s.row,s.col)),this.currentRow=this.hot.rowIndexMapper.getVisualFromRenderableIndex(n),this.selectedRows=[];const g=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByRowHeader();if(this.hot.selection.isSelected()&&g){const e=this.hot.getSelectedRange();(0,l.arrayEach)(e,(e=>{const t=e.getTopStartCorner().row,o=e.getBottomStartCorner().row;(0,a.rangeEach)(t,o,(e=>{this.selectedRows.includes(e)||this.selectedRows.push(e)}))}))}this.selectedRows.includes(this.currentRow)||(this.selectedRows=[this.currentRow]),this.startOffset=u.top-6,this.startHeight=parseInt(h.height,10),this.handle.style.top=`${this.startOffset+this.startHeight}px`,this.handle.style[this.inlineDir]=`${u.start}px`,this.handle.style.width=`${i}px`,this.hot.rootElement.appendChild(this.handle)}refreshHandlePosition(){this.handle.style.top=`${this.startOffset+this.currentHeight}px`}setupGuidePosition(){const e=parseInt((0,r.outerWidth)(this.handle),10),t=parseInt(this.handle.style[this.inlineDir],10)+e,o=parseInt(this.hot.view.maximumVisibleElementWidth(0),10);(0,r.addClass)(this.handle,"active"),(0,r.addClass)(this.guide,"active"),this.guide.style.top=this.handle.style.top,this.guide.style[this.inlineDir]=`${t}px`,this.guide.style.width=o-e+"px",this.hot.rootElement.appendChild(this.guide)}refreshGuidePosition(){this.guide.style.top=this.handle.style.top}hideHandleAndGuide(){(0,r.removeClass)(this.handle,"active"),(0,r.removeClass)(this.guide,"active")}checkIfRowHeader(e){var t;return(0,r.closest)(e,["TH"],this.hot.rootElement)&&"TBODY"===(null===(t=e.parentNode)||void 0===t||null===(t=t.parentNode)||void 0===t?void 0:t.tagName)}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&&this.newSize<t?t:this.newSize}onMouseOver(e){if(!(0,r.isDetached)(e.target)&&!0!==this.isTriggeredByRMB&&this.checkIfRowHeader(e.target)){const t=this.getClosestTHParent(e.target);t&&(this.pressed||this.setupHandlePosition(t))}}afterMouseDownTimeout(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize(!0)},t=(t,o)=>{const s=this.hot.runHooks("beforeRowResize",this.getActualRowHeight(t),t,!0);void 0!==s&&(this.newSize=s),this.setManualSize(t,this.newSize),this.hot.runHooks("afterRowResize",this.getActualRowHeight(t),t,!0),o&&e()};if(this.dblclick>=2){this.selectedRows.length>1?((0,l.arrayEach)(this.selectedRows,(e=>{t(e)})),e()):(0,l.arrayEach)(this.selectedRows,(e=>{t(e,!0)}))}this.dblclick=0,this.autoresizeTimeout=null}onMouseDown(e){(0,r.hasClass)(e.target,"manualRowResizer")&&(this.setupHandlePosition(this.currentTH),this.setupGuidePosition(),this.pressed=!0,null===this.autoresizeTimeout&&(this.autoresizeTimeout=setTimeout((()=>this.afterMouseDownTimeout()),500),this.hot._registerTimeout(this.autoresizeTimeout)),this.dblclick+=1,this.startY=e.pageY,this.newSize=this.startHeight)}onMouseMove(e){this.pressed&&(this.currentHeight=this.startHeight+(e.pageY-this.startY),(0,l.arrayEach)(this.selectedRows,(e=>{this.newSize=this.setManualSize(e,this.currentHeight)})),this.refreshHandlePosition(),this.refreshGuidePosition())}onMouseUp(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize(!0)},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(this.pressed){if(this.hideHandleAndGuide(),this.pressed=!1,this.newSize!==this.startHeight){this.selectedRows.length>1?((0,l.arrayEach)(this.selectedRows,(e=>{t(e)})),e()):(0,l.arrayEach)(this.selectedRows,(e=>{t(e,!0)}))}this.setupHandlePosition(this.currentTH)}}onContextMenu(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild(this.handle),this.hot.rootElement.removeChild(this.guide),this.pressed=!1,this.isTriggeredByRMB=!0,this.hot._registerImmediate((()=>{this.isTriggeredByRMB=!1}))}bindEvents(){const{rootElement:e,rootWindow:t}=this.hot;this.eventManager.addEventListener(e,"mouseover",(e=>this.onMouseOver(e))),this.eventManager.addEventListener(e,"mousedown",(e=>this.onMouseDown(e))),this.eventManager.addEventListener(t,"mousemove",(e=>this.onMouseMove(e))),this.eventManager.addEventListener(t,"mouseup",(()=>this.onMouseUp())),this.eventManager.addEventListener(this.handle,"contextmenu",(()=>this.onContextMenu()))}onModifyRowHeight(e,t){let o=e;if(this.enabled){const e=this.hot.toPhysicalRow(t),s=this.rowHeightsMap.getValueAtIndex(e);this.hot.getSettings()[c]&&s&&(o=s)}return o}onMapInit(){const e=g.get(this),t=this.hot.getSettings()[c],o=this.loadManualRowHeights();this.hot.batchExecution((()=>{void 0!==o?o.forEach(((e,t)=>{this.rowHeightsMap.setValueAtIndex(t,e)})):Array.isArray(t)?(t.forEach(((e,t)=>{this.rowHeightsMap.setValueAtIndex(t,e)})),e.config=t):!0===t&&Array.isArray(e.config)&&e.config.forEach(((e,t)=>{this.rowHeightsMap.setValueAtIndex(t,e)}))}),!0)}destroy(){super.destroy()}}t.ManualRowResize=f},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(536);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.MergeCells=s.MergeCells},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(8);var n=o(357),r=s(o(123)),i=s(o(537)),l=s(o(538)),a=s(o(540)),h=s(o(541)),d=s(o(542)),c=o(113),u=o(116),g=o(124),f=o(130),p=o(539);o(543);var m=o(107),C=o(115);r.default.getSingleton().register("beforeMergeCells"),r.default.getSingleton().register("afterMergeCells"),r.default.getSingleton().register("beforeUnmergeCells"),r.default.getSingleton().register("afterUnmergeCells");const w="mergeCells";t.PLUGIN_KEY=w;t.PLUGIN_PRIORITY=150;const y=new WeakMap,v=w;class E extends n.BasePlugin{static get PLUGIN_KEY(){return w}static get PLUGIN_PRIORITY(){return 150}constructor(e){super(e),y.set(this,{lastDesiredCoords:null}),this.mergedCellsCollection=null,this.autofillCalculations=null,this.selectionCalculations=null}isEnabled(){return!!this.hot.getSettings()[w]}enablePlugin(){var e=this;this.enabled||(this.mergedCellsCollection=new i.default(this),this.autofillCalculations=new a.default(this),this.selectionCalculations=new h.default(this),this.addHook("afterInit",(function(){return e.onAfterInit(...arguments)})),this.addHook("modifyTransformStart",(function(){return e.onModifyTransformStart(...arguments)})),this.addHook("afterModifyTransformStart",(function(){return e.onAfterModifyTransformStart(...arguments)})),this.addHook("modifyTransformEnd",(function(){return e.onModifyTransformEnd(...arguments)})),this.addHook("modifyGetCellCoords",(function(){return e.onModifyGetCellCoords(...arguments)})),this.addHook("beforeSetRangeStart",(function(){return e.onBeforeSetRangeStart(...arguments)})),this.addHook("beforeSetRangeStartOnly",(function(){return e.onBeforeSetRangeStart(...arguments)})),this.addHook("beforeSetRangeEnd",(function(){return e.onBeforeSetRangeEnd(...arguments)})),this.addHook("afterIsMultipleSelection",(function(){return e.onAfterIsMultipleSelection(...arguments)})),this.addHook("afterRenderer",(function(){return e.onAfterRenderer(...arguments)})),this.addHook("afterContextMenuDefaultOptions",(function(){return e.addMergeActionsToContextMenu(...arguments)})),this.addHook("afterGetCellMeta",(function(){return e.onAfterGetCellMeta(...arguments)})),this.addHook("afterViewportRowCalculatorOverride",(function(){return e.onAfterViewportRowCalculatorOverride(...arguments)})),this.addHook("afterViewportColumnCalculatorOverride",(function(){return e.onAfterViewportColumnCalculatorOverride(...arguments)})),this.addHook("modifyAutofillRange",(function(){return e.onModifyAutofillRange(...arguments)})),this.addHook("afterCreateCol",(function(){return e.onAfterCreateCol(...arguments)})),this.addHook("afterRemoveCol",(function(){return e.onAfterRemoveCol(...arguments)})),this.addHook("afterCreateRow",(function(){return e.onAfterCreateRow(...arguments)})),this.addHook("afterRemoveRow",(function(){return e.onAfterRemoveRow(...arguments)})),this.addHook("afterChange",(function(){return e.onAfterChange(...arguments)})),this.addHook("beforeDrawBorders",(function(){return e.onBeforeDrawAreaBorders(...arguments)})),this.addHook("afterDrawSelection",(function(){return e.onAfterDrawSelection(...arguments)})),this.addHook("beforeRemoveCellClassNames",(function(){return e.onBeforeRemoveCellClassNames(...arguments)})),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()[w];this.disablePlugin(),this.enablePlugin(),this.generateFromSettings(e),super.updatePlugin()}ifChromeForceRepaint(){if(!(0,C.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){let t=!0;return!!e&&(l.default.containsNegativeValues(e)?((0,g.warn)(l.default.NEGATIVE_VALUES_WARNING(e)),t=!1):l.default.isOutOfBounds(e,this.hot.countRows(),this.hot.countCols())?((0,g.warn)(l.default.IS_OUT_OF_BOUNDS_WARNING(e)),t=!1):l.default.isSingleCell(e)?((0,g.warn)(l.default.IS_SINGLE_CELL(e)),t=!1):l.default.containsZeroSpan(e)&&((0,g.warn)(l.default.ZERO_SPAN_WARNING(e)),t=!1),t)}generateFromSettings(e){if(Array.isArray(e)){const t=[];if((0,c.arrayEach)(e,(e=>{if(!this.validateSetting(e))return;const o=this.hot._createCellCoords(e.row,e.col),s=this.hot._createCellCoords(e.row+e.rowspan-1,e.col+e.colspan-1),n=this.hot._createCellRange(o,o,s);this.mergeRange(n,!0,!0),(0,f.rangeEach)(e.row,e.row+e.rowspan-1,(o=>{(0,f.rangeEach)(e.col,e.col+e.colspan-1,(s=>{!1==(o===e.row&&s===e.col)&&t.push([o,s,null])}))}))})),0===t.length)return;this.hot.setDataAtCell(t)}}clearCollections(){this.mergedCellsCollection.clear()}canMergeRange(e){return!!(arguments.length>1&&void 0!==arguments[1]&&arguments[1])||this.validateSetting(e)}toggleMergeOnSelection(){const e=this.hot.getSelectedRangeLast();if(!e)return;e.setDirection(this.hot.isRtl()?"NE-SW":"NW-SE");const{from:t,to:o}=e;this.toggleMerge(e),this.hot.selectCell(t.row,t.col,o.row,o.col,!1)}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(),r={row:s.row,col:s.col,rowspan:n.row-s.row+1,colspan:n.col-s.col+1},i=[];let l=null;if(!this.canMergeRange(r,t))return!1;this.hot.runHooks("beforeMergeCells",e,t),(0,f.rangeEach)(0,r.rowspan-1,(e=>{(0,f.rangeEach)(0,r.colspan-1,(t=>{let o=null;i[e]||(i[e]=[]),0===e&&0===t?o=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(r.row),this.hot.toPhysicalColumn(r.col)):this.hot.setCellMeta(r.row+e,r.col+t,"hidden",!0),i[e][t]=o}))})),this.hot.setCellMeta(r.row,r.col,"spanned",!0);return!this.mergedCellsCollection.add(r)||(o?l=[r.row,r.col,i]:this.hot.populateFromArray(r.row,r.col,i,void 0,void 0,this.pluginName),t||this.ifChromeForceRepaint(),this.hot.runHooks("afterMergeCells",e,r,t),l)}unmergeRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=this.mergedCellsCollection.getWithinRange(e);o&&(this.hot.runHooks("beforeUnmergeCells",e,t),(0,c.arrayEach)(o,(e=>{this.mergedCellsCollection.remove(e.row,e.col),(0,f.rangeEach)(0,e.rowspan-1,(t=>{(0,f.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),r=this.hot._createCellCoords(o,s);this.mergeRange(this.hot._createCellRange(n,n,r))}unmerge(e,t,o,s){const n=this.hot._createCellCoords(e,t),r=this.hot._createCellCoords(o,s);this.unmergeRange(this.hot._createCellRange(n,n,r))}onAfterInit(){this.generateFromSettings(this.hot.getSettings()[w]),this.hot.render()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Control","m"]],callback:()=>{this.toggleMerge(this.hot.getSelectedRangeLast()),this.hot.render()},runOnlyIf:e=>!e.altKey,group:v})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(v)}onAfterIsMultipleSelection(e){if(e){const e=this.mergedCellsCollection.mergedCells,t=this.hot.getSelectedRangeLast();for(let o=0;o<e.length;o+=1)if(t.from.row===e[o].row&&t.from.col===e[o].col&&t.to.row===e[o].row+e[o].rowspan-1&&t.to.col===e[o].col+e[o].colspan-1)return!1}return e}onModifyTransformStart(e){const t=y.get(this),o=this.hot.getSelectedRangeLast();let s={row:e.row,col:e.col},n=null;const r=this.hot._createCellCoords(o.highlight.row,o.highlight.col),i=this.mergedCellsCollection.get(r.row,r.col);if(t.lastDesiredCoords||(t.lastDesiredCoords=this.hot._createCellCoords(null,null)),i){const o=this.hot._createCellCoords(i.row,i.col),n=this.hot._createCellCoords(i.row+i.rowspan-1,i.col+i.colspan-1);this.hot._createCellRange(o,o,n).includes(t.lastDesiredCoords)||(t.lastDesiredCoords=this.hot._createCellCoords(null,null)),s.row=t.lastDesiredCoords.row?t.lastDesiredCoords.row-r.row:s.row,s.col=t.lastDesiredCoords.col?t.lastDesiredCoords.col-r.col:s.col,e.row>0?s.row=i.row+i.rowspan-1-r.row+e.row:e.row<0&&(s.row=r.row-i.row+e.row),e.col>0?s.col=i.col+i.colspan-1-r.col+e.col:e.col<0&&(s.col=r.col-i.col+e.col)}n=this.hot._createCellCoords(o.highlight.row+s.row,o.highlight.col+s.col);const l=this.mergedCellsCollection.get(n.row,n.col);if(l){const e=this.mergedCellsCollection.getFirstRenderableCoords(l.row,l.col);t.lastDesiredCoords=n,s={row:e.row-r.row,col:e.col-r.col}}0!==s.row&&(e.row=s.row),0!==s.col&&(e.col=s.col)}onModifyTransformEnd(e){const t=this.hot.getSelectedRangeLast(),o=(0,u.clone)(e),s=this.selectionCalculations.getUpdatedSelectionRange(t,e);let n=(0,u.clone)(o);const r=this.mergedCellsCollection.getWithinRange(s,!0);do{n=(0,u.clone)(o),this.selectionCalculations.getUpdatedSelectionRange(t,o),(0,c.arrayEach)(r,(e=>{this.selectionCalculations.snapDelta(o,t,e)}))}while(o.row!==n.row||o.col!==n.col);e.row=o.row,e.col=o.col}onModifyGetCellCoords(e,t){if(e<0||t<0)return;const o=this.mergedCellsCollection.get(e,t);if(!o)return;const{row:s,col:n,colspan:r,rowspan:i}=o;return[s,n,s+i-1,n+r-1]}addMergeActionsToContextMenu(e){e.items.push({name:"---------"},(0,d.default)(this))}onAfterRenderer(e,t,o){const s=this.mergedCellsCollection.get(t,o),n=(0,u.isObject)(s)?(0,u.clone)(s):void 0;if((0,u.isObject)(n)){const{rowIndexMapper:e,columnIndexMapper:s}=this.hot,{row:r,col:i,colspan:l,rowspan:a}=n,[h,d]=this.translateMergedCellToRenderable(r,a,i,l),c=h-e.getRenderableFromVisualIndex(t)+1,u=d-s.getRenderableFromVisualIndex(o)+1;n.row=e.getNearestNotHiddenIndex(n.row,1),n.col=s.getNearestNotHiddenIndex(n.col,1),n.rowspan=Math.min(n.rowspan,c),n.colspan=Math.min(n.colspan,u)}(0,p.applySpanProperties)(e,n,t,o)}onBeforeSetRangeStart(e){if(this.mergedCellsCollection.isFirstRenderableMergedCell(e.row,e.col)){const t=this.mergedCellsCollection.get(e.row,e.col);[e.row,e.col]=[t.row,t.col]}}onBeforeSetRangeEnd(e){const t=this.hot.getSelectedRangeLast();t.highlight=this.hot._createCellCoords(t.highlight.row,t.highlight.col),t.to=e;let o=!1;if(!this.hot.selection.isSelectedByColumnHeader()&&!this.hot.selection.isSelectedByRowHeader())do{o=!1;for(let s=0;s<this.mergedCellsCollection.mergedCells.length;s+=1){const n=this.mergedCellsCollection.mergedCells[s].getRange();t.expandByRange(n)&&(e.row=t.to.row,e.col=t.to.col,o=!0)}}while(o)}onAfterGetCellMeta(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))}onAfterViewportRowCalculatorOverride(e){const t=this.hot.countCols();this.modifyViewportRowStart(e,t),this.modifyViewportRowEnd(e,t)}modifyViewportRowStart(e,t){const o=this.hot.rowIndexMapper,s=o.getVisualFromRenderableIndex(e.startRow);for(let n=0;n<t;n+=1){const r=this.mergedCellsCollection.get(s,n);if((0,u.isObject)(r)){const s=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(r.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 r=this.mergedCellsCollection.get(s,n);if((0,u.isObject)(r)){const s=r.row+r.rowspan-1,n=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(s,-1));if(n>e.endRow)return e.endRow=n,void this.modifyViewportRowEnd(e,t)}}}onAfterViewportColumnCalculatorOverride(e){const t=this.hot.countRows();this.modifyViewportColumnStart(e,t),this.modifyViewportColumnEnd(e,t)}modifyViewportColumnStart(e,t){const o=this.hot.columnIndexMapper,s=o.getVisualFromRenderableIndex(e.startColumn);for(let n=0;n<t;n+=1){const r=this.mergedCellsCollection.get(n,s);if((0,u.isObject)(r)){const s=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(r.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 r=this.mergedCellsCollection.get(n,s);if((0,u.isObject)(r)){const s=r.col+r.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:r}=this.hot;let i,l;i=0===t?n.getNearestNotHiddenIndex(e,1):n.getNearestNotHiddenIndex(e+t-1,-1),l=0===s?r.getNearestNotHiddenIndex(o,1):r.getNearestNotHiddenIndex(o+s-1,-1);return[e>=0?n.getRenderableFromVisualIndex(i):e,o>=0?r.getRenderableFromVisualIndex(l):o]}onModifyAutofillRange(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.mergedCellsCollection.getWithinRange({from:{row:t[0],col:t[1]},to:{row:t[2],col:t[3]}});return n?(s=this.autofillCalculations.snapDragArea(t,s,o,n),s):s}onAfterCreateCol(e,t){this.mergedCellsCollection.shiftCollections("right",e,t)}onAfterRemoveCol(e,t){this.mergedCellsCollection.shiftCollections("left",e,t)}onAfterCreateRow(e,t,o){"auto"!==o&&this.mergedCellsCollection.shiftCollections("down",e,t)}onAfterRemoveRow(e,t){this.mergedCellsCollection.shiftCollections("up",e,t)}onAfterChange(e,t){"Autofill.fill"===t&&this.autofillCalculations.recreateAfterDataPopulation(e)}onBeforeDrawAreaBorders(e,t){if(t&&"area"===t){const t=this.hot.getSelectedRangeLast(),o=this.mergedCellsCollection.getWithinRange(t);(0,c.arrayEach)(o,(o=>{t.getBottomEndCorner().row===o.getLastRow()&&t.getBottomEndCorner().col===o.getLastColumn()&&(e[2]=o.row,e[3]=o.col)}))}}onAfterModifyTransformStart(e,t,o){if(!this.enabled)return;const s=this.mergedCellsCollection.get(e.row,e.col);if(!s)return;const n=t>0,r=t<0,i=o<0,l=o>0,a=s.row+s.rowspan-1==this.hot.countRows()-1,h=0===s.row,d=s.col+s.colspan-1==this.hot.countCols()-1,c=0===s.col;(n&&a||r&&h||l&&d||i&&c)&&(e.row=s.row,e.col=s.col)}onAfterDrawSelection(e,t,o,s){if(o)return this.selectionCalculations.getSelectedMergedCellClassName(e,t,o,s)}onBeforeRemoveCellClassNames(){return this.selectionCalculations.getSelectedMergedCellClassNameToRemove()}}t.MergeCells=E},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(8);var n=s(o(538)),r=o(130),i=o(124),l=o(113),a=o(539),h=o(112);class d{constructor(e){this.plugin=e,this.mergedCells=[],this.hot=e.hot}static IS_OVERLAPPING_WARNING(e){return h.toSingleLine`The merged cell declared at [${e.row}, ${e.col}], overlaps\x20
|
38
|
+
settings. Otherwise, HyperFormula's dates may not sync correctly with Handsontable's dates.`),s}return null},t.setupSheet=function(e,t){!(0,r.isUndefined)(t)&&e.doesSheetExist(t)||(t=e.addSheet(t));return t},t.unregisterEngine=function(e,t){if(e){const o=c(),s=o.get(e),n=u(),r=n.get(e);s&&s.includes(t)&&(s.splice(s.indexOf(t),1),0===s.length&&o.delete(e)),r&&r.includes(t.guid)&&(r.splice(r.indexOf(t.guid),1),0===r.length&&(n.delete(e),e.destroy()))}},o(8);var n=s(o(125)),r=o(110),i=o(112),l=o(124),a=o(116),h=o(498),d=o(500);function c(){const e="engine_relationship",t=(0,n.default)(h.PLUGIN_KEY);return t.hasItem(e)||t.register(e,new Map),t.getItem(e)}function u(){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,d.getEngineSettingsWithDefaultsAndOverrides)(t),r=c(),i=u();f(e,s.functions),p(e,s.language);const l=e.buildEmpty(n);return r.set(l,[o]),i.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:r}=t;try{e.addNamedExpression(o,s,n,r)}catch(e){(0,l.warn)(e.message)}})),e.resumeEvaluation())}},(e,t,o)=>{"use strict";t.__esModule=!0,t.getEngineSettingsOverrides=i,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=i(e);return{...r,...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:{}),r=i(e);return{...n,...r}},t.haveEngineSettingsChanged=function(e,t){return Object.keys(t).some((o=>void 0!==t[o]&&t[o]!==e[o]))};var s=o(498);const n="internal-use-in-handsontable";t.DEFAULT_LICENSE_KEY=n;const r={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 i(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)),{})}t.DEFAULT_SETTINGS=r},(e,t,o)=>{"use strict";var s=o(1);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(r)},t.getDateInHotFormat=function(e,t){return(0,n.default)(e,r,!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=i,t.isFormula=function(e){return"string"==typeof e&&e.startsWith("=")},t.unescapeFormulaExpression=function(e){return i(e)?e.substr(1):e};var n=s(o(111));const r="DD/MM/YYYY";function i(e){return"string"==typeof e&&"'"===e.charAt(0)&&"="===e.charAt(1)}},(e,t,o)=>{"use strict";o(78);var s=o(1);t.__esModule=!0;var n=s(o(140)),r=s(o(143)),i=s(o(503));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)}var a=new WeakMap,h=new WeakMap,d=new WeakMap,c=new WeakMap,u=new WeakMap,g=new WeakMap,f=new WeakMap;var p=class{constructor(e,t,o){l(this,a,{writable:!0,value:void 0}),l(this,h,{writable:!0,value:void 0}),l(this,d,{writable:!0,value:void 0}),l(this,c,{writable:!0,value:!1}),l(this,u,{writable:!0,value:!1}),l(this,g,{writable:!0,value:null}),l(this,f,{writable:!0,value:null}),(0,r.default)(this,a,new i.default("row",e,this)),(0,r.default)(this,h,new i.default("column",t,this)),(0,r.default)(this,d,o)}getForAxis(e){return"row"===e?(0,n.default)(this,a):(0,n.default)(this,h)}setPerformUndo(e){(0,r.default)(this,c,e)}setPerformRedo(e){(0,r.default)(this,u,e)}isPerformingUndoRedo(){return(0,n.default)(this,c)||(0,n.default)(this,u)}getSheetId(){return(0,n.default)(this,f)}getEngine(){return(0,n.default)(this,g)}getPostponeAction(){return(0,n.default)(this,d)}setupSyncEndpoint(e,t){(0,r.default)(this,g,e),(0,r.default)(this,f,t),(0,n.default)(this,a).init(),(0,n.default)(this,h).init()}};t.default=p},(e,t,o)=>{"use strict";o(78);var s=o(1);t.__esModule=!0,o(8);var n=s(o(140)),r=s(o(143)),i=o(108);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)}var a=new WeakMap,h=new WeakMap,d=new WeakMap,c=new WeakMap,u=new WeakMap,g=new WeakMap,f=new WeakMap;var p=class{constructor(e,t,o){l(this,a,{writable:!0,value:void 0}),l(this,h,{writable:!0,value:void 0}),l(this,d,{writable:!0,value:void 0}),l(this,c,{writable:!0,value:[]}),l(this,u,{writable:!0,value:[]}),l(this,g,{writable:!0,value:void 0}),l(this,f,{writable:!0,value:[]}),(0,r.default)(this,a,e),(0,r.default)(this,h,t),(0,r.default)(this,d,o)}setRemovedHfIndexes(e){return(0,r.default)(this,f,e.map((e=>{const t=(0,n.default)(this,h).getVisualFromPhysicalIndex(e);return this.getHfIndexFromVisualIndex(t)}))),(0,n.default)(this,f)}getRemovedHfIndexes(){return(0,n.default)(this,f)}getHfIndexFromVisualIndex(e){const t=(0,n.default)(this,h).getIndexesSequence(),o=(0,n.default)(this,h).getNotTrimmedIndexes();return t.indexOf(o[e])}syncMoves(e){const t=`move${(0,i.toUpperCaseFirst)((0,n.default)(this,a))}s`;(0,n.default)(this,d).getEngine().batch((()=>{e.forEach((e=>{const o=e.from!==e.to,s=e.from+1!==e.to;o&&s&&(0,n.default)(this,d).getEngine()[t]((0,n.default)(this,d).getSheetId(),e.from,1,e.to)}))}))}storeMovesInformation(e,t,o){!1!==o&&((0,r.default)(this,u,e.map((e=>this.getHfIndexFromVisualIndex(e)))),(0,r.default)(this,g,this.getHfIndexFromVisualIndex(t)))}getMoveLine(e,t){const o=(0,n.default)(this,h).getNumberOfIndexes(),s=Array.from(Array(o).keys()).filter((t=>!1===e.includes(t)));var r;return 0===t?null!==(r=s[t])&&void 0!==r?r:0:s[t-1]+1}getInitiallyCalculatedMoves(e,t){let o=this.getMoveLine(e,t);const s=[];return e.forEach((e=>{const t={from:e,to:o};s.forEach((e=>{const o=e.from>e.to,s=e.to<=t.from;e.from>t.from&&s&&o&&(t.from+=1)})),t.from>=o&&(o+=1),s.push(t)})),s}adjustedCalculatedMoves(e){return e.forEach(((t,o)=>{e.slice(o+1).forEach((e=>{const o=e.from<e.to;e.from>t.from&&o&&(e.from-=1)}))})),e}calculateAndSyncMoves(e,t){if((0,n.default)(this,d).isPerformingUndoRedo())return;if(!1===e||!1===t)return;const o=this.adjustedCalculatedMoves(this.getInitiallyCalculatedMoves((0,n.default)(this,u),(0,n.default)(this,g)));null===(0,n.default)(this,d).getSheetId()?(0,n.default)(this,d).getPostponeAction((()=>this.syncMoves(o))):this.syncMoves(o)}getIndexesChangeSyncMethod(){const e=`set${(0,i.toUpperCaseFirst)((0,n.default)(this,a))}Order`;return t=>{if((0,n.default)(this,d).isPerformingUndoRedo())return;const o=(0,n.default)(this,h).getIndexesSequence();if("update"===t){const t=(0,n.default)(this,c).map((e=>o.indexOf(e))),s=(0,n.default)(this,d).getEngine().getSheetDimensions((0,n.default)(this,d).getSheetId());let r;r="row"===(0,n.default)(this,a)?s.height:s.width;for(let e=t.length;e<r;e+=1)t.push(e);(0,n.default)(this,d).getEngine()[e]((0,n.default)(this,d).getSheetId(),t)}(0,r.default)(this,c,o)}}init(){(0,r.default)(this,c,(0,n.default)(this,h).getIndexesSequence())}};t.default=p},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(505);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.HiddenColumns=s.HiddenColumns},(e,t,o)=>{"use strict";o(78);var s=o(1);t.__esModule=!0,o(8);var n=s(o(140)),r=s(o(143)),i=o(357),l=o(107),a=o(130),h=o(113),d=o(116),c=o(110),u=o(402),g=s(o(123)),f=s(o(506)),p=s(o(507)),m=o(212);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)}o(508),g.default.getSingleton().register("beforeHideColumns"),g.default.getSingleton().register("afterHideColumns"),g.default.getSingleton().register("beforeUnhideColumns"),g.default.getSingleton().register("afterUnhideColumns");const w="hiddenColumns";t.PLUGIN_KEY=w;t.PLUGIN_PRIORITY=310;var y=new WeakMap,v=new WeakMap;class E extends i.BasePlugin{constructor(){super(...arguments),C(this,y,{writable:!0,value:{}}),C(this,v,{writable:!0,value:null})}static get PLUGIN_KEY(){return w}static get PLUGIN_PRIORITY(){return 310}isEnabled(){return!!this.hot.getSettings()[w]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[w];(0,d.isObject)(t)&&((0,r.default)(this,y,t),(0,c.isUndefined)(t.copyPasteEnabled)&&(t.copyPasteEnabled=!0)),(0,r.default)(this,v,new m.HidingMap),(0,n.default)(this,v).addLocalHook("init",(()=>this.onMapInit())),this.hot.columnIndexMapper.registerMap(this.pluginName,(0,n.default)(this,v)),this.addHook("afterContextMenuDefaultOptions",(function(){return e.onAfterContextMenuDefaultOptions(...arguments)})),this.addHook("afterGetCellMeta",((e,t,o)=>this.onAfterGetCellMeta(e,t,o))),this.addHook("modifyColWidth",((e,t)=>this.onModifyColWidth(e,t))),this.addHook("afterGetColHeader",(function(){return e.onAfterGetColHeader(...arguments)})),this.addHook("modifyCopyableRange",(e=>this.onModifyCopyableRange(e))),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.hot.columnIndexMapper.unregisterMap(this.pluginName),(0,r.default)(this,y,{}),super.disablePlugin(),this.resetCellsMeta()}showColumns(e){const t=this.getHiddenColumns(),o=this.isValidConfig(e);let s=t;const r=(0,n.default)(this,v).getValues().slice(),i=e.length>0;if(o&&i){const t=e.map((e=>this.hot.toPhysicalColumn(e)));(0,h.arrayEach)(t,(e=>{r[e]=!1})),s=(0,h.arrayReduce)(r,((e,t,o)=>(t&&e.push(this.hot.toVisualColumn(o)),e)),[])}!1!==this.hot.runHooks("beforeUnhideColumns",t,s,o&&i)&&(o&&i&&(0,n.default)(this,v).setValues(r),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,h.arrayEach)(e,(e=>{(0,n.default)(this,v).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,h.arrayMap)((0,n.default)(this,v).getHiddenIndexes(),(e=>this.hot.toVisualColumn(e)))}isHidden(e){return(0,n.default)(this,v).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,h.arrayEach)(this.hot.getCellsMeta(),(e=>{e&&(e.skipColumnOnPaste=!1)}))}onModifyColWidth(e,t){return this.isHidden(t)?0:(0,n.default)(this,y).indicators&&(this.isHidden(t+1)||this.isHidden(t-1))&&"number"==typeof e&&this.hot.hasColHeaders()?e+15:void 0}onAfterGetCellMeta(e,t,o){if(!1===(0,n.default)(this,y).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(" ")}}}onModifyCopyableRange(e){if((0,n.default)(this,y).copyPasteEnabled)return e;const t=[],o=(e,o,s,n)=>{t.push({startRow:e,endRow:o,startCol:s,endCol:n})};return(0,h.arrayEach)(e,(e=>{let t=!0,s=0;(0,a.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}onAfterGetColHeader(e,t){if(!(0,n.default)(this,y).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,l.addClass)(t,o)}onAfterContextMenuDefaultOptions(e){e.items.push({name:u.SEPARATOR},(0,f.default)(this),(0,p.default)(this))}onMapInit(){Array.isArray((0,n.default)(this,y).columns)&&this.hideColumns((0,n.default)(this,y).columns)}destroy(){(0,r.default)(this,y,null),(0,r.default)(this,v,null),super.destroy()}}t.HiddenColumns=E},(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),r=[];for(let e=s;e<=n;e+=1)r.push(e);e.hideColumns(r);const i=r[r.length-1],l=this.columnIndexMapper.getNearestNotHiddenIndex(i,1,!0);Number.isInteger(l)&&l>=0?this.selectColumns(l):this.deselectCell(),this.render(),this.view.adjustElementsSize(!0)},disabled:!1,hidden(){return!(this.selection.isSelectedByColumnHeader()||this.selection.isSelectedByCorner())}}},o(8);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={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=r?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(237));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)}},(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],r=t[t.length-1];n=null!==(o=this.columnIndexMapper.getNearestNotHiddenIndex(n-1,-1))&&void 0!==o?o:0,r=null!==(s=this.columnIndexMapper.getNearestNotHiddenIndex(r+1,1))&&void 0!==s?s:this.countCols()-1,e.showColumns(t),this.render(),this.view.adjustElementsSize(!0);r-n+1===this.countCols()||this.selectColumns(n,r)},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(),r=n.getTopStartCorner().col,i=n.getBottomEndCorner().col,l=this.columnIndexMapper,a=l.getRenderableFromVisualIndex(r),h=l.getRenderableFromVisualIndex(i),d=l.getNotTrimmedIndexes(),c=[];if(r!==i){if(i-r+1>h-a+1){const e=d.slice(r,i+1);c.push(...e.filter((e=>o.includes(e))))}}else if(0===a&&a<r)c.push(...d.slice(0,r));else if(null===a)c.push(...d.slice(0,this.countCols()));else{const e=this.countCols()-1;h===l.getRenderableFromVisualIndex(l.getNearestNotHiddenIndex(e,-1))&&e>i&&c.push(...d.slice(i+1))}return(0,s.arrayEach)(c,(e=>{t.push(this.toVisualColumn(e))})),0===t.length}}},o(8);var s=o(113),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={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.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]}s.default=e,o&&o.set(e,s);return s}(o(237));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)}},(e,t,o)=>{"use strict";o.r(t)},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(510);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.HiddenRows=s.HiddenRows},(e,t,o)=>{"use strict";o(78);var s=o(1);t.__esModule=!0,o(8);var n=s(o(140)),r=s(o(143)),i=o(357),l=o(107),a=o(130),h=o(113),d=o(116),c=o(110),u=o(402),g=s(o(123)),f=s(o(511)),p=s(o(512)),m=o(212);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)}o(513),g.default.getSingleton().register("beforeHideRows"),g.default.getSingleton().register("afterHideRows"),g.default.getSingleton().register("beforeUnhideRows"),g.default.getSingleton().register("afterUnhideRows");const w="hiddenRows";t.PLUGIN_KEY=w;t.PLUGIN_PRIORITY=320;var y=new WeakMap,v=new WeakMap;class E extends i.BasePlugin{constructor(){super(...arguments),C(this,y,{writable:!0,value:{}}),C(this,v,{writable:!0,value:null})}static get PLUGIN_KEY(){return w}static get PLUGIN_PRIORITY(){return 320}isEnabled(){return!!this.hot.getSettings()[w]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[w];(0,d.isObject)(t)&&((0,r.default)(this,y,t),(0,c.isUndefined)(t.copyPasteEnabled)&&(t.copyPasteEnabled=!0)),(0,r.default)(this,v,new m.HidingMap),(0,n.default)(this,v).addLocalHook("init",(()=>this.onMapInit())),this.hot.rowIndexMapper.registerMap(this.pluginName,(0,n.default)(this,v)),this.addHook("afterContextMenuDefaultOptions",(function(){return e.onAfterContextMenuDefaultOptions(...arguments)})),this.addHook("afterGetCellMeta",((e,t,o)=>this.onAfterGetCellMeta(e,t,o))),this.addHook("modifyRowHeight",((e,t)=>this.onModifyRowHeight(e,t))),this.addHook("afterGetRowHeader",(function(){return e.onAfterGetRowHeader(...arguments)})),this.addHook("modifyCopyableRange",(e=>this.onModifyCopyableRange(e))),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap(this.pluginName),(0,r.default)(this,y,{}),super.disablePlugin(),this.resetCellsMeta()}showRows(e){const t=this.getHiddenRows(),o=this.isValidConfig(e);let s=t;const r=(0,n.default)(this,v).getValues().slice(),i=e.length>0;if(o&&i){const t=e.map((e=>this.hot.toPhysicalRow(e)));(0,h.arrayEach)(t,(e=>{r[e]=!1})),s=(0,h.arrayReduce)(r,((e,t,o)=>(t&&e.push(this.hot.toVisualRow(o)),e)),[])}!1!==this.hot.runHooks("beforeUnhideRows",t,s,o&&i)&&(o&&i&&(0,n.default)(this,v).setValues(r),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,h.arrayEach)(e,(e=>{(0,n.default)(this,v).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,h.arrayMap)((0,n.default)(this,v).getHiddenIndexes(),(e=>this.hot.toVisualRow(e)))}isHidden(e){return(0,n.default)(this,v).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,h.arrayEach)(this.hot.getCellsMeta(),(e=>{e&&(e.skipRowOnPaste=!1)}))}onModifyRowHeight(e,t){return this.isHidden(t)?0:e}onAfterGetCellMeta(e,t,o){if(!1===(0,n.default)(this,y).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(" ")}}}onModifyCopyableRange(e){if((0,n.default)(this,y).copyPasteEnabled)return e;const t=[],o=(e,o,s,n)=>{t.push({startRow:e,endRow:o,startCol:s,endCol:n})};return(0,h.arrayEach)(e,(e=>{let t=!0,s=0;(0,a.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}onAfterGetRowHeader(e,t){if(!(0,n.default)(this,y).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,l.addClass)(t,o)}onAfterContextMenuDefaultOptions(e){e.items.push({name:u.SEPARATOR},(0,f.default)(this),(0,p.default)(this))}onMapInit(){Array.isArray((0,n.default)(this,y).rows)&&this.hideRows((0,n.default)(this,y).rows)}destroy(){(0,r.default)(this,y,null),(0,r.default)(this,v,null),super.destroy()}}t.HiddenRows=E},(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),r=[];for(let e=s;e<=n;e+=1)r.push(e);e.hideRows(r);const i=r[r.length-1],l=this.rowIndexMapper.getNearestNotHiddenIndex(i,1,!0);Number.isInteger(l)&&l>=0?this.selectRows(l):this.deselectCell(),this.render(),this.view.adjustElementsSize(!0)},disabled:!1,hidden(){return!(this.selection.isSelectedByRowHeader()||this.selection.isSelectedByCorner())}}},o(8);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={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=r?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(237));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)}},(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],r=t[t.length-1];n=null!==(o=this.rowIndexMapper.getNearestNotHiddenIndex(n-1,-1))&&void 0!==o?o:0,r=null!==(s=this.rowIndexMapper.getNearestNotHiddenIndex(r+1,1))&&void 0!==s?s:this.countRows()-1,e.showRows(t),this.render(),this.view.adjustElementsSize(!0);r-n+1===this.countRows()||this.selectRows(n,r)},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(),r=n.getTopStartCorner().row,i=n.getBottomEndCorner().row,l=this.rowIndexMapper,a=l.getRenderableFromVisualIndex(r),h=l.getRenderableFromVisualIndex(i),d=l.getNotTrimmedIndexes(),c=[];if(r!==i){if(i-r+1>h-a+1){const e=d.slice(r,i+1);c.push(...e.filter((e=>o.includes(e))))}}else if(0===a&&a<r)c.push(...d.slice(0,r));else if(null===a)c.push(...d.slice(0,this.countRows()));else{const e=this.countRows()-1;h===l.getRenderableFromVisualIndex(l.getNearestNotHiddenIndex(e,-1))&&e>i&&c.push(...d.slice(i+1))}return(0,s.arrayEach)(c,(e=>{t.push(this.toVisualRow(e))})),0===t.length}}},o(8);var s=o(113),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={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.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]}s.default=e,o&&o.set(e,s);return s}(o(237));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)}},(e,t,o)=>{"use strict";o.r(t)},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(515);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualColumnFreeze=s.ManualColumnFreeze},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(8);var n=o(357),r=s(o(123)),i=s(o(516)),l=s(o(517));o(518),r.default.getSingleton().register("beforeColumnFreeze"),r.default.getSingleton().register("afterColumnFreeze"),r.default.getSingleton().register("beforeColumnUnfreeze"),r.default.getSingleton().register("afterColumnUnfreeze");const a="manualColumnFreeze";t.PLUGIN_KEY=a;t.PLUGIN_PRIORITY=110;const h=new WeakMap;class d extends n.BasePlugin{static get PLUGIN_KEY(){return a}static get PLUGIN_PRIORITY(){return 110}constructor(e){super(e),h.set(this,{afterFirstUse:!1})}isEnabled(){return!!this.hot.getSettings()[a]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",(e=>this.addContextMenuEntry(e))),this.addHook("beforeColumnMove",((e,t)=>this.onBeforeColumnMove(e,t))),super.enablePlugin())}disablePlugin(){h.get(this).afterFirstUse=!1,super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}freezeColumn(e){const t=h.get(this),o=this.hot.getSettings(),s=o.fixedColumnsStart<this.hot.countCols()&&e>o.fixedColumnsStart-1;t.afterFirstUse||(t.afterFirstUse=!0);!1!==this.hot.runHooks("beforeColumnFreeze",e,s)&&(s&&(this.hot.columnIndexMapper.moveIndexes(e,o.fixedColumnsStart),o._fixedColumnsStart+=1),this.hot.runHooks("afterColumnFreeze",e,s))}unfreezeColumn(e){const t=h.get(this),o=this.hot.getSettings(),s=o.fixedColumnsStart>0&&e<=o.fixedColumnsStart-1;t.afterFirstUse||(t.afterFirstUse=!0);!1!==this.hot.runHooks("beforeColumnUnfreeze",e,s)&&(s&&(o._fixedColumnsStart-=1,this.hot.columnIndexMapper.moveIndexes(e,o.fixedColumnsStart)),this.hot.runHooks("afterColumnUnfreeze",e,s))}addContextMenuEntry(e){e.items.push({name:"---------"},(0,i.default)(this),(0,l.default)(this))}onBeforeColumnMove(e,t){if(h.get(this).afterFirstUse){const o=this.hot.getSettings().fixedColumnsStart;if(t<o)return!1;if(e.some((e=>e<o)))return!1}}}t.ManualColumnFreeze=d},(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(!0)},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={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=r?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(237));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)}},(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(!0)},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={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=r?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(237));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)}},(e,t,o)=>{"use strict";o.r(t)},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(520);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualColumnMove=s.ManualColumnMove},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(8);var n=o(357),r=s(o(123)),i=o(113),l=o(107),a=o(130),h=s(o(126)),d=s(o(521)),c=s(o(523));o(524),r.default.getSingleton().register("beforeColumnMove"),r.default.getSingleton().register("afterColumnMove");const u="manualColumnMove";t.PLUGIN_KEY=u;t.PLUGIN_PRIORITY=120;const g=new WeakMap,f="ht__manualColumnMove",p="show-ui",m="on-moving--columns",C="after-selection--columns";class w extends n.BasePlugin{static get PLUGIN_KEY(){return u}static get PLUGIN_PRIORITY(){return 120}constructor(e){super(e),g.set(this,{columnsToMove:[],countCols:0,fixedColumns:0,pressed:void 0,target:{eventPageX:void 0,coords:void 0,TD:void 0,col:void 0},cachedDropIndex:void 0}),this.eventManager=new h.default(this),this.backlight=new d.default(e),this.guideline=new c.default(e)}isEnabled(){return!!this.hot.getSettings()[u]}enablePlugin(){var e=this;this.enabled||(this.addHook("beforeOnCellMouseDown",(function(){return e.onBeforeOnCellMouseDown(...arguments)})),this.addHook("beforeOnCellMouseOver",(function(){return e.onBeforeOnCellMouseOver(...arguments)})),this.addHook("afterScrollVertically",(()=>this.onAfterScrollVertically())),this.addHook("afterLoadData",(function(){return e.onAfterLoadData(...arguments)})),this.buildPluginUI(),this.registerEvents(),(0,l.addClass)(this.hot.rootElement,f),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){(0,l.removeClass)(this.hot.rootElement,f),this.unregisterEvents(),this.backlight.destroy(),this.guideline.destroy(),super.disablePlugin()}moveColumn(e,t){return this.moveColumns([e],t)}moveColumns(e,t){const o=g.get(this),s=o.cachedDropIndex,n=this.isMovePossible(e,t),r=this.hot.runHooks("beforeColumnMove",e,t,s,n);if(o.cachedDropIndex=void 0,!1===r)return;n&&this.hot.columnIndexMapper.moveIndexes(e,t);const i=n&&this.isColumnOrderChanged(e,t);return this.hot.runHooks("afterColumnMove",e,t,s,n,i),i}dragColumn(e,t){return this.dragColumns([e],t)}dragColumns(e,t){const o=this.countFinalIndex(e,t);return g.get(this).cachedDropIndex=t,this.moveColumns(e,o)}isMovePossible(e,t){const o=this.hot.columnIndexMapper.getNotTrimmedIndexesLength(),s=e.length+t>o,n=t<0,r=e.some((e=>e<0)),i=e.some((e=>e>=o));return!(s||n||r||i)}isColumnOrderChanged(e,t){return e.some(((e,o)=>e-o!==t))}countFinalIndex(e,t){const o=(0,i.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()[u];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,a.rangeEach)(e,t,(e=>{o.push(e)})),o}refreshPositions(){const e=g.get(this),t=this.hot.view.getFirstFullyVisibleColumn();this.isFixedColumnsStart(e.hoveredColumn)&&t>0&&this.hot.scrollViewportTo(void 0,this.hot.columnIndexMapper.getNearestNotHiddenIndex(t-1,-1));const o=this.hot.view._wt.wtTable,s=this.hot.view._wt.wtOverlays.scrollableElement,n="number"==typeof s.scrollX?s.scrollX:s.scrollLeft;let r=this.hot.view.THEAD.offsetLeft+this.getColumnsWidth(0,e.hoveredColumn-1);const i=o.hider.offsetWidth,a=o.TBODY.offsetLeft,h=this.backlight.getOffset().start,d=this.backlight.getSize().width;let c=0,u=0;if(this.hot.isRtl()){const t=this.hot.rootWindow,o=(0,l.outerWidth)(this.hot.rootElement),r=t.innerWidth-e.rootElementOffset-o;u=t.innerWidth-e.target.eventPageX-r-(void 0===s.scrollX?n:0)}else u=e.target.eventPageX-(e.rootElementOffset-(void 0===s.scrollX?n:0));if(e.hasRowHeaders&&(c=this.hot.view._wt.wtOverlays.inlineStartOverlay.clone.wtTable.getColumnHeader(-1).offsetWidth),this.isFixedColumnsStart(e.hoveredColumn)&&(r+=n),r+=c,e.hoveredColumn<0)e.fixedColumnsStart>0?e.target.col=0:e.target.col=t>0?t-1:t;else if(e.target.TD.offsetWidth/2+r<=u){const t=e.hoveredColumn>=e.countCols?e.countCols-1:e.hoveredColumn;e.target.col=t+1,r+=e.target.TD.offsetWidth}else e.target.col=e.hoveredColumn;let f=u,p=r;u+d+h>=i?f=i-d-h:u+h<a+c&&(f=a+c+Math.abs(h)),r>=i-1?p=i-1:0===p?p=1:void 0!==s.scrollX&&e.hoveredColumn<e.fixedColumnsStart&&(p-=e.rootElementOffset<=s.scrollX?e.rootElementOffset:0),this.backlight.setPosition(null,f),this.guideline.setPosition(null,p)}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mousemove",(e=>this.onMouseMove(e))),this.eventManager.addEventListener(e,"mouseup",(()=>this.onMouseUp()))}unregisterEvents(){this.eventManager.clear()}onBeforeOnCellMouseDown(e,t,o,s){const n=this.hot.view._wt.wtTable,r=this.hot.selection.isSelectedByColumnHeader(),i=this.hot.getSelectedRangeLast(),a=g.get(this),h=(0,l.hasClass)(e.target,"sortAction");if(!i||!r||a.pressed||0!==e.button||h)return a.pressed=!1,a.columnsToMove.length=0,void(0,l.removeClass)(this.hot.rootElement,[m,p]);const d=this.guideline.isBuilt()&&!this.guideline.isAppended(),c=this.backlight.isBuilt()&&!this.backlight.isAppended();d&&c&&(this.guideline.appendTo(n.hider),this.backlight.appendTo(n.hider));const{from:u,to:f}=i,w=Math.min(u.col,f.col),y=Math.max(u.col,f.col);if(t.row<0&&t.col>=w&&t.col<=y){s.column=!0,a.pressed=!0,a.target.eventPageX=e.pageX,a.target.eventOffsetX=e.offsetX,a.hoveredColumn=t.col,a.target.TD=o,a.target.col=t.col,a.columnsToMove=this.prepareColumnsToMoving(w,y),a.hasRowHeaders=!!this.hot.getSettings().rowHeaders,a.countCols=this.hot.countCols(),a.fixedColumnsStart=this.hot.getSettings().fixedColumnsStart,a.rootElementOffset=(0,l.offset)(this.hot.rootElement).left;const r=a.hasRowHeaders?-1:0,i=n.holder.scrollTop+n.getColumnHeaderHeight(0)+1,h=t.col<a.fixedColumnsStart,d=Math.abs(this.hot.view._wt.wtOverlays.inlineStartOverlay.getScrollPosition()),c=Math.abs(e.offsetX-(this.hot.isRtl()?e.target.offsetWidth:0)),u=this.getColumnsWidth(w,t.col-1)+c,g=this.getColumnsWidth(r,w-1)+(h?d:0)+u;this.backlight.setPosition(i,g),this.backlight.setSize(this.getColumnsWidth(w,y),n.hider.offsetHeight-i),this.backlight.setOffset(null,-u),(0,l.addClass)(this.hot.rootElement,m)}else(0,l.removeClass)(this.hot.rootElement,C),a.pressed=!1,a.columnsToMove.length=0}onMouseMove(e){const t=g.get(this);if(t.pressed){if(e.target===this.backlight.element){const e=this.backlight.getSize().width;this.backlight.setSize(0),setTimeout((function(){this.backlight.setPosition(e)}))}t.target.eventPageX=e.pageX,this.refreshPositions()}}onBeforeOnCellMouseOver(e,t,o,s){const n=this.hot.getSelectedRangeLast(),r=g.get(this);n&&r.pressed&&(r.columnsToMove.indexOf(t.col)>-1?(0,l.removeClass)(this.hot.rootElement,p):(0,l.addClass)(this.hot.rootElement,p),s.row=!0,s.column=!0,s.cell=!0,r.hoveredColumn=t.col,r.target.TD=o)}onMouseUp(){const e=g.get(this),t=e.target.col,o=e.columnsToMove.length;if(e.hoveredColumn=void 0,e.pressed=!1,e.backlightWidth=0,(0,l.removeClass)(this.hot.rootElement,[m,p,C]),this.hot.selection.isSelectedByColumnHeader()&&(0,l.addClass)(this.hot.rootElement,C),o<1||void 0===t)return;const s=e.columnsToMove[0],n=this.hot.toPhysicalColumn(s),r=this.dragColumns(e.columnsToMove,t);if(e.columnsToMove.length=0,!0===r){this.persistentStateSave(),this.hot.render(),this.hot.view.adjustElementsSize(!0);const e=this.hot.toVisualColumn(n),t=e+o-1;this.hot.selectColumns(e,t)}}onAfterScrollVertically(){const e=this.hot.view._wt.wtTable,t=e.getColumnHeaderHeight(0)+1+e.holder.scrollTop;this.backlight.setPosition(t),this.backlight.setSize(null,e.hider.offsetHeight-t)}buildPluginUI(){this.backlight.build(),this.guideline.build()}onAfterLoadData(){this.moveBySettingsOrLoad()}destroy(){this.backlight.destroy(),this.guideline.destroy(),super.destroy()}}t.ManualColumnMove=w},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(522)),r=o(107);class i extends n.default{build(){super.build(),(0,r.addClass)(this._element,"ht__manualColumnMove--backlight")}}var l=i;t.default=l},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(130),n=o(108);const r="px";var i=class{constructor(e){this.hot=e,this._element=null,this.state=0,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,s.isNumeric)(e)&&(this._element.style.top=e+r),(0,s.isNumeric)(t)&&(this._element.style[this.inlineProperty]=t+r)}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,s.isNumeric)(e)&&(this._element.style.width=e+r),(0,s.isNumeric)(t)&&(this._element.style.height=t+r)}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,s.isNumeric)(e)&&(this._element.style.marginTop=e+r),(0,s.isNumeric)(t)&&(this._element.style[`margin${(0,n.toUpperCaseFirst)(this.inlineProperty)}`]=t+r)}getOffset(){const e=this._element.style,t=`margin${(0,n.toUpperCaseFirst)(this.inlineProperty)}`;return{top:e.marginTop?parseInt(e.marginTop,10):0,start:e[t]?parseInt(e[t],10):0}}};t.default=i},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(522)),r=o(107);class i extends n.default{build(){super.build(),(0,r.addClass)(this._element,"ht__manualColumnMove--guideline")}}var l=i;t.default=l},(e,t,o)=>{"use strict";o.r(t)},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(526);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualColumnResize=s.ManualColumnResize},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(8);var n=o(357),r=o(107),i=s(o(126)),l=o(113),a=o(130),h=o(212);const d="manualColumnResize";t.PLUGIN_KEY=d;t.PLUGIN_PRIORITY=130;const c="manualColumnWidths",u=new WeakMap;class g extends n.BasePlugin{static get PLUGIN_KEY(){return d}static get PLUGIN_PRIORITY(){return 130}constructor(e){super(e);const{rootDocument:t}=this.hot;this.currentTH=null,this.currentCol=null,this.selectedCols=[],this.currentWidth=null,this.newSize=null,this.startY=null,this.startWidth=null,this.startOffset=null,this.handle=t.createElement("DIV"),this.guide=t.createElement("DIV"),this.eventManager=new i.default(this),this.pressed=null,this.isTriggeredByRMB=!1,this.dblclick=0,this.autoresizeTimeout=null,this.columnWidthsMap=void 0,u.set(this,{config:void 0}),(0,r.addClass)(this.handle,"manualColumnResizer"),(0,r.addClass)(this.guide,"manualColumnResizerGuide")}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[d]}enablePlugin(){this.enabled||(this.columnWidthsMap=new h.PhysicalIndexToValueMap,this.columnWidthsMap.addLocalHook("init",(()=>this.onMapInit())),this.hot.columnIndexMapper.registerMap(this.pluginName,this.columnWidthsMap),this.addHook("modifyColWidth",((e,t)=>this.onModifyColWidth(e,t))),this.addHook("beforeStretchingColumnWidth",((e,t)=>this.onBeforeStretchingColumnWidth(e,t))),this.addHook("beforeColumnResize",((e,t,o)=>this.onBeforeColumnResize(e,t,o))),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){u.get(this).config=this.columnWidthsMap.getValues(),this.hot.columnIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}saveManualColumnWidths(){this.hot.runHooks("persistentStateSave",c,this.columnWidthsMap.getValues())}loadManualColumnWidths(){const e={};return this.hot.runHooks("persistentStateLoad",c,e),e.value}setManualSize(e,t){const o=Math.max(t,20),s=this.hot.toPhysicalColumn(e);return this.columnWidthsMap.setValueAtIndex(s,o),o}clearManualSize(e){const t=this.hot.toPhysicalColumn(e);this.columnWidthsMap.setValueAtIndex(t,null)}onMapInit(){const e=u.get(this),t=this.hot.getSettings()[d],o=this.loadManualColumnWidths();void 0!==o?this.hot.batchExecution((()=>{o.forEach(((e,t)=>{this.columnWidthsMap.setValueAtIndex(t,e)}))}),!0):Array.isArray(t)?(this.hot.batchExecution((()=>{t.forEach(((e,t)=>{this.columnWidthsMap.setValueAtIndex(t,e)}))}),!0),e.config=t):!0===t&&Array.isArray(e.config)&&this.hot.batchExecution((()=>{e.config.forEach(((e,t)=>{this.columnWidthsMap.setValueAtIndex(t,e)}))}),!0)}setupHandlePosition(e){if(!e.parentNode)return;this.currentTH=e;const t=this.hot.rootElement;if(!1===(0,r.overlayContainsElement)("top_inline_start_corner",this.currentTH,t)&&!1===(0,r.overlayContainsElement)("top",this.currentTH,t))return;const{_wt:o}=this.hot.view,s=o.wtTable.getCoords(this.currentTH),n=s.col;if(n<0)return;const i=(0,r.outerHeight)(this.currentTH),h=this.currentTH.getBoundingClientRect();let d;n<o.getSetting("fixedColumnsStart")&&(d=o.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(this.currentTH,s.row,s.col)),d||(d=o.wtOverlays.topOverlay.getRelativeCellPosition(this.currentTH,s.row,s.col)),this.currentCol=this.hot.columnIndexMapper.getVisualFromRenderableIndex(n),this.selectedCols=[];const c=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByColumnHeader();if(this.hot.selection.isSelected()&&c){const e=this.hot.getSelectedRange();(0,l.arrayEach)(e,(e=>{const t=e.getTopStartCorner().col,o=e.getBottomEndCorner().col;(0,a.rangeEach)(t,o,(e=>{this.selectedCols.includes(e)||this.selectedCols.push(e)}))}))}this.selectedCols.includes(this.currentCol)||(this.selectedCols=[this.currentCol]),this.startOffset=d.start-6,this.startWidth=parseInt(h.width,10),this.handle.style.top=`${d.top}px`,this.handle.style[this.inlineDir]=`${this.startOffset+this.startWidth}px`,this.handle.style.height=`${i}px`,this.hot.rootElement.appendChild(this.handle)}refreshHandlePosition(){this.handle.style[this.inlineDir]=`${this.startOffset+this.currentWidth}px`}setupGuidePosition(){const e=parseInt((0,r.outerHeight)(this.handle),10),t=parseInt(this.handle.style.top,10)+e,o=parseInt(this.hot.view.maximumVisibleElementHeight(0),10);(0,r.addClass)(this.handle,"active"),(0,r.addClass)(this.guide,"active"),this.guide.style.top=`${t}px`,this.refreshGuidePosition(),this.guide.style.height=o-e+"px",this.hot.rootElement.appendChild(this.guide)}refreshGuidePosition(){this.guide.style[this.inlineDir]=this.handle.style[this.inlineDir]}hideHandleAndGuide(){(0,r.removeClass)(this.handle,"active"),(0,r.removeClass)(this.guide,"active")}checkIfColumnHeader(e){return!!(0,r.closest)(e,["THEAD"],this.hot.rootElement)}getClosestTHParent(e){return"TABLE"!==e.tagName?"TH"===e.tagName?e:this.getClosestTHParent(e.parentNode):null}onMouseOver(e){if(!(0,r.isDetached)(e.target)&&!0!==this.isTriggeredByRMB&&this.checkIfColumnHeader(e.target)){const t=this.getClosestTHParent(e.target);if(!t)return;const o=t.getAttribute("colspan");!t||null!==o&&"1"!==o||this.pressed||this.setupHandlePosition(t)}}afterMouseDownTimeout(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize(!0)},t=(t,o)=>{const s=this.hot.runHooks("beforeColumnResize",this.newSize,t,!0);void 0!==s&&(this.newSize=s),"all"===this.hot.getSettings().stretchH?this.clearManualSize(t):this.setManualSize(t,this.newSize),this.saveManualColumnWidths(),this.hot.runHooks("afterColumnResize",this.newSize,t,!0),o&&e()};if(this.dblclick>=2){this.selectedCols.length>1?((0,l.arrayEach)(this.selectedCols,(e=>{t(e)})),e()):(0,l.arrayEach)(this.selectedCols,(e=>{t(e,!0)}))}this.dblclick=0,this.autoresizeTimeout=null}onMouseDown(e){(0,r.hasClass)(e.target,"manualColumnResizer")&&(this.setupHandlePosition(this.currentTH),this.setupGuidePosition(),this.pressed=!0,null===this.autoresizeTimeout&&(this.autoresizeTimeout=setTimeout((()=>this.afterMouseDownTimeout()),500),this.hot._registerTimeout(this.autoresizeTimeout)),this.dblclick+=1,this.startX=e.pageX,this.newSize=this.startWidth)}onMouseMove(e){if(this.pressed){const t=(e.pageX-this.startX)*this.hot.getDirectionFactor();this.currentWidth=this.startWidth+t,(0,l.arrayEach)(this.selectedCols,(e=>{this.newSize=this.setManualSize(e,this.currentWidth)})),this.refreshHandlePosition(),this.refreshGuidePosition()}}onMouseUp(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize(!0)},t=(t,o)=>{this.hot.runHooks("beforeColumnResize",this.newSize,t,!1),o&&e(),this.saveManualColumnWidths(),this.hot.runHooks("afterColumnResize",this.newSize,t,!1)};if(this.pressed){if(this.hideHandleAndGuide(),this.pressed=!1,this.newSize!==this.startWidth){this.selectedCols.length>1?((0,l.arrayEach)(this.selectedCols,(e=>{t(e)})),e()):(0,l.arrayEach)(this.selectedCols,(e=>{t(e,!0)}))}this.setupHandlePosition(this.currentTH)}}onContextMenu(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild(this.handle),this.hot.rootElement.removeChild(this.guide),this.pressed=!1,this.isTriggeredByRMB=!0,this.hot._registerImmediate((()=>{this.isTriggeredByRMB=!1}))}bindEvents(){const{rootWindow:e,rootElement:t}=this.hot;this.eventManager.addEventListener(t,"mouseover",(e=>this.onMouseOver(e))),this.eventManager.addEventListener(t,"mousedown",(e=>this.onMouseDown(e))),this.eventManager.addEventListener(e,"mousemove",(e=>this.onMouseMove(e))),this.eventManager.addEventListener(e,"mouseup",(()=>this.onMouseUp())),this.eventManager.addEventListener(this.handle,"contextmenu",(()=>this.onContextMenu()))}onModifyColWidth(e,t){let o=e;if(this.enabled){const e=this.hot.toPhysicalColumn(t),s=this.columnWidthsMap.getValueAtIndex(e);this.hot.getSettings()[d]&&s&&(o=s)}return o}onBeforeStretchingColumnWidth(e,t){let o=this.columnWidthsMap.getValueAtIndex(t);return null===o&&(o=e),o}onBeforeColumnResize(){this.hot.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked()}destroy(){super.destroy()}}t.ManualColumnResize=g},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(528);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualRowMove=s.ManualRowMove},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(8);var n=o(357),r=s(o(123)),i=o(113),l=o(107),a=o(130),h=s(o(126)),d=s(o(529)),c=s(o(531));o(532),r.default.getSingleton().register("beforeRowMove"),r.default.getSingleton().register("afterRowMove");const u="manualRowMove";t.PLUGIN_KEY=u;t.PLUGIN_PRIORITY=140;const g=new WeakMap,f="ht__manualRowMove",p="show-ui",m="on-moving--rows",C="after-selection--rows";class w extends n.BasePlugin{static get PLUGIN_KEY(){return u}static get PLUGIN_PRIORITY(){return 140}constructor(e){super(e),g.set(this,{rowsToMove:[],pressed:void 0,target:{eventPageY:void 0,coords:void 0,TD:void 0,row:void 0},cachedDropIndex:void 0}),this.eventManager=new h.default(this),this.backlight=new d.default(e),this.guideline=new c.default(e)}isEnabled(){return!!this.hot.getSettings()[u]}enablePlugin(){var e=this;this.enabled||(this.addHook("beforeOnCellMouseDown",(function(){return e.onBeforeOnCellMouseDown(...arguments)})),this.addHook("beforeOnCellMouseOver",(function(){return e.onBeforeOnCellMouseOver(...arguments)})),this.addHook("afterScrollHorizontally",(()=>this.onAfterScrollHorizontally())),this.addHook("afterLoadData",(function(){return e.onAfterLoadData(...arguments)})),this.buildPluginUI(),this.registerEvents(),(0,l.addClass)(this.hot.rootElement,f),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){(0,l.removeClass)(this.hot.rootElement,f),this.unregisterEvents(),this.backlight.destroy(),this.guideline.destroy(),super.disablePlugin()}moveRow(e,t){return this.moveRows([e],t)}moveRows(e,t){const o=g.get(this),s=o.cachedDropIndex,n=this.isMovePossible(e,t),r=this.hot.runHooks("beforeRowMove",e,t,s,n);if(o.cachedDropIndex=void 0,!1===r)return;n&&this.hot.rowIndexMapper.moveIndexes(e,t);const i=n&&this.isRowOrderChanged(e,t);return this.hot.runHooks("afterRowMove",e,t,s,n,i),i}dragRow(e,t){return this.dragRows([e],t)}dragRows(e,t){const o=this.countFinalIndex(e,t);return g.get(this).cachedDropIndex=t,this.moveRows(e,o)}isMovePossible(e,t){const o=this.hot.rowIndexMapper.getNotTrimmedIndexesLength(),s=e.length+t>o,n=t<0,r=e.some((e=>e<0)),i=e.some((e=>e>=o));return!(s||n||r||i)}isRowOrderChanged(e,t){return e.some(((e,o)=>e-o!==t))}countFinalIndex(e,t){const o=(0,i.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()[u];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),r=Math.max(o.row,s.row);return(0,a.rangeEach)(n,r,(e=>{t.push(e)})),t}refreshPositions(){const e=g.get(this),t=e.target.coords,o=this.hot.view.getFirstFullyVisibleRow(),s=this.hot.view.getLastFullyVisibleRow(),n=this.hot.countRows();this.isFixedRowTop(t.row)&&o>0&&this.hot.scrollViewportTo(this.hot.rowIndexMapper.getNearestNotHiddenIndex(o-1,-1)),this.isFixedRowBottom(t.row)&&s<n&&this.hot.scrollViewportTo(this.hot.rowIndexMapper.getNearestNotHiddenIndex(s+1,1),void 0,!0);const r=this.hot.view._wt.wtTable,i=e.target.TD,a=this.hot.rootElement,h=(0,l.offset)(a),d=(0,l.getTrimmingContainer)(a),c=r.holder.scrollTop;let u;u=this.hot.rootWindow===d?d.scrollY:d.scrollTop;const f=h.top-u,p=e.target.eventPageY-f+c,m=r.hider.offsetHeight,C=r.TBODY.offsetTop,w=this.backlight.getOffset().top,y=this.backlight.getSize().height,v=i.offsetHeight/2,E=i.offsetHeight;let S=this.hot.view.THEAD.offsetHeight+this.getRowsHeight(0,t.row-1);const R=p>=S+v;this.isFixedRowTop(t.row)&&(S+=r.holder.scrollTop),t.row<0?e.target.row=o>0?o-1:o:R?(e.target.row=t.row+1,S+=0===t.row?E-1:E):e.target.row=t.row;let b=p,T=S;p+y+w>=m?b=m-y-w:p+w<C&&(b=C+Math.abs(w)),S>=m-1&&(T=m-1),this.backlight.setPosition(b),this.guideline.setPosition(T)}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mousemove",(e=>this.onMouseMove(e))),this.eventManager.addEventListener(e,"mouseup",(()=>this.onMouseUp()))}unregisterEvents(){this.eventManager.clear()}onBeforeOnCellMouseDown(e,t,o,s){const{wtTable:n,wtViewport:r}=this.hot.view._wt,i=this.hot.selection.isSelectedByRowHeader(),a=this.hot.getSelectedRangeLast(),h=g.get(this);if(!a||!i||h.pressed||0!==e.button)return h.pressed=!1,h.rowsToMove.length=0,void(0,l.removeClass)(this.hot.rootElement,[m,p]);const d=this.guideline.isBuilt()&&!this.guideline.isAppended(),c=this.backlight.isBuilt()&&!this.backlight.isAppended();d&&c&&(this.guideline.appendTo(n.hider),this.backlight.appendTo(n.hider));const{from:u,to:f}=a,w=Math.min(u.row,f.row),y=Math.max(u.row,f.row);if(t.col<0&&t.row>=w&&t.row<=y){s.row=!0,h.pressed=!0,h.target.eventPageY=e.pageY,h.target.coords=t,h.target.TD=o,h.rowsToMove=this.prepareRowsToMoving();const i=n.holder.scrollLeft+r.getRowHeaderWidth();this.backlight.setPosition(null,i),this.backlight.setSize(n.hider.offsetWidth-i,this.getRowsHeight(w,y)),this.backlight.setOffset(-1*(this.getRowsHeight(w,t.row-1)+e.offsetY),null),(0,l.addClass)(this.hot.rootElement,m),this.refreshPositions()}else(0,l.removeClass)(this.hot.rootElement,C),h.pressed=!1,h.rowsToMove.length=0}onMouseMove(e){const t=g.get(this);if(t.pressed){if(e.target===this.backlight.element){const e=this.backlight.getSize().height;this.backlight.setSize(null,0),setTimeout((function(){this.backlight.setPosition(null,e)}))}t.target.eventPageY=e.pageY,this.refreshPositions()}}onBeforeOnCellMouseOver(e,t,o,s){const n=this.hot.getSelectedRangeLast(),r=g.get(this);n&&r.pressed&&(r.rowsToMove.indexOf(t.row)>-1?(0,l.removeClass)(this.hot.rootElement,p):(0,l.addClass)(this.hot.rootElement,p),s.row=!0,s.column=!0,s.cell=!0,r.target.coords=t,r.target.TD=o)}onMouseUp(){const e=g.get(this),t=e.target.row,o=e.rowsToMove.length;if(e.pressed=!1,e.backlightHeight=0,(0,l.removeClass)(this.hot.rootElement,[m,p,C]),this.hot.selection.isSelectedByRowHeader()&&(0,l.addClass)(this.hot.rootElement,C),o<1||void 0===t)return;const s=e.rowsToMove[0],n=this.hot.toPhysicalRow(s),r=this.dragRows(e.rowsToMove,t);if(e.rowsToMove.length=0,!0===r){this.persistentStateSave(),this.hot.render(),this.hot.view.adjustElementsSize(!0);const e=this.hot.toVisualRow(n),t=e+o-1;this.hot.selectRows(e,t)}}onAfterScrollHorizontally(){const e=this.hot.view._wt.wtTable,t=this.hot.view._wt.wtViewport.getRowHeaderWidth()+e.holder.scrollLeft;this.backlight.setPosition(null,t),this.backlight.setSize(e.hider.offsetWidth-t)}buildPluginUI(){this.backlight.build(),this.guideline.build()}onAfterLoadData(){this.moveBySettingsOrLoad()}destroy(){this.backlight.destroy(),this.guideline.destroy(),super.destroy()}}t.ManualRowMove=w},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(530)),r=o(107);class i extends n.default{build(){super.build(),(0,r.addClass)(this._element,"ht__manualRowMove--backlight")}}var l=i;t.default=l},(e,t)=>{"use strict";t.__esModule=!0;const o="px";var s=class{constructor(e){this.hot=e,this._element=null,this.state=0}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+o),void 0!==t&&(this._element.style.left=t+o)}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+o),t&&(this._element.style.height=t+o)}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+o),t&&(this._element.style.marginLeft=t+o)}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}}};t.default=s},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(530)),r=o(107);class i extends n.default{build(){super.build(),(0,r.addClass)(this._element,"ht__manualRowMove--guideline")}}var l=i;t.default=l},(e,t,o)=>{"use strict";o.r(t)},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(534);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualRowResize=s.ManualRowResize},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(8);var n=o(357),r=o(107),i=s(o(126)),l=o(113),a=o(130),h=o(212),d=o(145);const c="manualRowResize";t.PLUGIN_KEY=c;t.PLUGIN_PRIORITY=30;const u="manualRowHeights",g=new WeakMap;class f extends n.BasePlugin{static get PLUGIN_KEY(){return c}static get PLUGIN_PRIORITY(){return 30}constructor(e){super(e);const{rootDocument:t}=this.hot;this.currentTH=null,this.currentRow=null,this.selectedRows=[],this.currentHeight=null,this.newSize=null,this.startY=null,this.startHeight=null,this.startOffset=null,this.handle=t.createElement("DIV"),this.guide=t.createElement("DIV"),this.eventManager=new i.default(this),this.pressed=null,this.isTriggeredByRMB=!1,this.dblclick=0,this.autoresizeTimeout=null,this.rowHeightsMap=void 0,g.set(this,{config:void 0}),(0,r.addClass)(this.handle,"manualRowResizer"),(0,r.addClass)(this.guide,"manualRowResizerGuide")}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[c]}enablePlugin(){this.enabled||(this.rowHeightsMap=new h.PhysicalIndexToValueMap,this.rowHeightsMap.addLocalHook("init",(()=>this.onMapInit())),this.hot.rowIndexMapper.registerMap(this.pluginName,this.rowHeightsMap),this.addHook("modifyRowHeight",((e,t)=>this.onModifyRowHeight(e,t))),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){g.get(this).config=this.rowHeightsMap.getValues(),this.hot.rowIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}saveManualRowHeights(){this.hot.runHooks("persistentStateSave",u,this.rowHeightsMap.getValues())}loadManualRowHeights(){const e={};return this.hot.runHooks("persistentStateLoad",u,e),e.value}setManualSize(e,t){const o=this.hot.toPhysicalRow(e),s=Math.max(t,d.ViewportRowsCalculator.DEFAULT_HEIGHT);return this.rowHeightsMap.setValueAtIndex(o,s),s}setupHandlePosition(e){this.currentTH=e;const{view:t}=this.hot,{_wt:o}=t,s=o.wtTable.getCoords(this.currentTH),n=s.row;if(n<0)return;const i=(0,r.outerWidth)(this.currentTH),h=this.currentTH.getBoundingClientRect(),d=n<o.getSetting("fixedRowsTop"),c=n>=t.countNotHiddenRowIndexes(0,1)-o.getSetting("fixedRowsBottom");let u;d?u=o.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(this.currentTH,s.row,s.col):c&&(u=o.wtOverlays.bottomInlineStartCornerOverlay.getRelativeCellPosition(this.currentTH,s.row,s.col)),u||(u=o.wtOverlays.inlineStartOverlay.getRelativeCellPosition(this.currentTH,s.row,s.col)),this.currentRow=this.hot.rowIndexMapper.getVisualFromRenderableIndex(n),this.selectedRows=[];const g=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByRowHeader();if(this.hot.selection.isSelected()&&g){const e=this.hot.getSelectedRange();(0,l.arrayEach)(e,(e=>{const t=e.getTopStartCorner().row,o=e.getBottomStartCorner().row;(0,a.rangeEach)(t,o,(e=>{this.selectedRows.includes(e)||this.selectedRows.push(e)}))}))}this.selectedRows.includes(this.currentRow)||(this.selectedRows=[this.currentRow]),this.startOffset=u.top-6,this.startHeight=parseInt(h.height,10),this.handle.style.top=`${this.startOffset+this.startHeight}px`,this.handle.style[this.inlineDir]=`${u.start}px`,this.handle.style.width=`${i}px`,this.hot.rootElement.appendChild(this.handle)}refreshHandlePosition(){this.handle.style.top=`${this.startOffset+this.currentHeight}px`}setupGuidePosition(){const e=parseInt((0,r.outerWidth)(this.handle),10),t=parseInt(this.handle.style[this.inlineDir],10)+e,o=parseInt(this.hot.view.maximumVisibleElementWidth(0),10);(0,r.addClass)(this.handle,"active"),(0,r.addClass)(this.guide,"active"),this.guide.style.top=this.handle.style.top,this.guide.style[this.inlineDir]=`${t}px`,this.guide.style.width=o-e+"px",this.hot.rootElement.appendChild(this.guide)}refreshGuidePosition(){this.guide.style.top=this.handle.style.top}hideHandleAndGuide(){(0,r.removeClass)(this.handle,"active"),(0,r.removeClass)(this.guide,"active")}checkIfRowHeader(e){var t;return(0,r.closest)(e,["TH"],this.hot.rootElement)&&"TBODY"===(null===(t=e.parentNode)||void 0===t||null===(t=t.parentNode)||void 0===t?void 0:t.tagName)}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&&this.newSize<t?t:this.newSize}onMouseOver(e){if(!(0,r.isDetached)(e.target)&&!0!==this.isTriggeredByRMB&&this.checkIfRowHeader(e.target)){const t=this.getClosestTHParent(e.target);t&&(this.pressed||this.setupHandlePosition(t))}}afterMouseDownTimeout(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize(!0)},t=(t,o)=>{const s=this.hot.runHooks("beforeRowResize",this.getActualRowHeight(t),t,!0);void 0!==s&&(this.newSize=s),this.setManualSize(t,this.newSize),this.hot.runHooks("afterRowResize",this.getActualRowHeight(t),t,!0),o&&e()};if(this.dblclick>=2){this.selectedRows.length>1?((0,l.arrayEach)(this.selectedRows,(e=>{t(e)})),e()):(0,l.arrayEach)(this.selectedRows,(e=>{t(e,!0)}))}this.dblclick=0,this.autoresizeTimeout=null}onMouseDown(e){(0,r.hasClass)(e.target,"manualRowResizer")&&(this.setupHandlePosition(this.currentTH),this.setupGuidePosition(),this.pressed=!0,null===this.autoresizeTimeout&&(this.autoresizeTimeout=setTimeout((()=>this.afterMouseDownTimeout()),500),this.hot._registerTimeout(this.autoresizeTimeout)),this.dblclick+=1,this.startY=e.pageY,this.newSize=this.startHeight)}onMouseMove(e){this.pressed&&(this.currentHeight=this.startHeight+(e.pageY-this.startY),(0,l.arrayEach)(this.selectedRows,(e=>{this.newSize=this.setManualSize(e,this.currentHeight)})),this.refreshHandlePosition(),this.refreshGuidePosition())}onMouseUp(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize(!0)},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(this.pressed){if(this.hideHandleAndGuide(),this.pressed=!1,this.newSize!==this.startHeight){this.selectedRows.length>1?((0,l.arrayEach)(this.selectedRows,(e=>{t(e)})),e()):(0,l.arrayEach)(this.selectedRows,(e=>{t(e,!0)}))}this.setupHandlePosition(this.currentTH)}}onContextMenu(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild(this.handle),this.hot.rootElement.removeChild(this.guide),this.pressed=!1,this.isTriggeredByRMB=!0,this.hot._registerImmediate((()=>{this.isTriggeredByRMB=!1}))}bindEvents(){const{rootElement:e,rootWindow:t}=this.hot;this.eventManager.addEventListener(e,"mouseover",(e=>this.onMouseOver(e))),this.eventManager.addEventListener(e,"mousedown",(e=>this.onMouseDown(e))),this.eventManager.addEventListener(t,"mousemove",(e=>this.onMouseMove(e))),this.eventManager.addEventListener(t,"mouseup",(()=>this.onMouseUp())),this.eventManager.addEventListener(this.handle,"contextmenu",(()=>this.onContextMenu()))}onModifyRowHeight(e,t){let o=e;if(this.enabled){const e=this.hot.toPhysicalRow(t),s=this.rowHeightsMap.getValueAtIndex(e);this.hot.getSettings()[c]&&s&&(o=s)}return o}onMapInit(){const e=g.get(this),t=this.hot.getSettings()[c],o=this.loadManualRowHeights();this.hot.batchExecution((()=>{void 0!==o?o.forEach(((e,t)=>{this.rowHeightsMap.setValueAtIndex(t,e)})):Array.isArray(t)?(t.forEach(((e,t)=>{this.rowHeightsMap.setValueAtIndex(t,e)})),e.config=t):!0===t&&Array.isArray(e.config)&&e.config.forEach(((e,t)=>{this.rowHeightsMap.setValueAtIndex(t,e)}))}),!0)}destroy(){super.destroy()}}t.ManualRowResize=f},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(536);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.MergeCells=s.MergeCells},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(8);var n=o(357),r=s(o(123)),i=s(o(537)),l=s(o(538)),a=s(o(540)),h=s(o(541)),d=s(o(542)),c=o(113),u=o(116),g=o(124),f=o(130),p=o(539);o(543);var m=o(107),C=o(115);r.default.getSingleton().register("beforeMergeCells"),r.default.getSingleton().register("afterMergeCells"),r.default.getSingleton().register("beforeUnmergeCells"),r.default.getSingleton().register("afterUnmergeCells");const w="mergeCells";t.PLUGIN_KEY=w;t.PLUGIN_PRIORITY=150;const y=new WeakMap,v=w;class E extends n.BasePlugin{static get PLUGIN_KEY(){return w}static get PLUGIN_PRIORITY(){return 150}constructor(e){super(e),y.set(this,{lastDesiredCoords:null}),this.mergedCellsCollection=null,this.autofillCalculations=null,this.selectionCalculations=null}isEnabled(){return!!this.hot.getSettings()[w]}enablePlugin(){var e=this;this.enabled||(this.mergedCellsCollection=new i.default(this),this.autofillCalculations=new a.default(this),this.selectionCalculations=new h.default(this),this.addHook("afterInit",(function(){return e.onAfterInit(...arguments)})),this.addHook("modifyTransformStart",(function(){return e.onModifyTransformStart(...arguments)})),this.addHook("afterModifyTransformStart",(function(){return e.onAfterModifyTransformStart(...arguments)})),this.addHook("modifyTransformEnd",(function(){return e.onModifyTransformEnd(...arguments)})),this.addHook("modifyGetCellCoords",(function(){return e.onModifyGetCellCoords(...arguments)})),this.addHook("beforeSetRangeStart",(function(){return e.onBeforeSetRangeStart(...arguments)})),this.addHook("beforeSetRangeStartOnly",(function(){return e.onBeforeSetRangeStart(...arguments)})),this.addHook("beforeSetRangeEnd",(function(){return e.onBeforeSetRangeEnd(...arguments)})),this.addHook("afterIsMultipleSelection",(function(){return e.onAfterIsMultipleSelection(...arguments)})),this.addHook("afterRenderer",(function(){return e.onAfterRenderer(...arguments)})),this.addHook("afterContextMenuDefaultOptions",(function(){return e.addMergeActionsToContextMenu(...arguments)})),this.addHook("afterGetCellMeta",(function(){return e.onAfterGetCellMeta(...arguments)})),this.addHook("afterViewportRowCalculatorOverride",(function(){return e.onAfterViewportRowCalculatorOverride(...arguments)})),this.addHook("afterViewportColumnCalculatorOverride",(function(){return e.onAfterViewportColumnCalculatorOverride(...arguments)})),this.addHook("modifyAutofillRange",(function(){return e.onModifyAutofillRange(...arguments)})),this.addHook("afterCreateCol",(function(){return e.onAfterCreateCol(...arguments)})),this.addHook("afterRemoveCol",(function(){return e.onAfterRemoveCol(...arguments)})),this.addHook("afterCreateRow",(function(){return e.onAfterCreateRow(...arguments)})),this.addHook("afterRemoveRow",(function(){return e.onAfterRemoveRow(...arguments)})),this.addHook("afterChange",(function(){return e.onAfterChange(...arguments)})),this.addHook("beforeDrawBorders",(function(){return e.onBeforeDrawAreaBorders(...arguments)})),this.addHook("afterDrawSelection",(function(){return e.onAfterDrawSelection(...arguments)})),this.addHook("beforeRemoveCellClassNames",(function(){return e.onBeforeRemoveCellClassNames(...arguments)})),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()[w];this.disablePlugin(),this.enablePlugin(),this.generateFromSettings(e),super.updatePlugin()}ifChromeForceRepaint(){if(!(0,C.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){let t=!0;return!!e&&(l.default.containsNegativeValues(e)?((0,g.warn)(l.default.NEGATIVE_VALUES_WARNING(e)),t=!1):l.default.isOutOfBounds(e,this.hot.countRows(),this.hot.countCols())?((0,g.warn)(l.default.IS_OUT_OF_BOUNDS_WARNING(e)),t=!1):l.default.isSingleCell(e)?((0,g.warn)(l.default.IS_SINGLE_CELL(e)),t=!1):l.default.containsZeroSpan(e)&&((0,g.warn)(l.default.ZERO_SPAN_WARNING(e)),t=!1),t)}generateFromSettings(e){if(Array.isArray(e)){const t=[];if((0,c.arrayEach)(e,(e=>{if(!this.validateSetting(e))return;const o=this.hot._createCellCoords(e.row,e.col),s=this.hot._createCellCoords(e.row+e.rowspan-1,e.col+e.colspan-1),n=this.hot._createCellRange(o,o,s);this.mergeRange(n,!0,!0),(0,f.rangeEach)(e.row,e.row+e.rowspan-1,(o=>{(0,f.rangeEach)(e.col,e.col+e.colspan-1,(s=>{!1==(o===e.row&&s===e.col)&&t.push([o,s,null])}))}))})),0===t.length)return;this.hot.setDataAtCell(t)}}clearCollections(){this.mergedCellsCollection.clear()}canMergeRange(e){return!!(arguments.length>1&&void 0!==arguments[1]&&arguments[1])||this.validateSetting(e)}toggleMergeOnSelection(){const e=this.hot.getSelectedRangeLast();if(!e)return;e.setDirection(this.hot.isRtl()?"NE-SW":"NW-SE");const{from:t,to:o}=e;this.toggleMerge(e),this.hot.selectCell(t.row,t.col,o.row,o.col,!1)}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(),r={row:s.row,col:s.col,rowspan:n.row-s.row+1,colspan:n.col-s.col+1},i=[];let l=null;if(!this.canMergeRange(r,t))return!1;this.hot.runHooks("beforeMergeCells",e,t),(0,f.rangeEach)(0,r.rowspan-1,(e=>{(0,f.rangeEach)(0,r.colspan-1,(t=>{let o=null;i[e]||(i[e]=[]),0===e&&0===t?o=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(r.row),this.hot.toPhysicalColumn(r.col)):this.hot.setCellMeta(r.row+e,r.col+t,"hidden",!0),i[e][t]=o}))})),this.hot.setCellMeta(r.row,r.col,"spanned",!0);return!this.mergedCellsCollection.add(r)||(o?l=[r.row,r.col,i]:this.hot.populateFromArray(r.row,r.col,i,void 0,void 0,this.pluginName),t||this.ifChromeForceRepaint(),this.hot.runHooks("afterMergeCells",e,r,t),l)}unmergeRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=this.mergedCellsCollection.getWithinRange(e);o&&(this.hot.runHooks("beforeUnmergeCells",e,t),(0,c.arrayEach)(o,(e=>{this.mergedCellsCollection.remove(e.row,e.col),(0,f.rangeEach)(0,e.rowspan-1,(t=>{(0,f.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),r=this.hot._createCellCoords(o,s);this.mergeRange(this.hot._createCellRange(n,n,r))}unmerge(e,t,o,s){const n=this.hot._createCellCoords(e,t),r=this.hot._createCellCoords(o,s);this.unmergeRange(this.hot._createCellRange(n,n,r))}onAfterInit(){this.generateFromSettings(this.hot.getSettings()[w]),this.hot.render()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Control","m"]],callback:()=>{this.toggleMerge(this.hot.getSelectedRangeLast()),this.hot.render()},runOnlyIf:e=>!e.altKey,group:v})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(v)}onAfterIsMultipleSelection(e){if(e){const e=this.mergedCellsCollection.mergedCells,t=this.hot.getSelectedRangeLast();for(let o=0;o<e.length;o+=1)if(t.from.row===e[o].row&&t.from.col===e[o].col&&t.to.row===e[o].row+e[o].rowspan-1&&t.to.col===e[o].col+e[o].colspan-1)return!1}return e}onModifyTransformStart(e){const t=y.get(this),o=this.hot.getSelectedRangeLast();let s={row:e.row,col:e.col},n=null;const r=this.hot._createCellCoords(o.highlight.row,o.highlight.col),i=this.mergedCellsCollection.get(r.row,r.col);if(t.lastDesiredCoords||(t.lastDesiredCoords=this.hot._createCellCoords(null,null)),i){const o=this.hot._createCellCoords(i.row,i.col),n=this.hot._createCellCoords(i.row+i.rowspan-1,i.col+i.colspan-1);this.hot._createCellRange(o,o,n).includes(t.lastDesiredCoords)||(t.lastDesiredCoords=this.hot._createCellCoords(null,null)),s.row=t.lastDesiredCoords.row?t.lastDesiredCoords.row-r.row:s.row,s.col=t.lastDesiredCoords.col?t.lastDesiredCoords.col-r.col:s.col,e.row>0?s.row=i.row+i.rowspan-1-r.row+e.row:e.row<0&&(s.row=r.row-i.row+e.row),e.col>0?s.col=i.col+i.colspan-1-r.col+e.col:e.col<0&&(s.col=r.col-i.col+e.col)}n=this.hot._createCellCoords(o.highlight.row+s.row,o.highlight.col+s.col);const l=this.mergedCellsCollection.get(n.row,n.col);if(l){const e=this.mergedCellsCollection.getFirstRenderableCoords(l.row,l.col);t.lastDesiredCoords=n,s={row:e.row-r.row,col:e.col-r.col}}0!==s.row&&(e.row=s.row),0!==s.col&&(e.col=s.col)}onModifyTransformEnd(e){const t=this.hot.getSelectedRangeLast(),o=(0,u.clone)(e),s=this.selectionCalculations.getUpdatedSelectionRange(t,e);let n=(0,u.clone)(o);const r=this.mergedCellsCollection.getWithinRange(s,!0);do{n=(0,u.clone)(o),this.selectionCalculations.getUpdatedSelectionRange(t,o),(0,c.arrayEach)(r,(e=>{this.selectionCalculations.snapDelta(o,t,e)}))}while(o.row!==n.row||o.col!==n.col);e.row=o.row,e.col=o.col}onModifyGetCellCoords(e,t){if(e<0||t<0)return;const o=this.mergedCellsCollection.get(e,t);if(!o)return;const{row:s,col:n,colspan:r,rowspan:i}=o;return[s,n,s+i-1,n+r-1]}addMergeActionsToContextMenu(e){e.items.push({name:"---------"},(0,d.default)(this))}onAfterRenderer(e,t,o){const s=this.mergedCellsCollection.get(t,o),n=(0,u.isObject)(s)?(0,u.clone)(s):void 0;if((0,u.isObject)(n)){const{rowIndexMapper:e,columnIndexMapper:s}=this.hot,{row:r,col:i,colspan:l,rowspan:a}=n,[h,d]=this.translateMergedCellToRenderable(r,a,i,l),c=h-e.getRenderableFromVisualIndex(t)+1,u=d-s.getRenderableFromVisualIndex(o)+1;n.row=e.getNearestNotHiddenIndex(n.row,1),n.col=s.getNearestNotHiddenIndex(n.col,1),n.rowspan=Math.min(n.rowspan,c),n.colspan=Math.min(n.colspan,u)}(0,p.applySpanProperties)(e,n,t,o)}onBeforeSetRangeStart(e){if(this.mergedCellsCollection.isFirstRenderableMergedCell(e.row,e.col)){const t=this.mergedCellsCollection.get(e.row,e.col);[e.row,e.col]=[t.row,t.col]}}onBeforeSetRangeEnd(e){const t=this.hot.getSelectedRangeLast();t.highlight=this.hot._createCellCoords(t.highlight.row,t.highlight.col),t.to=e;let o=!1;if(!this.hot.selection.isSelectedByColumnHeader()&&!this.hot.selection.isSelectedByRowHeader())do{o=!1;for(let s=0;s<this.mergedCellsCollection.mergedCells.length;s+=1){const n=this.mergedCellsCollection.mergedCells[s].getRange();t.expandByRange(n)&&(e.row=t.to.row,e.col=t.to.col,o=!0)}}while(o)}onAfterGetCellMeta(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))}onAfterViewportRowCalculatorOverride(e){const t=this.hot.countCols();this.modifyViewportRowStart(e,t),this.modifyViewportRowEnd(e,t)}modifyViewportRowStart(e,t){const o=this.hot.rowIndexMapper,s=o.getVisualFromRenderableIndex(e.startRow);for(let n=0;n<t;n+=1){const r=this.mergedCellsCollection.get(s,n);if((0,u.isObject)(r)){const s=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(r.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 r=this.mergedCellsCollection.get(s,n);if((0,u.isObject)(r)){const s=r.row+r.rowspan-1,n=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(s,-1));if(n>e.endRow)return e.endRow=n,void this.modifyViewportRowEnd(e,t)}}}onAfterViewportColumnCalculatorOverride(e){const t=this.hot.countRows();this.modifyViewportColumnStart(e,t),this.modifyViewportColumnEnd(e,t)}modifyViewportColumnStart(e,t){const o=this.hot.columnIndexMapper,s=o.getVisualFromRenderableIndex(e.startColumn);for(let n=0;n<t;n+=1){const r=this.mergedCellsCollection.get(n,s);if((0,u.isObject)(r)){const s=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(r.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 r=this.mergedCellsCollection.get(n,s);if((0,u.isObject)(r)){const s=r.col+r.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:r}=this.hot;let i,l;i=0===t?n.getNearestNotHiddenIndex(e,1):n.getNearestNotHiddenIndex(e+t-1,-1),l=0===s?r.getNearestNotHiddenIndex(o,1):r.getNearestNotHiddenIndex(o+s-1,-1);return[e>=0?n.getRenderableFromVisualIndex(i):e,o>=0?r.getRenderableFromVisualIndex(l):o]}onModifyAutofillRange(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.mergedCellsCollection.getWithinRange({from:{row:t[0],col:t[1]},to:{row:t[2],col:t[3]}});return n?(s=this.autofillCalculations.snapDragArea(t,s,o,n),s):s}onAfterCreateCol(e,t){this.mergedCellsCollection.shiftCollections("right",e,t)}onAfterRemoveCol(e,t){this.mergedCellsCollection.shiftCollections("left",e,t)}onAfterCreateRow(e,t,o){"auto"!==o&&this.mergedCellsCollection.shiftCollections("down",e,t)}onAfterRemoveRow(e,t){this.mergedCellsCollection.shiftCollections("up",e,t)}onAfterChange(e,t){"Autofill.fill"===t&&this.autofillCalculations.recreateAfterDataPopulation(e)}onBeforeDrawAreaBorders(e,t){if(t&&"area"===t){const t=this.hot.getSelectedRangeLast(),o=this.mergedCellsCollection.getWithinRange(t);(0,c.arrayEach)(o,(o=>{t.getBottomEndCorner().row===o.getLastRow()&&t.getBottomEndCorner().col===o.getLastColumn()&&(e[2]=o.row,e[3]=o.col)}))}}onAfterModifyTransformStart(e,t,o){if(!this.enabled)return;const s=this.mergedCellsCollection.get(e.row,e.col);if(!s)return;const n=t>0,r=t<0,i=o<0,l=o>0,a=s.row+s.rowspan-1==this.hot.countRows()-1,h=0===s.row,d=s.col+s.colspan-1==this.hot.countCols()-1,c=0===s.col;(n&&a||r&&h||l&&d||i&&c)&&(e.row=s.row,e.col=s.col)}onAfterDrawSelection(e,t,o,s){if(o)return this.selectionCalculations.getSelectedMergedCellClassName(e,t,o,s)}onBeforeRemoveCellClassNames(){return this.selectionCalculations.getSelectedMergedCellClassNameToRemove()}}t.MergeCells=E},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(8);var n=s(o(538)),r=o(130),i=o(124),l=o(113),a=o(539),h=o(112);class d{constructor(e){this.plugin=e,this.mergedCells=[],this.hot=e.hot}static IS_OVERLAPPING_WARNING(e){return h.toSingleLine`The merged cell declared at [${e.row}, ${e.col}], overlaps\x20
|
39
39
|
with the other declared merged cell. The overlapping merged cell was not added to the table, please\x20
|
40
40
|
fix your setup.`}get(e,t){const o=this.mergedCells;let s=!1;return(0,l.arrayEach)(o,(o=>!(o.row<=e&&o.row+o.rowspan-1>=e&&o.col<=t&&o.col+o.colspan-1>=t)||(s=o,!1))),s}getByRange(e){const t=this.mergedCells;let o=!1;return(0,l.arrayEach)(t,(t=>!(t.row<=e.from.row&&t.row+t.rowspan-1>=e.to.row&&t.col<=e.from.col&&t.col+t.colspan-1>=e.to.col)||(o=t,o))),o}getWithinRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=this.mergedCells,s=[];let n=e;if(!n.includesRange){const e=this.hot._createCellCoords(n.from.row,n.from.col),t=this.hot._createCellCoords(n.to.row,n.to.col);n=this.hot._createCellRange(e,e,t)}return(0,l.arrayEach)(o,(e=>{const o=this.hot._createCellCoords(e.row,e.col),r=this.hot._createCellCoords(e.row+e.rowspan-1,e.col+e.colspan-1),i=this.hot._createCellRange(o,o,r);t?n.overlaps(i)&&s.push(e):n.includesRange(i)&&s.push(e)})),!!s.length&&s}add(e){const t=this.mergedCells,o=e.row,s=e.col,r=e.rowspan,l=e.colspan,a=new n.default(o,s,r,l,this.hot._createCellCoords,this.hot._createCellRange),h=this.get(o,s),c=this.isOverlapping(a);return h||c?((0,i.warn)(d.IS_OVERLAPPING_WARNING(a)),!1):(this.hot&&a.normalize(this.hot),t.push(a),a)}remove(e,t){const o=this.mergedCells,s=this.get(e,t),n=s?this.mergedCells.indexOf(s):-1;return!(!s||-1===n)&&(o.splice(n,1),s)}clear(){const e=this.mergedCells,t=[],o=[];(0,l.arrayEach)(e,(e=>{const o=this.hot.getCell(e.row,e.col);o&&t.push([o,this.get(e.row,e.col),e.row,e.col])})),this.mergedCells.length=0,(0,l.arrayEach)(t,((e,s)=>{(0,r.rangeEach)(0,e.rowspan-1,(t=>{(0,r.rangeEach)(0,e.colspan-1,(s=>{if(0!==s||0!==t){const n=this.hot.getCell(e.row+t,e.col+s);n&&o.push([n,null,null,null])}}))})),t[s][1]=null})),(0,l.arrayEach)(t,(e=>{(0,a.applySpanProperties)(...e)})),(0,l.arrayEach)(o,(e=>{(0,a.applySpanProperties)(...e)}))}isOverlapping(e){const t=this.hot._createCellRange(this.hot._createCellCoords(0,0),this.hot._createCellCoords(e.row,e.col),this.hot._createCellCoords(e.row+e.rowspan-1,e.col+e.colspan-1));let o=!1;return(0,l.arrayEach)(this.mergedCells,(e=>!this.hot._createCellRange(this.hot._createCellCoords(0,0),this.hot._createCellCoords(e.row,e.col),this.hot._createCellCoords(e.row+e.rowspan-1,e.col+e.colspan-1)).overlaps(t)||(o=!0,!1))),o}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)}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}(0,l.arrayEach)(this.mergedCells,(e=>{e.shift(s,t)})),(0,r.rangeEachReverse)(this.mergedCells.length-1,0,(e=>{const t=this.mergedCells[e];t&&t.removed&&this.mergedCells.splice(this.mergedCells.indexOf(t),1)}))}}var c=d;t.default=c},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(112);var n=class{constructor(e,t,o,s,n,r){this.row=e,this.col=t,this.rowspan=o,this.colspan=s,this.removed=!1,this.cellCoordsFactory=n,this.cellRangeFactory=r}static NEGATIVE_VALUES_WARNING(e){return s.toSingleLine`The merged cell declared with {row: ${e.row}, col: ${e.col},\x20
|
41
41
|
rowspan: ${e.rowspan}, colspan: ${e.colspan}} contains negative values, which is\x20
|