1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="235278e1-6536-4017-a18f-b02f9f06a874",e._sentryDebugIdIdentifier="sentry-dbid-235278e1-6536-4017-a18f-b02f9f06a874")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6940],{73079:function(module,__unused_webpack_exports,__webpack_require__){if(!jSuites)var jSuites=__webpack_require__(12995);if(!formula)var formula=__webpack_require__(93717);!function(e,t){module.exports=t()}(0,function(){var jspreadsheet;return!function(){"use strict";var __webpack_modules__={805:function(e,t){let n=function(e){let t=this,n=[];for(let l=0;l<e.length;l++){let o=e[l].x,s=e[l].y,r=t.options.columns[o].name?t.options.columns[o].name:o;n[s]||(n[s]={row:s,data:{}}),n[s].data[r]=e[l].value}return n.filter(function(e){return null!=e})},l=function(e,t){let n=this,l=o.call(n.parent,"onbeforesave",n.parent,n,t);if(l)t=l;else if(!1===l)return!1;jSuites.ajax({url:e,method:"POST",dataType:"json",data:{data:JSON.stringify(t)},success:function(e){o.call(n,"onsave",n.parent,n,t)}})},o=function(e){let t=this,o=null,s=t.parent?t.parent:t;if(!s.ignoreEvents&&("function"==typeof s.config.onevent&&(o=s.config.onevent.apply(this,arguments)),"function"==typeof s.config[e]&&(o=s.config[e].apply(this,Array.prototype.slice.call(arguments,1))),"object"==typeof s.plugins)){let e=Object.keys(s.plugins);for(let t=0;t<e.length;t++){let n=e[t],l=s.plugins[n];"function"==typeof l.onevent&&(o=l.onevent.apply(this,arguments))}}if("onafterchanges"==e){let e=arguments;if("object"==typeof s.plugins&&Object.entries(s.plugins).forEach(function([,n]){"function"==typeof n.persistence&&n.persistence(t,"setValue",{data:e[2]})}),t.options.persistence){let e=1==t.options.persistence?t.options.url:t.options.persistence,o=n.call(t,arguments[2]);l.call(t,e,o)}}return o};t.A=o},829:function(e,t,n){n.d(t,{F8:function(){return r},N$:function(){return s},dr:function(){return i}});var l=n(530),o=n(657);let s=function(e){let t=this;if(t.options.filters){e=parseInt(e),t.resetSelection();let n=[];if("checkbox"==t.options.columns[e].type)n.push({id:"true",name:"True"}),n.push({id:"false",name:"False"});else{let l=[],o=!1;for(let n=0;n<t.options.data.length;n++){let s=t.options.data[n][e],r=t.records[n][e].element.innerHTML;s&&r?l[s]=r:o=!0}let s=Object.keys(l);n=[];for(let e=0;e<s.length;e++)n.push({id:s[e],name:l[s[e]]});o&&n.push({value:"",id:"",name:"(Blanks)"})}let l=document.createElement("div");t.filter.children[e+1].innerHTML="",t.filter.children[e+1].appendChild(l),t.filter.children[e+1].style.paddingLeft="0px",t.filter.children[e+1].style.paddingRight="0px",t.filter.children[e+1].style.overflow="initial";let s={data:n,multiple:!0,autocomplete:!0,opened:!0,value:void 0!==t.filters[e]?t.filters[e]:null,width:"100%",position:1==t.options.tableOverflow||1==t.parent.config.fullscreen,onclose:function(n){i.call(t),t.filters[e]=n.dropdown.getValue(!0),t.filter.children[e+1].innerHTML=n.dropdown.getText(),t.filter.children[e+1].style.paddingLeft="",t.filter.children[e+1].style.paddingRight="",t.filter.children[e+1].style.overflow="",r.call(t,e),o.G9.call(t)}};jSuites.dropdown(l,s)}else console.log("Jspreadsheet: filters not enabled.")},r=function(e){let t=this;if(!e)for(let n=0;n<t.filter.children.length;n++)t.filters[n]&&(e=n);let n=function(e,n,l){for(let o=0;o<e.length;o++){let s=""+t.options.data[l][n],r=""+t.records[l][n].element.innerHTML;if(e[o]==s||e[o]==r)return!0}return!1},o=t.filters[e];t.results=[];for(let l=0;l<t.options.data.length;l++)n(o,e,l)&&t.results.push(l);t.results.length||(t.results=null),l.hG.call(t)},i=function(){let e=this;if(e.options.filters)for(let t=0;t<e.filter.children.length;t++)e.filter.children[t].innerHTML=" ",e.filters[t]=null;e.results=null,l.hG.call(e)}},160:function(e,t,n){n.d(t,{e:function(){return o}});var l=n(530);let o=function(e){let t=this;if(e&&(t.options.footers=e),t.options.footers){t.tfoot||(t.tfoot=document.createElement("tfoot"),t.table.appendChild(t.tfoot));for(let e=0;e<t.options.footers.length;e++){let n;if(t.tfoot.children[e])n=t.tfoot.children[e];else{n=document.createElement("tr");let e=document.createElement("td");n.appendChild(e),t.tfoot.appendChild(n)}for(let o=0;o<t.headers.length;o++){let s;if(t.options.footers[e][o]||(t.options.footers[e][o]=""),t.tfoot.children[e].children[o+1])s=t.tfoot.children[e].children[o+1];else{s=document.createElement("td"),n.appendChild(s);let e=t.options.columns[o].align||t.options.defaultColAlign||"center";s.style.textAlign=e}s.textContent=l.$x.call(t,+t.records.length+o,e,t.options.footers[e][o]),s.style.display=t.cols[o].colElement.style.display}}}}},296:function(e,t,n){n.d(t,{w:function(){return l}});let l=function(){let e=this,t=0;if(e.options.freezeColumns>0)for(let n=0;n<e.options.freezeColumns;n++)t+=e.options.columns&&e.options.columns[n]&&void 0!==e.options.columns[n].width?parseInt(e.options.columns[n].width):void 0!==e.options.defaultColWidth?parseInt(e.options.defaultColWidth):100;return t}},978:function(e,t,n){n.r(t),n.d(t,{createFromTable:function(){return p},getCaretIndex:function(){return o}
1,getCellNameFromCoords:function(){return i},getColumnName:function(){return r},getCoordsFromCellName:function(){return a},getCoordsFromRange:function(){return c},invert:function(){return s},parseCSV:function(){return d}});var l=n(689);let o=function(e){let t;t=this.config.root?this.config.root:window;let n=0,l=t.getSelection();if(l&&0!==l.rangeCount){let t=l.getRangeAt(0),o=t.cloneRange();o.selectNodeContents(e),o.setEnd(t.endContainer,t.endOffset),n=o.toString().length}return n},s=function(e){let t=[],n=Object.keys(e);for(let l=0;l<n.length;l++)t[e[n[l]]]=n[l];return t},r=function(e){let t,n=e+1,l="";for(;n>0;)l=String.fromCharCode(65+(t=(n-1)%26)).toString()+l,n=parseInt((n-t)/26);return l},i=function(e,t){return r(parseInt(e))+(parseInt(t)+1)},a=function(e){let t=/^[a-zA-Z]+/.exec(e);if(t){let n=0;for(let e=0;e<t[0].length;e++)n+=parseInt(t[0].charCodeAt(e)-64)*Math.pow(26,t[0].length-1-e);--n<0&&(n=0);let l=parseInt(/[0-9]+$/.exec(e))||null;return l>0&&l--,[n,l]}},c=function(e){let[t,n]=e.split(":");return[...a(t),...a(n)]},d=function(e,t){t=t||",",e=e.replace(/\r?\n$|\r$|\n$/g,"");let n=[],l=!1,o=0,s=0,r=0;for(let i=0;i<e.length;i++){let a=e[i],c=e[i+1];n[s]=n[s]||[],n[s][r]=n[s][r]||"",'"'==a&&l&&'"'==c?(n[s][r]+=a,++i):'"'!=a?a!=t||l?"\r"!=a||"\n"!=c||l?("\n"!=a||l)&&("\r"!=a||l)?n[s][r]+=a:(++s,o=Math.max(o,r),r=0):(++s,o=Math.max(o,r),r=0,++i):++r:l=!l}return n.forEach((e,t)=>{for(let t=e.length;t<=o;t++)e.push("")}),n},p=function(e,t){if("TABLE"==e.tagName){t||(t={}),t.columns=[],t.data=[];let n=e.querySelectorAll("colgroup > col");if(n.length)for(let e=0;e<n.length;e++){let l=n[e].style.width;l||(l=n[e].getAttribute("width")),l&&(t.columns[e]||(t.columns[e]={}),t.columns[e].width=l)}let o=function(e,n){let l=e.getBoundingClientRect(),o=l.width>50?l.width:50;t.columns[n]||(t.columns[n]={}),e.getAttribute("data-celltype")?t.columns[n].type=e.getAttribute("data-celltype"):t.columns[n].type="text",t.columns[n].width=o+"px",t.columns[n].title=e.innerHTML,e.style.textAlign&&(t.columns[n].align=e.style.textAlign),(l=e.getAttribute("name"))&&(t.columns[n].name=l),(l=e.getAttribute("id"))&&(t.columns[n].id=l),(l=e.getAttribute("data-mask"))&&(t.columns[n].mask=l)},s=[],r=e.querySelectorAll(":scope > thead > tr");if(r.length){for(let e=0;e<r.length-1;e++){let t=[];for(let n=0;n<r[e].children.length;n++){let l={title:r[e].children[n].textContent,colspan:r[e].children[n].getAttribute("colspan")||1};t.push(l)}s.push(t)}r=r[r.length-1].children;for(let e=0;e<r.length;e++)o(r[e],e)}let i=0,a={},c={},d={},p={},u=e.querySelectorAll(":scope > tr, :scope > tbody > tr");for(let e=0;e<u.length;e++)if(t.data[i]=[],1!=t.parseTableFirstRowAsHeader||r.length||0!=e){for(let n=0;n<u[e].children.length;n++){let o=u[e].children[n].getAttribute("data-formula");o?"="!=o.substr(0,1)&&(o="="+o):o=u[e].children[n].innerHTML,t.data[i].push(o);let s=(0,l.t3)([n,e]),r=u[e].children[n].getAttribute("class");r&&(p[s]=r);let c=parseInt(u[e].children[n].getAttribute("colspan"))||0,h=parseInt(u[e].children[n].getAttribute("rowspan"))||0;(c||h)&&(a[s]=[c||1,h||1]),u[e].children[n].style&&"none"==u[e].children[n].style.display&&(u[e].children[n].style.display="");let f=u[e].children[n].getAttribute("style");f&&(d[s]=f),u[e].children[n].classList.contains("styleBold")&&(d[s]?d[s]+="; font-weight:bold;":d[s]="font-weight:bold;")}u[e].style&&u[e].style.height&&(c[e]={height:u[e].style.height}),i++}else for(let t=0;t<u[e].children.length;t++)o(u[e].children[t],t);if(Object.keys(s).length>0&&(t.nestedHeaders=s),Object.keys(d).length>0&&(t.style=d),Object.keys(a).length>0&&(t.mergeCells=a),Object.keys(c).length>0&&(t.rows=c),Object.keys(p).length>0&&(t.classes=p),(u=e.querySelectorAll("tfoot tr")).length){let e=[];for(let t=0;t<u.length;t++){let n=[];for(let e=0;e<u[t].children.length;e++)n.push(u[t].children[e].textContent);e.push(n)}Object.keys(e).length>0&&(t.footers=e)}if(1==t.parseTableAutoCellType){let e=[];for(let n=0;n<t.columns.length;n++){let l=!0,o=!0;e[n]=[];for(let s=0;s<t.data.length;s++){let r=t.data[s][n];e[n][r]||(e[n][r]=0),e[n][r]++,r.length>25&&(l=!1),10==r.length&&"-"==r.substr(4,1)&&"-"==r.substr(7,1)||(o=!1)}let s=Object.keys(e[n]).length;o?t.columns[n].type="calendar":1==l&&s>1&&s<=parseInt(.1*t.data.length)&&(t.columns[n].type="dropdown",t.columns[n].source=Object.keys(e[n]))}}return t}console.log("Element is not a table")}},911:function(e,t,n){n.d(t,{Dh:function(){return c},ZS:function(){return h},tN:function(){return u}});
1var l=n(805),o=n(689),s=n(530),r=n(910),i=n(94),a=n(657);let c=function(e){let t=this;if(1!=t.ignoreHistory){let n=++t.historyIndex;t.history=t.history=t.history.slice(0,n+1),t.history[n]=e}},d=function(e,t){let n=this,l=t.insertBefore?+t.rowNumber:t.rowNumber+1;if(1==n.options.search&&n.results&&n.results.length!=n.rows.length&&n.resetSearch(),1==e){let e=t.numOfRows;for(let t=l;t<e+l;t++)n.rows[t].element.parentNode.removeChild(n.rows[t].element);n.records.splice(l,e),n.options.data.splice(l,e),n.rows.splice(l,e),a.at.call(n,1,l,e+l-1)}else{let e=t.rowRecords.map(e=>[...e]);n.records=(0,o.Hh)(n.records,l,e);let s=t.rowData.map(e=>[...e]);n.options.data=(0,o.Hh)(n.options.data,l,s),n.rows=(0,o.Hh)(n.rows,l,t.rowNode);let r=0;for(let e=l;e<t.numOfRows+l;e++)n.tbody.insertBefore(t.rowNode[r].element,n.tbody.children[e]),r++}for(let e=l;e<n.rows.length;e++)n.rows[e].y=e;for(let e=l;e<n.records.length;e++)for(let t=0;t<n.records[e].length;t++)n.records[e][t].y=e;n.options.pagination>0&&n.page(n.pageNumber),s.o8.call(n)},p=function(e,t){let n=this,l=t.insertBefore?t.columnNumber:t.columnNumber+1;if(1==e){let e=t.numOfColumns;n.options.columns.splice(l,e);for(let t=l;t<e+l;t++)n.headers[t].parentNode.removeChild(n.headers[t]),n.cols[t].colElement.parentNode.removeChild(n.cols[t].colElement);n.headers.splice(l,e),n.cols.splice(l,e);for(let o=0;o<t.data.length;o++){for(let t=l;t<e+l;t++)n.records[o][t].element.parentNode.removeChild(n.records[o][t].element);n.records[o].splice(l,e),n.options.data[o].splice(l,e)}if(n.options.footers)for(let t=0;t<n.options.footers.length;t++)n.options.footers[t].splice(l,e)}else{n.options.columns=(0,o.Hh)(n.options.columns,l,t.columns),n.headers=(0,o.Hh)(n.headers,l,t.headers),n.cols=(0,o.Hh)(n.cols,l,t.cols);let e=0;for(let o=l;o<t.numOfColumns+l;o++)n.headerContainer.insertBefore(t.headers[e],n.headerContainer.children[o+1]),n.colgroupContainer.insertBefore(t.cols[e].colElement,n.colgroupContainer.children[o+1]),e++;for(let e=0;e<t.data.length;e++){n.options.data[e]=(0,o.Hh)(n.options.data[e],l,t.data[e]),n.records[e]=(0,o.Hh)(n.records[e],l,t.records[e]);let s=0;for(let o=l;o<t.numOfColumns+l;
vendor: 5,803 bytes, line 1
1o++)n.rows[e].element.insertBefore(t.records[e][s].element,n.rows[e].element.children[o+1]),s++}if(n.options.footers)for(let e=0;e<n.options.footers.length;e++)n.options.footers[e]=(0,o.Hh)(n.options.footers[e],l,t.footers[e])}for(let e=l;e<n.cols.length;e++)n.cols[e].x=e;for(let e=0;e<n.records.length;e++)for(let t=l;t<n.records[e].length;t++)n.records[e][t].x=t;if(n.options.nestedHeaders&&n.options.nestedHeaders.length>0&&n.options.nestedHeaders[0]&&n.options.nestedHeaders[0][0])for(let l=0;l<n.options.nestedHeaders.length;l++){let o;o=1==e?parseInt(n.options.nestedHeaders[l][n.options.nestedHeaders[l].length-1].colspan)-t.numOfColumns:parseInt(n.options.nestedHeaders[l][n.options.nestedHeaders[l].length-1].colspan)+t.numOfColumns,n.options.nestedHeaders[l][n.options.nestedHeaders[l].length-1].colspan=o,n.thead.children[l].children[n.thead.children[l].children.length-1].setAttribute("colspan",o)}s.o8.call(n)},u=function(){let e,t=this,n=!!t.parent.ignoreEvents,o=!!t.ignoreHistory;t.parent.ignoreEvents=!0,t.ignoreHistory=!0;let s=[];if(t.historyIndex>=0){if("insertRow"==(e=t.history[t.historyIndex--]).action)d.call(t,1,e);else if("deleteRow"==e.action)d.call(t,0,e);else if("insertColumn"==e.action)p.call(t,1,e);else if("deleteColumn"==e.action)p.call(t,0,e);else if("moveRow"==e.action)t.moveRow(e.newValue,e.oldValue);else if("moveColumn"==e.action)t.moveColumn(e.newValue,e.oldValue);else if("setMerge"==e.action)t.removeMerge(e.column,e.data);else if("setStyle"==e.action)t.setStyle(e.oldValue,null,null,1);else if("setWidth"==e.action)t.setWidth(e.column,e.oldValue);else if("setHeight"==e.action)t.setHeight(e.row,e.oldValue);else if("setHeader"==e.action)t.setHeader(e.column,e.oldValue);else if("setComments"==e.action)t.setComments(e.oldValue);else if("orderBy"==e.action){let n=[];for(let t=0;t<e.rows.length;t++)n[e.rows[t]]=t;i.Th.call(t,e.column,+!e.order),i.iY.call(t,n)}else if("setValue"==e.action){for(let n=0;n<e.records.length;n++)s.push({x:e.records[n].x,y:e.records[n].y,value:e.records[n].oldValue}),e.oldStyle&&t.resetStyle(e.oldStyle);t.setValue(s),e.selection&&t.updateSelectionFromCoords(e.selection[0],e.selection[1],e.selection[2],e.selection[3])}}t.parent.ignoreEvents=n,t.ignoreHistory=o,l.A.call(t,"onundo",t,e)},h=function(){let e,t=this,n=!!t.parent.ignoreEvents,o=!!t.ignoreHistory;if(t.parent.ignoreEvents=!0,t.ignoreHistory=!0,t.historyIndex<t.history.length-1){if("insertRow"==(e=t.history[++t.historyIndex]).action)d.call(t,0,e);else if("deleteRow"==e.action)d.call(t,1,e);else if("insertColumn"==e.action)p.call(t,0,e);else if("deleteColumn"==e.action)p.call(t,1,e);else if("moveRow"==e.action)t.moveRow(e.oldValue,e.newValue);else if("moveColumn"==e.action)t.moveColumn(e.oldValue,e.newValue);else if("setMerge"==e.action)r.FU.call(t,e.column,e.colspan,e.rowspan,1);else if("setStyle"==e.action)t.setStyle(e.newValue,null,null,1);else if("setWidth"==e.action)t.setWidth(e.column,e.newValue);else if("setHeight"==e.action)t.setHeight(e.row,e.newValue);else if("setHeader"==e.action)t.setHeader(e.column,e.newValue);else if("setComments"==e.action)t.setComments(e.newValue);else if("orderBy"==e.action)i.Th.call(t,e.column,e.order),i.iY.call(t,e.rows);else if("setValue"==e.action){t.setValue(e.records);for(let n=0;n<e.records.length;n++)e.oldStyle&&t.resetStyle(e.newStyle);e.selection&&t.updateSelectionFromCoords(e.selection[0],e.selection[1],e.selection[2],e.selection[3])}}t.parent.ignoreEvents=n,t.ignoreHistory=o,l.A.call(t,"onredo",t,e)}},530:function(__unused_webpack_module,__nested_webpack_exports__,__nested_webpack_require_15476__){__nested_webpack_require_15476__.d(__nested_webpack_exports__,{$O:function(){return getWorksheetActive},$x:function(){return parseValue},C6:function(){return showIndex},Em:function(){return executeFormula},P9:function(){return createCell},Rs:function(){return updateScroll},TI:function(){return hideIndex},Xr:function(){return getCellFromCoords},Y5:function(){return fullscreen},am:function(){return updateTable},dw:function(){return isFormula},eN:function(){return getWorksheetInstance},hG:function(){return updateResult},ju:function(){return createNestedHeader},k9:function(){return updateCell},o8:function(){return updateTableReferences},p9:function(){return getLabel},rS:function(){return getMask},tT:function(){return getCell},xF:function(){return updateFormulaChain},yB:function(){return updateFormula}});var _dispatch_js__WEBPACK_IMPORTED_MODULE_3__=__nested_webpack_require_15476__(805),_selection_js__WEBPACK_IMPORTED_MODULE_1__=__nested_webpack_require_15476__(657),_helpers_js__WEBPACK_IMPORTED_MODULE_4__=__nested_webpack_require_15476__(978),_meta_js__WEBPACK_IMPORTED_MODULE_5__=__nested_webpack_require_15476__(654),_freeze_js__WEBPACK_IMPORTED_MODULE_6__=__nested_webpack_require_15476__(296),_pagination_js__WEBPACK_IMPORTED_MODULE_7__=__nested_webpack_require_15476__(167),_footer_js__WEBPACK_IMPORTED_MODULE_0__=__nested_webpack_require_15476__(160),_internalHelpers_js__WEBPACK_IMPORTED_MODULE_2__=__nested_webpack_require_15476__(689);let updateTable=function(){let e=this;if(e.options.minSpareRows>0){let t=0;for(let n=e.rows.length-1;n>=0;n--){let l=!1;for(let t=0;t<e.headers.length;t++)e.options.data[n][t]&&(l=!0);if(l)break;t++}e.options.minSpareRows-t>0&&e.insertRow(e.options.minSpareRows-t)}if(e.options.minSpareCols>0){let t=0;for(let n=e.headers.length-1;n>=0;n--){let l=!1;for(let t=0;t<e.rows.length;t++)e.options.data[t][n]&&(l=!0);if(l)break;t++}e.options.minSpareCols-t>0&&e.insertColumn(e.options.minSpareCols-t)}e.options.footers&&_footer_js__WEBPACK_IMPORTED_MODULE_0__.e.call(e),setTimeout(function(){_selection_js__WEBPACK_IMPORTED_MODULE_1__.Aq.call(e)},0)},parseNumber=function(e,t){let n=t&&this.options.columns[t].decimal?this.options.columns[t].decimal
1:".",l=""+e;return(l=l.split(n))[0]=l[0].match(/[+-]?[0-9]/g),l[0]&&(l[0]=l[0].join("")),l[1]&&(l[1]=l[1].match(/[0-9]*/g).join("")),l[0]&&Number.isInteger(Number(l[0]))?l[1]?Number(l[0]+"."+l[1]):Number(l[0]+".00"):null},executeFormula=function(expression,x,y){let obj=this,formulaResults=[],formulaLoopProtection=[],execute=function(expression,x,y){let parentId=(0,_internalHelpers_js__WEBPACK_IMPORTED_MODULE_2__.t3)([x,y]);if(formulaLoopProtection[parentId])return console.error("Reference loop detected"),"#ERROR";formulaLoopProtection[parentId]=!0;let tokensUpdate=function(e){for(let t=0;t<e.length;t++){let n,l,o,s,r=[],i=e[t].split(":"),a=(0,_internalHelpers_js__WEBPACK_IMPORTED_MODULE_2__.vu)(i[0],!0),c=(0,_internalHelpers_js__WEBPACK_IMPORTED_MODULE_2__.vu)(i[1],!0);a[0]<=c[0]?(n=a[0],l=c[0]):(n=c[0],l=a[0]),a[1]<=c[1]?(o=a[1],s=c[1]):(o=c[1],s=a[1]);for(let e=o;e<=s;e++)for(let t=n;t<=l;t++)r.push((0,_internalHelpers_js__WEBPACK_IMPORTED_MODULE_2__.t3)([t,e]));expression=expression.replace(e[t],r.join(","))}};expression=expression.replace(/\$?([A-Z]+)\$?([0-9]+)/g,"$1$2");let tokens=expression.match(/([A-Z]+[0-9]+)\:([A-Z]+[0-9]+)/g);if(tokens&&tokens.length&&tokensUpdate(tokens),tokens=expression.match(/([A-Z]+[0-9]+)/g),tokens&&tokens.indexOf(parentId)>-1)return console.error("Self Reference detected"),"#ERROR";{let res,formulaExpressions={};if(tokens){for(let i=0;i<tokens.length;i++)if(obj.formula[tokens[i]]||(obj.formula[tokens[i]]=[]),0>obj.formula[tokens[i]].indexOf(parentId)&&obj.formula[tokens[i]].push(parentId),eval("typeof("+tokens[i]+') == "undefined"')){let t,e=(0,_internalHelpers_js__WEBPACK_IMPORTED_MODULE_2__.vu)(tokens[i],1);if("="==(""+(t=void 0!==obj.options.data[e[1]]&&void 0!==obj.options.data[e[1]][e[0]]?obj.options.data[e[1]][e[0]]:"")).substr(0,1)&&(void 0!==formulaResults[tokens[i]]?t=formulaResults[tokens[i]]:(t=execute(t,e[0],e[1]),formulaResults[tokens[i]]=t)),""==(""+t).trim())formulaExpressions[tokens[i]]=null;else if(t==Number(t)&&0!=obj.parent.config.autoCasting)formulaExpressions[tokens[i]]=Number(t);else{let s=parseNumber.call(obj,t,e[0]);0!=obj.parent.config.autoCasting&&s?formulaExpressions[tokens[i]]=s:formulaExpressions[tokens[i]]='"'+t+'"'}}}let ret=_dispatch_js__WEBPACK_IMPORTED_MODULE_3__.A.call(obj,"onbeforeformula",obj,expression,x,y);if(!1===ret)return expression;ret&&(expression=ret);try{res=formula(expression.substr(1),formulaExpressions,x,y,obj),"function"==typeof res&&(res="#ERROR")}catch(e){res="#ERROR",!0===obj.parent.config.debugFormulas&&console.log(expression.substr(1),formulaExpressions,e)}return res}};return execute(expression,x,y)},parseValue=function(e,t,n,l){let o=this;"="==(""+n).substr(0,1)&&0!=o.parent.config.parseFormulas&&(n=executeFormula.call(o,n,e,t));let s=o.options.columns&&o.options.columns[e];if(s&&!isFormula(n)){let e=null;if(e=getMask(s)){n&&n==Number(n)&&(n=Number(n));let t=jSuites.mask.render(n,e,!0);if(l&&e.mask){let o=e.mask.split(";");o[1]&&(o[1].match(RegExp("\\[Red\\]","gi"))&&(n<0?l.classList.add("red"):l.classList.remove("red")),o[1].match(RegExp("\\(","gi"))&&n<0&&(t="("+t+")"))}t&&(n=t)}}return n},getDropDownValue=function(e,t){let n=this,l=[];if(n.options.columns&&n.options.columns[e]&&n.options.columns[e].source){let o=[],s=n.options.columns[e].source;for(let e=0;e<s.length;e++)"object"==typeof s[e]?o[s[e].id]=s[e].name:o[s[e]]=s[e];let r=Array.isArray(t)?t:(""+t).split(";");for(let e=0;e<r.length;e++)"object"==typeof r[e]?l.push(o[r[e].id]):o[r[e]]&&l.push(o[r[e]])}else console.error("Invalid column");return l.length>0?l.join("; "):""},validDate=function(e){return"-"==(e=""+e).substr(4,1)&&"-"==e.substr(7,1)||4==(e=e.split("-"))[0].length&&e[0]==Number(e[0])&&2==e[1].length&&e[1]==Number(e[1])},stripScript=function(e){let t=new Option;t.innerHTML=e;let n=null;for(e=t.getElementsByTagName("script");n=e[0];)n.parentNode.removeChild(n);return t.innerHTML},createCell=function(e,t,n){let l=this,o=document.createElement("td");if(o.setAttribute("data-x",e),o.setAttribute("data-y",t),"none"===l.headers[e].style.display&&(o.style.display="none"),"="==(""+n).substr(0,1)&&1==l.options.secureFormulas){let e=secureFormula(n);e!=n&&(n=e)}if(l.options.columns&&l.options.columns[e]&&"object"==typeof l.options.columns[e].type)!0===l.parent.config.parseHTML?o.innerHTML=n:o.textContent=n,"function"==typeof l.options.columns[e].type.createCell&&l.options.columns[e].type.createCell(o,n,parseInt(e),parseInt(t),l,l.options.columns[e]);else if(l.options.columns&&l.options.columns[e]&&"hidden"==l.options.columns[e].type)o.style.display="none",o.textContent=n;else if(l.options.columns&&l.options.columns[e]&&("checkbox"==l.options.columns[e].type||"radio"==l.options.columns[e].type)){let s=document.createElement("input");s.type=l.options.columns[e].type,s.name="c"+e,s.checked=1==n||1==n||"true"==n,s.onclick=function(){l.
vendor: 19,171 bytes, line 1
1setValue(o,this.checked)},1!=l.options.columns[e].readOnly&&0!=l.options.editable||s.setAttribute("disabled","disabled"),o.appendChild(s),l.options.data[t][e]=s.checked}else if(l.options.columns&&l.options.columns[e]&&"calendar"==l.options.columns[e].type){let t=null;if(!validDate(n)){let o=jSuites.calendar.extractDateFromString(n,l.options.columns[e].options&&l.options.columns[e].options.format||"YYYY-MM-DD");o&&(t=o)}o.textContent=jSuites.calendar.getDateString(t||n,l.options.columns[e].options&&l.options.columns[e].options.format)}else if(l.options.columns&&l.options.columns[e]&&"dropdown"==l.options.columns[e].type)o.classList.add("jss_dropdown"),o.textContent=getDropDownValue.call(l,e,n);else if(l.options.columns&&l.options.columns[e]&&"color"==l.options.columns[e].type)if("square"==l.options.columns[e].render){let e=document.createElement("div");e.className="color",e.style.backgroundColor=n,o.appendChild(e)}else o.style.color=n,o.textContent=n;else if(l.options.columns&&l.options.columns[e]&&"image"==l.options.columns[e].type){if(n&&"data:image"==n.substr(0,10)){let e=document.createElement("img");e.src=n,o.appendChild(e)}}else l.options.columns&&l.options.columns[e]&&"html"==l.options.columns[e].type||!0===l.parent.config.parseHTML?o.innerHTML=stripScript(parseValue.call(this,e,t,n,o)):o.textContent=parseValue.call(this,e,t,n,o);l.options.columns&&l.options.columns[e]&&1==l.options.columns[e].readOnly&&(o.className="readonly");let s=l.options.columns&&l.options.columns[e]&&l.options.columns[e].align||l.options.defaultColAlign||"center";return o.style.textAlign=s,l.options.columns&&l.options.columns[e]&&0==l.options.columns[e].wordWrap||!(1==l.options.wordWrap||l.options.columns&&l.options.columns[e]&&1==l.options.columns[e].wordWrap||o.innerHTML.length>200)||(o.style.whiteSpace="pre-wrap"),e>0&&1==this.options.textOverflow&&(n||o.innerHTML?l.records[t][e-1].element.style.overflow="hidden":e==l.options.columns.length-1&&(o.style.overflow="hidden")),_dispatch_js__WEBPACK_IMPORTED_MODULE_3__.A.call(l,"oncreatecell",l,o,e,t,n),o},updateCell=function(e,t,n,l){let o,s=this;if(1!=s.records[t][e].element.classList.contains("readonly")||l){if("="==(""+n).substr(0,1)&&1==s.options.secureFormulas){let e=secureFormula(n);e!=n&&(n=e)}let l=_dispatch_js__WEBPACK_IMPORTED_MODULE_3__.A.call(s,"onbeforechange",s,s.records[t][e].element,e,t,n);if(null!=l&&(n=l),s.options.columns&&s.options.columns[e]&&"object"==typeof s.options.columns[e].type&&"function"==typeof s.options.columns[e].type.updateCell){let l=s.options.columns[e].type.updateCell(s.records[t][e].element,n,parseInt(e),parseInt(t),s,s.options.columns[e]);void 0!==l&&(n=l)}o={x:e,y:t,col:e,row:t,value:n,oldValue:s.options.data[t][e]};let r=s.options.columns&&s.options.columns[e]&&"object"==typeof s.options.columns[e].type?s.options.columns[e].type:null;if(r)s.options.data[t][e]=n,"function"==typeof r.setValue&&r.setValue(s.records[t][e].element,n);else if(s.options.columns&&s.options.columns[e]&&("checkbox"==s.options.columns[e].type||"radio"==s.options.columns[e].type)){if("radio"==s.options.columns[e].type)for(let t=0;t<s.options.data.length;t++)s.options.data[t][e]=!1;s.records[t][e].element.children[0].checked=1==n||1==n||"true"==n||"TRUE"==n,s.options.data[t][e]=s.records[t][e].element.children[0].checked}else if(s.options.columns&&s.options.columns[e]&&"dropdown"==s.options.columns[e].type)s.options.data[t][e]=n,s.records[t][e].element.textContent=getDropDownValue.call(s,e,n);else if(s.options.columns&&s.options.columns[e]&&"calendar"==s.options.columns[e].type){let l=null;if(!validDate(n)){let t=jSuites.calendar.extractDateFromString(n,s.options.columns[e].options&&s.options.columns[e].options.format||"YYYY-MM-DD");t&&(l=t)}s.options.data[t][e]=n,s.records[t][e].element.textContent=jSuites.calendar.getDateString(l||n,s.options.columns[e].options&&s.options.columns[e].options.format)}else if(s.options.columns&&s.options.columns[e]&&"color"==s.options.columns[e].type)if(s.options.data[t][e]=n,"square"==s.options.columns[e].render){let l=document.createElement("div");l.className="color",l.style.backgroundColor=n,s.records[t][e].element.textContent="",s.records[t][e].element.appendChild(l)}else s.records[t][e].element.style.color=n,s.records[t][e].element.textContent=n;else if(s.options.columns&&s.options.columns[e]&&"image"==s.options.columns[e].type){if(n=""+n,s.options.data[t][e]=n,s.records[t][e].element.innerHTML="",n&&"data:image"==n.substr(0,10)){let l=document.createElement("img");l.src=n,s.records[t][e].element.appendChild(l)}}else s.options.data[t][e]=n,s.options.columns&&s.options.columns[e]&&"html"==s.options.columns[e].type?s.records[t][e].element.innerHTML=stripScript(parseValue.call(s,e,t,n)):!0===s.parent.config.parseHTML?s.records[t][e].element.innerHTML=stripScript(parseValue.call(s,e,t,n,s.records[t][e].element)):s.records[t][e].element.textContent=parseValue.call(s,e,t,n,s.records[t][e].element),s.options.columns&&s.options.columns[e]&&0==s.options.columns[e].wordWrap||!(1==s.options.wordWrap||s.options.columns&&s.options.columns[e]&&1==s.options.columns[e].wordWrap||s.records[t][e].element.innerHTML.length>200)?s.records[t][e].element.style.whiteSpace="":s.records[t][e].element.style.whiteSpace="pre-wrap";e>0&&(s.records[t][e-1].element.style.overflow=n?"hidden":""),s.options.columns&&s.options.columns[e]&&"function"==typeof s.options.columns[e].render&&s.options.columns[e].render(s.records[t]&&s.records[t][e]?s.records[t][e].element:null,n,parseInt(e),parseInt(t),s,s.options.columns[e]),_dispatch_js__WEBPACK_IMPORTED_MODULE_3__.A.call(s,"onchange",s,s.records[t]&&s.records[t][e]?s.records[t][e].element:null,e,t,n,o.oldValue)}else o={x:e,y:t,col:e,row:t};return o},isFormula=function(e){let t=(""+e)[0];return"="==t||"#"==t},getMask=function(e){if(e.format||e.mask||e.locale){let t={};return e.mask?t.mask=e.mask:e.format?t.mask=e.format:(t.locale=e.locale,t.options=e.options),e.decimal&&(t.options||(t.options={}),t.options={decimal:e.decimal}),t}return null},secureFormula=function(e){let t="",n=0;for(let l=0;l<e.length;l++)'"'==e[l]&&(n=+(0==n)),t+=1==n?e[l]:e[l].toUpperCase();return t},chainLoopProtection=[],updateFormulaChain=function(e,t,n){let l=this,o=(0,_internalHelpers_js__WEBPACK_IMPORTED_MODULE_2__.t3)([e,t]);if(l.formula[o]&&l.formula[o].length>0)if(chainLoopProtection[o])l.records[t][e].element.innerHTML="#ERROR",l.formula[o]="";else{chainLoopProtection[o]=!0;for(let e=0;e<l.formula[o].length;e++){let t=(0,_internalHelpers_js__WEBPACK_IMPORTED_MODULE_2__.vu)(l.formula[o][e],!0),s=""+l.options.data[t[1]][t[0]];"="==s.substr(0,1)?n.push(updateCell.call(l,t[0],t[1],s,!0)):Object.keys(l.formula)[e]=null,updateFormulaChain.call(l,t[0],t[1],n)}}chainLoopProtection=[]},updateFormula=function(e,t){let n=/[A-Z]/,l=/[0-9]/,o="",s=null,r=null,i="";for(let a=0;a<e.length;a++)n.exec(e[a])?(s=1,r=0,i+=e[a]):l.exec(e[a])?(r=+!!s,i+=e[a]):(s&&r&&(i=t[i]?t[i]:i),o+=i,o+=e[a],s=0,r=0,i="");return i&&(s&&r&&(i=t[i]?t[i]:i),o+=i),o},updateFormulas=function(e){let t=this;for(let n=0;n<t.options.data.length;n++)for(let l=0;l<t.options.data[0].length;l++){let o=""+t.options.data[n][l];if("="==o.substr(0,1)){let s=updateFormula(o,e);s!=o&&(t.options.data[n][l]=s)}}let n=[],l=Object.keys(t.formula);for(let o=0;o<l.length;o++){let s=l[o],r=t.formula[s];e[s]&&(s=e[s]),n[s]=[];for(let t=0;t<r.length;t++){let l=r[t];e[l]&&(l=e[l]),n[s].push(l)}}t.formula=n},updateTableReferences=function(){let e=this;if(e.skipUpdateTableReferences)return;for(let t=0;t<e.headers.length;t++)e.headers[t].getAttribute("data-x")!=t&&(e.headers[t].setAttribute("data-x",t),e.headers[t].getAttribute("title")||(e.headers[t].innerHTML=(0,_helpers_js__WEBPACK_IMPORTED_MODULE_4__.getColumnName)(t)));for(let t=0;t<e.rows.length;t++)e.rows[t]&&e.rows[t].element.getAttribute("data-y")!=t&&(e.rows[t].element.setAttribute("data-y",t),e.rows[t].element.children[0].setAttribute("data-y",t),e.rows[t].element.children[0].innerHTML=t+1);let t=[],n=[],l=function(n,l,o,s){if(n!=o&&e.records[s][o].element.setAttribute("data-x",o),l!=s&&e.records[s][o].element.setAttribute("data-y",s),n!=o||l!=s){let e=(0,_internalHelpers_js__WEBPACK_IMPORTED_MODULE_2__.t3)([n,l]),r=(0,_internalHelpers_js__WEBPACK_IMPORTED_MODULE_2__.t3)([o,s]);t[e]=r}};for(let t=0;t<e.records.length;t++)for(let o=0;o<e.records[0].length;o++)if(e.records[t][o]){let s=e.records[t][o].element.getAttribute("data-x"),r=e.records[t][o].element.getAttribute("data-y");if(e.records[t][o].element.getAttribute("data-merged")){let e=(0,_internalHelpers_js__WEBPACK_IMPORTED_MODULE_2__.t3)([s,r]),l=(0,_internalHelpers_js__WEBPACK_IMPORTED_MODULE_2__.t3)([o,t]);if(null==n[e])if(e==l)n[e]=!1;else{let i=parseInt(o-s),a=parseInt(t-r);n[e]=[l,i,a]}}else l(s,r,o,t)}let o=Object.keys(n);if(o.length){for(let t=0;t<o.length;t++)if(n[o[t]]){let s=(0,_internalHelpers_js__WEBPACK_IMPORTED_MODULE_2__.vu)(o[t],!0),r=s[0],i=s[1];l(r,i,r+n[o[t]][1],i+n[o[t]][2]);let a=o[t],c=n[o[t]][0];for(let l=0;l<e.options.mergeCells[a][2].length;l++)r=parseInt(e.options.mergeCells[a][2][l].getAttribute("data-x")),i=parseInt(e.options.mergeCells[a][2][l].getAttribute("data-y")),e.options.mergeCells[a][2][l].setAttribute("data-x",r+n[o[t]][1]),e.options.mergeCells[a][2][l].setAttribute("data-y",i+n[o[t]][2]);e.options.mergeCells[c]=e.options.mergeCells[a],delete e.options.mergeCells[a]}}updateFormulas.call(e,t),_meta_js__WEBPACK_IMPORTED_MODULE_5__.hs.call(e,t),_selection_js__WEBPACK_IMPORTED_MODULE_1__.G9.call(e),updateTable.call(e)},updateScroll=function(e){let t,n,l=this,o=l.content.getBoundingClientRect(),s=o.left,r=o.top,i=o.width,a=o.height,c=l.records[l.selectedCell[3]][l.selectedCell[2]].element.getBoundingClientRect(),d=c.left,p=c.top,u=c.width,h=c.height;0==e||1==e?(t=d-s+l.content.scrollLeft,n=p-r+l.content.scrollTop-2):(t=d-s+l.content.scrollLeft+u,n=p-r+l.content.scrollTop+h),n>l.content.scrollTop+30&&n<l.content.scrollTop+a||(n<l.content.scrollTop+30?l.content.scrollTop=n-h:l.content.scrollTop=n-(a-2));let f=_freeze_js__WEBPACK_IMPORTED_MODULE_6__.w.call(l);t>l.content.scrollLeft+f&&t<l.content.scrollLeft+i||(t<l.content.scrollLeft+30?(l.content.scrollLeft=t,l.content.scrollLeft<50&&(l.content.scrollLeft=0)):t<l.content.scrollLeft+f?l.content.scrollLeft=t-f-1:l.content.scrollLeft=t-(i-20))},updateResult=function(){let e=this,t=0,n=0;for(t=1==e.options.lazyLoading?100:e.options.pagination>0?e.options.pagination:e.results?e.results.length:e.rows.length;e.tbody.firstChild;)e.tbody.removeChild(e.tbody.firstChild);for(let l=0;l<e.rows.length;l++)!e.results||e.results.indexOf(l)>-1?(n<t&&(e.tbody.appendChild(e.rows[l].element),n++),e.rows[l].element.style.display=""):e.rows[l].element.style.display="none";return e.options.pagination>0&&_pagination_js__WEBPACK_IMPORTED_MODULE_7__.IV.call(e),_selection_js__WEBPACK_IMPORTED_MODULE_1__.Aq.call(e),t},getCell=function(e,t){if("string"==typeof e){let n=(0,_internalHelpers_js__WEBPACK_IMPORTED_MODULE_2__.vu)(e,!0);e=n[0],t=n[1]}return this.records[t][e].element},getCellFromCoords=function(e,t){return this.records[t][e].element},getLabel=function(e,t){if("string"==typeof e){let n=(0,_internalHelpers_js__WEBPACK_IMPORTED_MODULE_2__.vu)(e,!0);e=n[0],t=n[1]}return this.records[t][e].element.innerHTML},fullscreen=function(e){let t=this;null==e&&(e=!t.config.fullscreen),t.config.fullscreen!=e&&(t.config.fullscreen=e,1==e?t.element.classList.add("fullscreen"):t.element.classList.remove("fullscreen"))},showIndex=function(){this.table.classList.remove("jss_hidden_index")},hideIndex=function(){this.table.classList.add("jss_hidden_index")},createNestedHeader=function(e){let t=this,n=document.createElement("tr");n.classList.add("jss_nested");let l=document.createElement("td");l.classList.add("jss_selectall"),n.appendChild(l),e.element=n;let o=0;for(let l=0;l<e.length;l++){e[l].colspan||(e[l].colspan=1),e[l].title||(e[l].title=""),e[l].id||(e[l].id="");let s=e[l].colspan,r=[];for(let e=0;e<s;e++)t.options.columns[o]&&"hidden"==t.options.columns[o].type&&s++,r.push(o),o++;let i=document.createElement("td");i.setAttribute("data-column",r.join(",")),i.setAttribute("colspan",e[l].colspan),i.setAttribute("align",e[l].align||"center"),i.setAttribute("id",e[l].id),i.textContent=e[l].title,n.appendChild(i)}return n},getWorksheetActive=function(){let e=this.parent?this.parent:this;return e.element.tabs?e.element.tabs.getActive():0},getWorksheetInstance=function(e){let t=void 0!==e?e:getWorksheetActive.call(this);return this.worksheets[t]}},689:function(e,t,n){n.d(t,{Hh:function(){return o},t3:function(){return r},vu:function(){return s}});var l=n(978);let o=function(e,t,n){if(t<=e.length)return e.slice(0,t).concat(n).concat(e.slice(t));let l=e.slice(0,e.length);for(;t>l.length;)l.push(void 0);return l.concat(n)},s=function(e,t){let n=/^[a-zA-Z]+/.exec(e);if(n){let l=0;for(let e=0;e<n[0].length;e++)l+=parseInt(n[0].charCodeAt(e)-64)*Math.pow(26,n[0].length-1-e);--l<0&&(l=0);let o=parseInt(/[0-9]+$/.exec(e));o>0&&o--,e=1==t?[l,o]:l+"-"+o}return e},r=function(e){return Array.isArray(e)||(e=e.split("-")),(0,l.getColumnName)(parseInt(e[0]))+(parseInt(e[1])+1)}},497:function(e,t,n){n.d(t,{AG:function(){return o},G_:function(){return s},p6:function(){return r},wu:function(){return l}});let l=function(e){let t,n=this;t=(1==n.options.search||1==n.options.filters)&&n.results?n.results:n.rows;let l=100;null!=e&&-1!=e||(e=Math.ceil(t.length/l)-1);let o=e*l,s=e*l+l;s>t.length&&(s=t.length),(o=s-100)<0&&(o=0);for(let e=o;e<s;e++)(1==n.options.search||1==n.options.filters)&&n.results?n.tbody.appendChild(n.rows[t[e]].element):n.tbody.appendChild(n.rows[e].element),n.tbody.children.length>l&&n.tbody.removeChild(n.tbody.firstChild)},o=function(){let e=this;if(e.selectedCell){let t=parseInt(e.tbody.firstChild.getAttribute("data-y"))/100,n=parseInt(e.selectedCell[3]/100),l=parseInt(e.rows.length/100);if(t!=n&&n<=l&&!Array.prototype.indexOf.call(e.tbody.children,e.rows[e.selectedCell[3]].element))return e.loadPage(n),!0}return!1},s=function(){let e,t=this;e=(1==t.options.search||1==t.options.filters)&&t.results?t.results:t.rows;let n=0;if(e.length>100){let l=parseInt(t.tbody.firstChild.getAttribute("data-y"));if((1==t.options.search||1==t.options.filters)&&t.results&&(l=e.indexOf(l)),l>0)for(let o=0;o<30;o++)(l-=1)>-1&&((1==t.options.search||1==t.options.filters)&&t.results?t.tbody.insertBefore(t.rows[e[l]].element,t.tbody.firstChild):t.tbody.insertBefore(t.rows[l].element,t.tbody.firstChild),t.tbody.children.length>100&&(t.tbody.removeChild(t.tbody.lastChild),n=1))}return n},r=function(){let e,t=this;e=(1==t.options.search||1==t.options.filters)&&t.results?t.results:t.rows;let n=0;if(e.length>100){let l=parseInt(t.tbody.lastChild.getAttribute("data-y"));if((1==t.options.search||1==t.options.filters)&&t.results&&(l=e.indexOf(l)),l<t.rows.length-1)for(let o=0;o<=30;o++)l<e.length&&((1==t.options.search||1==t.options.filters)&&t.results?t.tbody.appendChild(t.rows[e[l]].element):t.tbody.appendChild(t.rows[l].element),t.tbody.children.length>100&&(t.tbody.removeChild(t.tbody.firstChild),n=1)),l+=1}return n}},910:function(e,t,n){n.d(t,{D0:function(){return c},FU:function(){return p},Lt:function(){return a},VP:function(){return h},Zp:function(){return u},fd:function(){return d}});var l=n(689),o=n(530),s=n(911),r=n(805),i=n(657);let a=function(e,t){let n=this,o=[];if(n.options.mergeCells){let s=Object.keys(n.options.mergeCells);for(let r=0;r<s.length;r++){let i=(0,l.vu)(s[r],!0),a=n.options.mergeCells[s[r]][0],c=i[0],d=i[0]+(a>1?a-1:0);null==t?c<=e&&d>=e&&o.push(s[r]):t?c<e&&d>=e&&o.push(s[r]):c<=e&&d>e&&o.push(s[r])}}return o},c=function(e,t){let n=this,o=[];if(n.options.mergeCells){let s=Object.keys(n.options.mergeCells);for(let r=0;r<s.length;r++){let i=(0,l.vu)(s[r],!0),a=n.options.mergeCells[s[r]][1],c=i[1],d=i[1]+(a>1?a-1:0);null==t?c<=e&&d>=e&&o.push(s[r]):t?c<e&&d>=e&&o.push(s[r]):c<=e&&d>e&&o.push(s[r])}}return o},d=function(e){let t=this,n={};if(e)n=t.options.mergeCells&&t.options.mergeCells[e]?[t.options.mergeCells[e][0],t.options.mergeCells[e][1]]:null;else if(t.options.mergeCells){t.options.mergeCells;let e=Object.keys(t.options.mergeCells);for(let l=0;l<e.length;l++)n[e[l]]=[t.options.mergeCells[e[l]][0],t.options.mergeCells[e[l]][1]]}return n},p=function(e,t,n,a){let c=this,d=!1;if(e){if("string"!=typeof e)return null}else{if(!c.highlighted.length)return alert(jSuites.translate("No cells selected")),null;{let o=parseInt(c.highlighted[0].getAttribute("data-x")),s=parseInt(c.highlighted[0].getAttribute("data-y")),r=parseInt(c.highlighted[c.highlighted.length-1].getAttribute("data-x")),i=parseInt(c.highlighted[c.highlighted.length-1].getAttribute("data-y"));e=(0,l.t3)([o,s]),t=r-o+1,n=i-s+1}}let p=(0,l.vu)(e,!0);if(c.options.mergeCells&&c.options.mergeCells[e])c.records[p[1]][p[0]].element.getAttribute("data-merged")&&(d="Cell already merged");else if((!t||t<2)&&(!n||n<2))d="Invalid merged properties";else for(let e=p[1];e<p[1]+n;e++)for(let n=p[0];n<p[0]+t;n++)(0,l.t3)([n,e]),c.records[e][n].element.getAttribute("data-merged")&&(d="There is a conflict with another merged cell");if(d)alert(jSuites.translate(d));else{t>1?c.records[p[1]][p[0]].element.setAttribute("colspan",t):t=1,n>1?c.records[p[1]][p[0]].element.setAttribute("rowspan",n):n=1,c.options.mergeCells||(c.options.mergeCells={}),c.options.mergeCells[e]=[t,n,[]],c.records[p[1]][p[0]].element.setAttribute("data-merged","true"),c.records[p[1]][p[0]].element.style.overflow="hidden";let l=[];for(let s=p[1];s<p[1]+n;s++)for(let n=p[0];n<p[0]+t;n++)p[0]==n&&p[1]==s||(l.push(c.options.data[s][n]),o.k9.call(c,n,s,"",!0),c.options.mergeCells[e][2].push(c.records[s][n].element),c.records[s][n].element.style.display="none",c.records[s][n].element=c.records[p[1]][p[0]].element);i.c6.call(c,c.records[p[1]][p[0]].element),a||(s.Dh.call(c,{action:"setMerge",column:e,colspan:t,rowspan:n,data:l}),r.A.call(c,"onmerge",c,{[e]:[t,n]}))}},u=function(e,t,n){let s=this;if(s.options.mergeCells&&s.options.mergeCells[e]){let r=(0,l.vu)(e,!0);s.records[r[1]][r[0]].element.removeAttribute("colspan"),s.records[r[1]][r[0]].element.removeAttribute("rowspan"),s.records[r[1]][r[0]].element.removeAttribute("data-merged");let a=s.options.mergeCells[e],c,d,p=0;for(c=0;c<a[1];c++)for(d=0;d<a[0];d++)(c>0||d>0)&&(s.records[r[1]+c][r[0]+d].element=a[2][p],s.records[r[1]+c][r[0]+d].element.style.display="",t&&t[p]&&o.k9.call(s,r[0]+d,r[1]+c,t[p]),p++);i.c6.call(s,s.records[r[1]][r[0]].element,s.records[r[1]+c-1][r[0]+d-1].element),n||delete s.options.mergeCells[e]}},h=function(e){let t=this;if(t.options.mergeCells){t.options.mergeCells;let n=Object.keys(t.options.mergeCells);for(let l=0;l<n.length;l++)u.call(t,n[l],null,e)}}},654:function(e,t,n){n.d(t,{IQ:function(){return o},hs:function(){return s},iZ:function(){return r}});var l=n(805);let o=function(e,t){let n=this;return e?t?n.options.meta&&n.options.meta[e]&&n.options.meta[e][t]?n.options.meta[e][t]:null:n.options.meta&&n.options.meta[e]?n.options.meta[e]:null:n.options.meta},s=function(e){let t=this;if(t.options.meta){let n={},l=Object.keys(t.options.meta);for(let o=0;o<l.length;
1o++)e[l[o]]?n[e[l[o]]]=t.options.meta[l[o]]:n[l[o]]=t.options.meta[l[o]];t.options.meta=n}},r=function(e,t,n){let o=this;if(o.options.meta||(o.options.meta={}),t&&n)o.options.meta[e]||(o.options.meta[e]={}),o.options.meta[e][t]=n,l.A.call(o,"onchangemeta",o,{[e]:{[t]:n}});else{let t=Object.keys(e);for(let n=0;n<t.length;n++){o.options.meta[t[n]]||(o.options.meta[t[n]]={});let l=Object.keys(e[t[n]]);for(let s=0;s<l.length;s++)o.options.meta[t[n]][l[s]]=e[t[n]][l[s]]}l.A.call(o,"onchangemeta",o,e)}}},94:function(e,t,n){n.d(t,{My:function(){return d},Th:function(){return a},iY:function(){return c}});var l=n(911),o=n(805),s=n(530),r=n(497),i=n(829);let a=function(e,t){let n=this;for(let e=0;e<n.headers.length;e++)n.headers[e].classList.remove("arrow-up"),n.headers[e].classList.remove("arrow-down");t?n.headers[e].classList.add("arrow-up"):n.headers[e].classList.add("arrow-down")},c=function(e){let t=this,n=[];for(let l=0;l<e.length;l++)n[l]=t.options.data[e[l]];t.options.data=n,n=[];for(let l=0;l<e.length;l++){n[l]=t.records[e[l]];for(let e=0;e<n[l].length;e++)n[l][e].y=l}t.records=n,n=[];for(let l=0;l<e.length;l++)n[l]=t.rows[e[l]],n[l].y=l;if(t.rows=n,s.o8.call(t),t.results&&t.results.length)t.searchInput.value?t.search(t.searchInput.value):i.F8.call(t);else if(t.results=null,t.pageNumber=0,t.options.pagination>0)t.page(0);else if(1==t.options.lazyLoading)r.wu.call(t,0);else for(let e=0;e<t.rows.length;e++)t.tbody.appendChild(t.rows[e].element)},d=function(e,t){let n=this;if(e>=0){if(n.options.mergeCells&&Object.keys(n.options.mergeCells).length>0){if(!confirm(jSuites.translate("This action will destroy any existing merged cells. Are you sure?")))return!1;n.destroyMerge()}t=null==t?+!!n.headers[e].classList.contains("arrow-down"):+!!t;let s=[];if(n.options.columns&&n.options.columns[e]&&("number"==n.options.columns[e].type||"numeric"==n.options.columns[e].type||"percentage"==n.options.columns[e].type||"autonumber"==n.options.columns[e].type||"color"==n.options.columns[e].type))for(let t=0;t<n.options.data.length;t++)s[t]=[t,Number(n.options.data[t][e])];else if(n.options.columns&&n.options.columns[e]&&("calendar"==n.options.columns[e].type||"checkbox"==n.options.columns[e].type||"radio"==n.options.columns[e].type))for(let t=0;t<n.options.data.length;t++)s[t]=[t,n.options.data[t][e]];else for(let t=0;t<n.options.data.length;t++)s[t]=[t,n.records[t][e].element.textContent.toLowerCase()];"function"!=typeof n.parent.config.sorting&&(n.parent.config.sorting=function(e){return function(t,n){let l=t[1],o=n[1];return e?""===l&&""!==o?1:""!==l&&""===o||l>o?-1:+(l<o):""===l&&""!==o?1:""!==l&&""===o?-1:l>o?1:l<o?-1:0}}),s=s.sort(n.parent.config.sorting(t));let r=[];for(let e=0;e<s.length;e++)r[e]=s[e][0];return l.Dh.call(n,{action:"orderBy",rows:r,column:e,order:t}),a.call(n,e,t),c.call(n,r),o.A.call(n,"onsort",n,e,t,r.map(e=>e)),!0}}},167:function(e,t,n){n.d(t,{$f:function(){return a},IV:function(){return r},MY:function(){return i},ho:function(){return s}});var l=n(805),o=n(657);let s=function(e){let t=this;return(1==t.options.search||1==t.options.filters)&&t.results&&(e=t.results.indexOf(e)),Math.ceil((parseInt(e)+1)/parseInt(t.options.pagination))-1},r=function(){let e=this;if(e.pagination.children[0].innerHTML="",e.pagination.children[1].innerHTML="",e.options.pagination){let t;if(t=(1==e.options.search||1==e.options.filters)&&e.results?e.results.length:e.rows.length){let n,l,o=Math.ceil(t/e.options.pagination);if(e.pageNumber<6?(n=1,l=o<10?o:10):o-e.pageNumber<5?(n=o-9,l=o,n<1&&(n=1)):(n=e.pageNumber-4,l=e.pageNumber+5),n>1){let t=document.createElement("div");t.className="jss_page",t.innerHTML="<",t.title=1,e.pagination.children[1].appendChild(t)}for(let t=n;t<=l;t++){let n=document.createElement("div");n.className="jss_page",n.innerHTML=t,e.pagination.children[1].appendChild(n),e.pageNumber==t-1&&n.classList.add("jss_page_selected")}if(l<o){let t=document.createElement("div");t.className="jss_page",t.innerHTML=">",t.title=o,e.pagination.children[1].appendChild(t)}let s=function(e){let t=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,n){return void 0!==t[n]?t[n]:e})};e.pagination.children[0].innerHTML=s(jSuites.translate("Showing page {0} of {1} entries"),e.pageNumber+1,o)}else e.pagination.children[0].innerHTML=jSuites.translate("No records foun
1d")}},i=function(e){let t,n=this,s=n.pageNumber;t=(1==n.options.search||1==n.options.filters)&&n.results?n.results:n.rows;let i=parseInt(n.options.pagination);null!=e&&-1!=e||(e=Math.ceil(t.length/i)-1),n.pageNumber=e;let a=e*i,c=e*i+i;for(c>t.length&&(c=t.length),a<0&&(a=0);n.tbody.firstChild;)n.tbody.removeChild(n.tbody.firstChild);for(let e=a;e<c;e++)(1==n.options.search||1==n.options.filters)&&n.results?n.tbody.appendChild(n.rows[t[e]].element):n.tbody.appendChild(n.rows[e].element);n.options.pagination>0&&r.call(n),o.Aq.call(n),l.A.call(n,"onchangepage",n,e,s,n.options.pagination)},a=function(){let e=this;return Math.ceil(((1==e.options.search||1==e.options.filters)&&e.results?e.results.length:e.rows.length)/e.options.pagination)}},657:function(e,t,n){n.d(t,{AH:function(){return f},Aq:function(){return d},G9:function(){return g},Jg:function(){return m},Lo:function(){return x},R5:function(){return v},Ub:function(){return A},at:function(){return w},c6:function(){return u},eO:function(){return I},ef:function(){return L},gE:function(){return p},gG:function(){return y},kA:function(){return h},kF:function(){return C},kV:function(){return E},sp:function(){return k},tW:function(){return j}});var l=n(805),o=n(296),s=n(978),r=n(911),i=n(530),a=n(689),c=n(392);let d=function(){let e=this;if(e.highlighted&&e.highlighted.length){let t=e.highlighted[e.highlighted.length-1].element,n=t.getAttribute("data-x"),l=e.content.getBoundingClientRect(),s=l.left,r=l.top,i=t.getBoundingClientRect(),a=i.left,c=i.top,d=i.width,p=i.height,u=a-s+e.content.scrollLeft+d-4,h=c-r+e.content.scrollTop+p-4;if(e.corner.style.top=h+"px",e.corner.style.left=u+"px",e.options.freezeColumns){let t=o.w.call(e);n>e.options.freezeColumns-1&&a-s+d<t?e.corner.style.display="none":0!=e.options.selectionCopy&&(e.corner.style.display="")}else 0!=e.options.selectionCopy&&(e.corner.style.display="")}else e.corner.style.top="-2000px",e.corner.style.left="-2000px";(0,c.nK)(e)},p=function(e){let t,n=this;if(n.highlighted&&n.highlighted.length){t=1;for(let e=0;e<n.highlighted.length;e++){let t,l;n.highlighted[e].element.classList.remove("highlight"),n.highlighted[e].element.classList.remove("highlight-left"),n.highlighted[e].element.classList.remove("highlight-right"),n.highlighted[e].element.classList.remove("highlight-top"),n.highlighted[e].element.classList.remove("highlight-bottom"),n.highlighted[e].element.classList.remove("highlight-selected");let o=parseInt(n.highlighted[e].element.getAttribute("data-x")),s=parseInt(n.highlighted[e].element.getAttribute("data-y"));if(n.highlighted[e].element.getAttribute("data-merged")){let r=parseInt(n.highlighted[e].element.getAttribute("colspan")),i=parseInt(n.highlighted[e].element.getAttribute("rowspan"));t=r>0?o+(r-1):o,l=i>0?s+(i-1):s}else t=o,l=s;for(let e=o;e<=t;e++)n.headers[e]&&n.headers[e].classList.remove("selected");for(let e=s;e<=l;e++)n.rows[e]&&n.rows[e].element.classList.remove("selected")}}else t=0;return n.highlighted=[],n.selectedCell=null,n.corner.style.top="-2000px",n.corner.style.left="-2000px",1==e&&1==t&&l.A.call(n,"onblur",n),t},u=function(e,t,n){let l,o,s=e.getAttribute("data-x"),r=e.getAttribute("data-y");t?(l=t.getAttribute("data-x"),o=t.getAttribute("data-y")):(l=s,o=r),f.call(this,s,r,l,o,n)},h=function(){let e=document.querySelectorAll(".jss_worksheet .copying");for(let t=0;t<e.length;t++)e[t].classList.remove("copying"),e[t].classList.remove("copying-left"),e[t].classList.remove("copying-right"),e[t].classList.remove("copying-top"),e[t].classList.remove("copying-bottom")},f=function(e,t,n,o,s){let r=this;if(null==t){if(t=0,o=r.rows.length-1,null==e)return}else null==e&&(e=0,n=r.options.data[0].length-1);null==n&&(n=e),null==o&&(o=t),e>=r.headers.length&&(e=r.headers.length-1),t>=r.rows.length&&(t=r.rows.length-1),n>=r.headers.length&&(n=r.headers.length-1),o>=r.rows.length&&(o=r.rows.length-1);let i,a,c,p,u=null,f=null,m=null,g=null;parseInt(e)<parseInt(n)?(i=parseInt(e),a=parseInt(n)):(i=parseInt(n),a=parseInt(e)),parseInt(t)<parseInt(o)?(c=parseInt(t),p=parseInt(o)):(c=parseInt(o),p=parseInt(t));for(let e=i;e<=a;e++)for(let t=c;t<=p;t++)if(r.records[t][e]&&r.records[t][e].element.getAttribute("data-merged")){let n=parseInt(r.records[t][e].element.getAttribute("data-x")),l=parseInt(r.records[t][e].element.getAttribute("data-y")),o=parseInt(r.records[t][e].element.getAttribute("colspan")),s=parseInt(r.records[t][e].element.getAttribute("rowspan"));o>1&&(n<i&&(i=n),n+o>a&&(a=n+o-1)),s&&(l<c&&(c=l),l+s>p&&(p=l+s-1))}for(let e=c;e<=p;e++)"none"!=r.rows[e].element.style.display&&(null==m&&(m=e),g=e);for(let e=i;e<=a;e++)for(let t=c;t<=p;t++)r.options.columns&&r.options.columns[e]&&"hidden"==r.options.columns[e].type||(null==u&&(u=e),f=e);if(u||(u=0),f||(f=0),!1===l.A.call(r,"onbeforeselection",r,u,m,f,g,s))return!1;let y=r.resetSelection();r.selectedCell=[e,t,n,o],r.records[t][e]&&r.records[t][e].element.classList.add("highlight-selected");for(let e=i;e<=a;e++)for(let t=c;t<=p;t++)"none"!=r.rows[t].element.style.display&&"none"!=r.records[t][e].element.style.display&&(r.records[t][e].element.classList.add("highlight"),r.highlighted.push(r.records[t][e]));for(let e=u;e<=f;e++)r.options.columns&&r.options.columns[e]&&"hidden"==r.options.columns[e].type||!r.cols[e].colElement.style||"none"==r.cols[e].colElement.style.display||(r.records[m]&&r.records[m][e]&&r.records[m][e].element.classList.add("highlight-top"),r.records[g]&&r.records[g][e]&&r.records[g][e].element.classList.add("highlight-bottom"),r.headers[e].classList.add("selected"));for(let e=m;e<=g;e++)r.rows[e]&&"none"!=r.rows[e].element.style.display&&(r.records[e][u].element.classList.add("highlight-left"),r.records[e][f].element.classList.add("highlight-right"),r.rows[e].element.classList.add("selected"));r.selectedContainer=[u,m,f,g],0==y&&(l.A.call(r,"onfocus",r),h()),l.A.call(r,"onselection",r,u,m,f,g,s),d.call(r)},m=function(e){let t=this;if(!t.selectedCell)return[];let n=[];for(let l=Math.min(t.selectedCell[0],t.selectedCell[2]);l<=Math.max(t.selectedCell[0],t.selectedCell[2]);l++)e&&"none"==t.headers[l].style.display||n.push(l);return n},g=function(){let e=this;e.selectedCell&&e.updateSelectionFromCoords(e.selectedCell[0],e.selectedCell[1],e.selectedCell[2],e.selectedCell[3])},y=function(){let e=this;for(let t=0;t<e.selection.length;t++)e.selection[t].classList.remove("selection"),e.selection[t].classList.remove("selection-left"),e.selection[t].classList.remove("selection-right"),e.selection[t].classList.remove("selection-top"),e.selection[t].classList.remove("selection-bottom");e.selection=[]},b=function(e){return 1==(e=""+e).length&&(e="0"+e),e},C=function(e,t){let n=this,o=n.getData(!0,!1),s=n.selectedContainer,c=parseInt(e.getAttribute("data-x")),d=parseInt(e.getAttribute("data-y")),p=parseInt(t.getAttribute("data-x")),u=parseInt(t.getAttribute("data-y")),h=[],f,m,g=!1;s[0]==c?(f=d<s[1]?d-s[1]:1,m=0):(m=c<s[0]?c-s[0]:1,f=0);let y=0,C=0;for(let e=d;e<=u;e++)if(!n.rows[e]||"none"!=n.rows[e].element.style.display){null==o[C]&&(C=0),y=0,s[0]!=c&&(m=c<s[0]?c-s[0]:1);for(let t=c;t<=p;t++){if(n.records[e][t]&&!n.records[e][t].element.classList.contains("readonly")&&"none"!=n.records[e][t].element.style.display&&0==g){if(!n.selection.length&&""!=n.options.data[e][t]){g=!0;continue}(null==o[C]||null==o[C][y])&&(y=0);let l=o[C][y];if(l&&!o[1]&&0!=n.parent.config.autoIncrement){if(n.options.columns&&n.options.columns[t]&&(!n.options.columns[t].type||"text"==n.options.columns[t].type||"number"==n.options.columns[t].type))if("="==(""+l).substr(0,1)){let e=l.match(/([A-Z]+[0-9]+)/g);if(e){let t=[];for(let n=0;n<e.length;n++){let l=(0,a.vu)(e[n],1);l[0]+=m,l[1]+=f,l[1]<0&&(l[1]=0);let o=(0,a.t3)([l[0],l[1]]);o!=e[n]&&(t[e[n]]=o)}t&&(l=(0,i.yB)(l,t))}}else l==Number(l)&&(l=Number(l)+f);else if(n.options.columns&&n.options.columns[t]&&"calendar"==n.options.columns[t].type){let e=new Date(l);e.setDate(e.getDate()+f),l=e.getFullYear()+"-"+b(parseInt(e.getMonth()+1))+"-"+b(e.getDate())+" 00:00:00"}}h.push(i.k9.call(n,t,e,l)),i.xF.call(n,t,e,h)}y++,s[0]!=c&&m++}C++,f++}
1r.Dh.call(n,{action:"setValue",records:h,selection:n.selectedCell}),i.am.call(n);let j=h.map(function(e){return{x:e.x,y:e.y,value:e.value,oldValue:e.oldValue}});l.A.call(n,"onafterchanges",n,j)},j=function(e){let t,n=0;if(!e||0===e.length)return n;for(t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t)|0;return n},w=function(e,t,n){let l=this;if(1==e){if(l.selectedCell&&(t>=l.selectedCell[1]&&t<=l.selectedCell[3]||n>=l.selectedCell[1]&&n<=l.selectedCell[3]))return void l.resetSelection()}else if(l.selectedCell&&(t>=l.selectedCell[0]&&t<=l.selectedCell[2]||n>=l.selectedCell[0]&&n<=l.selectedCell[2]))return void l.resetSelection()},v=function(e){let t=this;if(!t.selectedCell)return[];let n=[];for(let l=Math.min(t.selectedCell[1],t.selectedCell[3]);l<=Math.max(t.selectedCell[1],t.selectedCell[3]);l++)e&&"none"==t.rows[l].element.style.display||n.push(l);return n},A=function(){let e=this;e.selectedCell||(e.selectedCell=[]),e.selectedCell[0]=0,e.selectedCell[1]=0,e.selectedCell[2]=e.headers.length-1,e.selectedCell[3]=e.records.length-1,e.updateSelectionFromCoords(e.selectedCell[0],e.selectedCell[1],e.selectedCell[2],e.selectedCell[3])},x=function(){let e=this;return e.selectedCell?[Math.min(e.selectedCell[0],e.selectedCell[2]),Math.min(e.selectedCell[1],e.selectedCell[3]),Math.max(e.selectedCell[0],e.selectedCell[2]),Math.max(e.selectedCell[1],e.selectedCell[3])]:null},L=function(e){let t=this,n=x.call(t);if(!n)return[];let l=[];for(let o=n[1];o<=n[3];o++)for(let r=n[0];r<=n[2];r++)e?l.push((0,s.getCellNameFromCoords)(r,o)):l.push(t.records[o][r]);return l},I=function(){let e=this,t=x.call(e);if(!t)return"";let n=(0,s.getCellNameFromCoords)(t[0],t[1]),l=(0,s.getCellNameFromCoords)(t[2],t[3]);return n===l?e.options.worksheetName+"!"+n:e.options.worksheetName+"!"+n+":"+l},k=function(e,t){let n=x.call(this);return e>=n[0]&&e<=n[2]&&t>=n[1]&&t<=n[3]},E=function(){let e=x.call(this);return e?[e]:[]}},392:function(e,t,n){n.d(t,{Ar:function(){return p},ll:function(){return d},nK:function(){return c}});var l=n(978),o=n(530);let s=function(e,t){0!=t.options.editable?e.classList.remove("jtoolbar-disabled"):e.classList.add("jtoolbar-disabled")},r=function(){let e=[],t=this,n=function(){return o.eN.call(t)};e.push({content:"undo",onclick:function(){n().undo()}}),e.push({content:"redo",onclick:function(){n().redo()}}),e.push({content:"save",onclick:function(){let e=n();e&&e.download()}}),e.push({type:"divisor"}),e.push({type:"select",width:"120px",options:["Default","Verdana","Arial","Courier New"],render:function(e){return'<span style="font-family:'+e+'">'+e+"</span>"},onchange:function(e,t,l,o,s){let r=n(),i=r.getSelected(!0);if(i){let e=s?o:"";r.setStyle(Object.fromEntries(i.map(function(t){return[t,"font-family: "+e]})))}},updateState:function(e,t,l){s(l,n())}}),e.push({type:"select",width:"48px",content:"format_size",options:["x-small","small","medium","large","x-large"],render:function(e){return'<span style="font-size:'+e+'">'+e+"</span>"},onchange:function(e,t,l,o){let s=n(),r=s.getSelected(!0);r&&s.setStyle(Object.fromEntries(r.map(function(e){return[e,"font-size: "+o]})))},updateState:function(e,t,l){s(l,n())}}),e.push({type:"select",options:["left","center","right","justify"],render:function(e){return'<i class="material-icons">format_align_'+e+"</i>"},onchange:function(e,t,l,o){let s=n(),r=s.getSelected(!0);r&&s.setStyle(Object.fromEntries(r.map(function(e){return[e,"text-align: "+o]})))},updateState:function(e,t,l){s(l,n())}}),e.push({content:"format_bold",onclick:function(e,t,l){let o=n(),s=o.getSelected(!0);s&&o.setStyle(Object.fromEntries(s.map(function(e){return[e,"font-weight:bold"]})))},updateState:function(e,t,l){s(l,n())}}),e.push({type:"color",content:"format_color_text",k:"color",updateState:function(e,t,l){s(l,n())}}),e.push({type:"color",content:"format_color_fill",k:"background-color",updateState:function(e,t,l,o){s(l,n())}});let r=["top","middle","bottom"];return e.push({type:"select",options:["vertical_align_top","vertical_align_center","vertical_align_bottom"],render:function(e){return'<i class="material-icons">'+e+"</i>"},value:1,onchange:function(e,t,l,o,s){let i=n(),a=i.getSelected(!0);a&&i.setStyle(Object.fromEntries(a.map(function(e){return[e,"vertical-align: "+r[s]]})))},updateState:function(e,t,l){s(l,n())}}),e.push({content:"web",tooltip:jSuites.translate("Merge the selected cells"),onclick:function(){let e=n();if(e.selectedCell&&confirm(jSuites.translate("The merged cells will retain the value of the top-left cell only. Are you sure?"))){let t=[Math.min(e.selectedCell[0],e.selectedCell[2]),Math.min(e.selectedCell[1],e.selectedCell[3]),Math.max(e.selectedCell[0],e.selectedCell[2]),Math.max(e.selectedCell[1],e.selectedCell[3])],n=(0,l.getCellNameFromCo
vendor: 8,319 bytes, line 1
1ords)(t[0],t[1]);if(e.records[t[1]][t[0]].element.getAttribute("data-merged"))e.removeMerge(n);else{let l=t[2]-t[0]+1,o=t[3]-t[1]+1;1===l&&1===o||e.setMerge(n,l,o)}}},updateState:function(e,t,l){s(l,n())}}),e.push({type:"select",options:["border_all","border_outer","border_inner","border_horizontal","border_vertical","border_left","border_top","border_right","border_bottom","border_clear"],columns:5,render:function(e){return'<i class="material-icons">'+e+"</i>"},right:!0,onchange:function(e,t,o,s){let r=n();if(r.selectedCell){let e=[Math.min(r.selectedCell[0],r.selectedCell[2]),Math.min(r.selectedCell[1],r.selectedCell[3]),Math.max(r.selectedCell[0],r.selectedCell[2]),Math.max(r.selectedCell[1],r.selectedCell[3])],n=s;if(e){let o=t.thickness||1,s=t.color||"black",i=t.style||"solid";"double"===i&&(o+=2);let a={},c=e[0],d=e[1],p=e[2],u=e[3],h=function(e,t,l){let r=["","","",""];r[0]=("border_top"===n||"border_outer"===n)&&l===d||("border_inner"===n||"border_horizontal"===n)&&l>d||"border_all"===n?"border-top: "+o+"px "+i+" "+s:"border-top: ",r[1]="border_all"!==n&&"border_right"!==n&&"border_outer"!==n||t!==p?"border-right: ":"border-right: "+o+"px "+i+" "+s,r[2]="border_all"!==n&&"border_bottom"!==n&&"border_outer"!==n||l!==u?"border-bottom: ":"border-bottom: "+o+"px "+i+" "+s,r[3]=("border_left"===n||"border_outer"===n)&&t===c||("border_inner"===n||"border_vertical"===n)&&t>c||"border_all"===n?"border-left: "+o+"px "+i+" "+s:"border-left: ",a[e]=r.join(";")};for(let t=e[1];t<=e[3];t++)for(let n=e[0];n<=e[2];n++)h((0,l.getCellNameFromCoords)(n,t),n,t),r.records[t][n].element.getAttribute("data-merged")&&h((0,l.getCellNameFromCoords)(e[0],e[1]),n,t);Object.keys(a)&&r.setStyle(a)}}},onload:function(e,t){let n=document.createElement("div"),l=document.createElement("div");n.appendChild(l);let o=jSuites.color(l,{closeOnChange:!1,onchange:function(e,n){e.parentNode.children[1].style.color=n,t.color=n}}),s=document.createElement("i");s.classList.add("material-icons"),s.innerHTML="color_lens",s.onclick=function(){o.open()},n.appendChild(s),e.children[1].appendChild(n),l=document.createElement("div"),jSuites.picker(l,{type:"select",data:[1,2,3,4,5],render:function(e){return'<div style="height: '+e+'px; width: 30px; background-color: black;"></div>'},onchange:function(e,n,l,o){t.thickness=o},width:"50px"}),e.children[1].appendChild(l);let r=document.createElement("div");jSuites.picker(r,{type:"select",data:["solid","dotted","dashed","double"],render:function(e){return"double"===e?'<div style="width: 30px; border-top: 3px '+e+' black;"></div>':'<div style="width: 30px; border-top: 2px '+e+' black;"></div>'},onchange:function(e,n,l,o){t.style=o},width:"50px"}),e.children[1].appendChild(r),(l=document.createElement("div")).style.flex="1",e.children[1].appendChild(l)},updateState:function(e,t,l){s(l,n())}}),e.push({type:"divisor"}),e.push({content:"fullscreen",tooltip:"Toggle Fullscreen",onclick:function(e,n,l){"fullscreen"===l.children[0].textContent?(t.fullscreen(!0),l.children[0].textContent="fullscreen_exit"):(t.fullscreen(!1),l.children[0].textContent="fullscreen")},updateState:function(e,t,n,l){!0===l.parent.config.fullscreen?n.children[0].textContent="fullscreen_exit":n.children[0].textContent="fullscreen"}}),e},i=function(e){let t=this,n=e.items;for(let e=0;e<n.length;e++)n[e].tooltip&&(n[e].title=n[e].tooltip,delete n[e].tooltip),"select"==n[e].type?n[e].options?(n[e].data=n[e].options,delete n[e].options):(n[e].data=n[e].v,delete n[e].v,n[e].k&&!n[e].onchange&&(n[e].onchange=function(l,s,r){let i=o.eN.call(t),a=i.getSelected(!0);i.setStyle(Object.fromEntries(a.map(function(t){return[t,n[e].k+": "+r]})))})):"color"==n[e].type&&(n[e].type="i",n[e].onclick=function(l,s,r){r.color||(jSuites.color(r,{onchange:function(l,s){let r=o.eN.call(t),i=r.getSelected(!0);r.setStyle(Object.fromEntries(i.map(function(t){return[t,n[e].k+": "+s]})))},onopen:function(e){e.color.select("")}}),r.color.open())})},a=function(e){let t=this,n=document.createElement("div");return n.classList.add("jss_toolbar"),i.call(t,e),"object"==typeof t.plugins&&Object.entries(t.plugins).forEach(function([,t]){if("function"==typeof t.toolbar){let n=t.toolbar(e);n&&(e=n)}}),jSuites.toolbar(n,e),n},c=function(e){e.parent.toolbar&&e.parent.toolbar.toolbar.update(e)},d=function(){let e=this;if(e.config.toolbar&&!e.toolbar){let t;Array.isArray(e.config.toolbar)?t={items:e.config.toolbar}:"object"==typeof e.config.toolbar?t=e.config.toolbar:(t={items:r.call(e)},"function"==typeof e.config.toolbar&&(t=e.config.toolbar(t))),e.toolbar=e.element.insertBefore(a.call(e,t),e.element.children[1])}},p=function(){let e=this;e.toolbar&&(e.toolbar.parentNode.removeChild(e.toolbar),delete e.toolbar)}}},__webpack_module_cache__={};function __nested_webpack_require_64087__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](n,n.exports,__nested_webpack_require_64087__),n.exports}__nested_webpack_require_64087__.d=function(e,t){for(var n in t)__nested_webpack_require_64087__.o(t,n)&&!__nested_webpack_require_64087__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__nested_webpack_require_64087__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__nested_webpack_require_64087__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __nested_webpack_exports__={};__nested_webpack_require_64087__.d(__nested_webpack_exports__,{default:function(){return src}});let lib={jspreadsheet:{}};var libraryBase=lib,dispatch=__nested_webpack_require_64087__(805),internal=__nested_webpack_require_64087__(530),utils_history=__nested_webpack_require_64087__(911);let openEditor=function(e,t,n){let l=this,o=e.getAttribute("data-y"),s=e.getAttribute("data-x");dispatch.A.call(l,"oneditionstart",l,e,parseInt(s),parseInt(o)),s>0&&(l.records[o][s-1].element.style.overflow="hidden");let r=function(t){let n=e.getBoundingClientRect(),l=document.createElement(t);return l.style.width=n.width+"px",l.style.height=n.height-2+"px",l.style.minHeight=n.height-2+"px",e.classList.add("editor"),e.innerHTML="",e.appendChild(l),l};if(1==e.classList.contains("readonly"));else if(l.edition=[l.records[o][s].element,l.records[o][s].element.innerHTML,s,o],l.options.columns&&l.options.columns[s]&&"object"==typeof l.options.columns[s].type)l.options.columns[s].type.openEditor(e,l.options.data[o][s],parseInt(s),parseInt(o),l,l.options.columns[s],n),dispatch.A.call(l,"oncreateeditor",l,e,parseInt(s),parseInt(o),null,l.options.columns[s]);else if(l.options.columns&&l.options.columns[s]&&"hidden"==l.options.columns[s].type);else if(l.options.columns&&l.options.columns[s]&&("checkbox"==l.options.columns[s].type||"radio"==l.options.columns[s].type)){let t=!e.children[0].checked;l.setValue(e,t),l.edition=null}else if(l.options.columns&&l.options.columns[s]&&"dropdown"==l.options.columns[s].type){let t,n=l.options.data[o][s];l.options.columns[s].multiple&&!Array.isArray(n)&&(n=n.split(";"));let i=[];if(t="function"==typeof l.options.columns[s].filter?l.options.columns[s].filter(l.element,e,s,o,l.options.columns[s].source):l.options.columns[s].source)for(let e=0;e<t.length;e++)i.push(t[e]);let a=r("div");dispatch.A.call(l,"oncreateeditor",l,e,parseInt(s),parseInt(o),null,l.options.columns[s]);let c={data:i,multiple:!!l.options.columns[s].multiple,autocomplete:!!l.options.columns[s].autocomplete,opened:!0,value:n,width:"100%",height:a.style.minHeight,position:1==l.options.tableOverflow||1==l.parent.config.fullscreen,onclose:function(){closeEditor.call(l,e,!0)}};l.options.columns[s].options&&l.options.columns[s].options.type&&(c.type=l.options.columns[s].options.type),jSuites.dropdown(a,c)}else if(l.options.columns&&l.options.columns[s]&&("calendar"==l.options.columns[s].type||"color"==l.options.columns[s].type)){let t=l.options.data[o][s],n=r("input");dispatch.A.call(l,"oncreateeditor",l,e,parseInt(s),parseInt(o),null,l.options.columns[s]),n.value=t;let i=l.options.columns[s].options?{...l.options.columns[s].options}:{};if(1!=l.options.tableOverflow&&1!=l.parent.config.fullscreen||(i.position=!0),i.value=l.options.data[o][s],i.opened=!0,i.onclose
1=function(t,n){closeEditor.call(l,e,!0)},"color"==l.options.columns[s].type){jSuites.color(n,i);let t=e.getBoundingClientRect();i.position&&(n.nextSibling.children[1].style.top=t.top+t.height+"px",n.nextSibling.children[1].style.left=t.left+"px")}else i.format||(i.format="YYYY-MM-DD"),jSuites.calendar(n,i);n.focus()}else if(l.options.columns&&l.options.columns[s]&&"html"==l.options.columns[s].type){let t=l.options.data[o][s],n=r("div");dispatch.A.call(l,"oncreateeditor",l,e,parseInt(s),parseInt(o),null,l.options.columns[s]),n.style.position="relative";let i=document.createElement("div");i.classList.add("jss_richtext"),n.appendChild(i),jSuites.editor(i,{focus:!0,value:t});let a=e.getBoundingClientRect(),c=i.getBoundingClientRect();window.innerHeight<a.bottom+c.height?i.style.top=a.bottom-(c.height+2)+"px":i.style.top=a.top+"px",window.innerWidth<a.left+c.width?i.style.left=a.right-(c.width+2)+"px":i.style.left=a.left+"px"}else if(l.options.columns&&l.options.columns[s]&&"image"==l.options.columns[s].type){let t=e.children[0],n=r("div");dispatch.A.call(l,"oncreateeditor",l,e,parseInt(s),parseInt(o),null,l.options.columns[s]),n.style.position="relative";let i=document.createElement("div");i.classList.add("jclose"),t&&t.src&&i.appendChild(t),n.appendChild(i),jSuites.image(i,l.options.columns[s]);let a=e.getBoundingClientRect(),c=i.getBoundingClientRect();window.innerHeight<a.bottom+c.height?i.style.top=a.top-(c.height+2)+"px":i.style.top=a.top+"px",i.style.left=a.left+"px"}else{let n,i=1==t?"":l.options.data[o][s];n=r(l.options.columns&&l.options.columns[s]&&0==l.options.columns[s].wordWrap||!(1==l.options.wordWrap||l.options.columns&&l.options.columns[s]&&1==l.options.columns[s].wordWrap)?"input":"textarea"),dispatch.A.call(l,"oncreateeditor",l,e,parseInt(s),parseInt(o),null,l.options.columns[s]),n.focus(),n.value=i;let a=l.options.columns&&l.options.columns[s];if(!(0,internal.dw)(i)&&a){let e=(0,internal.rS)(a);if(e){if(!a.disabledMaskOnEdition)if(a.mask){let e=a.mask.split(";");n.setAttribute("data-mask",e[0])}else a.locale&&n.setAttribute("data-locale",a.locale);e.input=n,n.mask=e,jSuites.mask.render(i,e,!1)}}n.onblur=function(){closeEditor.call(l,e,!0)},n.scrollLeft=n.scrollWidth}},closeEditor=function(e,t){let n,l=this,o=parseInt(e.getAttribute("data-x")),s=parseInt(e.getAttribute("data-y"));if(1==t){if(l.options.columns&&l.options.columns[o]&&"object"==typeof l.options.columns[o].type)n=l.options.columns[o].type.closeEditor(e,t,parseInt(o),parseInt(s),l,l.options.columns[o]);else if(l.options.columns&&l.options.columns[o]&&("checkbox"==l.options.columns[o].type||"radio"==l.options.columns[o].type||"hidden"==l.options.columns[o].type));else if(l.options.columns&&l.options.columns[o]&&"dropdown"==l.options.columns[o].type)n=e.children[0].dropdown.close(!0);else if(l.options.columns&&l.options.columns[o]&&"calendar"==l.options.columns[o].type)n=e.children[0].calendar.close(!0);else if(l.options.columns&&l.options.columns[o]&&"color"==l.options.columns[o].type)n=e.children[0].color.close(!0);else if(l.options.columns&&l.options.columns[o]&&"html"==l.options.columns[o].type)n=e.children[0].children[0].editor.getData();else if(l.options.columns&&l.options.columns[o]&&"image"==l.options.columns[o].type){let t=e.children[0].children[0].children[0];n=t&&"IMG"==t.tagName?t.src:""}else if(l.options.columns&&l.options.columns[o]&&"numeric"==l.options.columns[o].type)"="!=(""+(n=e.children[0].value)).substr(0,1)&&""==n&&(n=l.options.columns[o].allowEmpty?"":0),e.children[0].onblur=null;else{n=e.children[0].value,e.children[0].onblur=null;let t=l.options.columns&&l.options.columns[o];if(t){let e=(0,internal.rS)(t);if(e&&""!==n&&!(0,internal.dw)(n)&&"number"!=typeof n){let t=jSuites.mask.extract(n,e,!0);t&&""!==t.value&&(n=t.value)}}}l.options.data[s][o]==n?e.innerHTML=l.edition[1]:l.setValue(e,n)}else l.options.columns&&l.options.columns[o]&&"object"==typeof l.options.columns[o].type?l.options.columns[o].type.closeEditor(e,t,parseInt(o),parseInt(s),l,l.options.columns[o]):l.options.columns&&l.options.columns[o]&&"dropdown"==l.options.columns[o].type?e.children[0].dropdown.close(!0):l.options.columns&&l.options.columns[o]&&"calendar"==l.options.columns[o].type?e.children[0].calendar.close(!0):l.options.columns&&l.options.columns[o]&&"color"==l.options.columns[o].type?e.children[0].color.close(!0):e.children[0].onblur=null,e.innerHTML=l.edition&&l.edition[1]?l.edition[1]:"";dispatch.A.call(l,"oneditionend",l,e,o,s,n,t),e.classList.remove("editor"),l.edition=null},setCheckRadioValue=function(){let e=this,t=[],n=Object.keys(e.highlighted);for(let l=0;l<n.length;l++){let n=e.highlighted[l].element.getAttribute("data-x"),o=e.highlighted[l].element.getAttribute("data-y");"checkbox"!=e.options.columns[n].type&&"radio"!=e.options.columns[n].type||t.push(internal.k9.call(e,n,o,!e.options.data[o][n]))}if(t.length){utils_history.Dh.call(e,{action:"setValue",records:t,selection:e.selectedCell});let n=t.map(function(e){return{x:e.x,y:e.y,value:e.value,oldValue:e.oldValue}});dispatch.A.call(e,"onafterchanges",e,n)}};var lazyLoading=__nested_webpack_require_64087__(497);let upGet=function(e,t){let n=this;e=parseInt(e);for(let l=(t=parseInt(t))-1;l>=0;l--)if("none"!=n.records[l][e].element.style.display&&"none"!=n.rows[l].element.style.display){if(n.records[l][e].element.getAttribute("data-merged")&&n.records[l][e].element==n.records[t][e].element)continue;t=l;break}return t},upVisible=function(e,t){let n,l,o=this;
vendor: 4,446 bytes, line 1
1if(0==e?(n=parseInt(o.selectedCell[0]),l=parseInt(o.selectedCell[1])):(n=parseInt(o.selectedCell[2]),l=parseInt(o.selectedCell[3])),0==t){for(let e=0;e<l;e++)if("none"!=o.records[e][n].element.style.display&&"none"!=o.rows[e].element.style.display){l=e;break}}else l=upGet.call(o,n,l);0==e?(o.selectedCell[0]=n,o.selectedCell[1]=l):(o.selectedCell[2]=n,o.selectedCell[3]=l)},up=function(e,t){let n=this;if(e?n.selectedCell[3]>0&&upVisible.call(n,1,+!t):(n.selectedCell[1]>0&&upVisible.call(n,0,+!t),n.selectedCell[2]=n.selectedCell[0],n.selectedCell[3]=n.selectedCell[1]),n.updateSelectionFromCoords(n.selectedCell[0],n.selectedCell[1],n.selectedCell[2],n.selectedCell[3]),1==n.options.lazyLoading)if(0==n.selectedCell[1]||0==n.selectedCell[3])lazyLoading.wu.call(n,0),n.updateSelectionFromCoords(n.selectedCell[0],n.selectedCell[1],n.selectedCell[2],n.selectedCell[3]);else if(lazyLoading.AG.call(n))n.updateSelectionFromCoords(n.selectedCell[0],n.selectedCell[1],n.selectedCell[2],n.selectedCell[3]);else{let e=parseInt(n.tbody.firstChild.getAttribute("data-y"));n.selectedCell[1]-e<30&&(lazyLoading.G_.call(n),n.updateSelectionFromCoords(n.selectedCell[0],n.selectedCell[1],n.selectedCell[2],n.selectedCell[3]))}else if(n.options.pagination>0){let e=n.whichPage(n.selectedCell[3]);e!=n.pageNumber&&n.page(e)}internal.Rs.call(n,1)},rightGet=function(e,t){let n=this;e=parseInt(e),t=parseInt(t);for(let l=e+1;l<n.headers.length;l++)if("none"!=n.records[t][l].element.style.display){if(n.records[t][l].element.getAttribute("data-merged")&&n.records[t][l].element==n.records[t][e].element)continue;e=l;break}return e},rightVisible=function(e,t){let n,l,o=this;if(0==e?(n=parseInt(o.selectedCell[0]),l=parseInt(o.selectedCell[1])):(n=parseInt(o.selectedCell[2]),l=parseInt(o.selectedCell[3])),0==t){for(let e=o.headers.length-1;e>n;e--)if("none"!=o.records[l][e].element.style.display){n=e;break}}else n=rightGet.call(o,n,l);0==e?(o.selectedCell[0]=n,o.selectedCell[1]=l):(o.selectedCell[2]=n,o.selectedCell[3]=l)},right=function(e,t){let n=this;e?n.selectedCell[2]<n.headers.length-1&&rightVisible.call(n,1,+!t):(n.selectedCell[0]<n.headers.length-1&&rightVisible.call(n,0,+!t),n.selectedCell[2]=n.selectedCell[0],n.selectedCell[3]=n.selectedCell[1]),n.updateSelectionFromCoords(n.selectedCell[0],n.selectedCell[1],n.selectedCell[2],n.selectedCell[3]),internal.Rs.call(n,2)},downGet=function(e,t){let n=this;e=parseInt(e);for(let l=(t=parseInt(t))+1;l<n.rows.length;l++)if("none"!=n.records[l][e].element.style.display&&"none"!=n.rows[l].element.style.display){if(n.records[l][e].element.getAttribute("data-merged")&&n.records[l][e].element==n.records[t][e].element)continue;t=l;break}return t},downVisible=function(e,t){let n,l,o=this;if(0==e?(n=parseInt(o.selectedCell[0]),l=parseInt(o.selectedCell[1])):(n=parseInt(o.selectedCell[2]),l=parseInt(o.selectedCell[3])),0==t){for(let e=o.rows.length-1;e>l;e--)if("none"!=o.records[e][n].element.style.display&&"none"!=o.rows[e].element.style.display){l=e;break}}else l=downGet.call(o,n,l);0==e?(o.selectedCell[0]=n,o.selectedCell[1]=l):(o.selectedCell[2]=n,o.selectedCell[3]=l)},down=function(e,t){let n=this;if(e?n.selectedCell[3]<n.records.length-1&&downVisible.call(n,1,+!t):(n.selectedCell[1]<n.records.length-1&&downVisible.call(n,0,+!t),n.selectedCell[2]=n.selectedCell[0],n.selectedCell[3]=n.selectedCell[1]),n.updateSelectionFromCoords(n.selectedCell[0],n.selectedCell[1],n.selectedCell[2],n.selectedCell[3]),1==n.options.lazyLoading)n.selectedCell[1]==n.records.length-1||n.selectedCell[3]==n.records.length-1?(lazyLoading.wu.call(n,-1),n.updateSelectionFromCoords(n.selectedCell[0],n.selectedCell[1],n.selectedCell[2],n.selectedCell[3])):lazyLoading.AG.call(n)?n.updateSelectionFromCoords(n.selectedCell[0],n.selectedCell[1],n.selectedCell[2],n.selectedCell[3]):parseInt(n.tbody.lastChild.getAttribute("data-y"))-n.selectedCell[3]<30&&(lazyLoading.p6.call(n),n.updateSelectionFromCoords(n.selectedCell[0],n.selectedCell[1],n.selectedCell[2],n.selectedCell[3]));else if(n.options.pagination>0){let e=n.whichPage(n.selectedCell[3]);e!=n.pageNumber&&n.page(e)}internal.Rs.call(n,3)},leftGet=function(e,t){let n=this;e=parseInt(e),t=parseInt(t);for(let l=e-1;l>=0;l--)if("none"!=n.records[t][l].element.style.display){if(n.records[t][l].element.getAttribute("data-merged")&&n.records[t][l].element==n.records[t][e].element)continue;e=l;break}return e},leftVisible=function(e,t){let n,l,o=this;
1if(0==e?(n=parseInt(o.selectedCell[0]),l=parseInt(o.selectedCell[1])):(n=parseInt(o.selectedCell[2]),l=parseInt(o.selectedCell[3])),0==t){for(let e=0;e<n;e++)if("none"!=o.records[l][e].element.style.display){n=e;break}}else n=leftGet.call(o,n,l);0==e?(o.selectedCell[0]=n,o.selectedCell[1]=l):(o.selectedCell[2]=n,o.selectedCell[3]=l)},left=function(e,t){let n=this;e?n.selectedCell[2]>0&&leftVisible.call(n,1,+!t):(n.selectedCell[0]>0&&leftVisible.call(n,0,+!t),n.selectedCell[2]=n.selectedCell[0],n.selectedCell[3]=n.selectedCell[1]),n.updateSelectionFromCoords(n.selectedCell[0],n.selectedCell[1],n.selectedCell[2],n.selectedCell[3]),internal.Rs.call(n,0)},first=function(e,t){let n=this;if(e?t?n.selectedCell[3]=0:leftVisible.call(n,1,0):(t?n.selectedCell[1]=0:leftVisible.call(n,0,0),n.selectedCell[2]=n.selectedCell[0],n.selectedCell[3]=n.selectedCell[1]),1!=n.options.lazyLoading||0!=n.selectedCell[1]&&0!=n.selectedCell[3]){if(n.options.pagination>0){let e=n.whichPage(n.selectedCell[3]);e!=n.pageNumber&&n.page(e)}}else lazyLoading.wu.call(n,0);n.updateSelectionFromCoords(n.selectedCell[0],n.selectedCell[1],n.selectedCell[2],n.selectedCell[3]),internal.Rs.call(n,1)},last=function(e,t){let n=this;if(e?t?n.selectedCell[3]=n.records.length-1:rightVisible.call(n,1,0):(t?n.selectedCell[1]=n.records.length-1:rightVisible.call(n,0,0),n.selectedCell[2]=n.selectedCell[0],n.selectedCell[3]=n.selectedCell[1]),1!=n.options.lazyLoading||n.selectedCell[1]!=n.records.length-1&&n.selectedCell[3]!=n.records.length-1){if(n.options.pagination>0){let e=n.whichPage(n.selectedCell[3]);e!=n.pageNumber&&n.page(e)}}else lazyLoading.wu.call(n,-1);n.updateSelectionFromCoords(n.selectedCell[0],n.selectedCell[1],n.selectedCell[2],n.selectedCell[3]),internal.Rs.call(n,3)};var merges=__nested_webpack_require_64087__(910),selection=__nested_webpack_require_64087__(657),helpers=__nested_webpack_require_64087__(978),internalHelpers=__nested_webpack_require_64087__(689);let copy=function(e,t,n,l,o,s,r){let i=this;t||(t=" ");let a=RegExp(t,"ig"),c=[],d=[],p=[],u=[],h=[],f=i.options.data[0].length,m=i.options.data.length,g="",y=!1,b="",C="",j=0,w=0,v=0,A=0;for(let t=0;t<m;t++)for(let n=0;n<f;n++)e&&!i.records[t][n].element.classList.contains("highlight")||(v<=n&&(v=n),A<=t&&(A=t));if(o&&(1==i.parent.config.includeHeadersOnDownload||l)){if(i.options.nestedHeaders&&i.options.nestedHeaders.length>0){g=i.options.nestedHeaders;for(let e=0;e<g.length;e++){let n=[];for(let t=0;t<g[e].length;t++){let l=parseInt(g[e][t].colspan);n.push(g[e][t].title);for(let e=0;e<l-1;e++)n.push("")}C+=n.join(t)+"\r\n"}}y=!0}i.style=[];for(let n=0;n<m;n++){d=[],p=[];for(let t=0;t<f;t++)if(!e||i.records[n][t].element.classList.contains("highlight")){1==y&&c.push(i.headers[t].textContent);let e,l=i.options.data[n][t];l.match&&(l.match(a)||l.match(/,/g)||l.match(/\n/)||l.match(/\"/))&&(l='"'+(l=l.replace(RegExp('"',"g"),'""'))+'"'),d.push(l),i.options.columns&&i.options.columns[t]&&("checkbox"==i.options.columns[t].type||"radio"==i.options.columns[t].type)?e=l:(e=i.records[n][t].element.innerHTML).match&&(e.match(a)||e.match(/,/g)||e.match(/\n/)||e.match(/\"/))&&(e='"'+(e=e.replace(RegExp('"',"g"),'""'))+'"'),p.push(e),g=(g=i.records[n][t].element.getAttribute("style")).replace("display: none;",""),i.style.push(g||"")}d.length&&(y&&(j=d.length,u.push(c.join(t))),u.push(d.join(t))),p.length&&(w++,y&&(h.push(c.join(t)),y=!1),h.push(p.join(t)))}f==j&&m==w&&(b=C);let x=b+u.join("\r\n"),L=b+h.join("\r\n");if(!n){let e=[Math.min(i.selectedCell[0],i.selectedCell[2]),Math.min(i.selectedCell[1],i.selectedCell[3]),Math.max(i.selectedCell[0],i.selectedCell[2]),Math.max(i.selectedCell[1],i.selectedCell[3])],t=dispatch.A.call(i,"oncopy",i,e,L,s);if(t)L=t;else if(!1===t)return!1;i.textarea.value=L,i.textarea.select(),document.execCommand("copy")}if(i.data=1==r?L:x,i.hashString=selection.tW.call(i,i.data),!n&&(selection.kA.call(i),i.highlighted))for(let e=0;e<i.highlighted.length;e++)i.highlighted[e].element.classList.add("copying"),i.highlighted[e].element.classList.contains("highlight-left")&&i.highlighted[e].element.classList.add("copying-left"),i.highlighted[e].element.classList.contains("highlight-right")&&i.highlighted[e].element.classList.add("copying-right"),i.highlighted[e].element.classList.contains("highlight-top")&&i.highlighted[e].element.classList.add("copying-top"),i.highlighted[e].element.classList.contains("highlight-bottom")&&i.highlighted[e].element.classList.add("copying-bottom");return i.data},paste=function(e,t,n){let l=this,o=(0,selection.tW)(n),s=o==l.hashString?l.style:null;o==l.hashString&&(n=l.data),n=(0,helpers.parseCSV)(n," ");let r=l.selectedCell[2]-e+1,i=l.selectedCell[3]-t+1,a=n[0].length;if(r>1&Number.isInteger(r/a)){let e=r/a;if(s){let t=[];for(let n=0;n<s.length;n+=a){let l=s.slice(n,n+a);for(let n=0;n<e;n++)t.push(...l)}s=t}n=n.map(function(t,n){return Array.apply(null,{length:e*t.length}).map(function(e,n){return t[n%t.length]})})}let c=n.length;if(i>1&Number.isInteger(i/c)){let e=i/c;if(s){let t=[];for(let n=0;n<e;n++)t.push(...s);s=t}n=Array.apply(null,{length:e*c}).map(function(e,t){return n[t%c]})}let d=dispatch.A.call(l,"onbeforepaste",l,n.map(function(e){return e.map(function(e){return{value:e}})}),e,t);if(!1===d)return!1;if(d&&(n=d),null!=e&&null!=t&&n){let o=0,r=0,i=[],a={},c={},d=0,p=parseInt(e),u=parseInt(t),h=null,f=l.headers.slice(p).filter(e=>"none"===e.style.display).length,m=p+f+n[0].length,g=l.headers.length;m>g&&(l.skipUpdateTableReferences=!0,l.insertColumn(m-g));let y=l.rows.slice(u).filter(e=>"none"===e.element.style.display).length,b=u+y+n.length,C=l.rows.length;for(b>C&&(l.skipUpdateTableReferences=!0,l.insertRow(b-C)),l.skipUpdateTableReferences&&(l.skipUpdateTableReferences=!1,internal.o8.call(l));h=n[r];){for(o=0,p=parseInt(e);null!=h[o];){let e=h[o];l.options.columns&&l.options.columns[o]&&"calendar"==l.options.columns[o].type&&(e=jSuites.calendar.extractDateFromString(e,l.options.columns[o].options&&l.options.columns[o].options.format||"YYYY-MM-DD"));let t=internal.k9.call(l,p,u,e);if(i.push(t),internal.xF.call(l,p,u,i),s&&s[d]){let e=(0,internalHelpers.t3)([p,u]);a[e]=s[d],c[e]=l.getStyle(e),l.records[u][p].element.setAttribute("style",s[d]),d++}if(null!=h[++o]){if(p>=l.headers.length-1){if(0==l.options.allowInsertColumn)break;l.insertColumn()}p=rightGet.call(l,p,u)}}
vendor: 39,446 bytes, line 1
1if(n[++r]){if(u>=l.rows.length-1){if(0==l.options.allowInsertRow)break;l.insertRow()}u=downGet.call(l,e,u)}}selection.AH.call(l,e,t,p,u),utils_history.Dh.call(l,{action:"setValue",records:i,selection:l.selectedCell,newStyle:a,oldStyle:c}),internal.am.call(l);let j=[];for(let l=0;l<n.length;l++)for(let o=0;o<n[l].length;o++)j.push({x:o+e,y:l+t,value:n[l][o]});dispatch.A.call(l,"onpaste",l,j);let w=i.map(function(e){return{x:e.x,y:e.y,value:e.value,oldValue:e.oldValue}});dispatch.A.call(l,"onafterchanges",l,w)}(0,selection.kA)()};var filter=__nested_webpack_require_64087__(829),footer=__nested_webpack_require_64087__(160);let getNumberOfColumns=function(){let e=this,t=e.options.columns&&e.options.columns.length||0;if(e.options.data&&void 0!==e.options.data[0]){let n=Object.keys(e.options.data[0]);n.length>t&&(t=n.length)}return e.options.minDimensions&&e.options.minDimensions[0]>t&&(t=e.options.minDimensions[0]),t},createCellHeader=function(e){let t=this,n=t.options.columns&&t.options.columns[e]&&t.options.columns[e].width||t.options.defaultColWidth||100,l=t.options.columns&&t.options.columns[e]&&t.options.columns[e].align||t.options.defaultColAlign||"center";t.headers[e]=document.createElement("td"),t.headers[e].textContent=t.options.columns&&t.options.columns[e]&&t.options.columns[e].title||(0,helpers.getColumnName)(e),t.headers[e].setAttribute("data-x",e),t.headers[e].style.textAlign=l,t.options.columns&&t.options.columns[e]&&t.options.columns[e].title&&t.headers[e].setAttribute("title",t.headers[e].innerText),t.options.columns&&t.options.columns[e]&&t.options.columns[e].id&&t.headers[e].setAttribute("id",t.options.columns[e].id);let o=document.createElement("col");o.setAttribute("width",n),t.cols[e]={colElement:o,x:e},t.options.columns&&t.options.columns[e]&&"hidden"==t.options.columns[e].type&&(t.headers[e].style.display="none",o.style.display="none")},insertColumn=function(e,t,n,l){let o=this;if(0!=o.options.allowInsertColumn){let s,r=[];Array.isArray(e)?(s=1,e&&(r=e)):s="number"==typeof e?e:1,n=!!n;let i=Math.max(o.options.columns.length,...o.options.data.map(function(e){return e.length}))-1;(null==t||t>=parseInt(i)||t<0)&&(t=i),l||(l=[]);for(let e=0;e<s;e++)l[e]||(l[e]={});let a=[];if(Array.isArray(e)){let s=[];for(let t=0;t<o.options.data.length;t++)s.push(t<e.length?e[t]:"");let r={column:t+ +!n,options:Object.assign({},l[0]),data:s};a.push(r)}else for(let o=0;o<e;o++){let e={column:t+o+ +!n,options:Object.assign({},l[o])};a.push(e)}if(!1===dispatch.A.call(o,"onbeforeinsertcolumn",o,a))return!1;if(o.options.mergeCells&&Object.keys(o.options.mergeCells).length>0&&merges.Lt.call(o,t,n).length){if(!confirm(jSuites.translate("This action will destroy any existing merged cells. Are you sure?")))return!1;o.destroyMerge()}let c=n?t:t+1;o.options.columns=(0,internalHelpers.Hh)(o.options.columns,c,l);let d=o.headers.splice(c),p=o.cols.splice(c),u=[],h=[],f=[],m=[],g=[];for(let e=c;e<s+c;e++)createCellHeader.call(o,e),o.headerContainer.insertBefore(o.headers[e],o.headerContainer.children[e+1]),o.colgroupContainer.insertBefore(o.cols[e].colElement,o.colgroupContainer.children[e+1]),u.push(o.headers[e]),h.push(o.cols[e]);if(o.options.footers)for(let e=0;e<o.options.footers.length;e++){g[e]=[];for(let t=0;t<s;t++)g[e].push("");o.options.footers[e].splice(c,0,g[e])}for(let e=0;e<o.options.data.length;e++){let t=o.options.data[e].splice(c),n=o.records[e].splice(c);m[e]=[],f[e]=[];for(let t=c;t<s+c;t++){let n=r[e]?r[e]:"";o.options.data[e][t]=n;let l=internal.P9.call(o,t,e,o.options.data[e][t]);o.records[e][t]={element:l,y:e},o.rows[e]&&o.rows[e].element.insertBefore(l,o.rows[e].element.children[t+1]),o.options.columns&&o.options.columns[t]&&"function"==typeof o.options.columns[t].render&&o.options.columns[t].render(l,n,parseInt(t),parseInt(e),o,o.options.columns[t]),m[e].push(n),f[e].push({element:l,x:t,y:e})}Array.prototype.push.apply(o.options.data[e],t),Array.prototype.push.apply(o.records[e],n)}Array.prototype.push.apply(o.headers,d),Array.prototype.push.apply(o.cols,p);for(let e=c;e<o.cols.length;e++)o.cols[e].x=e;for(let e=0;e<o.records.length;e++)for(let t=0;t<o.records[e].length;t++)o.records[e][t].x=t;if(o.options.nestedHeaders&&o.options.nestedHeaders.length>0&&o.options.nestedHeaders[0]&&o.options.nestedHeaders[0][0])for(let e=0;e<o.options.nestedHeaders.length;e++){let t=parseInt(o.options.nestedHeaders[e][o.options.nestedHeaders[e].length-1].colspan)+s;o.options.nestedHeaders[e][o.options.nestedHeaders[e].length-1].colspan=t,o.thead.children[e].children[o.thead.children[e].children.length-1].setAttribute("colspan",t);let n=o.thead.children[e].children[o.thead.children[e].children.length-1].getAttribute("data-column");n=n.split(",");for(let e=c;e<s+c;e++)n.push(e);o.thead.children[e].children[o.thead.children[e].children.length-1].setAttribute("data-column",n)}utils_history.Dh.call(o,{action:"insertColumn",columnNumber:t,numOfColumns:s,insertBefore:n,columns:l,headers:u,cols:h,records:f,footers:g,data:m}),internal.o8.call(o),dispatch.A.call(o,"oninsertcolumn",o,a)}},moveColumn=function(e,t){let n=this;if(n.options.mergeCells&&Object.keys(n.options.mergeCells).length>0){let l;if(l=+(e>t),merges.Lt.call(n,e).length||merges.Lt.call(n,t,l).length){if(!confirm(jSuites.translate("This action will destroy any existing merged cells. Are you sure?")))return!1;n.destroyMerge()}}if((e=parseInt(e))>(t=parseInt(t))){n.headerContainer.insertBefore(n.headers[e],n.headers[t]),n.colgroupContainer.insertBefore(n.cols[e].colElement,n.cols[t].colElement);for(let l=0;l<n.rows.length;l++)n.rows[l].element.insertBefore(n.records[l][e].element,n.records[l][t].element)}else{n.headerContainer.insertBefore(n.headers[e],n.headers[t].nextSibling),n.colgroupContainer.insertBefore(n.cols[e].colElement,n.cols[t].colElement.nextSibling);for(let l=0;l<n.rows.length;l++)n.rows[l].element.insertBefore(n.records[l][e].element,n.records[l][t].element.nextSibling)}n.options.columns.splice(t,0,n.options.columns.splice(e,1)[0]),n.headers.splice(t,0,n.headers.splice(e,1)[0]),n.cols.splice(t,0,n.cols.splice(e,1)[0]);let l=Math.min(e,t),o=Math.max(e,t);for(let l=0;l<n.rows.length;l++)n.options.data[l].splice(t,0,n.options.data[l].splice(e,1)[0]),n.records[l].splice(t,0,n.records[l].splice(e,1)[0]);for(let e=l;e<=o;e++)n.cols[e].x=e;for(let e=0;e<n.records.length;e++)for(let t=l;t<=o;t++)n.records[e][t].x=t;if(n.options.footers)for(let l=0;l<n.options.footers.length;l++)n.options.footers[l].splice(t,0,n.options.footers[l].splice(e,1)[0]);utils_history.Dh.call(n,{action:"moveColumn",oldValue:e,newValue:t}),internal.o8.call(n),dispatch.A.call(n,"onmovecolumn",n,e,t,1)},deleteColumn=function(e,t){let n=this;if(0!=n.options.allowDeleteColumn)if(n.headers.length>1){if(null==e){let l=n.getSelectedColumns(!0);l.length?(e=parseInt(l[0]),t=parseInt(l.length)):(e=n.headers.length-1,t=1)}let l=n.options.data[0].length-1;(null==e||e>l||e<0)&&(e=l),t||(t=1),t>n.options.data[0].length-e&&(t=n.options.data[0].length-e);let o=[];for(let n=0;n<t;n++)o.push(n+e);if(!1===dispatch.A.call(n,"onbeforedeletecolumn",n,o))return!1;if(parseInt(e)>-1){let l=!1;if(n.options.mergeCells&&Object.keys(n.options.mergeCells).length>0)for(let o=e;o<e+t;o++)merges.Lt.call(n,o,null).length&&(l=!0);if(l){if(!confirm(jSuites.translate("This action will destroy any existing merged cells. Are you sure?")))return!1;n.destroyMerge()}let s=n.options.columns?n.options.columns.splice(e,t):void 0;for(let l=e;l<e+t;l++)n.cols[l].colElement.className="",n.headers[l].className="",n.cols[l].colElement.parentNode.removeChild(n.cols[l].colElement),n.headers[l].parentNode.removeChild(n.headers[l]);let r=n.headers.splice(e,t),i=n.cols.splice(e,t),a=[],c=[],d=[];for(let l=0;l<n.options.data.length;l++)for(let o=e;o<e+t;o++)n.records[l][o].element.className="",n.records[l][o].element.parentNode.removeChild(n.records[l][o].element);for(let l=0;l<n.options.data.length;l++)c[l]=n.options.data[l].splice(e,t),a[l]=n.records[l].splice(e,t);for(let t=e;t<n.cols.length;t++)n.cols[t].x=t;for(let t=0;t<n.records.length;t++)for(let l=e;l<n.records[t].length;l++)n.records[t][l].x=l;if(n.options.footers)for(let l=0;l<n.options.footers.length;l++)d[l]=n.options.footers[l].splice(e,t);if(selection.at.call(n,0,e,e+t-1),n.options.nestedHeaders&&n.options.nestedHeaders.length>0&&n.options.nestedHeaders[0]&&n.options.nestedHeaders[0][0])for(let e=0;e<n.options.nestedHeaders.length;e++){let l=parseInt(n.options.nestedHeaders[e][n.options.nestedHeaders[e].length-1].colspan)-t;n.options.nestedHeaders[e][n.options.nestedHeaders[e].length-1].colspan=l,n.thead.children[e].children[n.thead.children[e].children.length-1].setAttribute("colspan",l)}utils_history.Dh.call(n,{action:"deleteColumn",columnNumber:e,numOfColumns:t,insertBefore:1,columns:s,headers:r,cols:i,records:a,footers:d,data:c}),internal.o8.call(n),dispatch.A.call(n,"ondeletecolumn",n,o)}}else console.error("Jspreadsheet: It is not possible to delete the last column")},getWidth=function(e){let t,n=this;if(void 0===e){t=[];for(let e=0;e<n.headers.length;e++)t.push(n.options.columns&&n.options.columns[e]&&n.options.columns[e].width||n.options.defaultColWidth||100)}else t=parseInt(n.cols[e].colElement.getAttribute("width"));return t},setWidth=function(e,t,n){let l=this;if(t){if(Array.isArray(e)){n||(n=[]);for(let o=0;o<e.length;o++){n[o]||(n[o]=parseInt(l.cols[e[o]].colElement.getAttribute("width")));let s=Array.isArray(t)&&t[o]?t[o]:t;l.cols[e[o]].colElement.setAttribute("width",s),l.options.columns||(l.options.columns=[]),l.options.columns[e[o]]||(l.options.columns[e[o]]={}),l.options.columns[e[o]].width=s}}else n||(n=parseInt(l.cols[e].colElement.getAttribute("width"))),l.cols[e].colElement.setAttribute("width",t),l.options.columns||(l.options.columns=[]),l.options.columns[e]||(l.options.columns[e]={}),l.options.columns[e].width=t;utils_history.Dh.call(l,{action:"setWidth",column:e,oldValue:n,newValue:t}),dispatch.A.call(l,"onresizecolumn",l,e,t,n),selection.Aq.call(l)}},showColumn=function(e){let t=this;Array.isArray(e)||(e=[e]);for(let n=0;n<e.length;n++){let l=e[n];t.headers[l].style.display="",t.cols[l].colElement.style.display="",t.filter&&t.filter.children.length>l+1&&(t.filter.children[l+1].style.display="");for(let e=0;e<t.options.data.length;e++)t.records[e][l].element.style.display=""}t.options.footers&&footer.e.call(t),t.resetSelection()},hideColumn=function(e){let t=this;Array.isArray(e)||(e=[e]);for(let n=0;n<e.length;n++){let l=e[n];t.headers[l].style.display="none",t.cols[l].colElement.style.display="none",t.filter&&t.filter.children.length>l+1&&(t.filter.children[l+1].style.display="none");for(let e=0;e<t.options.data.length;e++)t.records[e][l].element.style.display="none"}t.options.footers&&footer.e.call(t),t.resetSelection()},getColumnData=function(e,t){let n=this,l=[];for(let o=0;o<n.options.data.length;o++)t?l.push(n.records[o][e].element.innerHTML):l.push(n.options.data[o][e]);return l},setColumnData=function(e,t,n){let l=this;for(let o=0;o<l.rows.length;o++){let s=(0,internalHelpers.t3)([e,o]);null!=t[o]&&l.setValue(s,t[o],n)}},createRow=function(e,t){let n=this;n.records[e]||(n.records[e]=[]),t||(t=n.options.data[e]);let l={element:document.createElement("tr"),y:e};n.rows[e]=l,l.element.setAttribute("data-y",e);let o=null;n.options.defaultRowHeight&&(l.element.style.height=n.options.defaultRowHeight+"px"),n.options.rows&&n.options.rows[e]&&(n.options.rows[e].height&&(l.element.style.height=n.options.rows[e].height),n.options.rows[e].title&&(o=n.options.rows[e].title)),o||(o=parseInt(e+1));let s=document.createElement("td");s.innerHTML=o,s.setAttribute("data-y",e),s.className="jss_row",l.element.appendChild(s);let r=getNumberOfColumns.call(n);for(let o=0;o<r;o++)n.records[e][o]={element:internal.P9.call(this,o,e,t[o]),x:o,y:e},l.element.appendChild(n.records[e][o].element),n.options.columns&&n.options.columns[o]&&"function"==typeof n.options.columns[o].render&&n.options.columns[o].render(n.records[e][o].element,t[o],parseInt(o),parseInt(e),n,n.options.columns[o]);return l},insertRow=function(e,t,n){let l=this;if(0!=l.options.allowInsertRow){let o,s=[];Array.isArray(e)?(o=1,e&&(s=e)):o=void 0!==e?e:1,n=!!n;let r=l.options.data.length-1;(null==t||t>=parseInt(r)||t<0)&&(t=r);let i=[];for(let e=0;e<o;e++){let o=[];for(let e=0;e<l.options.columns.length;e++)o[e]=s[e]?s[e]:"";i.push({row:e+t+ +!n,data:o})}if(!1===dispatch.A.call(l,"onbeforeinsertrow",l,i))return!1;if(l.options.mergeCells&&Object.keys(l.options.mergeCells).length>0&&merges.D0.call(l,t,n).length){if(!confirm(jSuites.translate("This action will destroy any existing merged cells. Are you sure?")))return!1;l.destroyMerge()}if(1==l.options.search){if(l.results&&l.results.length!=l.rows.length){if(!confirm(jSuites.translate("This action will clear your search results. Are you sure?")))return!1;l.resetSearch()}l.results=null}let a=n?t:t+1,c=l.records.splice(a),d=l.options.data.splice(a),p=l.rows.splice(a),u=[],h=[],f=[];for(let e=a;e<o+a;e++){l.options.data[e]=[];for(let t=0;t<l.options.columns.length;t++)l.options.data[e][t]=s[t]?s[t]:"";let n=createRow.call(l,e,l.options.data[e]);p[0]?Array.prototype.indexOf.call(l.tbody.children,p[0].element)>=0&&l.tbody.insertBefore(n.element,p[0].element):Array.prototype.indexOf.call(l.tbody.children,l.rows[t].element)>=0&&l.tbody.appendChild(n.element),u.push([...l.records[e]]),h.push([...l.options.data[e]]),f.push(n)}Array.prototype.push.apply(l.records,c),Array.prototype.push.apply(l.options.data,d),Array.prototype.push.apply(l.rows,p);for(let e=a;e<l.rows.length;e++)l.rows[e].y=e;for(let e=a;e<l.records.length;e++)for(let t=0;t<l.records[e].length;t++)l.records[e][t].y=e;l.options.pagination>0&&l.page(l.pageNumber),utils_history.Dh.call(l,{action:"insertRow",rowNumber:t,numOfRows:o,insertBefore:n,rowRecords:u,rowData:h,rowNode:f}),internal.o8.call(l),dispatch.A.call(l,"oninsertrow",l,i)}},moveRow=function(e,t,n){let l=this;if(l.options.mergeCells&&Object.keys(l.options.mergeCells).length>0){let n;if(n=+(e>t),merges.D0.call(l,e).length||merges.D0.call(l,t,n).length){if(!confirm(jSuites.translate("This action will destroy any existing merged cells. Are you sure?")))return!1;l.destroyMerge()}}if(1==l.options.search){if(l.results&&l.results.length!=l.rows.length){if(!confirm(jSuites.translate("This action will clear your search results. Are you sure?")))return!1;l.resetSearch()}l.results=null}n||(Array.prototype.indexOf.call(l.tbody.children,l.rows[t].element)>=0?e>t?l.tbody.insertBefore(l.rows[e].element,l.rows[t].element):l.tbody.insertBefore(l.rows[e].element,l.rows[t].element.nextSibling):l.tbody.removeChild(l.rows[e].element)),l.rows.splice(t,0,l.rows.splice(e,1)[0]),l.records.splice(t,0,l.records.splice(e,1)[0]),l.options.data.splice(t,0,l.options.data.splice(e,1)[0]);let o=Math.min(e,t),s=Math.max(e,t);for(let e=o;e<=s;e++)l.rows[e].y=e;for(let e=o;e<=s;e++)for(let t=0;t<l.records[e].length;t++)l.records[e][t].y=e;l.options.pagination>0&&l.tbody.children.length!=l.options.pagination&&l.page(l.pageNumber),utils_history.Dh.call(l,{action:"moveRow",oldValue:e,newValue:t}),internal.o8.call(l),dispatch.A.call(l,"onmoverow",l,parseInt(e),parseInt(t),1)},deleteRow=function(e,t){let n=this;if(0!=n.options.allowDeleteRow)if(1==n.options.allowDeletingAllRows||n.options.data.length>1){if(null==e){let l=selection.R5.call(n);0===l.length?(e=n.options.data.length-1,t=1):(e=l[0],t=l.length)}let l=n.options.data.length-1;(null==e||e>l||e<0)&&(e=l),t||(t=1),e+t>=n.options.data.length&&(t=n.options.data.length-e);let o=[];for(let n=0;n<t;n++)o.push(n+e);if(!1===dispatch.A.call(n,"onbeforedeleterow",n,o))return!1;if(parseInt(e)>-1){let s=!1;if(n.options.mergeCells&&Object.keys(n.options.mergeCells).length>0)for(let l=e;l<e+t;l++)merges.D0.call(n,l,!1).length&&(s=!0);if(s){if(!confirm(jSuites.translate("This action will destroy any existing merged cells. Are you sure?")))return!1;n.destroyMerge()}if(1==n.options.search){if(n.results&&n.results.length!=n.rows.length){if(!confirm(jSuites.translate("This action will clear your search results. Are you sure?")))return!1;n.resetSearch()}n.results=null}1!=n.options.allowDeletingAllRows&&l+1===t&&(t--,console.error("Jspreadsheet: It is not possible to delete the last row"));for(let l=e;l<e+t;l++)Array.prototype.indexOf.call(n.tbody.children,n.rows[l].element)>=0&&(n.rows[l].element.className="",n.rows[l].element.parentNode.removeChild(n.rows[l].element));let r=n.records.splice(e,t),i=n.options.data.splice(e,t),a=n.rows.splice(e,t);for(let t=e;t<n.rows.length;t++)n.rows[t].y=t;for(let t=e;t<n.records.length;t++)for(let e=0;e<n.records[t].length;e++)n.records[t][e].y=t;n.options.pagination>0&&n.tbody.children.length!=n.options.pagination&&n.page(n.pageNumber),selection.at.call(n,1,e,e+t-1),utils_history.Dh.call(n,{action:"deleteRow",rowNumber:e,numOfRows:t,insertBefore:1,rowRecords:r,rowData:i,rowNode:a}),internal.o8.call(n),dispatch.A.call(n,"ondeleterow",n,o)}}else console.error("Jspreadsheet: It is not possible to delete the last row")},getHeight=function(e){let t,n=this;if(void 0===e){t=[];for(let e=0;e<n.rows.length;e++){let l=n.rows[e].element.style.height;l&&(t[e]=l)}}else"object"==typeof e&&(e=$(e).getAttribute("data-y")),t=n.rows[e].element.style.height;return t},setHeight=function(e,t,n){let l=this;t>0&&(n||(n=l.rows[e].element.getAttribute("height"))||(n=l.rows[e].element.getBoundingClientRect().height),t=parseInt(t),l.rows[e].element.style.height=t+"px",l.options.rows||(l.options.rows=[]),l.options.rows[e]||(l.options.rows[e]={}),l.options.rows[e].height=t,utils_history.Dh.call(l,{action:"setHeight",row:e,oldValue:n,newValue:t}),dispatch.A.call(l,"onresizerow",l,e,t,n),selection.Aq.call(l))},showRow=function(e){let t=this;Array.isArray(e)||(e=[e]),e.forEach(function(e){t.rows[e].element.style.display=""})},hideRow=function(e){let t=this;Array.isArray(e)||(e=[e]),e.forEach(function(e){t.rows[e].element.style.display="none"})},getRowData=function(e,t){return t?this.records[e].map(function(e){return e.element.innerHTML}):this.options.data[e]},setRowData=function(e,t,n){let l=this;for(let o=0;o<l.headers.length;o++){let s=(0,internalHelpers.t3)([o,e]);null!=t[o]&&l.setValue(s,t[o],n)}};var version={version:"5.0.0",host:"https://bossanova.uk/jspreadsheet",license:"MIT",print:function(){return[["Jspreadsheet CE",this.version,this.host,this.license].join("\r\n")]}};let getElement=function(e){let t=0,n=0;return function e(l){l.className&&(l.classList.contains("jss_container")&&(n=l),l.classList.contains("jss_spreadsheet")&&(n=l.querySelector(":scope > .jtabs-content > .jtabs-selected"))),"THEAD"==l.tagName?t=1:"TBODY"==l.tagName&&(t=2),l.parentNode&&(n||e(l.parentNode))}(e),[n,t]},mouseUpControls=function(e){if(libraryBase.jspreadsheet.current)if(libraryBase.jspreadsheet.current.resizing){if(libraryBase.jspreadsheet.current.resizing.column){let e=parseInt(libraryBase.jspreadsheet.current.cols[libraryBase.jspreadsheet.current.resizing.column].colElement.getAttribute("width")),t=libraryBase.jspreadsheet.current.getSelectedColumns();if(t.length>1){let n=[];for(let e=0;e<t.length;e++)n.push(parseInt(libraryBase.jspreadsheet.current.cols[t[e]].colElement.getAttribute("width")));n[t.indexOf(parseInt(libraryBase.jspreadsheet.current.resizing.column))]=libraryBase.jspreadsheet.current.resizing.width,setWidth.call(libraryBase.jspreadsheet.current,t,e,n)}else setWidth.call(libraryBase.jspreadsheet.current,parseInt(libraryBase.jspreadsheet.current.resizing.column),e,libraryBase.jspreadsheet.current.resizing.width);libraryBase.jspreadsheet.current.headers[libraryBase.jspreadsheet.current.resizing.column].classList.remove("resizing");for(let e=0;e<libraryBase.jspreadsheet.current.records.length;e++)libraryBase.jspreadsheet.current.records[e][libraryBase.jspreadsheet.current.resizing.column]&&libraryBase.jspreadsheet.current.records[e][libraryBase.jspreadsheet.current.resizing.column].element.classList.remove("resizing")}else{libraryBase.jspreadsheet.current.rows[libraryBase.jspreadsheet.current.resizing.row].element.children[0].classList.remove("resizing");let e=libraryBase.jspreadsheet.current.rows[libraryBase.jspreadsheet.current.resizing.row].element.getAttribute("height");setHeight.call(libraryBase.jspreadsheet.current,libraryBase.jspreadsheet.current.resizing.row,e,libraryBase.jspreadsheet.current.resizing.height),libraryBase.jspreadsheet.current.resizing.element.classList.remove("resizing")}libraryBase.jspreadsheet.current.resizing=null}else if(libraryBase.jspreadsheet.current.dragging){if(libraryBase.jspreadsheet.current.dragging){if(libraryBase.jspreadsheet.current.dragging.column){let t=e.target.getAttribute("data-x");libraryBase.jspreadsheet.current.headers[libraryBase.jspreadsheet.current.dragging.column].classList.remove("dragging");for(let e=0;e<libraryBase.jspreadsheet.current.rows.length;e++)libraryBase.jspreadsheet.current.records[e][libraryBase.jspreadsheet.current.dragging.column]&&libraryBase.jspreadsheet.current.records[e][libraryBase.jspreadsheet.current.dragging.column].element.classList.remove("dragging");for(let e=0;e<libraryBase.jspreadsheet.current.headers.length;e++)libraryBase.jspreadsheet.current.headers[e].classList.remove("dragging-left"),libraryBase.jspreadsheet.current.headers[e].classList.remove("dragging-right");t&&libraryBase.jspreadsheet.current.dragging.column!=libraryBase.jspreadsheet.current.dragging.destination&&libraryBase.jspreadsheet.current.moveColumn(libraryBase.jspreadsheet.current.dragging.column,libraryBase.jspreadsheet.current.dragging.destination)}else{let e;libraryBase.jspreadsheet.current.dragging.element.nextSibling?(e=parseInt(libraryBase.jspreadsheet.current.dragging.element.nextSibling.getAttribute("data-y")),libraryBase.jspreadsheet.current.dragging.row<e&&(e-=1)):e=parseInt(libraryBase.jspreadsheet.current.dragging.element.previousSibling.getAttribute("data-y")),libraryBase.jspreadsheet.current.dragging.row!=libraryBase.jspreadsheet.current.dragging.destination&&moveRow.call(libraryBase.jspreadsheet.current,libraryBase.jspreadsheet.current.dragging.row,e,!0),libraryBase.jspreadsheet.current.dragging.element.classList.remove("dragging")}libraryBase.jspreadsheet.current.dragging=null}}else libraryBase.jspreadsheet.current.selectedCorner&&(libraryBase.jspreadsheet.current.selectedCorner=!1,libraryBase.jspreadsheet.current.selection.length>0&&(selection.kF.call(libraryBase.jspreadsheet.current,libraryBase.jspreadsheet.current.selection[0],libraryBase.jspreadsheet.current.selection[libraryBase.jspreadsheet.current.selection.length-1]),selection.gG.call(libraryBase.jspreadsheet.current)));libraryBase.jspreadsheet.timeControl&&(clearTimeout(libraryBase.jspreadsheet.timeControl),libraryBase.jspreadsheet.timeControl=null),libraryBase.jspreadsheet.isMouseAction=!1},mouseDownControls=function(e){let t;t=(e=e||window.event).buttons?e.buttons:e.button?e.button:e.which;let n=getElement(e.target);if(n[0]?libraryBase.jspreadsheet.current!=n[0].jssWorksheet&&(libraryBase.jspreadsheet.current&&(libraryBase.jspreadsheet.current.edition&&closeEditor.call(libraryBase.jspreadsheet.current,libraryBase.jspreadsheet.current.edition[0],!0),libraryBase.jspreadsheet.current.resetSelection()),libraryBase.jspreadsheet.current=n[0].jssWorksheet):libraryBase.jspreadsheet.current&&(libraryBase.jspreadsheet.current.edition&&closeEditor.call(libraryBase.jspreadsheet.current,libraryBase.jspreadsheet.current.edition[0],!0),e.target.classList.contains("jss_object")||(selection.gE.call(libraryBase.jspreadsheet.current,!0),libraryBase.jspreadsheet.current=null)),libraryBase.jspreadsheet.current&&1==t){if(e.target.classList.contains("jss_selectall"))libraryBase.jspreadsheet.current&&selection.Ub.call(libraryBase.jspreadsheet.current);else if(e.target.classList.contains("jss_corner"))0!=libraryBase.jspreadsheet.current.options.editable&&(libraryBase.jspreadsheet.current.selectedCorner=!0);else{if(1==n[1]){let t=e.target.getAttribute("data-x");if(t){let n=e.target.getBoundingClientRect();if(0!=libraryBase.jspreadsheet.current.options.columnResize&&n.width-e.offsetX<6){libraryBase.jspreadsheet.current.resizing={mousePosition:e.pageX,column:t,width:n.width},libraryBase.jspreadsheet.current.headers[t].classList.add("resizing");for(let e=0;e<libraryBase.jspreadsheet.current.records.length;e++)libraryBase.jspreadsheet.current.records[e][t]&&libraryBase.jspreadsheet.current.records[e][t].element.classList.add("resizing")}else if(0!=libraryBase.jspreadsheet.current.options.columnDrag&&n.height-e.offsetY<6)if(merges.Lt.call(libraryBase.jspreadsheet.current,t).length)console.error("Jspreadsheet: This column is part of a merged cell.");else{libraryBase.jspreadsheet.current.resetSelection(),libraryBase.jspreadsheet.current.dragging={element:e.target,column:t,destination:t},libraryBase.jspreadsheet.current.headers[t].classList.add("dragging");for(let e=0;e<libraryBase.jspreadsheet.current.records.length;e++)libraryBase.jspreadsheet.current.records[e][t]&&libraryBase.jspreadsheet.current.records[e][t].element.classList.add("dragging")}else{let n,l;libraryBase.jspreadsheet.current.selectedHeader&&(e.shiftKey||e.ctrlKey)?n=libraryBase.jspreadsheet.current.selectedHeader:(libraryBase.jspreadsheet.current.selectedHeader==t&&0!=libraryBase.jspreadsheet.current.options.allowRenameColumn&&(libraryBase.jspreadsheet.timeControl=setTimeout(function(){libraryBase.jspreadsheet.current.setHeader(t)},800)),libraryBase.jspreadsheet.current.selectedHeader=t,n=t),l=t,selection.AH.call(libraryBase.jspreadsheet.current,n,0,l,libraryBase.jspreadsheet.current.options.data.length-1,e)}}else if(e.target.parentNode.classList.contains("jss_nested")){let t,n;if(e.target.getAttribute("data-column")){let l=e.target.getAttribute("data-column").split(",");t=parseInt(l[0]),n=parseInt(l[l.length-1])}else t=0,n=libraryBase.jspreadsheet.current.options.columns.length-1;selection.AH.call(libraryBase.jspreadsheet.current,t,0,n,libraryBase.jspreadsheet.current.options.data.length-1,e)}}else libraryBase.jspreadsheet.current.selectedHeader=!1;if(2==n[1]){let t=parseInt(e.target.getAttribute("data-y"));if(e.target.classList.contains("jss_row")){let n=e.target.getBoundingClientRect();if(0!=libraryBase.jspreadsheet.current.options.rowResize&&n.height-e.offsetY<6)libraryBase.jspreadsheet.current.resizing={element:e.target.parentNode,mousePosition:e.pageY,row:t,height:n.height},e.target.parentNode.classList.add("resizing");else if(0!=libraryBase.jspreadsheet.current.options.rowDrag&&n.width-e.offsetX<6)merges.D0.call(libraryBase.jspreadsheet.current,t).length?console.error("Jspreadsheet: This row is part of a merged cell"):1==libraryBase.jspreadsheet.current.options.search&&libraryBase.jspreadsheet.current.results?console.error("Jspreadsheet: Please clear your search before perform this action"):(libraryBase.jspreadsheet.current.resetSelection(),libraryBase.jspreadsheet.current.dragging={element:e.target.parentNode,row:t,destination:t},e.target.parentNode.classList.add("dragging"));else{let n,l;null!=libraryBase.jspreadsheet.current.selectedRow&&(e.shiftKey||e.ctrlKey)?n=libraryBase.jspreadsheet.current.selectedRow:(libraryBase.jspreadsheet.current.selectedRow=t,n=t),l=t,selection.AH.call(libraryBase.jspreadsheet.current,null,n,null,l,e)}}else if(e.target.classList.contains("jclose")&&e.target.clientWidth-e.offsetX<50&&e.offsetY<50)closeEditor.call(libraryBase.jspreadsheet.current,libraryBase.jspreadsheet.current.edition[0],!0);else{let t=function(e){let n=e.getAttribute("data-x"),l=e.getAttribute("data-y");return n&&l?[n,l]:e.parentNode?t(e.parentNode):void 0},n=t(e.target);if(n){let t=n[0],l=n[1];libraryBase.jspreadsheet.current.edition&&(libraryBase.jspreadsheet.current.edition[2]==t&&libraryBase.jspreadsheet.current.edition[3]==l||closeEditor.call(libraryBase.jspreadsheet.current,libraryBase.jspreadsheet.current.edition[0],!0)),libraryBase.jspreadsheet.current.edition||(e.shiftKey?selection.AH.call(libraryBase.jspreadsheet.current,libraryBase.jspreadsheet.current.selectedCell[0],libraryBase.jspreadsheet.current.selectedCell[1],t,l,e):selection.AH.call(libraryBase.jspreadsheet.current,t,l,void 0,void 0,e)),libraryBase.jspreadsheet.current.selectedHeader=null,libraryBase.jspreadsheet.current.selectedRow=null}}}else libraryBase.jspreadsheet.current.selectedRow=!1;e.target.classList.contains("jss_page")&&("<"==e.target.textContent?libraryBase.jspreadsheet.current.page(0):">"==e.target.textContent?libraryBase.jspreadsheet.current.page(e.target.getAttribute("title")-1):libraryBase.jspreadsheet.current.page(e.target.textContent-1))}libraryBase.jspreadsheet.current.edition?libraryBase.jspreadsheet.isMouseAction=!1:libraryBase.jspreadsheet.isMouseAction=!0}else libraryBase.jspreadsheet.isMouseAction=!1},mouseMoveControls=function(e){if(((e=e||window.event).buttons?e.buttons:e.button?e.button:e.which)||(libraryBase.jspreadsheet.isMouseAction=!1),libraryBase.jspreadsheet.current)if(1==libraryBase.jspreadsheet.isMouseAction){if(libraryBase.jspreadsheet.current.resizing)if(libraryBase.jspreadsheet.current.resizing.column){let t=e.pageX-libraryBase.jspreadsheet.current.resizing.mousePosition;if(libraryBase.jspreadsheet.current.resizing.width+t>0){let e=libraryBase.jspreadsheet.current.resizing.width+t;libraryBase.jspreadsheet.current.cols[libraryBase.jspreadsheet.current.resizing.column].colElement.setAttribute("width",e),selection.Aq.call(libraryBase.jspreadsheet.current)}}else{let t=e.pageY-libraryBase.jspreadsheet.current.resizing.mousePosition;if(libraryBase.jspreadsheet.current.resizing.height+t>0){let e=libraryBase.jspreadsheet.current.resizing.height+t;libraryBase.jspreadsheet.current.rows[libraryBase.jspreadsheet.current.resizing.row].element.setAttribute("height",e),selection.Aq.call(libraryBase.jspreadsheet.current)}}else if(libraryBase.jspreadsheet.current.dragging)if(libraryBase.jspreadsheet.current.dragging.column){let t=e.target.getAttribute("data-x");if(t)if(merges.Lt.call(libraryBase.jspreadsheet.current,t).length)console.error("Jspreadsheet: This column is part of a merged cell.");else{for(let e=0;e<libraryBase.jspreadsheet.current.headers.length;e++)libraryBase.jspreadsheet.current.headers[e].classList.remove("dragging-left"),libraryBase.jspreadsheet.current.headers[e].classList.remove("dragging-right");libraryBase.jspreadsheet.current.dragging.column==t?libraryBase.jspreadsheet.current.dragging.destination=parseInt(t):e.target.clientWidth/2>e.offsetX?(libraryBase.jspreadsheet.current.dragging.column<t?libraryBase.jspreadsheet.current.dragging.destination=parseInt(t)-1:libraryBase.jspreadsheet.current.dragging.destination=parseInt(t),libraryBase.jspreadsheet.current.headers[t].classList.add("dragging-left")):(libraryBase.jspreadsheet.current.dragging.column<t?libraryBase.jspreadsheet.current.dragging.destination=parseInt(t):libraryBase.jspreadsheet.current.dragging.destination=parseInt(t)+1,libraryBase.jspreadsheet.current.headers[t].classList.add("dragging-right"))}}else{let t=e.target.getAttribute("data-y");if(t)if(merges.D0.call(libraryBase.jspreadsheet.current,t).length)console.error("Jspreadsheet: This row is part of a merged cell.");else{let t=e.target.clientHeight/2>e.offsetY?e.target.parentNode.nextSibling:e.target.parentNode;libraryBase.jspreadsheet.current.dragging.element!=t&&(e.target.parentNode.parentNode.insertBefore(libraryBase.jspreadsheet.current.dragging.element,t),libraryBase.jspreadsheet.current.dragging.destination=Array.prototype.indexOf.call(libraryBase.jspreadsheet.current.dragging.element.parentNode.children,libraryBase.jspreadsheet.current.dragging.element))}}}else{let t=e.target.getAttribute("data-x"),n=e.target.getAttribute("data-y"),l=e.target.getBoundingClientRect();libraryBase.jspreadsheet.current.cursor&&(libraryBase.jspreadsheet.current.cursor.style.cursor="",libraryBase.jspreadsheet.current.cursor=null),e.target.parentNode.parentNode&&e.target.parentNode.parentNode.className&&(e.target.parentNode.parentNode.classList.contains("resizable")&&(e.target&&t&&!n&&l.width-(e.clientX-l.left)<6?(libraryBase.jspreadsheet.current.cursor=e.target,libraryBase.jspreadsheet.current.cursor.style.cursor="col-resize"):e.target&&!t&&n&&l.height-(e.clientY-l.top)<6&&(libraryBase.jspreadsheet.current.cursor=e.target,libraryBase.jspreadsheet.current.cursor.style.cursor="row-resize")),e.target.parentNode.parentNode.classList.contains("draggable")&&(e.target&&!t&&n&&l.width-(e.clientX-l.left)<6||e.target&&t&&!n&&l.height-(e.clientY-l.top)<6)&&(libraryBase.jspreadsheet.current.cursor=e.target,libraryBase.jspreadsheet.current.cursor.style.cursor="move"))}},updateCopySelection=function(e,t){let n=this;selection.gG.call(n);let l=n.selectedContainer[0],o=n.selectedContainer[1],s=n.selectedContainer[2],r=n.selectedContainer[3];if(null!=e&&null!=t){let i,a,c,d;e-s>0?(i=parseInt(s)+1,a=parseInt(e)):(i=parseInt(e),a=parseInt(l)-1),t-r>0?(c=parseInt(r)+1,d=parseInt(t)):(c=parseInt(t),d=parseInt(o)-1),a-i<=d-c?(i=parseInt(l),a=parseInt(s)):(c=parseInt(o),d=parseInt(r));for(let e=c;e<=d;e++)for(let t=i;t<=a;t++)n.records[e][t]&&"none"!=n.rows[e].element.style.display&&"none"!=n.records[e][t].element.style.display&&(n.records[e][t].element.classList.add("selection"),n.records[c][t].element.classList.add("selection-top"),n.records[d][t].element.classList.add("selection-bottom"),n.records[e][i].element.classList.add("selection-left"),n.records[e][a].element.classList.add("selection-right"),n.selection.push(n.records[e][t].element))}},mouseOverControls=function(e){if(((e=e||window.event).buttons?e.buttons:e.button?e.button:e.which)||(libraryBase.jspreadsheet.isMouseAction=!1),libraryBase.jspreadsheet.current&&1==libraryBase.jspreadsheet.isMouseAction){let t=getElement(e.target);if(t[0]){if(libraryBase.jspreadsheet.current!=t[0].jssWorksheet&&libraryBase.jspreadsheet.current)return!1;let n=e.target.getAttribute("data-x"),l=e.target.getAttribute("data-y");if(libraryBase.jspreadsheet.current.resizing||libraryBase.jspreadsheet.current.dragging);else{if(1==t[1]&&libraryBase.jspreadsheet.current.selectedHeader){n=e.target.getAttribute("data-x");let t=libraryBase.jspreadsheet.current.selectedHeader,l=n;selection.AH.call(libraryBase.jspreadsheet.current,t,0,l,libraryBase.jspreadsheet.current.options.data.length-1,e)}if(2==t[1])if(e.target.classList.contains("jss_row")){if(null!=libraryBase.jspreadsheet.current.selectedRow){let t=libraryBase.jspreadsheet.current.selectedRow,n=l;selection.AH.call(libraryBase.jspreadsheet.current,0,t,libraryBase.jspreadsheet.current.options.data[0].length-1,n,e)}}else libraryBase.jspreadsheet.current.edition||n&&l&&(libraryBase.jspreadsheet.current.selectedCorner?updateCopySelection.call(libraryBase.jspreadsheet.current,n,l):libraryBase.jspreadsheet.current.selectedCell&&selection.AH.call(libraryBase.jspreadsheet.current,libraryBase.jspreadsheet.current.selectedCell[0],libraryBase.jspreadsheet.current.selectedCell[1],n,l,e))}}}libraryBase.jspreadsheet.timeControl&&(clearTimeout(libraryBase.jspreadsheet.timeControl),libraryBase.jspreadsheet.timeControl=null)},doubleClickControls=function(e){if(libraryBase.jspreadsheet.current)if(e.target.classList.contains("jss_corner")){if(libraryBase.jspreadsheet.current.highlighted.length>0){let e=libraryBase.jspreadsheet.current.highlighted[0].element.getAttribute("data-x"),t=parseInt(libraryBase.jspreadsheet.current.highlighted[libraryBase.jspreadsheet.current.highlighted.length-1].element.getAttribute("data-y"))+1,n=libraryBase.jspreadsheet.current.highlighted[libraryBase.jspreadsheet.current.highlighted.length-1].element.getAttribute("data-x"),l=libraryBase.jspreadsheet.current.records.length-1;selection.kF.call(libraryBase.jspreadsheet.current,libraryBase.jspreadsheet.current.records[t][e].element,libraryBase.jspreadsheet.current.records[l][n].element)}}else if(e.target.classList.contains("jss_column_filter")){let t=e.target.getAttribute("data-x");filter.N$.call(libraryBase.jspreadsheet.current,t)}else{let t=getElement(e.target);if(1==t[1]&&0!=libraryBase.jspreadsheet.current.options.columnSorting){let t=e.target.getAttribute("data-x");t&&libraryBase.jspreadsheet.current.orderBy(parseInt(t))}if(2==t[1]&&0!=libraryBase.jspreadsheet.current.options.editable&&!libraryBase.jspreadsheet.current.edition){let t=function(e){if(e.parentNode){let n=e.getAttribute("data-x"),l=e.getAttribute("data-y");return n&&l?e:t(e.parentNode)}},n=t(e.target);n&&n.classList.contains("highlight")&&openEditor.call(libraryBase.jspreadsheet.current,n,void 0,e)}}},pasteControls=function(e){libraryBase.jspreadsheet.current&&libraryBase.jspreadsheet.current.selectedCell&&(libraryBase.jspreadsheet.current.edition||0!=libraryBase.jspreadsheet.current.options.editable&&(e&&e.clipboardData?(paste.call(libraryBase.jspreadsheet.current,libraryBase.jspreadsheet.current.selectedCell[0],libraryBase.jspreadsheet.current.selectedCell[1],e.clipboardData.getData("text")),e.preventDefault()):window.clipboardData&&paste.call(libraryBase.jspreadsheet.current,libraryBase.jspreadsheet.current.selectedCell[0],libraryBase.jspreadsheet.current.selectedCell[1],window.clipboardData.getData("text"))))},getRole=function(e){if(e.classList.contains("jss_selectall"))return"select-all";if(e.classList.contains("jss_corner"))return"fill-handle";let t=e;for(;!t.classList.contains("jss_spreadsheet");){if(t.classList.contains("jss_row"))return"row";if(t.classList.contains("jss_nested"))return"nested";if(t.classList.contains("jtabs-headers"))return"tabs";if(t.classList.contains("jtoolbar"))return"toolbar";if(t.classList.contains("jss_pagination"))return"pagination";if("TBODY"===t.tagName)return"cell";if("TFOOT"===t.tagName)return 0===getElementIndex(e)?"grid":"footer";if("THEAD"===t.tagName)return"header";t=t.parentElement}return"applications"},defaultContextMenu=function(e,t,n,l){let o=[];if("header"===l&&(0!=e.options.allowInsertColumn&&o.push({title:jSuites.translate("Insert a new column before"),onclick:function(){e.insertColumn(1,parseInt(t),1)}}),0!=e.options.allowInsertColumn&&o.push({title:jSuites.translate("Insert a new column after"),onclick:function(){e.insertColumn(1,parseInt(t),0)}}),0!=e.options.allowDeleteColumn&&o.push({title:jSuites.translate("Delete selected columns"),onclick:function(){e.deleteColumn(e.getSelectedColumns().length?void 0:parseInt(t))}}),0!=e.options.allowRenameColumn&&o.push({title:jSuites.translate("Rename this column"),onclick:function(){let n=e.getHeader(t),l=prompt(jSuites.translate("Column name"),n);e.setHeader(t,l)}}),0!=e.options.columnSorting&&(o.push({type:"line"}),o.push({title:jSuites.translate("Order ascending"),onclick:function(){e.orderBy(t,0)}}),o.push({title:jSuites.translate("Order descending"),onclick:function(){e.orderBy(t,1)}}))),"row"!==l&&"cell"!==l||(0!=e.options.allowInsertRow&&(o.push({title:jSuites.translate("Insert a new row before"),onclick:function(){e.insertRow(1,parseInt(n),1)}}),o.push({title:jSuites.translate("Insert a new row after"),onclick:function(){e.insertRow(1,parseInt(n))}})),0!=e.options.allowDeleteRow&&o.push({title:jSuites.translate("Delete selected rows"),onclick:function(){e.deleteRow(e.getSelectedRows().length?void 0:parseInt(n))}})),"cell"===l&&0!=e.options.allowComments){o.push({type:"line"});let l=e.records[n][t].element.getAttribute("title")||"";o.push({title:jSuites.translate(l?"Edit comments":"Add comments"),onclick:function(){let o=prompt(jSuites.translate("C
1omments"),l);o&&e.setComments((0,helpers.getCellNameFromCoords)(t,n),o)}}),l&&o.push({title:jSuites.translate("Clear comments"),onclick:function(){e.setComments((0,helpers.getCellNameFromCoords)(t,n),"")}})}return 0!==o.length&&o.push({type:"line"}),"header"!==l&&"row"!==l&&"cell"!==l||(o.push({title:jSuites.translate("Copy")+"...",shortcut:"Ctrl + C",onclick:function(){copy.call(e,!0)}}),navigator&&navigator.clipboard&&o.push({title:jSuites.translate("Paste")+"...",shortcut:"Ctrl + V",onclick:function(){e.selectedCell&&navigator.clipboard.readText().then(function(t){t&&paste.call(e,e.selectedCell[0],e.selectedCell[1],t)})}})),0!=e.parent.config.allowExport&&o.push({title:jSuites.translate("Save as")+"...",shortcut:"Ctrl + S",onclick:function(){e.download()}}),0!=e.parent.config.about&&o.push({title:jSuites.translate("About"),onclick:function(){void 0===e.parent.config.about||!0===e.parent.config.about?alert(version.print()):alert(e.parent.config.about)}}),o},getElementIndex=function(e){let t=e.parentElement.children;for(let n=0;n<t.length;n++)if(e===t[n])return n;return -1},contextMenuControls=function(e){if("buttons"in(e=e||window.event)?e.buttons:e.which||e.button,libraryBase.jspreadsheet.current){let t=libraryBase.jspreadsheet.current.parent;if(libraryBase.jspreadsheet.current.edition)e.preventDefault();else if(t.contextMenu.contextmenu.close(),libraryBase.jspreadsheet.current){let n=getRole(e.target),l=null,o=null;if("cell"===n){let t=e.target;for(;"TD"!==t.tagName;)t=t.parentNode;o=t.getAttribute("data-y"),l=t.getAttribute("data-x"),(!libraryBase.jspreadsheet.current.selectedCell||l<parseInt(libraryBase.jspreadsheet.current.selectedCell[0])||l>parseInt(libraryBase.jspreadsheet.current.selectedCell[2])||o<parseInt(libraryBase.jspreadsheet.current.selectedCell[1])||o>parseInt(libraryBase.jspreadsheet.current.selectedCell[3]))&&selection.AH.call(libraryBase.jspreadsheet.current,l,o,l,o,e)}else if("row"===n||"header"===n)"row"===n?o=e.target.getAttribute("data-y"):l=e.target.getAttribute("data-x"),(!libraryBase.jspreadsheet.current.selectedCell||l<parseInt(libraryBase.jspreadsheet.current.selectedCell[0])||l>parseInt(libraryBase.jspreadsheet.current.selectedCell[2])||o<parseInt(libraryBase.jspreadsheet.current.selectedCell[1])||o>parseInt(libraryBase.jspreadsheet.current.selectedCell[3]))&&selection.AH.call(libraryBase.jspreadsheet.current,l,o,l,o,e);else if("nested"===n){let t=e.target.getAttribute("data-column").split(",");l=getElementIndex(e.target)-1,o=getElementIndex(e.target.parentElement),libraryBase.jspreadsheet.current.selectedCell&&t[0]==parseInt(libraryBase.jspreadsheet.current.selectedCell[0])&&t[t.length-1]==parseInt(libraryBase.jspreadsheet.current.selectedCell[2])&&null==libraryBase.jspreadsheet.current.selectedCell[1]&&null==libraryBase.jspreadsheet.current.selectedCell[3]||selection.AH.call(libraryBase.jspreadsheet.current,t[0],null,t[t.length-1],null,e)}else"select-all"===n?selection.Ub.call(libraryBase.jspreadsheet.current):"tabs"===n?l=getElementIndex(e.target):"footer"===n&&(l=getElementIndex(e.target)-1,o=getElementIndex(e.target.parentElement));let s=defaultContextMenu(libraryBase.jspreadsheet.current,parseInt(l),parseInt(o),n);if("function"==typeof t.config.contextMenu){let r=t.config.contextMenu(libraryBase.jspreadsheet.current,l,o,e,s,n,l,o);if(r)s=r;else if(!1===r)return}"object"==typeof t.plugins&&Object.entries(t.plugins).forEach(function([,t]){if("function"==typeof t.contextMenu){let r=t.contextMenu(libraryBase.jspreadsheet.current,null!==l?parseInt(l):null,null!==o?parseInt(o):null,e,s,n,null!==l?parseInt(l):null,null!==o?parseInt(o):null);r&&(s=r)}}),t.contextMenu.contextmenu.open(e,s),e.preventDefault()}}},touchStartControls=function(e){let t=getElement(e.target);if(t[0]?libraryBase.jspreadsheet.current!=t[0].jssWorksheet&&(libraryBase.jspreadsheet.current&&libraryBase.jspreadsheet.current.resetSelection(),libraryBase.jspreadsheet.current=t[0].jssWorksheet):libraryBase.jspreadsheet.current&&(libraryBase.jspreadsheet.current.resetSelection(),libraryBase.jspreadsheet.current=null),libraryBase.jspreadsheet.current&&!library
vendor: 5,597 bytes, line 1
1Base.jspreadsheet.current.edition){let t=e.target.getAttribute("data-x"),n=e.target.getAttribute("data-y");t&&n&&(selection.AH.call(libraryBase.jspreadsheet.current,t,n,void 0,void 0,e),libraryBase.jspreadsheet.timeControl=setTimeout(function(){"color"==libraryBase.jspreadsheet.current.options.columns[t].type?libraryBase.jspreadsheet.tmpElement=null:libraryBase.jspreadsheet.tmpElement=e.target,openEditor.call(libraryBase.jspreadsheet.current,e.target,!1,e)},500))}},touchEndControls=function(e){libraryBase.jspreadsheet.timeControl&&(clearTimeout(libraryBase.jspreadsheet.timeControl),libraryBase.jspreadsheet.timeControl=null,libraryBase.jspreadsheet.tmpElement&&"INPUT"==libraryBase.jspreadsheet.tmpElement.children[0].tagName&&libraryBase.jspreadsheet.tmpElement.children[0].focus(),libraryBase.jspreadsheet.tmpElement=null)},cutControls=function(e){libraryBase.jspreadsheet.current&&(libraryBase.jspreadsheet.current.edition||(copy.call(libraryBase.jspreadsheet.current,!0,void 0,void 0,void 0,void 0,!0),0!=libraryBase.jspreadsheet.current.options.editable&&libraryBase.jspreadsheet.current.setValue(libraryBase.jspreadsheet.current.highlighted.map(function(e){return e.element}),"")))},copyControls=function(e){libraryBase.jspreadsheet.current&©Controls.enabled&&(libraryBase.jspreadsheet.current.edition||copy.call(libraryBase.jspreadsheet.current,!0))},isMac=function(){return navigator.platform.toUpperCase().indexOf("MAC")>=0},isCtrl=function(e){return isMac()?e.metaKey:e.ctrlKey},keyDownControls=function(e){if(libraryBase.jspreadsheet.current){if(libraryBase.jspreadsheet.current.edition)if(27==e.which)libraryBase.jspreadsheet.current.edition&&closeEditor.call(libraryBase.jspreadsheet.current,libraryBase.jspreadsheet.current.edition[0],!1),e.preventDefault();else if(13==e.which)if(libraryBase.jspreadsheet.current.options.columns&&libraryBase.jspreadsheet.current.options.columns[libraryBase.jspreadsheet.current.edition[2]]&&"calendar"==libraryBase.jspreadsheet.current.options.columns[libraryBase.jspreadsheet.current.edition[2]].type)closeEditor.call(libraryBase.jspreadsheet.current,libraryBase.jspreadsheet.current.edition[0],!0);else if(libraryBase.jspreadsheet.current.options.columns&&libraryBase.jspreadsheet.current.options.columns[libraryBase.jspreadsheet.current.edition[2]]&&"dropdown"==libraryBase.jspreadsheet.current.options.columns[libraryBase.jspreadsheet.current.edition[2]].type);else if((1==libraryBase.jspreadsheet.current.options.wordWrap||libraryBase.jspreadsheet.current.options.columns&&libraryBase.jspreadsheet.current.options.columns[libraryBase.jspreadsheet.current.edition[2]]&&1==libraryBase.jspreadsheet.current.options.columns[libraryBase.jspreadsheet.current.edition[2]].wordWrap||libraryBase.jspreadsheet.current.options.data[libraryBase.jspreadsheet.current.edition[3]][libraryBase.jspreadsheet.current.edition[2]]&&libraryBase.jspreadsheet.current.options.data[libraryBase.jspreadsheet.current.edition[3]][libraryBase.jspreadsheet.current.edition[2]].length>200)&&e.altKey){let e=libraryBase.jspreadsheet.current.edition[0].children[0],t=libraryBase.jspreadsheet.current.edition[0].children[0].value,n=e.selectionStart;e.value=t=t.slice(0,n)+"\n"+t.slice(n),e.focus(),e.selectionStart=n+1,e.selectionEnd=n+1}else libraryBase.jspreadsheet.current.edition[0].children[0].blur();else 9==e.which&&(libraryBase.jspreadsheet.current.options.columns&&libraryBase.jspreadsheet.current.options.columns[libraryBase.jspreadsheet.current.edition[2]]&&["calendar","html"].includes(libraryBase.jspreadsheet.current.options.columns[libraryBase.jspreadsheet.current.edition[2]].type)?closeEditor.call(libraryBase.jspreadsheet.current,libraryBase.jspreadsheet.current.edition[0],!0):libraryBase.jspreadsheet.current.edition[0].children[0].blur());if(!libraryBase.jspreadsheet.current.edition&&libraryBase.jspreadsheet.current.selectedCell){if(37==e.which)left.call(libraryBase.jspreadsheet.current,e.shiftKey,e.ctrlKey),e.preventDefault();else if(39==e.which)right.call(libraryBase.jspreadsheet.current,e.shiftKey,e.ctrlKey),e.preventDefault();else if(38==e.which)up.call(libraryBase.jspreadsheet.current,e.shiftKey,e.ctrlKey),e.preventDefault();else if(40==e.which)down.call(libraryBase.jspreadsheet.current,e.shiftKey,e.ctrlKey),e.preventDefault();else if(36==e.which)first.call(libraryBase.jspreadsheet.current,e.shiftKey,e.ctrlKey),e.preventDefault();else if(35==e.which)last.call(libraryBase.jspreadsheet.current,e.shiftKey,e.ctrlKey),e.preventDefault();else if(46==e.which||8==e.which)0!=libraryBase.jspreadsheet.current.options.editable&&(null!=libraryBase.jspreadsheet.current.selectedRow?0!=libraryBase.jspreadsheet.current.options.allowDeleteRow&&confirm(jSuites.translate("Are you sure to delete the selected rows?"))&&libraryBase.jspreadsheet.current.deleteRow():libraryBase.jspreadsheet.current.selectedHeader?0!=libraryBase.jspreadsheet.current.options.allowDeleteColumn&&confirm(jSuites.translate("Are you sure to delete the selected columns?"))&&libraryBase.jspreadsheet.current.deleteColumn():libraryBase.jspreadsheet.current.setValue(libraryBase.jspreadsheet.current.highlighted.map(function(e){return e.element}),""));else if(13==e.which)e.shiftKey?up.call(libraryBase.jspreadsheet.current):(0!=libraryBase.jspreadsheet.current.options.allowInsertRow&&0!=libraryBase.jspreadsheet.current.options.allowManualInsertRow&&libraryBase.jspreadsheet.current.selectedCell[1]==libraryBase.jspreadsheet.current.options.data.length-1&&libraryBase.jspreadsheet.current.insertRow(),down.call(libraryBase.jspreadsheet.current)),e.preventDefault();
1else if(9==e.which)e.shiftKey?left.call(libraryBase.jspreadsheet.current):(0!=libraryBase.jspreadsheet.current.options.allowInsertColumn&&0!=libraryBase.jspreadsheet.current.options.allowManualInsertColumn&&libraryBase.jspreadsheet.current.selectedCell[0]==libraryBase.jspreadsheet.current.options.data[0].length-1&&libraryBase.jspreadsheet.current.insertColumn(),right.call(libraryBase.jspreadsheet.current)),e.preventDefault();else if((e.ctrlKey||e.metaKey)&&!e.shiftKey)65==e.which?(selection.Ub.call(libraryBase.jspreadsheet.current),e.preventDefault()):83==e.which?(libraryBase.jspreadsheet.current.download(),e.preventDefault()):89==e.which?(libraryBase.jspreadsheet.current.redo(),e.preventDefault()):90==e.which?(libraryBase.jspreadsheet.current.undo(),e.preventDefault()):67==e.which?(copy.call(libraryBase.jspreadsheet.current,!0),e.preventDefault()):88==e.which?(0!=libraryBase.jspreadsheet.current.options.editable?cutControls():copyControls(),e.preventDefault()):86==e.which&&pasteControls();else if(libraryBase.jspreadsheet.current.selectedCell&&0!=libraryBase.jspreadsheet.current.options.editable){let t=libraryBase.jspreadsheet.current.selectedCell[1],n=libraryBase.jspreadsheet.current.selectedCell[0];32==e.keyCode?(e.preventDefault(),"checkbox"==libraryBase.jspreadsheet.current.options.columns[n].type||"radio"==libraryBase.jspreadsheet.current.options.columns[n].type?setCheckRadioValue.call(libraryBase.jspreadsheet.current):openEditor.call(libraryBase.jspreadsheet.current,libraryBase.jspreadsheet.current.records[t][n].element,!0,e)):113==e.keyCode?openEditor.call(libraryBase.jspreadsheet.current,libraryBase.jspreadsheet.current.records[t][n].element,!1,e):1!==e.key.length&&"Process"!==e.key||e.altKey||isCtrl(e)||(openEditor.call(libraryBase.jspreadsheet.current,libraryBase.jspreadsheet.current.records[t][n].element,!0,e),libraryBase.jspreadsheet.current.options.columns&&libraryBase.jspreadsheet.current.options.columns[n]&&"calendar"==libraryBase.jspreadsheet.current.options.columns[n].type&&e.preventDefault())}}else e.target.classList.contains("jss_search")&&(libraryBase.jspreadsheet.timeControl&&clearTimeout(libraryBase.jspreadsheet.timeControl),libraryBase.jspreadsheet.timeControl=setTimeout(function(){libraryBase.jspreadsheet.current.search(e.target.value)},200))}},wheelControls=function(e){let t=this;1==t.options.lazyLoading&&null==libraryBase.jspreadsheet.timeControl
1Loading&&(libraryBase.jspreadsheet.timeControlLoading=setTimeout(function(){t.content.scrollTop+t.content.clientHeight>=t.content.scrollHeight-10?lazyLoading.p6.call(t)&&(t.content.scrollTop+t.content.clientHeight>t.content.scrollHeight-10&&(t.content.scrollTop=t.content.scrollTop-t.content.clientHeight),selection.Aq.call(t)):t.content.scrollTop<=t.content.clientHeight&&lazyLoading.G_.call(t)&&(t.content.scrollTop<10&&(t.content.scrollTop=t.content.scrollTop+t.content.clientHeight),selection.Aq.call(t)),libraryBase.jspreadsheet.timeControlLoading=null},100))},scrollLeft=0,updateFreezePosition=function(){let e=this;scrollLeft=e.content.scrollLeft;let t=0;if(scrollLeft>50)for(let n=0;n<e.options.freezeColumns;n++){!(n>0)||e.options.columns&&e.options.columns[n-1]&&"hidden"===e.options.columns[n-1].type||(t+=parseInt(e.options.columns&&e.options.columns[n-1]&&void 0!==e.options.columns[n-1].width?parseInt(e.options.columns[n-1].width):void 0!==e.options.defaultColWidth?parseInt(e.options.defaultColWidth):100)),e.headers[n].classList.add("jss_freezed"),e.headers[n].style.left=t+"px";for(let t=0;t<e.rows.length;t++)if(e.rows[t]&&e.records[t][n]){let l=scrollLeft+(n>0?e.records[t][n-1].element.style.width:0)-51+"px";e.records[t][n].element.classList.add("jss_freezed"),e.records[t][n].element.style.left=l}}else for(let t=0;t<e.options.freezeColumns;t++){e.headers[t].classList.remove("jss_freezed"),e.headers[t].style.left="";for(let n=0;n<e.rows.length;n++)e.records[n][t]&&(e.records[n][t].element.classList.remove("jss_freezed"),e.records[n][t].element.style.left="")}selection.Aq.call(e)},scrollControls=function(e){let t=this;wheelControls.call(t),t.options.freezeColumns>0&&t.content.scrollLeft!=scrollLeft&&updateFreezePosition.call(t),1!=t.options.lazyLoading&&1!=t.options.tableOverflow||t.edition&&"jdropdown"!=e.target.className.substr(0,9)&&closeEditor.call(t,t.edition[0],!0)},setEvents=function(e){destroyEvents(e),e.addEventListener("mouseup",mouseUpControls),e.addEventListener("mousedown",mouseDownControls),e.addEventListener("mousemove",mouseMoveControls),e.addEventListener("mouseover",mouseOverControls),e.addEventListener("dblclick",doubleClickControls),e.addEventListener("paste",pasteControls),e.addEventListener("contextmenu",contextMenuControls),e.addEventListener("touchstart",touchStartControls),e.addEventListener("touchend",touchEndControls),e.addEventListener("touchcancel",touchEndControls),e.addEventListener("touchmove",touchEndControls),document.addEventListener("keydown",keyDownControls)},destroyEvents=function(e){e.removeEventListener("mouseup",mouseUpControls),e.removeEventListener("mousedown",mouseDownControls),e.removeEventListener("mousemove",mouseMoveControls),e.removeEventListener("mouseover",mouseOverControls),e.removeEventListener("dblclick",doubleClickControls),e.removeEventListener("paste",pasteControls),e.removeEventListener("contextmenu",contextMenuControls),e.removeEventListener("touchstart",touchStartControls),e.removeEventListener("touchend",touchEndControls),e.removeEventListener("touchcancel",touchEndControls),document.removeEventListener("keydown",keyDownControls)};var toolbar=__nested_webpack_require_64087__(392),pagination=__nested_webpack_require_64087__(167);let setData=function(e){let t,n,l=this;if(e&&(l.options.data=e),l.options.data||(l.options.data=[]),l.options.data&&l.options.data[0]&&!Array.isArray(l.options.data[0])){e=[];for(let t=0;t<l.options.data.length;t++){let n=[];for(let e=0;e<l.options.columns.length;
vendor: 14,315 bytes, line 1
1e++)n[e]=l.options.data[t][l.options.columns[e].name];e.push(n)}l.options.data=e}let o=0,s=0,r=l.options.columns&&l.options.columns.length||0,i=l.options.data.length,a=l.options.minDimensions[0],c=l.options.minDimensions[1],d=a>r?a:r,p=c>i?c:i;for(o=0;o<p;o++)for(s=0;s<d;s++)null==l.options.data[o]&&(l.options.data[o]=[]),null==l.options.data[o][s]&&(l.options.data[o][s]="");for(l.rows=[],l.results=null,l.records=[],l.history=[],l.historyIndex=-1,l.tbody.innerHTML="",1==l.options.lazyLoading?(t=0,n=l.options.data.length<100?l.options.data.length:100,l.options.pagination&&(l.options.pagination=!1,console.error("Jspreadsheet: Pagination will be disable due the lazyLoading"))):l.options.pagination?(l.pageNumber||(l.pageNumber=0),l.options.pagination,t=l.options.pagination*l.pageNumber,n=l.options.pagination*l.pageNumber+l.options.pagination,l.options.data.length<n&&(n=l.options.data.length)):(t=0,n=l.options.data.length),o=0;o<l.options.data.length;o++){let e=createRow.call(l,o,l.options.data[o]);o>=t&&o<n&&l.tbody.appendChild(e.element)}if(1==l.options.lazyLoading||l.options.pagination&&pagination.IV.call(l),l.options.mergeCells){let e=Object.keys(l.options.mergeCells);for(let t=0;t<e.length;t++){let n=l.options.mergeCells[e[t]];merges.FU.call(l,e[t],n[0],n[1],1)}}internal.am.call(l)},getValue=function(e,t){let n,l,o=this;if("string"!=typeof e)return null;n=(e=(0,internalHelpers.vu)(e,!0))[0],l=e[1];let s=null;return null!=n&&null!=l&&(o.records[l]&&o.records[l][n]&&t?s=o.records[l][n].element.innerHTML:o.options.data[l]&&"undefined"!=o.options.data[l][n]&&(s=o.options.data[l][n])),s},getValueFromCoords=function(e,t,n){let l=this,o=null;return null!=e&&null!=t&&(l.records[t]&&l.records[t][e]&&n?o=l.records[t][e].element.innerHTML:l.options.data[t]&&"undefined"!=l.options.data[t][e]&&(o=l.options.data[t][e])),o},setValue=function(e,t,n){let l=this,o=[];if("string"==typeof e){let s=(0,internalHelpers.vu)(e,!0),r=s[0],i=s[1];o.push(internal.k9.call(l,r,i,t,n)),internal.xF.call(l,r,i,o)}else{let s=null,r=null;if(e&&e.getAttribute&&(s=e.getAttribute("data-x"),r=e.getAttribute("data-y")),null!=s&&null!=r)o.push(internal.k9.call(l,s,r,t,n)),internal.xF.call(l,s,r,o);else{let s=Object.keys(e);if(s.length>0)for(let r=0;r<s.length;r++){let s,i;if("string"==typeof e[r]){let t=(0,internalHelpers.vu)(e[r],!0);s=t[0],i=t[1]}else null!=e[r].x&&null!=e[r].y?(s=e[r].x,i=e[r].y,null!=e[r].value&&(t=e[r].value)):(s=e[r].getAttribute("data-x"),i=e[r].getAttribute("data-y"));null!=s&&null!=i&&(o.push(internal.k9.call(l,s,i,t,n)),internal.xF.call(l,s,i,o))}}}utils_history.Dh.call(l,{action:"setValue",records:o,selection:l.selectedCell}),internal.am.call(l);let s=o.map(function(e){return{x:e.x,y:e.y,value:e.value,oldValue:e.oldValue}});dispatch.A.call(l,"onafterchanges",l,s)},setValueFromCoords=function(e,t,n,l){let o=this,s=[];s.push(internal.k9.call(o,e,t,n,l)),internal.xF.call(o,e,t,s),utils_history.Dh.call(o,{action:"setValue",records:s,selection:o.selectedCell}),internal.am.call(o);let r=s.map(function(e){return{x:e.x,y:e.y,value:e.value,oldValue:e.oldValue}});dispatch.A.call(o,"onafterchanges",o,r)},getData=function(e,t,n,l){let o=this,s=[],r=0,i=0,a=Math.max(...o.options.data.map(function(e){return e.length})),c=o.options.data.length;for(let n=0;n<c;n++){r=0;for(let l=0;l<a;l++)e&&!o.records[n][l].element.classList.contains("highlight")||(s[i]||(s[i]=[]),s[i][r]=t?o.records[n][l].element.innerHTML:o.options.data[n][l],r++);r>0&&i++}return n?s.map(function(e){return e.join(n)}).join("\r\n")+"\r\n":l?s.map(function(e){let t={};return e.forEach(function(e,n){t[n]=e}),t}):s},getDataFromRange=function(e,t){let n=this,l=(0,helpers.getCoordsFromRange)(e),o=[];for(let e=l[1];e<=l[3];e++){o.push([]);for(let s=l[0];s<=l[2];s++)t?o[o.length-1].push(n.records[e][s].element.innerHTML):o[o.length-1].push(n.options.data[e][s])}return o},search=function(e){let t=this;if(t.options.filters&&filter.dr.call(t),t.resetSelection(),t.pageNumber=0,t.results=[],e){t.searchInput.value!==e&&(t.searchInput.value=e);let n=function(e,n,l){for(let o=0;o<e.length;o++)if((""+e[o]).toLowerCase().search(n)>=0||(""+t.records[l][o].element.innerHTML).toLowerCase().search(n)>=0)return!0;return!1},l=function(e){-1==t.results.indexOf(e)&&t.results.push(e)},o=e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");o=RegExp(o,"i"),t.options.data.forEach(function(e,s){if(n(e,o,s)){let e=merges.D0.call(t,s);if(e.length)for(let n=0;n<e.length;n++){let o=(0,internalHelpers.vu)(e[n],!0);for(let s=0;s<t.options.mergeCells[e[n]][1];s++)l(o[1]+s)}else l(s)}})}else t.results=null;internal.hG.call(t)},resetSearch=function(){let e=this;e.searchInput.value="",e.search(""),e.results=null},getHeader=function(e){return this.headers[e].textContent},getHeaders=function(e){let t=this,n=[];for(let e=0;e<t.headers.length;e++)n.push(t.getHeader(e));return e?n:n.join(t.options.csvDelimiter)},setHeader=function(e,t){let n=this;if(n.headers[e]){let l=n.headers[e].textContent,o=n.options.columns&&n.options.columns[e]&&n.options.columns[e].title||"";t||(t=(0,helpers.getColumnName)(e)),n.headers[e].textContent=t,n.headers[e].setAttribute("title",t),n.options.columns||(n.options.columns=[]),n.options.columns[e]||(n.options.columns[e]={}),n.options.columns[e].title=t,utils_history.Dh.call(n,{action:"setHeader",column:e,oldValue:l,newValue:t}),dispatch.A.call(n,"onchangeheader",n,parseInt(e),t,o)}},getStyle=function(e,t){let n=this;if(e)return e=(0,internalHelpers.vu)(e,!0),t?n.records[e[1]][e[0]].element.style[t]:n.records[e[1]][e[0]].element.getAttribute("style");{let e={},l=n.options.data[0].length,o=n.options.data.length;for(let s=0;s<o;s++)for(let o=0;o<l;o++){let l=t?n.records[s][o].element.style[t]:n.records[s][o].element.getAttribute("style");l&&(e[(0,internalHelpers.t3)([o,s])]=l)}return e}},setStyle=function(e,t,n,l,o){let s=this,r={},i={},a=function(e,t,n){let o=(0,internalHelpers.vu)(e,!0);if(s.records[o[1]]&&s.records[o[1]][o[0]]&&(0==s.records[o[1]][o[0]].element.classList.contains("readonly")||l)){let a=s.records[o[1]][o[0]].element.style[t];a!=n||l?s.records[o[1]][o[0]].element.style[t]=n:(n="",s.records[o[1]][o[0]].element.style[t]=""),i[e]||(i[e]=[]),r[e]||(r[e]=[]),i[e].push([t+":"+a]),r[e].push([t+":"+n])}};if(t&&n)"string"==typeof e&&a(e,t,n);else{let t=Object.keys(e);for(let n=0;n<t.length;n++){let l=e[t[n]];"string"==typeof l&&(l=l.split(";"));for(let e=0;e<l.length;e++)"string"==typeof l[e]&&(l[e]=l[e].split(":")),l[e][0].trim()&&a(t[n],l[e][0].trim(),l[e][1])}}let c=Object.keys(i);for(let e=0;e<c.length;e++)i[c[e]]=i[c[e]].join(";");c=Object.keys(r);for(let e=0;e<c.length;e++)r[c[e]]=r[c[e]].join(";");o||utils_history.Dh.call(s,{action:"setStyle",oldValue:i,newValue:r}),dispatch.A.call(s,"onchangestyle",s,r)},resetStyle=function(e,t){let n=this,l=Object.keys(e);for(let e=0;e<l.length;e++){let t=(0,internalHelpers.vu)(l[e],!0);n.records[t[1]]&&n.records[t[1]][t[0]]&&n.records[t[1]][t[0]].element.setAttribute("style","")}n.setStyle(e,null,null,null,t)},download=function(e,t){let n=this;if(0==n.parent.config.allowExport)console.error("Export not allowed");else{let l="",o=new Blob(["\uFEFF"+(l+=copy.call(n,!1,n.options.csvDelimiter,!0,e,!0,void 0,t))],{type:"text/csv;charset=utf-8;"});if(window.navigator&&window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(o,(n.options.csvFileName||n.options.worksheetName)+".csv");else{let e=document.createElement("a");e.setAttribute("target","_top"),e.href=URL.createObjectURL(o),e.setAttribute("download",(n.options.csvFileName||n.options.worksheetName)+".csv"),document.body.appendChild(e),e.click(),e.parentNode.removeChild(e)}}},getComments=function(e){let t=this;if(e)return"string"!=typeof e?getComments.call(t):(e=(0,internalHelpers.vu)(e,!0),t.records[e[1]][e[0]].element.getAttribute("title")||"");{let e={};for(let n=0;n<t.options.data.length;n++)for(let l=0;l<t.options.columns.length;l++){let o=t.records[n][l].element.getAttribute("title");o&&(e[(0,internalHelpers.t3)([l,n])]=o)}return e}},setComments=function(e,t){let n,l=this,o={};Object.entries(n="string"==typeof e?{[e]:t}:e).forEach(function([e,t]){let n=(0,helpers.getCoordsFromCellName)(e);o[e]=l.records[n[1]][n[0]].element.getAttribute("title"),l.records[n[1]][n[0]].element.setAttribute("title",t||""),t?(l.records[n[1]][n[0]].element.classList.add("jss_comments"),l.options.comments||(l.options.comments={}),l.options.comments[e]=t):(l.records[n[1]][n[0]].element.classList.remove("jss_comments"),l.options.comments&&l.options.comments[e]&&delete l.options.comments[e])}),utils_history.Dh.call(l,{action:"setComments",newValue:n,oldValue:o}),dispatch.A.call(l,"oncomments",l,n,o)};var orderBy=__nested_webpack_require_64087__(94);let getWorksheetConfig=function(){return this.options},getSpreadsheetConfig=function(){return this.config},setConfig=function(e,t){let n,l=this,o=Object.keys(e);l.parent?n=l.parent:(t=!0,n=l),o.forEach(function(o){t?(n.config[o]=e[o],"toolbar"===o&&(!0===e[o]?n.showToolbar():!1===e[o]&&n.hideToolbar())):l.options[o]=e[o]})};var meta=__nested_webpack_require_64087__(654);let setReadOnly=function(e,t){let n,l=this;if("string"==typeof e){let t=(0,helpers.getCoordsFromCellName)(e);n=l.records[t[1]][t[0]]}else{let t=parseInt(e.getAttribute("data-x")),o=parseInt(e.getAttribute("data-y"));n=l.records[o][t]}t?n.element.classList.add("readonly"):n.element.classList.remove("readonly")},isReadOnly=function(e,t){if("string"==typeof e&&void 0===t){let n=(0,helpers.getCoordsFromCellName)(e);[e,t]=n}return this.records[t][e].element.classList.contains("readonly")},setWorksheetFunctions=function(e){for(let t=0;t<worksheetPublicMethodsLength;t++){let[n,l]=worksheetPublicMethods[t];e[n]=l.bind(e)}},createTable=function(){let e=this;setWorksheetFunctions(e),e.table=document.createElement("table"),e.thead=document.createElement("thead"),e.tbody=document.createElement("tbody"),e.headers=[],e.cols=[],e.content=document.createElement("div"),e.content.classList.add("jss_content"),e.content.onscroll=function(t){scrollControls.call(e,t)},e.content.onwheel=function(t){wheelControls.call(e,t)};let t=document.createElement("div"),n=document.createElement("label");n.innerHTML=jSuites.translate("Search")+": ",t.appendChild(n),e.searchInput=document.createElement("input"),e.searchInput.classList.add("jss_search"),n.appendChild(e.searchInput),e.searchInput.onfocus=function(){e.resetSelection()};let l=document.createElement("div");if(e.options.pagination>0&&e.options.paginationOptions&&e.options.paginationOptions.length>0){e.paginationDropdown=document.createElement("select"),e.paginationDropdown.classList.add("jss_pagination_dropdown"),e.paginationDropdown.onchange=function(){e.options.pagination=parseInt(this.value),e.page(0)};for(let t=0;t<e.options.paginationOptions.length;t++){let n=document.createElement("option");n.value=e.options.paginationOptions[t],n.innerHTML=e.options.paginationOptions[t],e.paginationDropdown.appendChild(n)}e.paginationDropdown.value=e.options.pagination,l.appendChild(document.createTextNode(jSuites.translate("Show "))),l.appendChild(e.paginationDropdown),l.appendChild(document.createTextNode(jSuites.translate("entries")))}let o=document.createElement("div");o.classList.add("jss_filter"),o.appendChild(l),o.appendChild(t),e.colgroupContainer=document.createElement("colgroup");let s=document.createElement("col");if(s.setAttribute("width","50"),e.colgroupContainer.appendChild(s),e.options.nestedHeaders&&e.options.nestedHeaders.length>0&&e.options.nestedHeaders[0]&&e.options.nestedHeaders[0][0])for(let t=0;t<e.options.nestedHeaders.length;t++)e.thead.appendChild(internal.ju.call(e,e.options.nestedHeaders[t]));e.headerContainer=document.createElement("tr"),(s=document.createElement("td")).classList.add("jss_selectall"),e.headerContainer.appendChild(s);let r=getNumberOfColumns.call(e);for(let t=0;t<r;t++)createCellHeader.call(e,t),e.headerContainer.appendChild(e.headers[t]),e.colgroupContainer.appendChild(e.cols[t].colElement);if(e.thead.appendChild(e.headerContainer),1==e.options.filters){e.filter=document.createElement("tr");let t=document.createElement("td");e.filter.appendChild(t);for(let t=0;t<e.options.columns.length;t++){let n=document.createElement("td");n.innerHTML=" ",n.setAttribute("data-x",t),n.className="jss_column_filter","hidden"==e.options.columns[t].type&&(n.style.display="none"),e.filter.appendChild(n)}e.thead.appendChild(e.filter)}e.table=document.createElement("table"),e.table.classList.add("jss_worksheet"),e.table.setAttribute("cellpadding","0"),e.table.setAttribute("cellspacing","0"),e.table.setAttribute("unselectable","yes"),e.table.appendChild(e.colgroupContainer),e.table.appendChild(e.thead),e.table.appendChild(e.tbody),e.options.textOverflow||e.table.classList.add("jss_overflow"),e.corner=document.createElement("div"),e.corner.className="jss_corner",e.corner.setAttribute("unselectable","on"),e.corner.setAttribute("onselectstart","return false"),0==e.options.selectionCopy&&(e.corner.style.display="none"),e.textarea=document.createElement("textarea"),e.textarea.className="jss_textarea",e.textarea.id="jss_textarea",e.textarea.tabIndex="-1",e.textarea.ariaHidden="true";let i=document.createElement("a");i.setAttribute("href","https://bossanova.uk/jspreadsheet/"),e.ads=document.createElement("div"),e.ads.className="jss_about";let a=document.createElement("span");a.innerHTML="Jspreadsheet CE",i.appendChild(a),e.ads.appendChild(i),document.createElement("div").classList.add("jss_table"),e.pagination=document.createElement("div"),e.pagination.classList.add("jss_pagination");let c=document.createElement("div"),d=document.createElement("div");if(e.pagination.appendChild(c),e.pagination.appendChild(d),e.options.pagination||(e.pagination.style.display="none"),1==e.options.search&&e.element.appendChild(o),e.content.appendChild(e.table),e.content.appendChild(e.corner),e.content.appendChild(e.textarea),e.element.appendChild(e.content),e.element.appendChild(e.pagination),e.element.appendChild(e.ads),e.element.classList.add("jss_container"),e.element.jssWorksheet=e,e.element.jspreadsheet=e,1==e.options.tableOverflow&&(e.options.tableHeight&&(e.content.style["overflow-y"]="auto",e.content.style["box-shadow"]="rgb(221 221 221) 2px 2px 5px 0.1px",e.content.style.maxHeight="string"==typeof e.o
1ptions.tableHeight?e.options.tableHeight:e.options.tableHeight+"px"),e.options.tableWidth&&(e.content.style["overflow-x"]="auto",e.content.style.width="string"==typeof e.options.tableWidth?e.options.tableWidth:e.options.tableWidth+"px")),1!=e.options.tableOverflow&&e.parent.config.toolbar&&e.element.classList.add("with-toolbar"),0!=e.options.columnDrag&&e.thead.classList.add("draggable"),0!=e.options.columnResize&&e.thead.classList.add("resizable"),0!=e.options.rowDrag&&e.tbody.classList.add("draggable"),0!=e.options.rowResize&&e.tbody.classList.add("resizable"),e.setData.call(e),e.options.style&&(e.setStyle(e.options.style,null,null,1,1),delete e.options.style),Object.defineProperty(e.options,"style",{enumerable:!0,configurable:!0,get:()=>e.getStyle()}),e.options.comments&&e.setComments(e.options.comments),e.options.classes){let t=Object.keys(e.options.classes);for(let n=0;n<t.length;n++){let l=(0,internalHelpers.vu)(t[n],!0);e.records[l[1]][l[0]].element.classList.add(e.options.classes[t[n]])}}},prepareTable=function(){let e=this;1==e.options.lazyLoading&&1!=e.options.tableOverflow&&1!=e.parent.config.fullscreen&&(console.error("Jspreadsheet: The lazyloading only works when tableOverflow = yes or fullscreen = yes"),e.options.lazyLoading=!1),e.options.columns||(e.options.columns=[]);let t,n=e.options.columns.length;if(e.options.data&&void 0!==e.options.data[0])if(Array.isArray(e.options.data[0])){let t=e.options.data[0].length;t>n&&(n=t)}else(t=Object.keys(e.options.data[0])).length>n&&(n=t.length);e.options.minDimensions||(e.options.minDimensions=[0,0]),e.options.minDimensions[0]>n&&(n=e.options.minDimensions[0]);let l=[];for(let o=0;o<n;o++)e.options.columns[o]||(e.options.columns[o]={}),!e.options.columns[o].name&&t&&t[o]&&(e.options.columns[o].name=t[o]),"dropdown"==e.options.columns[o].type&&e.options.columns[o].url&&l.push({url:e.options.columns[o].url,index:o,method:"GET",dataType:"json",success:function(t){e.options.columns[this.index].source||(e.options.columns[this.index].source=[]);for(let n=0;n<t.length;n++)e.options.columns[this.index].source.push(t[n])}});l.length?jSuites.ajax(l,function(){createTable.call(e)}):createTable.call(e)},getNextDefaultWorksheetName=function(e){let t=/^Sheet(\d+)$/,n=0;return e.worksheets.forEach(function(e){let l=t.exec(e.options.worksheetName);l&&(n=Math.max(n,parseInt(l[1])))}),"Sheet"+(n+1)},buildWorksheet=async function(){let e=this,t=(e.element,e.parent);"object"==typeof t.plugins&&Object.entries(t.plugins).forEach(function([,t]){"function"==typeof t.beforeinit&&t.beforeinit(e)}),libraryBase.jspreadsheet.current=e;let n=[];if(e.options.csv){let t=new Promise(t=>{jSuites.ajax({url:e.options.csv,method:"GET",dataType:"text",success:function(n){let l=(0,helpers.parseCSV)(n,e.options.csvDelimiter);if(1==e.options.csvHeaders&&l.length>0){let t=l.shift();if(t.length>0){e.options.columns||(e.options.columns=[]);for(let n=0;n<t.length;n++)e.options.columns[n]||(e.options.columns[n]={}),void 0===e.options.columns[n].title&&(e.options.columns[n].title=t[n])}}e.options.data=l,prepareTable.call(e),t()}})});n.push(t)}else if(e.options.url){let t=new Promise(t=>{jSuites.ajax({url:e.options.url,method:"GET",dataType:"json",success:function(n){e.options.data=n.data?n.data:n,prepareTable.call(e),t()}})});n.push(t)}else prepareTable.call(e);await Promise.all(n),"object"==typeof t.plugins&&Object.entries(t.plugins).forEach(function([,t]){"function"==typeof t.init&&t.init(e)})},createWorksheetObj=function(e){let t=this.parent;e.worksheetName||(e.worksheetName=getNextDefaultWorksheetName(this.parent));let n={parent:t,options:e,filters:[],formula:[],history:[],selection:[],historyIndex:-1};return t.config.worksheets.push(n.options),t.worksheets.push(n),n},createWorksheet=function(e){let t=this.parent;t.creationThroughJss=!0,createWorksheetObj.call(this,e),t.element.tabs.create(e.worksheetName)},openWorksheet=function(e){this.parent.element.tabs.open(e)},deleteWorksheet=function(e){let t=this;t.parent.element.tabs.remove(e);let n=t.parent.worksheets.splice(e,1)[0];dispatch.A.call(t.parent,"ondeleteworksheet",n,e)},worksheetPublicMethods=[["selectAll",selection.Ub],["updateSelectionFromCoords",function(e,t,n,l){return selection.AH.call(this,e,t,n,l)}],["resetSelection",function(){return selection.gE.call(this)}],["getSelection",selection.Lo],["getSelected",selection.ef],["getSelectedColumns",selection.Jg],["getSelectedRows",selection.R5],["getData",getData],["setData",setData],["getValue",getValue],["getValueFromCoords",getValueFromCoords],["setValue",setValue],["setValueFromCoords",setValueFromCoords],["getWidth",getW
vendor: 2,161 bytes, line 1
1idth],["setWidth",function(e,t){return setWidth.call(this,e,t)}],["insertRow",insertRow],["moveRow",function(e,t){return moveRow.call(this,e,t)}],["deleteRow",deleteRow],["hideRow",hideRow],["showRow",showRow],["getRowData",getRowData],["setRowData",setRowData],["getHeight",getHeight],["setHeight",function(e,t){return setHeight.call(this,e,t)}],["getMerge",merges.fd],["setMerge",function(e,t,n){return merges.FU.call(this,e,t,n)}],["destroyMerge",function(){return merges.VP.call(this)}],["removeMerge",function(e,t){return merges.Zp.call(this,e,t)}],["search",search],["resetSearch",resetSearch],["getHeader",getHeader],["getHeaders",getHeaders],["setHeader",setHeader],["getStyle",getStyle],["setStyle",function(e,t,n,l){return setStyle.call(this,e,t,n,l)}],["resetStyle",resetStyle],["insertColumn",insertColumn],["moveColumn",moveColumn],["deleteColumn",deleteColumn],["getColumnData",getColumnData],["setColumnData",setColumnData],["whichPage",pagination.ho],["page",pagination.MY],["download",download],["getComments",getComments],["setComments",setComments],["orderBy",orderBy.My],["undo",utils_history.tN],["redo",utils_history.ZS],["getCell",internal.tT],["getCellFromCoords",internal.Xr],["getLabel",internal.p9],["getConfig",getWorksheetConfig],["setConfig",setConfig],["getMeta",function(e){return meta.IQ.call(this,e)}],["setMeta",meta.iZ],["showColumn",showColumn],["hideColumn",hideColumn],["showIndex",internal.C6],["hideIndex",internal.TI],["getWorksheetActive",internal.$O],["openEditor",openEditor],["closeEditor",closeEditor],["createWorksheet",createWorksheet],["openWorksheet",openWorksheet],["deleteWorksheet",deleteWorksheet],["copy",function(e){e?cutControls():copy.call(this,!0)}],["paste",paste],["executeFormula",internal.Em],["getDataFromRange",getDataFromRange],["quantiyOfPages",pagination.$f],["getRange",selection.eO],["isSelected",selection.sp],["setReadOnly",setReadOnly],["isReadOnly",isReadOnly],["getHighlighted",selection.kV],["dispatch",dispatch.A],["down",down],["first",first],["last",last],["left",left],["right",right],["up",up],["openFilter",filter.N$],["resetFilters",filter.dr]],worksheetPublicMethodsLength=wor
1ksheetPublicMethods.length,factory=function(){},createWorksheets=async function(e,t,n){let l=t.worksheets;if(!l)throw Error("JSS: worksheets are not defined");{let o={animation:!0,onbeforecreate:function(t,n){return n||getNextDefaultWorksheetName(e)},oncreate:function(n,l){if(e.creationThroughJss)e.creationThroughJss=!1;else{let t=n.tabs.headers.children[n.tabs.headers.children.length-2].innerHTML;createWorksheetObj.call(e.worksheets[0],{minDimensions:[10,15],worksheetName:t})}let o=e.worksheets[e.worksheets.length-1];o.element=l,buildWorksheet.call(o).then(function(){(0,toolbar.nK)(o),dispatch.A.call(o,"oncreateworksheet",o,t,e.worksheets.length-1)})},onchange:function(t,n,l){0!=e.worksheets.length&&e.worksheets[l]&&(0,toolbar.nK)(e.worksheets[l])}};1==t.tabs?o.allowCreate=!0:o.hideHeaders=!0,o.data=[];let s=1;for(let e=0;e<l.length;e++)l[e].worksheetName||(l[e].worksheetName="Sheet"+s++),o.data.push({title:l[e].worksheetName,content:""});n.classList.add("jss_spreadsheet"),n.tabIndex=0;let r=jSuites.tabs(n,o),i=t.style;delete t.style;for(let t=0;t<l.length;t++)l[t].style&&Object.entries(l[t].style).forEach(function([e,n]){"number"==typeof n&&(l[t].style[e]=i[n])}),e.worksheets.push({parent:e,element:r.content.children[t],options:l[t],filters:[],formula:[],history:[],selection:[],historyIndex:-1}),await buildWorksheet.call(e.worksheets[t])}};factory.spreadsheet=async function(e,t,n){if("TABLE"==e.tagName){t||(t={}),t.worksheets||(t.worksheets=[]);let n=(0,helpers.createFromTable)(e,t.worksheets[0]);t.worksheets[0]=n;let l=document.createElement("div");e.parentNode.insertBefore(l,e),e.remove(),e=l}let l={worksheets:n,config:t,element:e,el:e};return l.contextMenu=document.createElement("div"),l.contextMenu.className="jss_contextmenu",l.getWorksheetActive=internal.$O.bind(l),l.fullscreen=internal.Y5.bind(l),l.showToolbar=toolbar.ll.bind(l),l.hideToolbar=toolbar.Ar.bind(l),l.getConfig=getSpreadsheetConfig.bind(l),l.setConfig=setConfig.bind(l),l.setPlugins=function(e){l.plugins||(l.plugins={}),"object"==typeof e&&Object.entries(e).forEach(function([e,t]){l.plugins[e]=t.call(libraryBase.jspreadsheet,l,{},l.config)})},l.setPlugins(t.plugins),await createWorksheets(l,t,e),l.element.appendChild(l.contextMenu),jSuites.contextmenu(l.contextMenu,{onclick:function(){l.contextMenu.contextmenu.close(!1)}}),1==l.config.fullscreen&&l.element.classList.add("fullscreen"),toolbar.ll.call(l),t.root?setEvents(t.root):setEvents(document),e.spreadsheet=l,l},factory.worksheet=function(e,t,n){let l={parent:e,options:{}};return void 0===n?e.worksheets.push(l):e.worksheets.splice(n,0,l),Object.assign(l.options,t),l};var utils_factory=factory;libraryBase.jspreadsheet=function(e,t){try{let n=[];return utils_factory.spreadsheet(e,t,n).then(e=>{libraryBase.jspreadsheet.spreadsheet.push(e),dispatch.A.call(e,"onload",e)}),n}catch(e){console.error(e)}},libraryBase.jspreadsheet.getWorksheetInstanceByName=function(e,t){let n=libraryBase.jspreadsheet.spreadsheet.find(e=>e.config.namespace===t);return n?{}:null==e?Object.fromEntries(n.worksheets.map(e=>[e.options.worksheetName,e])):n.worksheets.find(t=>t.options.worksheetName===e)},libraryBase.jspreadsheet.setDictionary=function(e){jSuites.setDictionary(e)},libraryBase.jspreadsheet.destroy=function(e,t){if(e.spreadsheet){let n=libraryBase.jspreadsheet.spreadsheet.indexOf(e.spreadsheet);libraryBase.jspreadsheet.spreadsheet.splice(n,1);let l=e.spreadsheet.config.root||document;e.spreadsheet=null,e.innerHTML="",t&&destroyEvents(l)}},libraryBase.jspreadsheet.destroyAll=function(){for(let e=0;e<libraryBase.jspreadsheet.spreadsheet.length;e++){let t=libraryBase.jspreadsheet.spreadsheet[e];libraryBase.jspreadsheet.destroy(t.element)}},libraryBase.jspreadsheet.current=null,libraryBase.jspreadsheet.spreadsheet=[],libraryBase.jspreadsheet.helpers={},libraryBase.jspreadsheet.version=function(){return version},Object.entries(helpers).forEach(([e,t])=>{libraryBase.jspreadsheet.helpers[e]=t});var src=libraryBase.jspreadsheet;jspreadsheet=__nested_webpack_exports__.default}(),jspreadsheet})}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.