jspreadsheet 8.6.5 → 9.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Jspreadsheet v8.6.5
2
+ * Jspreadsheet v9.0.2
3
3
  *
4
4
  * Website: https://jspreadsheet.com
5
5
  * Description: Create amazing web based spreadsheets.
@@ -15,454 +15,442 @@ if (! jSuites && typeof(require) === 'function') {
15
15
  var jSuites = require('jsuites');
16
16
  }
17
17
 
18
- var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(B){var I=0;return function(){return I<B.length?{done:!1,value:B[I++]}:{done:!0}}};$jscomp.arrayIterator=function(B){return{next:$jscomp.arrayIteratorImpl(B)}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;
19
- $jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(B,I,K){if(B==Array.prototype||B==Object.prototype)return B;B[I]=K.value;return B};$jscomp.getGlobal=function(B){B=["object"==typeof globalThis&&globalThis,B,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var I=0;I<B.length;++I){var K=B[I];if(K&&K.Math==Math)return K}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
20
- $jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(B,I){var K=$jscomp.propertyToPolyfillSymbol[I];if(null==K)return B[I];K=B[K];return void 0!==K?K:B[I]};
21
- $jscomp.polyfill=function(B,I,K,S){I&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(B,I,K,S):$jscomp.polyfillUnisolated(B,I,K,S))};$jscomp.polyfillUnisolated=function(B,I,K,S){K=$jscomp.global;B=B.split(".");for(S=0;S<B.length-1;S++){var P=B[S];if(!(P in K))return;K=K[P]}B=B[B.length-1];S=K[B];I=I(S);I!=S&&null!=I&&$jscomp.defineProperty(K,B,{configurable:!0,writable:!0,value:I})};
22
- $jscomp.polyfillIsolated=function(B,I,K,S){var P=B.split(".");B=1===P.length;S=P[0];S=!B&&S in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var Z=0;Z<P.length-1;Z++){var M=P[Z];if(!(M in S))return;S=S[M]}P=P[P.length-1];K=$jscomp.IS_SYMBOL_NATIVE&&"es6"===K?S[P]:null;I=I(K);null!=I&&(B?$jscomp.defineProperty($jscomp.polyfills,P,{configurable:!0,writable:!0,value:I}):I!==K&&(void 0===$jscomp.propertyToPolyfillSymbol[P]&&(K=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[P]=$jscomp.IS_SYMBOL_NATIVE?
23
- $jscomp.global.Symbol(P):$jscomp.POLYFILL_PREFIX+K+"$"+P),$jscomp.defineProperty(S,$jscomp.propertyToPolyfillSymbol[P],{configurable:!0,writable:!0,value:I})))};$jscomp.initSymbol=function(){};$jscomp.iteratorPrototype=function(B){B={next:B};B[Symbol.iterator]=function(){return this};return B};
24
- $jscomp.iteratorFromArray=function(B,I){B instanceof String&&(B+="");var K=0,S=!1,P={next:function(){if(!S&&K<B.length){var Z=K++;return{value:I(Z,B[Z]),done:!1}}S=!0;return{done:!0,value:void 0}}};P[Symbol.iterator]=function(){return P};return P};$jscomp.polyfill("Array.prototype.values",function(B){return B?B:function(){return $jscomp.iteratorFromArray(this,function(I,K){return K})}},"es8","es3");
25
- var _$_c824=["use strict","{","}","","8.6.5","Base","https://jspreadsheet.com","Unlicensed","Jspreadsheet Pro\r\n"," edition ","\r\n","set","=","undefined","number","fullscreen","block","string","readonly","jss_hidden_index","div","right","10px","pointer","/v8",",","localhost",".","v8"," (Expired)","Licensed to: ","Premium","License required","A valid license is required","This version is not included on the scope of this license","Your license is expired","jspreadsheet","img","/jspreadsheet/","logo.png",
26
- "none","status","data-x","data-y","px","X","goto","jss_scroll","jss_control","hidden","jss_freezed","get","colspan","300px","Jspreadsheet Pro","text","autocomplete","dropdown","GET","json","Jspreadsheet Alert: secureFormulas is set to false.","setConfig","insertRow","deleteRow","insertColumn","deleteColumn","moveRow","moveColumn","setMerge","removeMerge","setStyle","resetStyle","setWidth","setHeight","setHeader","setComments","orderBy","setValue","setProperty","updateProperty","renameWorksheet","moveWorksheet",
27
- "onundo","onredo","object","function","contextMenu","toolbar","onevent","Jspreadsheet: cursor not in the viewport","keydown","oneditionstart","oncreateeditor","jss_focus","jss_formula","oneditionend","data-mask","data-value","inputmode","0","style","jss_input","contentEditable","setRowId","onchangerowid","setBorder","resetBorders","updateCells","setFormula","updateData","onbeforesave","POST","Authorization","Bearer ","disconected",": ","Sorry, something went wrong, refreshing your spreadsheet...",
28
- "_top","onsave","persistence","?","?worksheet=","&worksheet=","add","remove","jss_cursor","selected","main","copying","onblur","onfocus","onselection"," ","'","'!","!",":","jss_border","cloning","jss_border_","15","-2000px","#ccc","transparent","0px","tr","jss_group_container","td","&nbsp;",".jss_group","jss_group","+","width","Jspreadsheet: This column is part of a merged cell.","jss_dragging","1px","jss_helper_col","Jspreadsheet: This row is part of a merged cell","Jspreadsheet: Please clear your search before perform this action",
29
- "51px","jss_helper_row","No cell selected","Invalid merged properties","onmerge","rowspan","Column name","data-title","onchangeheader","jss_filters_icon","col","oncreatecolumn","setFooter","onchangefooter","setFooterValue","onchangefootervalue","resetFooter","setNestedHeaders","onchangenested","jss_nested","resetNestedHeaders","setNestedCell","onchangenestedcell","center","data-nested-x","data-nested-y","align","calendar","-","00:00:00",'"',"g",'""',"\t","oncopy","copy","color: initial","onbeforepaste",
30
- "JSS: For better results, please allow pagination or tableOverflow.","onpaste","Export not allowed","\ufeff","text/csv;charset=utf-8;",".csv","a","download","setDefinedNames","#1a237e","#b71c1c","#880e4f","#1b5e20","#ff6f00","/","*","^","(","[","|","<",">",";","data-token","picker","jss_picker","click","active","focus","input","jss_object","contenteditable","blur","last",'<b class="','" data-token="','">',"</b>","data-single","true","b","&",")","]","var "," = {};"," = ",";\n","; return ","onbeforeformula",
31
- "#LOOP","Reference loop detected","#SELF","Self Reference detected","#ERROR","Table does not exist or is not loaded yet","CHART(","#SPILL!","#REF!","$","Something went wrong","onafterchanges","checkbox","autonumber","radio","email","url","color","progressbar","rating","onformulachain","onbeforechange","onchange","oncreatecell","values","mergeCells","jss_wrap","title","jss_unlocked","onchangeproperty","oncreaterow","jss_row","Jspreadsheet: Invalid origin or destination","onmoverow","Jspreadsheet: Insert row is not enabled in the table configuration",
32
- "onbeforeinsertrow","onbeforeinsertrow returned false","oninsertrow","Jspreadsheet: Delete row is not enabled in the table configuration","onbeforedeleterow","onbeforedeleterow returned false","meta","cells","comments","ondeleterow","Jspreadsheet: Invalid origin","Jspreadsheet: Invalid destination","onmovecolumn","Jspreadsheet: Insert column is not enabled in the table configuration","onbeforeinsertcolumn","onbeforeinsertcolumn returned false","col_","oninsertcolumn","Jspreadsheet: Delete column is not enabled in the table configuration",
33
- "Jspreadsheet: it is not possible to delete the last column","onbeforedeletecolumn","onbeforedeletecolumn returned false","ondeletecolumn","; ","onchangestyle","No cell provided","onresetstyle","onbeforecomments","oncomments","setMeta","onchangemeta","resetMeta","onresetmeta","arrow-down","percent","numeric","onbeforesort","This action will destroy any existing merged cells. Are you sure?","onsort","arrow-up","jss_pagination","Jspreadsheet: No pagination defined","Jspreadsheet: pagination not defined",
34
- "onbeforechangepage","onchangepage","No records found","jss_page","jss_page_selected","Showing page {0} of {1} entries","jss_content","wheel","selectstart","table","thead","tbody","tfoot","colgroup","50","jss_selectall","jss","cellpadding","cellspacing","unselectable","yes","jss_overflow","jss_locked","jss_corner","on","onselectstart","return false","Y","jss_table","jss_table_container","Freeze columns cannot be greater than the number of available columns","rows","jss_container","jss_toolbar","jss_helper",
35
- "jss_loading","textarea","jss_textarea","-1","bottom","Defined names are only available on the Premium edition.","beforeinit","Sheet","Worksheet clash name: ",". It is highly recommended to define a unique worksheetName on the initialization.","jss_worksheet","init","To improve the performance, use tableOverflow or pagination.","resize","touchstart","touchmove","touchend","onresizecolumn","onresizerow","label","jss_filters_active","Jspreadsheet: the filter is not enabled.","onopenfilter","Blanks",
36
- "onbeforefilter","onfilter","gi","jss_filters_options","INPUT","Search","jss_filters_search","button","Ok","jss_filters_apply","jss_filters",'<input type="checkbox"> ',"Add current selection to filter",'<input type="checkbox"> (',"Select all","select","jss_pagination_dropdown","option","Show","entries","jss_search","onbeforesearch","onsearch","jss_search_container","jss_contextmenu","Mac","&#8984;","Ctrl","tabs","Rename this worksheet","Delete this worksheet","Are you sure?","line","nested","Rename this cell",
37
- "header","row","cell","Cut","content_cut"," + X","Copy","content_copy"," + C","Paste","content_paste"," + V","Insert a new column before","Insert a new column after","Delete selected columns","Rename this column","Create a new row","Order ascending","Order descending","Insert a new row before","Insert a new row after","Delete selected rows","Edit comments","Add comments","notes","Comments","Clear comments","Save as","save"," + S","About","info","with-toolbar","i","undo","redo","divisor","120px","Verdana",
38
- "Arial","Courier New",'<span style="font-family:',"</span>","font-family","48px","format_size","x-small","small","medium","large","x-large",'<span style="font-size:',"font-size","format_align_left","format_align_center","format_align_right","format_align_justify",'<i class="material-icons">',"</i>","text-align","_","format_bold","font-weight","bold","format_color_text","format_color_fill","background-color","border_all","border_outer","border_inner","border_horizontal","border_vertical","border_left",
39
- "border_top","border_right","border_bottom","border_clear","black","border-left: ","px solid ","border-left: ; ","border-right: ","border-right: ; ","border-top: ","border-top: ; ","border-bottom: ","border-bottom: ; ","material-icons","color_lens",'<div style="height: ','px; width: 50px; background-color: black;"></div>',"80px","1","fullscreen_exit","Toggle Fullscreen","search","search_off","Toggle Search","onbeforecreateworksheet","There is one existing worksheet with the same name.","createWorksheet",
40
- "oncreateworksheet","deleteWorksheet","ondeleteworksheet","It was not possible to rename worksheet due conflict name","onrenameworksheet","onmoveworksheet","onopenworksheet","jss_","TABLE","Element is not a table","colgroup > col","data-celltype","readOnly","name","id",":scope > thead > tr",":scope > tr, :scope > tbody > tr","data-formula","class","styleBold","; font-weight:bold;","font-weight:bold;","tfoot tr","\r","\n","jss_ignore","THEAD","TBODY","TFOOT","selectall","header-group","jtabs-headers",
41
- "filters","footer","jtoolbar","DIV","html","jss_nowrap","insertHTML","<br/>\n","Process","A","mailto:","_blank","onclick","jclose","col-resize","row-resize","move","TD","Cloud plugin not loaded.","jtabs","jss_dialog","jss_number","decimal","data-locale","%","jss_percent","\\[Red\\]","red","\\(","jss_notes","145px","tag","jss_dropdown_tags","jss_dropdown","multiple","image","<div class='jss_dropdown_icon' style='background-color: ","'></div>","orange","<div class='jss_dropdown_tag' style='background-color: ",
42
- "'>","</div>","&lt;","timepicker","YYYY-MM-DD","square","100px","false","FALSE","disabled","TRUE","jss_progressbar","min","max","jss_rating"," stars","star","href","IMG","round","100%","jss_image","tabindex","jpanel","delete","jfile",'<img src="','" alt="">',"jss_richtext","jss_tags","40px","#NOTFOUND","<img src='","' class='round small' />","Jspreadsheet: worksheet not found "];
43
- (function(B,I){typeof exports===_$_c824[84]&&typeof module!==_$_c824[13]?module.exports=I():typeof define===_$_c824[85]&&define.amd?define(I):B.jspreadsheet=B.jexcel=I()})(this,function(){_$_c824[0];var B=function(k,b){k=jSuites.translate(k);if(b&&b.length)for(var c=0;c<b.length;c++)k=k.replace(_$_c824[1]+c+_$_c824[2],b[c]);return k},I=function(k,b){Array.isArray(k)&&(k=k[0]);k=k.replace(new RegExp(/'/g),_$_c824[3]).toUpperCase();if(void 0===b)return window[k]?window[k]:null;window[k]=b},K=function(){var k=
44
- {version:_$_c824[4],edition:_$_c824[5],host:_$_c824[6],license:_$_c824[7],print:function(){return[_$_c824[8]+this.edition+_$_c824[9]+this.version+_$_c824[10]+this.host+_$_c824[10]+this.license]}};return function(){return k}}(),S=function(k){var b=parseInt(k.y);if(k.id)var c=parseInt(k.id);else k.value&&(c=parseInt(k.value));0<c&&(this.rows[b].id=c,ta[_$_c824[11]].call(this,c))},P=function(k){return(_$_c824[3]+k).substr(0,1)===_$_c824[12]},Z=function(k){var b=this.options.columns;return b[k]&&b[k].name?
45
- b[k].name:k},M=function(k,b,c){var a;if(a=this.options.data[b]){var d=0<=k?Z.call(this,k):k;typeof c===_$_c824[13]?c=typeof d===_$_c824[14]?a[k]:jSuites.path.call(a,_$_c824[3]+d):(typeof d===_$_c824[14]?a[k]=c:jSuites.path.call(a,_$_c824[3]+d,c),!P(c)&&this.records[b][k]&&(this.records[b][k].v=c))}else c=null;return c},Q=function(k){return 0==this.config.editable||k&&0==k.options.editable?!1:(k=Ja.call(this))?7<=k?!0:!1:!0},Ka=function(k){var b=_$_c824[15];if(this.parent)var c=this.parent.config,
46
- a=this.parent.element,d=this;else c=this.config,a=this.element,d=r.current?r.current:null;typeof k===_$_c824[13]&&(k=!a.classList.contains(b));k?(a.classList.add(b),c.fullscreen=!0):(a.classList.remove(b),c.fullscreen=!1);d&&(d.tbody.innerHTML=_$_c824[3],G.call(d),U.refresh.call(d),fa.update.call(d.parent,d))},La=function(k){var b=this.loading;null===k&&(k=b.style.display==_$_c824[16]?!0:!1);b.style.display=k?_$_c824[16]:_$_c824[3];setTimeout(function(){b.style.display=_$_c824[3]},1E3)},Ga=function(k,
47
- b){if(typeof k===_$_c824[17]){var c=E.getCoordsFromColumnName(k);c=this.records[c[1]][c[0]];if(c.element)k=c.element;else return typeof b===_$_c824[13]?c.readonly:c.readonly=b?!0:!1}c=_$_c824[18];k=k.classList;if(typeof b===_$_c824[13])return k.contains(c)?!0:!1;b?k.add(c):k.remove(c)},ya=function(k){var b=_$_c824[19],c=this.table.classList;if(typeof k==_$_c824[13])return c.contains(b)?!1:!0;k?c.remove(b):c.add(b);0<this.options.freezeColumns&&ka[_$_c824[11]].call(this,this.options.freezeColumns);
48
- this.refreshBorders()},Ja=function(k){if(void 0===k)return this.status;var b=document.createElement(_$_c824[20]);b.style.textAlign=_$_c824[21];b.style.fontSize=_$_c824[22];b.style.cursor=_$_c824[23];b.onclick=function(){window.location.href=K().host+_$_c824[24]};var c=null,a=[74,50,48,50,48,33].join(_$_c824[3]);(function(e){c=1;try{if(e){var f=window.atob(e);f=f.split(_$_c824[25]);if(f[1]){f[1]=window.atob(f[1]);var g=f[0];e=a;var h=f[1],l=jSuites.sha512,m=_$_c824[3],p=_$_c824[3];128<e.length&&(e=
49
- l(e));for(var n=0;128>n;n++){var t=e[n]?e[n].charCodeAt(0):0;m+=String.fromCharCode(54^t);p+=String.fromCharCode(92^t)}var v=l(p+l(m+h));if(g!=v)c=3;else if(f[1]=JSON.parse(f[1]),f[1].date){var u=window.location.hostname||_$_c824[26],y=u.split(_$_c824[27]);u=u.split(_$_c824[27]);2<u.length&&!jSuites.isNumeric(u[u.length-1])&&y.shift();y=y.join(_$_c824[27]);u=u.join(_$_c824[27]);if(-1==f[1].domain.indexOf(y)&&-1==f[1].domain.indexOf(u))c=4;else if(f[1].scope&&0<=f[1].scope.indexOf(_$_c824[28])){u=
50
- new Date;y=parseInt(u.getTime()/1E3);var z=K();f[1].date<y?(c=f[1].date+2592E3<y&&!f[1].plan||f[1].date+15552E3<y?6:7,z.license=f[1].name+_$_c824[29]):(c=8,z.license=_$_c824[30]+f[1].name,z.edition=3==f[1].plan||6==f[1].plan?_$_c824[31]:_$_c824[5])}else c=5}else c=4}else c=2}}catch(C){}})(k);k=_$_c824[3];if(1==c)k=_$_c824[32];else if(2==c||3==c||4==c)k=_$_c824[33];else if(5==c)k=_$_c824[34];else if(6==c||7==c)k=_$_c824[35];b.appendChild(document.createTextNode(k));if(8>c)try{if(typeof sessionStorage!==
51
- _$_c824[13]&&!sessionStorage.getItem(_$_c824[36])){sessionStorage.setItem(_$_c824[36],!0);var d=document.createElement(_$_c824[37]);d.src=K().host+_$_c824[38]+_$_c824[39];d.style.display=_$_c824[40];b.appendChild(d)}}catch(e){}Object.defineProperty(this,_$_c824[41],{value:c,writable:!1,configurable:!1,enumerable:!1,extensible:!1});K().edition===_$_c824[31]&&(this.edition=1);return b},U=function(){var k=function(){if(this.edition){var d=this.edition.getAttribute(_$_c824[42]),e=this.edition.getAttribute(_$_c824[43]);
52
- ba.position.call(this,d,e)}},b=function(){this.scrollX.scrollWidth<this.scrollX.scrollLeft+this.scrollX.offsetWidth+25?(this.content.scrollLeft=this.content.scrollWidth,0<this.options.freezeColumns&&ha.refresh.call(this)):this.content.scrollLeft=0;k.call(this)},c=function(){var d=this.tbody.lastChild.getAttribute(_$_c824[43]),e=this.scrollY.scrollHeight-this.content.offsetHeight-this.scrollY.scrollTop;this.content.scrollTop=d!=(this.results?this.rows[this.results[this.results.length-1]].y:this.rows[this.rows.length-
53
- 1].y)&&e?0:this.content.scrollHeight;k.call(this)},a=function(){if(G.limited.call(this)){var d=ka.getWidth.call(this);if(1==this.parent.config.fullscreen)var e=this.content.offsetWidth,f=this.content.offsetHeight;else 1==this.options.tableOverflow&&(e=parseInt(this.options.tableWidth),f=this.options.pagination?this.table.offsetHeight:parseInt(this.options.tableHeight));this.width=a.width.call(this)+(d?d:1);this.height=a.height.call(this);this.tfoot.offsetHeight&&(this.height+=this.tfoot.offsetHeight+
54
- 26);this.scrollX.firstChild.style.width=this.width+_$_c824[44];this.scrollY.firstChild.style.height=this.height+_$_c824[44];this.scrollX.style.width=e+_$_c824[44];this.scrollY.style.height=f+_$_c824[44];this.scrollX.style.display=this.width>e?_$_c824[3]:_$_c824[40];this.scrollY.style.display=this.height>f&&!this.options.pagination?_$_c824[3]:_$_c824[40]}else this.scrollX.style.display=_$_c824[40],this.scrollY.style.display=_$_c824[40]};a.refresh=function(){this.scrollY.scrollTop=0;this.scrollX.scrollLeft=
55
- 0;a.call(this)};a.updateX=function(){if(a.event)return!1;var d=parseInt(this.thead.lastChild.children[(this.options.freezeColumns||0)+1].getAttribute(_$_c824[42]));a.setX.call(this,a.width.call(this,d));b.call(this)};a.updateY=function(){if(a.event)return!1;if(this.tbody.firstChild){var d=parseInt(this.tbody.firstChild.getAttribute(_$_c824[43]));a.setY.call(this,a.height.call(this,d));c.call(this)}};a.setX=function(d){a.ignore=!0;this.scrollX.scrollLeft=d};a.setY=function(d){a.ignore=!0;this.scrollY.scrollTop=
56
- d};a.update=function(d,e){e==_$_c824[45]?(d=a.width.call(this,null,d.target.scrollLeft/(d.target.scrollWidth-this.content.offsetWidth)*this.width),G.reset.call(this),G[_$_c824[46]].call(this,null,d),b.call(this)):(d=a.height.call(this,null,d.target.scrollTop/(d.target.scrollHeight-this.content.offsetHeight)*(this.height-(this.tbody.offsetHeight-5))),this.tbody.textContent=_$_c824[3],G[_$_c824[46]].call(this,d),c.call(this))};a.build=function(d){var e=this,f=document.createElement(_$_c824[20]),g=document.createElement(_$_c824[20]);
57
- f.className=_$_c824[47]+d;g.className=_$_c824[48]+d;f.appendChild(g);d==_$_c824[45]?f.style.height=_$_c824[22]:f.style.width=_$_c824[22];f.onscroll=function(h){if(a.ignore)return a.ignore=!1;a.event=!0;a.update.call(e,h,d);a.event=!1};return f};a.width=function(d,e){for(var f=this.options.columns,g=0,h=this.options.freezeColumns||0;h<this.options.columns.length;h++){if(d===h)return g;!1!==f[h].visible&&f[h].type!==_$_c824[49]&&(g+=parseInt(f[h].width));if(g>=e)return h}return e?h:g};a.height=function(d,
58
- e){var f=0,g=0;this.options.defaultRowHeight||(this.options.defaultRowHeight=23);for(var h=this.results?this.results:this.rows,l=0;l<h.length;l++){g=l;this.results&&(g=h[l]);if(d===g)return f;this.rows[g]&&!1!==this.rows[g].visible&&(f=this.rows[g].height?f+parseInt(this.rows[g].height):this.rows[g].element&&this.rows[g].element.offsetHeight?f+parseInt(this.rows[g].element.offsetHeight):f+parseInt(this.options.defaultRowHeight));if(f>=e)return g}return e?g:f};return a}(),G=function(){var k=function(c,
59
- a){var d=this.thead.clientHeight;a||(a=1);var e=!1,f=!1,g=c.getAttribute(_$_c824[42]),h=c.getAttribute(_$_c824[43]);var l=this.records[h][g];l.merged&&(g-=l.merged[0],h-=l.merged[1],c=this.records[h][g].element);h=this.content.getBoundingClientRect();l=c.getBoundingClientRect();var m=ka.getWidth.call(this),p=h.left+m,n=h.left+h.width;g=h.top+d;var t=h.top+h.height;var v=0;h=l.top;h>=g&&h<=t||(v++,e=!0);h=l.top+l.height;h>=g&&h<=t||v++;if(v>=a)return 2>a&&(a=this.content.scrollTop,0==e?t-g>l.height&&
60
- (this.content.scrollTop+=h-t+3,U.ignore=!0,this.scrollY.scrollTop+=h-t+3):(this.content.scrollTop=c.offsetTop-d,U.ignore=!0,this.scrollY.scrollTop-=a-this.content.scrollTop)),!1;if(!m||!c.classList.contains(_$_c824[50]))if(v=0,g=l.left,g>=p&&g<=n||(v++,f=!0),g=l.left+l.width,g>=p&&g<n||v++,v>=a)return 2>a&&(a=this.content.scrollLeft,0==f?n-p>l.width&&(this.content.scrollLeft+=g-n+3,U.ignore=!0,this.scrollX.scrollLeft+=g-n+3):(this.content.scrollLeft=c.offsetLeft-p-50,U.ignore=!0,this.scrollX.scrollLeft-=
61
- a-this.content.scrollLeft)),!1;return!0},b=function(){var c=0;this.results&&(c=this.results[0]);b.reset.call(this,!0);b.renderX.call(this,0);b.renderY.call(this,c);ka.headers.call(this);0<this.options.pagination&&ua.update.call(this);this.refreshBorders();U.call(this)};b.limited=function(){return 1==this.options.tableOverflow||1==this.parent.config.fullscreen};b.refresh=function(){if(!this.tbody.lastChild)return!1;var c=parseInt(this.thead.lastChild.lastChild.getAttribute(_$_c824[42]))+1,a=parseInt(this.tbody.lastChild.getAttribute(_$_c824[43]));
62
- this.results?(a=this.results.indexOf(a),a<this.results.length-1&&a++,a=this.results[a]):a++;b.renderX.call(this,c);b.renderY.call(this,a);this.content.scrollTop=0;this.content.scrollLeft=0;b.adjustX.call(this,!1,!0);b.adjustY.call(this,!1,!0);U.call(this)};b.renderX=function(c,a,d){var e=this.options.columns,f,g=0,h=[],l=(this.options.freezeColumns||0)+1;1==this.parent.config.fullscreen?g=this.content.offsetWidth:1==this.options.tableOverflow&&(g=parseInt(this.options.tableWidth));if(0<this.options.freezeColumns){for(var m=
63
- f=0;m<this.options.freezeColumns;m++)f+=parseInt(this.options.columns[m].width);g<f&&(g=f+100)}f=this.headerContainer.offsetWidth||0;for(d||(d=0);e[c]&&(!g||f<g||0<d);)!1!==e[c].visible&&e[c].type!==_$_c824[49]&&(f+=parseInt(e[c].width)),0<d&&d--,m=ca.getWidth.call(this,c,h),m>d&&(d=m),a?(b.renderColumn.call(this,c,l),c--):(b.renderColumn.call(this,c),c++);ca.batch.call(this,h)};b.renderY=function(c,a,d){var e=0,f=[];1==this.parent.config.fullscreen?e=this.content.offsetHeight:1==this.options.tableOverflow&&
64
- (e=0<this.options.pagination?0:parseInt(this.options.tableHeight));e&&(e-=this.thead.offsetHeight+4,this.tfoot.offsetHeight&&(e-=this.tfoot.offsetHeight+14));var g=this.tbody.offsetHeight;var h=this.options.freezeColumns||0,l=parseInt(this.headerContainer.lastChild.getAttribute(_$_c824[42]));h=this.headerContainer.children[h+1]?parseInt(this.headerContainer.children[h+1].getAttribute(_$_c824[42])):l;var m=this.results?this.results.indexOf(c):c,p=parseInt(this.options.pagination)||0,n=this.tbody.children.length||
65
- 0,t=!1;for(d||(d=0);this.options.data&&this.options.data[c]&&(!p||n<p||0<d)&&(!e||g<=e||0<d);){var v=b.renderRow.call(this,c,h,l);a?(this.tbody.insertBefore(v,this.tbody.firstChild),m--):(this.tbody.appendChild(v),m++);this.rows[c].height?(v.offsetHeight!==this.rows[c].height&&(this.rows[c].height=v.offsetHeight,t=!0),g+=this.rows[c].height):(g=(t=v.offsetHeight)?g+(this.rows[c].height=t):g+(this.options.defaultRowHeight||23),t=!0);0<d&&d--;c=ca.getHeight.call(this,c,f);c>d&&(d=c);c=this.results?
66
- this.results[m]:m;n++}ca.batch.call(this,f);t&&U.call(this)};b.renderColumn=function(c,a,d){this.headers[c]||Ca.create.call(this,c);if(this.options.nestedHeaders)for(d=0;d<this.options.nestedHeaders.length;d++){var e=oa.getColumns.call(this,d);void 0!==e[c]&&oa.renderCell.call(this,e[c],d,a)}if(this.options.footers)for(d=0;d<this.options.footers.length;d++)e=aa.create.call(this,c,d),null===a?this.tfoot.children[d].appendChild(e):this.tfoot.children[d].insertBefore(e,this.tfoot.children[d].children[a]);
67
- null===a?(this.headerContainer.appendChild(this.headers[c]),this.colgroupContainer.appendChild(this.colgroup[c])):(this.headerContainer.insertBefore(this.headers[c],this.headerContainer.children[a]),this.colgroupContainer.insertBefore(this.colgroup[c],this.colgroupContainer.children[a]));if(this.tbody.children.length)for(d=0;d<this.tbody.children.length;d++)e=parseInt(this.tbody.children[d].getAttribute(_$_c824[43])),(e=N[_$_c824[51]].call(this,c,e))&&(null===a?this.tbody.children[d].appendChild(e):
68
- this.tbody.children[d].insertBefore(e,this.tbody.children[d].children[a]))};b.renderRow=function(c,a,d,e){var f=this.options.freezeColumns||0;null==a&&(a=parseInt(this.headerContainer.children[f+1].getAttribute(_$_c824[42])));null==d&&(d=parseInt(this.headerContainer.lastChild.getAttribute(_$_c824[42])));var g=Aa.create.call(this,c,e);if(g.children.length)for(;g.children[f+1];)g.removeChild(g.lastChild);if(0<f){for(var h=0;h<f;h++)g.appendChild(N[_$_c824[51]].call(this,h,c));ka.update.call(this,c)}for(h=
69
- a;h<=d;h++)a=N[_$_c824[51]].call(this,h,c,e),g.appendChild(a);return g};b.resetY=function(){if(this.options.pagination){this.pageNumber||(this.pageNumber=0);var c=this.options.pagination*this.pageNumber}else c=0;var a=0;if(this.merged.rows[c]){for(a=this.options.pagination;this.merged.rows[c]&&0<=c;)c--;c++}this.tbody.textContent=_$_c824[3];this.results&&this.results.length&&(c=this.results[c]);(!this.results||0<this.results.length)&&G.renderY.call(this,c,0,a);0<this.options.pagination&&ua.update.call(this);
70
- U.call(this);this.refreshBorders()};b[_$_c824[46]]=function(c,a){if(null!==c&&0<=c)if(0<this.options.pagination)this.page(this.whichPage(c));else if(this.rows[c]||(c=this.options.data.length-1),!Aa.attached.call(this,c)){if(this.merged.rows[c]){for(;this.merged.rows[c]&&0<=c;)c--;c++}this.tbody.textContent=_$_c824[3];b.renderY.call(this,c);var d=this.results?this.results.indexOf(c):c;0<d&&(this.results?d=this.results[d-1]:d--,b.renderY.call(this,d,!0));U.updateY.call(this)}if(null!==a&&0<=a&&(this.options.columns[a]||
71
- (a=this.options.columns.length-1),c||(c=b.getY.call(this)),!N.attached.call(this,a,c))){if(this.merged.cols[a]){for(d=c=0;d<this.rows.length;d++)this.records[d][a].merged&&(c=this.records[d][a].merged[0]);a-=c}b.reset.call(this);b.renderX.call(this,a);0<a&&b.renderX.call(this,a-1,!0);U.updateX.call(this)}this.refreshBorders()};b.pageUp=function(c,a,d){var e=parseInt(this.tbody.firstChild.getAttribute(_$_c824[43]));if(a){c=null;var f=this.results?this.results[0]:0}else this.results?(f=this.results.indexOf(e),
72
- 0<f&&f--,f=this.results[f]):(f=e,0<f&&f--);if(f<e){if(null==c)this.tbody.textContent=_$_c824[3];else{e=c;if(this.options.mergeCells){var g=parseInt(this.tbody.lastChild.getAttribute(_$_c824[43]));e+=ca.getHeight.call(this,g)}for(g=0;g<e;g++)this.tbody.removeChild(this.tbody.lastChild)}b.renderY.call(this,f,!a,c);b.adjustY.call(this,!1);d&&d.preventDefault();U.updateY.call(this)}this.refreshBorders()};b.pageDown=function(c,a,d){var e=parseInt(this.tbody.lastChild.getAttribute(_$_c824[43]));if(a){c=
73
- null;var f=this.results?this.results[this.results.length-1]:this.rows.length-1}else this.results?(f=this.results.indexOf(e),f<this.results.length-1&&f++,f=this.results[f]):(f=e,e<this.options.data.length-1&&f++);if(f>e){if(null==c)this.tbody.textContent=_$_c824[3];else{e=c;if(this.options.mergeCells){var g=parseInt(this.tbody.firstChild.getAttribute(_$_c824[43]));e+=ca.getHeight.call(this,g)}for(g=0;g<e;g++)this.tbody.removeChild(this.tbody.firstChild)}b.renderY.call(this,f,a,c);b.adjustY.call(this,
74
- !0);d&&d.preventDefault();U.updateY.call(this)}this.refreshBorders()};b.removeColumns=function(c,a){var d=null===a?this.headerContainer.lastChild:this.headerContainer.children[a];if(d)d=parseInt(d.getAttribute(_$_c824[42]));else return!1;if(this.options.mergeCells){for(var e=0,f=d,g=0;g<c;g++){var h=ca.getWidth.call(this,f);h>e&&(e=h);null===a?f--:f++}c+=e}c>=this.headerContainer.children.length&&(c=this.headerContainer.children.length-1);if((e=this.options.nestedHeaders)&&e.length)for(f=0;f<e.length;f++)for(h=
75
- oa.getColumns.call(this,f),g=0;g<c;g++)if(void 0!==h[d+g]&&this.nested.content[f][h[d+g]]){var l=this.nested.content[f][h[d+g]].element,m=l.getAttribute(_$_c824[52]);0<m&&m--;0<m?l.setAttribute(_$_c824[52],m):l.parentNode&&this.thead.children[f].removeChild(l)}for(g=0;g<c;g++)null===a?(this.headerContainer.removeChild(this.headerContainer.lastChild),this.colgroupContainer.removeChild(this.colgroupContainer.lastChild)):this.headerContainer.children[a]&&(this.headerContainer.removeChild(this.headerContainer.children[a]),
76
- this.colgroupContainer.removeChild(this.colgroupContainer.children[a]));for(f=0;f<this.tbody.children.length;f++)for(g=0;g<c;g++)null===a?this.tbody.children[f].removeChild(this.tbody.children[f].lastChild):this.tbody.children[f].children[a]&&this.tbody.children[f].removeChild(this.tbody.children[f].children[a]);for(f=0;f<this.tfoot.children.length;f++)for(g=0;g<c;g++)null===a?this.tfoot.children[f].removeChild(this.tfoot.children[f].lastChild):this.tfoot.children[f].removeChild(this.tfoot.children[f].children[a])};
77
- b.pageLeft=function(c,a){var d=this.options.freezeColumns||0;if(a){c=null;var e=d}else e=parseInt(this.thead.lastChild.children[d+1].getAttribute(_$_c824[42]))-1;e>=d&&(null==c?b.reset.call(this):b.removeColumns.call(this,c,null),b.renderX.call(this,e,!a,c),b.adjustX.call(this,!1),U.updateX.call(this));this.refreshBorders()};b.pageRight=function(c,a){var d=this.options.freezeColumns||0;if(a){c=null;var e=this.options.columns.length-1}else e=parseInt(this.thead.lastChild.lastChild.getAttribute(_$_c824[42]))+
78
- 1;e<this.options.columns.length&&(null==c?b.reset.call(this):b.removeColumns.call(this,c,d+1),b.renderX.call(this,e,a,c),b.adjustX.call(this,!0),U.updateX.call(this));this.refreshBorders()};b.reset=function(c){1<this.headerContainer.children.length&&(c=c?0:this.options.freezeColumns||0,b.removeColumns.call(this,this.headerContainer.children.length-(c+1),c+1))};b.getX=function(){if(this.thead.lastChild)return parseInt(this.thead.lastChild.children[1].getAttribute(_$_c824[42]))};b.getY=function(){if(this.tbody.firstChild)return parseInt(this.tbody.firstChild.getAttribute(_$_c824[43]))};
79
- b.adjustX=function(c,a){var d=this.options.freezeColumns||0;if(!0===a){for(var e=a=0;e<this.tbody.children.length;e++)if(this.tbody.children[e].style.display!==_$_c824[40]&&this.tbody.children[e].children[1]&&k.call(this,this.tbody.children[e].children[1],2)){a=e;break}e=[];for(var f=d+1;f<this.thead.lastChild.children.length;f++)this.tbody.children[a].children[f]&&(k.call(this,this.tbody.children[a].children[f],2)||e.push(f));e.length&&b.removeColumns.call(this,e.length,e[0])}d=c?parseInt(this.tbody.firstChild.children[d+
80
- 1].getAttribute(_$_c824[42])):parseInt(this.tbody.firstChild.lastChild.getAttribute(_$_c824[42]));c?d--:d++;b.renderX.call(this,d,c)};b.adjustY=function(c,a){if(!0===a){a=[];for(var d=0;d<this.tbody.children.length;d++)this.tbody.children[d].style.display!==_$_c824[40]&&this.tbody.children[d].children[1]&&(k.call(this,this.tbody.children[d].children[1],2)||a.push(this.tbody.children[d].firstChild.getAttribute(_$_c824[43])));if(a.length)for(d=0;d<a.length;d++)this.rows[a[d]].element.remove()}a=c?parseInt(this.tbody.firstChild.getAttribute(_$_c824[43])):
81
- parseInt(this.tbody.lastChild.getAttribute(_$_c824[43]));this.results?(a=this.results.indexOf(a),a=c?this.results[a-1]:this.results[a+1]):c?a--:a++;b.renderY.call(this,a,c)};b.isVisible=k;return b}(),Ma=function(k,b,c,a){for(var d=this.options.columns,e=k,f,g=null;k<d.length-1;)if(k++,!1!==d[k].visible&&d[k].type!==_$_c824[49]){f=this.records[b]&&this.records[b][k].v===_$_c824[3]?!1:!0;null===g&&(g=f);if(this.records[b]&&this.records[b][k].element&&this.records[b][k].element.style.display==_$_c824[40]){if(this.records[b][k].merged){if(k==
82
- k+this.records[b][k].merged[0]&&(e=k,!c))break;f=!1}}else{if(c&&f!==g&&!a)break;if(c)e=k;else return k}g=f}return e},Na=function(k,b,c,a){for(var d=this.options.columns,e=k,f,g=null;0<k;)if(k--,!1!==d[k].visible&&d[k].type!==_$_c824[49]){f=this.records[b]&&this.records[b][k].v===_$_c824[3]?!1:!0;null===g&&(g=f);if(this.records[b]&&this.records[b][k].element&&this.records[b][k].element.style.display==_$_c824[40]){if(this.records[b][k].merged){e=k-this.records[b][k].merged[0];if(!c)break;f=!0}}else{if(c&&
83
- f!==g&&!a)break;if(c)e=k;else return k}g=f}return e},Ta=function(){var k=function(c,a,d,e){1==c||3==c?Aa.attached.call(this,d)||(0<this.options.pagination?this.page(this.whichPage(d)):(1==c?G.pageUp.call(this,1,e):G.pageDown.call(this,1,e),Aa.attached.call(this,d)||G[_$_c824[46]].call(this,d))):N.attached.call(this,a,d)||(0==c?G.pageLeft.call(this,1,e):G.pageRight.call(this,1,e),N.attached.call(this,a,d)||G[_$_c824[46]].call(this,d,a))},b=function(c){c.up=b.up;c.down=b.down;c.right=b.right;c.left=
84
- b.left;c.last=b.last;c.first=b.first};b.up=function(c,a,d){if(c)var e=parseInt(this.selectedCell[2]),f=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),f=parseInt(this.selectedCell[1]);a:{var g=e,h=f,l=h,m=null;if(this.results&&(h=this.results.indexOf(h),-1==h)){d=l;break a}for(;0<h;){h--;var p=this.results?this.results[h]:h;if(!1!==this.rows[p].visible){var n=this.records[p][g].v===_$_c824[3]?!1:!0;null===m&&(m=n);if(this.records[p][g].element&&this.records[p][g].element.style.display==
85
- _$_c824[40]){if(this.records[p][g].merged){l=p-this.records[p][g].merged[1];if(!a)break;n=!0}}else if(a&&n!==m&&!d){d=l;break a}else if(a)l=this.records[p][g].merged?p-this.records[p][g].merged[1]:p;else{d=p;break a}m=n}}d=l}d!=f&&(f=d,c?(c=this.selectedCell[0],d=this.selectedCell[1]):(c=e,d=f,e=c,f=d),k.call(this,1,e,f,a),this.updateSelectionFromCoords(c,d,e,f))};b.down=function(c,a,d){if(c)var e=parseInt(this.selectedCell[2]),f=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),
86
- f=parseInt(this.selectedCell[1]);a:{var g=e,h=f,l=h,m=null;if(this.results){h=this.results.indexOf(h);if(-1==h){d=l;break a}var p=this.results.length-1}else p=this.rows.length-1;for(;h<p;){h++;var n=this.results?this.results[h]:h;if(!1!==this.rows[n].visible){var t=this.records[n][g].v===_$_c824[3]?!1:!0;null===m&&(m=t);if(this.records[n][g].element&&this.records[n][g].element.style.display==_$_c824[40]){if(this.records[n][g].merged){if(!this.records[n][g].merged[1]&&(l=n,!a))break;t=!0}}else if(a&&
87
- t!==m&&!d){d=l;break a}else if(a)l=n;else{d=n;break a}m=t}}d=l}d!=f&&(f=d,c?(c=this.selectedCell[0],d=this.selectedCell[1]):(c=e,d=f,e=c,f=d),k.call(this,3,e,f,a),this.updateSelectionFromCoords(c,d,e,f))};b.right=function(c,a,d){if(c)var e=parseInt(this.selectedCell[2]),f=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),f=parseInt(this.selectedCell[1]);d=Ma.call(this,e,f,a,d);d!=e&&(e=d,c?(c=this.selectedCell[0],d=this.selectedCell[1]):(c=e,d=f,e=c,f=d),k.call(this,2,e,f,a),this.updateSelectionFromCoords(c,
88
- d,e,f))};b.left=function(c,a,d){if(c)var e=parseInt(this.selectedCell[2]),f=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),f=parseInt(this.selectedCell[1]);d=Na.call(this,e,f,a,d);d!=e&&(e=d,c?(c=this.selectedCell[0],d=this.selectedCell[1]):(c=e,d=f,e=c,f=d),k.call(this,0,e,f,a),this.updateSelectionFromCoords(c,d,e,f))};b.first=function(c,a){a?b.up.call(this,c,!0,!0):b.left.call(this,c,!0,!0)};b.last=function(c,a){a?b.down.call(this,c,!0,!0):b.right.call(this,c,!0,!0)};return b}(),
89
- Ua=function(){return function(k){k.save=Oa;k.fullscreen=Ka;k.setReadOnly=Ga;k.getReadOnly=Ga;k.isReadOnly=Ga;k.setPlugins=function(b){pa.call(this.parent,b)};k.showIndex=function(){ya.call(this,!0)};k.hideIndex=function(){ya.call(this,!1)};k[_$_c824[46]]=G[_$_c824[46]];k.undo=function(){T.undo.call(k.parent)};k.redo=function(){T.redo.call(k.parent)};k.isEditable=function(){return Q.call(k.parent,k)};k.dispatch=function(){return F.apply(this.parent,arguments)};k.setViewport=function(b,c){this.options.tableOverflow=
90
- !0;b=parseInt(b);c=parseInt(c);this.content.style.overflow=_$_c824[49];100<b&&(this.options.tableWidth=b+_$_c824[44],this.content.style.maxWidth=this.options.tableWidth);100<c&&(this.options.tableHeight=parseInt(c)+_$_c824[44],this.content.style.maxHeight=this.options.tableHeight);G.refresh.call(this);fa.update.call(this.parent,this)}}}(),Da=function(){var k={logo:null,url:null,persistence:!1,sequence:!0,data:null,json:null,rows:[],columns:[],cells:{},role:null,nestedHeaders:null,defaultColWidth:100,
91
- defaultRowHeight:0,defaultColAlign:null,minSpareRows:0,minSpareCols:0,minDimensions:[0,0],csv:null,csvFileName:_$_c824[36],csvHeaders:!0,csvDelimiter:_$_c824[25],columnSorting:!0,columnDrag:!0,columnResize:!0,rowResize:!0,rowDrag:!0,editable:!0,allowInsertRow:!0,allowManualInsertRow:!0,allowInsertColumn:!0,allowManualInsertColumn:!0,allowDeleteRow:!0,allowDeletingAllRows:!1,allowDeleteColumn:!0,allowRenameColumn:!0,allowComments:!0,selectionCopy:!0,mergeCells:{},search:!1,pagination:!1,paginationOptions:null,
92
- textOverflow:!1,tableOverflow:!1,tableHeight:_$_c824[53],tableWidth:null,comments:null,meta:null,style:{},freezeColumns:0,orderBy:null,worksheetId:_$_c824[3],worksheetName:null,worksheetState:null,filters:!1,footers:null,formify:null,applyMaskOnFooters:!1,pluginOptions:null,locked:!1,selectUnLockedCells:!0,selectLockedCells:!0,wrap:!1},b={application:_$_c824[54],cloud:null,root:null,definedNames:{},sorting:null,server:null,toolbar:null,editable:!0,allowExport:!0,includeHeadersOnDownload:!1,forceUpdateOnPaste:!1,
93
- loadingSpin:!1,fullscreen:!1,secureFormulas:!0,parseFormulas:!0,debugFormulas:!1,editorFormulas:!0,autoIncrement:!0,autoCasting:!0,stripHTML:!1,tabs:!1,allowDeleteWorksheet:!0,allowRenameWorksheet:!0,allowMoveWorksheet:!0,moveDownOnEnter:!0,onevent:null,onclick:null,onload:null,onundo:null,onredo:null,onbeforesave:null,onsave:null,onbeforechange:null,onchange:null,onafterchanges:null,oncopy:null,onbeforepaste:null,onpaste:null,onbeforeinsertrow:null,oninsertrow:null,onbeforedeleterow:null,ondeleterow:null,
94
- onbeforeinsertcolumn:null,oninsertcolumn:null,onbeforedeletecolumn:null,ondeletecolumn:null,onmoverow:null,onmovecolumn:null,onresizerow:null,onresizecolumn:null,onselection:null,onbeforecomments:null,oncomments:null,onbeforesort:null,onsort:null,onfocus:null,onblur:null,onmerge:null,onchangeheader:null,onchangefooter:null,onchangefootervalue:null,onchangenested:null,onchangenestedcell:null,oncreateeditor:null,oneditionstart:null,oneditionend:null,onchangestyle:null,onchangemeta:null,onbeforechangepage:null,
95
- onchangepage:null,onbeforecreateworksheet:null,oncreateworksheet:null,onrenameworksheet:null,ondeleteworksheet:null,onmoveworksheet:null,onopenworksheet:null,onchangerowid:null,onbeforesearch:null,onsearch:null,onbeforefilter:null,onfilter:null,onopenfilter:null,oncreatecell:null,oncreaterow:null,oncreatecolumn:null,onbeforeformula:null,onformulachain:null,updateTable:null,contextMenu:null,parseTableFirstRowAsHeader:!1,parseTableAutoCellType:!1,plugins:null,about:!0,license:null,worksheets:null,validations:null},
96
- c=function(e,f){f=JSON.parse(JSON.stringify(f));var g={},h;for(h in f)e&&e.hasOwnProperty(h)?g[h]=e[h]:g[h]=f[h];return g},a=function(e){e&&(typeof e==_$_c824[17]&&(e=JSON.parse(e)),this.options.data=e);this.options.json&&(this.options.data=this.options.json);this.options.data||(this.options.data=[]);e=this.options.columns.length;if(this.options.data&&typeof this.options.data[0]!==_$_c824[13]){var f=this.options.data[0].data&&0<Object.keys(this.options.data[0].data).length?Object.keys(this.options.data[0].data):
97
- Object.keys(this.options.data[0]);f.length>e&&(e=f.length)}this.options.minDimensions[0]>e&&(e=this.options.minDimensions[0]);e||(e=8);for(var g=0;g<e;g++)this.options.columns[g]?this.options.columns[g].type||(this.options.columns[g].type=_$_c824[55]):this.options.columns[g]={type:_$_c824[55]},this.options.columns[g].type==_$_c824[56]&&(this.options.columns[g].type=_$_c824[57],this.options.columns[g].autocomplete=!0),!this.options.columns[g].name&&f&&f[g]&&Number(f[g])!=f[g]&&(this.options.columns[g].name=
98
- f[g]),this.options.columns[g].width||(this.options.columns[g].width=this.options.defaultColWidth),this.options.columns[g].type!=_$_c824[57]||this.options.columns[g].source||(this.options.columns[g].source=[]),this.options.columns[g].type==_$_c824[57]&&this.options.columns[g].url&&jSuites.ajax({url:this.options.columns[g].url,index:g,method:_$_c824[58],dataType:_$_c824[59],worksheet:this,group:this.parent.name,success:function(h){this.worksheet.options.columns[this.index].source=h}})},d=function(e){e.getConfig=
99
- d[_$_c824[51]];e.setConfig=d[_$_c824[11]]};d.spreadsheet=function(e){this.config=c(e,b);1!=this.config.secureFormulas&&console.log(_$_c824[60])};d.worksheet=function(e){var f=this;f.options=c(e,k);f.options.csv?jSuites.ajax({url:f.options.csv,method:_$_c824[58],dataType:_$_c824[55],group:f.parent.name,success:function(g){g=E.parseCSV(g,f.options.csvDelimiter);if(1==f.options.csvHeaders&&0<g.length)for(var h=g.shift(),l=0;l<h.length;l++)f.options.columns[l]||(f.options.columns[l]={type:_$_c824[55],
100
- width:f.options.defaultColWidth}),typeof f.options.columns[l].title===_$_c824[13]&&(f.options.columns[l].title=h[l]);a.call(f,g)}}):f.options.url?jSuites.ajax({url:f.options.url,method:_$_c824[58],dataType:_$_c824[59],group:f.parent.name,success:function(g){a.call(f,g)}}):a.call(f)};d[_$_c824[51]]=function(){return this.options};d[_$_c824[11]]=function(e){typeof e==_$_c824[17]&&(e=JSON.parse(e));if(this.parent){f=Object.keys(e);for(g=0;g<f.length;g++)typeof k[f[g]]!==_$_c824[13]&&(this.options[f[g]]=
101
- e[f[g]]);!0===e.filters?da.show.call(this):!1===e.filters&&da.hide.call(this);!0===e.search?qa.show.call(this):!1===e.search&&qa.hide.call(this);!0===e.toolbar?fa.show.call(this.parent):!1===e.toolbar&&fa.hide.call(this.parent);e.minDimensions&&e.minDimensions[0]&&(f=parseInt(e.minDimensions[0])-this.headers.length,0<f&&this.insertColumn(f),f=parseInt(e.minDimensions[1])-this.rows.length,0<f&&this.insertRow(f));J.call(this,_$_c824[61],{data:JSON.stringify(e)})}else for(var f=Object.keys(e),g=0;g<
102
- f.length;g++)typeof b[f[g]]!==_$_c824[13]&&(this.config[f[g]]=e[f[g]])};return d}(),T=function(k){k=function(b){if(1!=this.ignoreHistory){var c=++this.historyIndex;this.history=this.history.slice(0,c+1);this.history[c]=b}};k.undo=function(){if(0<=this.historyIndex)var b=this.history[this.historyIndex--];if(b){this.ignoreHistory=!0;var c=b.worksheet;c.openWorksheet();if(b.action==_$_c824[62])c.deleteRow(b.insertBefore?b.rowNumber:b.rowNumber+1,b.numOfRows);else if(b.action==_$_c824[63])c.insertRow(b.numOfRows,
103
- b.rowNumber,1,b.data),N.setAttributes.call(c,b.attributes);else if(b.action==_$_c824[64])c.deleteColumn(b.insertBefore?b.columnNumber:b.columnNumber+1,b.numOfColumns);else if(b.action==_$_c824[65])c.insertColumn(b.numOfColumns,b.columnNumber,1,b.properties,b.data,b.extra),N.setAttributes.call(c,b.attributes);else if(b.action==_$_c824[66])c.moveRow(b.newValue,b.oldValue);else if(b.action==_$_c824[67])c.moveColumn(b.newValue,b.oldValue);else if(b.action==_$_c824[68])c.removeMerge(b.newValue,!0),c.setMerge(b.oldValue);
104
- else if(b.action==_$_c824[69])c.setMerge(b.oldValue);else if(b.action==_$_c824[70])c.setStyle(b.oldValue,null,null,1);else if(b.action==_$_c824[71])c.setStyle(b.oldValue);else if(b.action==_$_c824[72])c.setWidth(b.column,b.oldValue);else if(b.action==_$_c824[73])c.setHeight(b.row,b.oldValue);else if(b.action==_$_c824[74])c.setHeader(b.column,b.oldValue);else if(b.action==_$_c824[75])c.setComments(b.oldValue);else if(b.action==_$_c824[76])c.orderBy(b.column,b.direction?0:1,b.oldValue);else if(b.action==
105
- _$_c824[77]||b.action==_$_c824[78]||b.action==_$_c824[79]){var a=[];for(var d=0;d<b.records.length;d++){var e={x:b.records[d].x,value:b.records[d].oldValue};void 0!==b.records[d].y&&(e.y=b.records[d].y);b.records[d].oldStyle&&(e.style=b.records[d].oldStyle);a.push(e)}c[b.action](a)}else b.action==_$_c824[80]?c.renameWorksheet(b.index,b.oldValue):b.action==_$_c824[81]&&c.moveWorksheet(b.t,b.f);b.selection&&c.updateSelectionFromCoords(b.selection);this.ignoreHistory=!1;F.call(this,_$_c824[82],c,b)}};
106
- k.redo=function(){if(this.historyIndex<this.history.length-1)var b=this.history[++this.historyIndex];if(b){this.ignoreHistory=!0;var c=b.worksheet;c.openWorksheet();if(b.action==_$_c824[62])c.insertRow(b.numOfRows,b.rowNumber,b.insertBefore,b.data);else if(b.action==_$_c824[63])c.deleteRow(b.rowNumber,b.numOfRows);else if(b.action==_$_c824[64])c.insertColumn(b.numOfColumns,b.columnNumber,b.insertBefore,b.properties,b.data);else if(b.action==_$_c824[65])c.deleteColumn(b.columnNumber,b.numOfColumns);
107
- else if(b.action==_$_c824[66])c.moveRow(b.oldValue,b.newValue);else if(b.action==_$_c824[67])c.moveColumn(b.oldValue,b.newValue);else if(b.action==_$_c824[68])c.setMerge(b.newValue);else if(b.action==_$_c824[69])c.removeMerge(b.newValue);else if(b.action==_$_c824[70])c.setStyle(b.newValue,null,null,1);else if(b.action==_$_c824[71])c.resetStyle(b.cells);else if(b.action==_$_c824[72])c.setWidth(b.column,b.newValue);else if(b.action==_$_c824[73])c.setHeight(b.row,b.newValue);else if(b.action==_$_c824[74])c.setHeader(b.column,
108
- b.newValue);else if(b.action==_$_c824[75])c.setComments(b.newValue);else if(b.action==_$_c824[76])c.orderBy(b.column,b.direction,b.newValue);else if(b.action==_$_c824[77]||b.action==_$_c824[78]||b.action==_$_c824[79])c[b.action](b.records);else b.action==_$_c824[80]?c.renameWorksheet(b.index,b.newValue):b.action==_$_c824[81]&&c.moveWorksheet(b.f,b.t);b.selection&&c.updateSelectionFromCoords(b.selection);this.ignoreHistory=!1;F.call(this,_$_c824[83],c,b)}};return k}(),pa=function(){var k=function(b){var c=
109
- null;if(Array.isArray(b))c=b;else if(typeof b==_$_c824[84]){c=[];var a=Object.keys(b);for(var d=0;d<a.length;d++)c.push({name:a[d],plugin:b[a[d]],options:{}})}if(c&&c.length)for(d=0;d<c.length;d++){if(c[d].name&&c[d].plugin){var e=c[d].name;var f=c[d].plugin;var g=c[d].options}typeof f===_$_c824[85]&&(this.plugins[e]=f.call(r,this,g,this.config),typeof f.license==_$_c824[85]&&r.license&&f.license(r.license))}};k.execute=function(b,c){if(this.plugins){var a=Object.keys(this.plugins);if(a.length)for(var d=
110
- 0;d<a.length;d++)if(typeof this.plugins[a[d]][b]==_$_c824[85]){var e=this.plugins[a[d]][b].apply(this.plugins[a[d]],c);e&&(b==_$_c824[86]&&(c[4]=e),b==_$_c824[87]&&(c[0]=e))}return c}};k.onevent=function(b){return function(){var c,a,d=this.plugins;if(d){var e=Object.keys(d);if(e.length)for(a=0;a<e.length;a++)if(typeof d[e[a]][b]==_$_c824[85]){var f=d[e[a]][b].apply(d[e[a]],arguments);typeof f!==_$_c824[13]&&(c=f)}}return c}}(_$_c824[88]);return k}(),ba=function(){var k=function(b){b.getEditor=k[_$_c824[51]];
111
- b.openEditor=k.open;b.closeEditor=k.close};k[_$_c824[51]]=function(b,c){b=Ha[_$_c824[51]].call(this,b,c);return[b.type&&typeof b.type==_$_c824[84]?b.type:r.editors[b.type],b]};k.open=function(b,c,a){if(!Q.call(this.parent,this))return!1;if(1!=b.classList.contains(_$_c824[18])){var d=parseInt(b.getAttribute(_$_c824[42])),e=parseInt(b.getAttribute(_$_c824[43]));if(!0===this.options.locked){var f=E.getColumnNameFromCoords(d,e);if(!this.options.cells||!this.options.cells[f]||!1!==this.options.cells[f].locked)return!1}if(f=
112
- this.records[e][d].merged)d-=f[0],e-=f[1],b=this.records[e][d].element;if(!N.attached.call(this,d,e)){if(this.results&&0<this.results.length)return console.error(_$_c824[89]),!1;G[_$_c824[46]].call(this,e,d)}k.position.call(this,d,e);f=this.parent.input;if(113===a.keyCode||a.type!==_$_c824[90])f.selected=!0;f.innerText=_$_c824[3];F.call(this.parent,_$_c824[91],this,b,d,e);c=1==c?_$_c824[3]:M.call(this,d,e);var g=k[_$_c824[51]].call(this,d,e),h=!0;typeof g[0].openEditor==_$_c824[85]&&(!1===g[0].openEditor(b,
113
- c,d,e,this,g[1],a)?h=!1:F.call(this.parent,_$_c824[92],this,b,d,e,f,g[1]));h&&(1==this.options.textOverflow&&(this.records[e][d].element.style.overflow=_$_c824[49],0<d&&(this.records[e][d-1].element.style.overflow=_$_c824[49])),this.edition=b,f.classList.add(_$_c824[93]),1==this.parent.config.editorFormulas&&P(c)&&(f.classList.add(_$_c824[94]),la.parse.call(this,f),b=document.createTextNode(_$_c824[3]),f.appendChild(b),jSuites.focus(f)))}};k.close=function(b,c){null===b&&(b=this.edition);this.parent.input.classList.contains(_$_c824[94])&&
114
- la.close.call(this,this.parent.input);var a,d=parseInt(b.getAttribute(_$_c824[42])),e=parseInt(b.getAttribute(_$_c824[43]));1==this.options.textOverflow&&(a=this.records[e][d+1])&&a.element&&a.element.innerText==_$_c824[3]&&(this.records[e][d].element.style.overflow=_$_c824[3]);a=k[_$_c824[51]].call(this,d,e);if(1==c){var f=null;typeof a[0].closeEditor==_$_c824[85]&&(a=a[0].closeEditor(b,!0,d,e,this,a[1]),void 0!==a&&(f=a));null!==f&&M.call(this,d,e)!=f&&this.setValue(b,f)}else a[0].closeEditor(b,
115
- !1,d,e,this,a[1]);F.call(this.parent,_$_c824[95],this,b,d,e,f,c);a=this.parent.input;a.selected=!1;a.onblur&&(a.onblur=null);a.children[0]&&a.children[0].onblur&&(a.children[0].onblur=null);a.update&&(a.update=null);ba.build(this.parent);a.removeAttribute(_$_c824[96]);a.removeAttribute(_$_c824[97]);a.removeAttribute(_$_c824[98]);this.edition=a.mask=null;this.refreshBorders()};k.position=function(b,c){var a=null;if(a=this.records[c][b].element){var d=this.parent.element.getBoundingClientRect();a=a.getBoundingClientRect();
116
- var e=this.parent.input;e.x=b;e.y=c;0==a.width&&0==a.height?e.style.opacity=_$_c824[99]:(e.setAttribute(_$_c824[100],_$_c824[3]),b=a.top-d.top+1,c=a.left-d.left+1,e.style.top=b+_$_c824[44],e.style.left=c+_$_c824[44],e.style.minWidth=a.width-1+_$_c824[44],e.style.minHeight=a.height-1+_$_c824[44],setTimeout(function(){e.focus()},0))}};k.build=function(b){b.input||(b.input=document.createElement(_$_c824[20]));b.input.className=_$_c824[101];b.input.setAttribute(_$_c824[102],!0);b.input.innerText=_$_c824[3];
117
- b.input.oninput=function(c){1==r.current.parent.config.editorFormulas&&(P(c.target.innerText)?(c.target.classList.add(_$_c824[94]),c.target.selected=!0):c.target.classList.contains(_$_c824[94])&&la.close.call(r.current,this))};b.input.onclick=function(){this.selected=!0};return b.input};return k}(),F=function(k){var b;if(!this.ignoreEvents){if(typeof this.config.onevent==_$_c824[85]){var c=this.config.onevent.apply(this,arguments);typeof c!==_$_c824[13]&&(b=c)}typeof this.config[k]==_$_c824[85]&&
118
- (c=this.config[k].apply(this,Array.prototype.slice.call(arguments,1)),typeof c!==_$_c824[13]&&(b=c));c=pa.onevent.apply(this,arguments);typeof c!==_$_c824[13]&&(b=c)}return b},ta=function(){var k=function(b){b.sequence=0;b.getNextSequence=k.next;b.getRowId=k.getId;b.setRowId=k.setId;b.getRowById=k.getRowById};k[_$_c824[51]]=function(){return this.sequence};k[_$_c824[11]]=function(b,c){if(b>this.sequence||c)this.sequence=b};k.next=function(){return 1==this.options.sequence?++this.sequence:null};k.reset=
119
- function(){this.sequence=0};k.getId=function(b){if(this.rows[b]&&this.rows[b].id)return this.rows[b].id;var c=this.getPrimaryKey();if(!1!==c)return M.call(this,c,b)};k.setId=function(b,c){if(void 0!==c&&0<=parseInt(b)){var a={};a[b]=c}else a=b;b=Object.keys(a);if(b.length){for(var d=0;d<b.length;d++)c=a[b[d]],this.rows[b[d]].id=c,k[_$_c824[11]].call(this,c);J.call(this,_$_c824[103],[a]);F.call(this.parent,_$_c824[104],this,a)}};k.getRowById=function(b,c){for(var a=0;a<this.rows.length;a++)if(k.getId.call(this,
120
- a)==b)return!0===c?this.rows[a]:this.options.data[a];return!1};return k}(),Oa=function(){var k=function(c){for(var a=[],d={},e=0;e<c.length;e++){var f=c[e].x,g=c[e].y,h=ta.getId.call(this,g);if(!h)if(d[g])h=d[g];else if(h=ta.next.call(this))d[g]=h;a[g]||(a[g]={id:h,row:g,data:{}});f=Z.call(this,f);a[g].data[f]=c[e].value}ta.setId.call(this,d);return a.filter(function(l){return null!=l})},b=function(c){var a=c[0];if(0<=[_$_c824[105],_$_c824[106],_$_c824[103],_$_c824[107]].indexOf(a))return!1;var d=
121
- {};a==_$_c824[77]||a==_$_c824[108]?(a=_$_c824[109],d[a]=k.call(this,c[1].data)):Array.isArray(c[1])&&1==c[1].length?d[a]=c[1][0]:d[a]=c[1];return d};return function(c,a,d,e){var f=this.parent,g=this;d=null;var h=b.call(this,a);if(h)a=h;else if(!1===h)return!1;if(h=F.call(f,_$_c824[110],f,g,a))a=h;else if(!1===h)return!1;La.call(f,!0);jSuites.ajax({url:c,method:_$_c824[111],dataType:_$_c824[59],data:{data:JSON.stringify(a)},queue:!0,beforeSend:function(l){d&&l.setRequestHeader(_$_c824[112],_$_c824[113]+
122
- d)},success:function(l){f.element.classList.contains(_$_c824[114])&&f.element.classList.remove(_$_c824[114]);l&&(l.message&&(l.name=f.config.application,jSuites.notification.isVisible()?console.log(l.name+_$_c824[115]+l.message):jSuites.notification(l)),l.success?typeof e===_$_c824[85]?e(l):l.data&&Array.isArray(l.data)&&N.updateAll.call(g,l.data):l.error&&(alert(_$_c824[116]),window.open(window.location.href,_$_c824[117])));F.call(f,_$_c824[118],f,g,a,l)},error:function(){f.element.classList.add(_$_c824[114])}})}}(),
123
- J=function(){return function(){pa.execute.call(this.parent,_$_c824[119],[this,arguments[0],arguments[1]]);if(!this.parent.ignorePersistence){var k=null;if(this.parent.config.server){var b=this.parent.worksheets.indexOf(this);k=this.parent.config.server;k=-1==k.indexOf(_$_c824[120])?k+(_$_c824[121]+b):k+(_$_c824[122]+b)}else this.options.persistence&&(k=typeof this.options.persistence==_$_c824[17]?this.options.persistence:this.options.url);k&&Oa.call(this,k,arguments)}}}(),Ea=function(k){if(this.selectedCell){var b=
124
- this.selectedCell[0],c=this.selectedCell[1];this.records&&this.records[c]&&this.records[c][b]&&this.records[c][b].element||(this.selectedCell=this.getHighlighted(),b=this.selectedCell[0],c=this.selectedCell[1]);var a=this.getHighlighted(),d=a[0],e=a[1],f=a[2];a=a[3];var g=k?_$_c824[123]:_$_c824[124];this.records[c]&&this.records[c][b]&&this.records[c][b].element&&(this.records[c][b].element.classList[g](_$_c824[125]),this.cursor=k?this.records[c][b].element:null);for(k=d;k<=f;k++)if(this.headers[k])this.headers[k].classList[g](_$_c824[126]);
125
- for(;e<=a;e++)if(this.rows[e]&&this.rows[e].element)this.rows[e].element.classList[g](_$_c824[126])}},za=function(){var k=function(b){b.resetSelection=k.reset;b.updateSelection=k.fromElements;b.updateSelectionFromCoords=k[_$_c824[11]];b.selectAll=k.all;b.isSelected=k.isSelected;b.getHighlighted=k.getHighlighted;b.getRange=k.getRange};k.getHighlighted=function(){var b=this.borders;return(b=b.main)?[b.x1,b.y1,b.x2,b.y2]:null};k.isSelected=function(b,c,a){if(!a&&(a=this.getHighlighted(),!a))return!1;
126
- var d=a[0],e=a[1],f=a[2];a=a[3];f||(f=d);a||(a=e);return null==b?c>=e&&c<=a:null==c?b>=d&&b<=f:b>=d&&b<=f&&c>=e&&c<=a};k.reset=function(){if(this.selectedCell)b=1,this.edition&&ba.close.call(this,this.edition,!0),this.resetBorders(_$_c824[127],!0),this.resetBorders(_$_c824[128],!0),this.selectedCell=null,1==b&&F.call(this.parent,_$_c824[129],this);else var b=0;return b};k.refresh=function(){this.selectedCell&&k[_$_c824[11]].call(this,this.selectedCell)};k.isValid=function(b,c,a,d){return!(b>=this.options.columns.length||
127
- c>=this.rows.length||a>=this.options.columns.length||d>=this.rows.length)};k[_$_c824[11]]=function(b,c,a,d,e,f,g){f||(f=_$_c824[127]);Array.isArray(b)&&(d=b[3],a=b[2],c=b[1],b=b[0]);null==a&&(a=b);null==d&&(d=c);if(!k.isValid.call(this,b,c,a,d))return!1;if(null!=b){if(parseInt(b)<parseInt(a))var h=parseInt(b),l=parseInt(a);else h=parseInt(a),l=parseInt(b);if(parseInt(c)<parseInt(d))var m=parseInt(c),p=parseInt(d);else m=parseInt(d),p=parseInt(c);var n;var t={};if(this.options.mergeCells){for(var v=
128
- m;v<=p;v++)for(var u=h;u<=l;u++)if(n=this.records[v][u].merged)n=E.getColumnNameFromCoords(u-n[0],v-n[1]),t[n]=!0;v=Object.keys(t);if(v.length)for(u=0;u<v.length;u++)n=E.getCoordsFromColumnName(v[u]),t=this.options.mergeCells[v[u]],n[0]<h&&(h=n[0]),n[0]+t[0]-1>l&&(l=n[0]+t[0]-1),n[1]<m&&(m=n[1]),n[1]+t[1]-1>p&&(p=n[1]+t[1]-1)}}f==_$_c824[127]&&(this.selectedCell?(Ea.call(this,!1),n=1):n=0,this.selectedCell=[b,c,a,d],this.records[d][a].element&&G.isVisible.call(this,this.records[d][a].element),ba.position.call(this,
129
- b,c),0==n&&F.call(this.parent,_$_c824[130],this));ha[_$_c824[11]].call(this,h,m,l,p,f,g);f==_$_c824[127]&&(F.call(this.parent,_$_c824[131],this,h,m,l,p,e),fa.update.call(this.parent,this,this.selectedCell))};k.fromElements=function(b,c,a){var d=b.getAttribute(_$_c824[42]);b=b.getAttribute(_$_c824[43]);if(c){var e=c.getAttribute(_$_c824[42]);c=c.getAttribute(_$_c824[43])}else e=d,c=b;this.updateSelectionFromCoords(d,b,e,c,a)};k.all=function(){k[_$_c824[11]].call(this,0,0,this.options.columns.length-
130
- 1,this.records.length-1)};k.getRange=function(){var b=this.selectedCell;if(!b)return _$_c824[3];var c=E.getColumnNameFromCoords(b[0],b[1]);b=E.getColumnNameFromCoords(b[2],b[3]);var a=this.options.worksheetName;a=-1!=a.indexOf(_$_c824[132])?_$_c824[133]+a+_$_c824[134]:a+_$_c824[135];return c==b?a+c:a+r.helpers.getRangeFromTokens(r.helpers.getTokensFromRange(c+_$_c824[136]+b))};return k}(),ha=function(){var k=function(a){a.borders=[];a.setBorder=k[_$_c824[11]];a.getBorder=k[_$_c824[51]];a.resetBorders=
131
- k.reset;a.refreshBorders=k.refresh};k[_$_c824[51]]=function(a){return this.borders[a]};var b=function(a,d,e,f,g,h){g||(g=0);if(!za.isValid.call(this,a,d,e,f))return!1;if(this.borders[g])l=this.borders[g];else{var l={};l.element=document.createElement(_$_c824[20]);l.element.classList.add(_$_c824[137]);g==_$_c824[128]||g==_$_c824[138]||g==_$_c824[127]?l.element.classList.add(_$_c824[139]+g):(h=h?h:jSuites.randomColor(!0),l.color=h,l.element.style.backgroundColor=h+_$_c824[140],l.element.style.borderColor=
132
- h);this.content.appendChild(l.element)}l.x1=a;l.y1=d;l.x2=e;l.y2=f;h=this.headers[a]?this.headers[a].offsetLeft:0;var m=this.headers[e]?this.headers[e].offsetLeft:0,p=this.rows[d].element?this.rows[d].element.offsetTop:0,n=this.rows[f].element?this.rows[f].element.offsetTop:0;l.element.style.top=_$_c824[141];l.element.style.left=_$_c824[141];l.active=0;var t=this.options.freezeColumns||0,v=!1,u=null,y=null,z=null,C=null;this.tbody.firstChild&&(y=parseInt(this.tbody.firstChild.getAttribute(_$_c824[43])),
133
- C=parseInt(this.tbody.lastChild.getAttribute(_$_c824[43])));this.thead.lastChild&&(u=parseInt(this.thead.lastChild.children[t+1].getAttribute(_$_c824[42])),z=parseInt(this.thead.lastChild.lastChild.getAttribute(_$_c824[42])),this.thead.lastChild.children[1].style.display==_$_c824[40]&&(u=Ma.call(this,u,y)),this.thead.lastChild.lastChild.style.display==_$_c824[40]&&(z=Na.call(this,z,C)));null==u||e<u&&a>=t||a>z||f<y||d>C||(h?l.element.style.borderLeftColor=l.color?l.color:_$_c824[3]:(h=this.thead.lastChild.children[t+
134
- 1].offsetLeft,l.element.style.borderLeftColor=g==_$_c824[128]?_$_c824[142]:_$_c824[143]),m?(m+=this.headers[e].offsetWidth,l.element.style.borderRightColor=l.color?l.color:_$_c824[3]):(e>z?(m=this.headers[z].offsetLeft+this.headers[z].offsetWidth,v=!0):m=this.thead.lastChild.children[t].offsetLeft+this.thead.lastChild.children[t].offsetWidth,l.element.style.borderRightColor=g==_$_c824[128]?_$_c824[142]:_$_c824[143]),m=m-h-1,p?l.element.style.borderTopColor=l.color?l.color:_$_c824[3]:(p=this.tbody.firstChild.offsetTop,
135
- l.element.style.borderTopColor=g==_$_c824[128]?_$_c824[142]:_$_c824[143]),n?(n+=this.rows[f].element.offsetHeight,l.element.style.borderBottomColor=l.color?l.color:_$_c824[3]):(n=this.rows[C].element.offsetTop+this.rows[C].element.offsetHeight,l.element.style.borderBottomColor=g==_$_c824[128]?_$_c824[142]:_$_c824[143],v=!0),n=n-p-1,this.options.freezeColumns&&(l.element.style.borderLeftWidth=_$_c824[3],l.element.style.borderRightWidth=_$_c824[3],d=0<this.content.scrollLeft?ka.getWidth.call(this):
136
- 0)&&(a=a<this.options.freezeColumns,e=e<this.options.freezeColumns,a&&e||!a&&e||(a&&!e?(e=d+this.content.scrollLeft,e>h+m&&(l.element.style.borderRightWidth=_$_c824[144],m+=e-(h+m))):(e=d+this.content.scrollLeft,e>h&&(e-=h,e>m?h=p=-2E3:(h=h+e+1,m-=e,l.element.style.borderLeftWidth=_$_c824[144]))))),l.element.style.top=p+_$_c824[44],l.element.style.left=h+_$_c824[44],l.element.style.width=m+_$_c824[44],l.element.style.height=n+_$_c824[44],l.t=p,l.l=h,l.w=m,l.h=n,l.active=1);g==_$_c824[127]&&(l.active&&
137
- 1!=v?(this.corner.style.top=p+n-2+_$_c824[44],this.corner.style.left=h+m-2+_$_c824[44]):(this.corner.style.top=_$_c824[141],this.corner.style.left=_$_c824[141]));this.borders[g]=l},c=function(a,d){a.element.style.top=_$_c824[141];a.element.style.left=_$_c824[141];a.active=0;d&&(a.x1=null,a.y1=null,a.x2=null,a.y2=null)};k[_$_c824[11]]=function(a,d,e,f,g,h){b.call(this,a,d,e,f,g,h);g==_$_c824[127]&&(Ea.call(this,!0),J.call(this,_$_c824[105],{x1:a,y1:d,x2:e,y2:f}))};k.reset=function(a,d){a&&a!=_$_c824[127]||
138
- (this.corner.style.top=_$_c824[141],this.corner.style.left=_$_c824[141],Ea.call(this,!1));if(a)this.borders[a]&&c(this.borders[a],d);else{d=Object.keys(this.borders);for(var e=0;e<d.length;e++)c(this.borders[d[e]])}a&&a!=_$_c824[127]||J.call(this,_$_c824[106])};k.refresh=function(a){var d=this.borders;if(a)d[a]&&null!=d[a].x1&&b.call(this,d[a].x1,d[a].y1,d[a].x2,d[a].y2,a);else{a=Object.keys(d);for(var e=0;e<a.length;e++)d[a[e]]&&null!=d[a[e]].x1&&b.call(this,d[a[e]].x1,d[a[e]].y1,d[a[e]].x2,d[a[e]].y2,
139
- a[e])}this.edition&&(d=this.parent.input,ba.position.call(this,d.x,d.y))};k.destroy=function(a){var d;if(d=this.borders[a])d.element.remove(),delete this.borders[a]};return k}(),Va=function(){var k=function(b){b.setGroup=k[_$_c824[11]];b.unsetGroup=k.unset};k[_$_c824[11]]=function(b,c,a){0==b&&(a=document.createElement(_$_c824[145]),a.classList.add(_$_c824[146]),this.thead.insertBefore(a,this.thead.firstChild),b=document.createElement(_$_c824[147]),b.innerHTML=_$_c824[148],a.appendChild(b),b=document.createElement(_$_c824[147]),
140
- a.appendChild(b),c=this.headers[c])&&(c=c.querySelector(_$_c824[149]),c||(c=document.createElement(_$_c824[20]),c.classList.add(_$_c824[150]),c.innerText=_$_c824[151],b.appendChild(c)))};k.unset=function(b,c){};return k}(),wa=function(){var k={start:function(b){if(!Q.call(this.parent,this))return!1;if(null!==b.target.getAttribute(_$_c824[43])){var c=b.target.getAttribute(_$_c824[43]);k.event={y:parseInt(c),h:b.target.offsetHeight,p:b.pageY}}else null!==b.target.getAttribute(_$_c824[42])&&(c=b.target.getAttribute(_$_c824[42]),
141
- k.event={x:parseInt(c),w:b.target.offsetWidth,p:b.pageX})},end:function(b){var c=[];if(null!=k.event.y){var a=parseInt(this.rows[k.event.y].element.offsetHeight);var d=this.getSelectedRows(!0);b=d.indexOf(parseInt(k.event.y));if(d.length&&-1<b)for(var e=0;e<d.length;e++)c.push(parseInt(this.rows[d[e]].element.offsetHeight));else d=[];-1==b?(d.push(k.event.y),c.push(k.event.h)):c[b]=k.event.h;this.setHeight(d,a,c)}else if(null!=k.event.x){a=parseInt(this.colgroup[k.event.x].getAttribute(_$_c824[152]));
142
- d=this.getSelectedColumns();b=d.indexOf(parseInt(k.event.x));if(d.length&&-1<b)for(e=0;e<d.length;e++)c.push(parseInt(this.options.columns[d[e]].width));else d=[];-1==b?(d.push(k.event.x),c.push(k.event.w)):c[b]=k.event.w;this.setWidth(d,a,c)}k.event=null},update:function(b){null!=k.event.y?(b=b.pageY-k.event.p,0<k.event.h+b&&(this.rows[k.event.y].element.style.height=k.event.h+b+_$_c824[44],this.refreshBorders())):null!=k.event.x&&(b=b.pageX-k.event.p,0<k.event.w+b&&(this.colgroup[k.event.x].setAttribute(_$_c824[152],
143
- k.event.w+b),this.options.columns[k.event.x].width=k.event.w+b,0<this.options.freezeColumns&&ka.width.call(this),this.refreshBorders()))},cancel:function(){k.end.call(this)}};return k}(),Pa=function(){var k={start:function(b){var c=this.parent.helper;b=parseInt(b.target.getAttribute(_$_c824[42]));if(this.merged.cols[b])console.error(_$_c824[153]);else{k.event={x:b,d:b};this.headers[b].classList.add(_$_c824[154]);for(var a=0;a<this.tbody.children.length;a++){var d=this.tbody.children[a].getAttribute(_$_c824[43]);
144
- this.records[d][b].element.classList.add(_$_c824[154])}a=this.parent.element.getBoundingClientRect();b=this.headers[b].getBoundingClientRect();d=this.content.getBoundingClientRect();c.style.display=_$_c824[16];c.style.top=d.top-a.top+_$_c824[44];c.style.left=b.left-d.left+_$_c824[44];c.style.width=_$_c824[155];c.style.height=d.height+_$_c824[44];c.classList.add(_$_c824[156])}},end:function(){this.headers[k.event.x].classList.remove(_$_c824[154]);for(var b=0;b<this.tbody.children.length;b++){var c=
145
- this.tbody.children[b].getAttribute(_$_c824[43]);this.records[c][k.event.x].element.classList.remove(_$_c824[154])}null!=k.event.d&&k.event.x!=k.event.d&&(this.moveColumn(k.event.x,k.event.d),this.refreshBorders());this.parent.helper.classList.remove(_$_c824[156]);this.parent.helper.style.display=_$_c824[3];k.event=null},cancel:function(){k.event.d=null;k.end.call(this)},update:function(b){var c=b.target.getAttribute(_$_c824[42]);if(null!=c)if(c=parseInt(c),this.merged.cols[c])console.error(_$_c824[153]);
146
- else{b=b.target.clientWidth/2>b.offsetX;k.event.d=b?k.event.x<c?parseInt(c)-1:parseInt(c):k.event.x>c?parseInt(c)+1:parseInt(c);c=this.headers[c].getBoundingClientRect();var a=this.content.getBoundingClientRect();this.parent.helper.style.left=(b?c.left:c.right)-a.left+_$_c824[44]}}};return k}(),ra=function(){var k={start:function(b){if(Q.call(this.parent,this)){this.resetSelection();var c=this.parent.helper;if(null!==b.target.getAttribute(_$_c824[43])){var a=parseInt(b.target.getAttribute(_$_c824[43]));
147
- this.merged.rows[a]?console.error(_$_c824[157]):this.results?console.error(_$_c824[158]):(k.event={y:a,d:a},this.rows[a].element.classList.add(_$_c824[154]),b=this.parent.element.getBoundingClientRect(),a=this.rows[a].element.getBoundingClientRect(),c.style.display=_$_c824[16],c.style.top=a.top-b.top+_$_c824[44],c.style.left=_$_c824[159],c.style.width=this.content.offsetWidth-50+_$_c824[44],c.style.height=_$_c824[155],c.classList.add(_$_c824[160]))}else if(null!==b.target.getAttribute(_$_c824[42]))if(a=
148
- parseInt(b.target.getAttribute(_$_c824[42])),this.merged.cols[a])console.error(_$_c824[153]);else{k.event={x:a,d:a};this.headers[a].classList.add(_$_c824[154]);for(b=0;b<this.tbody.children.length;b++){var d=this.tbody.children[b].getAttribute(_$_c824[43]);this.records[d][a].element.classList.add(_$_c824[154])}b=this.parent.element.getBoundingClientRect();a=this.headers[a].getBoundingClientRect();d=this.content.getBoundingClientRect();c.style.display=_$_c824[16];c.style.top=d.top-b.top+_$_c824[44];
149
- c.style.left=a.left-d.left+_$_c824[44];c.style.width=_$_c824[155];c.style.height=d.height+_$_c824[44];c.classList.add(_$_c824[156])}}else return!1},end:function(){if(null!=k.event.y)this.rows[k.event.y].element.classList.remove(_$_c824[154]),null!=k.event.d&&k.event.y!=k.event.d&&(this.moveRow(k.event.y,k.event.d),this.updateSelectionFromCoords(0,k.event.d,this.options.columns.length-1,k.event.d)),this.parent.helper.classList.remove(_$_c824[160]);else if(null!=k.event.x){this.headers[k.event.x].classList.remove(_$_c824[154]);
150
- for(var b=0;b<this.tbody.children.length;b++){var c=this.tbody.children[b].getAttribute(_$_c824[43]);this.records[c][k.event.x].element.classList.remove(_$_c824[154])}null!=k.event.d&&k.event.x!=k.event.d&&(this.moveColumn(k.event.x,k.event.d),this.refreshBorders());this.parent.helper.classList.remove(_$_c824[156])}this.parent.helper.style.display=_$_c824[3];k.event=null},cancel:function(){k.event.d=null;k.end.call(this)},update:function(b){if(null!=k.event.y){var c=b.target.getAttribute(_$_c824[43]);
151
- if(null!=c){var a=c=parseInt(c),d=b.target.clientHeight/2>b.offsetY;d?k.event.y<c&&(a=c-1):k.event.y>c&&(a=c+1);b=!1;this.merged.rows[a]&&(k.event.y>a?this.merged.rows[a-1]&&(b=!0):this.merged.rows[a+1]&&(b=!0));b||(k.event.d=a,a=this.parent.element.getBoundingClientRect(),c=this.rows[c].element.getBoundingClientRect(),this.parent.helper.style.top=(d?c.top:c.bottom)-a.top+_$_c824[44])}}else d=b.target.getAttribute(_$_c824[42]),null!=d&&(a=d=parseInt(d),(c=b.target.clientWidth/2>b.offsetX)?k.event.x<
152
- d&&(a=d-1):k.event.x>d&&(a=d+1),b=!1,this.merged.cols[a]&&(k.event.x>a?this.merged.cols[a-1]&&(b=!0):this.merged.cols[a+1]&&(b=!0)),b||(k.event.d=a,a=this.headers[d].getBoundingClientRect(),d=this.content.getBoundingClientRect(),this.parent.helper.style.left=(c?a.left:a.right)-d.left+_$_c824[44]))}};return k}(),ca=function(){var k=function(b){b.getMerge=k[_$_c824[51]];b.setMerge=k[_$_c824[11]];b.updateMerge=k.update;b.removeMerge=k.remove;b.destroyMerged=b.destroyMerge=k.destroy};k.getHeight=function(b,
153
- c){var a,d=1;if(this.merged.rows[b])for(var e=0;e<this.options.columns.length;e++){var f=E.getColumnNameFromCoords(e,b);if(f=this.merged.cells[f])if(a=this.options.mergeCells[f])c&&void 0!==c[f]||(a[1]>d&&(d=a[1]),c&&(c[f]=this.records[b][e].element&&!this.records[b][e].merged?!0:!1))}return d-1};k.getWidth=function(b,c){var a,d=1;if(this.merged.cols[b])for(var e=0;e<this.options.data.length;e++){var f=E.getColumnNameFromCoords(b,e);if(f=this.merged.cells[f])if(a=this.options.mergeCells[f])c&&void 0!==
154
- c[f]||(a[0]>d&&(d=a[0]),c&&(c[f]=this.records[e][b].element&&!this.records[e][b].merged?!0:!1))}return d-1};k[_$_c824[51]]=function(b){return b?this.options.mergeCells[b]:this.options.mergeCells};k[_$_c824[11]]=function(b,c,a){if(!Q.call(this.parent,this))return!1;this.options.mergeCells||(this.options.mergeCells={});var d,e=null,f={},g={},h={},l=!1;typeof b==_$_c824[17]?h[b]=[c,a]:typeof b==_$_c824[84]?h=b:((e=this.getHighlighted())?e=[E.getColumnNameFromCoords(e[0],e[1]),e[2]-e[0]+1,e[3]-e[1]+1]:
155
- (jSuites.notification({message:B(_$_c824[161])}),e=!1),e&&(h[e[0]]=[e[1],e[2]]));c=Object.keys(h);if(c.length){for(a=0;a<c.length;a++){var m=c[a],p=h[c[a]][0],n=h[c[a]][1];p=parseInt(p);n=parseInt(n);if((!p||2>p)&&(!n||2>n))console.log(B(_$_c824[162])+_$_c824[136]+m);else if(this.options.mergeCells[m])g[m]=[p,n],f[m]=this.options.mergeCells[m],k.update.call(this,m,p,n);else{e=E.getCoordsFromColumnName(m);for(var t=e[1];t<e[1]+n;t++)for(var v=e[0];v<e[0]+p;v++)b=E.getColumnNameFromCoords(v,t),(d=this.merged.cells[b])&&
156
- this.options.mergeCells[d]&&(f[d]=this.options.mergeCells[d],k.applyDestroy.call(this,d));g[m]=this.options.mergeCells[m]=[p,n];k.applyCreate.call(this,m);N.attached.call(this,e[0],e[1])||(l=e)}}Object.keys(g).length&&(l&&G[_$_c824[46]].call(this,e[1],e[0]),T.call(this.parent,{worksheet:this,action:_$_c824[68],newValue:g,oldValue:f}),J.call(this,_$_c824[68],[g]),k.build.call(this),za.refresh.call(this),ha.refresh.call(this),F.call(this.parent,_$_c824[163],this,g,f))}};k.update=function(b,c,a){var d=
157
- this.options.mergeCells;if(d[b]){var e=d[b][1];if(c!==d[b][0]||e!==a)k.applyDestroy.call(this,b),c&&a&&(d[b]=[c,a],k.applyCreate.call(this,b))}};k.remove=function(b,c){if(!Q.call(this.parent,this))return!1;c={};var a={},d={};typeof b==_$_c824[17]?d[b]=!0:typeof b==_$_c824[84]&&(d=b);b=Object.keys(d);for(d=0;d<b.length;d++)this.options.mergeCells[b[d]]&&(c[b[d]]=this.options.mergeCells[b[d]],a[b[d]]=!0,k.applyDestroy.call(this,b[d],!0));T.call(this.parent,{worksheet:this,action:_$_c824[69],newValue:a,
158
- oldValue:c});J.call(this,_$_c824[69],{data:a})};k.destroy=function(){k.remove.call(this,this.options.mergeCells,!0)};k.applyCreate=function(b,c){var a=this.options.mergeCells;if(a[b]){var d=a[b][0]||1,e=a[b][1]||1;b=E.getCoordsFromColumnName(b);if(!this.records[b[1]][b[0]].merged||1==c)if(a=N[_$_c824[51]].call(this,b[0],b[1])){a.style.display=_$_c824[3];1<d?a.setAttribute(_$_c824[52],d):a.removeAttribute(_$_c824[52]);1<e?a.setAttribute(_$_c824[164],e):a.removeAttribute(_$_c824[164]);1==this.options.textOverflow&&
159
- (a.style.overflow=_$_c824[49]);for(var f=0;f<e;f++)for(var g=0;g<d;g++){c=b[0]+g;var h=b[1]+f;if(a=this.records[h][c])if(a.merged=[g,f,a.v,a.v],0!=g||0!=f)a.element||N[_$_c824[51]].call(this,c,h),a.element.style.display=_$_c824[40],a.merged[3]=a.element.innerText,a.element.innerText=_$_c824[3],M.call(this,c,h,_$_c824[3])}}}};k.applyDestroy=function(b,c){var a=this.options.mergeCells;if(a[b]){var d=E.getCoordsFromColumnName(b),e=d[0];d=d[1];var f=a[b][0],g=a[b][1];delete this.options.mergeCells[b];
160
- for(b=0;b<g;b++)for(var h=0;h<f;h++)if(a=this.records[d+b][e+h])a.element&&(0==h&&0==b?(a.element.removeAttribute(_$_c824[52]),a.element.removeAttribute(_$_c824[164])):(a.element.style.display=_$_c824[3],1==c&&(M.call(this,e+h,d+b,a.merged[2]),a.element.innerHTML=a.merged[3]))),a.merged&&delete a.merged}};k.updateConfig=function(b,c,a,d){if(1==c)var e=[a];else{e=[];for(var f=a;f<a+d;f++)e.push(f)}var g=this.options.mergeCells,h=Object.keys(g),l={};for(f=0;f<h.length;f++){a=E.getCoordsFromColumnName(h[f]);
161
- for(var m=a[b];m<a[b]+g[h[f]][b];m++)-1!==e.indexOf(m)&&(l[h[f]]||(l[h[f]]=[g[h[f]][0],g[h[f]][1]],1==c&&(l[h[f]][b]+=d)),0==c&&l[h[f]][b]--)}h=Object.keys(l);for(f=0;f<h.length;f++)k.update.call(this,h[f],l[h[f]][0],l[h[f]][1]);k.build.call(this)};k.build=function(){var b=this.options.mergeCells;this.merged={cols:[],rows:[],cells:[]};if(b)for(var c=Object.keys(b),a=0;a<c.length;a++){for(var d=E.getCoordsFromColumnName(c[a]),e=parseInt(b[c[a]][0]),f=parseInt(b[c[a]][1]),g=0;g<e;g++)this.merged.cols[d[0]+
162
- g]=!0;for(var h=0;h<f;h++)this.merged.rows[d[1]+h]=!0;for(h=0;h<f;h++)for(g=0;g<e;g++){var l=E.getColumnNameFromCoords(d[0]+g,d[1]+h);this.merged.cells[l]=c[a]}}};k.batch=function(b){var c=Object.keys(b);if(c.length)for(var a=0;a<c.length;a++)!1===b[c[a]]&&k.applyCreate.call(this,c[a])};return k}(),Ca=function(){var k=function(b){b.getHeader=k[_$_c824[51]];b.setHeader=k[_$_c824[11]];b.getHeaders=k.all};k[_$_c824[51]]=function(b){var c;if(c=this.options.columns)return c[b].title||E.getColumnName(b)};
163
- k.all=function(b){for(var c=[],a=0;a<this.options.columns.length;a++)c.push(k[_$_c824[51]].call(this,a));return b?c:c.join(this.options.csvDelimiter)};k[_$_c824[11]]=function(b,c){if(!Q.call(this.parent,this))return!1;var a;if(a=this.options.columns[b]){var d=k[_$_c824[51]].call(this,b);if(!c&&(c=prompt(B(_$_c824[165]),d),!c))return!1;a.title=c;if(a=this.headers[b])a.innerHTML=c,a.setAttribute(_$_c824[166],c);T.call(this.parent,{worksheet:this,action:_$_c824[74],column:b,oldValue:d,newValue:c});J.call(this,
164
- _$_c824[74],{column:b,title:c});F.call(this.parent,_$_c824[167],this,b,c,d)}};k.create=function(b){var c=this.options.columns[b],a=c.width||this.options.defaultColWidth,d=c.title||E.getColumnName(b),e=document.createElement(_$_c824[147]);this.parent.config.stripHTML?e.innerText=d:e.innerHTML=d;e.setAttribute(_$_c824[42],b);c.title&&e.setAttribute(_$_c824[166],e.innerText);c.tooltip&&(e.title=c.tooltip);d=this.options.filters;!0===c.filter&&(d=!0);!1===c.filter&&(d=!1);!0===d&&e.classList.add(_$_c824[168]);
165
- !1===c.visible&&(a=_$_c824[99]);d=document.createElement(_$_c824[169]);d.setAttribute(_$_c824[152],a);c.type==_$_c824[49]&&(e.style.display=_$_c824[40],d.style.display=_$_c824[40]);this.headers[b]=e;this.colgroup[b]=d;F.call(this.parent,_$_c824[170],this,b,e,c)};return k}(),aa=function(){var k=function(c,a,d){var e=this.footers.content,f;e&&e[a]&&e[a][c]&&(f=e[a][c].element)&&(void 0===d&&(e=this.options.footers,d=e[a]&&e[a][c]?e[a][c]:_$_c824[3]),P(d)&&1==this.parent.config.parseFormulas&&(d=W.execute.call(this,
166
- d,c,null,!1)),this.options.applyMaskOnFooters&&(e=ba[_$_c824[51]].call(this,c),d=r.editors.general.parseValue(c,a,d,this,e[1],f)),d instanceof Element||d instanceof HTMLDocument?(f.innerHTML=_$_c824[3],f.appendChild(d)):1==this.parent.config.stripHTML?f.innerText=d:f.innerHTML=d)},b=function(c){c.getFooter=b[_$_c824[51]];c.setFooter=b[_$_c824[11]];c.resetFooter=b.reset;c.refreshFooter=b.refresh;c.getFooterValue=b.value;c.setFooterValue=b.value};b[_$_c824[51]]=function(){return this.options.footers};
167
- b[_$_c824[11]]=function(c){if(c){var a=this.options.footers;this.options.footers=c}this.options.footers!=a&&(aa.build.call(this),b.render.call(this),G.limited.call(this)&&(this.scrollY.style.display=_$_c824[40],G.resetY.call(this)),J.call(this,_$_c824[171],{data:this.options.footers}),F.call(this.parent,_$_c824[172],this,this.options.footers,a))};b.refresh=function(){var c=this.options.footers;if(c&&c.length)for(var a=0;a<c.length;a++)for(var d=0;d<c[a].length;d++)k.call(this,d,a,c[a][d])};b.value=
168
- function(c,a,d){if(void 0===d)return this.options.footers[a][c];k.call(this,c,a,d);J.call(this,_$_c824[173],{x:c,y:a,value:d});F.call(this.parent,_$_c824[174],this,c,a,d)};b.reset=function(){var c=this.options.footers;this.options.footers=null;this.footers.content=null;this.tfoot.innerHTML=_$_c824[3];J.call(this,_$_c824[175],{});F.call(this.parent,_$_c824[172],this,null,c)};b.create=function(c,a){var d=this.footers.content[a][c];if(d&&d.element)return d.element;d=this.footers.content[a][c]={};var e=
169
- this.options.columns[c].align;d.element=document.createElement(_$_c824[147]);d.element.setAttribute(_$_c824[42],c);d.element.setAttribute(_$_c824[43],a);e&&(d.element.style.textAlign=e);k.call(this,c,a);this.options.columns[c].type==_$_c824[49]&&(d.element.style.display=_$_c824[40]);return d.element};b.build=function(){this.footers={element:this.tfoot,content:[]};if(this.options.footers){this.tfoot.innerHTML=_$_c824[3];for(var c=0;c<this.options.footers.length;c++){if(!this.footers.content[c]){this.footers.content[c]=
170
- [];var a=document.createElement(_$_c824[145]),d=document.createElement(_$_c824[147]);d.innerHTML=_$_c824[148];a.appendChild(d);this.footers.element.appendChild(a)}for(a=0;a<this.options.columns.length;a++)this.options.footers[c][a]||(this.options.footers[c][a]=_$_c824[3]),this.footers.content[c][a]||(this.footers.content[c][a]={})}}};b.render=function(){for(var c=this.options.footers,a=0;a<c.length;a++)for(var d=0;d<c[a].length;d++){var e=aa.create.call(this,d,a);this.tfoot.children[a].appendChild(e)}};
171
- b.adjust=function(c,a,d){var e=[],f=this.options.footers,g=this.footers.content;if(f)if(1==d){if(this.headers[c]&&this.headers[c].parentNode)var h=this.headers[c]==this.thead.lastChild.lastChild?!0:!1,l=!0;for(d=0;d<f.length;d++){for(var m=f[d].splice(c),p=c;p<c+a;p++)f[d][p]=_$_c824[3];f[d]=f[d].concat(m);m=g[d].splice(c);for(p=c;p<c+a;p++)g[d][p]={element:b.create.call(this,p,d)},l&&(1==h?this.tfoot.children[d].appendChild(g[d][p].element):this.tfoot.children[d].insertBefore(g[d][p].element,this.tfoot.children[d].children[c].nextSibling));
172
- g[d]=g[d].concat(m)}}else for(d=0;d<f.length;d++){for(p=c;p<c+a;p++)(h=this.footers.content[d][p].element)&&h.parentNode&&h.parentNode.removeChild(h);g[d].splice(c,a);e[d]=f[d].splice(c,a)}return e};return b}(),oa=function(){var k=function(b){b.setNestedCell=k.cell;b.getNestedCell=k.cell;b.setNestedHeaders=k[_$_c824[11]];b.getNestedHeaders=k[_$_c824[51]];b.resetNestedHeaders=k.reset};k[_$_c824[51]]=function(){return this.options.nestedHeaders};k[_$_c824[11]]=function(b){k.reset.call(this);this.options.nestedHeaders=
173
- b;k.build.call(this);k.render.call(this);ha.refresh.call(this);U.call(this);J.call(this,_$_c824[176],{data:b});F.call(this.parent,_$_c824[177],this,b)};k.reset=function(){var b=[],c=this.thead.children;this.options.nestedHeaders=null;for(var a=0;a<c.length;a++)c[a].classList.contains(_$_c824[178])&&b.push(c[a]);if(b.length)for(;c=b.shift();)c.remove();this.nested=null;ha.refresh.call(this);U.call(this);J.call(this,_$_c824[179]);F.call(this.parent,_$_c824[177],this,[])};k.cell=function(b,c,a){if(a){if(!Q.call(this.parent,
174
- this))return!1;var d=this.options.nestedHeaders[c][b],e=this.nested.content[c][b].element;void 0!==a.title&&(e.innerText=a.title);void 0!==a.tooltip&&(e.title=a.tooltip);void 0!==a.colspan&&(d.colspan=a.colspan,e.setAttribute(_$_c824[52],a.colspan),e.style.display=0==d.colspan?_$_c824[40]:_$_c824[3]);J.call(this,_$_c824[180],{x:b,y:c,properties:a});F.call(this.parent,_$_c824[181],this,b,c,a)}else return this.nested.content[c][b].element};k.range=function(b){b=this.options.nestedHeaders[b];for(var c=
175
- [],a=0,d=0;d<b.length;d++){var e=parseInt(b[d].colspan);c[d]=[a,a+e-1];a+=e}return c};k.getColumns=function(b){b=this.options.nestedHeaders[b];for(var c=[],a=0;a<b.length;a++)for(var d=b[a].colspan,e=0;e<d;e++)c.push(a);return c};k.create=function(b,c){if(this.nested.content[c][b])return this.nested.content[c][b].element;var a=this.options.nestedHeaders[c][b]||{},d=this.nested.content[c][b]={};a.colspan||(a.colspan=1);a.align||(a.align=_$_c824[182]);a.title||(a.title=_$_c824[3]);var e=document.createElement(_$_c824[147]);
176
- e.setAttribute(_$_c824[183],b);e.setAttribute(_$_c824[184],c);e.setAttribute(_$_c824[52],a.colspan);e.setAttribute(_$_c824[185],a.align);e.innerHTML=a.title;a.tooltip&&(e.title=a.tooltip);return d.element=e};k.build=function(){this.nested||(this.nested={content:[]});if(this.options.nestedHeaders)for(var b=0;b<this.options.nestedHeaders.length;b++){this.nested.content[b]=[];var c=document.createElement(_$_c824[147]);c.innerHTML=_$_c824[148];var a=document.createElement(_$_c824[145]);a.classList.add(_$_c824[178]);
177
- a.appendChild(c);this.thead.insertBefore(a,this.thead.lastChild)}};k.render=function(){for(var b,c=this.options.nestedHeaders,a=0;a<c.length;a++)for(var d=0;d<this.thead.lastChild.children.length;d++){b=this.thead.lastChild.children[d].getAttribute(_$_c824[42]);var e=k.getColumns.call(this,a);void 0!==e[b]&&k.renderCell.call(this,e[b],a)}};k.renderCell=function(b,c,a){var d=oa.create.call(this,b,c);d.parentNode?(b=d.getAttribute(_$_c824[52]),b++,d.setAttribute(_$_c824[52],b)):(d.setAttribute(_$_c824[52],
178
- 1),a?this.thead.children[c].insertBefore(d,this.thead.children[c].children[a]):this.thead.children[c].appendChild(d),0==b&&0<this.options.freezeColumns&&(d.classList.add(_$_c824[50]),d.style.left=ya.call(this)?_$_c824[159]:_$_c824[155]))};k.adjust=function(b,c,a,d){var e=this.options.nestedHeaders;if(e)if(1==a)if(d&&d.nested)for(a=0;a<e.length;a++)for(var f=0;f<e[a].length;f++)k.cell.call(this,f,a,{colspan:d.nested[a][f]});else for(a=0;a<e.length;a++){if(f=k.getColumns.call(this,a)){f=f[b];var g=
179
- parseInt(e[a][f].colspan)+c;k.cell.call(this,f,a,{colspan:g})}}else{d=[];for(a=0;a<e.length;a++)if(g=k.getColumns.call(this,a)){d[a]=[];for(f=0;f<c;f++){var h=g[b+f];typeof d[a][h]==_$_c824[13]&&(d[a][h]=e[a][h].colspan);e[a][h].colspan--}g=Object.keys(d[a]);for(f=0;f<g.length;f++)k.cell.call(this,g[f],a,{colspan:e[a][g[f]].colspan})}return d}};return k}(),ma=function(){var k=function(b,c){var a=function(p){var n;(n=this.results)?p=n.indexOf(p):n=this.rows;p--;for(var t=p;0<=t;t--)if(p=this.results?
180
- n[t]:t,this.rows[p]&&this.rows[p].element)return p;return 0},d=function(p){var n;(n=this.results)?p=n.indexOf(p):n=this.rows;p++;for(var t=p;t<n.length;t++)if(p=this.results?n[t]:t,this.rows[p]&&this.rows[p].element)return p;return n[n.length-1]},e=function(p,n){for(;0<=p;p--)if(this.records[n][p].element&&this.records[n][p].element.style.display!=_$_c824[40])return p;return 0},f=function(p,n){for(;p<this.options.columns.length;p++)if(this.records[n][p].element&&this.records[n][p].element.style.display!=
181
- _$_c824[40])return p;return this.options.columns-1},g=this.getHighlighted(),h=g[0],l=g[1],m=g[2];g=g[3];b=parseInt(b);c=parseInt(c);null!=b&&null!=c&&(0<b-m?(f=f.call(this,parseInt(m)+1,c),b=parseInt(b)):(f=parseInt(b),b=e.call(this,parseInt(h)-1,c)),0<c-g?(d=d.call(this,parseInt(g)),c=parseInt(c)):(d=parseInt(c),c=a.call(this,parseInt(l))),b-f<=c-d?(f=parseInt(h),b=parseInt(m)):(d=parseInt(l),c=parseInt(g)),this.setBorder(f,d,b,c,_$_c824[138]))};k.execute=function(b){if(!Q.call(this.parent,this))return!1;
182
- var c=this.borders.cloning;if(b)if(c&&c.active){b=c.x1;var a=c.y1,d=c.x2,e=c.y2}else return!1;else if(d=this.getSelected(),d.length)b=d[0].x,a=parseInt(d[d.length-1].y)+1,d=d[d.length-1].x,e=this.options.data.length-1;else return!1;var f,g=0,h=[],l=[],m=!1,p=this.getHighlighted(),n=Fa[_$_c824[51]].call(this,p,!1,!1),t=this.getSelected();if(f=this.getStyle(t,!0)){var v=Object.keys(f);if(v.length)for(var u=0;u<v.length;u++)h.push(f[v[u]])}if(p[0]==b)var y=a<p[1]?a-p[1]:1,z=0;else z=b<p[0]?b-p[0]:1,
183
- y=0;v=0;b=parseInt(b);d=parseInt(d);a=parseInt(a);e=parseInt(e);for(var C=a;C<=e;C++)if(!this.results||-1!=this.results.indexOf(C)){void 0==n[g]&&(g=0);f=0;p[0]!=b&&(z=b<p[0]?b-p[0]:1);for(u=b;u<=d;u++){if(!(0!=m||this.records[C][u].element&&this.records[C][u].element.classList.contains(_$_c824[18]))){if((!c||1!=c.active)&&M.call(this,u,C)){m=!0;continue}void 0==n[g]?f=0:void 0==n[g][f]&&(f=0);var A=n[g][f];A&&!n[1]&&1==this.parent.config.autoIncrement&&(this.options.columns[u].type==_$_c824[55]||
184
- this.options.columns[u].type==_$_c824[14]||1==this.options.columns[u].shiftFormulas?P(A)?A=W.shiftFormula(A,z,C-p[1]):A==Number(A)&&(A=Number(A)+y):this.options.columns[u].type==_$_c824[186]&&(A=new Date(A),A.setDate(A.getDate()+y),A=A.getFullYear()+_$_c824[187]+jSuites.two(parseInt(A.getMonth()+1))+_$_c824[187]+jSuites.two(A.getDate())+_$_c824[132]+_$_c824[188]));A={x:u,y:C,value:A};h&&null!=h[v]&&(A.style=h[v],v++,v>=h.length&&(v=0));l.push(A)}f++;p[0]!=b&&z++}g++;y++}l.length&&(t[0].x<b&&(b=t[0].x),
185
- t[0].y<a&&(a=t[0].y),t[t.length-1].x>d&&(d=t[t.length-1].x),t[t.length-1].y>e&&(e=t[t.length-1].y),this.setValue(l),this.resetBorders(_$_c824[138],!0),this.updateSelectionFromCoords(b,a,d,e))};k.end=function(b){ma.event=!1;ma.execute.call(this,!0)};k.cancel=function(b){ma.event=!1;this.resetBorders(_$_c824[138],!0)};return k}(),Fa=function(){var k=function(b){b.getData=k[_$_c824[51]];b.getJson=k[_$_c824[51]];b.setData=k[_$_c824[11]];b.loadData=k.load;b.getRowData=k.getRowData;b.setRowData=k.setRowData;
186
- b.getColumnData=k.getColumnData;b.setColumnData=k.setColumnData;b.updateData=k.update;b.refresh=k.refresh;b.data=k[_$_c824[51]];b.download=k.download;b.copy=k.copy;b.paste=k.paste;b.cut=function(){return b.copy(!0)}};k[_$_c824[51]]=function(b,c,a,d){!0===b&&(b=this.getHighlighted());var e=b?!0:!1,f=[],g=this.options.columns.length,h=this.options.data.length;void 0===d&&(d=this.dataType&&typeof a==_$_c824[13]?1:0);for(var l=0;l<h;l++){var m=null;var p=d?{}:[];for(var n=0;n<g;n++){var t;if(!(t=!e)){t=
187
- b[1];var v=b[2],u=b[3];t=n>=b[0]&&n<=v&&l>=t&&l<=u?!0:!1}if(t&&(!e||!this.results||-1!=this.results.indexOf(l))){t=M.call(this,n,l);if(c){if(e&&!1===this.rows[l].visible)continue;m=ea.processed.call(this,n,l);void 0!==m&&(t=m)}a&&t.match&&(t.match(a)||t.match(/\n/)||t.match(/"/))&&(t=t.replace(new RegExp(_$_c824[189],_$_c824[190]),_$_c824[191]),t=_$_c824[189]+t+_$_c824[189]);d?jSuites.path.call(p,_$_c824[3]+Z.call(this,n),t):p.push(t);m=!0}}m&&(a?f.push(p.join(a)):f.push(p))}return a?f.join(_$_c824[10])+
188
- _$_c824[10]:f};k.parse=function(){for(var b,c={},a=0,d,e=[],f=this.options.data,g=0;g<f.length;g++)b=null,d=g,f[g].data&&(Array.isArray(f[g].data)||typeof f[g].data==_$_c824[84])&&(typeof f[g].id==_$_c824[14]&&(b=parseInt(f[g].id)),typeof f[g].row==_$_c824[14]&&(d=f[g].row),e[d]=f[g].data,f[g]=[]),d>a&&(a=d),b&&(c[d]=b);if(Object.keys(e).length)for(g=0;g<=a;g++)e[g]&&(f[g]=e[g]);a=this.getPrimaryKey();if(!1!==a)for(a=Z.call(this,a),g=0;g<f.length;g++)c[g]||!1===a||(b=parseInt(f[g][a]),0<b&&(c[g]=
189
- b));return c};k.type=function(){for(var b=this.dataType=0;b<this.options.columns.length;b++)typeof this.options.columns[b].name!==_$_c824[13]&&(this.dataType=1)};k[_$_c824[11]]=function(b){b=k.standardize(b);var c={},a=[],d={};var e=Object.keys(b[0]).length-this.options.columns.length;0<e&&this.insertRow(e);var f=b.length-this.options.data.length;0<f&&this.insertRow(f);for(var g=0;g<this.options.data.length;g++){void 0===b[g]&&(b[g]={row:g,data:[]});for(var h=0;h<this.options.columns.length;h++)b[g].data[h]||
190
- (b[g].data[h]=_$_c824[3])}for(h=0;h<this.options.columns.length;h++){var l=Z.call(this,h);d[l]=h}for(g=0;g<b.length;g++){f=b[g].row;l=Object.keys(b[g].data);for(h=0;h<l.length;h++)e=null,void 0!==d[l[h]]?e=d[l[h]]:-1<l[h]&&(e=parseInt(l[h])),null!==e&&a.push({x:e,y:f,value:b[g].data[l[h]]});b[g].id&&(c[f]=b[g].id)}ta.setId.call(this,c);ea[_$_c824[11]].call(this,a,null,!0)};k.build=function(){this.results=null;this.rows=[];this.records=[];this.sequence=0;k.type.call(this);if(this.options.data){var b=
191
- k.parse.call(this),c=this.options.data.length;this.options.minDimensions[1]>c&&(c=this.options.minDimensions[1]);for(var a=0;a<c;a++){var d=b[a]?b[a]:null;na.row.call(this,a,d)}}};k.load=function(b){this.resetBorders();this.resetSelection();this.tbody.innerText=_$_c824[3];this.options.data=b;k.build.call(this);G.call(this);X.update.call(this)};k.refresh=function(b){if(typeof b!==_$_c824[13])for(var c=0;c<this.options.columns.length;c++){var a=this.records[b]&&this.records[b][c].element?this.records[b][c].element:
192
- null,d=ba[_$_c824[51]].call(this,c,b);typeof d[0].updateCell==_$_c824[85]&&d[0].updateCell(a,M.call(this,c,b),c,b,this,d[1]);a&&N.applyOverflow.call(this,a,c,b)}else if(this.options.url){var e=this;1==this.parent.config.loadingSpin&&jSuites.loading.show();jSuites.ajax({url:this.options.url,method:_$_c824[58],dataType:_$_c824[59],success:function(f){e.setData(f);jSuites.loading.hide()}})}};k.getRowData=function(b,c){if(typeof this.options.data[b]===_$_c824[13])return!1;if(c){if(this.dataType){c={};
193
- for(var a=0;a<this.options.columns.length;a++){var d=_$_c824[3]+Z.call(this,a),e=_$_c824[3]+ea.processed.call(this,a,b,!0);jSuites.path.call(c,d,e)}}else for(c=[],a=0;a<this.options.columns.length;a++)c.push(ea.processed.call(this,a,b,!0));return c}return JSON.parse(JSON.stringify(this.options.data[b]))};k.setRowData=function(b,c,a){for(var d=[],e=0;e<this.options.columns.length;e++)typeof c[e]===_$_c824[13]&&(c[e]=_$_c824[3]),d.push({x:e,y:b,value:c[e]});d.length&&this.setValue(d,null,a)};k.getColumnData=
194
- function(b,c){if(typeof this.options.columns[b]===_$_c824[13])return!1;for(var a=[],d=0;d<this.options.data.length;d++){var e=c?ea.processed.call(this,b,d,!0):M.call(this,b,d);a.push(e)}return a};k.setColumnData=function(b,c,a){for(var d=[],e=0;e<this.rows.length;e++)typeof c[e]===_$_c824[13]&&(c[e]=_$_c824[3]),d.push({x:b,y:e,value:c[e]});d.length&&this.setValue(d,null,a)};k.copy=function(b){var c=this,a=this.getHighlighted(),d=function(){c.setBorder(a[0],a[1],a[2],a[3],_$_c824[128]);c.borders.copying.clear=
195
- 1==b?!0:!1},e=k[_$_c824[51]].call(this,a,!0,_$_c824[192]),f=F.call(this.parent,_$_c824[193],this,a,e);if(f)e=f;else if(!1===f)return!1;navigator.clipboard?navigator.clipboard.writeText(e).then(d):(this.parent.textarea.value=e,this.parent.textarea.select(),document.execCommand(_$_c824[194]),d());return e};k.paste=function(b,c,a){if(!Q.call(this.parent,this))return!1;var d=this,e=function(){d.borders.copying&&(d.resetBorders(_$_c824[128],!0),d.borders.copying.clear=!1)},f=null,g=this.options.style,
196
- h=null,l=null,m=[];if(this.borders.copying){var p=[this.borders.copying.x1,this.borders.copying.y1,this.borders.copying.x2,this.borders.copying.y2];h=p[0];l=p[1];var n=jSuites.hash(a),t=jSuites.hash(k[_$_c824[51]].call(this,p,!0,_$_c824[192]));if(n!=t)e();else{var v=0,u=0;a=k[_$_c824[51]].call(this,p,!1,!1);for(n=p[1];n<=p[3];n++)if(!this.results||-1!=this.results.indexOf(n)){m[u]=[];v=0;for(t=p[0];t<=p[2];t++)f=E.getColumnNameFromCoords(t,n),m[u][v]=g&&g[f]?g[f]:_$_c824[195],v++;u++}}}b=parseInt(b);
197
- c=parseInt(c);if(a){Array.isArray(a)||(a=E.parseCSV(a,_$_c824[192]));if(n=F.call(this.parent,_$_c824[196],this,a,b,c,m))a=n;else if(!1===n)return!1;100<a.length&&!this.options.pagination&&!G.limited.call(this)&&console.log(_$_c824[197]);if(f=this.getHighlighted()){v=[];u=[];var y=[];g=[];var z=0,C=0;for(n=f[1];n<=f[3];n++)if(!this.results||-1!=this.results.indexOf(n)){v=[];u=[];for(t=f[0];t<=f[2];t++)v.push(a[C][z]),m&&m[C]&&m[C][z]?u.push(m[C][z]):u.push(_$_c824[3]),z++,z>=a[0].length&&(z=0);y.push(v);
198
- g.push(u);C++;C>=a.length&&(C=0)}0==y.length%a.length&&0==y[0].length%a[0].length&&(a=y,m=g)}g=null;f=[];if(this.borders.copying&&!0===this.borders.copying.clear){for(n=p[1];n<=p[3];n++)for(t=p[0];t<=p[2];t++)(!this.results||this.results&&0<=this.results.indexOf(n))&&f.push({x:t,y:n,value:_$_c824[3],style:_$_c824[3]});e()}n=b+a[0].length-this.options.columns.length;0<n&&this.insertColumn(n);n=c+a.length-this.rows.length;0<n&&this.insertRow(n);u=v=b;z=y=c;C=null;this.results&&(g=this.results.indexOf(c));
199
- for(n=0;n<a.length;n++)for(t=0;t<a[n].length;t++){null!==h&&null!==l&&a[n][t][0]==_$_c824[12]&&(a[n][t]=W.shiftFormula(a[n][t],b-h,c-l));u=b+t;z=c+n;this.results&&(z=this.results[g+n]);var A={x:u,y:z,value:a[n][t]};m&&m[n]&&m[n][t]&&(A.style=m[n][t]);f.push(A);null===C&&za.isSelected.call(this,u,z,p)&&(C=!0)}C&&e();f.length&&(ea[_$_c824[11]].call(this,f,null,this.parent.config.forceUpdateOnPaste?!0:!1),F.call(this.parent,_$_c824[198],this,f),this.updateSelectionFromCoords(v,y,u,z))}};k.download=function(b,
200
- c){if(this.parent.config.allowExport){void 0===c&&(c=!0);var a=_$_c824[3];if(1==b||1==this.parent.config.includeHeadersOnDownload)a+=this.getHeaders().replace(/\s+/gm,_$_c824[132])+_$_c824[10];a+=k[_$_c824[51]].call(this,null,c,this.options.csvDelimiter);c=new Blob([_$_c824[200]+a],{type:_$_c824[201]});window.navigator&&window.navigator.msSaveOrOpenBlob?window.navigator.msSaveOrOpenBlob(c,this.options.csvFileName+_$_c824[202]):(b=document.createElement(_$_c824[203]),c=URL.createObjectURL(c),b.href=
201
- c,b.setAttribute(_$_c824[204],this.options.csvFileName+_$_c824[202]),document.body.appendChild(b),b.click(),b.parentNode.removeChild(b))}else console.error(_$_c824[199])};k.standardize=function(b){b||(b=[]);Array.isArray(b)||(b=[b]);void 0==b[0]||Array.isArray(b[0])||typeof b[0]==_$_c824[84]||(b=[b]);for(var c=0;c<b.length;c++){var a={};Array.isArray(b[c])||void 0==b[c].data?a.data=b[c]:a=b[c];a.row=void 0==b[c].row?c:b[c].row;b[c]=a}return b};return k}(),Wa=function(){var k=function(b){b.getLabel=
202
- k[_$_c824[51]];b.getLabelFromCoords=k[_$_c824[51]]};k[_$_c824[51]]=function(b,c,a){if(typeof b==_$_c824[17]){b=E.getCoordsFromColumnName(b);var d=b[0];c=b[1]}else d=b;return this.getProcessed(d,c,a)};return k}(),Ia=function(){var k=function(b){b.getDefinedNames=k[_$_c824[51]];b.setDefinedNames=k[_$_c824[11]]};k[_$_c824[11]]=function(b){var c=Object.keys(b);if(c.length){for(var a=0;a<c.length;a++)this.parent.config.definedNames[c[a]]=b[c[a]],b[c[a]]||delete this.parent.config.definedNames[c[a]];J.call(this,
203
- _$_c824[205],[b])}};k[_$_c824[51]]=function(b){var c=this.parent.config.definedNames;return b?c[b]:c};k.updateAll=function(b,c){var a,d={};if(a=this.parent.config.definedNames){var e=Object.keys(a);if(e.length){for(var f=this.getWorksheetName(),g=0;g<e.length;g++){var h=W.update.call(this,a[e[g]],b,c,f);h!==a[e[g]]&&(d[e[g]]=h)}k[_$_c824[11]].call(this,d)}}};k.updateWorksheetName=function(b,c){var a,d={};if(a=this.parent.config.definedNames){var e=Object.keys(a);if(e.length){for(var f=0;f<e.length;f++){var g=
204
- W.updateWorksheetName(a[e[f]],b,c);g!==a[e[f]]&&(d[e[f]]=g)}k[_$_c824[11]].call(this,d)}}};return k}(),la=function(){var k=[_$_c824[206],_$_c824[207],_$_c824[208],_$_c824[209],_$_c824[210]],b=[_$_c824[187],_$_c824[151],_$_c824[211],_$_c824[212],_$_c824[213],_$_c824[214],_$_c824[1],_$_c824[215],_$_c824[25],_$_c824[216],_$_c824[12],_$_c824[217],_$_c824[218],_$_c824[219]],c=[],a=function(){if(0<c.length){for(var f,g=0;g<c.length;g++)f=-1===c[g].indexOf(_$_c824[135])?this:I(c[g].split(_$_c824[135])[0]),
205
- ha.destroy.call(f,c[g]);c=[]}},d=function(f){a.call(this);for(var g=0,h=[],l,m,p,n=0;n<f.children.length;n++)if(l=f.children[n].getAttribute(_$_c824[220])){h[l]||(h[l]=k[g++],4<g&&(g=0));f.children[n].style.color=h[l];-1===l.indexOf(_$_c824[135])?(m=this,p=l):(m=l.split(_$_c824[135]),p=m[1],m=I(m[0]));if(0<=p.indexOf(_$_c824[136])){var t=p.split(_$_c824[136]);p=E.getCoordsFromColumnName(t[0]);t=E.getCoordsFromColumnName(t[1])}else t=p=E.getCoordsFromColumnName(p);za[_$_c824[11]].call(m,p[0],p[1],
206
- t[0],t[1],null,l,h[l]);c.push(l)}},e=function(f,g){g&&typeof g!=_$_c824[85]||(g={type:_$_c824[221],onchange:g});g.type===_$_c824[221]?(f.classList.add(_$_c824[222]),f.addEventListener(_$_c824[223],function(h){h=h.changedTouches&&h.changedTouches[0]?h.changedTouches[0].clientX:h.clientX;var l=this.getBoundingClientRect();24>l.width-(h-l.left)&&(e.current=f,f.classList.add(_$_c824[224]),f.classList.add(_$_c824[94]))})):(f.addEventListener(_$_c824[225],function(h){P(f.innerText)&&(f.classList.add(_$_c824[94]),
207
- r.current&&setTimeout(function(){f.worksheet=r.current;e.parse.call(r.current,f);var l=document.createTextNode(_$_c824[3]);f.appendChild(l);jSuites.focus(f)}))}),f.addEventListener(_$_c824[226],function(h){P(f.innerText)?f.classList.add(_$_c824[94]):f.classList.contains(_$_c824[94])&&(f.classList.remove(_$_c824[94]),f.innerText=f.innerText,f.worksheet&&a.call(f.worksheet));h.preventDefault()}));f.classList.add(_$_c824[227]);f.classList.add(_$_c824[226]);f.setAttribute(_$_c824[228],!0);f.addEventListener(_$_c824[229],
208
- function(h){f.worksheet&&(a.call(f.worksheet),typeof f.onchange==_$_c824[85]&&f.onchange.call(f),f.worksheet=null)});f.val=function(h){if(void 0===h)return f.innerText;f.innerText=h};g.onchange&&(f.onchange=g.onchange)};e.current=null;e.parse=function(f){for(var g=_$_c824[3],h=_$_c824[3],l=window.getSelection(),m=document.createRange(),p=E.getCaretIndex.call(this.parent,f),n=W.tokenize(f.innerText.replace(/(\r\n|\n|\r)/gm,_$_c824[3])),t=0;t<n.length;t++)n[t]&&W.tokenIdentifier.test(n[t].trim())?(t==
209
- n.length-1&&(h=_$_c824[230]),g+=_$_c824[231]+h+_$_c824[232]+n[t].trim().replace(/\$/g,_$_c824[3])+_$_c824[233]+n[t]+_$_c824[234]):g+=n[t];f.innerHTML=g;g=null;for(t=0;t<f.childNodes.length&&!(g=f.childNodes[t],h=g.tagName?g.innerText.length:g.length,0>=p-h);t++)p-=h;g&&(g.tagName?m.setStart(g.firstChild,p):m.setStart(g,p),l.removeAllRanges(),l.addRange(m));d.call(this,f)};e.close=function(f){a.call(this);f?f.classList.remove(_$_c824[94]):e.current&&(typeof e.current.onchange==_$_c824[85]&&e.current.onchange.call(e.current),
210
- e.current.classList.remove(_$_c824[224]),e.current.classList.remove(_$_c824[94]),e.current.worksheet=null,e.current=null)};e.getName=function(f,g,h,l,m){f=E.getColumnNameFromCoords(f,g);h=E.getColumnNameFromCoords(h,l);m.ctrlKey&&(f=h);return f!==h?(m=f+_$_c824[136]+h,m=W.getTokensFromRange.call(this,m),W.getRangeFromTokens.call(this,m)):f};e.range=function(f,g,h,l,m){e.current.getAttribute(_$_c824[235])==_$_c824[236]&&(f=h,g=l);f=e.getName.call(this,f,g,h,l,m);g=document.createElement(_$_c824[237]);
211
- g.innerText=f;g.setAttribute(_$_c824[220],f);e.current.innerText=_$_c824[3];e.current.appendChild(g);d.call(this,e.current);jSuites.focus(g);m.preventDefault()};e.update=function(f,g,h,l,m,p,n){p.getAttribute(_$_c824[235])==_$_c824[236]&&(f=h,g=l);var t=jSuites.getNode();if(t){var v=e.getName.call(this,f,g,h,l,m);this!==n&&(v=n.getWorksheetName()+_$_c824[135]+v);f=function(u){var y=document.createElement(_$_c824[237]);y.innerText=v;y.setAttribute(_$_c824[220],v);t.parentNode===p&&!1===u?t.parentNode.insertBefore(y,
212
- t.nextSibling):p.appendChild(y);t=y};if(t.getAttribute(_$_c824[220]))m.ctrlKey?(p.appendChild(document.createTextNode(_$_c824[25])),f(!0)):(t.innerText=v,t.setAttribute(_$_c824[220],v));else{if(!t.innerText||t.innerText!==_$_c824[3]&&-1==b.indexOf(t.innerText.slice(-1))||t.nextElementSibling&&t.nextElementSibling.getAttribute(_$_c824[220]))return!1;f(!1)}jSuites.focus(t);d.call(this,p);if(typeof p.onchange==_$_c824[85])p.onchange();m.preventDefault();return!0}return!1};e.onkeydown=function(f){f.target.worksheet=
213
- this;if(f.ctrlKey){if(67==f.which||88==f.which)f=window.getSelection().toString().replace(/(\r\n|\n|\r)/gm,_$_c824[3]),navigator.clipboard?navigator.clipboard.writeText(f):(this.parent.textarea.value=f,this.parent.textarea.select(),document.execCommand(_$_c824[194]))}else if(36==f.which){var g=window.getSelection(),h=document.createRange();h.setStart(f.target,0);g.removeAllRanges();g.addRange(h)}else 35==f.which?jSuites.focus(f.target):187==f.which?!f.target.innerText.replace(/(\r\n|\n|\r)/gm,_$_c824[3])&&
214
- f.target.getAttribute(_$_c824[96])&&f.target.removeAttribute(_$_c824[96]):13==f.which&&f.target.blur()};return e}(),W=function(){var k=new RegExp(/^(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]+)(:\$?[A-Z]+\$?[0-9]+)?$/i),b=function(g){g=c(g);for(var h=[_$_c824[187],_$_c824[151],_$_c824[211],_$_c824[212],_$_c824[213],_$_c824[238]],l=[_$_c824[214],_$_c824[239],_$_c824[1],_$_c824[2],_$_c824[215],_$_c824[240],_$_c824[25],_$_c824[216],_$_c824[12],_$_c824[217],_$_c824[218],_$_c824[219]],m=_$_c824[3],p=[],n=0,t=
215
- 0;t<g.length;t++){if(g[t]==_$_c824[189]||g[t]==_$_c824[133])n=0==n?1:0;0==n&&(-1<h.indexOf(g[t])||-1<l.indexOf(g[t]))?(m&&(p.push(m),m=_$_c824[3]),p.push(g[t])):m+=g[t]}m&&p.push(m);for(t=0;t<p.length;t++)-1==p[t].indexOf(_$_c824[189])&&-1==p[t].indexOf(_$_c824[133])&&(p[t]=p[t].replace(/\s/g,_$_c824[3]));return p},c=function(g,h){for(var l=_$_c824[3],m=0,p=[_$_c824[12],_$_c824[135],_$_c824[218],_$_c824[217]],n=0;n<g.length;n++)g[n]==_$_c824[189]&&(m=0==m?1:0),1==m?l+=g[n]:(l+=g[n].toUpperCase(),
216
- 1==h&&0<n&&g[n]==_$_c824[12]&&-1==p.indexOf(g[n-1])&&-1==p.indexOf(g[n+1])&&(l+=_$_c824[12]));return l},a=function(g){g.setFormula=a[_$_c824[11]];g.executeFormula=a.execute;g.resetArray=a.resetArray;g.formula=[]};a.run=function(g,h){var l=_$_c824[3],m=Object.keys(h);if(m.length){for(var p={},n=0;n<m.length;n++){var t=m[n].replace(/!/g,_$_c824[27]);0<t.indexOf(_$_c824[27])&&(t=t.split(_$_c824[27]),p[t[0]]=!0)}t=Object.keys(p);for(n=0;n<t.length;n++)l+=_$_c824[241]+t[n]+_$_c824[242];for(n=0;n<m.length;n++)t=
217
- m[n].replace(/!/g,_$_c824[27]),null===h[m[n]]||jSuites.isNumeric(h[m[n]])||(p=h[m[n]].match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&p.length&&(h[m[n]]=e(p,h[m[n]])),l=0<t.indexOf(_$_c824[27])?l+(t+_$_c824[243]+h[m[n]]+_$_c824[244]):l+(_$_c824[241]+t+_$_c824[243]+h[m[n]]+_$_c824[244])}g=g.replace(/\$/g,_$_c824[3]);(p=g.match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&p.length&&(g=e(p,g));g=g.replace(/!/g,_$_c824[27]);g=(new Function(l+_$_c824[245]+
218
- g))();null===g&&(g=0);return g};a[_$_c824[11]]=function(){};var d=function(g){g=c(g,!0);return g.replace(/\$/g,_$_c824[3])},e=function(g,h){for(var l=0;l<g.length;l++){var m=a.getTokensFromRange.call(this,g[l]);h=h.replace(g[l],_$_c824[215]+m.join(_$_c824[25])+_$_c824[240])}return h},f=function(g,h,l){for(var m=this.config.definedNames,p=0;p<g.length;p++)g[p]&&m&&m[g[p]]&&(h=h.replace(g[p],m[g[p]]),l&&(l[g[p]]=m[g[p]]));return d(h)};a.resetArray=function(g,h){var l;if(l=this.records[h][g].a){for(var m=
219
- 0;m<l.length;m++)for(var p=0;p<l[m].length;p++)this.options.data[h+m][g+p]||(this.records[h+m][g+p].v=_$_c824[3],this.records[h+m][g+p].element&&(this.records[h+m][g+p].element.innerText=_$_c824[3]));this.records[h][g].a=null}};a.execute=function(g,h,l,m,p){if(1==this.parent.processing)return null!==h&&null!==l&&this.parent.queue.push([this,h,l]),_$_c824[3];if(typeof this.parent.config.onbeforeformula==_$_c824[85]){var n=F.call(this.parent,_$_c824[246],this,g,h,l);if(!1===n)return g;n&&(g=n)}var t=
220
- [],v=function(Y,q,x,w){if(void 0!=q&&void 0!=x){var D=E.getColumnNameFromCoords(q,x);x=w.getWorksheetName()+_$_c824[27]+D;t[x]||(t[x]=0);t[x]++;if(3<t[x])throw{error:_$_c824[247],message:_$_c824[248],reference:x};}else D=null;p||(Y=d(Y));var H=Y,L=H.match(/[A-Z_]+[A-Z0-9_\.]*/g);L&&L.length&&(H=f.call(w.parent,L,H,u));(L=H.match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&L.length&&(H=e.call(w,L,H));L=[];H=b(H);for(var O=0;O<H.length;O++)H[O]&&k.test(H[O])&&L.push(H[O]);if(L){if(-1<
221
- L.indexOf(D))throw{error:_$_c824[249],message:_$_c824[250]};for(H=0;H<L.length;H++){O=L[H].split(_$_c824[135]);O[1]?(q=O[1],O=I(O[0]),x=w.getWorksheetName()+_$_c824[27]+D):(q=O[0],O=w,x=D);if(typeof O==_$_c824[13]||typeof O.formula==_$_c824[13])throw{error:_$_c824[251],message:_$_c824[252]};x&&(O.formula[q]||(O.formula[q]=[]),0>O.formula[q].indexOf(x)&&O.formula[q].push(x));if(!u[L[H]]){x=E.getCoordsFromColumnName(q);q=x[0];x=x[1];var R=void 0!==O.records[x][q].v?O.records[x][q].v:M.call(O,q,x);u[L[H]]||
222
- ((_$_c824[3]+R).substr(0,1)==_$_c824[12]?u[L[H]]=v(R,q,x,O):(R===_$_c824[3]?R=null:R!=Number(R)&&(R=_$_c824[189]+R+_$_c824[189]),u[L[H]]=R))}}}return Y.substr(1)},u={};try{g=v(g,h,l,this);if(g==_$_c824[3])return _$_c824[3];0==g.indexOf(_$_c824[253])&&(p=!0);var y=p?a.run(g,u):r.formula(g,u,h,l,this);if(!1!==m&&void 0!=h&&void 0!=l)if(y instanceof Date)this.records[l][h].v=jSuites.calendar.dateToNum(y);else if(Array.isArray(y)){m=[];n=null;for(var z=0;z<y.length;z++)for(var C=0;C<y[z].length;C++){(0<
223
- C||0<z)&&this.options.data[l+z][h+C]!==_$_c824[3]&&(n=_$_c824[254]);var A=E.getColumnNameFromCoords(h+C,l+z);m.push(A)}if(!n){A=E.getColumnNameFromCoords(h,l);var V=Object.keys(this.formula);for(z=0;z<V.length;z++){var sa=this.formula[V[z]].indexOf(A);if(0<=sa)for(C=0;C<m.length;C++)sa=this.formula[V[z]].indexOf(m[C]),-1==sa&&this.formula[V[z]].push(m[C])}for(z=0;z<y.length;z++)for(C=0;C<y[z].length;C++)this.records[l+z][h+C].v=y[z][C],this.records[l+z][h+C].element&&(this.records[l+z][h+C].element.innerText=
224
- y[z][C]);this.records[l][h].a=y;n=y[0][0];this.records[l][h].v=n}y=n}else this.records[l][h].v=y;return y}catch(Y){return 1==this.parent.config.debugFormulas&&console.log(g,u,Y),Y&&Y.error?Y.error:_$_c824[251]}};a.update=function(g,h,l,m){var p=null,n=null,t=function(y){l&&l[y]&&(y=_$_c824[255]);h[y]&&(y=h[y]);return y};g=c(g,!0);g=b(g);for(var v=0;v<g.length;v++)if(g[v]&&k.test(g[v])){if(-1==g[v].indexOf(_$_c824[135])){if(n=g[v],p=_$_c824[3],m)continue}else if(n=g[v].split(_$_c824[135]),p=n[0],n=
225
- n[1],m!=p)continue;if(0<=n.indexOf(_$_c824[136])){n=a.getTokensFromRange.call(this,n);for(var u=0;u<n.length;u++)n[u]=t(n[u]);n=a.getRangeFromTokens.call(this,n)}else-1==n.indexOf(_$_c824[256])?n=t(n):(n=t(n.replace(/\$/g,_$_c824[3])),n=_$_c824[256]+n.match(/[A-Z]+/g)+_$_c824[256]+n.match(/[0-9]+/g));p&&(n=p+_$_c824[135]+n);g[v]=n}return g.join(_$_c824[3])};a.getChain=function(g){if(void 0===g)return[];var h=[],l=[],m=[],p=function(v){if(0<=v.indexOf(_$_c824[27])){var u=v.split(_$_c824[27]),y=u[0],
226
- z=u[1];u=I(u[0])}else u=this,y=u.getWorksheetName(),z=v;if(u.formula[z]&&!m[v]){var C=!1;m[v]=!0;for(v=0;v<u.formula[z].length;v++){var A=u.formula[z][v];-1==A.indexOf(_$_c824[27])&&(A=y+_$_c824[27]+A);if(!l[A]){var V=u.getValue(A);P(V)?h.push([A,V,a.getTokens.call(u,V,y)]):(C=!0,u.formula[z][v]=null);p.call(u,A);l[A]=!0}}1==C&&(u.formula[z]=u.formula[z].filter(function(sa){return null!=sa}))}},n=Object.keys(g);for(g=0;g<n.length;g++)p.call(this,n[g]);n=0;for(g=h.length-1;0<=g;g--){for(var t=0;t<
227
- g;t++)if(0<=h[t][2].indexOf(h[g][0])){h.splice(t,0,h.splice(g,1)[0]);g=h.length;break}n++;if(1E6<n){console.error(_$_c824[257]);break}}l=[];for(g=0;g<h.length;g++)l[h[g][0]]=h[g][1];return l};a.updateAll=function(g,h){var l,m;Ia.updateAll.call(this,g,h);var p=Object.keys(this.formula);var n=[];var t=[];for(l=0;l<p.length;l++){var v=p[l];var u=this.formula[v];if(h&&h[v])for(var y=0;y<u.length;y++)g[u[y]]&&(u[y]=g[u[y]]),t[u[y]]=!0;else{var z=[];for(y=0;y<u.length;y++)h&&h[u[y]]||(g[u[y]]&&(u[y]=g[u[y]]),
228
- t[u[y]]=!0,z.push(u[y]));z.length&&(g[v]&&(v=g[v]),n[v]=z)}}this.formula=n;z=this.getWorksheetName();for(var C=0;C<r.spreadsheet.length;C++)for(var A=r.spreadsheet[C].worksheets,V=0;V<A.length;V++)if(A[V].getWorksheetName()!==z)for(p=Object.keys(A[V].formula),l=0;l<p.length;l++){n=[];u=A[V].formula[p[l]];for(y=0;y<u.length;y++)v=u[y].split(_$_c824[27]),v[0]==z&&v[1]?h&&h[v[1]]||(g[v[1]]&&(v[1]=g[v[1]]),n.push(v[0]+_$_c824[27]+v[1])):n.push(u[y]);A[V].formula[p[l]]=n}p=[];v=Object.keys(t);for(y=0;y<
229
- v.length;y++)0<=v[y].indexOf(_$_c824[27])?(u=v[y].split(_$_c824[27]),n=I(u[0]),l=u[1],z=this.getWorksheetName(),u=u[0]):(n=this,l=v[y],z=null,u=this.getWorksheetName()),(m=n.getValue(l))&&P(m)&&(n=a.update.call(n,m,g,h,z),n!=m&&(t[v[y]]=n,l=E.getCoordsFromColumnName(l),p[u]||(p[u]=[]),p[u].push({x:l[0],y:l[1],value:n,force:!0})));v=Object.keys(p);for(g=0;g<v.length;g++)n=I(v[g]),p[v[g]]=ea.applyValues.call(n,p[v[g]]),ea.setValueChained.call(n,p[v[g]]),J.call(n,_$_c824[108],{data:p[v[g]]})};a.updateWorksheetName=
230
- function(g,h,l){for(var m=b(g),p=0;p<m.length;p++)g=m[p].split(_$_c824[135]),g[1]&&(g[0]=g[0].replace(new RegExp(_$_c824[133],_$_c824[190]),_$_c824[3]),g[0].toUpperCase()==h.toUpperCase()&&(g[0]=l,0<=g[0].indexOf(_$_c824[132])&&(g[0]=_$_c824[133]+g[0]+_$_c824[133]),m[p]=g.join(_$_c824[135])));return m.join(_$_c824[3])};a.updateWorksheetNames=function(g,h){for(var l,m,p=0;p<r.spreadsheet.length;p++)for(var n=[],t=r.spreadsheet[p].worksheets,v=0;v<t.length;v++){for(var u=0;u<t[v].options.data.length;u++)for(var y=
231
- 0;y<t[v].options.data[u].length;y++)(l=t[v].options.data[u][y])&&P(l)&&(m=a.updateWorksheetName(l,g,h),m!=l&&n.push({x:y,y:u,value:m,force:!0}));n.length&&(n=ea.applyValues.call(t[v],n),J.call(t[v],_$_c824[108],{data:n}))}};a.shiftFormula=function(g,h,l){var m=b(g,!0);g=function(v){if(-1==v.indexOf(_$_c824[135])){v=E.getCoordsFromColumnName(v);var u=_$_c824[3]}else u=m[p].split(_$_c824[135]),v=E.getCoordsFromColumnName(u[1]),u=u[0]+_$_c824[135];var y=v[0]+h;v=v[1]+l;return v=0>y||0>v?_$_c824[255]:
232
- u+E.getColumnNameFromCoords(y,v)};for(var p=0;p<m.length;p++)if(k.test(m[p])&&-1==m[p].indexOf(_$_c824[256])){var n=-1==m[p].indexOf(_$_c824[135])?[_$_c824[3],m[p]]:m[p].split(_$_c824[135]);if(-1==n[1].indexOf(_$_c824[136]))n[1]=g(n[1]);else{var t=n[1].split(_$_c824[136]);n[1]=g(t[0])+_$_c824[136]+g(t[1])}m[p]=n[0]?n.join(_$_c824[135]):n[1]}return m.join(_$_c824[3])};a.getTokensFromRange=function(g){var h=this,l=_$_c824[3],m=_$_c824[3];0<=g.indexOf(_$_c824[27])?m=_$_c824[27]:0<=g.indexOf(_$_c824[135])&&
233
- (m=_$_c824[135]);g=g.replace(/\$/g,_$_c824[3]);m&&(l=g.split(m),h=I(l[0]),g=l[1],l=l[0]+m);if(-1==g.indexOf(_$_c824[136]))return[g];m=[];g=g.split(_$_c824[136]);var p=E.getCoordsFromColumnName(g[0]),n=E.getCoordsFromColumnName(g[1]);if(p[0]<=n[0]){g=p[0];var t=n[0]}else g=n[0],t=p[0];if(null===p[1]&&null==n[1]){var v=0;p=0;h.options&&h.options.data&&(p=h.options.data.length-1)}else p[1]<=n[1]?(v=p[1],p=n[1]):(v=n[1],p=p[1]);for(h=v;h<=p;h++)for(v=g;v<=t;v++)m.push(l+E.getColumnNameFromCoords(v,h));
234
- return m};a.getRangeFromTokens=function(g){g=g.filter(function(m){return m!=_$_c824[255]});for(var h=_$_c824[3],l=0;l<g.length;l++)0<=g[l].indexOf(_$_c824[27])&&(h=g[l].split(_$_c824[27]),g[l]=h[1],h=h[0]);h&&(h+=_$_c824[27]);g.sort(function(m,p){m=E.getCoordsFromColumnName(m);p=E.getCoordsFromColumnName(p);return m[1]>p[1]?1:m[1]<p[1]?-1:m[0]>p[0]?1:m[0]<p[0]?-1:0});return g.length?h+(g[0]+_$_c824[136]+g[g.length-1]):_$_c824[255]};a.getTokens=function(g,h){var l=d(g);g.replace(/!/g,_$_c824[27]);
235
- (g=l.match(/[A-Z_]+[A-Z0-9_\.]*/g))&&g.length&&(l=f.call(this.parent,g,l));(g=l.match(/('.*?'?|\w*\.)?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&g.length&&(l=e.call(this,g,l));g=l.match(/('.*?'?|\w*\.)?(\$?[A-Z]+\$?[0-9]+)(:\$?[A-Z]+\$?[0-9]+)?/g);for(l=0;l<g.length;l++)-1==g[l].indexOf(_$_c824[27])&&h&&(g[l]=h+_$_c824[27]+g[l]);return g};a.tokenIdentifier=k;a.tokenize=b;return a}(),ea=function(){var k=function(b){b.name=Z;b.value=M;b.getValue=k[_$_c824[51]];b.getValueFromCoords=k.getFromCoords;
236
- b.setValue=k[_$_c824[11]];b.setValueFromCoords=k.setFromCoords;b.setCheckRadioValue=k.setCheckRadio;b.getProcessed=k.processed};k[_$_c824[51]]=function(b,c){var a=this;if(typeof b==_$_c824[84]){var d=b.x;b=b.y}else 0<=b.indexOf(_$_c824[27])&&(a=b.split(_$_c824[27]),b=a[1],a=I(a[0])),b=E.getCoordsFromColumnName(b),d=b[0],b=b[1];return k.getFromCoords.call(a,d,b,c)};k.getFromCoords=function(b,c,a){var d=null;null!=b&&null!=c&&(d=a?k.processed.call(this,b,c):M.call(this,b,c));return d};k[_$_c824[11]]=
237
- function(b,c,a){if(!Q.call(this.parent,this))return!1;var d=null,e=null,f=null,g=[];a=a?!0:!1;var h=function(p,n){var t=null;typeof p==_$_c824[17]?(f=E.getCoordsFromColumnName(p),d=f[0],e=f[1]):p.tagName?(d=p.getAttribute(_$_c824[42]),e=p.getAttribute(_$_c824[43])):p.element&&p.element.tagName?(d=p.element.getAttribute(_$_c824[42]),e=p.element.getAttribute(_$_c824[43])):(d=p.x,e=p.y,void 0!==p.value&&(n=p.value),void 0!==p.style&&(t=p.style));p={x:d,y:e,value:n,force:a};null!==t&&(p.style=t);g.push(p)};
238
- if(b&&Array.isArray(b))for(var l=0;l<b.length;l++)h(b[l],c);else if(typeof b==_$_c824[84]&&void 0==b.x&&void 0==b.tagName)for(c=Object.keys(b),l=0;l<c.length;l++)h(c[l],b[c[l]]);else h(b,c);if(g.length){g=k.applyValues.call(this,g);this.parent.config.parseFormulas&&k.setValueChained.call(this,g);X.update.call(this,!0);this.refreshBorders();var m=this;setTimeout(function(){ha.refresh.call(m)},250);if(g.length){T.call(this.parent,{worksheet:m,action:_$_c824[77],records:g,selection:this.selectedCell});
239
- b=this.getPrimaryKey();if(!1!==b)for(l=0;l<g.length;l++)g[l].x===b&&g[l].value&&S.call(this,g[l]);J.call(this,_$_c824[77],{data:g});F.call(this.parent,_$_c824[258],this,g)}}};k.setFromCoords=function(b,c,a,d){var e=[];e.push({x:b,y:c,value:a});k[_$_c824[11]].call(this,e,null,d)};k.setCheckRadio=function(){for(var b=[],c=this.getSelected(),a=0;a<c.length;a++){var d=c[a].x,e=c[a].y;if(!this.options.columns[d].readOnly&&this.options.columns[d].type==_$_c824[259]){var f=M.call(this,d,e)?!1:!0;b.push({x:d,
240
- y:e,value:f})}}b.length&&k[_$_c824[11]].call(this,b)};k.applyValues=function(b){for(var c,a,d=this.options.style||{},e=[],f={},g=0;g<b.length;g++)if(c=b[g],a=this.updateCell(c.x,c.y,c.value,c.force),void 0!==a.value){if(void 0!==c.style){var h=E.getColumnNameFromCoords(c.x,c.y);a.style=f[h]=c.style;a.oldStyle=d&&d[h]?d[h]:_$_c824[195]}e.push(a)}0<Object.keys(f).length&&Qa.update.call(this,f);return e};k.processed=function(b,c,a){var d=M.call(this,b,c);if(null===d)return null;var e=ba[_$_c824[51]].call(this,
241
- b,c),f=e[1];f.type!=_$_c824[49]&&f.type!=_$_c824[260]&&f.type!=_$_c824[261]&&f.type!=_$_c824[262]&&f.type!=_$_c824[263]&&0!=f.process&&(!0===a||f.type!=_$_c824[264]&&f.type!=_$_c824[265]&&f.type!=_$_c824[266])&&(f.type==_$_c824[259]?d=e[0][_$_c824[51]](f,d,a):this.records[c][b].element?d=1==this.parent.config.stripHTML?this.records[c][b].element.innerText:this.records[c][b].element.innerHTML:((_$_c824[3]+d).substr(0,1)==_$_c824[12]&&(d=this.executeFormula(d,b,c,!1)),e[0]&&typeof e[0][_$_c824[51]]==
242
- _$_c824[85]&&(d=e[0][_$_c824[51]](f,d,a))));return d};k.setValueChained=function(b){for(var c,a=[],d,e=0;e<b.length;e++)c=b[e],d=E.getColumnNameFromCoords(c.x,c.y),a[d]=c.value;a=W.getChain.call(this,a);var f=[],g=Object.keys(a);for(e=0;e<g.length;e++)0<=g[e].indexOf(_$_c824[27])?(c=g[e].split(_$_c824[27]),d=c[1],c=I(c[0])):(d=g[e],c=this),d=E.getCoordsFromColumnName(d),b=N.update.call(c,d[0],d[1],a[g[e]],!0),this.parent.config.onformulachain&&(b.w=c,b.v=c.records[d[1]][d[0]].v,b.cell=g[e],b.f=a[g[e]],
243
- f.push(b));F.call(this.parent,_$_c824[267],this,f)};return k}(),N=function(){var k=function(b){b.getCell=k[_$_c824[51]];b.getCellFromCoords=k[_$_c824[51]];b.updateCell=k.update;b.updateCells=k.updateAll;b.getSelected=k.selected;b.isAttached=k.attached};k.attached=function(b,c){return this.records[c]&&this.records[c][b]&&this.records[c][b].element&&this.records[c][b].element.parentNode&&this.records[c][b].element.parentNode.parentNode?!0:!1};k[_$_c824[51]]=function(b,c,a){typeof b==_$_c824[17]&&(c=
244
- E.getCoordsFromColumnName(b),b=c[0],c=c[1]);b=parseInt(b);c=parseInt(c);if(this.records[c]&&this.records[c][b]&&this.records[c][b].element)return this.records[c][b].element;var d=M.call(this,b,c);null===d&&(d=_$_c824[3]);return N.create.call(this,b,c,d,a)};k.getFromCoords=function(b,c,a){if(!b)return null;var d=[],e=b[0],f=b[1],g=b[2];b=b[3];for(a&&(a=this.results?E.invert(this.results):null);f<=b;f++)for(var h=e;h<=g;h++)if(!a||a[f])c?d.push(E.getColumnNameFromCoords(h,f)):d.push(this.records[f][h]);
245
- return d};k.selected=function(b,c){return k.getFromCoords.call(this,this.getHighlighted(),b,c)};k.getSelectedColumns=function(){var b=[],c=this.getHighlighted();if(c)for(var a=c[0];a<=c[2];a++)b.push(a);return b};k.updateAll=function(b){for(var c=this.getPrimaryKey(),a=[],d=0;d<b.length;d++)void 0!==b[d].id?(S.call(this,b[d]),a.push({id:b[d].id,y:b[d].y}),!1!==c&&k.update.call(this,c,b[d].y,b[d].id,!0)):a.push(k.update.call(this,b[d].x,b[d].y,b[d].value,b[d].force));J.call(this,_$_c824[107],[a])};
246
- k.update=function(b,c,a,d){var e=this.records[c];if(e=e&&e[b]?e[b]:null){e=e.element;var f={x:b,y:c};if(d||!e||1!=e.classList.contains(_$_c824[18])){if(d=F.call(this.parent,_$_c824[268],this,e,b,c,a))a=d;else if(!1===d)return f;d=ba[_$_c824[51]].call(this,b,c);if(typeof d[0].updateCell==_$_c824[85]){var g=d[0].updateCell(e,a,b,c,this,d[1]);void 0!==g&&(a=g)}g=M.call(this,b,c);if(g!==a){var h=M.call(this,b,c,a);f.oldValue=g;f.value=h;e&&k.applyOverflow.call(this,e,b,c);d[1]&&typeof d[1].render==_$_c824[85]&&
247
- d[1].render(e,a,b,c,this,d[1]);F.call(this.parent,_$_c824[269],this,e,b,c,f.value,f.oldValue)}}}else return!1;return f};k.create=function(b,c,a,d){var e=document.createElement(_$_c824[147]);e.setAttribute(_$_c824[42],b);e.setAttribute(_$_c824[43],c);var f=ba[_$_c824[51]].call(this,b,c);f[0]&&typeof f[0].createCell==_$_c824[85]&&(f=f[0].createCell(e,a,b,c,this,f[1]),void 0!==f&&(a=f));M.call(this,b,c,a);this.records[c][b]||na.cell.call(this,b,c,a);this.records[c][b].element=e;!a&&this.records[c][b].v&&
248
- (e.innerText=this.records[c][b].v);k.applyProperties.call(this,e,b,c,d);k.applyOverflow.call(this,e,b,c);F.call(this.parent,_$_c824[270],this,e,b,c,a);return e};k.getAttributes=function(b,c,a){a[b]||(a[b]={});b==_$_c824[271]?a[b][c]=this.getValue(c):b==_$_c824[272]?this.merged.cells&&(c=this.merged.cells[c])&&(a[b][c]=this.options.mergeCells[c]):this.options[b]&&this.options[b][c]&&(a[b][c]=this.options[b][c])};k.setAttributes=function(b){b&&b.style&&this.setStyle(b.style);b&&b.comments&&this.setComments(b.comments);
249
- b&&b.meta&&this.setMeta(b.meta);b&&b.cells&&this.setCells(b.cells);b&&b.mergeCells&&this.setMerge(b.mergeCells);b&&b.values&&k.batch.call(this,b.values);b&&b.formulas&&k.batch.call(this,b.formulas,!0)};k.applyProperties=function(b,c,a,d){if(!d){var e=E.getColumnNameFromCoords(c,a),f=this.options.style;d=this.options.comments;var g=this.options.cells,h=this.options.rows;if(f&&f[e]){var l=(l=b.getAttribute(_$_c824[100]))?l+(_$_c824[219]+f[e]):f[e];b.setAttribute(_$_c824[100],l)}this.options.columns[c]&&
250
- this.options.columns[c].wrap&&b.classList.add(_$_c824[273]);d&&d[e]&&b.setAttribute(_$_c824[274],d[e]);g&&g[e]&&(1==g[e].readOnly&&b.classList.add(_$_c824[18]),!1===g[e].locked&&!0===this.options.selectUnLockedCells&&b.classList.add(_$_c824[275]),1==g[e].wrap&&b.classList.add(_$_c824[273]));h&&h[a]&&1==h[a].readOnly&&b.classList.add(_$_c824[18])}d=this.options.columns[c];if(!b.style.textAlign||d.align)if(l=d.align?d.align:this.options.defaultColAlign)b.style.textAlign=l;!1===this.records[a][c].readonly||
251
- 1!=this.records[a][c].readonly&&1!=d.readOnly&&1!=d.readonly||b.classList.add(_$_c824[18])};k.applyOverflow=function(b,c,a){1==this.options.textOverflow&&0<c&&(c==this.options.columns.length-1&&(b.style.overflow=_$_c824[49]),this.records[a][c-1]&&this.records[a][c-1].element&&(this.records[a][c-1].element.style.overflow=!b.innerText&&this.headers[c-1]&&this.headers[c-1].offsetWidth?_$_c824[3]:_$_c824[49]))};k.batch=function(b,c){var a=[],d=Object.keys(b);if(d.length)for(var e=0;e<d.length;e++){if(0<=
252
- d[e].indexOf(_$_c824[27])){var f=d[e].split(_$_c824[27]);var g=I(f[0]);var h=f[1];f=f[0]}else g=this,h=d[e],f=this.getWorksheetName();h=E.getCoordsFromColumnName(h);h=g.updateCell(h[0],h[1],b[d[e]],!0);a[f]||(a[f]=[]);a[f].push(h)}if(1==c&&(d=Object.keys(a),d.length))for(e=0;e<d.length;e++)g=I(d[e]),J.call(g,_$_c824[108],a[d[e]])};return k}(),Ha=function(){var k=function(b){b.getColumnOptions=k[_$_c824[51]];b.setColumnOptions=k[_$_c824[11]];b.getCells=k.getCells;b.setCells=k.setCells;b.getProperties=
253
- k[_$_c824[51]];b.setProperties=k[_$_c824[11]];b.getProperty=k[_$_c824[51]];b.setProperty=k[_$_c824[11]];b.resetProperty=k[_$_c824[11]];b.updateProperty=k.update;b.getOptions=k[_$_c824[51]]};k.getCells=function(b){return b?this.options.cells[b]:this.options.cells};k.setCells=function(b,c){if(!Q.call(this.parent,this))return!1;if(typeof b==_$_c824[17])this.options.cells[b]=c;else{c=Object.keys(b);for(var a=0;a<c.length;a++)this.options.cells[c[a]]=b[c[a]]}};k[_$_c824[51]]=function(b,c){var a=null;void 0!==
254
- c&&(c=E.getColumnNameFromCoords(b,c),this.options.cells&&this.options.cells[c]&&(a=this.options.cells[c]));null===a&&(a=this.options.columns[b]);if(!a)a={type:_$_c824[55]};else if(!a.type||typeof a.type==_$_c824[17]&&!r.editors[a.type])a.type=_$_c824[55];return a};k[_$_c824[11]]=function(b,c,a){if(!Q.call(this.parent,this))return!1;this.edition&&this.closeEditor(this.edition,!1);var d=[];Array.isArray(b)?d=b:jSuites.isNumeric(b)&&jSuites.isNumeric(c)?(b={x:b,y:c},typeof a==_$_c824[84]&&(b.value=a),
255
- d.push(b)):typeof c===_$_c824[84]&&(b={x:b,value:c},d.push(b));if(Array.isArray(d))for(a=0;a<d.length;a++){var e=d[a];b=e.x;c=e.y;var f=k[_$_c824[51]].call(this,b,c),g=e.value,h=r.editors[f.type],l=null;g&&g.type&&(l=r.editors[g.type]);if(typeof c===_$_c824[13])for(e.oldValue=f,parseInt(g.width)||(g.width=this.options.defaultColWidth||100),g.type&&r.editors[g.type]||(g.type=_$_c824[55]),this.options.columns[b]=g,g.width&&this.colgroup[b]&&this.colgroup[b].setAttribute(_$_c824[152],parseInt(g.width)),
256
- typeof g.title!==_$_c824[13]&&this.headers[b]&&(g.title?(this.headers[b].innerText=g.title,this.headers[b].setAttribute(_$_c824[166],g.title)):(this.headers[b].innerText=E.getColumnName(b),this.headers[b].removeAttribute(_$_c824[166]))),g.tooltip&&this.headers[b]&&(this.headers[b].title=g.tooltip),c=0;c<this.records.length;c++)this.records[c][b].element&&(h&&typeof h.destroyCell==_$_c824[85]&&h.destroyCell(this.records[c][b].element,b,c),l&&typeof l.createCell==_$_c824[85]&&(N.applyProperties.call(this,
257
- this.records[c][b].element,b,c),l.createCell(this.records[c][b].element,M.call(this,b,c),b,c,this,g)));else if(f=E.getColumnNameFromCoords(b,c),e.oldValue=this.options.cells&&this.options.cells[f]?this.options.cells[f]:_$_c824[3],g?(this.options.cells||(this.options.cells={}),this.options.cells[f]=g):(delete this.options.cells[f],g=k[_$_c824[51]].call(this,b,c),l=r.editors[g.type]),e=this.records[c][b].element)h&&typeof h.destroyCell==_$_c824[85]&&h.destroyCell(e,b,c,this),l&&typeof l.createCell==
258
- _$_c824[85]&&(h=M.call(this,b,c),N.applyProperties.call(this,e,b,c,this),g=l.createCell(e,h,b,c,this,g),void 0!==g&&M.call(this,b,c,g))}else return console.error(_$_c824[257]),!1;this.refreshBorders();T.call(this.parent,{worksheet:this,action:_$_c824[78],records:d});J.call(this,_$_c824[78],{data:d});F.call(this.parent,_$_c824[276],this,d);return!0};k.update=function(b){var c=JSON.parse(JSON.stringify(b));if(Array.isArray(b))for(var a=0;a<b.length;a++){var d=b[a].x,e=b[a].y,f=b[a];var g=E.getColumnNameFromCoords(d,
259
- e);this.options.cells[g]||(this.options.cells[g]={});g=this.options.cells[g];f.oldValue=Object.assign({},g);for(var h=Object.keys(f.value),l=0;l<h.length;l++)g[h[l]]=f.value[h[l]];f=ba[_$_c824[51]].call(this,d,e);typeof f[0].updateProperty==_$_c824[85]&&f[0].updateProperty(d,e,this,f[1])}T.call(this.parent,{worksheet:this,action:_$_c824[79],records:b});J.call(this,_$_c824[79],{data:c});F.call(this.parent,_$_c824[276],this,b)};return k}(),Aa=function(){var k=function(c,a){Array.isArray(a)||(a=[a]);
260
- for(var d,e=c?_$_c824[3]:_$_c824[40],f=Object.keys(a),g=0;g<f.length;g++)if(d=this.rows[a[f[g]]])d.element&&(d.element.style.display=e),d.visible=c;this.resetBorders();G.refresh.call(this)},b=function(c){c.getRow=b[_$_c824[51]];c.moveRow=b.move;c.insertRow=b.add;c.deleteRow=b.del;c.getSelectedRows=b.selected;c.showRow=k.bind(c,!0);c.hideRow=k.bind(c,!1)};b[_$_c824[51]]=function(c){return this.rows[c]};b.attached=function(c){return this.rows[c]&&this.rows[c].element&&this.rows[c].element.parentNode?
261
- !0:!1};b.selected=function(c){var a=[],d=this.getHighlighted();if(d)for(var e=d[1];e<=d[3];e++)c?a.push(e):a.push(this.rows[e].element);return a};b.create=function(c,a){if(this.rows[c]&&this.rows[c].element)return this.rows[c].element;this.rows[c]||na.row.call(this,c);var d=document.createElement(_$_c824[145]);d.setAttribute(_$_c824[43],c);this.rows[c].element=d;var e=null;this.options.rows[c]&&!a&&(this.options.rows[c].style&&d.setAttribute(_$_c824[100],this.options.rows[c].style),this.options.rows[c].height&&
262
- (d.style.height=parseInt(this.options.rows[c].height)+_$_c824[44]),this.options.rows[c].title&&(e=this.options.rows[c].title),0==this.options.rows[c].visible&&(this.rows[c].visible=!1),this.options.rows[c].id&&(this.rows[c].id=this.options.rows[c].id));F.call(this.parent,_$_c824[277],this,c,d);0==this.rows[c].visible&&(d.style.display=_$_c824[40]);e||(e=parseInt(c+1));a=document.createElement(_$_c824[147]);a.innerHTML=e;a.setAttribute(_$_c824[43],c);a.className=_$_c824[278];d.appendChild(a);return d};
263
- b.move=function(c,a){if(!Q.call(this.parent,this))return!1;c=parseInt(c);a=parseInt(a);if(!this.rows[a]||!this.rows[c])return console.error(_$_c824[279]),!1;if(0<Object.keys(this.getMerge()).length){var d=null;this.merged.rows[c]?d=!0:this.merged.rows[a]&&(c>a?this.merged.rows[a-1]&&(d=!0):this.merged.rows[a+1]&&(d=!0));d&&this.destroyMerged()}this.resetBorders();0<=Array.prototype.indexOf.call(this.tbody.children,this.rows[a].element)?(d=G.renderRow.call(this,c),c>a?this.tbody.insertBefore(d,this.rows[a].element):
264
- this.tbody.insertBefore(d,this.rows[a].element.nextSibling)):this.rows[c].element&&(this.tbody.removeChild(this.rows[c].element),G.refresh.call(this));this.rows.splice(a,0,this.rows.splice(c,1)[0]);this.records.splice(a,0,this.records.splice(c,1)[0]);this.options.data.splice(a,0,this.options.data.splice(c,1)[0]);0<this.options.pagination&&this.tbody.children.length!=this.options.pagination&&this.page(this.pageNumber);J.call(this,_$_c824[66],{f:c,t:a});X.references.call(this);X.update.call(this);T.call(this.parent,
265
- {worksheet:this,action:_$_c824[66],oldValue:c,newValue:a});F.call(this.parent,_$_c824[280],this,c,a)};b.add=function(c,a,d,e){if(!Q.call(this.parent,this))return!1;if(!this.options.allowInsertRow)return console.error(_$_c824[281]),!1;var f=[];if(0<c)var g=parseInt(c);else g=1,Array.isArray(c)&&!e&&(Array.isArray(c[0])?e=c:(e=[],e.push(c)));e=Fa.standardize(e);d=d?!0:!1;var h=this.options.data?this.options.data.length-1:0;if(void 0==a||a>h||0>a)a=h,d=!1;g||(g=1);if(!1===F.call(this.parent,_$_c824[282],
266
- this,a,g,d))return console.log(_$_c824[283]),!1;this.resetBorders();var l=d?a:a+1,m=0;c=[];for(var p=[],n=this.rows.splice(l),t=this.options.data?this.options.data.splice(l):[],v=this.records.splice(l),u=l;u<g+l;u++){var y=e[m]&&e[m].id?e[m].id:ta.next.call(this);na.row.call(this,u,y);var z=this.dataType?{}:[];for(var C=0;C<this.options.columns.length;C++){var A=Z.call(this,C);z[A]=_$_c824[3];e&&e[m]&&e[m].data&&(typeof e[m].data[A]!==_$_c824[13]?z[A]=e[m].data[A]:typeof e[m].data[C]!==_$_c824[13]&&
267
- (z[A]=e[m].data[C]));f.push({x:C,y:u,value:z[A],force:!0})}p.push({id:y,data:z});m++}this.rows=this.rows.concat(n);this.records=this.records.concat(v);Array.prototype.push.apply(this.options.data,t);this.results&&0<this.results.length&&(h=this.results[this.results.length-1]);e=!1;n[0]?0<=Array.prototype.indexOf.call(this.tbody.children,n[0].element)&&(e=!0):this.rows[h]?this.rows[h].element&&0<=Array.prototype.indexOf.call(this.tbody.children,this.rows[h].element)&&(e=!0):e=!0;for(u=l;u<g+l;u++)this.results&&
268
- (this.rows[u].results=!0),1==e&&(h=n[0]?n[0].element:null,A=G.renderRow.call(this,u,null,null,!0),h?this.tbody.insertBefore(A,h):this.tbody.appendChild(A),0<this.options.pagination?Array.prototype.indexOf.call(this.tbody.children,A)>=this.options.pagination&&(e=!1):G.limited.call(this)&&(G.isVisible.call(this,A.children[1])||(e=!1))),c.push(this.records[u]);this.merged.rows[l]&&ca.updateConfig.call(this,1,1,l-1,g);J.call(this,_$_c824[62],{numOfRows:g,rowNumber:a,insertBefore:d?1:0,data:p});l=this.tbody.firstChild.getAttribute(_$_c824[43]);
269
- this.results&&(l=this.results.indexOf(parseInt(l)),this.results=va.refresh.call(this));X.references.call(this);f.length&&ea.applyValues.call(this,f);0<this.options.pagination?ua[_$_c824[11]].call(this,this.pageNumber):(this.results&&(l=this.results[l]),this.tbody.textContent=_$_c824[3],G[_$_c824[46]].call(this,l));X.update.call(this);U.call(this);ha.refresh.call(this);T.call(this.parent,{worksheet:this,action:_$_c824[62],rowNumber:a,numOfRows:g,insertBefore:d,data:p});F.call(this.parent,_$_c824[284],
270
- this,a,g,c,d)};b.del=function(c,a){if(!Q.call(this.parent,this))return!1;if(!this.options.allowDeleteRow)return console.error(_$_c824[285]),!1;var d=null,e={},f=[],g=0;void 0==c&&(a=this.getSelectedRows(),a[0]?(c=parseInt(a[0].getAttribute(_$_c824[43])),a=a.length):(c=this.options.data.length-1,a=1));var h=this.options.data.length-1;if(void 0==c||c>h||0>c)c=h;a||(a=1);c+a>=this.options.data.length&&(a=this.options.data.length-c,a>=this.options.data.length&&(a=this.options.data.length,this.resetSelection()));
271
- if(!1===F.call(this.parent,_$_c824[286],this,c,a))return console.log(_$_c824[287]),!1;if(-1<parseInt(c)&&0<parseInt(a)){h=parseInt(this.thead.lastChild.children[1].getAttribute(_$_c824[42]));var l=parseInt(this.tbody.firstChild.getAttribute(_$_c824[43]));this.resetBorders();for(var m=c;m<c+a;m++)for(var p=0;p<this.options.columns.length;p++)d=E.getColumnNameFromCoords(p,m),N.getAttributes.call(this,_$_c824[288],d,e),N.getAttributes.call(this,_$_c824[100],d,e),N.getAttributes.call(this,_$_c824[289],
272
- d,e),N.getAttributes.call(this,_$_c824[290],d,e),N.getAttributes.call(this,_$_c824[272],d,e),N.getAttributes.call(this,_$_c824[271],d,e),f[d]=!0;if(d=W.getChain.call(this,e.values))e.formulas=d;for(m=c;m<c+a;m++)0<=Array.prototype.indexOf.call(this.tbody.children,this.rows[m].element)&&(this.rows[m].element.parentNode.removeChild(this.rows[m].element),g++);d=[];for(m=c;m<c+a;m++)d.push({id:this.getRowId(m),row:m,data:this.getRowData(m)});this.rows.splice(c,a);m=this.records.splice(c,a);this.options.data.splice(c,
273
- a);ca.updateConfig.call(this,1,0,c,a);J.call(this,_$_c824[63],{rowNumber:c,numOfRows:a,data:d});X.references.call(this,f);this.results&&(this.results=va.refresh.call(this));0<this.options.pagination?this.page(this.pageNumber,function(){if(0==this.tbody.children.length){var n=this.whichPage(this.options.data.length-1);this.page(n)}}):G.limited.call(this)&&0<g&&(this.tbody.firstChild?l=parseInt(this.tbody.firstChild.getAttribute(_$_c824[43])):this.results?l=this.results.length?this.results[0]:null:
274
- this.options.data.length?l>this.options.data.length-1&&(l=this.options.data.length-1):l=null,null!==l&&(this.tbody.textContent=_$_c824[3],G.call(this),G[_$_c824[46]].call(this,l,h)));X.update.call(this,!0);T.call(this.parent,{worksheet:this,action:_$_c824[63],rowNumber:c,numOfRows:a,insertBefore:1,data:d,attributes:e});F.call(this.parent,_$_c824[291],this,c,a,m,d,e)}};return b}(),Xa=function(){var k=function(c,a){Array.isArray(a)||(a=[a]);for(var d,e,f=Object.keys(a),g=0;g<f.length;g++)if(d=a[f[g]],
275
- e=this.options.columns[d])this.colgroup[d]&&(this.colgroup[d].style.width=c?parseInt(e.width||this.options.defaultColWidth)+_$_c824[44]:_$_c824[144]),e.visible=c;G.refresh.call(this);0<this.options.freezeColumns&&ka[_$_c824[11]].call(this,this.options.freezeColumns);this.resetBorders()},b=function(c){c.getColumn=b[_$_c824[51]];c.getColumnIdByName=b.getByName;c.getPrimaryKey=b.getPrimaryKey;c.getSelectedColumns=b.selected;c.moveColumn=b.move;c.insertColumn=b.add;c.deleteColumn=b.del;c.showColumn=k.bind(c,
276
- !0);c.hideColumn=k.bind(c,!1)};b[_$_c824[51]]=function(c){return this.options.columns[c]||!1};b.getByName=function(c){for(var a=this.options.columns,d=0;d<a.length;d++)if(a[d].name==c)return d;return!1};b.getPrimaryKey=function(){for(var c=0;c<this.options.columns.length;c++)if(1==this.options.columns[c].primaryKey)return c;return!1};b.selected=function(c){c=[];var a=this.getHighlighted();if(a)for(var d=a[0];d<=a[2];d++)c.push(d);return c};b.move=function(c,a){if(!Q.call(this.parent,this))return!1;
277
- c=parseInt(c);a=parseInt(a);if(!this.options.columns[c])return console.error(_$_c824[292]),!1;if(!this.options.columns[a])return console.error(_$_c824[293]),!1;if(0<Object.keys(this.getMerge()).length){var d=null;this.merged.cols[c]?d=!0:this.merged.cols[a]&&(c>a?this.merged.cols[a-1]&&(d=!0):this.merged.cols[a+1]&&(d=!0));d&&this.destroyMerged()}this.resetBorders();d=this.options.freezeColumns;0<d&&(c<d||a<d)?ka.reset.call(this):d=null;if(this.headers[a]&&this.headers[a].parentNode){this.headers[c]||
278
- Ca.create.call(this,c);var e=(c>a?this.headers[a]:this.headers[a].nextSibling)||null;this.headerContainer.insertBefore(this.headers[c],e);e=(c>a?this.colgroup[a]:this.colgroup[a].nextSibling)||null;this.colgroupContainer.insertBefore(this.colgroup[c],e);for(var f=0;f<this.tbody.children.length;f++){var g=this.tbody.children[f].getAttribute(_$_c824[43]);e=(c>a?this.records[g][a].element:this.records[g][a].element.nextSibling)||null;this.tbody.children[f].insertBefore(N[_$_c824[51]].call(this,c,g),
279
- e)}if(this.options.footers)for(f=0;f<this.tfoot.children.length;f++)e=(c>a?this.footers.content[f][a].element:this.footers.content[f][a].element.nextSibling)||null,this.tfoot.children[f].insertBefore(aa.create.call(this,c,f),e)}else if(this.headers[c]&&this.headers[c].parentNode){this.headerContainer.removeChild(this.headers[c]);this.colgroupContainer.removeChild(this.colgroup[c]);for(f=0;f<this.tbody.children.length;f++)g=parseInt(this.tbody.children[f].getAttribute(_$_c824[43])),this.tbody.children[f].removeChild(this.records[g][c].element);
280
- if(this.options.footers)for(f=0;f<this.tfoot.children.length;f++)this.tfoot.children[f].removeChild(this.footers.content[f][c].element)}this.options.columns.splice(a,0,this.options.columns.splice(c,1)[0]);this.headers.splice(a,0,this.headers.splice(c,1)[0]);this.colgroup.splice(a,0,this.colgroup.splice(c,1)[0]);for(f=0;f<this.rows.length;f++)this.dataType||this.options.data[f].splice(a,0,this.options.data[f].splice(c,1)[0]),this.records[f].splice(a,0,this.records[f].splice(c,1)[0]);if(this.options.footers)for(f=
281
- 0;f<this.options.footers.length;f++)this.options.footers[f].splice(a,0,this.options.footers[f].splice(c,1)[0]),this.footers.content[f].splice(a,0,this.footers.content[f].splice(c,1)[0]);J.call(this,_$_c824[67],{f:c,t:a});X.references.call(this);X.update.call(this);0<d&&(c<=d||d<=d)&&ka[_$_c824[11]].call(this,d);T.call(this.parent,{worksheet:this,action:_$_c824[67],oldValue:c,newValue:a});F.call(this.parent,_$_c824[294],this,c,a)};b.add=function(c,a,d,e,f,g){if(!Q.call(this.parent,this))return!1;if(!this.options.allowInsertColumn)return console.error(_$_c824[295]),
282
- !1;var h=[];if(0<c)var l=parseInt(c);else if(l=1,Array.isArray(c)&&!f)if(Array.isArray(c[0]))f=c;else{f=[];for(var m=0;m<c.length;m++)f[m]=[c[m]]}f||(f=[]);d=d?!0:!1;c=this.options.columns.length-1;if(void 0==a||a>c||0>a)a=c,d=!1;l||(l=1);if(!1===F.call(this.parent,_$_c824[296],this,a,l,d))return console.log(_$_c824[297]),!1;ha.reset.call(this);if(1==this.dataType)var p=parseInt((_$_c824[3]+Date.now()).substr(-8));e||(e=[]);for(m=0;m<l;m++)e[m]||(e[m]={type:_$_c824[55],source:[],options:[],width:this.options.defaultColWidth}),
283
- 1==this.dataType&&typeof e[m].name==_$_c824[13]&&(e[m].name=_$_c824[298]+(p+m));var n=d?a:a+1;this.options.columns=E.injectArray(this.options.columns,n,e);p=function(z,C){for(var A=n;A<l+n;A++)Ca.create.call(this,A),z?(this.headerContainer.insertBefore(this.headers[A],z),this.colgroupContainer.insertBefore(this.colgroup[A],C)):(this.headerContainer.appendChild(this.headers[A]),this.colgroupContainer.appendChild(this.colgroup[A]))};m=function(z,C){if(C)for(var A=n;A<l+n;A++)this.rows[z].element.insertBefore(N[_$_c824[51]].call(this,
284
- A,z,!0),C);else for(A=n;A<l+n;A++)this.rows[z].element.appendChild(N[_$_c824[51]].call(this,A,z,!0))};var t=this.headers.splice(n),v=this.colgroup.splice(n);t[0]?0<=Array.prototype.indexOf.call(this.headerContainer.children,t[0])&&p.call(this,t[0],v[0]):this.headers[c]&&0<=Array.prototype.indexOf.call(this.headerContainer.children,this.headers[c])&&p.call(this);this.headers=this.headers.concat(t);this.colgroup=this.colgroup.concat(v);aa.adjust.call(this,n,l,1);oa.adjust.call(this,a,l,1,g);g=0;v=t=
285
- p=null;for(var u=0;u<this.options.data.length;u++){this.dataType||(t=this.options.data[u].splice(n));v=this.records[u].splice(n);g=0;for(var y=n;y<l+n;y++)p=f[u]&&f[u][g]?f[u][g]:_$_c824[3],M.call(this,y,u,p),h.push({x:y,y:u,value:p}),na.cell.call(this,y,u),g++;this.rows[u].element&&this.rows[u].element.parentNode&&(v[0]?0<=Array.prototype.indexOf.call(this.rows[u].element.children,v[0].element)&&m.call(this,u,v[0].element):this.records[u][c].element&&0<=Array.prototype.indexOf.call(this.rows[u].element.children,
286
- this.records[u][c].element)&&m.call(this,u));this.dataType||(this.options.data[u]=this.options.data[u].concat(t));this.records[u]=this.records[u].concat(v)}this.merged.cols[n]&&ca.updateConfig.call(this,0,1,n-1,l);J.call(this,_$_c824[64],{numOfColumns:l,columnNumber:a,insertBefore:d?1:0,properties:e,data:f});X.references.call(this);h.length&&ea.applyValues.call(this,h);X.update.call(this);this.refreshBorders();T.call(this.parent,{worksheet:this,action:_$_c824[64],columnNumber:a,numOfColumns:l,insertBefore:d,
287
- properties:e,data:f});F.call(this.parent,_$_c824[299],this,a,l,[],d)};b.del=function(c,a){if(!Q.call(this.parent,this))return!1;if(!this.options.allowDeleteColumn)return console.error(_$_c824[300]),!1;var d={},e=[],f=0;if(1<this.options.columns.length){void 0==c&&(a=this.getSelectedColumns(!0),a.length?(c=parseInt(a[0]),a=parseInt(a.length)):(c=this.options.columns.length-1,a=1));var g=this.options.columns.length-1;if(void 0==c||c>g||0>c)c=g;a||(a=1);c+a>=this.options.columns.length&&(a=this.options.columns.length-
288
- c,a>=this.options.columns.length&&(a--,console.error(_$_c824[301])));if(!1===F.call(this.parent,_$_c824[302],this,c,a))return console.log(_$_c824[303]),!1;if(-1<parseInt(c)&&0<parseInt(a)){g=parseInt(this.thead.lastChild.children[1].getAttribute(_$_c824[42]));var h=0;this.tbody.firstChild&&(h=parseInt(this.tbody.firstChild.getAttribute(_$_c824[43])));this.resetBorders();var l=null,m=[],p=[],n=[];var t=0;for(var v=c;v<c+a;v++)0<=Array.prototype.indexOf.call(this.headerContainer.children,this.headers[v])&&
289
- (this.colgroup[v].parentNode.removeChild(this.colgroup[v]),this.headers[v].parentNode.removeChild(this.headers[v]),f++),n[t]=this.options.columns[v],t++;for(var u=0;u<this.options.data.length;u++)for(v=c;v<c+a;v++)t=E.getColumnNameFromCoords(v,u),N.getAttributes.call(this,_$_c824[288],t,d),N.getAttributes.call(this,_$_c824[100],t,d),N.getAttributes.call(this,_$_c824[289],t,d),N.getAttributes.call(this,_$_c824[290],t,d),N.getAttributes.call(this,_$_c824[272],t,d),N.getAttributes.call(this,_$_c824[271],
290
- t,d),e[t]=!0,this.records[u][v].element&&0<=Array.prototype.indexOf.call(this.rows[u].element.children,this.records[u][v].element)&&this.records[u][v].element.parentNode.removeChild(this.records[u][v].element);if(v=W.getChain.call(this,d.values))d.formulas=v;this.options.columns.splice(c,a);this.headers.splice(c,a);this.colgroup.splice(c,a);for(u=0;u<this.options.data.length;u++)this.dataType||(p[u]=this.options.data[u].splice(c,a)),m[u]=this.records[u].splice(c,a);aa.adjust.call(this,c,a,0);(v=oa.adjust.call(this,
291
- c,a,0))&&(l={nested:v});ca.updateConfig.call(this,0,0,c,a);J.call(this,_$_c824[65],{columnNumber:c,numOfColumns:a});X.references.call(this,e);G.limited.call(this)&&0<f&&(this.tbody.textContent=_$_c824[3],G.call(this),G[_$_c824[46]].call(this,h,g));X.update.call(this,!0);T.call(this.parent,{worksheet:this,action:_$_c824[65],columnNumber:c,numOfColumns:a,insertBefore:1,data:p,properties:n,attributes:d,extra:l});F.call(this.parent,_$_c824[304],this,c,a,m,n,d)}}};return b}(),Qa=function(){var k={},b=
292
- {},c=function(d){if(typeof d==_$_c824[17]){var e=d;d=E.getCoordsFromColumnName(d);var f=d[0];d=d[1]}else f=d.x,d=d.y,e=E.getColumnNameFromCoords(f,d);if(this.records[d]&&this.records[d][f]&&this.records[d][f].element){b[e]=this.options.style[e];this.records[d][f].element.setAttribute(_$_c824[100],_$_c824[3]);if(this.options.cells&&this.options.cells[e]&&this.options.cells[e].align)var g=this.options.cells[e].align;else this.options.columns[f].align?g=this.options.columns[f].align:this.options.defaultColAlign&&
293
- (g=this.options.defaultColAlign);g&&(this.records[d][f].element.style.textAlign=g)}this.options.style&&this.options.style[e]&&delete this.options.style[e]},a=function(d){d.getStyle=a[_$_c824[51]];d.setStyle=a[_$_c824[11]];d.resetStyle=a.reset};a[_$_c824[51]]=function(d){var e=this.options.style;if(!e)return!1;if(d){if(typeof d==_$_c824[17])return e[d];var f=[],g=Object.keys(d);if(0<g.length)for(var h=0;h<g.length;h++){if(typeof d[h]==_$_c824[17])var l=e&&e[d[h]]?e[d[h]]:_$_c824[3];else l=E.getColumnNameFromCoords(d[h].x,
294
- d[h].y),l=e&&e[l]?e[l]:_$_c824[3];f.push(l)}return f}return this.options.style};a[_$_c824[11]]=function(d,e,f,g){if(!Q.call(this.parent,this))return!1;this.options.style||(this.options.style={});var h=this.options.style,l=null,m=[],p=[],n={};p=function(u,y,z){if(!n[u]&&(h[u]?m=h[u].split(_$_c824[219]):(h[u]=_$_c824[3],m=[]),n[u]={},m.length))for(var C=0;C<m.length;C++)m[C]&&m[C].trim()&&(l=m[C].split(_$_c824[136]),n[u][l[0].trim()]=l[1].trim());b[u]||(b[u]=[]);k[u]||(k[u]=[]);n[u][y]||(n[u][y]=_$_c824[3]);
295
- b[u].push([y+_$_c824[136]+n[u][y]]);n[u][y]=n[u][y]&&n[u][y]==z&&!g?_$_c824[3]:z;k[u].push([y+_$_c824[136]+n[u][y]]);z=E.getCoordsFromColumnName(u);this.records[z[1]]&&this.records[z[1]][z[0]]&&this.records[z[1]][z[0]].element&&(this.records[z[1]][z[0]].element.style[y]=n[u][y]);n[u][y]||delete n[u][y]};k={};b={};if(e)if(typeof d==_$_c824[17])p.call(this,d,e,f);else{if(d&&d.length)for(var t=0;t<d.length;t++){var v=E.getColumnNameFromCoords(d[t].x,d[t].y);p.call(this,v,e,f)}}else for(f=Object.keys(d),
296
- t=0;t<f.length;t++)if(v=d[f[t]])for(typeof v==_$_c824[17]&&(v=v.split(_$_c824[219])),e=0;e<v.length;e++)v[e]&&(typeof v[e]==_$_c824[17]&&(v[e]=v[e].split(_$_c824[136])),v[e][0].trim()&&p.call(this,f[t],v[e][0].trim(),v[e][1].trim()));m={};p=Object.keys(n);if(p.length){for(t=0;t<p.length;t++){m[p[t]]||(m[p[t]]=[]);d=Object.keys(n[p[t]]);for(e=0;e<d.length;e++)m[p[t]].push(d[e]+_$_c824[115]+n[p[t]][d[e]]);this.options.style[p[t]]=m[p[t]].join(_$_c824[305])}p=Object.keys(k);for(t=0;t<p.length;t++)k[p[t]]=
297
- k[p[t]].join(_$_c824[219]);p=Object.keys(b);for(t=0;t<p.length;t++)b[p[t]]=b[p[t]].join(_$_c824[219]);this.refreshBorders();T.call(this.parent,{worksheet:this,action:_$_c824[70],oldValue:b,newValue:k});J.call(this,_$_c824[70],[k]);F.call(this.parent,_$_c824[306],this,k,b)}};a.reset=function(d){if(!Q.call(this.parent,this))return!1;if(d){b={};if(Array.isArray(d))for(var e=0;e<d.length;e++)c.call(this,d[e]);else c.call(this,d);this.refreshBorders();T.call(this.parent,{worksheet:this,action:_$_c824[71],
298
- cells:d,oldValue:b});J.call(this,_$_c824[71],[d]);F.call(this.parent,_$_c824[308],this,d)}else console.error(_$_c824[307])};a.update=function(d){k={};b={};for(var e,f=Object.keys(d),g=0;g<f.length;g++){b[f[g]]=this.options.style[f[g]]||_$_c824[3];k[f[g]]=this.options.style[f[g]]=d[f[g]];e=E.getCoordsFromColumnName(f[g]);var h=e[0],l=e[1];this.records[l]&&this.records[l][h]&&this.records[l][h].element&&(this.records[l][h].element.setAttribute(_$_c824[100],d[f[g]]),!this.records[l][h].element.style.textAlign&&
299
- (e=this.options.columns[h].align?this.options.columns[h].align:this.options.defaultColAlign))&&(this.records[l][h].element.style.textAlign=e)}J.call(this,_$_c824[71],[f]);J.call(this,_$_c824[70],[k]);F.call(this.parent,_$_c824[306],this,k,b)};return a}(),Ya=function(){var k=function(b){b.getComments=k[_$_c824[51]];b.setComments=k[_$_c824[11]]};k[_$_c824[51]]=function(b){return b&&typeof b==_$_c824[17]?this.options.comments&&this.options.comments[b]?this.options.comments[b]:!1:this.options.comments};
300
- k[_$_c824[11]]=function(b,c){if(!Q.call(this.parent,this))return!1;if(typeof b==_$_c824[17]){var a={};a[b]=c}else a=b;if(c=F.call(this.parent,_$_c824[309],this,a))a=c;else if(!1===c)return!1;this.options.comments||(this.options.comments={});b={};var d=Object.keys(a);if(d.length){for(var e=0;e<d.length;e++){var f=E.getCoordsFromColumnName(d[e]);this.records[f[1]]&&this.records[f[1]][f[0]]&&(b[d[e]]=this.options.comments[d[e]]||_$_c824[3],(c=a[d[e]])?this.options.comments[d[e]]=c:delete this.options.comments[d[e]],
301
- this.records[f[1]][f[0]].element&&(c?this.records[f[1]][f[0]].element.setAttribute(_$_c824[274],c):this.records[f[1]][f[0]].element.removeAttribute(_$_c824[274])))}T.call(this.parent,{worksheet:this,action:_$_c824[75],newValue:a,oldValue:b});J.call(this,_$_c824[75],[a]);F.call(this.parent,_$_c824[310],this,a,b)}};return k}(),Za=function(){var k=function(b){b.getMeta=k[_$_c824[51]];b.setMeta=k[_$_c824[11]];b.resetMeta=k.reset};k[_$_c824[51]]=function(b,c){if(b){if(this.options.meta[b])return c?this.options.meta[b][c]:
302
- this.options.meta[b]}else return this.options.meta};k[_$_c824[11]]=function(b,c,a){if(!Q.call(this.parent,this))return!1;this.options.meta||(this.options.meta={});if(typeof b==_$_c824[17]&&c){a||(a=_$_c824[3]);var d={};d[b]={};d[b][c]=a;b=d}c=Object.keys(b);if(c.length){a={};for(d=0;d<c.length;d++){this.options.meta[c[d]]||(this.options.meta[c[d]]={});a[c[d]]||(a[c[d]]={});for(var e=Object.keys(b[c[d]]),f=0;f<e.length;f++)this.options.meta[c[d]][e[f]]=b[c[d]][e[f]],a[c[d]][e[f]]=b[c[d]][e[f]]}Object.keys(a).length&&
303
- (J.call(this,_$_c824[311],[a]),F.call(this.parent,_$_c824[312],this,a))}};k.reset=function(){this.options.meta={};J.call(this,_$_c824[313],{});F.call(this.parent,_$_c824[314],this,{})};return k}(),$a=function(){var k=function(b){b.orderBy=k.execute};k.handler=function(b,c){return function(a,d){a=a[1];d=d[1];return b?a===_$_c824[3]&&d!==_$_c824[3]?1:a!==_$_c824[3]&&d===_$_c824[3]?-1:a>d?-1:a<d?1:0:a===_$_c824[3]&&d!==_$_c824[3]?1:a!==_$_c824[3]&&d===_$_c824[3]?-1:a>d?1:a<d?-1:0}};k.execute=function(b,
304
- c,a){if(0<=b){c=null==c?this.headers[b].classList.contains(_$_c824[315])?1:0:c?1:0;for(var d,e,f=[],g=0;g<this.options.data.length;g++)d=Ha[_$_c824[51]].call(this,b,g),e=this.records[g][b].v,e=d.type==_$_c824[260]||d.type==_$_c824[265]||d.type==_$_c824[266]||d.type==_$_c824[316]||d.type==_$_c824[14]||d.type==_$_c824[317]?Number(e):jSuites.isNumeric(e)?Number(e):e.toLowerCase(),f[g]=[g,e];g=typeof this.parent.config.sorting===_$_c824[85]?this.parent.config.sorting(c,b):k.handler(c,b);f.sort(g);d=a?
305
- !0:!1;if(!a)for(a=[],g=0;g<f.length;g++)a[g]=f[g][0];if(g=F.call(this.parent,_$_c824[318],this,b,c,a))a=g;else if(!1===g)return!1;if(d)this.destroyMerged();else if(0<Object.keys(this.getMerge()).length)if(confirm(B(_$_c824[319])))this.destroyMerged();else return!1;if(a.length<f.length)for(g=0;g<f.length;g++)-1==a.indexOf(f[g][0])&&a.push(f[g][0]);f=[];for(g=0;g<a.length;g++)f[a[g]]=g;Ea.call(this,!1);ha.reset.call(this);J.call(this,_$_c824[76],{column:b,direction:c,order:a});k.update.call(this,a);
306
- k.arrow.call(this,b,c);ha.refresh.call(this);T.call(this.parent,{worksheet:this,action:_$_c824[76],column:b,newValue:a,oldValue:f,direction:c});F.call(this.parent,_$_c824[320],this,b,c,a);return!0}};k.update=function(b){for(var c=[],a=0;a<b.length;a++)c[a]=this.options.data[b[a]];for(a=0;a<b.length;a++)this.options.data[a]=c[a];c=[];for(a=0;a<b.length;a++)c[a]=this.records[b[a]];this.records=c;c=[];for(a=0;a<b.length;a++)c[a]=this.rows[b[a]];this.rows=c;X.references.call(this);this.searchInput&&this.searchInput.value?
307
- qa.update.call(this,null):da.update.call(this)};k.arrow=function(b,c){for(var a=0;a<this.headers.length;a++)this.headers[a].classList.remove(_$_c824[321]),this.headers[a].classList.remove(_$_c824[315]);c?this.headers[b].classList.add(_$_c824[321]):this.headers[b].classList.add(_$_c824[315])};return k}(),ua=function(){var k=function(b){b.whichPage=k.whichPage;b.quantityOfPages=k.quantityOfPages;b.page=k[_$_c824[11]];b.updatePagination=k.update};k.build=function(){this.pageNumber=0;var b=document.createElement(_$_c824[20]),
308
- c=document.createElement(_$_c824[20]);this.pagination=document.createElement(_$_c824[20]);this.pagination.classList.add(_$_c824[322]);this.pagination.appendChild(b);this.pagination.appendChild(c);this.options.pagination||(this.pagination.style.display=_$_c824[40]);this.element.appendChild(this.pagination)};k.pageUp=function(){0<this.pageNumber&&(this.pageNumber--,k[_$_c824[11]].call(this,this.pageNumber))};k.pageDown=function(){this.pageNumber<k.quantityOfPages.call(this)-1&&(this.pageNumber++,k[_$_c824[11]].call(this,
309
- this.pageNumber))};k.whichPage=function(b){if(0<this.options.pagination)return this.rows[b]?(this.results&&(b=this.results.indexOf(parseInt(b))),Math.ceil((parseInt(b)+1)/parseInt(this.options.pagination))-1):null;console.log(_$_c824[323]);return!1};k.quantityOfPages=function(){if(0<this.options.pagination)return Math.ceil((this.results?this.results.length:this.rows.length)/parseInt(this.options.pagination));console.log(_$_c824[323]);return!1};k[_$_c824[11]]=function(b,c){var a=this.pageNumber,d=
310
- parseInt(this.options.pagination);if(d){if(null==b||-1==b)b=Math.ceil((this.results?this.results:this.rows).length/d)-1;if(!1===F.call(this.parent,_$_c824[325],this,b,a,d))return!1;this.pageNumber=b;G.resetY.call(this);aa.refresh.call(this);typeof c==_$_c824[85]&&c.call(this);F.call(this.parent,_$_c824[326],this,b,a,d)}else console.error(_$_c824[324])};k.update=function(){this.pagination.children[0].innerHTML=_$_c824[3];this.pagination.children[1].innerHTML=_$_c824[3];if(this.options.pagination){var b=
311
- this.results?this.results.length:this.rows.length;if(b){b=Math.ceil(b/this.options.pagination);if(6>this.pageNumber)var c=1,a=10>b?b:10;else 5>b-this.pageNumber?(c=b-9,a=b,1>c&&(c=1)):(c=this.pageNumber-4,a=this.pageNumber+5);if(1<c){var d=document.createElement(_$_c824[20]);d.className=_$_c824[328];d.innerHTML=_$_c824[217];d.title=1;this.pagination.children[1].appendChild(d)}for(;c<=a;c++)d=document.createElement(_$_c824[20]),d.className=_$_c824[328],d.innerHTML=c,this.pagination.children[1].appendChild(d),
312
- this.pageNumber==c-1&&d.classList.add(_$_c824[329]);a<b&&(d=document.createElement(_$_c824[20]),d.className=_$_c824[328],d.innerHTML=_$_c824[218],d.title=b,this.pagination.children[1].appendChild(d));this.pagination.children[0].innerHTML=B(_$_c824[330],[this.pageNumber+1,b])}else this.pagination.children[0].innerHTML=B(_$_c824[327])}};return k}(),ka=function(){var k=function(b){b.setFreezeColumns=k[_$_c824[11]];b.resetFreezeColumns=k.reset};k.width=function(){if(this.options.freezeColumns){k.headers.call(this);
313
- for(var b=0;b<this.rows.length;b++)this.rows[b].element&&k.update.call(this,b)}};k.update=function(b){var c,a;if(a=this.options.freezeColumns){var d=ya.call(this)?50:0;if(this.rows[b].element)for(var e=0;e<a;e++){if(c=this.records[b][e].element)c.classList.add(_$_c824[50]),c.style.left=d+1+_$_c824[44];!1!==this.options.columns[e].visible&&(d+=this.options.columns[e].width)}}};k.headers=function(){var b=ya.call(this)?50:0,c;if(c=this.options.freezeColumns)for(var a=0;a<c;a++){if(this.headers[a]){this.headers[a].classList.add(_$_c824[50]);
314
- this.headers[a].style.left=b+1+_$_c824[44];if(this.options.footers)for(var d=0;d<this.options.footers.length;d++)this.footers.content[d][a].element.classList.add(_$_c824[50]),this.footers.content[d][a].element.style.left=b+1+_$_c824[44];!1!==this.options.columns[a].visible&&(b+=this.options.columns[a].width)}}else k.reset.call(this)};k[_$_c824[11]]=function(b){k.reset.call(this);this.options.freezeColumns=b;k.width.call(this);G.limited.call(this)&&U.call(this)};k.reset=function(){G[_$_c824[46]].call(this,
315
- null,this.options.freezeColumns);for(var b,c=1;c<=this.options.freezeColumns;c++){if(b=this.thead.lastChild)b.children[c].classList.remove(_$_c824[50]),b.children[c].style.left=_$_c824[3];for(var a=0;a<this.rows.length;a++)if(b=this.rows[a].element)b.children[c].classList.remove(_$_c824[50]),b.children[c].style.left=_$_c824[3];if(this.options.footers)for(a=0;a<this.options.footers.length;a++)this.tfoot.children[a].children[c].classList.remove(_$_c824[50]),this.tfoot.children[a].children[c].style.left=
316
- _$_c824[3]}this.options.freezeColumns=0};k.getWidth=function(){var b=ya.call(this)?50:0;if(0<this.options.freezeColumns)for(var c=0;c<=this.options.freezeColumns;c++)b=this.thead.lastChild.children[c]?b+this.thead.lastChild.children[c].offsetWidth:b+this.options.columns[c].width;return b};return k}(),X=function(){var k=function(a,d){if(this.options[a]){for(var e={},f=Object.keys(this.options[a]),g=0;g<f.length;g++)e[d&&void 0!=d[f[g]]?d[f[g]]:f[g]]=this.options[a][f[g]];this.options[a]=e}},b=function(){if(0<
317
- this.options.minSpareRows){for(var a=0,d=this.rows.length-1;0<=d;d--){for(var e=!1,f=0;f<this.options.columns.length;f++)M.call(this,f,d)&&(e=!0);if(e)break;else a++}0<this.options.minSpareRows-a&&this.insertRow(this.options.minSpareRows-a)}if(0<this.options.minSpareCols){a=0;for(f=this.options.columns.length-1;0<=f;f--){e=!1;for(d=0;d<this.rows.length;d++)M.call(this,f,d)&&(e=!0);if(e)break;else a++}0<this.options.minSpareCols-a&&this.insertColumn(this.options.minSpareCols-a)}},c=function(){};c.build=
318
- function(){var a=this;this.content=document.createElement(_$_c824[20]);this.content.classList.add(_$_c824[331]);this.content.addEventListener(_$_c824[332],function(f){if(G.limited.call(a)&&!a.options.pagination){var g=Math.abs(f.deltaX),h=Math.abs(f.deltaY);f.shiftKey||g>h?0>f.deltaX||0>f.deltaY?G.pageLeft.call(a,1,null,f):G.pageRight.call(a,1,null,f):0>f.deltaY?G.pageUp.call(a,1,null,f):G.pageDown.call(a,1,null,f)}});this.content.addEventListener(_$_c824[333],function(f){if(!a.edition)return f.preventDefault(),
319
- !1});this.table=document.createElement(_$_c824[334]);this.thead=document.createElement(_$_c824[335]);this.tbody=document.createElement(_$_c824[336]);this.tfoot=document.createElement(_$_c824[337]);this.headers=[];this.colgroup=[];this.colgroupContainer=document.createElement(_$_c824[338]);var d=document.createElement(_$_c824[169]);d.setAttribute(_$_c824[152],_$_c824[339]);this.colgroupContainer.appendChild(d);this.headerContainer=document.createElement(_$_c824[145]);d=document.createElement(_$_c824[147]);
320
- d.classList.add(_$_c824[340]);this.headerContainer.appendChild(d);this.thead.appendChild(this.headerContainer);this.table.classList.add(_$_c824[341]);this.table.setAttribute(_$_c824[342],_$_c824[99]);this.table.setAttribute(_$_c824[343],_$_c824[99]);this.table.setAttribute(_$_c824[344],_$_c824[345]);this.table.appendChild(this.colgroupContainer);this.table.appendChild(this.thead);this.table.appendChild(this.tbody);this.table.appendChild(this.tfoot);this.options.textOverflow||this.table.classList.add(_$_c824[346]);
321
- !1===this.options.selectLockedCells&&this.table.classList.add(_$_c824[347]);this.corner=document.createElement(_$_c824[20]);this.corner.className=_$_c824[348];this.corner.setAttribute(_$_c824[344],_$_c824[349]);this.corner.setAttribute(_$_c824[350],_$_c824[351]);0==this.options.selectionCopy&&(this.corner.style.display=_$_c824[40]);this.scrollX=U.build.call(a,_$_c824[45]);this.scrollY=U.build.call(a,_$_c824[352]);d=document.createElement(_$_c824[20]);d.appendChild(this.content);d.appendChild(this.scrollY);
322
- d.classList.add(_$_c824[353]);var e=document.createElement(_$_c824[20]);e.appendChild(d);e.appendChild(this.scrollX);e.classList.add(_$_c824[354]);this.content.appendChild(this.table);this.content.appendChild(this.corner);this.element.appendChild(e);1==this.options.tableOverflow&&(this.options.tableHeight||(this.options.tableHeight=document.body.offsetHeight-18),this.options.tableWidth||(this.options.tableWidth=document.body.offsetWidth-18),this.content.style.overflow=_$_c824[49],this.content.style.maxWidth=
323
- parseInt(this.options.tableWidth)+_$_c824[44],this.options.pagination||(this.content.style.maxHeight=parseInt(this.options.tableHeight)+_$_c824[44]));this.options.freezeColumns>this.options.columns.length&&console.error(_$_c824[355]);qa.build.call(this);oa.build.call(this);ua.build.call(this);Fa.build.call(this);ca.build.call(this);aa.build.call(this);G.call(this);da.onload.call(this);b.call(this)};c.references=function(a){var d=[],e=[],f=null,g=null,h=null,l=null;for(f=0;f<this.options.columns.length;f++)if(g=
324
- this.headers[f])h=g.getAttribute(_$_c824[42]),h!=f&&(g.setAttribute(_$_c824[42],f),g.getAttribute(_$_c824[166])||(g.innerHTML=E.getColumnName(f)));for(var m=0;m<this.rows.length;m++)g=this.rows[m],l=g.y,l!=m&&(g.y=m,d[l]=m,g.element&&(g.element.setAttribute(_$_c824[43],m),g.element.children[0].setAttribute(_$_c824[43],m),f=this.options.rows&&this.options.rows[l]&&this.options.rows[l].title?this.options.rows[l].title:m+1,g.element.children[0].innerHTML=f));var p=function(t,v){g=this.records[v][t];
325
- h=g.x;l=g.y;h!=t&&(g.x=t,g.element&&g.element.setAttribute(_$_c824[42],t));l!=v&&(g.y=v,g.element&&g.element.setAttribute(_$_c824[43],v));if(h!=t||l!=v){var u=E.getColumnNameFromCoords(h,l);t=E.getColumnNameFromCoords(t,v);e[u]=t}};if(a){m=function(t,v){t&&t[v]&&delete t[v]};var n=Object.keys(a);for(f=0;f<n.length;f++)m(this,n[f]),m(this.options.meta,n[f]),m(this.options.cells,n[f]),m(this.options.style,n[f]),m(this.options.comments,n[f])}for(m=0;m<this.rows.length;m++)for(f=0;f<this.options.columns.length;f++)p.call(this,
326
- f,m);k.call(this,_$_c824[356],d);k.call(this,_$_c824[288],e);k.call(this,_$_c824[289],e);k.call(this,_$_c824[100],e);k.call(this,_$_c824[290],e);k.call(this,_$_c824[272],e);this.options.mergeCells&&ca.build.call(this);W.updateAll.call(this,e,a);return e};c.update=function(a){a&&b.call(this);if(typeof this.parent.config.updateTable==_$_c824[85])for(var d=0;d<this.rows.length;d++)for(var e=0;e<this.options.columns.length;e++)a=this.records[d][e],this.parent.config.updateTable.call(this,this,a.element,
327
- e,d,M.call(this,e,d),a.r?a.r:a.v);U.call(this);aa.refresh.call(this)};return c}(),na=function(){var k={spreadsheet:function(b,c){var a={name:null,config:{},el:b,element:b,plugins:[],worksheets:[],history:[],historyIndex:-1,queue:[],ignoreEvents:!1,ignoreHistory:!1,ignorePersistence:!1};Da.spreadsheet.call(a,c);a.config.license&&(r.license=a.config.license);b.spreadsheet=a;b.jspreadsheet=b.jexcel=a.worksheets;r.spreadsheet.push(a);a.name||(a.name=jSuites.guid());k.bind(a.config.root?a.config.root:
328
- document);var d=a.config.tabs;typeof d!==_$_c824[84]&&(d={allowCreate:d?!0:!1,hideHeaders:d?!1:!0,allowChangePosition:a.config.allowMoveWorksheet?!0:!1});d.maxWidth||(d.maxWidth=b.offsetWidth-50+_$_c824[44]);d.animation=void 0==d.animation?!0:d.animation;d.onbeforecreate=function(){a.createWorksheet();return!1};d.onclick=function(f,g,h,l,m){0<=h&&a.openWorksheet(h)};d.onchangeposition=function(f,g,h){a.updateWorksheet(g,h)};jSuites.tabs(b,d);b.classList.add(_$_c824[357]);1==c.fullscreen&&b.classList.add(_$_c824[15]);
329
- var e=document.createElement(_$_c824[20]);a.toolbar=document.createElement(_$_c824[20]);a.toolbar.className=_$_c824[358];e.appendChild(a.toolbar);a.filter=da.build.call(a);e.appendChild(a.filter);a.helper=document.createElement(_$_c824[20]);a.helper.className=_$_c824[359];e.appendChild(a.helper);a.loading=document.createElement(_$_c824[20]);a.loading.classList.add(_$_c824[360]);e.appendChild(a.loading);e.appendChild(ba.build(a));e.appendChild(Ra(a));a.textarea=document.createElement(_$_c824[361]);
330
- a.textarea.className=_$_c824[362];a.textarea.tabIndex=_$_c824[363];e.appendChild(a.textarea);d.position===_$_c824[364]?b.insertBefore(e,b.children[0]):b.insertBefore(e,b.children[1]);b.appendChild(Ja.call(a,r.license));a.createWorksheet=ia.createWorksheet;a.deleteWorksheet=ia.deleteWorksheet;a.renameWorksheet=ia.renameWorksheet;a.updateWorksheet=ia.updateWorksheet;a.openWorksheet=ia.openWorksheet;a.moveWorksheet=ia.moveWorksheet;a.getWorksheet=ia.getWorksheet;a.getWorksheetActive=ia.getWorksheetActive;
331
- a.getWorksheetInstance=ia.getWorksheetInstance;a.getConfig=function(){var f=a.config;f.worksheets=[];for(var g=0;g<a.worksheets.length;g++)f.worksheets.push(a.worksheets[g].getConfig());return f};a.fullscreen=Ka;a.progress=La;a.undo=T.undo;a.redo=T.redo;a.setToolbar=fa[_$_c824[11]];a.getToolbar=fa[_$_c824[51]];a.showToolbar=fa.show;a.hideToolbar=fa.hide;a.tools=e;1!==a.edition&&(b=Object.keys(a.config.definedNames))&&b.length&&(a.config.definedNames={},console.log(_$_c824[365]));c.plugins&&pa.call(a,
332
- c.plugins);a.setPlugins=function(f){pa.call(a,f)};b=Object.keys(r.extensions);if(b.length)for(d=0;d<b.length;d++)if(typeof r.extensions[b[d]].oninit==_$_c824[85])r.extensions[b[d]].oninit(a,c);return a},worksheet:function(b,c){var a={};b.worksheets.push(a);a.parent=b;Da(a);Ta(a);za(a);ha(a);ba(a);Fa(a);Va(a);ca(a);Qa(a);Wa(a);ea(a);W(a);N(a);Aa(a);Xa(a);Za(a);Ya(a);Ca(a);aa(a);oa(a);qa(a);da(a);fa(a);ta(a);ab(a);bb(a);ua(a);ia(a);ka(a);Ua(a);$a(a);Ia(a);Ha(a);Da.worksheet.call(a,c);!r.license&&a.options.license&&
333
- (r.license=a.options.license);b.element.jexcel=b.element.jexcel?b.worksheets:a;pa.execute.call(a.parent,_$_c824[366],[a]);a.onload=function(){this.options.worksheetName||(this.options.worksheetName=_$_c824[367]+ia.nextName());var d=this.options.worksheetName;I(d)&&console.log(_$_c824[368]+d+_$_c824[369]);I(d,a);this.element=b.element.tabs.appendElement(this.options.worksheetName,function(e,f){a.options.worksheetState===_$_c824[49]&&(f.style.display=_$_c824[40])});this.element.classList.add(_$_c824[370]);
334
- this.element.jexcel=this;X.build.call(this);pa.execute.call(this.parent,_$_c824[371],[this]);this.options.data&&500<this.options.data.length&&!G.limited.call(this)&&!this.options.pagination&&console.error(_$_c824[372])};return a},row:function(b,c){this.rows[b]||(this.rows[b]={element:null,y:b});c&&(this.rows[b].id=c,ta[_$_c824[11]].call(this,c));this.options.rows&&this.options.rows[b]&&this.options.rows[b].height&&(this.rows[b].height=this.options.rows[b].height);this.records[b]||(this.records[b]=
335
- []);this.options.data[b]||(this.options.data[b]=this.dataType?{}:[]);for(c=0;c<this.options.columns.length;c++)k.cell.call(this,c,b)},cell:function(b,c,a){typeof a==_$_c824[13]&&(a=M.call(this,b,c),null===a||void 0===a)&&(a=_$_c824[3],M.call(this,b,c,a));this.records[c][b]||(this.records[c][b]={element:null,x:b,y:c,v:a})},bind:function(b){for(var c=Object.keys(Ba),a=0;a<c.length;a++)(c[a]==_$_c824[373]?window:b).addEventListener(c[a],Ba[c[a]],c[a]==_$_c824[374]||c[a]==_$_c824[375]||c[a]==_$_c824[376]?
336
- {passive:!1}:{})},unbind:function(b){for(var c=Object.keys(Ba),a=0;a<c.length;a++)(c[a]==_$_c824[373]?window:b).removeEventListener(c[a],Ba[c[a]])}};return k}(),ab=function(){var k=function(b){b.getWidth=k[_$_c824[51]];b.setWidth=k[_$_c824[11]]};k[_$_c824[51]]=function(b){var c=this.options.columns;if(typeof b===_$_c824[13]){b=[];for(var a=0;a<c.length;a++)b.push(c[a].width)}else b=c[b].width;return b};k[_$_c824[11]]=function(b,c,a){if(!Q.call(this.parent,this))return!1;if(c){if(Array.isArray(b)){a||
337
- (a=[]);for(var d=0;d<b.length;d++){a[d]||(a[d]=this.options.columns[b[d]].width);var e=Array.isArray(c)&&c[d]?c[d]:c;this.options.columns[b[d]].width=e;this.colgroup[b[d]]&&this.colgroup[b[d]].setAttribute(_$_c824[152],e)}}else a||(a=this.options.columns[b].width),this.options.columns[b].width=c,this.colgroup[b]&&this.colgroup[b].setAttribute(_$_c824[152],c);this.refreshBorders();T.call(this.parent,{worksheet:this,action:_$_c824[72],column:b,oldValue:a,newValue:c});J.call(this,_$_c824[72],{column:b,
338
- width:c,oldWidth:a});F.call(this.parent,_$_c824[377],this,b,c,a)}G.refresh.call(this)};return k}(),bb=function(){var k=function(c){c.getHeight=k[_$_c824[51]];c.setHeight=k[_$_c824[11]]};k[_$_c824[51]]=function(c){if(c)c=this.rows[c].element.style.height;else{c=[];for(var a=0;a<this.rows.length;a++){var d=this.rows[a].element.style.height;d&&(c[a]=d)}}return c};var b=function(c,a){a=parseInt(a);var d=this.rows[c].height?this.rows[c].height:this.rows[c].element.offsetHeight||this.options.defaultRowHeight;
339
- this.rows[c].element.style.height=a+_$_c824[44];this.options.rows[c]||(this.options.rows[c]={});this.options.rows[c].height=a+_$_c824[44];this.rows[c].height=a;return d};k[_$_c824[11]]=function(c,a,d){if(!Q.call(this.parent,this))return!1;var e,f=typeof d==_$_c824[13]?!0:!1;if(a){if(Array.isArray(c))for(!0===f&&(d=[]),e=0;e<c.length;e++){var g=Array.isArray(a)&&a[e]?a[e]:a;b.call(this,c[e],g);1==f&&d.push(f)}else e=b.call(this,c,a),1==f&&(d=e);this.refreshBorders();T.call(this.parent,{worksheet:this,
340
- action:_$_c824[73],row:c,oldValue:d,newValue:a});J.call(this,_$_c824[73],{row:c,height:a,oldHeight:d});F.call(this.parent,_$_c824[378],this,c,a,d)}G.refresh.call(this)};return k}(),da=function(){var k=function(g){var h=e[g];g=a[e[g]];if(!g.element){g.element=document.createElement(_$_c824[379]);g.element.innerHTML=g.value;var l=document.createElement(_$_c824[226]);l.type=_$_c824[259];l.value=h;l.o=g;g.element.insertBefore(l,g.element.firstChild)}g.element.firstChild.checked=g.selected;return g.element},
341
- b=null,c=null,a=[],d=0,e=null,f=function(g){g.setFilter=f[_$_c824[11]];g.getFilter=f[_$_c824[51]];g.openFilter=f.open;g.closeFilter=f.close;g.resetFilters=f.reset;g.showFilter=f.show;g.hideFilter=f.hide};f.isVisible=function(){return c};f[_$_c824[11]]=function(g,h){var l=this.headers[g];g=this.options.columns[g];Array.isArray(h)&&0<h.length?(l&&l.classList.add(_$_c824[380]),g.filters=h):(l&&l.classList.remove(_$_c824[380]),g.filters=null);f.update.call(this)};f[_$_c824[51]]=function(g){if(g)return this.options.columns[g].filters||
342
- null;g={};for(var h=0;h<this.options.columns.length;h++)g[h]=this.options.columns[h].filters||null;return g};f.open=function(g){b=parseInt(g);if(this.headers[b].classList.contains(_$_c824[168])){c=!0;var h=this.parent.element.getBoundingClientRect(),l=this.headers[b].getBoundingClientRect();g=l.left-h.left;var m=l.top-h.top+l.height;l=this.parent.filter;h=h.left+h.width;l.style.display=_$_c824[16];g+l.offsetWidth>h&&(g=h-(l.offsetWidth+18));l.style.top=m+_$_c824[44];l.style.left=g+_$_c824[44];l.children[0].focus();
343
- g=l.children[1].selectAll;l.children[1].textContent=_$_c824[3];l.children[1].appendChild(g);g.children[0].checked=this.options.columns[b].filters?!1:!0;g=qa.execute.call(this,null,b);g=E.invert(g);l=[];for(h=0;h<this.rows.length;h++)if(g[h]){m=_$_c824[3]+M.call(this,b,h);var p=_$_c824[3]+ea.processed.call(this,b,h,!0);m.substr(0,1)==_$_c824[12]&&(m=p);l.push([m,p])}l.sort(function(n,t){return n[0]>t[0]?1:n[0]<t[0]?-1:0});a=[];for(h=0;h<l.length;h++)a[l[h][0]]={value:l[h][1],element:null};(g=F.call(this.parent,
344
- _$_c824[382],this,b,a))&&(a=g);void 0!==a[_$_c824[3]]&&(delete a[_$_c824[3]],a[_$_c824[3]]={value:_$_c824[214]+B(_$_c824[383])+_$_c824[239],element:null});f.search.call(this,_$_c824[3])}else console.log(_$_c824[381])};f.close=function(g){if(g){g=this.parent.filter.children[1];if(1==g.selectAll.firstChild.checked&&e.length==Object.keys(a).length)g=null;else{g=1==g.currentSelection.firstChild.checked?this.options.columns[b].filters||[]:[];for(var h=0;h<e.length;h++)a[e[h]].selected&&g.push(e[h])}f[_$_c824[11]].call(this,
345
- b,g)}this.parent.filter.style.display=_$_c824[3];this.parent.filter.children[0].value=_$_c824[3];b=null;c=!1;a=null;d=0;e=null};f.reset=function(g){f.updateDOM.call(this,g,!1);va.reset.call(this);f.update.call(this)};f.execute=function(g){for(var h=this.options.columns,l=[],m=0;m<this.options.data.length;m++){for(var p=!0,n=0;n<h.length;n++)if(h[n].filters&&g!==n){var t=_$_c824[3]+M.call(this,n,m),v=_$_c824[3]+this.getLabelFromCoords(n,m,!0);-1==h[n].filters.indexOf(t)&&-1==h[n].filters.indexOf(v)&&
346
- (p=!1)}p&&l.push(m)}return l};f.update=function(){va.reset.call(this);this.resetSelection();this.resetBorders();var g=qa.execute.call(this,null);if(typeof this.parent.config.onbeforefilter==_$_c824[85]){var h=f[_$_c824[51]].call(this),l=F.call(this.parent,_$_c824[384],this,h,g);if(l)g=l;else if(!1===l)return!1}this.pageNumber=0;g&&g.length<this.rows.length&&va[_$_c824[11]].call(this,g);G.resetY.call(this);aa.refresh.call(this);F.call(this.parent,_$_c824[385],this,h,g)};f.show=function(g){f.updateDOM.call(this,
347
- g,!0)};f.hide=function(g){f.updateDOM.call(this,g,!1,!0);f.update.call(this)};f.search=function(g){for(var h=this.parent.filter.children[1];h.children[1];)h.removeChild(h.lastChild);h.currentSelection.firstChild.checked=!1;if(g){e=[];g=new RegExp(g,_$_c824[386]);for(var l=Object.keys(a),m=0;m<l.length;m++)(_$_c824[3]+l[m]).match(g)||(_$_c824[3]+a[l[m]]).match(g)?(e.push(l[m]),a[l[m]].selected=!0):a[l[m]].selected=!1;h.firstChild.checked=!0;this.options.columns[b].filters&&h.appendChild(h.currentSelection)}else{e=
348
- Object.keys(a);if(g=this.options.columns[b].filters)for(m=0;m<e.length;m++)a[e[m]].selected=!1,0<=g.indexOf(e[m])&&(a[e[m]].selected=!0);else for(m=0;m<e.length;m++)a[e[m]].selected=!0;h.firstChild.checked=g?!1:!0}for(m=d=0;m<e.length;m++)200>m&&(g=d++,h.appendChild(k(g)))};f.build=function(){var g=document.createElement(_$_c824[20]);g.className=_$_c824[387];g.onclick=function(p){p.target.tagName==_$_c824[388]&&p.target.o&&(p.target.o.selected=p.target.checked);p=!0;for(var n=1;n<this.children.length;n++)this.children[n].children[0].checked||
349
- (p=!1);this.children[0].children[0].checked=p};var h=document.createElement(_$_c824[226]);h.type=_$_c824[55];h.placeholder=B(_$_c824[389]);h.className=_$_c824[390];var l=document.createElement(_$_c824[226]);l.type=_$_c824[391];l.value=_$_c824[392];l.className=_$_c824[393];var m=document.createElement(_$_c824[20]);m.className=_$_c824[394];m.appendChild(h);m.appendChild(g);m.appendChild(l);g.currentSelection=document.createElement(_$_c824[379]);g.currentSelection.innerHTML=_$_c824[395]+B(_$_c824[396]);
350
- g.selectAll=document.createElement(_$_c824[379]);g.selectAll.innerHTML=_$_c824[397]+B(_$_c824[398])+_$_c824[239];g.selectAll.onclick=function(){for(var p=this.children[0].checked,n=1;n<this.parentNode.children.length;n++)this.parentNode.children[n].children[0].checked=p;if(1==p)for(n=0;n<e.length;n++)a[e[n]].selected=!0;else for(p=Object.keys(a),n=0;n<p.length;n++)a[p[n]].selected=!1};jSuites.lazyLoading(g,{loadDown:function(p){for(p=0;d<e.length-1&&10>p;){var n=d++;g.appendChild(k(n));p++}}});return m};
351
- f.updateDOM=function(g,h,l){var m=this.headers,p=function(n){1==h?m[n].classList.add(_$_c824[168]):(this.options.columns[n].filters=null,m[n].classList.remove(_$_c824[380]),1==l&&m[n].classList.remove(_$_c824[168]))};if(g)p.call(this,g);else for(g=0;g<m.length;g++)p.call(this,g)};f.onload=function(){var g,h=!1;if(g=this.options.columns)for(var l=0;l<g.length;l++)Array.isArray(g[l].filters)&&0<g[l].filters.length&&this.headers[l]&&(this.headers[l].classList.add(_$_c824[380]),h=!0);1==h&&f.update.call(this)};
352
- return f}(),va=function(){var k={};k[_$_c824[11]]=function(b){for(var c=0;c<b.length;c++)this.rows[b[c]].results=!0;this.results=b};k.reset=function(){for(var b=0;b<this.rows.length;b++)!0===this.rows[b].results&&delete this.rows[b].results;this.results=null};k.refresh=function(){for(var b=[],c=0;c<this.rows.length;c++)!0===this.rows[c].results&&b.push(c);return b};return k}(),qa=function(){var k=function(a){var d=document.createElement(_$_c824[20]);if(0<a.options.pagination&&a.options.paginationOptions&&
353
- 0<a.options.paginationOptions.length){a.paginationDropdown=document.createElement(_$_c824[399]);a.paginationDropdown.classList.add(_$_c824[400]);a.paginationDropdown.onchange=function(){a.options.pagination=parseInt(this.value);a.page(0)};for(var e=0;e<a.options.paginationOptions.length;e++){var f=document.createElement(_$_c824[401]);f.value=a.options.paginationOptions[e];f.innerHTML=a.options.paginationOptions[e];a.paginationDropdown.appendChild(f)}a.paginationDropdown.value=a.options.pagination;
354
- d.appendChild(document.createTextNode(B(_$_c824[402])));d.appendChild(a.paginationDropdown);d.appendChild(document.createTextNode(B(_$_c824[403])))}return d},b=function(a,d){var e=this.merged.rows;if(e[d]){for(;0<d&&e[d-1];)d--;for(;e[d];)a.push(d++)}else a.push(d)},c=function(a){a.search=c.update;a.resetSearch=c.reset;a.updateSearch=c.refresh;a.showSearch=c.show;a.hideSearch=c.hide};c.execute=function(a,d){null===a?a=this.searchInput.value||_$_c824[3]:a!==this.searchInput.value&&(this.searchInput.value=
355
- a);this.pageNumber=0;var e=[],f=null;d=da.execute.call(this,d);if(a)try{a=new RegExp(a,_$_c824[386]);for(var g=0;g<this.rows.length;g++){f=!1;if(!d||0<=d.indexOf(g))for(var h=0;h<this.options.columns.length;h++){var l=_$_c824[3]+M.call(this,h,g),m=_$_c824[3]+this.getLabelFromCoords(h,g);if(l.match(a)||m.match(a))f=!0}1==f&&b.call(this,e,g)}}catch(p){}else e=d;if(e.length){for(g=0;g<this.rows.length;g++)!0===this.rows[g].results&&e.push(g);e.sort(function(p,n){return p-n})}return e};c.update=function(a){va.reset.call(this);
356
- this.resetSelection();this.resetBorders();var d=c.execute.call(this,a);if(typeof this.parent.config.onbeforesearch==_$_c824[85]){var e=F.call(this.parent,_$_c824[405],this,a,d);if(e)d=e;else if(!1===e)return!1}this.pageNumber=0;d&&d.length<this.rows.length&&va[_$_c824[11]].call(this,d);G.resetY.call(this);aa.refresh.call(this);F.call(this.parent,_$_c824[406],this,a,d)};c.refresh=function(){G.resetY.call(this);aa.refresh.call(this)};c.reset=function(){this.searchInput.value=_$_c824[3];va.reset.call(this);
357
- G.resetY.call(this);aa.refresh.call(this)};c.show=function(){this.options.search=!0;this.searchContainer.style.display=_$_c824[3]};c.hide=function(){this.options.search=!1;this.searchContainer.style.display=_$_c824[40]};c.build=function(){this.searchContainer=document.createElement(_$_c824[20]);this.searchContainer.classList.add(_$_c824[407]);this.searchContainer.appendChild(k(this));var a=this.searchContainer,d=a.appendChild,e=document.createElement(_$_c824[20]);e.innerHTML=B(_$_c824[389])+_$_c824[115];
358
- this.searchInput=document.createElement(_$_c824[226]);this.searchInput.classList.add(_$_c824[404]);e.appendChild(this.searchInput);d.call(a,e);0==this.options.search&&(this.searchContainer.style.display=_$_c824[40]);this.element.insertBefore(this.searchContainer,this.element.firstChild)};return c}(),Ra=function(){var k=function(b){b.contextmenu=document.createElement(_$_c824[20]);b.contextmenu.className=_$_c824[408];jSuites.contextmenu(b.contextmenu,{onclick:function(c,a,d){c.close()}});return b.contextmenu};
359
- k.open=function(b,c){var a=b.target.getAttribute(_$_c824[42]),d=b.target.getAttribute(_$_c824[43]),e=k[_$_c824[51]](this,a,d,b,c[0],c[1],c[2]);if(typeof this.parent.config.contextMenu==_$_c824[85]){var f=this.parent.config.contextMenu(this,a,d,b,e,c[0],c[1],c[2]);if(f)e=f;else if(!1===f)return!1}b.preventDefault();f=pa.execute.call(this.parent,_$_c824[86],[this,a,d,b,e,c[0],c[1],c[2]]);e=f[4];this.parent.contextmenu.contextmenu.open(b,e)};k[_$_c824[51]]=function(b,c,a,d,e,f,g){var h=[],l=b.parent.config,
360
- m=-1!=navigator.userAgent.indexOf(_$_c824[409])?_$_c824[410]:_$_c824[411];e==_$_c824[412]&&(1==l.allowRenameWorksheet&&h.push({title:B(_$_c824[413]),onclick:function(){var n=prompt(B(_$_c824[413]),d.target.innerText);n&&b.parent.renameWorksheet(f,n)}}),1==l.allowDeleteWorksheet&&h.push({title:B(_$_c824[414]),onclick:function(){confirm(B(_$_c824[415]),d.target.innerText)&&b.parent.deleteWorksheet(f)}}),h.push({type:_$_c824[416]}));e==_$_c824[417]&&(h.push({title:B(_$_c824[418]),onclick:function(){var n=
361
- prompt(B(_$_c824[418]),d.target.innerText);b.setNestedCell(f,g,{title:n})}}),h.push({type:_$_c824[416]}));if(e==_$_c824[419]||e==_$_c824[420]||e==_$_c824[421]||e==_$_c824[417])h.push({title:B(_$_c824[422]),icon:_$_c824[423],shortcut:m+_$_c824[424],onclick:function(){b.cut()}}),h.push({title:B(_$_c824[425]),icon:_$_c824[426],shortcut:m+_$_c824[427],onclick:function(){b.copy()}}),navigator&&navigator.clipboard&&navigator.clipboard.readText&&h.push({title:B(_$_c824[428]),icon:_$_c824[429],shortcut:m+
362
- _$_c824[430],onclick:function(){b.selectedCell&&navigator.clipboard.readText().then(function(n){n&&b.paste(b.selectedCell[0],b.selectedCell[1],n)})}}),h.push({type:_$_c824[416]});e==_$_c824[419]&&(1==b.options.allowInsertColumn&&h.push({title:B(_$_c824[431]),onclick:function(){b.insertColumn(1,parseInt(f),1)}}),1==b.options.allowInsertColumn&&h.push({title:B(_$_c824[432]),onclick:function(){b.insertColumn(1,parseInt(f),0)}}),1==b.options.allowDeleteColumn&&h.push({title:B(_$_c824[433]),onclick:function(){b.deleteColumn(b.getSelectedColumns().length?
363
- void 0:parseInt(c))}}),1==b.options.allowRenameColumn&&h.push({title:B(_$_c824[434]),onclick:function(){b.setHeader(f)}}),b.options.data.length||(h.push({type:_$_c824[416]}),h.push({title:B(_$_c824[435]),onclick:function(){b.insertRow(0)}})),1==b.options.columnSorting&&(h.push({type:_$_c824[416]}),h.push({title:B(_$_c824[436]),onclick:function(){b.orderBy(f,0)}}),h.push({title:B(_$_c824[437]),onclick:function(){b.orderBy(f,1)}}),h.push({type:_$_c824[416]})));if(e==_$_c824[421]||e==_$_c824[420])1==
364
- b.options.allowInsertRow&&(h.push({title:B(_$_c824[438]),onclick:function(){b.insertRow(1,parseInt(a),1)}}),h.push({title:B(_$_c824[439]),onclick:function(){b.insertRow(1,parseInt(a))}})),1==b.options.allowDeleteRow&&h.push({title:B(_$_c824[440]),onclick:function(){b.deleteRow(b.getSelectedRows().length?void 0:parseInt(a))}}),h.push({type:_$_c824[416]});if(e==_$_c824[421]&&1==b.options.allowComments){var p=b.records[g][f].element.getAttribute(_$_c824[274])||_$_c824[3];h.push({title:p?B(_$_c824[441]):
365
- B(_$_c824[442]),icon:_$_c824[443],onclick:function(){var n=E.getColumnNameFromCoords(f,g),t=prompt(B(_$_c824[444]),p);t&&b.setComments(n,t)}});p&&h.push({title:B(_$_c824[445]),onclick:function(){var n=E.getColumnNameFromCoords(f,g);b.setComments(n,_$_c824[3])}});h.push({type:_$_c824[416]})}l.allowExport&&h.push({title:B(_$_c824[446]),icon:_$_c824[447],shortcut:m+_$_c824[448],onclick:function(){b.download()}});l.about&&h.push({title:B(_$_c824[449]),icon:_$_c824[450],onclick:function(){!0===l.about?
366
- alert(K().print()):alert(l.about)}});return h};return k}(),fa=function(){var k=function(b){b.showToolbar=function(){k.show.call(b.parent)};b.hideToolbar=function(){k.hide.call(b.parent)};b.refreshToolbar=function(){k.update.call(b.parent,b)}};k[_$_c824[11]]=function(b){this.toolbar.innerHTML=_$_c824[3];this.config.toolbar=k[_$_c824[51]].call(this,b);k.show.call(this)};k[_$_c824[51]]=function(b){b||(b=this.config.toolbar);b?Array.isArray(b)?b={items:b}:typeof b===_$_c824[85]&&(b=b({items:k.getDefault()})):
367
- b={};typeof b!==_$_c824[84]&&(b={});b.items||(b.items=k.getDefault());typeof b.responsive==_$_c824[13]&&(b.responsive=!0,b.bottom=!1,b.maxWidth=this.element.offsetWidth);return b};k.show=function(){this.toolbar.innerHTML||k.build.call(this);this.toolbar.style.display=_$_c824[3];this.element.classList.add(_$_c824[451])};k.hide=function(){this.toolbar.style.display=_$_c824[40];this.element.classList.remove(_$_c824[451])};k.update=function(b,c){if(c=this.toolbarInstance)if(c.update(b),c.options.responsive){var a=
368
- parseInt(b.content.style.maxWidth);if(!a||this.config.fullscreen)a=b.element.offsetWidth;c.options.maxWidth=a;c.refresh()}};k.build=function(){for(var b=k[_$_c824[51]].call(this),c=0;c<b.items.length;c++)if(b.items[c].type==_$_c824[399]){if(!b.items[c].options&&b.items[c].v){b.items[c].options=[];for(var a=0;a<b.items[c].v.length;a++)b.items[c].options.push(b.items[c].v[a]);b.items[c].k&&(b.items[c].onchange=function(d,e,f,g){r.current.setStyle(r.current.getSelected(!1,!0),f.k,g)})}}else b.items[c].type==
369
- _$_c824[264]?(b.items[c].type=_$_c824[452],b.items[c].onclick=function(d,e,f){if(!f.color){var g=null;jSuites.color(f,{onchange:function(h,l){(g=r.current.getSelected(!1,!0))&&r.current.setStyle(g,f.k,l)},onopen:function(h){var l;r.current.cursor?(l=r.current.cursor.style[f.k])?h.color.select(h.color.toHex(l)):h.color.select(_$_c824[3]):h.color.select(_$_c824[3])}});f.color.open()}}):!b.items[c].onclick&&b.items[c].k&&(b.items[c].onclick=function(){r.current.setStyle(r.current.getSelected(!1,!0),
370
- this.k,this.v)});(c=pa.execute.call(this,_$_c824[87],[b]))&&(b=c[0]);this.toolbarInstance=jSuites.toolbar(this.toolbar,b);this.toolbarInstance.application=this;b=this.element.tabs.getActive();this.toolbarInstance.update(this.worksheets[b])};k.getDefault=function(){return[{content:_$_c824[453],onclick:function(){r.current&&r.current.undo()}},{content:_$_c824[454],onclick:function(){r.current&&r.current.redo()}},{content:_$_c824[447],onclick:function(){r.current&&r.current.download()}},{type:_$_c824[455]},
371
- {type:_$_c824[399],width:_$_c824[456],options:[_$_c824[457],_$_c824[458],_$_c824[459]],render:function(b){return _$_c824[460]+b+_$_c824[233]+b+_$_c824[461]},onchange:function(b,c,a,d){r.current&&r.current.setStyle(r.current.getSelected(!1,!0),_$_c824[462],d)}},{type:_$_c824[399],width:_$_c824[463],content:_$_c824[464],options:[_$_c824[465],_$_c824[466],_$_c824[467],_$_c824[468],_$_c824[469]],render:function(b){return _$_c824[470]+b+_$_c824[233]+b+_$_c824[461]},onchange:function(b,c,a,d){r.current&&
372
- r.current.setStyle(r.current.getSelected(!1,!0),_$_c824[471],d)}},{type:_$_c824[399],options:[_$_c824[472],_$_c824[473],_$_c824[474],_$_c824[475]],render:function(b){return _$_c824[476]+b+_$_c824[477]},onchange:function(b,c,a,d){r.current&&r.current.setStyle(r.current.getSelected(!1,!0),_$_c824[478],d.split(_$_c824[479])[2])}},{type:_$_c824[452],content:_$_c824[480],k:_$_c824[481],v:_$_c824[482]},{type:_$_c824[264],content:_$_c824[483],k:_$_c824[264]},{type:_$_c824[264],content:_$_c824[484],k:_$_c824[485]},
373
- {type:_$_c824[399],data:[_$_c824[486],_$_c824[487],_$_c824[488],_$_c824[489],_$_c824[490],_$_c824[491],_$_c824[492],_$_c824[493],_$_c824[494],_$_c824[495]],columns:5,render:function(b){return _$_c824[476]+b+_$_c824[477]},right:!0,onchange:function(b,c,a,d,e){if(b=r.current.getHighlighted()){a=c.thickness||1;c=c.color||_$_c824[496];e={};for(var f=b[0],g=b[1],h=b[2],l=b[3],m=b[1];m<=b[3];m++)for(var p=b[0];p<=b[2];p++){var n=E.getColumnNameFromCoords(p,m);e[n]||(e[n]=_$_c824[3]);e[n]=d!=_$_c824[491]&&
374
- d!=_$_c824[487]||p!=f?(d==_$_c824[488]||d==_$_c824[490])&&p>f?e[n]+(_$_c824[497]+a+_$_c824[498]+c+_$_c824[305]):d==_$_c824[486]?e[n]+(_$_c824[497]+a+_$_c824[498]+c+_$_c824[305]):e[n]+_$_c824[499]:e[n]+(_$_c824[497]+a+_$_c824[498]+c+_$_c824[305]);e[n]=d!=_$_c824[486]&&d!=_$_c824[493]&&d!=_$_c824[487]||p!=h?e[n]+_$_c824[501]:e[n]+(_$_c824[500]+a+_$_c824[498]+c+_$_c824[305]);e[n]=d!=_$_c824[492]&&d!=_$_c824[487]||m!=g?(d==_$_c824[488]||d==_$_c824[489])&&m>g?e[n]+(_$_c824[502]+a+_$_c824[498]+c+_$_c824[305]):
375
- d==_$_c824[486]?e[n]+(_$_c824[502]+a+_$_c824[498]+c+_$_c824[305]):e[n]+_$_c824[503]:e[n]+(_$_c824[502]+a+_$_c824[498]+c+_$_c824[305]);e[n]=d!=_$_c824[486]&&d!=_$_c824[494]&&d!=_$_c824[487]||m!=l?e[n]+_$_c824[505]:e[n]+(_$_c824[504]+a+_$_c824[498]+c+_$_c824[305])}Object.keys(e)&&r.current.setStyle(e,null,null,!0)}},onload:function(b,c){var a=document.createElement(_$_c824[20]),d=document.createElement(_$_c824[20]);a.appendChild(d);var e=jSuites.color(d,{closeOnChange:!1,onchange:function(f,g){f.parentNode.children[1].style.color=
376
- g;c.color=g}});d=document.createElement(_$_c824[452]);d.classList.add(_$_c824[506]);d.innerHTML=_$_c824[507];d.onclick=function(){e.open()};a.appendChild(d);b.children[1].appendChild(a);d=document.createElement(_$_c824[20]);jSuites.picker(d,{type:_$_c824[399],data:[1,2,3,4,5],render:function(f){return _$_c824[508]+f+_$_c824[509]},onchange:function(f,g,h,l){c.thickness=l},width:_$_c824[510]});b.children[1].appendChild(d);d=document.createElement(_$_c824[20]);d.style.flex=_$_c824[511];b.children[1].appendChild(d)}},
377
- {type:_$_c824[455]},{content:_$_c824[15],onclick:function(b,c,a){a.children[0].innerText==_$_c824[15]?(r.current.fullscreen(!0),a.children[0].innerText=_$_c824[512]):(r.current.fullscreen(!1),a.children[0].innerText=_$_c824[15])},tooltip:_$_c824[513],updateState:function(b,c,a,d){a.children[0].innerText=1==d.parent.config.fullscreen?_$_c824[512]:_$_c824[15]}},{content:_$_c824[514],onclick:function(b,c,a){a.children[0].innerText==_$_c824[514]?(qa.show.call(r.current),a.children[0].innerText=_$_c824[515]):
378
- (qa.hide.call(r.current),a.children[0].innerText=_$_c824[514])},tooltip:_$_c824[516],updateState:function(b,c,a,d){a.children[0].innerText=1==d.options.search?_$_c824[515]:_$_c824[514]}}]};return k}(),ia=function(){var k=function(b){b.createWorksheet=function(c){return b.parent.createWorksheet(c)};b.deleteWorksheet=function(c){return b.parent.deleteWorksheet(c)};b.renameWorksheet=function(c,a){return b.parent.renameWorksheet(c,a)};b.moveWorksheet=function(c,a){return b.parent.moveWorksheet(c,a)};
379
- b.openWorksheet=function(){return b.parent.openWorksheet(b.parent.getWorksheet(b))};b.getWorksheet=function(c){return b.parent.getWorksheet(c)};b.getWorksheetActive=function(){return b.parent.getWorksheetActive()};b.getWorksheetName=function(){return b.options.worksheetName.toUpperCase()}};k.nextName=function(){var b=1,c,a=r.spreadsheet;if(a.length)for(var d=0;d<a.length;d++){var e=a[d].worksheets;if(e.length)for(var f=0;f<e.length;f++)e[f].options.worksheetName&&(c=e[f].options.worksheetName.match(/(\d+)/))&&
380
- (c=parseInt(c[0])+1,c>b&&(b=c))}return b};k.createWorksheet=function(b){if(!Q.call(this))return!1;b||(b={});var c=this.worksheets.length,a=F.call(this,_$_c824[517],b,c);if(typeof a===_$_c824[84])b=a;else if(!1===a)return!1;b.data||b.minDimensions||(b.minDimensions=[8,8]);b.worksheetId||(b.worksheetId=jSuites.guid().substring(0,8));b.worksheetName||(b.worksheetName=_$_c824[367]+k.nextName());if(I(b.worksheetName))jSuites.notification({error:_$_c824[511],message:_$_c824[518]});else return a=na.worksheet(this,
381
- b),a.onload(),r.current&&r.current.resetSelection(),r.current=a,J.call(a,_$_c824[519],[b]),F.call(this,_$_c824[520],a,b,c),a};k.deleteWorksheet=function(b){var c=this.worksheets[b];if(!Q.call(this,c))return!1;I(c.options.worksheetName,null);this.element.tabs.deleteElement(b);this.worksheets.splice(b,1);J.call(c,_$_c824[521],[b]);F.call(this,_$_c824[522],c,b)};k.renameWorksheet=function(b,c){var a=this.worksheets[b];if(!Q.call(this,a))return!1;var d=a.options.worksheetName;if(d.toLowerCase()==c.toLowerCase())return!1;
382
- c=c.replace(/[^0-9A-Za-z_\s^]+/gi,_$_c824[3]);Number(c)==c&&(c=_$_c824[367]+Number(c));I(c)?alert(_$_c824[523]):(I(d,null),this.element.tabs.rename(b,c),a.options.worksheetName=c,I(c,a),T.call(this,{worksheet:a,action:_$_c824[80],index:b,oldValue:d,newValue:c}),J.call(a,_$_c824[80],{worksheet:b,newValue:c}),Ia.updateWorksheetName.call(a,d,c),W.updateWorksheetNames.call(a,d,c),F.call(this,_$_c824[524],a,b,c,d))};k.updateWorksheet=function(b,c){var a=this.worksheets;if(!Q.call(this))return!1;this.worksheets.splice(c,
383
- 0,a.splice(b,1)[0]);T.call(this,{worksheet:a[c],action:_$_c824[81],f:b,t:c});J.call(a[c],_$_c824[81],{f:b,t:c});F.call(this,_$_c824[525],a[c],b,c)};k.moveWorksheet=function(b,c){this.element.tabs.move(b,c)};k.openWorksheet=function(b){var c=this.worksheets[b];!c||r.current&&r.current==c||(this.element.tabs.getActive()!=b?this.element.tabs.open(b):this.element.tabs.setBorder(b),r.current&&r.current.resetSelection(),r.current=c,r.current.refreshBorders(),U.call(r.current),k.state.call(this,b),fa.update.call(this,
384
- r.current),F.call(this,_$_c824[526],c,b))};k.getWorksheet=function(b){if(b&&typeof b==_$_c824[84]){if(b=this.worksheets.indexOf(b),0<=b)return b}else for(var c=0;c<this.worksheets.length;c++)if(b===this.worksheets[c].options.worksheetId)return c;return!1};k.getWorksheetActive=function(){return this.element.tabs.getActive()};k.getWorksheetInstance=function(b){return b===_$_c824[3]||typeof b==_$_c824[17]?(b=k.getWorksheet.call(this,b),!1===b?!1:this.worksheets[b]):this.worksheets[b]};k.state=function(b){try{if(typeof localStorage!==
385
- _$_c824[13]){var c=this.config.cloud?this.config.cloud:this.element.id;if(c)if(typeof b!==_$_c824[13])localStorage.setItem(_$_c824[527]+c,b);else{var a=parseInt(localStorage.getItem(_$_c824[527]+c));k.openWorksheet.call(this,a)}}}catch(d){}};return k}(),E=function(){var k={getCaretIndex:function(b){var c=0,a=(this.config.root?this.config.root:window).getSelection();a&&0!==a.rangeCount&&(c=a.getRangeAt(0),a=c.cloneRange(),a.selectNodeContents(b),a.setEnd(c.endContainer,c.endOffset),c=a.toString().length);
386
- return c},invert:function(b){for(var c=[],a=Object.keys(b),d=0;d<a.length;d++)c[b[a[d]]]=a[d];return c},getColumnName:function(b){var c=_$_c824[3];701<b?(c+=String.fromCharCode(64+parseInt(b/676)),c+=String.fromCharCode(64+parseInt(b%676/26))):25<b&&(c+=String.fromCharCode(64+parseInt(b/26)));return c+=String.fromCharCode(65+b%26)},getColumnNameFromCoords:function(b,c){return k.getColumnName(parseInt(b))+(parseInt(c)+1)},getCoordsFromColumnName:function(b){var c=/^[a-zA-Z]+/.exec(b);if(c){for(var a=
387
- 0,d=0;d<c[0].length;d++)a+=parseInt(c[0].charCodeAt(d)-64)*Math.pow(26,c[0].length-1-d);a--;0>a&&(a=0);b=parseInt(/[0-9]+$/.exec(b))||null;0<b&&b--;return[a,b]}}};k.shiftFormula=W.shiftFormula;k.createFromTable=function(b,c){if(b.tagName!=_$_c824[528])console.log(_$_c824[529]);else{c||(c={});c.columns=[];c.data=[];var a=b.querySelectorAll(_$_c824[530]);if(a.length)for(var d=0;d<a.length;d++){var e=a[d].style.width;e||(e=a[d].getAttribute(_$_c824[152]));e&&(c.columns[d]||(c.columns[d]={}),c.columns[d].width=
388
- e)}e=function(z){var C=z.getBoundingClientRect();C=50<C.width?C.width:50;c.columns[d]||(c.columns[d]={});z.getAttribute(_$_c824[531])?c.columns[d].type=z.getAttribute(_$_c824[531]):c.columns[d].type=_$_c824[55];c.columns[d].width=C+_$_c824[44];c.columns[d].title=z.innerHTML;z.style.textAlign&&(c.columns[d].align=z.style.textAlign);z.classList.contains(_$_c824[532])&&(c.columns[d].readOnly=!0);if(C=z.getAttribute(_$_c824[533]))c.columns[d].name=C;if(C=z.getAttribute(_$_c824[534]))c.columns[d].id=C};
389
- var f=[],g=b.querySelectorAll(_$_c824[535]);if(g.length){for(a=0;a<g.length-1;a++){var h=[];for(d=0;d<g[a].children.length;d++){var l={title:g[a].children[d].innerText,colspan:g[a].children[d].getAttribute(_$_c824[52])||1};h.push(l)}f.push(h)}g=g[g.length-1].children;for(d=0;d<g.length;d++)e(g[d])}l=0;var m={},p={},n={},t={},v=null;h=b.querySelectorAll(_$_c824[536]);for(a=0;a<h.length;a++)if(c.data[l]=[],1!=c.parseTableFirstRowAsHeader||g.length||0!=a){for(d=0;d<h[a].children.length;d++){var u=h[a].children[d].getAttribute(_$_c824[537]);
390
- u?u.substr(0,1)!=_$_c824[12]&&(u=_$_c824[12]+u):u=h[a].children[d].innerHTML;c.data[l].push(u);u=E.getColumnNameFromCoords(d,a);(v=h[a].children[d].getAttribute(_$_c824[538]))&&(t[u]=v);v=parseInt(h[a].children[d].getAttribute(_$_c824[52]))||0;var y=parseInt(h[a].children[d].getAttribute(_$_c824[164]))||0;if(v||y)m[u]=[v||1,y||1];if(v=h[a].children[d].style&&h[a].children[d].style.display==_$_c824[40])h[a].children[d].style.display=_$_c824[3];(v=h[a].children[d].getAttribute(_$_c824[100]))&&(n[u]=
391
- v);h[a].children[d].classList.contains(_$_c824[539])&&(n[u]=n[u]?n[u]+_$_c824[540]:_$_c824[541])}h[a].style&&h[a].style.height&&(p[a]={height:h[a].style.height});l++}else for(d=0;d<h[a].children.length;d++)e(h[a].children[d]);0<Object.keys(f).length&&(c.nestedHeaders=f);0<Object.keys(n).length&&(c.style=n);0<Object.keys(m).length&&(c.mergeCells=m);0<Object.keys(p).length&&(c.rows=p);0<Object.keys(t).length&&(c.classes=t);h=b.querySelectorAll(_$_c824[542]);if(h.length){b=[];for(a=0;a<h.length;a++){e=
392
- [];for(d=0;d<h[a].children.length;d++)e.push(h[a].children[d].innerText);b.push(e)}0<Object.keys(b).length&&(c.footers=b)}if(1==c.parseTableAutoCellType)for(b=[],d=0;d<c.columns.length;d++){f=e=!0;b[d]=[];for(a=0;a<c.data.length;a++)if(u=c.data[a][d],b[d][u]||(b[d][u]=0),b[d][u]++,25<u.length&&(e=!1),10==u.length){if(u.substr(4,1)!=_$_c824[187]||u.substr(7,1)!=_$_c824[187])f=!1}else f=!1;a=Object.keys(b[d]).length;f?c.columns[d].type=_$_c824[186]:1==e&&1<a&&a<=parseInt(.1*c.data.length)&&(c.columns[d].type=
393
- _$_c824[57],c.columns[d].source=Object.keys(b[d]))}return c}};k.injectArray=function(b,c,a){return b.slice(0,c).concat(a).concat(b.slice(c))};k.parseCSV=function(b,c){c=c||_$_c824[25];for(var a=0,d=0,e=[[]],f=0,g=null,h=!1,l=!1,m=0;m<b.length;m++)if(e[d]||(e[d]=[]),e[d][a]||(e[d][a]=_$_c824[3]),b[m]!=_$_c824[543])if(b[m]!=_$_c824[544]&&b[m]!=c||0!=h&&1!=l&&g){b[m]==_$_c824[189]&&(h=!h);if(null===g){if(g=h,1==g)continue}else if(!0===g&&!l&&b[m]==_$_c824[189]){b[m+1]==_$_c824[189]?(h=!0,e[d][a]+=b[m],
394
- m++):l=!0;continue}e[d][a]+=b[m]}else{g=null;l=h=!1;if(e[d][a][0]==_$_c824[189]){var p=e[d][a].trim();p[p.length-1]==_$_c824[189]&&(e[d][a]=p.substr(1,p.length-2))}b[m]==_$_c824[544]?(a=0,d++):(a++,a>f&&(f=a))}for(b=0;b<e.length;b++)for(m=0;m<=f;m++)void 0===e[b][m]&&(e[b][m]=_$_c824[3]);return e};k.getTokensFromRange=W.getTokensFromRange;k.getRangeFromTokens=W.getRangeFromTokens;return k}(),Ba=function(){function k(q){return r.current&&r.current.options.tableOverflow&&q.target.tagName==_$_c824[569]&&
395
- q.target.hasAttribute(_$_c824[42])}function b(){A.x1=A.x2;A.y1=A.y2;V=null}function c(q,x){x||(x=1);x*=.1;return 0>q?Math.min(0,Math.ceil(q/(1+x))+1):Math.max(0,Math.ceil(q/(1+x))-1)}function a(){0<Math.abs(A.speeds.vertical)&&(A.speeds.vertical=c(A.speeds.vertical,1),r.current.scrollY.scrollTop+=d(A.speeds.vertical),0==r.current.scrollY.scrollTop||r.current.scrollY.scrollHeight-r.current.scrollY.scrollTop===r.current.scrollY.clientHeight)&&(A.speeds.vertical=0);0<Math.abs(A.speeds.horizontal)&&(A.speeds.horizontal=
396
- c(A.speeds.horizontal,1),r.current.scrollX.scrollLeft+=d(A.speeds.horizontal),0==r.current.scrollX.scrollLeft||r.current.scrollX.scrollWidth-r.current.scrollX.scrollLeft===r.current.scrollX.clientWidth)&&(A.speeds.horizontal=0);0>=Math.abs(A.speeds.vertical)&&0>=Math.abs(A.speeds.horizontal)||requestAnimationFrame(a)}function d(q,x){x||(x=100);return Math.ceil(x/1E3*q)}var e={},f=null,g=null,h=null,l=null,m=!1,p=null,n=null,t=null,v=function(q){function x(ja){ja.className&&(ja.classList.contains(_$_c824[357])&&
397
- (H=ja),ja.classList.contains(_$_c824[370])&&(L=ja),ja.classList.contains(_$_c824[545])&&(O=ja));ja.tagName==_$_c824[546]?w=1:ja.tagName==_$_c824[547]?w=2:ja.tagName==_$_c824[548]&&(w=3);ja.parentNode&&!H&&x(ja.parentNode)}var w=null,D=null,H=null,L=null,O=null,R=null,xa=null,Sa=null;x(q.target);if(null!==O)return!1;if(H)if(q.target.classList.contains(_$_c824[340]))D=_$_c824[549];else if(q.target.classList.contains(_$_c824[348]))D=_$_c824[138];else if(q.target.classList.contains(_$_c824[278]))D=_$_c824[420],
398
- R=parseInt(q.target.getAttribute(_$_c824[43]));else if(q.target.parentNode&&q.target.parentNode.classList&&q.target.parentNode.classList.contains(_$_c824[178]))R=q.target.getAttribute(_$_c824[183]),xa=q.target.getAttribute(_$_c824[184]),null===R?D=_$_c824[549]:(D=_$_c824[417],R=parseInt(R),xa=parseInt(xa));else if(q.target.parentNode&&q.target.parentNode.classList&&q.target.parentNode.classList.contains(_$_c824[146]))D=_$_c824[550];else if(q.target.classList.contains(_$_c824[150]))D=_$_c824[550];
399
- else if(q.target.parentNode&&q.target.parentNode.classList&&q.target.parentNode.classList.contains(_$_c824[551]))D=_$_c824[412],R=Array.prototype.indexOf.call(q.target.parentNode.children,q.target);else if(1==w)D=_$_c824[419],R=q.target.clientWidth-q.offsetX,q.target.classList.contains(_$_c824[168])&&3<R&&20>R&&(D=_$_c824[552]),R=q.target.getAttribute(_$_c824[42]);else if(2==w){if(q=u(q,H))D=_$_c824[421],R=q[0],xa=q[1],Sa=q[2]}else if(3==w){if(R=q.target.getAttribute(_$_c824[42]),xa=q.target.getAttribute(_$_c824[43]),
400
- R||xa)D=_$_c824[553]}else w||jSuites.findElement(q.target,_$_c824[554])&&(D=_$_c824[87]);return[H,L,w,D,R,xa,Sa]},u=function(q,x){if(q.changedTouches&&q.changedTouches[0]){var w=q.changedTouches[0].clientX;q=q.changedTouches[0].clientY}else w=q.clientX,q=q.clientY;x=(x.spreadsheet.config.root?x.spreadsheet.config.root:document).elementsFromPoint(w,q);for(var D=0;D<x.length;D++)if(w=x[D].getAttribute(_$_c824[42]),q=x[D].getAttribute(_$_c824[43]),null!=w&&null!=q)return w=parseInt(w),q=parseInt(q),
401
- [w,q,x[D]];return!1},y=function(q){var x=v(q);if(!1===x)return!1;x[0]?x[1]?r.current&&document.activeElement.classList.contains(_$_c824[94])?document.activeElement.worksheet||(document.activeElement.worksheet=x[1].jexcel):r.current!=x[1].jexcel&&(r.current&&r.current.resetSelection(),r.current=x[1].jexcel):(q=x[0].tabs.getActive(),0<=q&&(r.current=x[0].spreadsheet.worksheets[q])):r.current&&!jSuites.findElement(q.target,_$_c824[227])&&(r.current.resetSelection(!0),r.current=null);return x};e.input=
402
- function(q){if(q.target.tagName==_$_c824[555]&&q.target.classList.contains(_$_c824[94])){var x=null;q.target.worksheet?x=q.target.worksheet:r.current&&(x=r.current);x&&la.parse.call(x,q.target)}};e.keydown=function(q){if(r.current){q.target.tagName==_$_c824[555]&&q.target.classList.contains(_$_c824[94])&&la.onkeydown.call(r.current,q);if(27==q.which){if(r.current.edition)return r.current.closeEditor(r.current.edition,!1),q.preventDefault(),!1;if(ra.event)return ra.cancel.call(r.current,q),q.preventDefault(),
403
- !1;if(ma.event)return ma.cancel.call(r.current,q),!1;if(1==da.isVisible())return da.close.call(r.current,!1),q.preventDefault(),!1}if(!q.target.classList.contains(_$_c824[227]))if(q.target.classList.contains(_$_c824[390])){var x=q.target;p&&clearTimeout(p);p=setTimeout(function(){da.search.call(r.current,x.value);p=null},500)}else if(q.target.classList.contains(_$_c824[404]))x=q.target,p&&clearTimeout(p),p=setTimeout(function(){r.current.search(x.value);p=null},400);else if(r.current.edition){var w=
404
- r.current.edition.getAttribute(_$_c824[42]);13==q.which?r.current.options.columns[w].type==_$_c824[186]?r.current.closeEditor(r.current.edition,!0):r.current.options.columns[w].type!=_$_c824[57]&&r.current.options.columns[w].type!=_$_c824[556]&&r.current.options.columns[w].type!=_$_c824[443]&&(q.altKey?r.current.parent.input.classList.contains(_$_c824[557])||document.execCommand(_$_c824[558],!1,_$_c824[559]):(r.current.closeEditor(r.current.edition,!0),r.current.parent.moveDownOnEnter&&r.current.down(),
405
- q.preventDefault())):9==q.which?(r.current.closeEditor(r.current.edition,!0),r.current.right(),q.preventDefault()):39!=q.which&&37!=q.which&&38!=q.which&&40!=q.which||r.current.parent.input.selected||(r.current.closeEditor(r.current.edition,!0),37==q.which?r.current.left(q.shiftKey,q.ctrlKey):39==q.which?r.current.right(q.shiftKey,q.ctrlKey):38==q.which?r.current.up(q.shiftKey,q.ctrlKey):40==q.which&&r.current.down(q.shiftKey,q.ctrlKey),q.preventDefault())}else if(r.current.selectedCell)if(33==q.which)0<
406
- r.current.options.pagination?ua.pageUp.call(r.current):G.pageUp.call(r.current);else if(34==q.which)0<r.current.options.pagination?ua.pageDown.call(r.current):G.pageDown.call(r.current);else if(37==q.which)r.current.left(q.shiftKey,q.ctrlKey),q.preventDefault();else if(39==q.which)r.current.right(q.shiftKey,q.ctrlKey),q.preventDefault();else if(38==q.which)r.current.up(q.shiftKey,q.ctrlKey),q.preventDefault();else if(40==q.which)r.current.down(q.shiftKey,q.ctrlKey),q.preventDefault();else if(36==
407
- q.which)r.current.first(q.shiftKey,q.ctrlKey),q.preventDefault();else if(35==q.which)r.current.last(q.shiftKey,q.ctrlKey),q.preventDefault();else if(32==q.which)r.current.setCheckRadioValue(),q.preventDefault();else if(46==q.which||8==q.which)r.current.isEditable()&&r.current.setValue(r.current.getSelected(!1,!0),_$_c824[3]);else if(13==q.which)q.shiftKey?r.current.up():(1==r.current.options.allowManualInsertRow&&r.current.selectedCell[1]==(r.current.results?r.current.results[r.current.results.length-
408
- 1]:r.current.rows.length-1)&&r.current.insertRow(),r.current.selectedCell&&r.current.down()),q.preventDefault();else if(9==q.which)q.shiftKey?r.current.left():(w=r.current.selectedCell[0],r.current.right(),1==r.current.options.allowInsertColumn&&1==r.current.options.allowManualInsertColumn&&r.current.selectedCell[0]==w&&(r.current.insertColumn(),r.current.right())),q.preventDefault();else if((q.ctrlKey||q.metaKey)&&!q.shiftKey)65==q.which?(r.current.selectAll(),q.preventDefault()):83==q.which?(r.current.download(),
409
- q.preventDefault()):89==q.which?(r.current.parent.redo(),q.preventDefault()):90==q.which?(r.current.parent.undo(),q.preventDefault()):67==q.which?(r.current.copy(),q.preventDefault()):88==q.which?(r.current.cut(),q.preventDefault()):86==q.which?e.paste(q):189==q.which&&(1==r.current.options.allowDeleteRow&&l==_$_c824[420]?(r.current.deleteRow(),q.preventDefault()):1==r.current.options.allowDeleteColumn&&l==_$_c824[419]&&(r.current.deleteColumn(),q.preventDefault()));else if(r.current.selectedCell&&
410
- r.current.isEditable()){w=r.current.selectedCell[1];var D=r.current.selectedCell[0];r.current.options.columns[D].type!=_$_c824[18]&&(32==q.keyCode?r.current.options.columns[D].type==_$_c824[259]||r.current.options.columns[D].type==_$_c824[261]?q.preventDefault():r.current.openEditor(r.current.records[w][D].element,!0,q):113==q.keyCode?r.current.openEditor(r.current.records[w][D].element,!1,q):1!=q.key.length&&q.key!=_$_c824[560]||q.altKey||q.ctrlKey||r.current.records[w]&&r.current.openEditor(r.current.records[w][D].element,
411
- !0,q))}}};var z=function(q,x,w,D,H,L,O){if(document.activeElement.classList.contains(_$_c824[94])&&la.update.call(r.current,q,x,w,D,H,document.activeElement,O))return!1;if(r.current.edition)r.current.closeEditor(r.current.edition,!0);else if(l&&l!==L)return!1;r.current!==O&&(r.current.resetSelection(),r.current=O);la.current?la.range.call(r.current,q,x,w,D,H):za[_$_c824[11]].call(r.current,q,x,w,D,H)};e.mousedown=function(q){q=q||window.event;var x=q.buttons?q.buttons:q.button?q.button:q.which;if(r.current)if(1==
412
- da.isVisible()&&(jSuites.findElement(q.target,_$_c824[394])||da.close.call(r.current,!1)),r.current.edition){if(jSuites.findElement(q.target,_$_c824[101]))return!1}else if(jSuites.findElement(q.target,_$_c824[227]))return!1;var w=y(q);if(!1===w)return!1;t=w;if(1<x)if(w[3]==_$_c824[419]){if(r.current.isSelected(w[4],null))return!1}else if(w[3]==_$_c824[420]){if(r.current.isSelected(null,w[4]))return!1}else if(w[3]==_$_c824[421]&&r.current.isSelected(w[4],w[5]))return!1;if(r.current){if(w[3]==_$_c824[138])r.current.isEditable()&&
413
- (ma.event=!0);else if(w[3]==_$_c824[552])da.open.call(r.current,w[4]);else{if(1==w[2])if(1==r.current.options.columnDrag&&6>q.target.offsetHeight-q.offsetY)ra.start.call(r.current,q);else if(1==r.current.options.columnResize&&6>q.target.offsetWidth-q.offsetX)wa.start.call(r.current,q);else{x=r.current.options.columns.length-1;var D=r.current.options.data.length-1;if(w[3]==_$_c824[549])z(0,0,x,D,q,w[3],w[1].jexcel),h=g=0;else if(w[3]==_$_c824[417]){var H=oa.range.call(r.current,w[5])[w[4]];H[1]>x&&
414
- (H[1]=x);z(H[0],0,H[1],D,q,w[3],w[1].jexcel);g=H[0];h=0}else(q.shiftKey||q.ctrlKey)&&null!=g&&null!=h?z(g,0,w[4],D,q,w[3],w[1].jexcel):(w[3]==_$_c824[419]&&g==w[4]&&1==r.current.options.allowRenameColumn&&(n=setTimeout(function(){r.current.setHeader(w[4])},800)),z(w[4],0,w[4],D,q,w[3],w[1].jexcel),g=w[4],h=0)}if(2==w[2])if(w[3]==_$_c824[420])1==r.current.options.rowDrag&&6>q.target.offsetWidth-q.offsetX?ra.start.call(r.current,q):1==r.current.options.rowResize&&6>q.target.offsetHeight-q.offsetY?wa.start.call(r.current,
415
- q):(x=r.current.options.columns.length-1,D=parseInt(w[4]),(q.shiftKey||q.ctrlKey)&&null!=g&&null!=h?z(0,h,x,D,q,w[3],w[1].jexcel):(z(0,D,x,D,q,w[3],w[1].jexcel),g=0,h=D));else if(w[3]==_$_c824[421]){x=parseInt(w[4]);D=parseInt(w[5]);if(!r.current.edition&&(H=r.current.options.columns[w[4]].type,q.target.tagName==_$_c824[561]&&(H==_$_c824[262]||H==_$_c824[263])&&q.target.parentNode.classList.contains(_$_c824[125]))){var L=q.target.innerText;H==_$_c824[262]&&(L=_$_c824[562]+L);window.open(L,_$_c824[563])}(q.shiftKey||
416
- q.ctrlKey)&&r.current.selectedCell?z(r.current.selectedCell[0],r.current.selectedCell[1],x,D,q,w[3],w[1].jexcel):(z(x,D,x,D,q,w[3],w[1].jexcel),g=x,h=D)}}l=w[3];typeof w[3]!==_$_c824[13]&&F.call(r.current.parent,_$_c824[564],r.current,w[3],w[4],w[5]);m=!0}else m=!1};e.mouseup=function(q){r.current&&(ra.event?ra.end.call(r.current,q):wa.event?wa.end.call(r.current,q):ma.event?ma.end.call(r.current,q):q.target.classList.contains(_$_c824[393])?da.close.call(r.current,!0):r.current.edition&&q.target.classList.contains(_$_c824[565])&&
417
- 50>q.target.clientWidth-q.offsetX&&50>q.offsetY?ba.close.call(r.current,null,!0):q.target.classList.contains(_$_c824[328])&&(q=q.target.innerText==_$_c824[217]?0:q.target.innerText==_$_c824[218]?q.target.getAttribute(_$_c824[274])-1:q.target.innerText-1,ua[_$_c824[11]].call(r.current,parseInt(q))));n&&(clearTimeout(n),n=null);m=l=!1;la.current&&la.close.call(r.current)};e.mousemove=function(q){q=q||window.event;if(r.current){var x=q.target.getAttribute(_$_c824[42]),w=q.target.getAttribute(_$_c824[43]);
418
- if(1==m)ra.event?ra.update.call(r.current,q):wa.event?wa.update.call(r.current,q):Pa.event&&Pa.update.call(r.current,q);else{var D=q.target.getBoundingClientRect();f&&(f.style.cursor=_$_c824[3],f=null);1==r.current.options.editable&&(x||w)&&(1==r.current.options.rowResize&&q.target&&x&&!w&&5>D.width-(q.clientX-D.left)?(f=q.target,f.style.cursor=_$_c824[566]):1==r.current.options.columnResize&&q.target&&!x&&w&&5>D.height-(q.clientY-D.top)?(f=q.target,f.style.cursor=_$_c824[567]):1==r.current.options.rowDrag&&
419
- q.target&&!x&&w&&5>D.width-(q.clientX-D.left)?(f=q.target,f.style.cursor=_$_c824[568]):1==r.current.options.columnDrag&&q.target&&x&&!w&&5>D.height-(q.clientY-D.top)&&(f=q.target,f.style.cursor=_$_c824[568]))}}};e.mouseover=function(q){q=q||window.event;var x=!1;if(r.current&&1==m){var w=v(q);if(w[0]){if(!document.activeElement.classList.contains(_$_c824[94])&&w[1]&&r.current!=w[1].jexcel&&r.current)return!1;if(!ra.event&&!wa.event)if(ma.event){var D=q.target.getAttribute(_$_c824[42]),H=q.target.getAttribute(_$_c824[43]);
420
- r.current.isSelected(D,H)||null===D||null===H||(ma.call(r.current,D,H),x=!0)}else null!==g&&null!==h&&(1==w[2]&&(D=g,w[3]==_$_c824[419]&&(D=q.target.getAttribute(_$_c824[42])),H=r.current.options.data.length-1,z(g,0,D,H,q,w[3],w[1].jexcel)),2==w[2]&&(w[3]==_$_c824[420]?(D=r.current.options.columns.length-1,H=parseInt(q.target.getAttribute(_$_c824[43])),z(0,h,D,H,q,w[3],w[1].jexcel)):w[3]==_$_c824[421]&&(D=q.target.getAttribute(_$_c824[42]),H=q.target.getAttribute(_$_c824[43]),D&&H&&(z(g,h,D,H,q,w[3],
421
- w[1].jexcel),x=!0))))}}1==x&&!n&&G.limited.call(r.current)?n=setTimeout(function(){var L=r.current.content.getBoundingClientRect();if(q.changedTouches&&q.changedTouches[0])var O=q.changedTouches[0].clientX,R=q.changedTouches[0].clientY;else O=q.clientX,R=q.clientY;50>L.height-(R-L.top)?G.pageDown.call(r.current,1,null,q):80>R-L.top&&G.pageUp.call(r.current,1,null,q);50>L.width-(O-L.left)?G.pageRight.call(r.current,1,null,q):80>O-L.left&&G.pageLeft.call(r.current,1,null,q);n=null},100):n&&(clearTimeout(n),
422
- n=null)};e.dblclick=function(q){if(r.current)if(q.target.classList.contains(_$_c824[348]))ma.execute.call(r.current,!1);else{var x=v(q);1==x[2]?1==r.current.options.columnSorting&&(q=q.target.getAttribute(_$_c824[42]))&&r.current.orderBy(q):2==x[2]&&r.current.isEditable()&&!r.current.edition&&x[6]&&r.current.openEditor(x[6],null,q)}};e.paste=function(q){if(!q.target.classList.contains(_$_c824[227])&&r.current&&r.current.selectedCell&&!r.current.edition){var x=q.clipboardData||window.clipboardData;
423
- x&&(r.current.paste(r.current.selectedCell[0],r.current.selectedCell[1],x.getData(_$_c824[55])),q&&q.preventDefault())}};e.contextmenu=function(q){var x=y(q);!1!==x&&(x[1]||(x=t),r.current&&!r.current.edition&&(x=Array.prototype.slice.call(x,3),Ra.open.call(r.current,q,x)))};var C=Date.now(),A={},V=null,sa=null,Y=null;e.touchstart=function(q){var x=v(q);x[0]?x[1]&&r.current!=x[1].jexcel&&(r.current&&r.current.resetSelection(),r.current=x[1].jexcel):r.current&&(r.current.resetSelection(),r.current=
424
- null);if(r.current&&!r.current.edition){var w=x[4];x=x[5];k(q)&&(Y=q.touches[0],sa=q.touches.length,C=Date.now(),A.x1=q.touches[0].screenX,A.y1=q.touches[0].screenY,A.x2=q.touches[0].screenX,A.y2=q.touches[0].screenY,V=setTimeout(b,250),null!=A.speeds&&(A.speeds.vertical=0,A.speeds.horizontal=0));if(null!==w&&null!==x){r.current.updateSelectionFromCoords(w,x,w,x);var D=q.target;n=setTimeout(function(){r.current.openEditor(D,!1,q);n=null;q.preventDefault();q.stopPropagation();q.stopImmediatePropagation()},
425
- 750)}}};e.touchmove=function(q){n&&(clearTimeout(n),n=null);if(k(q)&&1==sa){var x=q.changedTouches[0];Y&&(r.current.scrollY.scrollTop+=-1*(x.clientY-Y.clientY),r.current.scrollX.scrollLeft+=-1*(x.clientX-Y.clientX));Y=x;A.x2=q.touches[0].screenX;A.y2=q.touches[0].screenY;null!=A.speeds&&(A.speeds.vertical=0,A.speeds.horizontal=0);null==V&&(V=setTimeout(b,250));q.cancelable&&r.current.options.tableOverflow&&q.preventDefault()}};e.touchend=function(q){n&&(clearTimeout(n),n=null);V&&(clearTimeout(V),
426
- V=null);Y=sa=null;if(k(q)){q=Date.now()-C;var x=A.x1,w=A.y1,D=A.x2,H=A.y2,L=x==x&&w==H?0:Math.sqrt(Math.pow(x-x,2)+Math.pow(w-H,2));H>w&&(L=-L);10>Math.abs(H-w)&&(L=0);H=0>=q?-1:Math.ceil(L/(q/1E3));w=x==D&&w==w?0:Math.sqrt(Math.pow(x-D,2)+Math.pow(w-w,2));D>x&&(w=-w);10>Math.abs(D-x)&&(w=0);A.speeds={vertical:H,horizontal:0>=q?-1:Math.ceil(w/(q/1E3))};(250>q&&200<Math.abs(A.speeds.vertical)||250>q&&200<Math.abs(A.speeds.horizontal))&&requestAnimationFrame(a)}};e.resize=function(){r.current&&1==r.current.parent.config.fullscreen&&
427
- G.refresh.call(r.current)};return e}(),r=function(k,b,c){b||(b={});if(b.cloud&&!c)typeof b.plugins.cloud==_$_c824[85]?b.plugins.cloud.load(b,function(d){r(k,d,!0)}):console.error(_$_c824[570]);else{if(k.spreadsheet)a=k.spreadsheet,Da[_$_c824[11]].call(a,b);else var a=na.spreadsheet(k,b);a.processing=!0;1==a.config.loadingSpin&&jSuites.loading.show();jSuites.ajax.oncomplete[a.name]=function(){for(var d=0;d<a.worksheets.length;d++)typeof a.worksheets[d].onload==_$_c824[85]&&(a.worksheets[d].onload(),
428
- a.worksheets[d].onload=null);a.processing=!1;if(Array.isArray(a.queue)&&0<a.queue.length)for(;d=a.queue.shift();)d[0].updateCell(d[1],d[2],M.call(d[0],d[1],d[2]),!0);a.config.toolbar&&fa.show.call(a);for(d=0;d<a.worksheets.length;d++)aa.refresh.call(a.worksheets[d]);if(typeof a.config.onload==_$_c824[85])a.config.onload(a);ia.state.call(a);for(d=0;d<a.worksheets.length;d++)X.update.call(a.worksheets[d]);jSuites.loading.hide()};Array.isArray(b.worksheets)&&(b=b.worksheets);if(Array.isArray(b)){for(c=
429
- 0;c<b.length;c++)na.worksheet(a,b[c]);b=a.worksheets}else b=na.worksheet(a,b);jSuites.ajax.pending(a.name)||(jSuites.ajax.oncomplete[a.name](),jSuites.ajax.oncomplete[a.name]=null);return b}};r.license=null;r.setLicense=function(k){r.license=k};r.spreadsheet=[];r.picker=la;r.setDictionary=function(k){jSuites.setDictionary(k)};r.extensions={};r.setExtensions=function(k){for(var b=Object.keys(k),c=0;c<b.length;c++)typeof k[b[c]]===_$_c824[85]&&(r[b[c]]=k[b[c]],r.extensions[b[c]]=k[b[c]],r.license&&
430
- typeof r[b[c]].license==_$_c824[85]&&r[b[c]].license.call(r,r.license))};r.destroy=function(k,b){if(k.spreadsheet){b&&na.unbind(k);b=r.spreadsheet.indexOf(k.spreadsheet);r.spreadsheet.splice(b,1);for(b=0;b<k.spreadsheet.worksheets.length;b++)I(k.spreadsheet.worksheets[b].options.worksheetName,null);k.spreadsheet=null;k.jexcel=null;k.innerHTML=_$_c824[3];k.classList.remove(_$_c824[571]);k.classList.remove(_$_c824[357])}};r.version=K;r.helpers=E;r.events=Ba;typeof formula!==_$_c824[13]&&(r.formula=
431
- formula);r.editors=function(){var k={},b=function(c,a){return 1==c[a]||c.options&&1==c.options[a]?!0:c[a]==_$_c824[236]||c.options&&c.options[a]==_$_c824[236]?!0:!1};k.createEditor=function(c,a,d,e){e.parent.input.setAttribute(_$_c824[102],!1);c==_$_c824[226]?(c=document.createElement(_$_c824[226]),c.type=_$_c824[55],c.value=d):c=document.createElement(_$_c824[20]);c.style.width=a.offsetWidth-2+_$_c824[44];c.style.height=a.offsetHeight-1+_$_c824[44];e.parent.input.appendChild(c);return c};k.createDialog=
432
- function(c,a,d,e,f,g){c=k.createEditor(_$_c824[20],c,a,f);c.classList.add(_$_c824[572]);c.classList.add(_$_c824[565]);800>window.innerWidth?(f.parent.input.style.top=_$_c824[144],f.parent.input.style.left=_$_c824[144]):(a=f.parent.input.getBoundingClientRect(),window.innerHeight<a.bottom&&(f.parent.input.style.marginTop=-f.parent.input.offsetHeight));return c};k.general=function(){var c={},a=function(e){return(_$_c824[3]+e)[0]==_$_c824[12]?!0:!1},d=function(e){if(e.format||e.mask||e.locale){var f=
433
- {};e.mask?f.mask=e.mask:e.format?f.mask=e.format:(f.locale=e.locale,f.options=e.options);e.decimal&&(f.options||(f.options={}),f.options={decimal:e.decimal});return f}return null};c.createCell=function(e,f,g,h,l,m){m.type!=_$_c824[14]&&m.type!=_$_c824[317]&&m.type!=_$_c824[316]||e.classList.add(_$_c824[573]);return c.updateCell(e,f,g,h,l,m)};c.updateCell=function(e,f,g,h,l,m){g=parseInt(g);h=parseInt(h);if(e){var p=d(m),n=null;f===_$_c824[3]||a(f)||typeof f===_$_c824[14]||(p?(p=jSuites.mask.extract(f,
434
- p,!0))&&p.value!==_$_c824[3]&&(n=p.value):1==(!1===l.parent.config.autoCasting||!1===m.autoCasting?!1:!0)&&(m.type==_$_c824[14]||m.type==_$_c824[317]||m.type==_$_c824[316]?(p=jSuites.mask.extract(f,m,!0))&&p.value!==_$_c824[3]&&(n=p.value):jSuites.isNumeric(Number(f))&&(n=Number(f))));null!==n&&(f=n);f=c.parseValue(g,h,f,l,m,e);f instanceof Element||f instanceof HTMLDocument?(e.innerHTML=_$_c824[3],e.appendChild(f)):1==l.parent.config.stripHTML?e.innerText=f:e.innerHTML=f;if(null!==n)return n}};c.openEditor=
435
- function(e,f,g,h,l,m){var p=l.parent.input;p.onblur=function(){p.classList.contains(_$_c824[94])||l.closeEditor(e,!0)};if(m.type==_$_c824[14]||m.type==_$_c824[317]||m.type==_$_c824[316])p.classList.add(_$_c824[557]),a(f)||m.inputmode||(m.inputmode=_$_c824[574]);g=null;a(f)||(m.inputmode&&p.setAttribute(_$_c824[98],m.inputmode),(g=d(m))?(m.disabledMaskOnEdition||(m.mask?(m=m.mask.split(_$_c824[219]),p.setAttribute(_$_c824[96],m[0])):m.locale&&p.setAttribute(_$_c824[575],m.locale)),g.input=l.parent.input,
436
- l.parent.input.mask=g,jSuites.mask.render(f,g,!1)):f&&m.type==_$_c824[316]&&(f*=100));g||(l.parent.config.stripHTML?p.innerText=f:p.innerHTML=f,jSuites.focus(l.parent.input))};c.closeEditor=function(e,f,g,h,l,m){e=l.parent.input;f=f&&e.innerText.trim().length?e.innerText:_$_c824[3];a(f)?f=f.replace(/(\r\n|\n|\r)/gm,_$_c824[3]):m.type==_$_c824[316]&&(f+=_$_c824[576],e.classList.remove(_$_c824[577]));return f};c.parseValue=function(e,f,g,h,l,m){1==h.parent.config.parseFormulas&&(h.resetArray(e,f),a(g)&&
437
- (g=h.executeFormula(g,e,f)));g instanceof Element||g instanceof HTMLDocument||!l||a(g)||!(f=d(l))||(e=jSuites.mask.render(g,f,!0),m&&f.mask&&(f=f.mask.split(_$_c824[219]),f[1]&&(f[1].match(new RegExp(_$_c824[578],_$_c824[386]))&&(0>g?m.classList.add(_$_c824[579]):m.classList.remove(_$_c824[579])),f[1].match(new RegExp(_$_c824[580],_$_c824[386]))&&0>g&&(e=_$_c824[214]+e+_$_c824[239]))),e&&(g=e));return g};c[_$_c824[51]]=function(e,f){var g;return(g=d(e))?jSuites.mask.render(f,g,!0):e.type==_$_c824[316]?
438
- 100*parseFloat(f):f};c.destroyCell=function(e){e.classList.remove(_$_c824[573])};return c}();k.text=k.general;k.number=k.general;k.numeric=k.general;k.percent=k.general;k.notes=function(){var c={},a=null;c.updateCell=function(d,e,f,g,h,l){d&&(f=document.createElement(_$_c824[20]),f.classList.add(_$_c824[581]),1==h.parent.config.stripHTML?f.innerText=e:f.innerHTML=e,d.innerHTML=_$_c824[3],d.appendChild(f))};c.createCell=c.updateCell;c.openEditor=function(d,e,f,g,h,l){var m=l&&l.options?l.options:{};
439
- m.focus=!0;m.value=e;m.border=!1;m.height=_$_c824[582];m.toolbar=!1;a=k.createDialog(d,e,f,g,h,l);a=jSuites.editor(a,m)};c.closeEditor=function(d,e,f,g,h,l){return e?a.getData():_$_c824[3]};return c}();k.dropdown=function(){var c={createCell:function(a,d,e,f,g,h){h.render==_$_c824[583]?a.classList.add(_$_c824[584]):a.classList.add(_$_c824[585]);if(a=c.updateCell(a,d,e,f,g,h))return a},destroyCell:function(a){a.classList.remove(_$_c824[585])},updateCell:function(a,d,e,f,g,h){if(a){var l=c.getItem(a,
440
- d,e,f,g,h);l?a.innerHTML=l:d?(d=c.fromLabel(a,d,e,f,g,h),d.length?(l=c.getItem(a,d,e,f,g,h),a.innerHTML=l):a.innerHTML=_$_c824[3]):a.innerHTML=_$_c824[3];return d}},openEditor:function(a,d,e,f,g,h){var l=k.createEditor(_$_c824[20],a,d,g),m=h.delimiter||_$_c824[219];h=Object.create(h);h.options||(h.options={});typeof h.filter==_$_c824[85]&&(h.source=h.filter(g.el,a,e,f,h.source));typeof h.filterOptions==_$_c824[85]&&(h=h.filterOptions(g,a,e,f,d,h));e=h.options;h.source&&(e.data=JSON.parse(JSON.stringify(h.source)));
441
- b(h,_$_c824[586])&&(e.multiple=!0);b(h,_$_c824[56])&&(e.autocomplete=!0);e.format=!0;e.opened=!0;e.width=a.offsetWidth-2;e.onclose=function(){g.closeEditor(a,!0)};b(h,_$_c824[586])?d&&(e.value=(_$_c824[3]+d).split(m)):e.value=d;jSuites.dropdown(l,e)},closeEditor:function(a,d,e,f,g,h){for(var l=g.parent.input.children[0],m=h.delimiter||_$_c824[219],p=l.dropdown.getText(!0),n=l.dropdown.getValue(!0),t=0;t<n.length;t++)!1===c.getItem(a,n[t],e,f,g,h)&&h.source.push({id:n[t],name:p[t]});l.dropdown.close(!0);
442
- if(d)return n.join(m)},fromLabel:function(a,d,e,f,g,h){a=h.delimiter||_$_c824[219];e=[];f=[];Array.isArray(d)||(d=(_$_c824[3]+d).split(a));for(g=0;g<d.length;g++)f[d[g].trim()]=!0;d=Object.keys(f);!b(h,_$_c824[586])&&1<Object.keys(d).length&&(f=[],f[d[0]]=!0);for(d=0;d<h.source.length;d++)f[h.source[d].name]&&e.push(h.source[d].id);return e.join(a)},getItem:function(a,d,e,f,g,h){f=h.delimiter||_$_c824[219];a=[];e=[];Array.isArray(d)||(d=(_$_c824[3]+d).split(f));for(f=0;f<d.length;f++)e[d[f].trim()]=
443
- !0;f=Object.keys(e);!b(h,_$_c824[586])&&1<Object.keys(f).length&&(d=[],d[f[0]]=!0,e=d);if(h.source&&typeof h.source[0]!==_$_c824[84])for(d=0;d<h.source.length;d++)f=h.source[d],h.source[d]={id:f,name:f};for(d=0;d<h.source.length;d++)typeof e[h.source[d].id]!==_$_c824[13]&&a.push(h.render==_$_c824[264]?h.source[d].color:h.render==_$_c824[587]?h.source[d].image:h.source[d].name);if(a.length){if(typeof h.render!==_$_c824[13]){for(d=0;d<a.length;d++)e=d,f=a[d],f=h.render==_$_c824[264]?_$_c824[588]+f+
444
- _$_c824[589]:h.render==_$_c824[587]?_$_c824[588]+f+_$_c824[589]:h.render==_$_c824[583]?_$_c824[591]+(h.source[d].color||_$_c824[590])+_$_c824[592]+f+_$_c824[593]:void 0,a[e]=f;return a.join(_$_c824[3])}for(d=0;d<a.length;d++)a[d]=(_$_c824[3]+a[d]).replace(_$_c824[217],_$_c824[594]);return a.join(_$_c824[305])}return!1}};c[_$_c824[51]]=function(a,d){for(var e=0;e<a.source.length;e++)if(a.source[e].id==d)return a.render==_$_c824[264]?a.source[e].color:a.render==_$_c824[587]?a.source[e].image:a.source[e].name};
445
- return c}();k.autocomplete=k.dropdown;k.calendar=function(){var c={},a=null;c.updateCell=function(d,e,f,g,h,l){if(d){f=e;l=c.getFormat(l);0<e&&Number(e)==e&&(f=jSuites.calendar.numToDate(e));g=_$_c824[3]+e;g.substr(4,1)==_$_c824[187]&&g.substr(7,1)==_$_c824[187]?g=!0:(g=g.split(_$_c824[187]),g=4==g[0].length&&g[0]==Number(g[0])&&2==g[1].length&&g[1]==Number(g[1])?!0:!1);g||(g=jSuites.calendar.extractDateFromString(e,l))&&(f=g);if(f=jSuites.calendar.getDateString(f,l))return d.innerText=f,e;d.innerText=
446
- _$_c824[3];return _$_c824[3]}};c.createCell=c.updateCell;c.openEditor=function(d,e,f,g,h,l){l=Object.create(l);typeof l.filterOptions==_$_c824[85]&&(l=l.filterOptions(h,d,f,g,e,l));f=l.options||{};f.opened=!0;f.onclose=function(m,p){h.closeEditor(d,!0)};typeof l.timepicker!==_$_c824[13]&&(f.time=b(l,_$_c824[595])?!0:!1);typeof f.readonly!==_$_c824[13]&&(f.readonly=f.readonly);f.value=e||null;f.placeholder=f.format;a=k.createEditor(_$_c824[226],d,e,h);jSuites.calendar(a,f);!1===a.calendar.options.readonly&&
447
- a.focus()};c.closeEditor=function(d,e,f,g,h){d=a.calendar.close(!0,a.value?!0:!1);d=a.value?d:_$_c824[3];if(e)return d};c.getFormat=function(d){return d&&d.format?d.format:d&&d.options&&d.options.format?d.options.format:_$_c824[596]};c[_$_c824[51]]=function(d,e){d=c.getFormat(d);return jSuites.calendar.getDateString(e,d)};return c}();k.color=function(){var c={},a=null;c.updateCell=function(d,e,f,g,h,l){d&&(l.render==_$_c824[597]?(f=document.createElement(_$_c824[20]),f.className=_$_c824[264],f.style.backgroundColor=
448
- e,d.innerText=_$_c824[3],d.appendChild(f)):(d.style.color=e,d.innerText=e))};c.createCell=c.updateCell;c.openEditor=function(d,e,f,g,h,l){l=Object.create(l);typeof l.filterOptions==_$_c824[85]&&(l=l.filterOptions(h,d,f,g,e,l));l.value=e;l.onclose=function(m,p){h.closeEditor(d,!0)};a=k.createEditor(_$_c824[226],d,e,h);a=jSuites.color(a,l);a.open()};c.closeEditor=function(d,e,f,g,h,l){d=a.close(!0);if(e)return d};c[_$_c824[51]]=function(d,e){d=document.createElement(_$_c824[20]);d.style.width=_$_c824[598];
449
- d.style.height=_$_c824[22];d.style.backgroundColor=e;return d.outerHTML};return c}();k.checkbox=function(){var c={createCell:function(a,d,e,f,g,h){d=d&&d!=_$_c824[599]&&d!=_$_c824[600]?!0:!1;e=document.createElement(_$_c824[226]);e.type=_$_c824[259];e.checked=d;e.onclick=function(){g.setValue(a,this.checked)};(h&&1==h.readOnly||!g.isEditable())&&e.setAttribute(_$_c824[601],_$_c824[601]);a.innerHTML=_$_c824[3];a.appendChild(e);return d},updateCell:function(a,d){d=d&&d!=_$_c824[599]&&d!=_$_c824[600]?
450
- !0:!1;a&&(a.children[0].checked=d);return d},openEditor:function(a,d,e,f,g){d=a.children[0].checked?!1:!0;g.setValue(a,d);return!1},closeEditor:function(a,d){return!1}};c[_$_c824[51]]=function(a,d){return 1==d||1==d||d==_$_c824[236]?jSuites.translate(_$_c824[236]):jSuites.translate(_$_c824[599])};return c}();k.radio=function(){var c={createCell:function(a,d,e,f,g,h){a.getAttribute(_$_c824[42]);e=document.createElement(_$_c824[226]);e.type=_$_c824[261];e.checked=1==d||1==d||d==_$_c824[236]?!0:!1;e.onclick=
451
- function(){g.setValue(a,!0)};(h&&1==h.readOnly||!g.isEditable())&&e.setAttribute(_$_c824[601],_$_c824[601]);a.innerHTML=_$_c824[3];a.appendChild(e)},updateCell:function(a,d,e,f,g){d=1==d||1==d||d==_$_c824[236]||d==_$_c824[602]?!0:!1;a&&(a.children[0].checked=d);if(1==d){a=[];for(var h=0;h<g.options.data.length;h++)f!=h&&g.options.data[h][e]&&a.push({x:e,y:h,value:0});a.length&&g.setValue(a)}return d},openEditor:function(a,d,e,f,g){return!1},closeEditor:function(a,d){return!1}};c[_$_c824[51]]=function(a,
452
- d){return 1==d||1==d||d==_$_c824[236]?_$_c824[236]:_$_c824[599]};return c}();k.autonumber=function(){var c={},a=null;c.createCell=function(d,e,f,g,h,l){(e=parseInt(e))||0<parseInt(d.innerText)&&(e=parseInt(d.innerText));l.sequence||(l.sequence=0);e?c.isValid(e,f,g,h)||(e=_$_c824[251]):e=l.sequence+1;e>l.sequence&&(l.sequence=e);return d.innerText=e};c.updateCell=c.createCell;c.openEditor=function(d,e,f,g,h,l){a=k.createEditor(_$_c824[226],d,e,h);a.onblur=function(){h.closeEditor(d,!0)};a.focus();
453
- a.value=e};c.closeEditor=function(d,e,f,g,h){return e?a.value:_$_c824[3]};c.isValid=function(d,e,f,g){for(var h,l=0;l<g.options.data.length;l++)if(h=g.value(e,l),h==d&&l!=f)return!1;return!0};return c}();k.progressbar=function(){var c={},a=null;c.createCell=function(d,e){e=parseInt(e);if(100<e)e=100;else if(!e||0>e)e=0;if(d.children[0]&&d.children[0].tagName==_$_c824[555])var f=d.children[0];else f=document.createElement(_$_c824[20]),f.classList.add(_$_c824[265]),d.innerText=_$_c824[3],d.classList.add(_$_c824[603]),
454
- d.appendChild(f);f.style.width=parseInt(e)+_$_c824[576];f.setAttribute(_$_c824[274],parseInt(e)+_$_c824[576])};c.destroyCell=function(d){d.classList.remove(_$_c824[603])};c.updateCell=c.createCell;c.openEditor=function(d,e,f,g,h,l){a=k.createEditor(_$_c824[226],d,e,h);a.type=_$_c824[14];a.setAttribute(_$_c824[604],0);a.setAttribute(_$_c824[605],100);a.onblur=function(){h.closeEditor(d,!0)};a.focus();a.value=e};c.closeEditor=function(d,e,f,g,h){return e?a.value:_$_c824[3]};return c}();k.rating=function(){var c=
455
- {},a=null;c.createCell=function(d,e,f,g,h,l){return c.setCell(d,e,l)};c.destroyCell=function(d){d.classList.remove(_$_c824[606])};c.updateCell=c.createCell;c.openEditor=function(d,e,f,g,h,l){a=k.createEditor(_$_c824[226],d,e,h);a.type=_$_c824[14];a.setAttribute(_$_c824[604],0);a.setAttribute(_$_c824[605],5);a.onblur=function(){h.closeEditor(d,!0)};a.focus();a.value=e};c.closeEditor=function(d,e,f,g,h,l){return e?a.value:_$_c824[3]};c.setCell=function(d,e,f){e=parseInt(e);if(5<e)e=5;else if(!e||0>
456
- e)e=0;if(d){f=f&&f.color?f.color:_$_c824[579];var g=document.createElement(_$_c824[20]);g.setAttribute(_$_c824[274],parseInt(e)+_$_c824[607]);g.classList.add(_$_c824[266]);for(var h=0;h<e;h++){var l=document.createElement(_$_c824[452]);l.className=_$_c824[506];l.style.color=f;l.innerHTML=_$_c824[608];g.appendChild(l)}d.innerHTML=_$_c824[3];d.className=_$_c824[606];d.appendChild(g)}return e};return c}();k.email=function(){var c={createCell:function(a,d,e,f,g,h){a&&(a.children&&a.children[0]&&a.children[0].tagName==
457
- _$_c824[561]?e=a.children[0]:(e=document.createElement(_$_c824[203]),a.innerText=_$_c824[3],a.appendChild(e),h.options&&h.options.url&&e.setAttribute(_$_c824[609],h.options.url)),e.innerText=d)}};c.updateCell=c.createCell;c.openEditor=function(a,d,e,f,g,h){g.parent.input.classList.add(_$_c824[557]);g.parent.input.onblur=function(){g.closeEditor(a,!0)};g.parent.input.innerText=d;jSuites.focus(g.parent.input)};c.closeEditor=function(a,d,e,f,g){g.parent.input.classList.remove(_$_c824[557]);return d?
458
- g.parent.input.innerText.replace(new RegExp(/\n/,_$_c824[190]),_$_c824[3]):_$_c824[3]};return c}();k.url=k.email;k.image=function(){var c={},a=null;c.createCell=function(d,e,f,g,h,l){if(d)if(e)if(d.children&&d.children[0]&&d.children[0].tagName==_$_c824[610])d.children[0].src=e;else{var m=document.createElement(_$_c824[37]);l.render==_$_c824[611]&&m.classList.add(_$_c824[611]);l.options&&(m.style.maxWidth=_$_c824[612],l.options.absolute&&(d.classList.add(_$_c824[613]),m.setAttribute(_$_c824[614],
459
- -1),m.classList.add(_$_c824[227]),m.classList.add(_$_c824[615]),m.settings=function(){h.openEditor(d,e,f,g,h,l)},m.dblclick=function(){h.openEditor(d,!0)},m[_$_c824[616]]=function(){h.setValueFromCoords(f,g,_$_c824[3])}),l.options.width&&(m.style.width=parseInt(l.options.width)+_$_c824[44]),l.options.height&&(m.style.height=parseInt(l.options.height)+_$_c824[44]));m.src=e;d.innerHTML=_$_c824[3];d.appendChild(m)}else d.innerHTML=_$_c824[3]};c.updateCell=c.createCell;c.openEditor=function(d,e,f,g,h,
460
- l){(l&&l.options?l.options:{}).value=e;a=k.createDialog(d,e,f,g,h,l);e&&(d=document.createElement(_$_c824[37]),d.src=e,d.classList.add(_$_c824[617]),d.style.width=_$_c824[612],a.appendChild(d));jSuites.image(a,l)};c.closeEditor=function(d,e,f,g,h,l){if(e&&(d=a.children[0]))return d.tagName==_$_c824[610]?d.src:_$_c824[3]};c[_$_c824[51]]=function(d,e){return _$_c824[618]+e+_$_c824[619]};return c}();k.html=function(){var c={},a=null;c.createCell=function(d,e){d.classList.add(_$_c824[620]);var f=document.createElement(_$_c824[20]);
461
- f.innerHTML=e;d.appendChild(f)};c.updateCell=function(d,e){d&&(d.firstChild.innerHTML=e)};c.destroyCell=function(d){d.classList.remove(_$_c824[620])};c.openEditor=function(d,e,f,g,h,l){var m=l&&l.options?l.options:{};m.focus=!0;m.value=e;m.border=!1;m.height=_$_c824[582];e=k.createDialog(d,e,f,g,h,l);a=jSuites.editor(e,m);a.close=function(){h.closeEditor(d,!0)};jSuites.tracking(a,!0)};c.closeEditor=function(d,e,f,g,h,l){jSuites.tracking(a,!1);d=a.getData();if(e)return d};return c}();k.hidden=function(){return{createCell:function(c,
462
- a,d,e,f){c.style.display=_$_c824[40];c.innerText=a},updateCell:function(c,a,d,e,f){c&&(c.innerText=a)},openEditor:function(c,a,d,e,f){return!1},closeEditor:function(c,a){return!1}}}();k.tags=function(){var c={},a=null;c.createCell=function(d,e){d.classList.add(_$_c824[621]);c.updateCell(d,e)};c.updateCell=function(d,e){d&&(d.innerHTML=e)};c.destroyCell=function(d){d.classList.remove(_$_c824[621])};c.openEditor=function(d,e,f,g,h,l){var m=l&&l.options?l.options:{};m.value=e;a=k.createDialog(d,e,f,
463
- g,h,l);d=document.createElement(_$_c824[20]);d.style.margin=_$_c824[22];d.style.marginRight=_$_c824[622];a.appendChild(d);a=jSuites.tags(d,m);d.focus();jSuites.focus(d)};c.closeEditor=function(d,e,f,g,h,l){d=a.getValue();if(e)return d};return c}();k.record=function(){var c={},a=null;c.createCell=function(d,e,f,g,h,l){d.classList.add(_$_c824[585]);var m;(m=h.parent.getWorksheetInstance(l.worksheetId))?m.rows?c.updateCell(d,e,f,g,h,l):(d.innerText=_$_c824[251],h.parent.queue.push([h,f,g])):(d.innerText=
464
- _$_c824[251],h.parent.queue.push([h,f,g]))};c.destroyCell=function(d){d.classList.remove(_$_c824[585])};c.updateCell=function(d,e,f,g,h,l){d&&(typeof l.worksheetId==_$_c824[13]?d.innerText=_$_c824[251]:d.innerHTML=c.getValue(d,e,f,g,h,l))};c.openEditor=function(d,e,f,g,h,l){var m=l.delimiter||_$_c824[219];l=Object.create(l);l.options||(l.options={});typeof l.filter==_$_c824[85]&&(l.source=l.filter(h.el,d,f,g,l.source));typeof l.filterOptions==_$_c824[85]&&(l=l.filterOptions(h,d,f,g,e,l));f=l.options;
465
- f.data=c.getSource(h,l);b(l,_$_c824[586])&&(f.multiple=!0);b(l,_$_c824[56])&&(f.autocomplete=!0);f.opened=!0;f.width=d.offsetWidth-2;f.onclose=function(){h.closeEditor(d,!0)};b(l,_$_c824[586])?e&&(f.value=(_$_c824[3]+e).split(m)):f.value=e;a=k.createEditor(_$_c824[20],d,e,h);a=jSuites.dropdown(a,f)};c.closeEditor=function(d,e,f,g,h,l){d=l.delimiter||_$_c824[219];f=a.getValue(!0);a.close(!0);if(e)return f.join(d)};c.getValue=function(d,e,f,g,h,l){d=[];if(typeof l.worksheetId==_$_c824[17]&&(h=h.parent.getWorksheetInstance(l.worksheetId))){f=
466
- l.worksheetColumn?l.worksheetColumn:0;0<=l.worksheetImage&&(f=l.worksheetImage);if(e==_$_c824[3]||0==e||null==e||void 0==e)return _$_c824[3];e=(_$_c824[3]+e).split(_$_c824[219]);for(g=0;g<e.length;g++){var m=e[g].trim();var p=h.name(f);m=h.getRowById(m);p=!1===m?_$_c824[623]:m[p];0<=l.worksheetImage&&(p=_$_c824[624]+p+_$_c824[625]);d.push(p)}return 0<=l.worksheetImage?d.join(_$_c824[3]):d.join(_$_c824[305])}return _$_c824[251]};c.getSource=function(d,e){var f=e.worksheetColumn?e.worksheetColumn:0,
467
- g=null;typeof e.worksheetId==_$_c824[17]&&(g=d.parent.getWorksheetInstance(e.worksheetId));if(g){var h,l=[];for(d=0;d<g.rows.length;d++)if(h=g.value(f,d))h={id:g.getRowId(d),name:h},void 0!=e.worksheetImage&&(h.image=g.value(e.worksheetImage,d)),l.push(h)}else console.error(_$_c824[626]+e.worksheetId);return l};c[_$_c824[51]]=function(d,e){for(var f=0;f<d.source.length;f++)if(d.source[f].id==e)return d.render==_$_c824[264]?d.source[f].color:d.render==_$_c824[587]?d.source[f].image:d.source[f].name};
468
- return c}();return k}();typeof jQuery!==_$_c824[13]&&function(k){k.fn.jspreadsheet=k.fn.jexcel=function(b){var c=k(this)[_$_c824[51]](0);if(c.jspreadsheet){if(typeof arguments[0]==_$_c824[14])var a=arguments[0],d=2;else a=0,d=1;return c.jspreadsheet[a][b].apply(c.jspreadsheet[a],Array.prototype.slice.call(arguments,d))}return r(k(this)[_$_c824[51]](0),arguments[0])}}(jQuery);return r});
18
+ var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(E){var H=0;return function(){return H<E.length?{done:!1,value:E[H++]}:{done:!0}}};$jscomp.arrayIterator=function(E){return{next:$jscomp.arrayIteratorImpl(E)}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;
19
+ $jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(E,H,L){if(E==Array.prototype||E==Object.prototype)return E;E[H]=L.value;return E};$jscomp.getGlobal=function(E){E=["object"==typeof globalThis&&globalThis,E,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var H=0;H<E.length;++H){var L=E[H];if(L&&L.Math==Math)return L}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
20
+ $jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(E,H){var L=$jscomp.propertyToPolyfillSymbol[H];if(null==L)return E[H];L=E[L];return void 0!==L?L:E[H]};
21
+ $jscomp.polyfill=function(E,H,L,V){H&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(E,H,L,V):$jscomp.polyfillUnisolated(E,H,L,V))};$jscomp.polyfillUnisolated=function(E,H,L,V){L=$jscomp.global;E=E.split(".");for(V=0;V<E.length-1;V++){var Q=E[V];if(!(Q in L))return;L=L[Q]}E=E[E.length-1];V=L[E];H=H(V);H!=V&&null!=H&&$jscomp.defineProperty(L,E,{configurable:!0,writable:!0,value:H})};
22
+ $jscomp.polyfillIsolated=function(E,H,L,V){var Q=E.split(".");E=1===Q.length;V=Q[0];V=!E&&V in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var da=0;da<Q.length-1;da++){var P=Q[da];if(!(P in V))return;V=V[P]}Q=Q[Q.length-1];L=$jscomp.IS_SYMBOL_NATIVE&&"es6"===L?V[Q]:null;H=H(L);null!=H&&(E?$jscomp.defineProperty($jscomp.polyfills,Q,{configurable:!0,writable:!0,value:H}):H!==L&&(void 0===$jscomp.propertyToPolyfillSymbol[Q]&&(L=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[Q]=$jscomp.IS_SYMBOL_NATIVE?
23
+ $jscomp.global.Symbol(Q):$jscomp.POLYFILL_PREFIX+L+"$"+Q),$jscomp.defineProperty(V,$jscomp.propertyToPolyfillSymbol[Q],{configurable:!0,writable:!0,value:H})))};$jscomp.initSymbol=function(){};$jscomp.iteratorPrototype=function(E){E={next:E};E[Symbol.iterator]=function(){return this};return E};
24
+ $jscomp.iteratorFromArray=function(E,H){E instanceof String&&(E+="");var L=0,V=!1,Q={next:function(){if(!V&&L<E.length){var da=L++;return{value:H(da,E[da]),done:!1}}V=!0;return{done:!0,value:void 0}}};Q[Symbol.iterator]=function(){return Q};return Q};$jscomp.polyfill("Array.prototype.values",function(E){return E?E:function(){return $jscomp.iteratorFromArray(this,function(H,L){return L})}},"es8","es3");
25
+ var _$_496c=["use strict","{","}","","9.0.2","Base","https://jspreadsheet.com","Unlicensed","Jspreadsheet Pro\r\n"," edition ","\r\n","set","=","undefined","number","fullscreen","block","string","readonly","jss_hidden_index","div","right","10px","pointer","/v8",",","localhost",".","v8"," (Expired)","Licensed to: ","Premium","License required","A valid license is required","This version is not included on the scope of this license","Your license is expired","jspreadsheet","img","/jspreadsheet/","logo.png",
26
+ "none","status","edition","scope","data-x","data-y","get","px","jss_frozen","scroll","wheel","goto","jss_scroll","jss_hidden","hidden","jss_content_overflow","onresize","300px","Jspreadsheet Pro","text","autocomplete","dropdown","GET","json","Jspreadsheet Alert: secureFormulas is set to false.","setConfig","insertRow","deleteRow","insertColumn","deleteColumn","moveRow","moveColumn","setMerge","removeMerge","setStyle","resetStyle","setWidth","setHeight","setHeader","setComments","orderBy","setValue",
27
+ "setProperty","updateProperty","renameWorksheet","moveWorksheet","onundo","onredo","object","function","contextMenu","toolbar","onevent","Jspreadsheet: cursor not in the viewport","keydown","oneditionstart","oncreateeditor","jss_focus","jss_formula","oneditionend","data-mask","data-value","inputmode","0","style","jss_input","contentEditable","setRowId","onchangerowid","setBorder","resetBorders","updateCells","setFormula","updateData","onbeforesave","POST","Authorization","Bearer ","disconected",": ",
28
+ "Sorry, something went wrong, refreshing your spreadsheet...","_top","onsave","persistence","?","?worksheet=","&worksheet=","add","remove","jss_cursor","selected","main","copying","onblur","onfocus","onselection"," ","'","'!","!",":","jss_border","cloning","jss_border_","15","jss_resize_corner","data-action","ontouchstart","moveLeft","0px","-6px","moveTop","moveRight","moveDown","-2000px","tr","jss_group_container","td","&nbsp;",".jss_group","jss_group","+","width","Jspreadsheet: This column is part of a merged cell.",
29
+ "jss_dragging","1px","jss_helper_col","Jspreadsheet: This row is part of a merged cell","Jspreadsheet: Please clear your search before perform this action","51px","jss_helper_row","No cell selected","Invalid merged properties","onmerge","colspan","rowspan","Column name","data-title","onchangeheader","jss_filters_icon","col","oncreatecolumn","setFooter","onchangefooter","setFooterValue","onchangefootervalue","resetFooter","setNestedHeaders","onchangenested","jss_nested","resetNestedHeaders","setNestedCell",
30
+ "onchangenestedcell","center","data-nested-x","data-nested-y","align","calendar","-","00:00:00",'"',"g",'""',"\t","oncopy","copy","color: initial","onbeforepaste","JSS: For better results, please allow pagination or tableOverflow.","onpaste","Export not allowed","\ufeff","text/csv;charset=utf-8;",".csv","a","download","setDefinedNames","#1a237e","#b71c1c","#880e4f","#1b5e20","#ff6f00","/","*","^","(","[","|","<",">",";","data-token","picker","jss_picker","click","active","focus","input","jss_object",
31
+ "contenteditable","blur","last",'<b class="','" data-token="','">',"</b>","data-single","true","b","&",")","]","var "," = {};"," = ",";\n","; return ","onbeforeformula","#LOOP","Reference loop detected","#SELF","Self Reference detected","#ERROR","Table does not exist or is not loaded yet","CHART(","#SPILL!","#REF!","$","Something went wrong","onafterchanges","checkbox","autonumber","radio","email","url","color","progressbar","rating","onformulachain","onbeforechange","onchange","oncreatecell","values",
32
+ "mergeCells","jss_wrap","title","jss_unlocked","onchangeproperty","jss_row","oncreaterow","Jspreadsheet: Invalid origin or destination","onmoverow","Jspreadsheet: Insert row is not enabled in the table configuration","onbeforeinsertrow","onbeforeinsertrow returned false","oninsertrow","Jspreadsheet: Delete row is not enabled in the table configuration","onbeforedeleterow","onbeforedeleterow returned false","meta","cells","comments","ondeleterow","Jspreadsheet: Invalid origin","Jspreadsheet: Invalid destination",
33
+ "onmovecolumn","Jspreadsheet: Insert column is not enabled in the table configuration","onbeforeinsertcolumn","onbeforeinsertcolumn returned false","col_","oninsertcolumn","Jspreadsheet: Delete column is not enabled in the table configuration","Jspreadsheet: it is not possible to delete the last column","onbeforedeletecolumn","onbeforedeletecolumn returned false","ondeletecolumn","; ","onchangestyle","No cell provided","onresetstyle","onbeforecomments","oncomments","setMeta","onchangemeta","resetMeta",
34
+ "onresetmeta","arrow-down","percent","numeric","onbeforesort","This action will destroy any existing merged cells. Are you sure?","onsort","arrow-up","jss_pagination","Jspreadsheet: No pagination defined","Jspreadsheet: pagination not defined","onbeforechangepage","onchangepage","No records found","jss_page","jss_page_selected","Showing page {0} of {1} entries","jss_content","selectstart","table","thead","tbody","tfoot","colgroup","50","jss_selectall","jss","cellpadding","cellspacing","unselectable",
35
+ "yes","jss_overflow","jss_locked","jss_corner","on","onselectstart","return false","X","Y","jss_content_pagination","Frozen columns cannot be greater than the number of available columns","rows","onchangereferences","jss_container","jss_toolbar","jss_helper","jss_loading","textarea","jss_textarea","-1","bottom","Defined names are only available on the Premium edition.","beforeinit","Sheet","Worksheet clash name: ",". It is highly recommended to define a unique worksheetName on the initialization.",
36
+ "jss_worksheet","init","To improve the performance, use tableOverflow or pagination.","resize","touchstart","touchmove","touchend","onresizecolumn","onresizerow","label","jss_filters_active","Jspreadsheet: the filter is not enabled.","onopenfilter","Blanks","onbeforefilter","onfilter","gi","jss_filters_options","INPUT","Search","jss_filters_search","button","Ok","jss_filters_apply","jss_filters",'<input type="checkbox"> ',"Add current selection to filter",'<input type="checkbox"> (',"Select all",
37
+ "select","jss_pagination_dropdown","option","Show","entries","jss_search","onbeforesearch","onsearch","jss_search_container","jss_contextmenu","Mac","&#8984;","Ctrl","tabs","Rename this worksheet","Delete this worksheet","Are you sure?","line","nested","Rename this cell","header","row","cell","Cut","content_cut"," + X","Copy","content_copy"," + C","Paste","content_paste"," + V","Insert a new column before","Insert a new column after","Delete selected columns","Rename this column","Create a new row",
38
+ "Order ascending","Order descending","Insert a new row before","Insert a new row after","Delete selected rows","Edit comments","Add comments","notes","Comments","Clear comments","Save as","save"," + S","About","info","with-toolbar","i","undo","redo","divisor","120px","Verdana","Arial","Courier New",'<span style="font-family:',"</span>","font-family","48px","format_size","x-small","small","medium","large","x-large",'<span style="font-size:',"font-size","format_align_left","format_align_center","format_align_right",
39
+ "format_align_justify",'<i class="material-icons">',"</i>","text-align","_","format_bold","font-weight","bold","format_color_text","format_color_fill","background-color","border_all","border_outer","border_inner","border_horizontal","border_vertical","border_left","border_top","border_right","border_bottom","border_clear","black","border-left: ","px solid ","border-left: ; ","border-right: ","border-right: ; ","border-top: ","border-top: ; ","border-bottom: ","border-bottom: ; ","material-icons",
40
+ "color_lens",'<div style="height: ','px; width: 50px; background-color: black;"></div>',"80px","1","fullscreen_exit","Toggle Fullscreen","search","search_off","Toggle Search","onbeforecreateworksheet","There is one existing worksheet with the same name.","createWorksheet","oncreateworksheet","deleteWorksheet","ondeleteworksheet","It was not possible to rename worksheet due conflict name","onrenameworksheet","onmoveworksheet","onopenworksheet","jss_","TABLE","Element is not a table","colgroup > col",
41
+ "data-celltype","readOnly","name","id",":scope > thead > tr",":scope > tr, :scope > tbody > tr","data-formula","class","styleBold","; font-weight:bold;","font-weight:bold;","tfoot tr","\r","\n","jss_ignore","THEAD","TBODY","TFOOT","selectall","header-group","jtabs-headers","filters","footer","jtoolbar","DIV","html","jss_nowrap","insertHTML","<br/>\n","Process","A","mailto:","_blank","onclick","jclose","col-resize","row-resize","move","DOM el not found","Cloud plugin not loaded.","jtabs","jss_dialog",
42
+ "jss_number","decimal","data-locale","%","jss_percent","\\[Red\\]","red","\\(","jss_notes","145px","tag","jss_dropdown_tags","jss_dropdown","multiple","image","<div class='jss_dropdown_icon' style='background-color: ","'></div>","orange","<div class='jss_dropdown_tag' style='background-color: ","'>","</div>","&lt;","timepicker","YYYY-MM-DD","square","100px","false","FALSE","disabled","TRUE","jss_progressbar","min","max","jss_rating"," stars","star","href","IMG","round","100%","jss_image","tabindex",
43
+ "jpanel","delete","jfile",'<img src="','" alt="">',"jss_richtext","jss_tags","40px","#NOTFOUND","<img src='","' class='round small' />","Jspreadsheet: worksheet not found "];
44
+ (function(E,H){typeof exports===_$_496c[88]&&typeof module!==_$_496c[13]?module.exports=H():typeof define===_$_496c[89]&&define.amd?define(H):E.jspreadsheet=E.jexcel=H()})(this,function(){_$_496c[0];var E=function(h,a){h=jSuites.translate(h);if(a&&a.length)for(var c=0;c<a.length;c++)h=h.replace(_$_496c[1]+c+_$_496c[2],a[c]);return h},H=function(h,a){Array.isArray(h)&&(h=h[0]);h=h.replace(new RegExp(/'/g),_$_496c[3]).toUpperCase();if(void 0===a)return window[h]?window[h]:null;window[h]=a},L=function(){var h=
45
+ {version:_$_496c[4],edition:_$_496c[5],host:_$_496c[6],license:_$_496c[7],print:function(){return[_$_496c[8]+this.edition+_$_496c[9]+this.version+_$_496c[10]+this.host+_$_496c[10]+this.license]}};return function(){return h}}(),V=function(h){var a=parseInt(h.y);if(h.id)var c=parseInt(h.id);else h.value&&(c=parseInt(h.value));0<c&&(this.rows[a].id=c,va[_$_496c[11]].call(this,c))},Q=function(h){return(_$_496c[3]+h).substr(0,1)===_$_496c[12]},da=function(h){var a=this.options.columns;return a[h]&&a[h].name?
46
+ a[h].name:h},P=function(h,a,c){var b;if(b=this.options.data[a]){var d=0<=h?da.call(this,h):h;typeof c===_$_496c[13]?c=typeof d===_$_496c[14]?b[h]:jSuites.path.call(b,_$_496c[3]+d):(typeof d===_$_496c[14]?b[h]=c:jSuites.path.call(b,_$_496c[3]+d,c),!Q(c)&&this.records[a][h]&&(this.records[a][h].v=c))}else c=null;return c},R=function(h){return 0==this.config.editable||h&&0==h.options.editable?!1:(h=Ja.call(this))?7<=h?!0:!1:!0},Ka=function(h){var a=_$_496c[15];if(this.parent)var c=this.parent.config,
47
+ b=this.parent.element,d=this;else c=this.config,b=this.element,d=v.current?v.current:null;typeof h===_$_496c[13]&&(h=!b.classList.contains(a));h?(b.classList.add(a),c.fullscreen=!0):(b.classList.remove(a),c.fullscreen=!1);d&&(I.call(d,!0),fa.update.call(d.parent,d))},La=function(h){var a=this.loading;null===h&&(h=a.style.display==_$_496c[16]?!0:!1);a.style.display=h?_$_496c[16]:_$_496c[3];setTimeout(function(){a.style.display=_$_496c[3]},1E3)},Ga=function(h,a){if(typeof h===_$_496c[17]){var c=F.getCoordsFromColumnName(h);
48
+ c=this.records[c[1]][c[0]];if(c.element)h=c.element;else return typeof a===_$_496c[13]?c.readonly:c.readonly=a?!0:!1}c=_$_496c[18];h=h.classList;if(typeof a===_$_496c[13])return h.contains(c)?!0:!1;a?h.add(c):h.remove(c)},ya=function(h){var a=_$_496c[19],c=this.table.classList;if(typeof h==_$_496c[13])return c.contains(a)?!1:!0;h?c.remove(a):c.add(a);I.call(this,!0)},Ja=function(h){if(void 0===h)return this.status;var a=document.createElement(_$_496c[20]);a.style.textAlign=_$_496c[21];a.style.fontSize=
49
+ _$_496c[22];a.style.cursor=_$_496c[23];a.onclick=function(){window.location.href=L().host+_$_496c[24]};var c=null,b=[],d=[74,50,48,50,48,33].join(_$_496c[3]);(function(f){c=1;try{if(f){var g=window.atob(f);g=g.split(_$_496c[25]);if(g[1]){g[1]=window.atob(g[1]);var k=g[0];f=d;var l=g[1],n=jSuites.sha512,q=_$_496c[3],p=_$_496c[3];128<f.length&&(f=n(f));for(var u=0;128>u;u++){var x=f[u]?f[u].charCodeAt(0):0;q+=String.fromCharCode(54^x);p+=String.fromCharCode(92^x)}var w=n(p+n(q+l));if(k!=w)c=3;else if(g[1]=
50
+ JSON.parse(g[1]),g[1].date){var y=window.location.hostname||_$_496c[26];k=!1;if(-1===y.indexOf(_$_496c[27]))for(var B=0;B<g[1].domain.length;B++)y===g[1].domain[B]&&(k=!0);else for(B=0;B<g[1].domain.length;B++)-1!==y.indexOf(g[1].domain[B])&&y.substr(y.indexOf(g[1].domain[B]))==g[1].domain[B]&&(k=!0);!1===k?c=4:g[1].scope&&0<=g[1].scope.indexOf(_$_496c[28])?(y=new Date,k=parseInt(y.getTime()/1E3),B=L(),g[1].date<k?(c=g[1].date+2592E3<k&&!g[1].plan||g[1].date+15552E3<k?6:7,B.license=g[1].name+_$_496c[29]):
51
+ (c=8,B.license=_$_496c[30]+g[1].name,B.edition=3==g[1].plan||6==g[1].plan||31==g[1].plan||33==g[1].plan?_$_496c[31]:_$_496c[5],b=g[1].scope)):c=5}else c=4}else c=2}}catch(D){}})(h);h=_$_496c[3];if(1==c)h=_$_496c[32];else if(2==c||3==c||4==c)h=_$_496c[33];else if(5==c)h=_$_496c[34];else if(6==c||7==c)h=_$_496c[35];a.appendChild(document.createTextNode(h));if(8>c)try{if(typeof sessionStorage!==_$_496c[13]&&!sessionStorage.getItem(_$_496c[36])){sessionStorage.setItem(_$_496c[36],!0);var e=document.createElement(_$_496c[37]);
52
+ e.src=L().host+_$_496c[38]+_$_496c[39];e.style.display=_$_496c[40];a.appendChild(e)}}catch(f){}Object.defineProperty(this,_$_496c[41],{value:c,writable:!1,configurable:!1,enumerable:!1,extensible:!1});Object.defineProperty(this,_$_496c[42],{value:L().edition===_$_496c[31]?1:0,writable:!1,configurable:!1,enumerable:!1,extensible:!1});Object.defineProperty(this,_$_496c[43],{get:function(){return b},configurable:!1,enumerable:!1,extensible:!1});return a},I=function(){var h=function(l){-1==this.indexOf(l)&&
53
+ this.push(l)},a=function(l,n){if(!l||!n)return!1;var q=l.length;if(q!=n.length)return!1;for(;q--;)if(l[q]!==n[q])return!1;return!0},c=function(l){var n=null,q,p,u=0,x={},w=!1;for(q=0;q<this.options.columns.length;q++)if(-1===l.indexOf(q)){if(oa.attached.call(this,q)){this.headers[q].remove();this.colgroup[q].remove();if(this.options.footers)for(p=0;p<this.options.footers.length;p++)this.footers.content[p][q].element&&this.footers.content[p][q].element.parentNode&&this.footers.content[p][q].element.remove();
54
+ w=!0}for(p=0;p<this.visibleRows.length;p++){var y=this.records[this.visibleRows[p]][q];y.element&&y.element.parentNode&&y.element.remove()}}if(this.options.nestedHeaders)for(p=0;p<this.thead.children.length-1;p++)u+=this.thead.children[p].offsetHeight;for(q=0;q<l.length;q++){var B=l[q];var D=Ca.create.call(this,B);if(n){if(!D.parentNode){this.headerContainer.insertBefore(D,this.headerContainer.children[n].nextSibling);this.colgroupContainer.insertBefore(this.colgroup[B],this.colgroupContainer.children[n].nextSibling);
55
+ if(this.options.footers)for(p=0;p<this.options.footers.length;p++)this.tfoot.children[p].insertBefore(Z.create.call(this,B,p),this.tfoot.children[p].children[n].nextSibling);u&&(D.style.top+=u);w=!0}for(p=0;p<this.visibleRows.length;p++)y=this.visibleRows[p],y=S[_$_496c[46]].call(this,B,y),y.parentNode||this.tbody.children[p].insertBefore(y,this.tbody.children[p].children[n].nextSibling)}else{if(!D.parentNode){this.headerContainer.insertBefore(D,this.headerContainer.children[1]);this.colgroupContainer.insertBefore(this.colgroup[B],
56
+ this.colgroupContainer.children[1]);if(this.options.footers)for(p=0;p<this.options.footers.length;p++)this.tfoot.children[p].insertBefore(Z.create.call(this,B,p),this.tfoot.children[p].children[1]);u&&(D.style.top+=u);w=!0}for(p=0;p<this.visibleRows.length;p++)y=this.visibleRows[p],y=S[_$_496c[46]].call(this,B,y),y.parentNode||this.tbody.children[p].insertBefore(y,this.tbody.children[p].children[1])}if(this.options.mergeCells)for(p=0;p<this.visibleRows.length;p++)y=this.visibleRows[p],n=F.getColumnNameFromCoords(B,
57
+ y),this.options.mergeCells[n]&&(this.records[y][B].merged||(x[n]=!1));n=Array.prototype.indexOf.call(this.headerContainer.children,D)}u=0;if(this.options.nestedHeaders)for(p=0;p<this.options.nestedHeaders.length;p++){n=null;B=[];y=wa.getColumns.call(this,p);for(q=0;q<l.length;q++)void 0!==y[l[q]]&&-1==B.indexOf(y[l[q]])&&B.push(y[l[q]]);for(q=0;q<this.options.nestedHeaders[p].length;q++)-1==B.indexOf(q)&&this.nested.content[p][q]&&this.nested.content[p][q].element.offsetHeight&&this.nested.content[p][q].element.remove();
58
+ for(q=y=0;q<B.length;q++)D=wa.create.call(this,B[q],p),D.parentNode||(n?this.thead.children[p].children[n]?this.thead.children[p].insertBefore(D,this.thead.children[p].children[n].nextSibling):this.thead.children[p].appendChild(D):this.thead.children[p].insertBefore(D,this.thead.children[p].children[1]),D.style.top=u+_$_496c[47],this.options.freezeColumns&&this.options.nestedHeaders[p][B[q]].frozen&&(D.style.left=y+(ya.call(this)?50:0)+_$_496c[47],D.classList.add(_$_496c[48]))),y+=D.offsetWidth,n=
59
+ Array.prototype.indexOf.call(this.thead.children[p].children,D);u+=this.thead.children[p].offsetHeight}1==w&&(this.table.style.left=f.width.call(this,l[this.options.freezeColumns||0])+_$_496c[47]);pa.batch.call(this,x);this.visibleCols=l},b=function(l){var n=[],q=null,p,u=!1;for(p=0;p<this.tbody.children.length;p++)n.push(this.tbody.children[p]);for(p=0;p<n.length;p++){var x=parseInt(n[p].getAttribute(_$_496c[45]));-1===l.indexOf(x)&&(n[p].remove(),u=!0)}for(p=0;p<l.length;p++)n=ja.create.call(this,
60
+ l[p]),n.parentNode||(q?this.tbody.insertBefore(n,q.nextSibling):this.tbody.insertBefore(n,this.tbody.firstChild),u=!0),q=n;u&&(this.table.style.top=f.height.call(this,l[0])+_$_496c[47],this.visibleCols=null);this.visibleRows=l},d=function(){var l=[],n=0,q=null;if(I.limited.call(this)){var p=q=0;p=this.content.scrollLeft;var u=p+this.content.offsetWidth;q=this.options.columns;var x=null,w=this.options.freezeColumns||0,y=0;w&&(p+=ma.getWidth.call(this,!0));for(n=0;n<q.length;n++)x=oa.isVisible.call(this,
61
+ n)?parseInt(q[n].width):0,(y+x>p&&y<=u||n<w)&&h.call(l,n),y+=x;for(n=0;n<l.length;n++)if(p=pa.getAffected.call(this.merged.cols,l[n]))for(q=0;q<p.length;q++)h.call(l,p[q]);for(n=0;n<l.length;n++)if(p=wa.getAffected.call(this,l[n]))for(q=0;q<p.length;q++)this.options.columns[p[q]]&&h.call(l,p[q]);l.sort(function(B,D){return B-D})}else for(q=this.options.columns,n=0;n<q.length;n++)l.push(n);a(l,this.visibleCols)||c.call(this,l)},e=function(){var l=[],n=null,q=0,p=0;q=null;var u=0;if(I.limited.call(this)&&
62
+ !this.options.pagination){var x=0,w=0,y=0,B=0;if(n=this.options.frozenRows)for(p=0;p<n;p++)l.push(p);n=this.results?this.results:this.rows;x=this.content.scrollTop;w=x+this.content.offsetHeight;for(p=0;p<n.length;p++)q=this.results?n[p]:p,B=ja.height.call(this,q),y+B>x&&y<w&&l.push(q),y+=B}else for(n=this.results?this.results:this.rows,this.options.pagination?(q=parseInt(this.options.pagination)*this.pageNumber,u=q+parseInt(this.options.pagination),u>n.length&&(u=n.length)):(q=0,u=n.length),p=q;p<
63
+ u;p++)q=this.results?n[p]:p,l.push(q);if(this.options.mergeCells){for(p=0;p<l.length;p++)if(this.merged.rows[l[p]]&&(u=pa.getAffected.call(this.merged.rows,l[p])))for(q=0;q<u.length;q++)-1===l.indexOf(u[q])&&l.push(u[q]);l.sort(function(D,r){return D-r})}a(l,this.visibleRows)||b.call(this,l)},f=function(l,n){n&&(this.visibleCols=this.visibleRows=null);f.calculate.call(this);f.update.call(this);if(!0!==l){var q=this;this.content.addEventListener(_$_496c[49],function(){f.ignore||f.update.call(q)});
64
+ this.content.addEventListener(_$_496c[50],function(p){if(I.limited.call(q)&&!q.options.pagination){var u=Math.abs(p.deltaX),x=Math.abs(p.deltaY);p.shiftKey||u>x?0>p.deltaX||0>p.deltaY?f.left.call(q):f.right.call(q):0>p.deltaY?f.up.call(q):f.down.call(q);p.preventDefault()}})}};f.calculate=function(){if(I.limited.call(this)){var l=ma.getWidth.call(this);this.width=f.width.call(this)+(l?l:1);this.height=f.height.call(this);this.scrollX.style.width=this.width+100+_$_496c[47];this.scrollY.style.height=
65
+ this.height+100+_$_496c[47]}};f.update=function(){e.call(this);d.call(this);Aa.update.call(this);ma.refresh.call(this);aa.refresh.call(this)};f[_$_496c[51]]=function(l,n){null!==l&&(l=f.height.call(this,l),this.content.scrollTop=l);void 0!==n&&null!==n&&(n=f.width.call(this,n),this.content.scrollLeft=n)};f.x=0;f.y=0;f.up=function(l){if(l)this.content.scrollTop=0,f.y=null;else if(this.tbody.firstChild){l=f.y?f.y:f.y=this.tbody.firstChild.getAttribute(_$_496c[45]);for(var n,q=l;0<l;)if(l--,n=this.results?
66
+ this.results[l]:l,!this.rows[n]||!0!==this.rows[n].visible){q=n;break}l=q;n=ja.height.call(this,l);ja.attached.call(this,l)||(n+=this.content.scrollTop-this.table.offsetTop);this.content.scrollTop-=n;0<f.y&&f.y--}};f.down=function(l){l?this.content.scrollTop=this.content.scrollHeight:this.tbody.firstChild&&(this.content.scrollTop+=this.tbody.firstChild.offsetHeight);f.y=null};f.left=function(l){var n=this.options.freezeColumns||0;if(l)this.content.scrollLeft=0,f.x=null;else{for(n=l=f.x?f.x:f.x=this.thead.lastChild.children[1+
67
+ n].getAttribute(_$_496c[44]);0<l;)if(l--,oa.isVisible.call(this,l)){n=l;break}l=n;n=parseInt(this.options.columns[l].width);this.headers[l]&&this.headers[l].parentNode||(n+=this.content.scrollLeft-this.table.offsetLeft);this.content.scrollLeft-=n;0<f.x&&f.x--}};f.right=function(l){var n=this.options.freezeColumns||0;this.content.scrollLeft=l?this.content.scrollWidth:this.content.scrollLeft+this.thead.lastChild.children[1+n].offsetWidth;f.x=null};var g=function(){f.y=null;for(var l,n=this.content.offsetHeight-
68
+ this.thead.offsetHeight,q=0,p=0;p<this.tbody.children.length;p++)l=this.tbody.children[p].offsetHeight,n>l&&(q+=l,n-=l);return q},k=function(){f.x=null;for(var l,n=this.content.offsetWidth-ma.getWidth.call(this),q=(this.options.freezeColumns||0)+1,p=0,u=0;u<this.thead.lastChild.children.length;u++)l=this.thead.lastChild.children[q].offsetWidth,n>l&&(p+=l,n-=l);return p};f.pageUp=function(){this.content.scrollTop-=g.call(this)};f.pageDown=function(){this.content.scrollTop+=g.call(this)};f.pageLeft=
69
+ function(){this.content.scrollLeft-=k.call(this)};f.pageRight=function(){this.content.scrollLeft+=k.call(this)};f.build=function(l){var n=document.createElement(_$_496c[20]);n.className=_$_496c[52]+l;return n};f.width=function(l,n){for(var q=this.options.columns,p=0,u=this.options.freezeColumns||0;u<this.options.columns.length;u++){if(l===u)return p;oa.isVisible.call(this,u)&&(p+=parseInt(q[u].width));if(p>=n)return u}return n?u:p};f.height=function(l,n){for(var q=0,p=0,u=this.results?this.results:
70
+ this.rows,x=0;x<u.length;x++){p=x;this.results&&(p=u[x]);if(l===p)return q;this.rows[p]&&!1!==this.rows[p].visible&&(q+=ja.height.call(this,p));if(q>=n)return p}return n?p:q};f.adjust=function(l,n,q){var p=this.records[n][l].element;if(p)if(0==q||2==q){n=0;var u=ya.call(this)?50:0;this.options.freezeColumns&&(n=ma.getWidth.call(this,!0));n=this.content.scrollLeft+n;var x=this.content.scrollLeft+(this.content.offsetWidth-u);u=this.table.offsetLeft+p.offsetLeft-u;var w=p.offsetWidth;0==q?u+w<x&&l>this.options.freezeColumns-
71
+ 1&&u<n&&(p.offsetHeight?(q=this.content.scrollLeft+(u-n),f.setX.call(this,q)):f[_$_496c[51]].call(this,null,l)):l>this.options.freezeColumns-1&&(u>n?u+w>x&&(p.parentNode?(q=this.content.scrollLeft+(u+w-x+16),f.setX.call(this,q)):f[_$_496c[51]].call(this,null,l)):f[_$_496c[51]].call(this,null,l))}else l=this.content.scrollTop,x=l+this.content.offsetHeight-this.thead.offsetHeight-16,u=this.table.offsetTop+p.offsetTop-this.thead.offsetHeight,w=p.offsetHeight,1==q?u+w<x&&(u+4<l?p.offsetHeight?4<l-u&&
72
+ (q=this.content.scrollTop+(u-l),f.setY.call(this,q)):f[_$_496c[51]].call(this,n):p.offsetHeight||f[_$_496c[51]].call(this,n)):u>l?u+w>x&&(p.parentNode?(q=this.content.scrollTop+(u+w-x),f.setY.call(this,q)):f[_$_496c[51]].call(this,n)):p.offsetHeight||f[_$_496c[51]].call(this,n);else 0==q||2==q?f[_$_496c[51]].call(this,null,l):f[_$_496c[51]].call(this,n)};f.setX=function(l){f.ignore=!0;this.content.scrollLeft=l;f.ignore=!1};f.setY=function(l){f.ignore=!0;this.content.scrollTop=l;f.ignore=!1};f.limited=
73
+ function(){return 1==this.options.tableOverflow||1==this.parent.config.fullscreen};return f}(),Ma=function(h,a,c,b){var d=a,e=null;if(this.results&&(a=this.results.indexOf(a),-1==a))return d;for(;0<a;){a--;var f=this.results?this.results[a]:a;if(!1!==this.rows[f].visible){var g=this.records[f][h].v===_$_496c[3]?!1:!0;null===e&&(e=g);if(this.records[f][h].element&&this.records[f][h].element.classList.contains(_$_496c[53])){if(this.records[f][h].merged){d=f-this.records[f][h].merged[1];if(!c)break;
74
+ g=!0}}else{if(c&&g!==e&&!b)break;if(c)d=this.records[f][h].merged?f-this.records[f][h].merged[1]:f;else return f}e=g}}return d},Na=function(h,a,c,b){for(var d=this.options.columns,e=h,f,g=null;0<h;)if(h--,!1!==d[h].visible&&d[h].type!==_$_496c[54]){f=!1;this.records[a]&&(f=this.records[a][h].merged?this.records[a-this.records[a][h].merged[1]][h-this.records[a][h].merged[0]].v?!0:!1:this.records[a][h].v?!0:!1);null===g&&(g=f);if(this.records[a]&&this.records[a][h].element&&this.records[a][h].element.classList.contains(_$_496c[53])){if(this.records[a][h].merged&&
75
+ (e=h-this.records[a][h].merged[0],!c))break}else{if(c&&f!==g&&!b)break;if(c)e=h;else return h}g=f}return e},Sa=function(){var h=function(c,b,d,e){1==c||3==c?ja.attached.call(this,d)||(0<this.options.pagination?this.page(this.whichPage(d)):1==c?I.up.call(this,e):I.down.call(this,e)):S.attached.call(this,b,d)||(0==c?I.left.call(this,e):I.right.call(this,e))},a=function(c){c.up=a.up;c.down=a.down;c.right=a.right;c.left=a.left;c.last=a.last;c.first=a.first};a.up=function(c,b,d){if(Array.isArray(this.selectedCell)){if(c)var e=
76
+ parseInt(this.selectedCell[2]),f=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),f=parseInt(this.selectedCell[1]);d=Ma.call(this,e,f,b,d);d!=f&&(f=d,c?(c=this.selectedCell[0],d=this.selectedCell[1]):(c=e,d=f,e=c,f=d),h.call(this,1,e,f,b),ka[_$_496c[11]].call(this,c,d,e,f),I.adjust.call(this,e,f,1))}};a.down=function(c,b,d){if(Array.isArray(this.selectedCell)){if(c)var e=parseInt(this.selectedCell[2]),f=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),f=parseInt(this.selectedCell[1]);
77
+ a:{var g=e,k=f,l=k,n=null;if(this.results){k=this.results.indexOf(k);if(-1==k){d=l;break a}var q=this.results.length-1}else q=this.rows.length-1;for(;k<q;){k++;var p=this.results?this.results[k]:k;if(!1!==this.rows[p].visible){var u=this.records[p][g].v===_$_496c[3]?!1:!0;null===n&&(n=u);if(this.records[p][g].element&&this.records[p][g].element.classList.contains(_$_496c[53])){if(this.records[p][g].merged){if(!this.records[p][g].merged[1]&&(l=p,!b))break;u=!0}}else if(b&&u!==n&&!d){d=l;break a}else if(b)l=
78
+ p;else{d=p;break a}n=u}}d=l}d!=f&&(f=d,c?(c=this.selectedCell[0],d=this.selectedCell[1]):(c=e,d=f,e=c,f=d),h.call(this,3,e,f,b),ka[_$_496c[11]].call(this,c,d,e,f),I.adjust.call(this,e,f,3))}};a.right=function(c,b,d){if(Array.isArray(this.selectedCell)){if(c)var e=parseInt(this.selectedCell[2]),f=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),f=parseInt(this.selectedCell[1]);a:{for(var g=e,k=f,l=this.options.columns,n=g,q,p=null;g<l.length-1;)if(g++,!1!==l[g].visible&&l[g].type!==
79
+ _$_496c[54]){q=!1;this.records[k]&&(q=this.records[k][g].merged?this.records[k-this.records[k][g].merged[1]][g-this.records[k][g].merged[0]].v?!0:!1:this.records[k][g].v?!0:!1);null===p&&(p=q);if(this.records[k]&&this.records[k][g].element&&this.records[k][g].element.classList.contains(_$_496c[53])){if(this.records[k][g].merged&&g==g+this.records[k][g].merged[0]&&(n=g,!b))break}else if(b&&q!==p&&!d){d=n;break a}else if(b)n=g;else{d=g;break a}p=q}d=n}d!=e&&(e=d,c?(c=this.selectedCell[0],d=this.selectedCell[1]):
80
+ (c=e,d=f,e=c,f=d),h.call(this,2,e,f,b),ka[_$_496c[11]].call(this,c,d,e,f),I.adjust.call(this,e,f,2))}};a.left=function(c,b,d){if(Array.isArray(this.selectedCell)){if(c)var e=parseInt(this.selectedCell[2]),f=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),f=parseInt(this.selectedCell[1]);d=Na.call(this,e,f,b,d);d!=e&&(e=d,c?(c=this.selectedCell[0],d=this.selectedCell[1]):(c=e,d=f,e=c,f=d),h.call(this,0,e,f,b),ka[_$_496c[11]].call(this,c,d,e,f),I.adjust.call(this,e,f,0))}};a.first=
81
+ function(c,b){Array.isArray(this.selectedCell)&&(b?a.up.call(this,c,!0,!0):a.left.call(this,c,!0,!0))};a.last=function(c,b){Array.isArray(this.selectedCell)&&(b?a.down.call(this,c,!0,!0):a.right.call(this,c,!0,!0))};return a}(),Ta=function(){return function(h){h.save=Oa;h.fullscreen=Ka;h.setReadOnly=Ga;h.getReadOnly=Ga;h.isReadOnly=Ga;h.setPlugins=function(a){ra.call(this.parent,a)};h.showIndex=function(){ya.call(this,!0)};h.hideIndex=function(){ya.call(this,!1)};h[_$_496c[51]]=I[_$_496c[51]];h.undo=
82
+ function(){W.undo.call(h.parent)};h.redo=function(){W.redo.call(h.parent)};h.isEditable=function(){return R.call(h.parent,h)};h.dispatch=function(){return G.apply(this.parent,arguments)};h.setViewport=function(a,c){this.options.tableOverflow=!0;a=parseInt(a);c=parseInt(c);this.content.classList.add(_$_496c[55]);150<a&&(this.options.tableWidth=a+_$_496c[47],this.content.style.width=this.options.tableWidth);150<c&&!this.options.pagination&&(this.options.tableHeight=parseInt(c)+_$_496c[47],this.content.style.height=
83
+ this.options.tableHeight);I.call(this,!0);fa.update.call(this.parent,this);G.call(this.parent,_$_496c[56],a,c)};h.helpers=F}}(),Da=function(){var h={logo:null,url:null,persistence:!1,sequence:!0,data:null,json:null,rows:[],columns:[],cells:{},role:null,nestedHeaders:null,defaultColWidth:100,defaultRowHeight:0,defaultColAlign:null,minSpareRows:0,minSpareCols:0,minDimensions:[0,0],csv:null,csvFileName:_$_496c[36],csvHeaders:!0,csvDelimiter:_$_496c[25],columnSorting:!0,columnDrag:!0,columnResize:!0,
84
+ rowResize:!0,rowDrag:!0,editable:!0,allowInsertRow:!0,allowManualInsertRow:!0,allowInsertColumn:!0,allowManualInsertColumn:!0,allowDeleteRow:!0,allowDeletingAllRows:!1,allowDeleteColumn:!0,allowRenameColumn:!0,allowComments:!0,selectionCopy:!0,mergeCells:{},search:!1,pagination:!1,paginationOptions:null,textOverflow:!1,tableOverflow:!1,tableHeight:_$_496c[57],tableWidth:null,resize:null,comments:null,meta:null,style:{},freezeColumns:0,orderBy:null,worksheetId:_$_496c[3],worksheetName:null,worksheetState:null,
85
+ filters:!1,footers:null,formify:null,applyMaskOnFooters:!1,pluginOptions:null,locked:!1,selectUnLockedCells:!0,selectLockedCells:!0,wrap:!1},a={application:_$_496c[58],cloud:null,root:null,definedNames:{},sorting:null,server:null,toolbar:null,editable:!0,allowExport:!0,includeHeadersOnDownload:!1,forceUpdateOnPaste:!1,loadingSpin:!1,fullscreen:!1,secureFormulas:!0,parseFormulas:!0,debugFormulas:!1,editorFormulas:!0,autoIncrement:!0,autoCasting:!0,stripHTML:!1,tabs:!1,allowDeleteWorksheet:!0,allowRenameWorksheet:!0,
86
+ allowMoveWorksheet:!0,moveDownOnEnter:!0,onevent:null,onclick:null,onload:null,onundo:null,onredo:null,onbeforesave:null,onsave:null,onbeforechange:null,onchange:null,onafterchanges:null,oncopy:null,onbeforepaste:null,onpaste:null,onbeforeinsertrow:null,oninsertrow:null,onbeforedeleterow:null,ondeleterow:null,onbeforeinsertcolumn:null,oninsertcolumn:null,onbeforedeletecolumn:null,ondeletecolumn:null,onmoverow:null,onmovecolumn:null,onresize:null,onresizerow:null,onresizecolumn:null,onselection:null,
87
+ onbeforecomments:null,oncomments:null,onbeforesort:null,onsort:null,onfocus:null,onblur:null,onmerge:null,onchangeheader:null,onchangefooter:null,onchangefootervalue:null,onchangenested:null,onchangenestedcell:null,oncreateeditor:null,oneditionstart:null,oneditionend:null,onchangestyle:null,onchangemeta:null,onbeforechangepage:null,onchangepage:null,onbeforecreateworksheet:null,oncreateworksheet:null,onrenameworksheet:null,ondeleteworksheet:null,onmoveworksheet:null,onopenworksheet:null,onchangerowid:null,
88
+ onbeforesearch:null,onsearch:null,onbeforefilter:null,onfilter:null,onopenfilter:null,oncreatecell:null,oncreaterow:null,oncreatecolumn:null,onbeforeformula:null,onformulachain:null,updateTable:null,contextMenu:null,parseTableFirstRowAsHeader:!1,parseTableAutoCellType:!1,plugins:null,about:!0,license:null,worksheets:null,validations:null},c=function(e,f){f=JSON.parse(JSON.stringify(f));var g={},k;for(k in f)e&&e.hasOwnProperty(k)?g[k]=e[k]:g[k]=f[k];return g},b=function(e){e&&(typeof e==_$_496c[17]&&
89
+ (e=JSON.parse(e)),this.options.data=e);this.options.json&&(this.options.data=this.options.json);this.options.data||(this.options.data=[]);e=this.options.columns.length;if(this.options.data&&typeof this.options.data[0]!==_$_496c[13]){var f=this.options.data[0].data&&0<Object.keys(this.options.data[0].data).length?Object.keys(this.options.data[0].data):Object.keys(this.options.data[0]);f.length>e&&(e=f.length)}this.options.minDimensions[0]>e&&(e=this.options.minDimensions[0]);e||(e=8);for(var g=0;g<
90
+ e;g++)this.options.columns[g]?this.options.columns[g].type||(this.options.columns[g].type=_$_496c[59]):this.options.columns[g]={type:_$_496c[59]},this.options.columns[g].type==_$_496c[60]&&(this.options.columns[g].type=_$_496c[61],this.options.columns[g].autocomplete=!0),!this.options.columns[g].name&&f&&f[g]&&Number(f[g])!=f[g]&&(this.options.columns[g].name=f[g]),this.options.columns[g].width||(this.options.columns[g].width=this.options.defaultColWidth),this.options.columns[g].type!=_$_496c[61]||
91
+ this.options.columns[g].source||(this.options.columns[g].source=[]),this.options.columns[g].type==_$_496c[61]&&this.options.columns[g].url&&jSuites.ajax({url:this.options.columns[g].url,index:g,method:_$_496c[62],dataType:_$_496c[63],worksheet:this,group:this.parent.name,success:function(k){this.worksheet.options.columns[this.index].source=k}})},d=function(e){e.getConfig=d[_$_496c[46]];e.setConfig=d[_$_496c[11]]};d.spreadsheet=function(e){this.config=c(e,a);1!=this.config.secureFormulas&&console.log(_$_496c[64])};
92
+ d.worksheet=function(e){var f=this;f.options=c(e,h);f.options.csv?jSuites.ajax({url:f.options.csv,method:_$_496c[62],dataType:_$_496c[59],group:f.parent.name,success:function(g){g=F.parseCSV(g,f.options.csvDelimiter);if(1==f.options.csvHeaders&&0<g.length)for(var k=g.shift(),l=0;l<k.length;l++)f.options.columns[l]||(f.options.columns[l]={type:_$_496c[59],width:f.options.defaultColWidth}),typeof f.options.columns[l].title===_$_496c[13]&&(f.options.columns[l].title=k[l]);b.call(f,g)}}):f.options.url?
93
+ jSuites.ajax({url:f.options.url,method:_$_496c[62],dataType:_$_496c[63],group:f.parent.name,success:function(g){b.call(f,g)}}):b.call(f)};d[_$_496c[46]]=function(){return this.options};d[_$_496c[11]]=function(e){typeof e==_$_496c[17]&&(e=JSON.parse(e));if(this.parent){f=Object.keys(e);for(g=0;g<f.length;g++)typeof h[f[g]]!==_$_496c[13]&&(this.options[f[g]]=e[f[g]]);this.content.style.resize=e.resize?e.resize:_$_496c[3];!0===e.filters?ea.show.call(this):!1===e.filters&&ea.hide.call(this);!0===e.search?
94
+ sa.show.call(this):!1===e.search&&sa.hide.call(this);!0===e.toolbar?fa.show.call(this.parent):!1===e.toolbar&&fa.hide.call(this.parent);e.minDimensions&&e.minDimensions[0]&&(f=parseInt(e.minDimensions[0])-this.headers.length,0<f&&this.insertColumn(f),f=parseInt(e.minDimensions[1])-this.rows.length,0<f&&this.insertRow(f));K.call(this,_$_496c[65],{data:JSON.stringify(e)})}else for(var f=Object.keys(e),g=0;g<f.length;g++)typeof a[f[g]]!==_$_496c[13]&&(this.config[f[g]]=e[f[g]])};return d}(),W=function(h){h=
95
+ function(a){if(1!=this.ignoreHistory){var c=++this.historyIndex;this.history=this.history.slice(0,c+1);this.history[c]=a}};h.undo=function(){if(0<=this.historyIndex)var a=this.history[this.historyIndex--];if(a){this.ignoreHistory=!0;var c=a.worksheet;c.openWorksheet();if(a.action==_$_496c[66])c.deleteRow(a.insertBefore?a.rowNumber:a.rowNumber+1,a.numOfRows);else if(a.action==_$_496c[67])c.insertRow(a.numOfRows,a.rowNumber,1,a.data),S.setAttributes.call(c,a.attributes);else if(a.action==_$_496c[68])c.deleteColumn(a.insertBefore?
96
+ a.columnNumber:a.columnNumber+1,a.numOfColumns);else if(a.action==_$_496c[69])c.insertColumn(a.numOfColumns,a.columnNumber,1,a.properties,a.data,a.extra),S.setAttributes.call(c,a.attributes);else if(a.action==_$_496c[70])c.moveRow(a.newValue,a.oldValue);else if(a.action==_$_496c[71])c.moveColumn(a.newValue,a.oldValue);else if(a.action==_$_496c[72])c.removeMerge(a.newValue,!0),c.setMerge(a.oldValue);else if(a.action==_$_496c[73])c.setMerge(a.oldValue);else if(a.action==_$_496c[74])c.setStyle(a.oldValue,
97
+ null,null,1);else if(a.action==_$_496c[75])c.setStyle(a.oldValue);else if(a.action==_$_496c[76])c.setWidth(a.column,a.oldValue);else if(a.action==_$_496c[77])c.setHeight(a.row,a.oldValue);else if(a.action==_$_496c[78])c.setHeader(a.column,a.oldValue);else if(a.action==_$_496c[79])c.setComments(a.oldValue);else if(a.action==_$_496c[80])c.orderBy(a.column,a.direction?0:1,a.oldValue,a.previousState);else if(a.action==_$_496c[81]||a.action==_$_496c[82]||a.action==_$_496c[83]){var b=[];for(var d=0;d<a.records.length;d++){var e=
98
+ {x:a.records[d].x,value:a.records[d].oldValue};void 0!==a.records[d].y&&(e.y=a.records[d].y);a.records[d].oldStyle&&(e.style=a.records[d].oldStyle);b.push(e)}c[a.action](b)}else a.action==_$_496c[84]?c.renameWorksheet(a.index,a.oldValue):a.action==_$_496c[85]&&c.moveWorksheet(a.t,a.f);a.selection&&c.updateSelectionFromCoords(a.selection);this.ignoreHistory=!1;G.call(this,_$_496c[86],c,a)}};h.redo=function(){if(this.historyIndex<this.history.length-1)var a=this.history[++this.historyIndex];if(a){this.ignoreHistory=
99
+ !0;var c=a.worksheet;c.openWorksheet();if(a.action==_$_496c[66])c.insertRow(a.numOfRows,a.rowNumber,a.insertBefore,a.data);else if(a.action==_$_496c[67])c.deleteRow(a.rowNumber,a.numOfRows);else if(a.action==_$_496c[68])c.insertColumn(a.numOfColumns,a.columnNumber,a.insertBefore,a.properties,a.data);else if(a.action==_$_496c[69])c.deleteColumn(a.columnNumber,a.numOfColumns);else if(a.action==_$_496c[70])c.moveRow(a.oldValue,a.newValue);else if(a.action==_$_496c[71])c.moveColumn(a.oldValue,a.newValue);
100
+ else if(a.action==_$_496c[72])c.setMerge(a.newValue);else if(a.action==_$_496c[73])c.removeMerge(a.newValue);else if(a.action==_$_496c[74])c.setStyle(a.newValue,null,null,1);else if(a.action==_$_496c[75])c.resetStyle(a.cells);else if(a.action==_$_496c[76])c.setWidth(a.column,a.newValue);else if(a.action==_$_496c[77])c.setHeight(a.row,a.newValue);else if(a.action==_$_496c[78])c.setHeader(a.column,a.newValue);else if(a.action==_$_496c[79])c.setComments(a.newValue);else if(a.action==_$_496c[80])c.orderBy(a.column,
101
+ a.direction,a.newValue);else if(a.action==_$_496c[81]||a.action==_$_496c[82]||a.action==_$_496c[83])c[a.action](a.records);else a.action==_$_496c[84]?c.renameWorksheet(a.index,a.newValue):a.action==_$_496c[85]&&c.moveWorksheet(a.f,a.t);a.selection&&c.updateSelectionFromCoords(a.selection);this.ignoreHistory=!1;G.call(this,_$_496c[87],c,a)}};return h}(),ra=function(){var h=function(a){var c=null;if(Array.isArray(a))c=a;else if(typeof a==_$_496c[88]){c=[];var b=Object.keys(a);for(var d=0;d<b.length;d++)c.push({name:b[d],
102
+ plugin:a[b[d]],options:{}})}if(c&&c.length)for(d=0;d<c.length;d++){if(c[d].name&&c[d].plugin){var e=c[d].name;var f=c[d].plugin;var g=c[d].options}typeof f===_$_496c[89]&&(this.plugins[e]=f.call(v,this,g,this.config),typeof f.license==_$_496c[89]&&v.license&&f.license(v.license))}};h.execute=function(a,c){if(this.plugins){var b=Object.keys(this.plugins);if(b.length)for(var d=0;d<b.length;d++)if(typeof this.plugins[b[d]][a]==_$_496c[89]){var e=this.plugins[b[d]][a].apply(this.plugins[b[d]],c);e&&(a==
103
+ _$_496c[90]&&(c[4]=e),a==_$_496c[91]&&(c[0]=e))}return c}};h.onevent=function(a){return function(){var c,b,d=this.plugins;if(d){var e=Object.keys(d);if(e.length)for(b=0;b<e.length;b++)if(typeof d[e[b]][a]==_$_496c[89]){var f=d[e[b]][a].apply(d[e[b]],arguments);typeof f!==_$_496c[13]&&(c=f)}}return c}}(_$_496c[92]);return h}(),ha=function(){var h=function(a){a.getEditor=h[_$_496c[46]];a.openEditor=h.open;a.closeEditor=h.close};h[_$_496c[46]]=function(a,c){a=Ha[_$_496c[46]].call(this,a,c);return[a.type&&
104
+ typeof a.type==_$_496c[88]?a.type:v.editors[a.type],a]};h.open=function(a,c,b){if(!R.call(this.parent,this))return!1;if(1!=a.classList.contains(_$_496c[18])){var d=parseInt(a.getAttribute(_$_496c[44])),e=parseInt(a.getAttribute(_$_496c[45]));if(!0===this.options.locked){var f=F.getColumnNameFromCoords(d,e);if(!this.options.cells||!this.options.cells[f]||!1!==this.options.cells[f].locked)return!1}if(f=this.records[e][d].merged)d-=f[0],e-=f[1],a=this.records[e][d].element;if(!S.attached.call(this,d,
105
+ e)){if(this.results&&0<this.results.length)return console.error(_$_496c[93]),!1;var g=f=null;oa.attached.call(this,d)||(f=d);ja.attached.call(this,e)||(g=e);I[_$_496c[51]].call(this,g,f)}h.position.call(this,d,e);f=this.parent.input;if(113===b.keyCode||b.type!==_$_496c[94])f.selected=!0;f.innerText=_$_496c[3];G.call(this.parent,_$_496c[95],this,a,d,e);c=1==c?_$_496c[3]:P.call(this,d,e);g=h[_$_496c[46]].call(this,d,e);var k=!0;typeof g[0].openEditor==_$_496c[89]&&(!1===g[0].openEditor(a,c,d,e,this,
106
+ g[1],b)?k=!1:G.call(this.parent,_$_496c[96],this,a,d,e,f,g[1]));k&&(1==this.options.textOverflow&&(this.records[e][d].element.style.overflow=_$_496c[54],0<d&&(this.records[e][d-1].element.style.overflow=_$_496c[54])),this.edition=a,f.classList.add(_$_496c[97]),1==this.parent.config.editorFormulas&&Q(c)&&(f.classList.add(_$_496c[98]),na.parse.call(this,f),a=document.createTextNode(_$_496c[3]),f.appendChild(a),jSuites.focus(f)))}};h.close=function(a,c){null===a&&(a=this.edition);this.parent.input.classList.contains(_$_496c[98])&&
107
+ na.close.call(this,this.parent.input);var b,d=parseInt(a.getAttribute(_$_496c[44])),e=parseInt(a.getAttribute(_$_496c[45]));1==this.options.textOverflow&&(b=this.records[e][d+1])&&b.element&&b.element.innerText==_$_496c[3]&&(this.records[e][d].element.style.overflow=_$_496c[3]);b=h[_$_496c[46]].call(this,d,e);if(1==c){var f=null;typeof b[0].closeEditor==_$_496c[89]&&(b=b[0].closeEditor(a,!0,d,e,this,b[1]),void 0!==b&&(f=b));null!==f&&P.call(this,d,e)!=f&&this.setValue(a,f)}else b[0].closeEditor(a,
108
+ !1,d,e,this,b[1]);G.call(this.parent,_$_496c[99],this,a,d,e,f,c);b=this.parent.input;b.selected=!1;b.onblur&&(b.onblur=null);b.children[0]&&b.children[0].onblur&&(b.children[0].onblur=null);b.update&&(b.update=null);ha.build(this.parent);b.removeAttribute(_$_496c[100]);b.removeAttribute(_$_496c[101]);b.removeAttribute(_$_496c[102]);this.edition=b.mask=null;this.refreshBorders()};h.position=function(a,c){var b=null;if(b=this.records[c][a].element){var d=this.parent.element.getBoundingClientRect();
109
+ b=b.getBoundingClientRect();var e=this.parent.input;e.x=a;e.y=c;0==b.width&&0==b.height?e.style.opacity=_$_496c[103]:(e.setAttribute(_$_496c[104],_$_496c[3]),a=b.top-d.top+1,c=b.left-d.left+1,e.style.top=a+_$_496c[47],e.style.left=c+_$_496c[47],e.style.minWidth=b.width-1+_$_496c[47],e.style.minHeight=b.height-1+_$_496c[47],setTimeout(function(){e.focus()},0))}};h.build=function(a){a.input||(a.input=document.createElement(_$_496c[20]));a.input.className=_$_496c[105];a.input.setAttribute(_$_496c[106],
110
+ !0);a.input.innerText=_$_496c[3];a.input.oninput=function(c){1==v.current.parent.config.editorFormulas&&(Q(c.target.innerText)?(c.target.classList.add(_$_496c[98]),c.target.selected=!0):c.target.classList.contains(_$_496c[98])&&na.close.call(v.current,this))};a.input.onclick=function(){this.selected=!0};return a.input};return h}(),G=function(h){var a;if(!this.ignoreEvents){if(typeof this.config.onevent==_$_496c[89]){var c=this.config.onevent.apply(this,arguments);typeof c!==_$_496c[13]&&(a=c)}typeof this.config[h]==
111
+ _$_496c[89]&&(c=this.config[h].apply(this,Array.prototype.slice.call(arguments,1)),typeof c!==_$_496c[13]&&(a=c));c=ra.onevent.apply(this,arguments);typeof c!==_$_496c[13]&&(a=c)}return a},va=function(){var h=function(a){a.sequence=0;a.getNextSequence=h.next;a.getRowId=h.getId;a.setRowId=h.setId;a.getRowById=h.getRowById};h[_$_496c[46]]=function(){return this.sequence};h[_$_496c[11]]=function(a,c){if(a>this.sequence||c)this.sequence=a};h.next=function(){return 1==this.options.sequence?++this.sequence:
112
+ null};h.reset=function(){this.sequence=0};h.getId=function(a){if(this.rows[a]&&this.rows[a].id)return this.rows[a].id;var c=this.getPrimaryKey();if(!1!==c)return P.call(this,c,a)};h.setId=function(a,c){if(void 0!==c&&0<=parseInt(a)){var b={};b[a]=c}else b=a;a=Object.keys(b);if(a.length){for(var d=0;d<a.length;d++)c=b[a[d]],this.rows[a[d]].id=c,h[_$_496c[11]].call(this,c);K.call(this,_$_496c[107],[b]);G.call(this.parent,_$_496c[108],this,b)}};h.getRowById=function(a,c){for(var b=0;b<this.rows.length;b++)if(h.getId.call(this,
113
+ b)==a)return!0===c?this.rows[b]:this.options.data[b];return!1};return h}(),Oa=function(){var h=function(c){for(var b=[],d={},e=0;e<c.length;e++){var f=c[e].x,g=c[e].y,k=va.getId.call(this,g);if(!k)if(d[g])k=d[g];else if(k=va.next.call(this))d[g]=k;b[g]||(b[g]={id:k,row:g,data:{}});f=da.call(this,f);b[g].data[f]=c[e].value}va.setId.call(this,d);return b.filter(function(l){return null!=l})},a=function(c){var b=c[0];if(0<=[_$_496c[109],_$_496c[110],_$_496c[107],_$_496c[111]].indexOf(b))return!1;var d=
114
+ {};b==_$_496c[81]||b==_$_496c[112]?(b=_$_496c[113],d[b]=h.call(this,c[1].data)):Array.isArray(c[1])&&1==c[1].length?d[b]=c[1][0]:d[b]=c[1];return d};return function(c,b,d,e){var f=this.parent,g=this;d=null;var k=a.call(this,b);if(k)b=k;else if(!1===k)return!1;if(k=G.call(f,_$_496c[114],f,g,b))b=k;else if(!1===k)return!1;La.call(f,!0);jSuites.ajax({url:c,method:_$_496c[115],dataType:_$_496c[63],data:{data:JSON.stringify(b)},queue:!0,beforeSend:function(l){d&&l.setRequestHeader(_$_496c[116],_$_496c[117]+
115
+ d)},success:function(l){f.element.classList.contains(_$_496c[118])&&f.element.classList.remove(_$_496c[118]);l&&(l.message&&(l.name=f.config.application,jSuites.notification.isVisible()?console.log(l.name+_$_496c[119]+l.message):jSuites.notification(l)),l.success?typeof e===_$_496c[89]?e(l):l.data&&Array.isArray(l.data)&&S.updateAll.call(g,l.data):l.error&&(alert(_$_496c[120]),window.open(window.location.href,_$_496c[121])));G.call(f,_$_496c[122],f,g,b,l)},error:function(){f.element.classList.add(_$_496c[118])}})}}(),
116
+ K=function(){return function(){ra.execute.call(this.parent,_$_496c[123],[this,arguments[0],arguments[1]]);if(!this.parent.ignorePersistence){var h=null;if(this.parent.config.server){var a=this.parent.worksheets.indexOf(this);h=this.parent.config.server;h=-1==h.indexOf(_$_496c[124])?h+(_$_496c[125]+a):h+(_$_496c[126]+a)}else this.options.persistence&&(h=typeof this.options.persistence==_$_496c[17]?this.options.persistence:this.options.url);h&&Oa.call(this,h,arguments)}}}(),Ea=function(h){if(this.selectedCell){var a=
117
+ this.selectedCell[0],c=this.selectedCell[1];this.records&&this.records[c]&&this.records[c][a]&&this.records[c][a].element||(this.selectedCell=this.getHighlighted(),a=this.selectedCell[0],c=this.selectedCell[1]);var b=this.getHighlighted(),d=b[0],e=b[1],f=b[2];b=b[3];var g=h?_$_496c[127]:_$_496c[128];this.records[c]&&this.records[c][a]&&this.records[c][a].element&&(this.records[c][a].element.classList[g](_$_496c[129]),this.cursor=h?this.records[c][a].element:null);for(h=d;h<=f;h++)if(this.headers[h])this.headers[h].classList[g](_$_496c[130]);
118
+ for(;e<=b;e++)if(this.rows[e]&&this.rows[e].element)this.rows[e].element.classList[g](_$_496c[130])}},ka=function(){var h=function(a){a.resetSelection=h.reset;a.updateSelection=h.fromElements;a.updateSelectionFromCoords=h[_$_496c[11]];a.selectAll=h.all;a.isSelected=h.isSelected;a.getHighlighted=h.getHighlighted;a.getRange=h.getRange};h.getHighlighted=function(){var a=this.borders;return(a=a.main)?[a.x1,a.y1,a.x2,a.y2]:null};h.isSelected=function(a,c,b){if(!b&&(b=this.getHighlighted(),!b))return!1;
119
+ var d=b[0],e=b[1],f=b[2];b=b[3];f||(f=d);b||(b=e);return null==a?c>=e&&c<=b:null==c?a>=d&&a<=f:a>=d&&a<=f&&c>=e&&c<=b};h.reset=function(){if(this.selectedCell)a=1,this.edition&&ha.close.call(this,this.edition,!0),this.resetBorders(_$_496c[131],!0),this.resetBorders(_$_496c[132],!0),this.selectedCell=null,1==a&&G.call(this.parent,_$_496c[133],this);else var a=0;return a};h.refresh=function(){this.selectedCell&&h[_$_496c[11]].call(this,this.selectedCell)};h.isValid=function(a,c,b,d){return this?!(a>=
120
+ this.options.columns.length||c>=this.rows.length||b>=this.options.columns.length||d>=this.rows.length):!1};h[_$_496c[11]]=function(a,c,b,d,e,f,g){f||(f=_$_496c[131]);Array.isArray(a)&&(d=a[3],b=a[2],c=a[1],a=a[0]);null==b&&(b=a);null==d&&(d=c);if(!h.isValid.call(this,a,c,b,d))return!1;if(null!=a){if(parseInt(a)<parseInt(b))var k=parseInt(a),l=parseInt(b);else k=parseInt(b),l=parseInt(a);if(parseInt(c)<parseInt(d))var n=parseInt(c),q=parseInt(d);else n=parseInt(d),q=parseInt(c);var p;var u={};if(this.options.mergeCells){for(var x=
121
+ n;x<=q;x++)for(var w=k;w<=l;w++)if(p=this.records[x][w].merged)p=F.getColumnNameFromCoords(w-p[0],x-p[1]),u[p]=!0;x=Object.keys(u);if(x.length)for(w=0;w<x.length;w++)p=F.getCoordsFromColumnName(x[w]),u=this.options.mergeCells[x[w]],p[0]<k&&(k=p[0]),p[0]+u[0]-1>l&&(l=p[0]+u[0]-1),p[1]<n&&(n=p[1]),p[1]+u[1]-1>q&&(q=p[1]+u[1]-1)}}f==_$_496c[131]&&(this.selectedCell?(Ea.call(this,!1),p=1):p=0,this.selectedCell=[a,c,b,d],this.records[d][b].element&&e&&(w=e.target.getAttribute(_$_496c[44]),u=e.target.getAttribute(_$_496c[45]),
122
+ null!==w&&null!==u&&(I.adjust.call(this,b,d,3),I.adjust.call(this,b,d,2),I.adjust.call(this,b,d,1),I.adjust.call(this,b,d,0))),ha.position.call(this,a,c),0==p&&G.call(this.parent,_$_496c[134],this));aa[_$_496c[11]].call(this,k,n,l,q,f,g);f==_$_496c[131]&&(G.call(this.parent,_$_496c[135],this,k,n,l,q,e),fa.update.call(this.parent,this,this.selectedCell))};h.fromElements=function(a,c,b){var d=a.getAttribute(_$_496c[44]);a=a.getAttribute(_$_496c[45]);if(c){var e=c.getAttribute(_$_496c[44]);c=c.getAttribute(_$_496c[45])}else e=
123
+ d,c=a;h[_$_496c[11]].call(this,d,a,e,c,b)};h.all=function(){h[_$_496c[11]].call(this,0,0,this.options.columns.length-1,this.records.length-1)};h.getRange=function(){var a=this.selectedCell;if(!a)return _$_496c[3];var c=F.getColumnNameFromCoords(a[0],a[1]);a=F.getColumnNameFromCoords(a[2],a[3]);var b=this.options.worksheetName;b=-1!=b.indexOf(_$_496c[136])?_$_496c[137]+b+_$_496c[138]:b+_$_496c[139];return c==a?b+c:b+F.getRangeFromTokens(v.helpers.getTokensFromRange(c+_$_496c[140]+a))};return h}(),
124
+ aa=function(){var h=function(b){b.borders=[];b.setBorder=h[_$_496c[11]];b.getBorder=h[_$_496c[46]];b.resetBorders=h.reset;b.refreshBorders=h.refresh};h[_$_496c[46]]=function(b){return this.borders[b]};var a=function(b,d,e,f,g,k){if(!ka.isValid.call(this,b,d,e,f))return!1;var l=!1,n=null,q=null,p=null,u=null,x=null,w=this.options.freezeColumns||0;g||(g=0);this.borders[g]?n=this.borders[g]:(n={},n.element=document.createElement(_$_496c[20]),n.element.classList.add(_$_496c[141]),g==_$_496c[132]||g==
125
+ _$_496c[142]||g==_$_496c[131]?n.element.classList.add(_$_496c[143]+g):(k=k?k:jSuites.randomColor(!0),n.color=k,n.element.style.backgroundColor=k+_$_496c[144],n.element.style.borderColor=k),g==_$_496c[131]&&(w=function(D,r){n[D]=document.createElement(_$_496c[20]);n[D].classList.add(_$_496c[145]);n[D].setAttribute(_$_496c[146],r);n.element.appendChild(n[D]);!1===_$_496c[147]in document.documentElement&&(n[D].style.display=_$_496c[40])},w(_$_496c[148],0),n.moveLeft.style.left=_$_496c[149],n.moveLeft.style.marginTop=
126
+ _$_496c[150],n.moveLeft.style.marginLeft=_$_496c[150],w(_$_496c[151],1),n.moveTop.style.left=_$_496c[149],n.moveTop.style.marginTop=_$_496c[150],n.moveTop.style.marginLeft=_$_496c[150],w(_$_496c[152],2),n.moveRight.style.right=_$_496c[149],n.moveRight.style.marginTop=_$_496c[150],n.moveRight.style.marginRight=_$_496c[150],w(_$_496c[153],3),n.moveDown.style.bottom=_$_496c[149],n.moveDown.style.marginLeft=_$_496c[150],n.moveDown.style.marginBottom=_$_496c[150]),this.content.appendChild(n.element));
127
+ n.x1=b;n.y1=d;n.x2=e;n.y2=f;n.element.style.top=_$_496c[154];n.element.style.left=_$_496c[154];n.active=0;w=[];for(k=b;k<=e;k++)w.push(k);w=this.options.freezeColumns||0;k=this.visibleRows[0];var y=this.visibleRows[this.visibleRows.length-1],B=this.visibleCols[w];b>this.visibleCols[this.visibleCols.length-1]||f<k||d>y||e<B&&b>=w||(q=this.headers[b]&&this.headers[b].parentNode?this.headers[b].offsetLeft:0,this.headers[e]&&this.headers[e].parentNode?(oa.isVisible.call(this,e)||(e=Na.call(this,e,f)),
128
+ p=this.headers[e].offsetLeft):(p=this.thead.lastChild.lastChild.getAttribute(_$_496c[44]),p=w&&e<p?this.thead.lastChild.children[this.options.freezeColumns].offsetLeft:this.thead.lastChild.lastChild.offsetLeft),p=p-q+parseInt(this.options.columns[e].width)-1,q+=this.table.offsetLeft,u=this.rows[d].element&&this.rows[d].element.parentNode?this.rows[d].element.offsetTop:0,this.rows[f].element&&this.rows[f].element.parentNode?(!1===this.rows[f].visible&&(f=Ma.call(this,e,f)),x=this.rows[f].element.offsetTop+
129
+ this.rows[f].element.offsetHeight,n.element.style.borderBottomWidth=_$_496c[3]):(x=this.tbody.lastChild?this.tbody.lastChild.offsetTop+this.tbody.lastChild.offsetHeight:0,l=!0,n.element.style.borderBottomWidth=_$_496c[149]),x=x-u-1,u+=this.table.offsetTop,this.options.freezeColumns&&(n.element.style.borderLeftWidth=_$_496c[3],n.element.style.borderRightWidth=_$_496c[3],d=ma.getWidth.call(this),b=b<this.options.freezeColumns,e=e<this.options.freezeColumns,b&&e||(b&&!e?(e=this.content.scrollLeft+d,
130
+ e>q+p&&(p+=e-(q+p),n.element.style.borderRightWidth=_$_496c[149])):(e=this.content.scrollLeft+d,e>q&&(e-=q,e>p?q=u=-2E3:(q=q+e+1,p-=e,n.element.style.borderLeftWidth=_$_496c[149]))))),n.element.style.top=u+_$_496c[47],n.element.style.left=q+_$_496c[47],n.element.style.width=p+_$_496c[47],n.element.style.height=x+_$_496c[47],n.t=u,n.l=q,n.w=p,n.h=x,g==_$_496c[131]&&(n.moveLeft.style.top=n.h/2+_$_496c[47],n.moveRight.style.top=n.h/2+_$_496c[47],n.moveTop.style.left=n.w/2+_$_496c[47],n.moveDown.style.left=
131
+ n.w/2+_$_496c[47]),n.active=1);g==_$_496c[131]&&(l?(this.corner.style.top=_$_496c[154],this.corner.style.left=_$_496c[154]):(this.corner.style.top=u+x-2+_$_496c[47],this.corner.style.left=q+p-2+_$_496c[47]));this.borders[g]=n},c=function(b,d){b.element.style.top=_$_496c[154];b.element.style.left=_$_496c[154];b.active=0;d&&(b.x1=null,b.y1=null,b.x2=null,b.y2=null)};h[_$_496c[11]]=function(b,d,e,f,g,k){a.call(this,b,d,e,f,g,k);g==_$_496c[131]&&(Ea.call(this,!0),K.call(this,_$_496c[109],{x1:b,y1:d,x2:e,
132
+ y2:f}))};h.reset=function(b,d){b&&b!=_$_496c[131]||(this.corner.style.top=_$_496c[154],this.corner.style.left=_$_496c[154],Ea.call(this,!1));if(b)this.borders[b]&&c(this.borders[b],d);else for(var e=Object.keys(this.borders),f=0;f<e.length;f++)c(this.borders[e[f]],d);b&&b!=_$_496c[131]||K.call(this,_$_496c[110])};h.refresh=function(b){var d=this.borders;if(b)d[b]&&null!=d[b].x1&&a.call(this,d[b].x1,d[b].y1,d[b].x2,d[b].y2,b);else{b=Object.keys(d);for(var e=0;e<b.length;e++)d[b[e]]&&null!=d[b[e]].x1&&
133
+ a.call(this,d[b[e]].x1,d[b[e]].y1,d[b[e]].x2,d[b[e]].y2,b[e])}this.edition&&(d=this.parent.input,ha.position.call(this,d.x,d.y))};h.destroy=function(b){var d;this&&(d=this.borders[b])&&(d.element.remove(),delete this.borders[b])};return h}(),Ua=function(){var h=function(a){a.setGroup=h[_$_496c[11]];a.unsetGroup=h.unset};h[_$_496c[11]]=function(a,c,b){0==a&&(b=document.createElement(_$_496c[155]),b.classList.add(_$_496c[156]),this.thead.insertBefore(b,this.thead.firstChild),a=document.createElement(_$_496c[157]),
134
+ a.innerHTML=_$_496c[158],b.appendChild(a),a=document.createElement(_$_496c[157]),b.appendChild(a),c=this.headers[c])&&(c=c.querySelector(_$_496c[159]),c||(c=document.createElement(_$_496c[20]),c.classList.add(_$_496c[160]),c.innerText=_$_496c[161],a.appendChild(c)))};h.unset=function(a,c){};return h}(),za=function(){var h={start:function(a){if(!R.call(this.parent,this))return!1;if(null!==a.target.getAttribute(_$_496c[45])){var c=a.target.getAttribute(_$_496c[45]);h.event={y:parseInt(c),h:a.target.offsetHeight,
135
+ p:a.pageY}}else null!==a.target.getAttribute(_$_496c[44])&&(c=a.target.getAttribute(_$_496c[44]),h.event={x:parseInt(c),w:a.target.offsetWidth,p:a.pageX})},end:function(a){var c=[];if(null!=h.event.y){var b=parseInt(this.rows[h.event.y].element.offsetHeight);var d=this.getSelectedRows(!0);a=d.indexOf(parseInt(h.event.y));if(d.length&&-1<a)for(var e=0;e<d.length;e++)c.push(parseInt(this.rows[d[e]].element.offsetHeight));else d=[];-1==a?(d.push(h.event.y),c.push(h.event.h)):c[a]=h.event.h;this.setHeight(d,
136
+ b,c)}else if(null!=h.event.x){b=parseInt(this.colgroup[h.event.x].getAttribute(_$_496c[162]));d=this.getSelectedColumns();a=d.indexOf(parseInt(h.event.x));if(d.length&&-1<a)for(e=0;e<d.length;e++)c.push(parseInt(this.options.columns[d[e]].width));else d=[];-1==a?(d.push(h.event.x),c.push(h.event.w)):c[a]=h.event.w;this.setWidth(d,b,c)}h.event=null},update:function(a){null!=h.event.y?(a=a.pageY-h.event.p,0<h.event.h+a&&(this.rows[h.event.y].element.style.height=h.event.h+a+_$_496c[47],this.refreshBorders())):
137
+ null!=h.event.x&&(a=a.pageX-h.event.p,0<h.event.w+a&&(this.colgroup[h.event.x].setAttribute(_$_496c[162],h.event.w+a),this.options.columns[h.event.x].width=h.event.w+a,0<this.options.freezeColumns&&ma.getWidth.call(this),this.refreshBorders()))},cancel:function(){h.end.call(this)}};return h}(),Pa=function(){var h={start:function(a){var c=this.parent.helper;a=parseInt(a.target.getAttribute(_$_496c[44]));if(this.merged.cols[a])console.error(_$_496c[163]);else{h.event={x:a,d:a};this.headers[a].classList.add(_$_496c[164]);
138
+ for(var b=0;b<this.tbody.children.length;b++){var d=this.tbody.children[b].getAttribute(_$_496c[45]);this.records[d][a].element.classList.add(_$_496c[164])}b=this.parent.element.getBoundingClientRect();a=this.headers[a].getBoundingClientRect();d=this.content.getBoundingClientRect();c.style.display=_$_496c[16];c.style.top=d.top-b.top+_$_496c[47];c.style.left=a.left-d.left+_$_496c[47];c.style.width=_$_496c[165];c.style.height=d.height+_$_496c[47];c.classList.add(_$_496c[166])}},end:function(){this.headers[h.event.x].classList.remove(_$_496c[164]);
139
+ for(var a=0;a<this.tbody.children.length;a++){var c=this.tbody.children[a].getAttribute(_$_496c[45]);this.records[c][h.event.x].element.classList.remove(_$_496c[164])}null!=h.event.d&&h.event.x!=h.event.d&&(this.moveColumn(h.event.x,h.event.d),this.refreshBorders());this.parent.helper.classList.remove(_$_496c[166]);this.parent.helper.style.display=_$_496c[3];h.event=null},cancel:function(){h.event.d=null;h.end.call(this)},update:function(a){var c=a.target.getAttribute(_$_496c[44]);if(null!=c)if(c=
140
+ parseInt(c),this.merged.cols[c])console.error(_$_496c[163]);else{a=a.target.clientWidth/2>a.offsetX;h.event.d=a?h.event.x<c?parseInt(c)-1:parseInt(c):h.event.x>c?parseInt(c)+1:parseInt(c);c=this.headers[c].getBoundingClientRect();var b=this.content.getBoundingClientRect();this.parent.helper.style.left=(a?c.left:c.right)-b.left+_$_496c[47]}}};return h}(),ta=function(){var h={start:function(a){if(R.call(this.parent,this)){this.resetSelection();var c=this.parent.helper;if(null!==a.target.getAttribute(_$_496c[45])){var b=
141
+ parseInt(a.target.getAttribute(_$_496c[45]));this.merged.rows[b]?console.error(_$_496c[167]):this.results?console.error(_$_496c[168]):(h.event={y:b,d:b},this.rows[b].element.classList.add(_$_496c[164]),a=this.parent.element.getBoundingClientRect(),b=this.rows[b].element.getBoundingClientRect(),c.style.display=_$_496c[16],c.style.top=b.top-a.top+_$_496c[47],c.style.left=_$_496c[169],c.style.width=this.content.offsetWidth-50+_$_496c[47],c.style.height=_$_496c[165],c.classList.add(_$_496c[170]))}else if(null!==
142
+ a.target.getAttribute(_$_496c[44]))if(b=parseInt(a.target.getAttribute(_$_496c[44])),this.merged.cols[b])console.error(_$_496c[163]);else{h.event={x:b,d:b};this.headers[b].classList.add(_$_496c[164]);for(a=0;a<this.tbody.children.length;a++){var d=this.tbody.children[a].getAttribute(_$_496c[45]);this.records[d][b].element.classList.add(_$_496c[164])}a=this.parent.element.getBoundingClientRect();b=this.headers[b].getBoundingClientRect();d=this.content.getBoundingClientRect();c.style.display=_$_496c[16];
143
+ c.style.top=d.top-a.top+_$_496c[47];c.style.left=b.left-d.left+_$_496c[47];c.style.width=_$_496c[165];c.style.height=d.height+_$_496c[47];c.classList.add(_$_496c[166])}}else return!1},end:function(){if(null!=h.event.y)this.rows[h.event.y].element.classList.remove(_$_496c[164]),null!=h.event.d&&h.event.y!=h.event.d&&(this.moveRow(h.event.y,h.event.d),this.updateSelectionFromCoords(0,h.event.d,this.options.columns.length-1,h.event.d)),this.parent.helper.classList.remove(_$_496c[170]);else if(null!=
144
+ h.event.x){this.headers[h.event.x].classList.remove(_$_496c[164]);for(var a=0;a<this.tbody.children.length;a++){var c=this.tbody.children[a].getAttribute(_$_496c[45]);this.records[c][h.event.x].element.classList.remove(_$_496c[164])}null!=h.event.d&&h.event.x!=h.event.d&&(this.moveColumn(h.event.x,h.event.d),this.refreshBorders());this.parent.helper.classList.remove(_$_496c[166])}this.parent.helper.style.display=_$_496c[3];h.event=null},cancel:function(){h.event.d=null;h.end.call(this)},update:function(a){if(null!=
145
+ h.event.y){var c=a.target.getAttribute(_$_496c[45]);if(null!=c){var b=c=parseInt(c),d=a.target.clientHeight/2>a.offsetY;d?h.event.y<c&&(b=c-1):h.event.y>c&&(b=c+1);a=!1;this.merged.rows[b]&&(h.event.y>b?this.merged.rows[b-1]&&(a=!0):this.merged.rows[b+1]&&(a=!0));a||(h.event.d=b,b=this.parent.element.getBoundingClientRect(),c=this.rows[c].element.getBoundingClientRect(),this.parent.helper.style.top=(d?c.top:c.bottom)-b.top+_$_496c[47])}}else d=a.target.getAttribute(_$_496c[44]),null!=d&&(b=d=parseInt(d),
146
+ (c=a.target.clientWidth/2>a.offsetX)?h.event.x<d&&(b=d-1):h.event.x>d&&(b=d+1),a=!1,this.merged.cols[b]&&(h.event.x>b?this.merged.cols[b-1]&&(a=!0):this.merged.cols[b+1]&&(a=!0)),a||(h.event.d=b,b=this.headers[d].getBoundingClientRect(),d=this.content.getBoundingClientRect(),this.parent.helper.style.left=(c?b.left:b.right)-d.left+_$_496c[47]))}};return h}(),pa=function(){var h=function(a){a.getMerge=h[_$_496c[46]];a.setMerge=h[_$_496c[11]];a.updateMerge=h.update;a.removeMerge=h.remove;a.destroyMerged=
147
+ a.destroyMerge=h.destroy};h.isMerged=function(a,c){var b=F.getColumnNameFromCoords(a,c);if(b=this.merged.cells[b])if(i=this.options.mergeCells[b])m&&void 0!==m[b]||(i[1]>t&&(t=i[1]),m&&(m[b]=this.records[c][a].element&&!this.records[c][a].merged?!0:!1))};h.getAffected=function(a){if(void 0!==this[a]){for(var c=a,b=this[a],d=[];this[c]==b;)d.push(c),c--;for(c=a+1;this[c]==b;)d.push(c),c++;d.sort(function(e,f){return e-f});return d}return!1};h[_$_496c[46]]=function(a){return a?this.options.mergeCells[a]:
148
+ this.options.mergeCells};h[_$_496c[11]]=function(a,c,b){if(!R.call(this.parent,this))return!1;this.options.mergeCells||(this.options.mergeCells={});var d,e=null,f={},g={},k={},l=!1;typeof a==_$_496c[17]?k[a]=[c,b]:typeof a==_$_496c[88]?k=a:((e=this.getHighlighted())?e=[F.getColumnNameFromCoords(e[0],e[1]),e[2]-e[0]+1,e[3]-e[1]+1]:(jSuites.notification({message:E(_$_496c[171])}),e=!1),e&&(k[e[0]]=[e[1],e[2]]));c=Object.keys(k);if(c.length){for(b=0;b<c.length;b++){var n=c[b],q=k[c[b]][0],p=k[c[b]][1];
149
+ q=parseInt(q);p=parseInt(p);if((!q||2>q)&&(!p||2>p))console.log(E(_$_496c[172])+_$_496c[140]+n);else if(this.options.mergeCells[n])g[n]=[q,p],f[n]=this.options.mergeCells[n],h.update.call(this,n,q,p);else{e=F.getCoordsFromColumnName(n);for(var u=e[1];u<e[1]+p;u++)for(var x=e[0];x<e[0]+q;x++)a=F.getColumnNameFromCoords(x,u),(d=this.merged.cells[a])&&this.options.mergeCells[d]&&(f[d]=this.options.mergeCells[d],h.applyDestroy.call(this,d));g[n]=this.options.mergeCells[n]=[q,p];h.applyCreate.call(this,
150
+ n);S.attached.call(this,e[0],e[1])||(l=e)}}Object.keys(g).length&&(l&&I[_$_496c[51]].call(this,e[1],e[0]),W.call(this.parent,{worksheet:this,action:_$_496c[72],newValue:g,oldValue:f}),K.call(this,_$_496c[72],[g]),h.build.call(this),ka.refresh.call(this),aa.refresh.call(this),G.call(this.parent,_$_496c[173],this,g,f))}};h.update=function(a,c,b){var d=this.options.mergeCells;if(d[a]){var e=d[a][1];if(c!==d[a][0]||e!==b)h.applyDestroy.call(this,a),c&&b&&(d[a]=[c,b],h.applyCreate.call(this,a));h.build.call(this)}};
151
+ h.remove=function(a,c){if(!R.call(this.parent,this))return!1;c={};var b={},d={};typeof a==_$_496c[17]?d[a]=!0:typeof a==_$_496c[88]&&(d=a);a=Object.keys(d);for(d=0;d<a.length;d++)this.options.mergeCells[a[d]]&&(c[a[d]]=this.options.mergeCells[a[d]],b[a[d]]=!0,h.applyDestroy.call(this,a[d],!0));h.build.call(this);W.call(this.parent,{worksheet:this,action:_$_496c[73],newValue:b,oldValue:c});K.call(this,_$_496c[73],{data:b})};h.destroy=function(){h.remove.call(this,this.options.mergeCells,!0)};h.applyCreate=
152
+ function(a,c){var b=this.options.mergeCells;if(b[a]){var d=b[a][0]||1,e=b[a][1]||1;a=F.getCoordsFromColumnName(a);if(!this.records[a[1]][a[0]].merged||1==c)if(b=S[_$_496c[46]].call(this,a[0],a[1])){b.classList.remove(_$_496c[53]);b.style.display=_$_496c[3];1<d?b.setAttribute(_$_496c[174],d):b.removeAttribute(_$_496c[174]);1<e?b.setAttribute(_$_496c[175],e):b.removeAttribute(_$_496c[175]);1==this.options.textOverflow&&(b.style.overflow=_$_496c[54]);for(var f=0;f<e;f++)for(var g=0;g<d;g++){c=a[0]+g;
153
+ var k=a[1]+f;if(b=this.records[k][c])if(b.merged=[g,f,b.v,d,e],0!=g||0!=f)b.element||S[_$_496c[46]].call(this,c,k),b.element.classList.add(_$_496c[53]),b.merged[3]=b.element.innerText,b.element.innerText=_$_496c[3],P.call(this,c,k,_$_496c[3])}}}};h.applyDestroy=function(a,c){var b=this.options.mergeCells;if(b[a]){var d=F.getCoordsFromColumnName(a),e=d[0];d=d[1];var f=b[a][0],g=b[a][1];delete this.options.mergeCells[a];for(a=0;a<g;a++)for(var k=0;k<f;k++)if(b=this.records[d+a][e+k])b.element&&(0==
154
+ k&&0==a?(b.element.removeAttribute(_$_496c[174]),b.element.removeAttribute(_$_496c[175])):(b.element.classList.remove(_$_496c[53]),1==c&&(P.call(this,e+k,d+a,b.merged[2]),b.element.innerHTML=b.merged[3]))),b.merged&&delete b.merged}};h.updateConfig=function(a,c,b,d){if(1==c)var e=[b];else{e=[];for(var f=b;f<b+d;f++)e.push(f)}var g=this.options.mergeCells,k=Object.keys(g),l={};for(f=0;f<k.length;f++){b=F.getCoordsFromColumnName(k[f]);for(var n=b[a];n<b[a]+g[k[f]][a];n++)-1!==e.indexOf(n)&&(l[k[f]]||
155
+ (l[k[f]]=[g[k[f]][0],g[k[f]][1]],1==c&&(l[k[f]][a]+=d)),0==c&&l[k[f]][a]--)}k=Object.keys(l);for(f=0;f<k.length;f++)h.update.call(this,k[f],l[k[f]][0],l[k[f]][1]);h.build.call(this)};h.build=function(){var a=this.options.mergeCells;this.merged={cols:[],rows:[],cells:[]};if(a)for(var c=Object.keys(a),b=0;b<c.length;b++){for(var d=F.getCoordsFromColumnName(c[b]),e=parseInt(a[c[b]][0]),f=parseInt(a[c[b]][1]),g=0;g<e;g++)this.merged.cols[d[0]+g]=!0;for(var k=0;k<f;k++)this.merged.rows[d[1]+k]=!0;for(k=
156
+ 0;k<f;k++)for(g=0;g<e;g++){var l=F.getColumnNameFromCoords(d[0]+g,d[1]+k);this.merged.cells[l]=c[b]}}};h.batch=function(a){var c=Object.keys(a);if(c.length)for(var b=0;b<c.length;b++)!1===a[c[b]]&&h.applyCreate.call(this,c[b])};return h}(),Ca=function(){var h=function(a){a.getHeader=h[_$_496c[46]];a.setHeader=h[_$_496c[11]];a.getHeaders=h.all};h[_$_496c[46]]=function(a){var c;if(c=this.options.columns)return c[a].title||F.getColumnName(a)};h.all=function(a){for(var c=[],b=0;b<this.options.columns.length;b++)c.push(h[_$_496c[46]].call(this,
157
+ b));return a?c:c.join(this.options.csvDelimiter)};h[_$_496c[11]]=function(a,c){if(!R.call(this.parent,this))return!1;var b;if(b=this.options.columns[a]){var d=h[_$_496c[46]].call(this,a);if(!c&&(c=prompt(E(_$_496c[176]),d),!c))return!1;b.title=c;if(b=this.headers[a])b.innerHTML=c,b.setAttribute(_$_496c[177],c);W.call(this.parent,{worksheet:this,action:_$_496c[78],column:a,oldValue:d,newValue:c});K.call(this,_$_496c[78],{column:a,title:c});G.call(this.parent,_$_496c[178],this,a,c,d)}};h.create=function(a){if(this.headers[a])return this.headers[a];
158
+ var c=this.options.columns[a],b=c.width||this.options.defaultColWidth,d=c.title||F.getColumnName(a),e=document.createElement(_$_496c[157]);this.parent.config.stripHTML?e.innerText=d:e.innerHTML=d;e.setAttribute(_$_496c[44],a);c.align&&(e.style.textAlign=c.align);c.title&&e.setAttribute(_$_496c[177],e.innerText);c.tooltip&&(e.title=c.tooltip);d=this.options.filters;!0===c.filter&&(d=!0);!1===c.filter&&(d=!1);!0===d&&e.classList.add(_$_496c[179]);!1===c.visible&&(b=_$_496c[103]);d=document.createElement(_$_496c[180]);
159
+ d.setAttribute(_$_496c[162],b);c.type==_$_496c[54]&&(e.style.display=_$_496c[40],d.style.display=_$_496c[40]);this.headers[a]=e;this.colgroup[a]=d;G.call(this.parent,_$_496c[181],this,a,e,c);return e};return h}(),Z=function(){var h=function(c,b,d){var e=this.footers.content,f;e&&e[b]&&e[b][c]&&(f=e[b][c].element)&&(void 0===d&&(e=this.options.footers,d=e[b]&&e[b][c]?e[b][c]:_$_496c[3]),Q(d)&&1==this.parent.config.parseFormulas&&(d=Y.execute.call(this,d,c,null,!1)),this.options.applyMaskOnFooters&&
160
+ (e=ha[_$_496c[46]].call(this,c),d=v.editors.general.parseValue(c,b,d,this,e[1],f)),d instanceof Element||d instanceof HTMLDocument?(f.innerHTML=_$_496c[3],f.appendChild(d)):1==this.parent.config.stripHTML?f.innerText=d:f.innerHTML=d)},a=function(c){c.getFooter=a[_$_496c[46]];c.setFooter=a[_$_496c[11]];c.resetFooter=a.reset;c.refreshFooter=a.refresh;c.getFooterValue=a.value;c.setFooterValue=a.value};a[_$_496c[46]]=function(){return this.options.footers};a[_$_496c[11]]=function(c){if(c){var b=this.options.footers;
161
+ this.options.footers=c}this.options.footers!=b&&(Z.build.call(this),a.render.call(this),K.call(this,_$_496c[182],{data:this.options.footers}),G.call(this.parent,_$_496c[183],this,this.options.footers,b))};a.refresh=function(){var c=this.options.footers;if(c&&c.length)for(var b=0;b<c.length;b++)for(var d=0;d<c[b].length;d++)h.call(this,d,b,c[b][d])};a.value=function(c,b,d){if(void 0===d)return this.options.footers[b][c];h.call(this,c,b,d);K.call(this,_$_496c[184],{x:c,y:b,value:d});G.call(this.parent,
162
+ _$_496c[185],this,c,b,d)};a.reset=function(){var c=this.options.footers;this.options.footers=null;this.footers.content=null;this.tfoot.innerHTML=_$_496c[3];K.call(this,_$_496c[186],{});G.call(this.parent,_$_496c[183],this,null,c)};a.create=function(c,b){var d=this.footers.content[b][c];if(d&&d.element)return d.element;d=this.footers.content[b][c]={};var e=this.options.columns[c].align;d.element=document.createElement(_$_496c[157]);d.element.setAttribute(_$_496c[44],c);d.element.setAttribute(_$_496c[45],
163
+ b);e&&(d.element.style.textAlign=e);h.call(this,c,b);this.options.columns[c].type==_$_496c[54]&&d.element.classList.add(_$_496c[53]);return d.element};a.build=function(){this.footers={element:this.tfoot,content:[]};if(this.options.footers){this.tfoot.innerHTML=_$_496c[3];for(var c=0;c<this.options.footers.length;c++){if(!this.footers.content[c]){this.footers.content[c]=[];var b=document.createElement(_$_496c[155]),d=document.createElement(_$_496c[157]);d.innerHTML=_$_496c[158];b.appendChild(d);this.footers.element.appendChild(b)}for(b=
164
+ 0;b<this.options.columns.length;b++)this.options.footers[c][b]||(this.options.footers[c][b]=_$_496c[3]),this.footers.content[c][b]||(this.footers.content[c][b]={})}}};a.render=function(){for(var c=this.options.footers,b=0;b<c.length;b++)for(var d=0;d<c[b].length;d++){var e=Z.create.call(this,d,b);this.tfoot.children[b].appendChild(e)}};a.adjust=function(c,b,d){var e=[],f=this.options.footers,g=this.footers.content;if(f)if(1==d){if(this.headers[c]&&this.headers[c].parentNode)var k=this.headers[c]==
165
+ this.thead.lastChild.lastChild?!0:!1,l=!0;for(d=0;d<f.length;d++){for(var n=f[d].splice(c),q=c;q<c+b;q++)f[d][q]=_$_496c[3];f[d]=f[d].concat(n);n=g[d].splice(c);for(q=c;q<c+b;q++)g[d][q]={element:a.create.call(this,q,d)},l&&(1==k?this.tfoot.children[d].appendChild(g[d][q].element):this.tfoot.children[d].insertBefore(g[d][q].element,this.tfoot.children[d].children[c].nextSibling));g[d]=g[d].concat(n)}}else for(d=0;d<f.length;d++){for(q=c;q<c+b;q++)(k=this.footers.content[d][q].element)&&k.parentNode&&
166
+ k.parentNode.removeChild(k);g[d].splice(c,b);e[d]=f[d].splice(c,b)}return e};return a}(),wa=function(){var h=function(a){a.setNestedCell=h.cell;a.getNestedCell=h.cell;a.setNestedHeaders=h[_$_496c[11]];a.getNestedHeaders=h[_$_496c[46]];a.resetNestedHeaders=h.reset};h[_$_496c[46]]=function(){return this.options.nestedHeaders};h[_$_496c[11]]=function(a){h.reset.call(this);this.options.nestedHeaders=a;h.build.call(this);h.render.call(this);aa.refresh.call(this);K.call(this,_$_496c[187],{data:a});G.call(this.parent,
167
+ _$_496c[188],this,a)};h.reset=function(){var a=[],c=this.thead.children;this.options.nestedHeaders=null;for(var b=0;b<c.length;b++)c[b].classList.contains(_$_496c[189])&&a.push(c[b]);if(a.length)for(;c=a.shift();)c.remove();this.nested=null;aa.refresh.call(this);K.call(this,_$_496c[190]);G.call(this.parent,_$_496c[188],this,[])};h.cell=function(a,c,b){if(b){if(!R.call(this.parent,this))return!1;var d=this.options.nestedHeaders[c][a],e=this.nested.content[c][a].element;void 0!==b.title&&(e.innerText=
168
+ b.title);void 0!==b.tooltip&&(e.title=b.tooltip);void 0!==b.colspan&&(d.colspan=b.colspan,e.setAttribute(_$_496c[174],b.colspan),e.style.display=0==d.colspan?_$_496c[40]:_$_496c[3]);K.call(this,_$_496c[191],{x:a,y:c,properties:b});G.call(this.parent,_$_496c[192],this,a,c,b)}else return this.nested.content[c][a].element};h.range=function(a){a=this.options.nestedHeaders[a];for(var c=[],b=0,d=0;d<a.length;d++){var e=parseInt(a[d].colspan);c[d]=[b,b+e-1];b+=e}return c};h.getColumns=function(a){a=this.options.nestedHeaders[a];
169
+ for(var c=[],b=0;b<a.length;b++)for(var d=a[b].colspan,e=0;e<d;e++)c.push(b);return c};h.getAffected=function(a){var c=[],b=this.options.nestedHeaders;if(b){var d,e,f;for(e=0;e<b.length;e++)if((d=h.getColumns.call(this,e))&&void 0!==d[a]){var g=h.range.call(this,e);for(f=g[d[a]][0];f<=g[d[a]][1];f++)c.push(f)}}return c};h.create=function(a,c){if(this.nested.content[c][a])return this.nested.content[c][a].element;var b=this.options.nestedHeaders[c][a]||{},d=this.nested.content[c][a]={};b.colspan||(b.colspan=
170
+ 1);b.align||(b.align=_$_496c[193]);b.title||(b.title=_$_496c[3]);var e=document.createElement(_$_496c[157]);e.setAttribute(_$_496c[194],a);e.setAttribute(_$_496c[195],c);e.setAttribute(_$_496c[174],b.colspan);e.setAttribute(_$_496c[196],b.align);e.innerHTML=b.title;b.tooltip&&(e.title=b.tooltip);return d.element=e};h.build=function(){this.nested||(this.nested={content:[]});var a,c,b=0;if(a=this.options.nestedHeaders){for(c=0;c<a.length;c++){this.nested.content[c]=[];var d=document.createElement(_$_496c[157]);
171
+ d.innerHTML=_$_496c[158];var e=document.createElement(_$_496c[155]);e.classList.add(_$_496c[189]);e.appendChild(d);this.thead.insertBefore(e,this.thead.lastChild)}for(c=0;c<this.thead.children.length;c++)this.thead.children[c].firstChild.style.top=b+_$_496c[47],b+=this.thead.children[c].offsetHeight}};h.adjust=function(a,c,b,d){var e=this.options.nestedHeaders;if(e)if(1==b)if(d&&d.nested)for(b=0;b<e.length;b++)for(var f=0;f<e[b].length;f++)h.cell.call(this,f,b,{colspan:d.nested[b][f]});else for(b=
172
+ 0;b<e.length;b++){if((f=h.getColumns.call(this,b))&&e[b][f]){f=f[a];var g=parseInt(e[b][f].colspan)+c;h.cell.call(this,f,b,{colspan:g})}}else{d=[];for(b=0;b<e.length;b++)if(g=h.getColumns.call(this,b)){d[b]=[];for(f=0;f<c;f++){var k=g[a+f];typeof d[b][k]==_$_496c[13]&&(d[b][k]=e[b][k].colspan);e[b][k].colspan--}g=Object.keys(d[b]);for(f=0;f<g.length;f++)h.cell.call(this,g[f],b,{colspan:e[b][g[f]].colspan})}return d}};return h}(),ba=function(){var h=function(a,c){var b=function(q){var p;(p=this.results)?
173
+ q=p.indexOf(q):p=this.rows;q--;for(var u=q;0<=u;u--)if(q=this.results?p[u]:u,this.rows[q]&&this.rows[q].element)return q;return 0},d=function(q){var p;(p=this.results)?q=p.indexOf(q):p=this.rows;q++;for(var u=q;u<p.length;u++)if(q=this.results?p[u]:u,this.rows[q]&&this.rows[q].element)return q;return p[p.length-1]},e=function(q,p){for(;0<=q;q--)if(this.records[p][q].element&&!this.records[p][q].element.classList.contains(_$_496c[53]))return q;return 0},f=function(q,p){for(;q<this.options.columns.length;q++)if(this.records[p][q].element&&
174
+ !this.records[p][q].element.classList.contains(_$_496c[53]))return q;return this.options.columns-1},g=this.getHighlighted(),k=g[0],l=g[1],n=g[2];g=g[3];a=parseInt(a);c=parseInt(c);null!=a&&null!=c&&(0<a-n?(f=f.call(this,parseInt(n)+1,c),a=parseInt(a)):(f=parseInt(a),a=e.call(this,parseInt(k)-1,c)),0<c-g?(d=d.call(this,parseInt(g)),c=parseInt(c)):(d=parseInt(c),c=b.call(this,parseInt(l))),a-f<c-d?(f=parseInt(k),a=parseInt(n)):(d=parseInt(l),c=parseInt(g)),this.setBorder(f,d,a,c,_$_496c[142]))};h.execute=
175
+ function(a){if(!R.call(this.parent,this))return!1;var c=this.borders.cloning;if(a)if(c&&c.active){a=c.x1;var b=c.y1,d=c.x2,e=c.y2}else return!1;else if(d=this.getSelected(),d.length)a=d[0].x,b=parseInt(d[d.length-1].y)+1,d=d[d.length-1].x,e=this.options.data.length-1;else return!1;var f=0,g,k=[],l=[],n=!1;var q=this.getHighlighted();var p=Fa[_$_496c[46]].call(this,q,!1,!1),u=this.getSelected();if(g=this.getStyle(u,!0)){var x=Object.keys(g);if(x.length)for(var w=0;w<x.length;w++)k.push(g[x[w]])}if(q[0]==
176
+ a){g=b<q[1]?b-q[1]:1;var y=0}else y=a<q[0]?a-q[0]:1,g=0;x=0;a=parseInt(a);d=parseInt(d);b=parseInt(b);e=parseInt(e);for(var B=q[0]==a?1:0,D=g,r=y,z=b;z<=e;z++)if(!this.results||-1!=this.results.indexOf(z)){void 0==p[f]&&(f=0);q=0;0==B?(y=r,g=D):y=r;for(w=a;w<=d;w++){if(!(0!=n||this.records[z][w].element&&this.records[z][w].element.classList.contains(_$_496c[18]))){if((!c||1!=c.active)&&P.call(this,w,z)){n=!0;continue}void 0==p[f][q]&&(q=0);var A=p[f][q];var C=void 0!==this.options.columns[w].autoIncrement?
177
+ this.options.columns[w].autoIncrement?!0:!1:this.parent.config.autoIncrement;1==this.options.columns[w].shiftFormulas&&(C=!0);A&&C&&(this.options.columns[w].type==_$_496c[59]||this.options.columns[w].type==_$_496c[14]?Q(A)?A=Y.shiftFormula(A,y,g):A==Number(A)&&(A=Number(A)+g):this.options.columns[w].type==_$_496c[197]&&(C=new Date(A),C.setDate(C.getDate()+g),A=C.getFullYear()+_$_496c[198]+jSuites.two(parseInt(C.getMonth()+1))+_$_496c[198]+jSuites.two(C.getDate())+_$_496c[136]+_$_496c[199]));C={x:w,
178
+ y:z,value:A};k&&null!=k[x]&&(C.style=k[x],x++,x>=k.length&&(x=0));l.push(C)}q++;0==B&&y++}f++;g++}l.length&&(u[0].x<a&&(a=u[0].x),u[0].y<b&&(b=u[0].y),u[u.length-1].x>d&&(d=u[u.length-1].x),u[u.length-1].y>e&&(e=u[u.length-1].y),this.setValue(l),this.resetBorders(_$_496c[142],!0),this.updateSelectionFromCoords(a,b,d,e))};h.end=function(a){ba.event=!1;ba.execute.call(this,!0);ma.refresh.call(this)};h.cancel=function(a){ba.event=!1;this.resetBorders(_$_496c[142],!0)};return h}(),Fa=function(){var h=
179
+ function(a){a.getData=h[_$_496c[46]];a.getJson=h[_$_496c[46]];a.setData=h[_$_496c[11]];a.loadData=h.load;a.getRowData=h.getRowData;a.setRowData=h.setRowData;a.getColumnData=h.getColumnData;a.setColumnData=h.setColumnData;a.updateData=h.update;a.refresh=h.refresh;a.data=h[_$_496c[46]];a.download=h.download;a.copy=h.copy;a.paste=h.paste;a.cut=function(){return a.copy(!0)}};h[_$_496c[46]]=function(a,c,b,d){!0===a&&(a=this.getHighlighted());var e=a?!0:!1,f=[],g=this.options.columns.length,k=this.options.data.length;
180
+ void 0===d&&(d=this.dataType&&typeof b==_$_496c[13]?1:0);for(var l=0;l<k;l++){var n=null;var q=d?{}:[];for(var p=0;p<g;p++){var u;if(!(u=!e)){u=a[1];var x=a[2],w=a[3];u=p>=a[0]&&p<=x&&l>=u&&l<=w?!0:!1}if(u&&(!e||!this.results||-1!=this.results.indexOf(l))){u=P.call(this,p,l);if(c){if(e&&!1===this.rows[l].visible)continue;n=ia.processed.call(this,p,l);void 0!==n&&(u=n)}b&&u.match&&(u.match(b)||u.match(/\n/)||u.match(/"/))&&(u=u.replace(new RegExp(_$_496c[200],_$_496c[201]),_$_496c[202]),u=_$_496c[200]+
181
+ u+_$_496c[200]);d?jSuites.path.call(q,_$_496c[3]+da.call(this,p),u):q.push(u);n=!0}}n&&(b?f.push(q.join(b)):f.push(q))}return b?f.join(_$_496c[10])+_$_496c[10]:f};h.parse=function(){for(var a,c={},b=0,d,e=[],f=this.options.data,g=0;g<f.length;g++)a=null,d=g,f[g].data&&(Array.isArray(f[g].data)||typeof f[g].data==_$_496c[88])&&(typeof f[g].id==_$_496c[14]&&(a=parseInt(f[g].id)),typeof f[g].row==_$_496c[14]&&(d=f[g].row),e[d]=f[g].data,f[g]=[]),d>b&&(b=d),a&&(c[d]=a);if(Object.keys(e).length)for(g=
182
+ 0;g<=b;g++)e[g]&&(f[g]=e[g]);b=this.getPrimaryKey();if(!1!==b)for(b=da.call(this,b),g=0;g<f.length;g++)c[g]||!1===b||(a=parseInt(f[g][b]),0<a&&(c[g]=a));return c};h.type=function(){for(var a=this.dataType=0;a<this.options.columns.length;a++)typeof this.options.columns[a].name!==_$_496c[13]&&(this.dataType=1)};h[_$_496c[11]]=function(a){a=h.standardize(a);var c={},b=[],d={};var e=Object.keys(a[0]).length-this.options.columns.length;0<e&&this.insertRow(e);var f=a.length-this.options.data.length;0<f&&
183
+ this.insertRow(f);for(var g=0;g<this.options.data.length;g++){void 0===a[g]&&(a[g]={row:g,data:[]});for(var k=0;k<this.options.columns.length;k++)a[g].data[k]||(a[g].data[k]=_$_496c[3])}for(k=0;k<this.options.columns.length;k++){var l=da.call(this,k);d[l]=k}for(g=0;g<a.length;g++){f=a[g].row;l=Object.keys(a[g].data);for(k=0;k<l.length;k++)e=null,void 0!==d[l[k]]?e=d[l[k]]:-1<l[k]&&(e=parseInt(l[k])),null!==e&&b.push({x:e,y:f,value:a[g].data[l[k]]});a[g].id&&(c[f]=a[g].id)}va.setId.call(this,c);ia[_$_496c[11]].call(this,
184
+ b,null,!0)};h.build=function(){this.results=null;this.rows=[];this.records=[];this.sequence=0;h.type.call(this);if(this.options.data){var a=h.parse.call(this),c=this.options.data.length;this.options.minDimensions[1]>c&&(c=this.options.minDimensions[1]);for(var b=0;b<c;b++){var d=a[b]?a[b]:null;qa.row.call(this,b,d)}}};h.load=function(a){this.resetBorders();this.resetSelection();this.tbody.innerText=_$_496c[3];this.options.data=a;h.build.call(this);ca.update.call(this);I.call(this,!0,!0)};h.refresh=
185
+ function(a){if(typeof a!==_$_496c[13])for(var c=0;c<this.options.columns.length;c++){var b=this.records[a]&&this.records[a][c].element?this.records[a][c].element:null,d=ha[_$_496c[46]].call(this,c,a);typeof d[0].updateCell==_$_496c[89]&&d[0].updateCell(b,P.call(this,c,a),c,a,this,d[1]);b&&S.applyOverflow.call(this,b,c,a)}else if(this.options.url){var e=this;1==this.parent.config.loadingSpin&&jSuites.loading.show();jSuites.ajax({url:this.options.url,method:_$_496c[62],dataType:_$_496c[63],success:function(f){e.setData(f);
186
+ jSuites.loading.hide()}})}};h.getRowData=function(a,c){if(typeof this.options.data[a]===_$_496c[13])return!1;if(c){if(this.dataType){c={};for(var b=0;b<this.options.columns.length;b++){var d=_$_496c[3]+da.call(this,b),e=_$_496c[3]+ia.processed.call(this,b,a,!0);jSuites.path.call(c,d,e)}}else for(c=[],b=0;b<this.options.columns.length;b++)c.push(ia.processed.call(this,b,a,!0));return c}return JSON.parse(JSON.stringify(this.options.data[a]))};h.setRowData=function(a,c,b){for(var d=[],e=0;e<this.options.columns.length;e++)typeof c[e]===
187
+ _$_496c[13]&&(c[e]=_$_496c[3]),d.push({x:e,y:a,value:c[e]});d.length&&this.setValue(d,null,b)};h.getColumnData=function(a,c){if(typeof this.options.columns[a]===_$_496c[13])return!1;for(var b=[],d=0;d<this.options.data.length;d++){var e=c?ia.processed.call(this,a,d,!0):P.call(this,a,d);b.push(e)}return b};h.setColumnData=function(a,c,b){for(var d=[],e=0;e<this.rows.length;e++)typeof c[e]===_$_496c[13]&&(c[e]=_$_496c[3]),d.push({x:a,y:e,value:c[e]});d.length&&this.setValue(d,null,b)};h.copy=function(a){var c=
188
+ this,b=this.getHighlighted(),d=function(){c.setBorder(b[0],b[1],b[2],b[3],_$_496c[132]);c.borders.copying.clear=1==a?!0:!1},e=h[_$_496c[46]].call(this,b,!0,_$_496c[203]),f=G.call(this.parent,_$_496c[204],this,b,e);if(f)e=f;else if(!1===f)return!1;navigator.clipboard?navigator.clipboard.writeText(e).then(d):(this.parent.textarea.value=e,this.parent.textarea.select(),document.execCommand(_$_496c[205]),d());return e};h.paste=function(a,c,b){if(!R.call(this.parent,this))return!1;var d=this,e=function(){d.borders.copying&&
189
+ (d.resetBorders(_$_496c[132],!0),d.borders.copying.clear=!1)},f=null,g=this.options.style,k=null,l=null,n=[];if(this.borders.copying){var q=[this.borders.copying.x1,this.borders.copying.y1,this.borders.copying.x2,this.borders.copying.y2];k=q[0];l=q[1];var p=jSuites.hash(b),u=jSuites.hash(h[_$_496c[46]].call(this,q,!0,_$_496c[203]));if(p!=u)e();else{var x=0,w=0;b=h[_$_496c[46]].call(this,q,!1,!1);for(p=q[1];p<=q[3];p++)if(!this.results||-1!=this.results.indexOf(p)){n[w]=[];x=0;for(u=q[0];u<=q[2];u++)f=
190
+ F.getColumnNameFromCoords(u,p),n[w][x]=g&&g[f]?g[f]:_$_496c[206],x++;w++}}}a=parseInt(a);c=parseInt(c);if(b){Array.isArray(b)||(b=F.parseCSV(b,_$_496c[203]));if(p=G.call(this.parent,_$_496c[207],this,b,a,c,n))b=p;else if(!1===p)return!1;100<b.length&&!this.options.pagination&&!I.limited.call(this)&&console.log(_$_496c[208]);if(f=this.getHighlighted()){x=[];w=[];var y=[];g=[];var B=0,D=0;for(p=f[1];p<=f[3];p++)if(!this.results||-1!=this.results.indexOf(p)){x=[];w=[];for(u=f[0];u<=f[2];u++)x.push(b[D][B]),
191
+ n&&n[D]&&n[D][B]?w.push(n[D][B]):w.push(_$_496c[3]),B++,B>=b[0].length&&(B=0);y.push(x);g.push(w);D++;D>=b.length&&(D=0)}0==y.length%b.length&&0==y[0].length%b[0].length&&(b=y,n=g)}g=null;f=[];if(this.borders.copying&&!0===this.borders.copying.clear){for(p=q[1];p<=q[3];p++)for(u=q[0];u<=q[2];u++)(!this.results||this.results&&0<=this.results.indexOf(p))&&f.push({x:u,y:p,value:_$_496c[3],style:_$_496c[3]});e()}p=a+b[0].length-this.options.columns.length;0<p&&this.insertColumn(p);p=c+b.length-this.rows.length;
192
+ 0<p&&this.insertRow(p);w=x=a;B=y=c;D=null;this.results&&(g=this.results.indexOf(c));for(p=0;p<b.length;p++)for(u=0;u<b[p].length;u++){null!==k&&null!==l&&b[p][u][0]==_$_496c[12]&&(b[p][u]=Y.shiftFormula(b[p][u],a-k,c-l));w=a+u;B=c+p;this.results&&(B=this.results[g+p]);var r={x:w,y:B,value:b[p][u]};n&&n[p]&&n[p][u]&&(r.style=n[p][u]);f.push(r);null===D&&ka.isSelected.call(this,w,B,q)&&(D=!0)}D&&e();f.length&&(ia[_$_496c[11]].call(this,f,null,this.parent.config.forceUpdateOnPaste?!0:!1),G.call(this.parent,
193
+ _$_496c[209],this,f),this.updateSelectionFromCoords(x,y,w,B))}};h.download=function(a,c){if(this.parent.config.allowExport){void 0===c&&(c=!0);var b=_$_496c[3];if(1==a||1==this.parent.config.includeHeadersOnDownload)b+=this.getHeaders().replace(/\s+/gm,_$_496c[136])+_$_496c[10];b+=h[_$_496c[46]].call(this,null,c,this.options.csvDelimiter);c=new Blob([_$_496c[211]+b],{type:_$_496c[212]});window.navigator&&window.navigator.msSaveOrOpenBlob?window.navigator.msSaveOrOpenBlob(c,this.options.csvFileName+
194
+ _$_496c[213]):(a=document.createElement(_$_496c[214]),c=URL.createObjectURL(c),a.href=c,a.setAttribute(_$_496c[215],this.options.csvFileName+_$_496c[213]),document.body.appendChild(a),a.click(),a.parentNode.removeChild(a))}else console.error(_$_496c[210])};h.standardize=function(a){a||(a=[]);Array.isArray(a)||(a=[a]);void 0==a[0]||Array.isArray(a[0])||typeof a[0]==_$_496c[88]||(a=[a]);for(var c=0;c<a.length;c++){var b={};Array.isArray(a[c])||void 0==a[c].data?b.data=a[c]:b=a[c];b.row=void 0==a[c].row?
195
+ c:a[c].row;a[c]=b}return a};return h}(),Va=function(){var h=function(a){a.getLabel=h[_$_496c[46]];a.getLabelFromCoords=h[_$_496c[46]]};h[_$_496c[46]]=function(a,c,b){if(typeof a==_$_496c[17]){a=F.getCoordsFromColumnName(a);var d=a[0];c=a[1]}else d=a;return this.getProcessed(d,c,b)};return h}(),Ia=function(){var h=function(a){a.getDefinedNames=h[_$_496c[46]];a.setDefinedNames=h[_$_496c[11]]};h[_$_496c[11]]=function(a){var c=Object.keys(a);if(c.length){for(var b=0;b<c.length;b++)this.parent.config.definedNames[c[b]]=
196
+ a[c[b]],a[c[b]]||delete this.parent.config.definedNames[c[b]];K.call(this,_$_496c[216],[a])}};h[_$_496c[46]]=function(a){var c=this.parent.config.definedNames;return a?c[a]:c};h.updateAll=function(a,c){var b,d={};if(b=this.parent.config.definedNames){var e=Object.keys(b);if(e.length){for(var f=this.getWorksheetName(),g=0;g<e.length;g++){var k=Y.update.call(this,b[e[g]],a,c,f);k!==b[e[g]]&&(d[e[g]]=k)}h[_$_496c[11]].call(this,d)}}};h.updateWorksheetName=function(a,c){var b,d={};if(b=this.parent.config.definedNames){var e=
197
+ Object.keys(b);if(e.length){for(var f=0;f<e.length;f++){var g=Y.updateWorksheetName(b[e[f]],a,c);g!==b[e[f]]&&(d[e[f]]=g)}h[_$_496c[11]].call(this,d)}}};return h}(),na=function(){var h=[_$_496c[217],_$_496c[218],_$_496c[219],_$_496c[220],_$_496c[221]],a=[_$_496c[198],_$_496c[161],_$_496c[222],_$_496c[223],_$_496c[224],_$_496c[225],_$_496c[1],_$_496c[226],_$_496c[25],_$_496c[227],_$_496c[12],_$_496c[228],_$_496c[229],_$_496c[230]],c=[],b=function(){if(0<c.length){for(var f,g=0;g<c.length;g++)f=-1===
198
+ c[g].indexOf(_$_496c[139])?this:H(c[g].split(_$_496c[139])[0]),aa.destroy.call(f,c[g]);c=[]}},d=function(f){b.call(this);for(var g=0,k=[],l,n,q,p=0;p<f.children.length;p++)if(l=f.children[p].getAttribute(_$_496c[231])){k[l]||(k[l]=h[g++],4<g&&(g=0));f.children[p].style.color=k[l];-1===l.indexOf(_$_496c[139])?(n=this,q=l):(n=l.split(_$_496c[139]),q=n[1],n=H(n[0]));if(0<=q.indexOf(_$_496c[140])){var u=q.split(_$_496c[140]);q=F.getCoordsFromColumnName(u[0]);u=F.getCoordsFromColumnName(u[1])}else u=q=
199
+ F.getCoordsFromColumnName(q);ka[_$_496c[11]].call(n,q[0],q[1],u[0],u[1],null,l,k[l]);c.push(l)}},e=function(f,g){g&&typeof g!=_$_496c[89]||(g={type:_$_496c[232],onchange:g});g.type===_$_496c[232]?(f.classList.add(_$_496c[233]),f.addEventListener(_$_496c[234],function(k){k=k.changedTouches&&k.changedTouches[0]?k.changedTouches[0].clientX:k.clientX;var l=this.getBoundingClientRect();24>l.width-(k-l.left)&&(e.current=f,f.classList.add(_$_496c[235]),f.classList.add(_$_496c[98]))})):(f.addEventListener(_$_496c[236],
200
+ function(k){Q(f.innerText)&&(f.classList.add(_$_496c[98]),v.current&&setTimeout(function(){f.worksheet=v.current;e.parse.call(v.current,f);var l=document.createTextNode(_$_496c[3]);f.appendChild(l);jSuites.focus(f)}))}),f.addEventListener(_$_496c[237],function(k){Q(f.innerText)?f.classList.add(_$_496c[98]):f.classList.contains(_$_496c[98])&&(f.classList.remove(_$_496c[98]),f.innerText=f.innerText,f.worksheet&&b.call(f.worksheet));k.preventDefault()}));f.classList.add(_$_496c[238]);f.classList.add(_$_496c[237]);
201
+ f.setAttribute(_$_496c[239],!0);f.addEventListener(_$_496c[240],function(k){f.worksheet&&(b.call(f.worksheet),typeof f.onchange==_$_496c[89]&&f.onchange.call(f),f.worksheet=null)});f.val=function(k){if(void 0===k)return f.innerText;f.innerText=k};g.onchange&&(f.onchange=g.onchange)};e.current=null;e.parse=function(f){for(var g=_$_496c[3],k=_$_496c[3],l=window.getSelection(),n=document.createRange(),q=F.getCaretIndex.call(this.parent,f),p=Y.tokenize(f.innerText.replace(/(\r\n|\n|\r)/gm,_$_496c[3])),
202
+ u=0;u<p.length;u++)p[u]&&Y.tokenIdentifier.test(p[u].trim())?(u==p.length-1&&(k=_$_496c[241]),g+=_$_496c[242]+k+_$_496c[243]+p[u].trim().replace(/\$/g,_$_496c[3])+_$_496c[244]+p[u]+_$_496c[245]):g+=p[u];f.innerHTML=g;g=null;for(u=0;u<f.childNodes.length&&!(g=f.childNodes[u],k=g.tagName?g.innerText.length:g.length,0>=q-k);u++)q-=k;g&&(g.tagName?n.setStart(g.firstChild,q):n.setStart(g,q),l.removeAllRanges(),l.addRange(n));d.call(this,f)};e.close=function(f){b.call(this);f?f.classList.remove(_$_496c[98]):
203
+ e.current&&(typeof e.current.onchange==_$_496c[89]&&e.current.onchange.call(e.current),e.current.classList.remove(_$_496c[235]),e.current.classList.remove(_$_496c[98]),e.current.worksheet=null,e.current=null)};e.getName=function(f,g,k,l,n){f=F.getColumnNameFromCoords(f,g);k=F.getColumnNameFromCoords(k,l);n.ctrlKey&&(f=k);return f!==k?(n=f+_$_496c[140]+k,n=Y.getTokensFromRange.call(this,n),Y.getRangeFromTokens.call(this,n)):f};e.range=function(f,g,k,l,n){e.current.getAttribute(_$_496c[246])==_$_496c[247]&&
204
+ (f=k,g=l);f=e.getName.call(this,f,g,k,l,n);g=document.createElement(_$_496c[248]);g.innerText=f;g.setAttribute(_$_496c[231],f);e.current.innerText=_$_496c[3];e.current.appendChild(g);d.call(this,e.current);jSuites.focus(g);n.preventDefault()};e.update=function(f,g,k,l,n,q,p){q.getAttribute(_$_496c[246])==_$_496c[247]&&(f=k,g=l);var u=jSuites.getNode();if(u){var x=e.getName.call(this,f,g,k,l,n);this!==p&&(x=p.getWorksheetName()+_$_496c[139]+x);f=function(w){var y=document.createElement(_$_496c[248]);
205
+ y.innerText=x;y.setAttribute(_$_496c[231],x);u.parentNode===q&&!1===w?u.parentNode.insertBefore(y,u.nextSibling):q.appendChild(y);u=y};if(u.getAttribute(_$_496c[231]))n.ctrlKey?(q.appendChild(document.createTextNode(_$_496c[25])),f(!0)):(u.innerText=x,u.setAttribute(_$_496c[231],x));else{if(!u.innerText||u.innerText!==_$_496c[3]&&-1==a.indexOf(u.innerText.slice(-1))||u.nextElementSibling&&u.nextElementSibling.getAttribute(_$_496c[231]))return!1;f(!1)}jSuites.focus(u);d.call(this,q);if(typeof q.onchange==
206
+ _$_496c[89])q.onchange();n.preventDefault();return!0}return!1};e.onkeydown=function(f){f.target.worksheet=this;if(f.ctrlKey){if(67==f.which||88==f.which)f=window.getSelection().toString().replace(/(\r\n|\n|\r)/gm,_$_496c[3]),navigator.clipboard?navigator.clipboard.writeText(f):(this.parent.textarea.value=f,this.parent.textarea.select(),document.execCommand(_$_496c[205]))}else if(36==f.which){var g=window.getSelection(),k=document.createRange();k.setStart(f.target,0);g.removeAllRanges();g.addRange(k)}else 35==
207
+ f.which?jSuites.focus(f.target):187==f.which?!f.target.innerText.replace(/(\r\n|\n|\r)/gm,_$_496c[3])&&f.target.getAttribute(_$_496c[100])&&f.target.removeAttribute(_$_496c[100]):13==f.which&&f.target.blur()};return e}(),Y=function(){var h=new RegExp(/^(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]+)(:\$?[A-Z]+\$?[0-9]+)?$/i),a=function(g){g=c(g);for(var k=[_$_496c[198],_$_496c[161],_$_496c[222],_$_496c[223],_$_496c[224],_$_496c[249]],l=[_$_496c[225],_$_496c[250],_$_496c[1],_$_496c[2],_$_496c[226],_$_496c[251],
208
+ _$_496c[25],_$_496c[227],_$_496c[12],_$_496c[228],_$_496c[229],_$_496c[230]],n=_$_496c[3],q=[],p=0,u=0;u<g.length;u++){if(g[u]==_$_496c[200]||g[u]==_$_496c[137])p=0==p?1:0;0==p&&(-1<k.indexOf(g[u])||-1<l.indexOf(g[u]))?(n&&(q.push(n),n=_$_496c[3]),q.push(g[u])):n+=g[u]}n&&q.push(n);for(u=0;u<q.length;u++)-1==q[u].indexOf(_$_496c[200])&&-1==q[u].indexOf(_$_496c[137])&&(q[u]=q[u].replace(/\s/g,_$_496c[3]));return q},c=function(g,k){for(var l=_$_496c[3],n=0,q=[_$_496c[12],_$_496c[139],_$_496c[229],_$_496c[228]],
209
+ p=0;p<g.length;p++)g[p]==_$_496c[200]&&(n=0==n?1:0),1==n?l+=g[p]:(l+=g[p].toUpperCase(),1==k&&0<p&&g[p]==_$_496c[12]&&-1==q.indexOf(g[p-1])&&-1==q.indexOf(g[p+1])&&(l+=_$_496c[12]));return l},b=function(g){g.setFormula=b[_$_496c[11]];g.updateFormula=b.update;g.executeFormula=b.execute;g.resetArray=b.resetArray;g.formula=[]};b.run=function(g,k){var l=_$_496c[3],n=Object.keys(k);if(n.length){for(var q={},p=0;p<n.length;p++){var u=n[p].replace(/!/g,_$_496c[27]);0<u.indexOf(_$_496c[27])&&(u=u.split(_$_496c[27]),
210
+ q[u[0]]=!0)}u=Object.keys(q);for(p=0;p<u.length;p++)l+=_$_496c[252]+u[p]+_$_496c[253];for(p=0;p<n.length;p++)u=n[p].replace(/!/g,_$_496c[27]),null===k[n[p]]||jSuites.isNumeric(k[n[p]])||(q=k[n[p]].match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&q.length&&(k[n[p]]=e(q,k[n[p]])),l=0<u.indexOf(_$_496c[27])?l+(u+_$_496c[254]+k[n[p]]+_$_496c[255]):l+(_$_496c[252]+u+_$_496c[254]+k[n[p]]+_$_496c[255])}g=g.replace(/\$/g,_$_496c[3]);(q=g.match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&
211
+ q.length&&(g=e(q,g));g=g.replace(/!/g,_$_496c[27]);g=(new Function(l+_$_496c[256]+g))();null===g&&(g=0);return g};b[_$_496c[11]]=function(){};var d=function(g){g=c(g,!0);return g.replace(/\$/g,_$_496c[3])},e=function(g,k){for(var l=0;l<g.length;l++){var n=b.getTokensFromRange.call(this,g[l]);k=k.replace(g[l],_$_496c[226]+n.join(_$_496c[25])+_$_496c[251])}return k},f=function(g,k,l){for(var n=this.config.definedNames,q=0;q<g.length;q++)g[q]&&n&&n[g[q]]&&(k=k.replace(g[q],n[g[q]]),l&&(l[g[q]]=n[g[q]]));
212
+ return d(k)};b.resetArray=function(g,k){var l;if(l=this.records[k][g].a){for(var n=0;n<l.length;n++)for(var q=0;q<l[n].length;q++)this.options.data[k+n][g+q]||(this.records[k+n][g+q].v=_$_496c[3],this.records[k+n][g+q].element&&(this.records[k+n][g+q].element.innerText=_$_496c[3]));this.records[k][g].a=null}};b.execute=function(g,k,l,n,q){if(1==this.parent.processing)return null!==k&&null!==l&&this.parent.queue.push([this,k,l]),_$_496c[3];if(typeof this.parent.config.onbeforeformula==_$_496c[89]){var p=
213
+ G.call(this.parent,_$_496c[257],this,g,k,l);if(!1===p)return g;p&&(g=p)}var u=[],x=function(C,M,J,T){if(void 0!=M&&void 0!=J){var N=F.getColumnNameFromCoords(M,J);J=T.getWorksheetName()+_$_496c[27]+N;u[J]||(u[J]=0);u[J]++;if(3<u[J])throw{error:_$_496c[258],message:_$_496c[259],reference:J};}else N=null;q||(C=d(C));var U=C,X=U.match(/[A-Z_]+[A-Z0-9_\.]*/g);X&&X.length&&(U=f.call(T.parent,X,U,w));(X=U.match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&X.length&&(U=e.call(T,X,U));
214
+ X=[];U=a(U);for(var O=0;O<U.length;O++)U[O]&&h.test(U[O])&&X.push(U[O]);if(X){if(-1<X.indexOf(N))throw{error:_$_496c[260],message:_$_496c[261]};for(U=0;U<X.length;U++){O=X[U].split(_$_496c[139]);O[1]?(M=O[1],O=H(O[0]),J=T.getWorksheetName()+_$_496c[27]+N):(M=O[0],O=T,J=N);if(typeof O==_$_496c[13]||typeof O.formula==_$_496c[13])throw{error:_$_496c[262],message:_$_496c[263]};J&&(O.formula[M]||(O.formula[M]=[]),0>O.formula[M].indexOf(J)&&O.formula[M].push(J));if(!w[X[U]]){J=F.getCoordsFromColumnName(M);
215
+ M=J[0];J=J[1];var ua=void 0!==O.records[J][M].v?O.records[J][M].v:P.call(O,M,J);w[X[U]]||((_$_496c[3]+ua).substr(0,1)==_$_496c[12]?w[X[U]]=x(ua,M,J,O):(ua===_$_496c[3]?ua=null:ua!=Number(ua)&&(ua=_$_496c[200]+ua+_$_496c[200]),w[X[U]]=ua))}}}return C.substr(1)},w={};try{g=x(g,k,l,this);if(g==_$_496c[3])return _$_496c[3];0==g.indexOf(_$_496c[264])&&(q=!0);var y=q?b.run(g,w):v.formula(g,w,k,l,this);if(!1!==n&&void 0!=k&&void 0!=l)if(y instanceof Date)this.records[l][k].v=jSuites.calendar.dateToNum(y);
216
+ else if(Array.isArray(y)){n=[];p=null;for(var B=0;B<y.length;B++)for(var D=0;D<y[B].length;D++){(0<D||0<B)&&this.options.data[l+B][k+D]!==_$_496c[3]&&(p=_$_496c[265]);var r=F.getColumnNameFromCoords(k+D,l+B);n.push(r)}if(!p){r=F.getColumnNameFromCoords(k,l);var z=Object.keys(this.formula);for(B=0;B<z.length;B++){var A=this.formula[z[B]].indexOf(r);if(0<=A)for(D=0;D<n.length;D++)A=this.formula[z[B]].indexOf(n[D]),-1==A&&this.formula[z[B]].push(n[D])}for(B=0;B<y.length;B++)for(D=0;D<y[B].length;D++)this.records[l+
217
+ B][k+D].v=y[B][D],this.records[l+B][k+D].element&&(this.records[l+B][k+D].element.innerText=y[B][D]);this.records[l][k].a=y;p=y[0][0];this.records[l][k].v=p}y=p}else this.records[l][k].v=y;return y}catch(C){return 1==this.parent.config.debugFormulas&&console.log(g,w,C),C&&C.error?C.error:_$_496c[262]}};b.update=function(g,k,l,n){var q=null,p=null,u=function(y){l&&l[y]&&(y=_$_496c[266]);k[y]&&(y=k[y]);return y};g=c(g,!0);g=a(g);for(var x=0;x<g.length;x++)if(g[x]&&h.test(g[x])){if(-1==g[x].indexOf(_$_496c[139])){if(p=
218
+ g[x],q=_$_496c[3],n)continue}else if(p=g[x].split(_$_496c[139]),q=p[0],p=p[1],n!=q)continue;if(0<=p.indexOf(_$_496c[140])){p=b.getTokensFromRange.call(this,p);for(var w=0;w<p.length;w++)p[w]=u(p[w]);p=b.getRangeFromTokens.call(this,p)}else-1==p.indexOf(_$_496c[267])?p=u(p):(p=u(p.replace(/\$/g,_$_496c[3])),p=_$_496c[267]+p.match(/[A-Z]+/g)+_$_496c[267]+p.match(/[0-9]+/g));q&&(p=q+_$_496c[139]+p);g[x]=p}return g.join(_$_496c[3])};b.getChain=function(g){if(void 0===g)return[];var k=[],l=[],n=[],q=function(x){if(0<=
219
+ x.indexOf(_$_496c[27])){var w=x.split(_$_496c[27]),y=w.pop(),B=w.join(_$_496c[27]);w=H(B)}else w=this,B=w.getWorksheetName(),y=x;if(w.formula[y]&&!n[x]){var D=!1;n[x]=!0;for(x=0;x<w.formula[y].length;x++){var r=w.formula[y][x];-1==r.indexOf(_$_496c[27])&&(r=B+_$_496c[27]+r);if(!l[r]){var z=w.getValue(r);Q(z)?k.push([r,z,b.getTokens.call(w,z,B)]):(D=!0,w.formula[y][x]=null);q.call(w,r);l[r]=!0}}1==D&&(w.formula[y]=w.formula[y].filter(function(A){return null!=A}))}},p=Object.keys(g);for(g=0;g<p.length;g++)q.call(this,
220
+ p[g]);p=0;for(g=k.length-1;0<=g;g--){for(var u=0;u<g;u++)if(0<=k[u][2].indexOf(k[g][0])){k.splice(u,0,k.splice(g,1)[0]);g=k.length;break}p++;if(1E6<p){console.error(_$_496c[268]);break}}l=[];for(g=0;g<k.length;g++)l[k[g][0]]=k[g][1];return l};b.updateAll=function(g,k){var l,n;Ia.updateAll.call(this,g,k);var q=Object.keys(this.formula);var p=[];var u=[];for(l=0;l<q.length;l++){var x=q[l];var w=this.formula[x];if(k&&k[x])for(var y=0;y<w.length;y++)g[w[y]]&&(w[y]=g[w[y]]),u[w[y]]=!0;else{var B=[];for(y=
221
+ 0;y<w.length;y++)k&&k[w[y]]||(g[w[y]]&&(w[y]=g[w[y]]),u[w[y]]=!0,B.push(w[y]));B.length&&(g[x]&&(x=g[x]),p[x]=B)}}this.formula=p;B=this.getWorksheetName();for(var D=0;D<v.spreadsheet.length;D++)for(var r=v.spreadsheet[D].worksheets,z=0;z<r.length;z++)if(r[z].getWorksheetName()!==B)for(q=Object.keys(r[z].formula),l=0;l<q.length;l++){p=[];w=r[z].formula[q[l]];for(y=0;y<w.length;y++)x=w[y].split(_$_496c[27]),x[0]==B&&x[1]?k&&k[x[1]]||(g[x[1]]&&(x[1]=g[x[1]]),p.push(x[0]+_$_496c[27]+x[1])):p.push(w[y]);
222
+ r[z].formula[q[l]]=p}q=[];x=Object.keys(u);for(y=0;y<x.length;y++)0<=x[y].indexOf(_$_496c[27])?(w=x[y].split(_$_496c[27]),p=H(w[0]),l=w[1],B=this.getWorksheetName(),w=w[0]):(p=this,l=x[y],B=null,w=this.getWorksheetName()),(n=p.getValue(l))&&Q(n)&&(p=b.update.call(p,n,g,k,B),p!=n&&(u[x[y]]=p,l=F.getCoordsFromColumnName(l),q[w]||(q[w]=[]),q[w].push({x:l[0],y:l[1],value:p,force:!0})));x=Object.keys(q);for(g=0;g<x.length;g++)p=H(x[g]),q[x[g]]=ia.applyValues.call(p,q[x[g]]),ia.setValueChained.call(p,q[x[g]]),
223
+ K.call(p,_$_496c[112],{data:q[x[g]]})};b.updateWorksheetName=function(g,k,l){for(var n=a(g),q=0;q<n.length;q++)g=n[q].split(_$_496c[139]),g[1]&&(g[0]=g[0].replace(new RegExp(_$_496c[137],_$_496c[201]),_$_496c[3]),g[0].toUpperCase()==k.toUpperCase()&&(g[0]=l,0<=g[0].indexOf(_$_496c[136])&&(g[0]=_$_496c[137]+g[0]+_$_496c[137]),n[q]=g.join(_$_496c[139])));return n.join(_$_496c[3])};b.updateWorksheetNames=function(g,k){for(var l,n,q=0;q<v.spreadsheet.length;q++)for(var p=[],u=v.spreadsheet[q].worksheets,
224
+ x=0;x<u.length;x++){for(var w=0;w<u[x].options.data.length;w++)for(var y=0;y<u[x].options.data[w].length;y++)(l=u[x].options.data[w][y])&&Q(l)&&(n=b.updateWorksheetName(l,g,k),n!=l&&p.push({x:y,y:w,value:n,force:!0}));p.length&&(p=ia.applyValues.call(u[x],p),K.call(u[x],_$_496c[112],{data:p}))}};b.shiftFormula=function(g,k,l){var n=a(g,!0);g=function(x){if(-1==x.indexOf(_$_496c[139])){x=F.getCoordsFromColumnName(x);var w=_$_496c[3]}else w=n[q].split(_$_496c[139]),x=F.getCoordsFromColumnName(w[1]),
225
+ w=w[0]+_$_496c[139];var y=x[0]+k;x=x[1]+l;return x=0>y||0>x?_$_496c[266]:w+F.getColumnNameFromCoords(y,x)};for(var q=0;q<n.length;q++)if(h.test(n[q])&&-1==n[q].indexOf(_$_496c[267])){var p=-1==n[q].indexOf(_$_496c[139])?[_$_496c[3],n[q]]:n[q].split(_$_496c[139]);if(-1==p[1].indexOf(_$_496c[140]))p[1]=g(p[1]);else{var u=p[1].split(_$_496c[140]);p[1]=g(u[0])+_$_496c[140]+g(u[1])}n[q]=p[0]?p.join(_$_496c[139]):p[1]}return n.join(_$_496c[3])};b.getTokensFromRange=function(g){var k=this,l=_$_496c[3],n=
226
+ _$_496c[3];0<=g.indexOf(_$_496c[139])?n=_$_496c[139]:0<=g.indexOf(_$_496c[27])&&(n=_$_496c[27]);g=g.replace(/\$/g,_$_496c[3]);n&&(l=g.split(n),g=l.pop(),l=l.join(_$_496c[27]),k=H(l),l+=n);if(-1==g.indexOf(_$_496c[140]))return[g];n=[];g=g.split(_$_496c[140]);var q=F.getCoordsFromColumnName(g[0]),p=F.getCoordsFromColumnName(g[1]);if(q[0]<=p[0]){g=q[0];var u=p[0]}else g=p[0],u=q[0];if(null===q[1]&&null==p[1]){var x=0;q=0;k.options&&k.options.data&&(q=k.options.data.length-1)}else q[1]<=p[1]?(x=q[1],
227
+ q=p[1]):(x=p[1],q=q[1]);for(k=x;k<=q;k++)for(x=g;x<=u;x++)n.push(l+F.getColumnNameFromCoords(x,k));return n};b.getRangeFromTokens=function(g){g=g.filter(function(n){return n!=_$_496c[266]});for(var k=_$_496c[3],l=0;l<g.length;l++)0<=g[l].indexOf(_$_496c[27])&&(k=g[l].split(_$_496c[27]),g[l]=k.pop(),k=k.join(_$_496c[27]));k&&(k+=_$_496c[27]);g.sort(function(n,q){n=F.getCoordsFromColumnName(n);q=F.getCoordsFromColumnName(q);return n[1]>q[1]?1:n[1]<q[1]?-1:n[0]>q[0]?1:n[0]<q[0]?-1:0});return g.length?
228
+ k+(g[0]+_$_496c[140]+g[g.length-1]):_$_496c[266]};b.getTokens=function(g,k){var l=d(g);g.replace(/!/g,_$_496c[27]);(g=l.match(/[A-Z_]+[A-Z0-9_\.]*/g))&&g.length&&(l=f.call(this.parent,g,l));(g=l.match(/('.*?'?|\w*\.)?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&g.length&&(l=e.call(this,g,l));if(g=l.match(/('.*?'?|\w*\.)?(\$?[A-Z]+\$?[0-9]+)(:\$?[A-Z]+\$?[0-9]+)?/g))for(l=0;l<g.length;l++)-1==g[l].indexOf(_$_496c[27])&&k&&(g[l]=k+_$_496c[27]+g[l]);return g};b.tokenIdentifier=h;b.tokenize=a;return b}(),
229
+ ia=function(){var h=function(a){a.name=da;a.value=P;a.getValue=h[_$_496c[46]];a.getValueFromCoords=h.getFromCoords;a.setValue=h[_$_496c[11]];a.setValueFromCoords=h.setFromCoords;a.setCheckRadioValue=h.setCheckRadio;a.getProcessed=h.processed};h[_$_496c[46]]=function(a,c){var b=this;if(typeof a==_$_496c[88]){var d=a.x;a=a.y}else 0<=a.indexOf(_$_496c[27])&&(b=a.split(_$_496c[27]),a=b.pop(),b=H(b.join(_$_496c[27]))),a=F.getCoordsFromColumnName(a),d=a[0],a=a[1];return h.getFromCoords.call(b,d,a,c)};h.getFromCoords=
230
+ function(a,c,b){var d=null;null!=a&&null!=c&&(d=b?h.processed.call(this,a,c):P.call(this,a,c));return d};h[_$_496c[11]]=function(a,c,b){if(!R.call(this.parent,this))return!1;var d=null,e=null,f=null,g=[];b=b?!0:!1;var k=function(q,p){var u=null;typeof q==_$_496c[17]?(f=F.getCoordsFromColumnName(q),d=f[0],e=f[1]):q.tagName?(d=q.getAttribute(_$_496c[44]),e=q.getAttribute(_$_496c[45])):q.element&&q.element.tagName?(d=q.element.getAttribute(_$_496c[44]),e=q.element.getAttribute(_$_496c[45])):(d=q.x,e=
231
+ q.y,void 0!==q.value&&(p=q.value),void 0!==q.style&&(u=q.style));q={x:d,y:e,value:p,force:b};null!==u&&(q.style=u);g.push(q)};if(a&&Array.isArray(a))for(var l=0;l<a.length;l++)k(a[l],c);else if(typeof a==_$_496c[88]&&void 0==a.x&&void 0==a.tagName)for(c=Object.keys(a),l=0;l<c.length;l++)k(c[l],a[c[l]]);else k(a,c);if(g.length){g=h.applyValues.call(this,g);this.parent.config.parseFormulas&&h.setValueChained.call(this,g);ca.update.call(this,!0);this.refreshBorders();var n=this;setTimeout(function(){aa.refresh.call(n)},
232
+ 250);if(g.length){W.call(this.parent,{worksheet:n,action:_$_496c[81],records:g,selection:this.selectedCell});a=this.getPrimaryKey();if(!1!==a)for(l=0;l<g.length;l++)g[l].x===a&&g[l].value&&V.call(this,g[l]);K.call(this,_$_496c[81],{data:g});G.call(this.parent,_$_496c[269],this,g)}}};h.setFromCoords=function(a,c,b,d){var e=[];e.push({x:a,y:c,value:b});h[_$_496c[11]].call(this,e,null,d)};h.setCheckRadio=function(){for(var a=[],c=this.getSelected(),b=0;b<c.length;b++){var d=c[b].x,e=c[b].y;if(!this.options.columns[d].readOnly&&
233
+ this.options.columns[d].type==_$_496c[270]){var f=P.call(this,d,e)?!1:!0;a.push({x:d,y:e,value:f})}}a.length&&h[_$_496c[11]].call(this,a)};h.applyValues=function(a){for(var c,b,d=this.options.style||{},e=[],f={},g=0;g<a.length;g++)if(c=a[g],b=this.updateCell(c.x,c.y,c.value,c.force),void 0!==b.value){if(void 0!==c.style){var k=F.getColumnNameFromCoords(c.x,c.y);b.style=f[k]=c.style;b.oldStyle=d&&d[k]?d[k]:_$_496c[206]}e.push(b)}0<Object.keys(f).length&&Qa.update.call(this,f);return e};h.processed=
234
+ function(a,c,b){var d=P.call(this,a,c);if(null===d)return null;var e=ha[_$_496c[46]].call(this,a,c),f=e[1];f.type!=_$_496c[54]&&f.type!=_$_496c[271]&&f.type!=_$_496c[272]&&f.type!=_$_496c[273]&&f.type!=_$_496c[274]&&0!=f.process&&(!0===b||f.type!=_$_496c[275]&&f.type!=_$_496c[276]&&f.type!=_$_496c[277])&&(f.type==_$_496c[270]?d=e[0][_$_496c[46]](f,d,b):this.records[c][a].element?d=1==this.parent.config.stripHTML?this.records[c][a].element.innerText:this.records[c][a].element.innerHTML:((_$_496c[3]+
235
+ d).substr(0,1)==_$_496c[12]&&(d=this.executeFormula(d,a,c,!1)),e[0]&&typeof e[0][_$_496c[46]]==_$_496c[89]&&(d=e[0][_$_496c[46]](f,d,b))));return d};h.setValueChained=function(a){for(var c,b=[],d,e=0;e<a.length;e++)c=a[e],d=F.getColumnNameFromCoords(c.x,c.y),b[d]=c.value;b=Y.getChain.call(this,b);var f=[],g=Object.keys(b);for(e=0;e<g.length;e++)0<=g[e].indexOf(_$_496c[27])?(c=g[e].split(_$_496c[27]),d=c.pop(),c=H(c.join(_$_496c[27]))):(d=g[e],c=this),d=F.getCoordsFromColumnName(d),a=S.update.call(c,
236
+ d[0],d[1],b[g[e]],!0),a.w=c,a.value=a.v=c.records[d[1]][d[0]].v,a.cell=g[e],a.f=b[g[e]],f.push(a);f.length&&G.call(this.parent,_$_496c[278],this,f)};return h}(),S=function(){var h=function(a){a.getCell=h[_$_496c[46]];a.getCellFromCoords=h[_$_496c[46]];a.updateCell=h.update;a.updateCells=h.updateAll;a.getSelected=h.selected;a.isAttached=h.attached};h.attached=function(a,c){return this.records[c]&&this.records[c][a]&&this.records[c][a].element&&this.records[c][a].element.parentNode&&this.records[c][a].element.parentNode.parentNode?
237
+ !0:!1};h[_$_496c[46]]=function(a,c,b){typeof a==_$_496c[17]&&(c=F.getCoordsFromColumnName(a),a=c[0],c=c[1]);a=parseInt(a);c=parseInt(c);if(this.records[c]&&this.records[c][a]&&this.records[c][a].element)return this.records[c][a].element;var d=P.call(this,a,c);null===d&&(d=_$_496c[3]);return S.create.call(this,a,c,d,b)};h.getFromCoords=function(a,c,b){if(!a)return null;var d=[],e=a[0],f=a[1],g=a[2];a=a[3];for(b&&(b=this.results?F.invert(this.results):null);f<=a;f++)for(var k=e;k<=g;k++)if(!b||b[f])c?
238
+ d.push(F.getColumnNameFromCoords(k,f)):d.push(this.records[f][k]);return d};h.selected=function(a,c){return h.getFromCoords.call(this,this.getHighlighted(),a,c)};h.getSelectedColumns=function(){var a=[],c=this.getHighlighted();if(c)for(var b=c[0];b<=c[2];b++)a.push(b);return a};h.updateAll=function(a){for(var c=this.getPrimaryKey(),b=[],d=0;d<a.length;d++)void 0!==a[d].id?(V.call(this,a[d]),b.push({id:a[d].id,y:a[d].y}),!1!==c&&h.update.call(this,c,a[d].y,a[d].id,!0)):b.push(h.update.call(this,a[d].x,
239
+ a[d].y,a[d].value,a[d].force));K.call(this,_$_496c[111],[b])};h.update=function(a,c,b,d){var e=this.records[c];if(e=e&&e[a]?e[a]:null){e=e.element;var f={x:a,y:c};if(d||!e||1!=e.classList.contains(_$_496c[18])){if(d=G.call(this.parent,_$_496c[279],this,e,a,c,b))b=d;else if(!1===d)return f;d=ha[_$_496c[46]].call(this,a,c);if(typeof d[0].updateCell==_$_496c[89]){var g=d[0].updateCell(e,b,a,c,this,d[1]);void 0!==g&&(b=g)}g=P.call(this,a,c);if(g!==b){var k=P.call(this,a,c,b);f.oldValue=g;f.value=k;e&&
240
+ h.applyOverflow.call(this,e,a,c);d[1]&&typeof d[1].render==_$_496c[89]&&d[1].render(e,b,a,c,this,d[1]);G.call(this.parent,_$_496c[280],this,e,a,c,f.value,f.oldValue)}}}else return!1;return f};h.create=function(a,c,b,d){var e=document.createElement(_$_496c[157]);e.setAttribute(_$_496c[44],a);e.setAttribute(_$_496c[45],c);var f=ha[_$_496c[46]].call(this,a,c);f[0]&&typeof f[0].createCell==_$_496c[89]&&(f=f[0].createCell(e,b,a,c,this,f[1]),void 0!==f&&(b=f));P.call(this,a,c,b);this.records[c][a]||qa.cell.call(this,
241
+ a,c,b);this.records[c][a].element=e;!b&&this.records[c][a].v&&(e.innerText=this.records[c][a].v);h.applyProperties.call(this,e,a,c,d);h.applyOverflow.call(this,e,a,c);G.call(this.parent,_$_496c[281],this,e,a,c,b);return e};h.getAttributes=function(a,c,b){b[a]||(b[a]={});a==_$_496c[282]?b[a][c]=this.getValue(c):a==_$_496c[283]?this.merged.cells&&(c=this.merged.cells[c])&&(b[a][c]=this.options.mergeCells[c]):this.options[a]&&this.options[a][c]&&(b[a][c]=this.options[a][c])};h.setAttributes=function(a){a&&
242
+ a.style&&this.setStyle(a.style);a&&a.comments&&this.setComments(a.comments);a&&a.meta&&this.setMeta(a.meta);a&&a.cells&&this.setCells(a.cells);a&&a.mergeCells&&this.setMerge(a.mergeCells);a&&a.values&&h.batch.call(this,a.values);a&&a.formulas&&h.batch.call(this,a.formulas,!0)};h.applyProperties=function(a,c,b,d){if(!d){var e=F.getColumnNameFromCoords(c,b),f=this.options.style;d=this.options.comments;var g=this.options.cells,k=this.options.rows;if(f&&f[e]){var l=(l=a.getAttribute(_$_496c[104]))?l+
243
+ (_$_496c[230]+f[e]):f[e];a.setAttribute(_$_496c[104],l)}this.options.columns[c]&&this.options.columns[c].wrap&&a.classList.add(_$_496c[284]);d&&d[e]&&a.setAttribute(_$_496c[285],d[e]);g&&g[e]&&(1==g[e].readOnly&&a.classList.add(_$_496c[18]),!1===g[e].locked&&!0===this.options.selectUnLockedCells&&a.classList.add(_$_496c[286]),1==g[e].wrap&&a.classList.add(_$_496c[284]));k&&k[b]&&1==k[b].readOnly&&a.classList.add(_$_496c[18])}d=this.options.columns[c];if(!a.style.textAlign||d.align)if(l=d.align?d.align:
244
+ this.options.defaultColAlign)a.style.textAlign=l;!1===this.records[b][c].readonly||1!=this.records[b][c].readonly&&1!=d.readOnly&&1!=d.readonly||a.classList.add(_$_496c[18])};h.applyOverflow=function(a,c,b){1==this.options.textOverflow&&0<c&&(c==this.options.columns.length-1&&(a.style.overflow=_$_496c[54]),this.records[b][c-1]&&this.records[b][c-1].element&&(this.records[b][c-1].element.style.overflow=!a.innerText&&this.headers[c-1]&&this.headers[c-1].offsetWidth?_$_496c[3]:_$_496c[54]))};h.batch=
245
+ function(a,c){var b=[],d=Object.keys(a);if(d.length)for(var e=0;e<d.length;e++){if(0<=d[e].indexOf(_$_496c[27])){var f=d[e].split(_$_496c[27]);var g=H(f[0]);var k=f[1];f=f[0]}else g=this,k=d[e],f=this.getWorksheetName();k=F.getCoordsFromColumnName(k);k=g.updateCell(k[0],k[1],a[d[e]],!0);b[f]||(b[f]=[]);b[f].push(k)}if(1==c&&(d=Object.keys(b),d.length))for(e=0;e<d.length;e++)g=H(d[e]),K.call(g,_$_496c[112],b[d[e]])};return h}(),Ha=function(){var h=function(a){a.getColumnOptions=h[_$_496c[46]];a.setColumnOptions=
246
+ h[_$_496c[11]];a.getCells=h.getCells;a.setCells=h.setCells;a.getProperties=h[_$_496c[46]];a.setProperties=h[_$_496c[11]];a.getProperty=h[_$_496c[46]];a.setProperty=h[_$_496c[11]];a.resetProperty=h[_$_496c[11]];a.updateProperty=h.update;a.getOptions=h[_$_496c[46]]};h.getCells=function(a){return a?this.options.cells[a]:this.options.cells};h.setCells=function(a,c){if(!R.call(this.parent,this))return!1;if(typeof a==_$_496c[17])this.options.cells[a]=c;else{c=Object.keys(a);for(var b=0;b<c.length;b++)this.options.cells[c[b]]=
247
+ a[c[b]]}};h[_$_496c[46]]=function(a,c){var b=null;void 0!==c&&(c=F.getColumnNameFromCoords(a,c),this.options.cells&&this.options.cells[c]&&(b=this.options.cells[c]));null===b&&(b=this.options.columns[a]);if(!b)b={type:_$_496c[59]};else if(!b.type||typeof b.type==_$_496c[17]&&!v.editors[b.type])b.type=_$_496c[59];return b};h[_$_496c[11]]=function(a,c,b){if(!R.call(this.parent,this))return!1;this.edition&&this.closeEditor(this.edition,!1);var d=[];Array.isArray(a)?d=a:jSuites.isNumeric(a)&&jSuites.isNumeric(c)?
248
+ (a={x:a,y:c},typeof b==_$_496c[88]&&(a.value=b),d.push(a)):typeof c===_$_496c[88]&&(a={x:a,value:c},d.push(a));if(Array.isArray(d))for(b=0;b<d.length;b++){var e=d[b];a=e.x;c=e.y;var f=h[_$_496c[46]].call(this,a,c),g=e.value,k=v.editors[f.type],l=null;g&&g.type&&(l=v.editors[g.type]);if(typeof c===_$_496c[13])for(e.oldValue=f,parseInt(g.width)||(g.width=this.options.defaultColWidth||100),g.type&&v.editors[g.type]||(g.type=_$_496c[59]),this.options.columns[a]=g,g.width&&this.colgroup[a]&&this.colgroup[a].setAttribute(_$_496c[162],
249
+ parseInt(g.width)),typeof g.title!==_$_496c[13]&&this.headers[a]&&(g.title?(this.headers[a].innerText=g.title,this.headers[a].setAttribute(_$_496c[177],g.title)):(this.headers[a].innerText=F.getColumnName(a),this.headers[a].removeAttribute(_$_496c[177]))),g.tooltip&&this.headers[a]&&(this.headers[a].title=g.tooltip),c=0;c<this.records.length;c++)this.records[c][a].element&&(k&&typeof k.destroyCell==_$_496c[89]&&k.destroyCell(this.records[c][a].element,a,c),l&&typeof l.createCell==_$_496c[89]&&(S.applyProperties.call(this,
250
+ this.records[c][a].element,a,c),l.createCell(this.records[c][a].element,P.call(this,a,c),a,c,this,g)));else if(f=F.getColumnNameFromCoords(a,c),e.oldValue=this.options.cells&&this.options.cells[f]?this.options.cells[f]:_$_496c[3],g?(this.options.cells||(this.options.cells={}),this.options.cells[f]=g):(delete this.options.cells[f],g=h[_$_496c[46]].call(this,a,c),l=v.editors[g.type]),e=this.records[c][a].element)k&&typeof k.destroyCell==_$_496c[89]&&k.destroyCell(e,a,c,this),l&&typeof l.createCell==
251
+ _$_496c[89]&&(k=P.call(this,a,c),S.applyProperties.call(this,e,a,c,this),g=l.createCell(e,k,a,c,this,g),void 0!==g&&P.call(this,a,c,g))}else return console.error(_$_496c[268]),!1;this.refreshBorders();W.call(this.parent,{worksheet:this,action:_$_496c[82],records:d});K.call(this,_$_496c[82],{data:d});G.call(this.parent,_$_496c[287],this,d);return!0};h.update=function(a){var c=JSON.parse(JSON.stringify(a));if(Array.isArray(a))for(var b=0;b<a.length;b++){var d=a[b].x,e=a[b].y,f=a[b];var g=F.getColumnNameFromCoords(d,
252
+ e);this.options.cells[g]||(this.options.cells[g]={});g=this.options.cells[g];f.oldValue=Object.assign({},g);for(var k=Object.keys(f.value),l=0;l<k.length;l++)g[k[l]]=f.value[k[l]];f=ha[_$_496c[46]].call(this,d,e);typeof f[0].updateProperty==_$_496c[89]&&f[0].updateProperty(d,e,this,f[1])}W.call(this.parent,{worksheet:this,action:_$_496c[83],records:a});K.call(this,_$_496c[83],{data:c});G.call(this.parent,_$_496c[287],this,a)};return h}(),ja=function(){var h=function(c,b){Array.isArray(b)||(b=[b]);
253
+ for(var d,e=c?_$_496c[3]:_$_496c[40],f=Object.keys(b),g=0;g<f.length;g++)if(d=this.rows[b[f[g]]])d.element&&(d.element.style.display=e),d.visible=c;I.call(this,!0);this.resetBorders()},a=function(c){c.getRow=a[_$_496c[46]];c.moveRow=a.move;c.insertRow=a.add;c.deleteRow=a.del;c.getSelectedRows=a.selected;c.showRow=h.bind(c,!0);c.hideRow=h.bind(c,!1)};a.height=function(c){var b=0,d=this.rows,e=this.options.rows||{};d[c]&&!1!==d[c].visible&&(b=e[c]&&e[c].height?parseInt(e[c].height):d[c].element&&d[c].element.offsetHeight?
254
+ d[c].element.offsetHeight:d[c].height?d[c].height:this.options.defaultRowHeight||24);return b};a[_$_496c[46]]=function(c){return this.rows[c]};a.attached=function(c){return this.rows[c]&&this.rows[c].element&&this.rows[c].element.parentNode?!0:!1};a.selected=function(c){var b=[],d=this.getHighlighted();if(d)for(var e=d[1];e<=d[3];e++)c?b.push(e):b.push(this.rows[e].element);return b};a.create=function(c,b){if(this.rows[c]&&this.rows[c].element)return this.rows[c].element;this.rows[c]||qa.row.call(this,
255
+ c);var d=document.createElement(_$_496c[155]);d.setAttribute(_$_496c[45],c);this.rows[c].element=d;var e=null;this.options.rows[c]&&!b&&(this.options.rows[c].style&&d.setAttribute(_$_496c[104],this.options.rows[c].style),this.options.rows[c].height&&(d.style.height=parseInt(this.options.rows[c].height)+_$_496c[47]),this.options.rows[c].title&&(e=this.options.rows[c].title),0==this.options.rows[c].visible&&(this.rows[c].visible=!1),this.options.rows[c].id&&(this.rows[c].id=this.options.rows[c].id));
256
+ 0==this.rows[c].visible&&(d.style.display=_$_496c[40]);e||(e=parseInt(c+1));b=document.createElement(_$_496c[157]);b.innerHTML=e;b.setAttribute(_$_496c[45],c);b.className=_$_496c[288];d.appendChild(b);G.call(this.parent,_$_496c[289],this,c,d);return d};a.move=function(c,b){if(!R.call(this.parent,this))return!1;c=parseInt(c);b=parseInt(b);if(!this.rows[b]||!this.rows[c])return console.error(_$_496c[290]),!1;if(0<Object.keys(this.getMerge()).length){var d=null;this.merged.rows[c]?d=!0:this.merged.rows[b]&&
257
+ (c>b?this.merged.rows[b-1]&&(d=!0):this.merged.rows[b+1]&&(d=!0));d&&this.destroyMerged()}this.resetBorders();ja.attached.call(this,b)?(d=ja.create.call(this,c),c>b?this.tbody.insertBefore(d,this.rows[b].element):this.tbody.insertBefore(d,this.rows[b].element.nextSibling)):ja.attached.call(this,c)&&this.tbody.removeChild(this.rows[c].element);this.rows.splice(b,0,this.rows.splice(c,1)[0]);this.records.splice(b,0,this.records.splice(c,1)[0]);this.options.data.splice(b,0,this.options.data.splice(c,
258
+ 1)[0]);K.call(this,_$_496c[70],{f:c,t:b});ca.references.call(this);ca.update.call(this);W.call(this.parent,{worksheet:this,action:_$_496c[70],oldValue:c,newValue:b});I.call(this,!0,!0);G.call(this.parent,_$_496c[291],this,c,b)};a.add=function(c,b,d,e,f){if(!R.call(this.parent,this))return!1;if(!this.options.allowInsertRow)return console.error(_$_496c[292]),!1;var g=[];if(0<c)var k=parseInt(c);else k=1,Array.isArray(c)&&!e&&(Array.isArray(c[0])?e=c:(e=[],e.push(c)));e=Fa.standardize(e);d=d?!0:!1;c=
259
+ this.options.data?this.options.data.length-1:0;if(void 0==b||b>c||0>b)b=c,d=!1;k||(k=1);if(!1===G.call(this.parent,_$_496c[293],this,b,k,d))return console.log(_$_496c[294]),!1;aa.reset.call(this);c=d?b:b+1;for(var l,n,q=0,p=[],u=[],x=this.rows.splice(c),w=this.options.data?this.options.data.splice(c):[],y=this.records.splice(c),B=c;B<k+c;B++){var D=e[q]&&e[q].id?e[q].id:va.next.call(this);qa.row.call(this,B,D);n=this.dataType?{}:[];for(var r=0;r<this.options.columns.length;r++)l=da.call(this,r),n[l]=
260
+ _$_496c[3],e&&e[q]&&e[q].data&&(typeof e[q].data[l]!==_$_496c[13]?n[l]=e[q].data[l]:typeof e[q].data[r]!==_$_496c[13]&&(n[l]=e[q].data[r])),g.push({x:r,y:B,value:n[l],force:!0});u.push({id:D,data:n});q++}this.rows=this.rows.concat(x);this.records=this.records.concat(y);Array.prototype.push.apply(this.options.data,w);for(B=c;B<k+c;B++)this.results&&(this.rows[B].results=!0),p.push(this.records[B]);this.merged.rows[c]&&pa.updateConfig.call(this,1,1,c-1,k);K.call(this,_$_496c[66],{numOfRows:k,rowNumber:b,
261
+ insertBefore:d?1:0,data:u});this.results&&(this.results=xa.refresh.call(this));ca.references.call(this);g.length&&ia.applyValues.call(this,g);ca.update.call(this);W.call(this.parent,{worksheet:this,action:_$_496c[66],rowNumber:b,numOfRows:k,insertBefore:d,data:u});f||ka[_$_496c[11]].call(this,0,c,this.options.columns.length-1,k+c-1);I.call(this,!0,!0);G.call(this.parent,_$_496c[295],this,b,k,p,d)};a.del=function(c,b){if(!R.call(this.parent,this))return!1;if(!this.options.allowDeleteRow)return console.error(_$_496c[296]),
262
+ !1;var d={},e=[];void 0==c&&(b=this.getSelectedRows(),b[0]?(c=parseInt(b[0].getAttribute(_$_496c[45])),b=b.length):(c=this.options.data.length-1,b=1));var f=this.options.data.length-1;if(void 0==c||c>f||0>c)c=f;b||(b=1);c+b>=this.options.data.length&&(b=this.options.data.length-c,b>=this.options.data.length&&(b=this.options.data.length,this.resetSelection()));if(!1===G.call(this.parent,_$_496c[297],this,c,b))return console.log(_$_496c[298]),!1;if(-1<parseInt(c)&&0<parseInt(b)){aa.reset.call(this);
263
+ for(var g=c;g<c+b;g++)for(var k=0;k<this.options.columns.length;k++)f=F.getColumnNameFromCoords(k,g),S.getAttributes.call(this,_$_496c[299],f,d),S.getAttributes.call(this,_$_496c[104],f,d),S.getAttributes.call(this,_$_496c[300],f,d),S.getAttributes.call(this,_$_496c[301],f,d),S.getAttributes.call(this,_$_496c[283],f,d),S.getAttributes.call(this,_$_496c[282],f,d),e[f]=!0;if(f=Y.getChain.call(this,d.values))d.formulas=f;for(g=c;g<c+b;g++)ja.attached.call(this,g)&&this.rows[g].element.remove(),this.options.rows&&
264
+ this.options.rows[g]&&(this.options.rows[g]=null);f=[];for(g=c;g<c+b;g++)f.push({id:this.getRowId(g),row:g,data:this.getRowData(g)});this.rows.splice(c,b);g=this.records.splice(c,b);this.options.data.splice(c,b);pa.updateConfig.call(this,1,0,c,b);this.results&&(this.results=xa.refresh.call(this));K.call(this,_$_496c[67],{rowNumber:c,numOfRows:b,data:f});ca.references.call(this,e);ca.update.call(this,!0);W.call(this.parent,{worksheet:this,action:_$_496c[67],rowNumber:c,numOfRows:b,insertBefore:1,data:f,
265
+ attributes:d});I.call(this,!0,!0);G.call(this.parent,_$_496c[302],this,c,b,g,f,d)}};return a}(),oa=function(){var h=function(c,b){Array.isArray(b)||(b=[b]);for(var d,e,f=Object.keys(b),g=0;g<f.length;g++)if(d=b[f[g]],e=this.options.columns[d])this.colgroup[d]&&(this.colgroup[d].style.width=c?parseInt(e.width||this.options.defaultColWidth)+_$_496c[47]:_$_496c[149]),e.visible=c;I.call(this,!0);this.resetBorders()},a=function(c){c.getColumn=a[_$_496c[46]];c.getColumnIdByName=a.getByName;c.getPrimaryKey=
266
+ a.getPrimaryKey;c.getSelectedColumns=a.selected;c.moveColumn=a.move;c.insertColumn=a.add;c.deleteColumn=a.del;c.showColumn=h.bind(c,!0);c.hideColumn=h.bind(c,!1)};a[_$_496c[46]]=function(c){return this.options.columns[c]||!1};a.attached=function(c){return this.headers[c]&&this.headers[c].parentNode?!0:!1};a.getByName=function(c){for(var b=this.options.columns,d=0;d<b.length;d++)if(b[d].name==c)return d;return!1};a.getPrimaryKey=function(){for(var c=0;c<this.options.columns.length;c++)if(1==this.options.columns[c].primaryKey)return c;
267
+ return!1};a.selected=function(){var c=[],b=this.getHighlighted();if(b)for(var d=b[0];d<=b[2];d++)c.push(d);return c};a.move=function(c,b){if(!R.call(this.parent,this))return!1;c=parseInt(c);b=parseInt(b);if(!this.options.columns[c])return console.error(_$_496c[303]),!1;if(!this.options.columns[b])return console.error(_$_496c[304]),!1;if(0<Object.keys(this.getMerge()).length){var d=null;this.merged.cols[c]?d=!0:this.merged.cols[b]&&(c>b?this.merged.cols[b-1]&&(d=!0):this.merged.cols[b+1]&&(d=!0));
268
+ d&&this.destroyMerged()}aa.reset.call(this);this.options.freezeColumns&&ma.applyReset.call(this);if(oa.attached.call(this,b)){Ca.create.call(this,c);var e=(c>b?this.headers[b]:this.headers[b].nextSibling)||null;this.headerContainer.insertBefore(this.headers[c],e);e=(c>b?this.colgroup[b]:this.colgroup[b].nextSibling)||null;this.colgroupContainer.insertBefore(this.colgroup[c],e);for(var f=0;f<this.tbody.children.length;f++)d=this.tbody.children[f].getAttribute(_$_496c[45]),e=(c>b?this.records[d][b].element:
269
+ this.records[d][b].element.nextSibling)||null,this.tbody.children[f].insertBefore(S[_$_496c[46]].call(this,c,d),e);if(this.options.footers)for(f=0;f<this.tfoot.children.length;f++)e=(c>b?this.footers.content[f][b].element:this.footers.content[f][b].element.nextSibling)||null,this.tfoot.children[f].insertBefore(Z.create.call(this,c,f),e)}else if(oa.attached.call(this,c)){this.headerContainer.removeChild(this.headers[c]);this.colgroupContainer.removeChild(this.colgroup[c]);for(f=0;f<this.tbody.children.length;f++)d=
270
+ parseInt(this.tbody.children[f].getAttribute(_$_496c[45])),this.tbody.children[f].removeChild(this.records[d][c].element);if(this.options.footers)for(f=0;f<this.tfoot.children.length;f++)this.tfoot.children[f].removeChild(this.footers.content[f][c].element)}this.options.columns.splice(b,0,this.options.columns.splice(c,1)[0]);this.headers.splice(b,0,this.headers.splice(c,1)[0]);this.colgroup.splice(b,0,this.colgroup.splice(c,1)[0]);for(f=0;f<this.rows.length;f++)this.dataType||this.options.data[f].splice(b,
271
+ 0,this.options.data[f].splice(c,1)[0]),this.records[f].splice(b,0,this.records[f].splice(c,1)[0]);if(this.options.footers)for(f=0;f<this.options.footers.length;f++)this.options.footers[f].splice(b,0,this.options.footers[f].splice(c,1)[0]),this.footers.content[f].splice(b,0,this.footers.content[f].splice(c,1)[0]);K.call(this,_$_496c[71],{f:c,t:b});ca.references.call(this);ca.update.call(this);W.call(this.parent,{worksheet:this,action:_$_496c[71],oldValue:c,newValue:b});I.call(this,!0,!0);G.call(this.parent,
272
+ _$_496c[305],this,c,b)};a.add=function(c,b,d,e,f,g,k){if(!R.call(this.parent,this))return!1;if(!this.options.allowInsertColumn)return console.error(_$_496c[306]),!1;var l=[];if(0<c)var n=parseInt(c);else if(n=1,Array.isArray(c)&&!f)if(Array.isArray(c[0]))f=c;else{f=[];for(var q=0;q<c.length;q++)f[q]=[c[q]]}f||(f=[]);d=d?!0:!1;c=this.options.columns.length-1;if(void 0==b||b>c||0>b)b=c,d=!1;n||(n=1);if(!1===G.call(this.parent,_$_496c[307],this,b,n,d))return console.log(_$_496c[308]),!1;aa.reset.call(this);
273
+ this.options.freezeColumns&&ma.applyReset.call(this);if(1==this.dataType)var p=parseInt((_$_496c[3]+Date.now()).substr(-8));e||(e=[]);for(q=0;q<n;q++)e[q]||(e[q]={type:_$_496c[59],source:[],options:[],width:this.options.defaultColWidth}),1==this.dataType&&typeof e[q].name==_$_496c[13]&&(e[q].name=_$_496c[309]+(p+q));p=d?b:b+1;this.options.columns=F.injectArray(this.options.columns,p,e);q=this.headers.splice(p);var u=this.colgroup.splice(p);for(c=p;c<n+p;c++)Ca.create.call(this,c);this.headers=this.headers.concat(q);
274
+ this.colgroup=this.colgroup.concat(u);Z.adjust.call(this,p,n,1);wa.adjust.call(this,b,n,1,g);u=null;for(var x,w=0;w<this.options.data.length;w++){this.dataType||(u=this.options.data[w].splice(p));x=this.records[w].splice(p);g=0;for(c=p;c<n+p;c++)q=f[w]&&f[w][g]?f[w][g]:_$_496c[3],P.call(this,c,w,q),l.push({x:c,y:w,value:q}),qa.cell.call(this,c,w),g++;this.dataType||(this.options.data[w]=this.options.data[w].concat(u));this.records[w]=this.records[w].concat(x)}this.merged.cols[p]&&pa.updateConfig.call(this,
275
+ 0,1,p-1,n);K.call(this,_$_496c[68],{numOfColumns:n,columnNumber:b,insertBefore:d?1:0,properties:e,data:f});ca.references.call(this);l.length&&ia.applyValues.call(this,l);ca.update.call(this);W.call(this.parent,{worksheet:this,action:_$_496c[68],columnNumber:b,numOfColumns:n,insertBefore:d,properties:e,data:f});k||ka[_$_496c[11]].call(this,p,0,n+p-1,this.rows.length-1);I.call(this,!0,!0);G.call(this.parent,_$_496c[310],this,b,n,[],d)};a.del=function(c,b){if(!R.call(this.parent,this))return!1;if(!this.options.allowDeleteColumn)return console.error(_$_496c[311]),
276
+ !1;var d={},e=[];if(1<this.options.columns.length){void 0==c&&(b=this.getSelectedColumns(!0),b.length?(c=parseInt(b[0]),b=parseInt(b.length)):(c=this.options.columns.length-1,b=1));var f=this.options.columns.length-1;if(void 0==c||c>f||0>c)c=f;b||(b=1);c+b>=this.options.columns.length&&(b=this.options.columns.length-c,b>=this.options.columns.length&&(b--,console.error(_$_496c[312])));if(!1===G.call(this.parent,_$_496c[313],this,c,b))return console.log(_$_496c[314]),!1;if(-1<parseInt(c)&&0<parseInt(b)){aa.reset.call(this);
277
+ f=null;var g=[],k=[],l=[];var n=0;for(var q=c;q<c+b;q++)oa.attached.call(this,q)&&(this.colgroup[q].parentNode.removeChild(this.colgroup[q]),this.headers[q].parentNode.removeChild(this.headers[q])),l[n]=this.options.columns[q],n++;for(var p=0;p<this.options.data.length;p++)for(q=c;q<c+b;q++)n=F.getColumnNameFromCoords(q,p),S.getAttributes.call(this,_$_496c[299],n,d),S.getAttributes.call(this,_$_496c[104],n,d),S.getAttributes.call(this,_$_496c[300],n,d),S.getAttributes.call(this,_$_496c[301],n,d),
278
+ S.getAttributes.call(this,_$_496c[283],n,d),S.getAttributes.call(this,_$_496c[282],n,d),e[n]=!0,this.records[p][q].element&&0<=Array.prototype.indexOf.call(this.rows[p].element.children,this.records[p][q].element)&&this.records[p][q].element.parentNode.removeChild(this.records[p][q].element);if(q=Y.getChain.call(this,d.values))d.formulas=q;this.options.columns.splice(c,b);this.headers.splice(c,b);this.colgroup.splice(c,b);for(p=0;p<this.options.data.length;p++)this.dataType||(k[p]=this.options.data[p].splice(c,
279
+ b)),g[p]=this.records[p].splice(c,b);Z.adjust.call(this,c,b,0);(q=wa.adjust.call(this,c,b,0))&&(f={nested:q});pa.updateConfig.call(this,0,0,c,b);K.call(this,_$_496c[69],{columnNumber:c,numOfColumns:b});ca.references.call(this,e);ca.update.call(this,!0);W.call(this.parent,{worksheet:this,action:_$_496c[69],columnNumber:c,numOfColumns:b,insertBefore:1,data:k,properties:l,attributes:d,extra:f});I.call(this,!0,!0);G.call(this.parent,_$_496c[315],this,c,b,g,l,d)}}};a.isVisible=function(c){var b=this.options.columns;
280
+ return!1===b[c].visible||b[c].type===_$_496c[54]?!1:!0};return a}(),Qa=function(){var h={},a={},c=function(d){if(typeof d==_$_496c[17]){var e=d;d=F.getCoordsFromColumnName(d);var f=d[0];d=d[1]}else f=d.x,d=d.y,e=F.getColumnNameFromCoords(f,d);if(this.records[d]&&this.records[d][f]&&this.records[d][f].element){a[e]=this.options.style[e];this.records[d][f].element.setAttribute(_$_496c[104],_$_496c[3]);if(this.options.cells&&this.options.cells[e]&&this.options.cells[e].align)var g=this.options.cells[e].align;
281
+ else this.options.columns[f].align?g=this.options.columns[f].align:this.options.defaultColAlign&&(g=this.options.defaultColAlign);g&&(this.records[d][f].element.style.textAlign=g)}this.options.style&&this.options.style[e]&&delete this.options.style[e]},b=function(d){d.getStyle=b[_$_496c[46]];d.setStyle=b[_$_496c[11]];d.resetStyle=b.reset};b[_$_496c[46]]=function(d){var e=this.options.style;if(!e)return!1;if(d){if(typeof d==_$_496c[17])return e[d];var f=[],g=Object.keys(d);if(0<g.length)for(var k=
282
+ 0;k<g.length;k++){if(typeof d[k]==_$_496c[17])var l=e&&e[d[k]]?e[d[k]]:_$_496c[3];else l=F.getColumnNameFromCoords(d[k].x,d[k].y),l=e&&e[l]?e[l]:_$_496c[3];f.push(l)}return f}return this.options.style};b[_$_496c[11]]=function(d,e,f,g){if(!R.call(this.parent,this))return!1;this.options.style||(this.options.style={});var k=this.options.style,l=null,n=[],q=[],p={};q=function(w,y,B){if(!p[w]&&(k[w]?n=k[w].split(_$_496c[230]):(k[w]=_$_496c[3],n=[]),p[w]={},n.length))for(var D=0;D<n.length;D++)n[D]&&n[D].trim()&&
283
+ (l=n[D].split(_$_496c[140]),p[w][l[0].trim()]=l[1].trim());a[w]||(a[w]=[]);h[w]||(h[w]=[]);p[w][y]||(p[w][y]=_$_496c[3]);a[w].push([y+_$_496c[140]+p[w][y]]);p[w][y]=p[w][y]&&p[w][y]==B&&!g?_$_496c[3]:B;h[w].push([y+_$_496c[140]+p[w][y]]);B=F.getCoordsFromColumnName(w);this.records[B[1]]&&this.records[B[1]][B[0]]&&this.records[B[1]][B[0]].element&&(this.records[B[1]][B[0]].element.style[y]=p[w][y]);p[w][y]||delete p[w][y]};h={};a={};if(e)if(typeof d==_$_496c[17])q.call(this,d,e,f);else{if(d&&d.length)for(var u=
284
+ 0;u<d.length;u++){var x=F.getColumnNameFromCoords(d[u].x,d[u].y);q.call(this,x,e,f)}}else for(f=Object.keys(d),u=0;u<f.length;u++)if(x=d[f[u]])for(typeof x==_$_496c[17]&&(x=x.split(_$_496c[230])),e=0;e<x.length;e++)x[e]&&(typeof x[e]==_$_496c[17]&&(x[e]=x[e].split(_$_496c[140])),x[e][0].trim()&&q.call(this,f[u],x[e][0].trim(),x[e][1].trim()));n={};q=Object.keys(p);if(q.length){for(u=0;u<q.length;u++){n[q[u]]||(n[q[u]]=[]);d=Object.keys(p[q[u]]);for(e=0;e<d.length;e++)n[q[u]].push(d[e]+_$_496c[119]+
285
+ p[q[u]][d[e]]);this.options.style[q[u]]=n[q[u]].join(_$_496c[316])}q=Object.keys(h);for(u=0;u<q.length;u++)h[q[u]]=h[q[u]].join(_$_496c[230]);q=Object.keys(a);for(u=0;u<q.length;u++)a[q[u]]=a[q[u]].join(_$_496c[230]);this.refreshBorders();W.call(this.parent,{worksheet:this,action:_$_496c[74],oldValue:a,newValue:h});K.call(this,_$_496c[74],[h]);G.call(this.parent,_$_496c[317],this,h,a)}};b.reset=function(d){if(!R.call(this.parent,this))return!1;if(d){a={};if(Array.isArray(d))for(var e=0;e<d.length;e++)c.call(this,
286
+ d[e]);else c.call(this,d);this.refreshBorders();W.call(this.parent,{worksheet:this,action:_$_496c[75],cells:d,oldValue:a});K.call(this,_$_496c[75],[d]);G.call(this.parent,_$_496c[319],this,d)}else console.error(_$_496c[318])};b.update=function(d){h={};a={};for(var e,f=Object.keys(d),g=0;g<f.length;g++){a[f[g]]=this.options.style[f[g]]||_$_496c[3];h[f[g]]=this.options.style[f[g]]=d[f[g]];e=F.getCoordsFromColumnName(f[g]);var k=e[0],l=e[1];this.records[l]&&this.records[l][k]&&this.records[l][k].element&&
287
+ (this.records[l][k].element.setAttribute(_$_496c[104],d[f[g]]),!this.records[l][k].element.style.textAlign&&(e=this.options.columns[k].align?this.options.columns[k].align:this.options.defaultColAlign))&&(this.records[l][k].element.style.textAlign=e)}K.call(this,_$_496c[75],[f]);K.call(this,_$_496c[74],[h]);G.call(this.parent,_$_496c[317],this,h,a)};return b}(),Wa=function(){var h=function(a){a.getComments=h[_$_496c[46]];a.setComments=h[_$_496c[11]]};h[_$_496c[46]]=function(a){return a&&typeof a==
288
+ _$_496c[17]?this.options.comments&&this.options.comments[a]?this.options.comments[a]:!1:this.options.comments};h[_$_496c[11]]=function(a,c){if(!R.call(this.parent,this))return!1;if(typeof a==_$_496c[17]){var b={};b[a]=c}else b=a;if(c=G.call(this.parent,_$_496c[320],this,b))b=c;else if(!1===c)return!1;this.options.comments||(this.options.comments={});a={};var d=Object.keys(b);if(d.length){for(var e=0;e<d.length;e++){var f=F.getCoordsFromColumnName(d[e]);this.records[f[1]]&&this.records[f[1]][f[0]]&&
289
+ (a[d[e]]=this.options.comments[d[e]]||_$_496c[3],(c=b[d[e]])?this.options.comments[d[e]]=c:delete this.options.comments[d[e]],this.records[f[1]][f[0]].element&&(c?this.records[f[1]][f[0]].element.setAttribute(_$_496c[285],c):this.records[f[1]][f[0]].element.removeAttribute(_$_496c[285])))}W.call(this.parent,{worksheet:this,action:_$_496c[79],newValue:b,oldValue:a});K.call(this,_$_496c[79],[b]);G.call(this.parent,_$_496c[321],this,b,a)}};return h}(),Xa=function(){var h=function(a){a.getMeta=h[_$_496c[46]];
290
+ a.setMeta=h[_$_496c[11]];a.resetMeta=h.reset};h[_$_496c[46]]=function(a,c){if(a){if(this.options.meta[a])return c?this.options.meta[a][c]:this.options.meta[a]}else return this.options.meta};h[_$_496c[11]]=function(a,c,b){if(!R.call(this.parent,this))return!1;this.options.meta||(this.options.meta={});if(typeof a==_$_496c[17]&&c){b||(b=_$_496c[3]);var d={};d[a]={};d[a][c]=b;a=d}c=Object.keys(a);if(c.length){b={};for(d=0;d<c.length;d++){this.options.meta[c[d]]||(this.options.meta[c[d]]={});b[c[d]]||
291
+ (b[c[d]]={});for(var e=Object.keys(a[c[d]]),f=0;f<e.length;f++)this.options.meta[c[d]][e[f]]=a[c[d]][e[f]],b[c[d]][e[f]]=a[c[d]][e[f]]}Object.keys(b).length&&(K.call(this,_$_496c[322],[b]),G.call(this.parent,_$_496c[323],this,b))}};h.reset=function(){this.options.meta={};K.call(this,_$_496c[324],{});G.call(this.parent,_$_496c[325],this,{})};return h}(),Ya=function(){var h=function(a){a.orderBy=h.execute};h.handler=function(a,c){return function(b,d){b=b[1];d=d[1];return a?b===_$_496c[3]&&d!==_$_496c[3]?
292
+ 1:b!==_$_496c[3]&&d===_$_496c[3]?-1:b>d?-1:b<d?1:0:b===_$_496c[3]&&d!==_$_496c[3]?1:b!==_$_496c[3]&&d===_$_496c[3]?-1:b>d?1:b<d?-1:0}};h.execute=function(a,c,b,d){if(0<=a){c=null==c?this.headers[a].classList.contains(_$_496c[326])?1:0:c?1:0;for(var e,f,g=[],k=0;k<this.options.data.length;k++)e=Ha[_$_496c[46]].call(this,a,k),f=this.records[k][a].v,f=e.type==_$_496c[271]||e.type==_$_496c[276]||e.type==_$_496c[277]||e.type==_$_496c[327]||e.type==_$_496c[14]||e.type==_$_496c[328]?Number(f):jSuites.isNumeric(f)?
293
+ Number(f):f.toLowerCase(),g[k]=[k,f];k=typeof this.parent.config.sorting===_$_496c[89]?this.parent.config.sorting(c,a):h.handler(c,a);g.sort(k);e=b?!0:!1;if(!b)for(b=[],k=0;k<g.length;k++)b[k]=g[k][0];if(k=G.call(this.parent,_$_496c[329],this,a,c,b))b=k;else if(!1===k)return!1;if(e)this.destroyMerged();else if(0<Object.keys(this.getMerge()).length)if(confirm(E(_$_496c[330])))this.destroyMerged();else return!1;if(b.length<g.length)for(k=0;k<g.length;k++)-1==b.indexOf(g[k][0])&&b.push(g[k][0]);g=[];
294
+ for(k=0;k<b.length;k++)g[b[k]]=k;Ea.call(this,!1);aa.reset.call(this);K.call(this,_$_496c[80],{column:a,direction:c,order:b});W.call(this.parent,{worksheet:this,action:_$_496c[80],column:a,newValue:b,oldValue:g,direction:c,previousState:h.getState.call(this)});h.update.call(this,b);h.arrow.call(this,a,c,d);aa.refresh.call(this);G.call(this.parent,_$_496c[331],this,a,c,b);return!0}};h.update=function(a){for(var c=[],b=0;b<a.length;b++)c[b]=this.options.data[a[b]];for(b=0;b<a.length;b++)this.options.data[b]=
295
+ c[b];c=[];for(b=0;b<a.length;b++)c[b]=this.records[a[b]];this.records=c;c=[];for(b=0;b<a.length;b++)c[b]=this.rows[a[b]];this.rows=c;ca.references.call(this);this.tbody.innerHTML=_$_496c[3];I.call(this,!0,!0);this.searchInput&&this.searchInput.value?sa.update.call(this,null):ea.update.call(this)};h.arrow=function(a,c,b){for(var d=0;d<this.headers.length;d++)this.headers[d].classList.remove(_$_496c[332]),this.headers[d].classList.remove(_$_496c[326]);void 0===b?this.headers[a].classList.add(c?_$_496c[332]:
296
+ _$_496c[326]):Array.isArray(b)&&this.headers[b[0]].classList.add(b[1]?_$_496c[332]:_$_496c[326])};h.getState=function(){for(var a=0;a<this.headers.length;a++){if(this.headers[a].classList.contains(_$_496c[332]))return[a,1];if(this.headers[a].classList.contains(_$_496c[326]))return[a,0]}return null};return h}(),Aa=function(){var h=function(a){a.whichPage=h.whichPage;a.quantityOfPages=h.quantityOfPages;a.page=h[_$_496c[11]];a.updatePagination=h.update};h.build=function(){this.pageNumber=0;var a=document.createElement(_$_496c[20]),
297
+ c=document.createElement(_$_496c[20]);this.pagination=document.createElement(_$_496c[20]);this.pagination.classList.add(_$_496c[333]);this.pagination.appendChild(a);this.pagination.appendChild(c);this.options.pagination||(this.pagination.style.display=_$_496c[40]);this.element.appendChild(this.pagination)};h.pageUp=function(){0<this.pageNumber&&(this.pageNumber--,h[_$_496c[11]].call(this,this.pageNumber))};h.pageDown=function(){this.pageNumber<h.quantityOfPages.call(this)-1&&(this.pageNumber++,h[_$_496c[11]].call(this,
298
+ this.pageNumber))};h.whichPage=function(a){if(0<this.options.pagination)return this.rows[a]?(this.results&&(a=this.results.indexOf(parseInt(a))),Math.ceil((parseInt(a)+1)/parseInt(this.options.pagination))-1):null;console.log(_$_496c[334]);return!1};h.quantityOfPages=function(){if(0<this.options.pagination)return Math.ceil((this.results?this.results.length:this.rows.length)/parseInt(this.options.pagination));console.log(_$_496c[334]);return!1};h[_$_496c[11]]=function(a,c){var b=this.pageNumber,d=
299
+ parseInt(this.options.pagination);if(d){if(null==a||-1==a)a=Math.ceil((this.results?this.results:this.rows).length/d)-1;if(!1===G.call(this.parent,_$_496c[336],this,a,b,d))return!1;this.pageNumber=a;I.update.call(this);Z.refresh.call(this);typeof c==_$_496c[89]&&c.call(this);G.call(this.parent,_$_496c[337],this,a,b,d)}else console.error(_$_496c[335])};h.update=function(){this.pagination.children[0].innerHTML=_$_496c[3];this.pagination.children[1].innerHTML=_$_496c[3];if(this.options.pagination){var a=
300
+ this.results?this.results.length:this.rows.length;if(a){a=Math.ceil(a/this.options.pagination);if(6>this.pageNumber)var c=1,b=10>a?a:10;else 5>a-this.pageNumber?(c=a-9,b=a,1>c&&(c=1)):(c=this.pageNumber-4,b=this.pageNumber+5);if(1<c){var d=document.createElement(_$_496c[20]);d.className=_$_496c[339];d.innerHTML=_$_496c[228];d.title=1;this.pagination.children[1].appendChild(d)}for(;c<=b;c++)d=document.createElement(_$_496c[20]),d.className=_$_496c[339],d.innerHTML=c,this.pagination.children[1].appendChild(d),
301
+ this.pageNumber==c-1&&d.classList.add(_$_496c[340]);b<a&&(d=document.createElement(_$_496c[20]),d.className=_$_496c[339],d.innerHTML=_$_496c[229],d.title=a,this.pagination.children[1].appendChild(d));this.pagination.children[0].innerHTML=E(_$_496c[341],[this.pageNumber+1,a])}else this.pagination.children[0].innerHTML=E(_$_496c[338]);this.options.tableOverflow&&(this.content.style.height=this.table.offsetHeight+16+_$_496c[47],this.table.style.top=0)}};return h}(),ma=function(){var h=function(a){a.setFreezeColumns=
302
+ h[_$_496c[11]];a.resetFreezeColumns=h.reset};h.width=function(){if(this.options.freezeColumns){h.headers.call(this);for(var a=0;a<this.rows.length;a++)this.rows[a].element&&h.update.call(this,a)}};h.update=function(a){var c,b;if(b=this.options.freezeColumns){var d=ya.call(this)?50:0;if(this.rows[a].element)for(var e=0;e<b;e++){if(c=this.records[a][e].element)c.classList.add(_$_496c[48]),c.style.left=d+_$_496c[47];!1!==this.options.columns[e].visible&&(d+=this.options.columns[e].width)}}};h.headers=
303
+ function(){var a=ya.call(this)?50:0,c;if(c=this.options.freezeColumns)for(var b=0;b<c;b++){if(this.headers[b]){this.headers[b].classList.add(_$_496c[48]);this.headers[b].style.left=a+_$_496c[47];if(this.options.footers)for(var d=0;d<this.options.footers.length;d++)this.footers.content[d][b].element.classList.add(_$_496c[48]),this.footers.content[d][b].element.style.left=a+_$_496c[47];!1!==this.options.columns[b].visible&&(a+=this.options.columns[b].width)}}else h.reset.call(this)};h.refresh=function(){if(0<
304
+ this.options.freezeColumns){h.headers.call(this);for(var a=0;a<this.visibleRows.length;a++)h.update.call(this,this.visibleRows[a])}};h[_$_496c[11]]=function(a){h.reset.call(this);this.options.freezeColumns=a;h.width.call(this);I.limited.call(this)&&I.call(this)};h.reset=function(){h.applyReset.call(this);aa.refresh.call(this);this.options.freezeColumns=0};h.applyReset=function(){for(var a,c=1;c<=this.options.freezeColumns;c++){if(a=this.thead.lastChild)a.children[c].classList.remove(_$_496c[48]),
305
+ a.children[c].style.left=_$_496c[3];for(var b=0;b<this.rows.length;b++)if(a=this.rows[b].element)a.children[c].classList.remove(_$_496c[48]),a.children[c].style.left=_$_496c[3];if(this.options.footers)for(b=0;b<this.options.footers.length;b++)this.tfoot.children[b].children[c].classList.remove(_$_496c[48]),this.tfoot.children[b].children[c].style.left=_$_496c[3]}};h.getWidth=function(a){a=a?0:ya.call(this)?50:0;if(0<this.options.freezeColumns)for(var c=0;c<this.options.freezeColumns;c++)a+=this.options.columns[c].width;
306
+ return a};return h}(),ca=function(){var h=function(b,d){if(this.options[b]){for(var e={},f=Object.keys(this.options[b]),g=0;g<f.length;g++)e[d&&void 0!=d[f[g]]?d[f[g]]:f[g]]=this.options[b][f[g]];this.options[b]=e}},a=function(){if(0<this.options.minSpareRows){for(var b=0,d=this.rows.length-1;0<=d;d--){for(var e=!1,f=0;f<this.options.columns.length;f++)P.call(this,f,d)&&(e=!0);if(e)break;else b++}0<this.options.minSpareRows-b&&this.insertRow(this.options.minSpareRows-b)}if(0<this.options.minSpareCols){b=
307
+ 0;for(f=this.options.columns.length-1;0<=f;f--){e=!1;for(d=0;d<this.rows.length;d++)P.call(this,f,d)&&(e=!0);if(e)break;else b++}0<this.options.minSpareCols-b&&this.insertColumn(this.options.minSpareCols-b)}},c=function(){};c.build=function(){var b=this;this.content=document.createElement(_$_496c[20]);this.content.classList.add(_$_496c[342]);this.content.addEventListener(_$_496c[343],function(e){if(!b.edition)return e.preventDefault(),!1});this.table=document.createElement(_$_496c[344]);this.thead=
308
+ document.createElement(_$_496c[345]);this.tbody=document.createElement(_$_496c[346]);this.tfoot=document.createElement(_$_496c[347]);this.headers=[];this.colgroup=[];this.colgroupContainer=document.createElement(_$_496c[348]);var d=document.createElement(_$_496c[180]);d.setAttribute(_$_496c[162],_$_496c[349]);this.colgroupContainer.appendChild(d);this.headerContainer=document.createElement(_$_496c[155]);d=document.createElement(_$_496c[157]);d.classList.add(_$_496c[350]);this.headerContainer.appendChild(d);
309
+ this.thead.appendChild(this.headerContainer);this.table.classList.add(_$_496c[351]);this.table.setAttribute(_$_496c[352],_$_496c[103]);this.table.setAttribute(_$_496c[353],_$_496c[103]);this.table.setAttribute(_$_496c[354],_$_496c[355]);this.table.appendChild(this.colgroupContainer);this.table.appendChild(this.thead);this.table.appendChild(this.tbody);this.table.appendChild(this.tfoot);this.options.textOverflow||this.table.classList.add(_$_496c[356]);!1===this.options.selectLockedCells&&this.table.classList.add(_$_496c[357]);
310
+ this.corner=document.createElement(_$_496c[20]);this.corner.className=_$_496c[358];this.corner.setAttribute(_$_496c[354],_$_496c[359]);this.corner.setAttribute(_$_496c[360],_$_496c[361]);0==this.options.selectionCopy&&(this.corner.style.display=_$_496c[40]);this.scrollX=I.build.call(b,_$_496c[362]);this.scrollY=I.build.call(b,_$_496c[363]);this.content.appendChild(this.scrollX);this.content.appendChild(this.scrollY);this.content.appendChild(this.table);this.content.appendChild(this.corner);this.element.appendChild(this.content);
311
+ 1==this.options.tableOverflow&&(this.content.classList.add(_$_496c[55]),this.options.tableHeight||(this.options.tableHeight=document.body.offsetHeight-18),this.options.tableWidth||(this.options.tableWidth=document.body.offsetWidth-18),this.content.style.width=parseInt(this.options.tableWidth)+_$_496c[47],this.options.pagination?this.content.classList.add(_$_496c[364]):this.content.style.height=parseInt(this.options.tableHeight)+_$_496c[47]);this.options.resize&&(this.content.style.resize=this.options.resize);
312
+ this.options.freezeColumns>this.options.columns.length&&console.error(_$_496c[365]);sa.build.call(this);wa.build.call(this);Aa.build.call(this);Fa.build.call(this);pa.build.call(this);Z.build.call(this);ea.onload.call(this);a.call(this);I.call(this)};c.references=function(b){var d=[],e=[],f=null,g=null,k=null,l=null;for(f=0;f<this.options.columns.length;f++)if(g=this.headers[f])k=g.getAttribute(_$_496c[44]),k!=f&&(g.setAttribute(_$_496c[44],f),g.getAttribute(_$_496c[177])||(g.innerHTML=F.getColumnName(f)));
313
+ for(var n=0;n<this.rows.length;n++)g=this.rows[n],l=g.y,l!=n&&(g.y=n,d[l]=n,g.element&&(g.element.setAttribute(_$_496c[45],n),g.element.children[0].setAttribute(_$_496c[45],n),f=this.options.rows&&this.options.rows[l]&&this.options.rows[l].title?this.options.rows[l].title:n+1,g.element.children[0].innerHTML=f));var q=function(u,x){g=this.records[x][u];k=g.x;l=g.y;k!=u&&(g.x=u,g.element&&g.element.setAttribute(_$_496c[44],u));l!=x&&(g.y=x,g.element&&g.element.setAttribute(_$_496c[45],x));if(k!=u||
314
+ l!=x){var w=F.getColumnNameFromCoords(k,l);u=F.getColumnNameFromCoords(u,x);e[w]=u}};if(b){n=function(u,x){u&&u[x]&&delete u[x]};var p=Object.keys(b);for(f=0;f<p.length;f++)n(this,p[f]),n(this.options.meta,p[f]),n(this.options.cells,p[f]),n(this.options.style,p[f]),n(this.options.comments,p[f])}for(n=0;n<this.rows.length;n++)for(f=0;f<this.options.columns.length;f++)q.call(this,f,n);h.call(this,_$_496c[366],d);h.call(this,_$_496c[299],e);h.call(this,_$_496c[300],e);h.call(this,_$_496c[104],e);h.call(this,
315
+ _$_496c[301],e);h.call(this,_$_496c[283],e);this.options.mergeCells&&pa.build.call(this);G.call(this.parent,_$_496c[367],this,e,b);Y.updateAll.call(this,e,b);return e};c.update=function(b){b&&a.call(this);if(typeof this.parent.config.updateTable==_$_496c[89])for(var d=0;d<this.rows.length;d++)for(var e=0;e<this.options.columns.length;e++)b=this.records[d][e],this.parent.config.updateTable.call(this,this,b.element,e,d,P.call(this,e,d),b.r?b.r:b.v);Z.refresh.call(this)};return c}(),qa=function(){var h=
316
+ {spreadsheet:function(a,c){var b={name:null,config:{},el:a,element:a,plugins:[],worksheets:[],history:[],historyIndex:-1,queue:[],ignoreEvents:!1,ignoreHistory:!1,ignorePersistence:!1};Da.spreadsheet.call(b,c);b.config.license&&(v.license=b.config.license);a.spreadsheet=b;a.jspreadsheet=a.jexcel=b.worksheets;v.spreadsheet.push(b);b.name||(b.name=jSuites.guid());h.bind(b.config.root?b.config.root:document);var d=b.config.tabs;typeof d!==_$_496c[88]&&(d={allowCreate:d?!0:!1,hideHeaders:d?!1:!0,allowChangePosition:b.config.allowMoveWorksheet?
317
+ !0:!1});d.maxWidth||(d.maxWidth=a.offsetWidth-50+_$_496c[47]);d.animation=void 0==d.animation?!0:d.animation;d.onbeforecreate=function(){b.createWorksheet();return!1};d.onclick=function(f,g,k,l,n){0<=k&&b.openWorksheet(k,!0)};d.onchangeposition=function(f,g,k){b.updateWorksheet(g,k)};jSuites.tabs(a,d);a.classList.add(_$_496c[368]);1==c.fullscreen&&a.classList.add(_$_496c[15]);var e=document.createElement(_$_496c[20]);b.toolbar=document.createElement(_$_496c[20]);b.toolbar.className=_$_496c[369];e.appendChild(b.toolbar);
318
+ b.filter=ea.build.call(b);e.appendChild(b.filter);b.helper=document.createElement(_$_496c[20]);b.helper.className=_$_496c[370];e.appendChild(b.helper);b.loading=document.createElement(_$_496c[20]);b.loading.classList.add(_$_496c[371]);e.appendChild(b.loading);e.appendChild(ha.build(b));e.appendChild(Ra(b));b.textarea=document.createElement(_$_496c[372]);b.textarea.className=_$_496c[373];b.textarea.tabIndex=_$_496c[374];e.appendChild(b.textarea);d.position===_$_496c[375]?a.insertBefore(e,a.children[0]):
319
+ a.insertBefore(e,a.children[1]);a.appendChild(Ja.call(b,v.license));b.createWorksheet=la.createWorksheet;b.deleteWorksheet=la.deleteWorksheet;b.renameWorksheet=la.renameWorksheet;b.updateWorksheet=la.updateWorksheet;b.openWorksheet=la.openWorksheet;b.moveWorksheet=la.moveWorksheet;b.getWorksheet=la.getWorksheet;b.getWorksheetActive=la.getWorksheetActive;b.getWorksheetInstance=la.getWorksheetInstance;b.getConfig=function(){var f=b.config;f.worksheets=[];for(var g=0;g<b.worksheets.length;g++)f.worksheets.push(b.worksheets[g].getConfig());
320
+ return f};b.fullscreen=Ka;b.progress=La;b.undo=W.undo;b.redo=W.redo;b.setToolbar=fa[_$_496c[11]];b.getToolbar=fa[_$_496c[46]];b.showToolbar=fa.show;b.hideToolbar=fa.hide;b.tools=e;1!==b.edition&&(a=Object.keys(b.config.definedNames))&&a.length&&(b.config.definedNames={},console.log(_$_496c[376]));c.plugins&&ra.call(b,c.plugins);b.setPlugins=function(f){ra.call(b,f)};a=Object.keys(v.extensions);if(a.length)for(d=0;d<a.length;d++)if(typeof v.extensions[a[d]].oninit==_$_496c[89])v.extensions[a[d]].oninit(b,
321
+ c);return b},worksheet:function(a,c){var b={};a.worksheets.push(b);b.parent=a;Da(b);Sa(b);ka(b);aa(b);ha(b);Fa(b);Ua(b);pa(b);Qa(b);Va(b);ia(b);Y(b);S(b);ja(b);oa(b);Xa(b);Wa(b);Ca(b);Z(b);wa(b);sa(b);ea(b);fa(b);va(b);Za(b);$a(b);Aa(b);la(b);ma(b);Ta(b);Ya(b);Ia(b);Ha(b);Da.worksheet.call(b,c);!v.license&&b.options.license&&(v.license=b.options.license);a.element.jexcel=a.element.jexcel?a.worksheets:b;ra.execute.call(b.parent,_$_496c[377],[b]);b.onload=function(){this.options.worksheetName||(this.options.worksheetName=
322
+ _$_496c[378]+la.nextName());var d=this.options.worksheetName;H(d)&&console.log(_$_496c[379]+d+_$_496c[380]);H(d,b);this.element=a.element.tabs.appendElement(this.options.worksheetName,function(e,f){b.options.worksheetState===_$_496c[54]&&(f.style.display=_$_496c[40])});this.element.classList.add(_$_496c[381]);this.element.jexcel=this;ca.build.call(this);ra.execute.call(this.parent,_$_496c[382],[this]);this.options.data&&500<this.options.data.length&&!I.limited.call(this)&&!this.options.pagination&&
323
+ console.error(_$_496c[383])};return b},row:function(a,c){this.rows[a]||(this.rows[a]={element:null,y:a});c&&(this.rows[a].id=c,va[_$_496c[11]].call(this,c));this.options.rows&&this.options.rows[a]&&this.options.rows[a].height&&(this.rows[a].height=this.options.rows[a].height);this.records[a]||(this.records[a]=[]);this.options.data[a]||(this.options.data[a]=this.dataType?{}:[]);for(c=0;c<this.options.columns.length;c++)h.cell.call(this,c,a)},cell:function(a,c,b){typeof b==_$_496c[13]&&(b=P.call(this,
324
+ a,c),null===b||void 0===b)&&(b=_$_496c[3],P.call(this,a,c,b));this.records[c][a]||(this.records[c][a]={element:null,x:a,y:c,v:b})},bind:function(a){for(var c=Object.keys(Ba),b=0;b<c.length;b++)(c[b]==_$_496c[384]?window:a).addEventListener(c[b],Ba[c[b]],c[b]==_$_496c[385]||c[b]==_$_496c[386]||c[b]==_$_496c[387]?{passive:!1}:{})},unbind:function(a){for(var c=Object.keys(Ba),b=0;b<c.length;b++)(c[b]==_$_496c[384]?window:a).removeEventListener(c[b],Ba[c[b]])}};return h}(),Za=function(){var h=function(a){a.getWidth=
325
+ h[_$_496c[46]];a.setWidth=h[_$_496c[11]]};h[_$_496c[46]]=function(a){var c=this.options.columns;if(typeof a===_$_496c[13]){a=[];for(var b=0;b<c.length;b++)a.push(c[b].width)}else a=c[a].width;return a};h[_$_496c[11]]=function(a,c,b){if(!R.call(this.parent,this))return!1;if(c){if(Array.isArray(a)){b||(b=[]);for(var d=0;d<a.length;d++){b[d]||(b[d]=this.options.columns[a[d]].width);var e=Array.isArray(c)&&c[d]?c[d]:c;this.options.columns[a[d]].width=e;this.colgroup[a[d]]&&this.colgroup[a[d]].setAttribute(_$_496c[162],
326
+ e)}}else b||(b=this.options.columns[a].width),this.options.columns[a].width=c,this.colgroup[a]&&this.colgroup[a].setAttribute(_$_496c[162],c);this.refreshBorders();W.call(this.parent,{worksheet:this,action:_$_496c[76],column:a,oldValue:b,newValue:c});K.call(this,_$_496c[76],{column:a,width:c,oldWidth:b});G.call(this.parent,_$_496c[388],this,a,c,b);I.call(this,!0)}};return h}(),$a=function(){var h=function(c){c.getHeight=h[_$_496c[46]];c.setHeight=h[_$_496c[11]]};h[_$_496c[46]]=function(c){if(c)c=
327
+ this.rows[c].element.style.height;else{c=[];for(var b=0;b<this.rows.length;b++){var d=this.rows[b].element.style.height;d&&(c[b]=d)}}return c};var a=function(c,b){b=parseInt(b);var d=this.rows[c].height?this.rows[c].height:this.rows[c].element.offsetHeight||this.options.defaultRowHeight;this.rows[c].element.style.height=b+_$_496c[47];this.options.rows[c]||(this.options.rows[c]={});this.options.rows[c].height=b+_$_496c[47];this.rows[c].height=b;return d};h[_$_496c[11]]=function(c,b,d){if(!R.call(this.parent,
328
+ this))return!1;var e,f=typeof d==_$_496c[13]?!0:!1;if(b){if(Array.isArray(c))for(!0===f&&(d=[]),e=0;e<c.length;e++){var g=Array.isArray(b)&&b[e]?b[e]:b;a.call(this,c[e],g);1==f&&d.push(f)}else e=a.call(this,c,b),1==f&&(d=e);this.refreshBorders();W.call(this.parent,{worksheet:this,action:_$_496c[77],row:c,oldValue:d,newValue:b});K.call(this,_$_496c[77],{row:c,height:b,oldHeight:d});G.call(this.parent,_$_496c[389],this,c,b,d);I.call(this,!0)}};return h}(),ea=function(){var h=function(g){var k=e[g];
329
+ g=b[e[g]];if(!g.element){g.element=document.createElement(_$_496c[390]);g.element.innerHTML=g.value;var l=document.createElement(_$_496c[237]);l.type=_$_496c[270];l.value=k;l.o=g;g.element.insertBefore(l,g.element.firstChild)}g.element.firstChild.checked=g.selected;return g.element},a=null,c=null,b=[],d=0,e=null,f=function(g){g.setFilter=f[_$_496c[11]];g.getFilter=f[_$_496c[46]];g.openFilter=f.open;g.closeFilter=f.close;g.resetFilters=f.reset;g.showFilter=f.show;g.hideFilter=f.hide};f.isVisible=function(){return c};
330
+ f[_$_496c[11]]=function(g,k){var l=this.headers[g];g=this.options.columns[g];Array.isArray(k)&&0<k.length?(l&&l.classList.add(_$_496c[391]),g.filters=k):(l&&l.classList.remove(_$_496c[391]),g.filters=null);f.update.call(this)};f[_$_496c[46]]=function(g){if(g)return this.options.columns[g].filters||null;g={};for(var k=0;k<this.options.columns.length;k++)g[k]=this.options.columns[k].filters||null;return g};f.open=function(g){a=parseInt(g);if(this.headers[a].classList.contains(_$_496c[179])){c=!0;var k=
331
+ this.parent.element.getBoundingClientRect(),l=this.headers[a].getBoundingClientRect();g=l.left-k.left;var n=l.top-k.top+l.height;l=this.parent.filter;k=k.left+k.width;l.style.display=_$_496c[16];g+l.offsetWidth>k&&(g=k-(l.offsetWidth+18));l.style.top=n+_$_496c[47];l.style.left=g+_$_496c[47];l.children[0].focus();g=l.children[1].selectAll;l.children[1].textContent=_$_496c[3];l.children[1].appendChild(g);g.children[0].checked=this.options.columns[a].filters?!1:!0;g=sa.execute.call(this,null,a);g=F.invert(g);
332
+ l=[];for(k=0;k<this.rows.length;k++)if(g[k]){n=_$_496c[3]+P.call(this,a,k);var q=_$_496c[3]+ia.processed.call(this,a,k,!0);n.substr(0,1)==_$_496c[12]&&(n=q);l.push([n,q])}l.sort(function(p,u){return p[0]>u[0]?1:p[0]<u[0]?-1:0});b=[];for(k=0;k<l.length;k++)b[l[k][0]]={value:l[k][1],element:null};(g=G.call(this.parent,_$_496c[393],this,a,b))&&(b=g);void 0!==b[_$_496c[3]]&&(delete b[_$_496c[3]],b[_$_496c[3]]={value:_$_496c[225]+E(_$_496c[394])+_$_496c[250],element:null});f.search.call(this,_$_496c[3])}else console.log(_$_496c[392])};
333
+ f.close=function(g){if(g){g=this.parent.filter.children[1];if(1==g.selectAll.firstChild.checked&&e.length==Object.keys(b).length)g=null;else{g=1==g.currentSelection.firstChild.checked?this.options.columns[a].filters||[]:[];for(var k=0;k<e.length;k++)b[e[k]].selected&&g.push(e[k])}f[_$_496c[11]].call(this,a,g)}this.parent.filter.style.display=_$_496c[3];this.parent.filter.children[0].value=_$_496c[3];a=null;c=!1;b=null;d=0;e=null};f.reset=function(g){f.updateDOM.call(this,g,!1);xa.reset.call(this);
334
+ f.update.call(this)};f.execute=function(g){for(var k=this.options.columns,l=[],n=0;n<this.options.data.length;n++){for(var q=!0,p=0;p<k.length;p++)if(k[p].filters&&g!==p){var u=_$_496c[3]+P.call(this,p,n),x=_$_496c[3]+this.getLabelFromCoords(p,n,!0);-1==k[p].filters.indexOf(u)&&-1==k[p].filters.indexOf(x)&&(q=!1)}q&&l.push(n)}return l};f.update=function(){xa.reset.call(this);this.resetSelection();this.resetBorders();var g=sa.execute.call(this,null);if(typeof this.parent.config.onbeforefilter==_$_496c[89]){var k=
335
+ f[_$_496c[46]].call(this),l=G.call(this.parent,_$_496c[395],this,k,g);if(l)g=l;else if(!1===l)return!1}this.pageNumber=0;g&&g.length<this.rows.length&&xa[_$_496c[11]].call(this,g);Z.refresh.call(this);I.call(this,!0);G.call(this.parent,_$_496c[396],this,k,g)};f.show=function(g){f.updateDOM.call(this,g,!0)};f.hide=function(g){f.updateDOM.call(this,g,!1,!0);f.update.call(this)};f.search=function(g){for(var k=this.parent.filter.children[1];k.children[1];)k.removeChild(k.lastChild);k.currentSelection.firstChild.checked=
336
+ !1;if(g){e=[];g=new RegExp(g,_$_496c[397]);for(var l=Object.keys(b),n=0;n<l.length;n++)b[l[n]]&&(_$_496c[3]+b[l[n]].value).match(g)?(e.push(l[n]),b[l[n]].selected=!0):b[l[n]].selected=!1;e.length&&this.options.columns[a].filters&&(k.firstChild.checked=!0,k.appendChild(k.currentSelection))}else{e=Object.keys(b);if(g=this.options.columns[a].filters)for(n=0;n<e.length;n++)b[e[n]].selected=!1,0<=g.indexOf(e[n])&&(b[e[n]].selected=!0);else for(n=0;n<e.length;n++)b[e[n]].selected=!0;k.firstChild.checked=
337
+ g?!1:!0}for(n=d=0;n<e.length;n++)200>n&&(g=d++,k.appendChild(h(g)))};f.build=function(){var g=document.createElement(_$_496c[20]);g.className=_$_496c[398];g.onclick=function(q){q.target.tagName==_$_496c[399]&&q.target.o&&(q.target.o.selected=q.target.checked);q=!0;for(var p=1;p<this.children.length;p++)this.children[p].children[0].checked||(q=!1);this.children[0].children[0].checked=q};var k=document.createElement(_$_496c[237]);k.type=_$_496c[59];k.placeholder=E(_$_496c[400]);k.classList.add(_$_496c[401]);
338
+ k.classList.add(_$_496c[238]);var l=document.createElement(_$_496c[237]);l.type=_$_496c[402];l.value=_$_496c[403];l.className=_$_496c[404];var n=document.createElement(_$_496c[20]);n.className=_$_496c[405];n.appendChild(k);n.appendChild(g);n.appendChild(l);g.currentSelection=document.createElement(_$_496c[390]);g.currentSelection.innerHTML=_$_496c[406]+E(_$_496c[407]);g.selectAll=document.createElement(_$_496c[390]);g.selectAll.innerHTML=_$_496c[408]+E(_$_496c[409])+_$_496c[250];g.selectAll.onclick=
339
+ function(){for(var q=this.children[0].checked,p=1;p<this.parentNode.children.length;p++)this.parentNode.children[p].children[0].checked=q;if(1==q)for(p=0;p<e.length;p++)b[e[p]].selected=!0;else for(q=Object.keys(b),p=0;p<q.length;p++)b[q[p]].selected=!1};jSuites.lazyLoading(g,{loadDown:function(q){for(q=0;d<e.length-1&&10>q;){var p=d++;g.appendChild(h(p));q++}}});return n};f.updateDOM=function(g,k,l){var n=this.headers,q=function(p){1==k?n[p].classList.add(_$_496c[179]):(this.options.columns[p].filters=
340
+ null,n[p].classList.remove(_$_496c[391]),1==l&&n[p].classList.remove(_$_496c[179]))};if(g)q.call(this,g);else for(g=0;g<n.length;g++)q.call(this,g)};f.onload=function(){var g,k=!1;if(g=this.options.columns)for(var l=0;l<g.length;l++)Array.isArray(g[l].filters)&&0<g[l].filters.length&&this.headers[l]&&(this.headers[l].classList.add(_$_496c[391]),k=!0);1==k&&f.update.call(this)};return f}(),xa=function(){var h={};h[_$_496c[11]]=function(a){for(var c=0;c<a.length;c++)this.rows[a[c]].results=!0;this.results=
341
+ a};h.reset=function(){for(var a=0;a<this.rows.length;a++)!0===this.rows[a].results&&delete this.rows[a].results;this.results=null};h.refresh=function(){for(var a=[],c=0;c<this.rows.length;c++)!0===this.rows[c].results&&a.push(c);return a};return h}(),sa=function(){var h=function(b){var d=document.createElement(_$_496c[20]);if(0<b.options.pagination&&b.options.paginationOptions&&0<b.options.paginationOptions.length){b.paginationDropdown=document.createElement(_$_496c[410]);b.paginationDropdown.classList.add(_$_496c[411]);
342
+ b.paginationDropdown.onchange=function(){b.options.pagination=parseInt(this.value);b.page(0)};for(var e=0;e<b.options.paginationOptions.length;e++){var f=document.createElement(_$_496c[412]);f.value=b.options.paginationOptions[e];f.innerHTML=b.options.paginationOptions[e];b.paginationDropdown.appendChild(f)}b.paginationDropdown.value=b.options.pagination;d.appendChild(document.createTextNode(E(_$_496c[413])));d.appendChild(b.paginationDropdown);d.appendChild(document.createTextNode(E(_$_496c[414])))}return d},
343
+ a=function(b,d){var e=this.merged.rows;if(e[d]){for(;0<d&&e[d-1];)d--;for(;e[d];)b.push(d++)}else b.push(d)},c=function(b){b.search=c.update;b.resetSearch=c.reset;b.updateSearch=c.refresh;b.showSearch=c.show;b.hideSearch=c.hide};c.execute=function(b,d){null===b?b=this.searchInput.value||_$_496c[3]:b!==this.searchInput.value&&(this.searchInput.value=b);this.pageNumber=0;var e=[],f=null;d=ea.execute.call(this,d);if(b)try{b=new RegExp(b,_$_496c[397]);for(var g=0;g<this.rows.length;g++){f=!1;if(!d||0<=
344
+ d.indexOf(g))for(var k=0;k<this.options.columns.length;k++){var l=_$_496c[3]+P.call(this,k,g),n=_$_496c[3]+this.getLabelFromCoords(k,g);if(l.match(b)||n.match(b))f=!0}1==f&&a.call(this,e,g)}}catch(q){}else e=d;if(e.length){for(g=0;g<this.rows.length;g++)!0===this.rows[g].results&&e.push(g);e.sort(function(q,p){return q-p})}return e};c.update=function(b){xa.reset.call(this);this.resetSelection();this.resetBorders();var d=c.execute.call(this,b);if(typeof this.parent.config.onbeforesearch==_$_496c[89]){var e=
345
+ G.call(this.parent,_$_496c[416],this,b,d);if(e)d=e;else if(!1===e)return!1}this.pageNumber=0;d&&d.length<this.rows.length&&xa[_$_496c[11]].call(this,d);Z.refresh.call(this);I.call(this,!0);G.call(this.parent,_$_496c[417],this,b,d)};c.refresh=function(){I.update.call(this);Z.refresh.call(this)};c.reset=function(){this.searchInput.value=_$_496c[3];xa.reset.call(this);I.update.call(this);Z.refresh.call(this)};c.show=function(){this.options.search=!0;this.searchContainer.style.display=_$_496c[3]};c.hide=
346
+ function(){this.options.search=!1;this.searchContainer.style.display=_$_496c[40]};c.build=function(){this.searchContainer=document.createElement(_$_496c[20]);this.searchContainer.classList.add(_$_496c[418]);this.searchContainer.appendChild(h(this));var b=this.searchContainer,d=b.appendChild,e=document.createElement(_$_496c[20]);e.innerHTML=E(_$_496c[400])+_$_496c[119];this.searchInput=document.createElement(_$_496c[237]);this.searchInput.classList.add(_$_496c[415]);this.searchInput.classList.add(_$_496c[238]);
347
+ e.appendChild(this.searchInput);d.call(b,e);0==this.options.search&&(this.searchContainer.style.display=_$_496c[40]);this.element.insertBefore(this.searchContainer,this.element.firstChild)};return c}(),Ra=function(){var h=function(a){a.contextmenu=document.createElement(_$_496c[20]);a.contextmenu.className=_$_496c[419];jSuites.contextmenu(a.contextmenu,{onclick:function(c,b,d){c.close()}});return a.contextmenu};h.open=function(a,c){var b=a.target.getAttribute(_$_496c[44]),d=a.target.getAttribute(_$_496c[45]),
348
+ e=h[_$_496c[46]](this,b,d,a,c[0],c[1],c[2]);if(typeof this.parent.config.contextMenu==_$_496c[89]){var f=this.parent.config.contextMenu(this,b,d,a,e,c[0],c[1],c[2]);if(f)e=f;else if(!1===f)return!1}a.preventDefault();f=ra.execute.call(this.parent,_$_496c[90],[this,b,d,a,e,c[0],c[1],c[2]]);e=f[4];this.parent.contextmenu.contextmenu.open(a,e)};h.isOpened=function(){return this.parent.contextmenu.contextmenu.isOpened()};h[_$_496c[46]]=function(a,c,b,d,e,f,g){var k=[],l=a.parent.config,n=-1!=navigator.userAgent.indexOf(_$_496c[420])?
349
+ _$_496c[421]:_$_496c[422];e==_$_496c[423]&&(1==l.allowRenameWorksheet&&k.push({title:E(_$_496c[424]),onclick:function(){var p=prompt(E(_$_496c[424]),d.target.innerText);p&&a.parent.renameWorksheet(f,p)}}),1==l.allowDeleteWorksheet&&k.push({title:E(_$_496c[425]),onclick:function(){confirm(E(_$_496c[426]),d.target.innerText)&&a.parent.deleteWorksheet(f)}}),k.push({type:_$_496c[427]}));e==_$_496c[428]&&(k.push({title:E(_$_496c[429]),onclick:function(){var p=prompt(E(_$_496c[429]),d.target.innerText);
350
+ a.setNestedCell(f,g,{title:p})}}),k.push({type:_$_496c[427]}));if(e==_$_496c[430]||e==_$_496c[431]||e==_$_496c[432]||e==_$_496c[428])k.push({title:E(_$_496c[433]),icon:_$_496c[434],shortcut:n+_$_496c[435],onclick:function(){a.cut()}}),k.push({title:E(_$_496c[436]),icon:_$_496c[437],shortcut:n+_$_496c[438],onclick:function(){a.copy()}}),navigator&&navigator.clipboard&&navigator.clipboard.readText&&k.push({title:E(_$_496c[439]),icon:_$_496c[440],shortcut:n+_$_496c[441],onclick:function(){a.selectedCell&&
351
+ navigator.clipboard.readText().then(function(p){p&&a.paste(a.selectedCell[0],a.selectedCell[1],p)})}}),k.push({type:_$_496c[427]});e==_$_496c[430]&&(1==a.options.allowInsertColumn&&k.push({title:E(_$_496c[442]),onclick:function(){a.insertColumn(1,parseInt(f),1)}}),1==a.options.allowInsertColumn&&k.push({title:E(_$_496c[443]),onclick:function(){a.insertColumn(1,parseInt(f),0)}}),1==a.options.allowDeleteColumn&&k.push({title:E(_$_496c[444]),onclick:function(){a.deleteColumn(a.getSelectedColumns().length?
352
+ void 0:parseInt(c))}}),1==a.options.allowRenameColumn&&k.push({title:E(_$_496c[445]),onclick:function(){a.setHeader(f)}}),a.options.data.length||(k.push({type:_$_496c[427]}),k.push({title:E(_$_496c[446]),onclick:function(){a.insertRow(0)}})),1==a.options.columnSorting&&(k.push({type:_$_496c[427]}),k.push({title:E(_$_496c[447]),onclick:function(){a.orderBy(f,0)}}),k.push({title:E(_$_496c[448]),onclick:function(){a.orderBy(f,1)}}),k.push({type:_$_496c[427]})));if(e==_$_496c[432]||e==_$_496c[431])1==
353
+ a.options.allowInsertRow&&(k.push({title:E(_$_496c[449]),onclick:function(){a.insertRow(1,parseInt(b),1)}}),k.push({title:E(_$_496c[450]),onclick:function(){a.insertRow(1,parseInt(b))}})),1==a.options.allowDeleteRow&&k.push({title:E(_$_496c[451]),onclick:function(){a.deleteRow(a.getSelectedRows().length?void 0:parseInt(b))}}),k.push({type:_$_496c[427]});if(e==_$_496c[432]&&1==a.options.allowComments){var q=a.records[g][f].element.getAttribute(_$_496c[285])||_$_496c[3];k.push({title:q?E(_$_496c[452]):
354
+ E(_$_496c[453]),icon:_$_496c[454],onclick:function(){var p=F.getColumnNameFromCoords(f,g),u=prompt(E(_$_496c[455]),q);u&&a.setComments(p,u)}});q&&k.push({title:E(_$_496c[456]),onclick:function(){var p=F.getColumnNameFromCoords(f,g);a.setComments(p,_$_496c[3])}});k.push({type:_$_496c[427]})}l.allowExport&&k.push({title:E(_$_496c[457]),icon:_$_496c[458],shortcut:n+_$_496c[459],onclick:function(){a.download()}});l.about&&k.push({title:E(_$_496c[460]),icon:_$_496c[461],onclick:function(){!0===l.about?
355
+ alert(L().print()):alert(l.about)}});return k};return h}(),fa=function(){var h=function(a){a.showToolbar=function(){h.show.call(a.parent)};a.hideToolbar=function(){h.hide.call(a.parent)};a.refreshToolbar=function(){h.update.call(a.parent,a)}};h[_$_496c[11]]=function(a){this.toolbar.innerHTML=_$_496c[3];this.config.toolbar=h[_$_496c[46]].call(this,a);h.show.call(this)};h[_$_496c[46]]=function(a){a||(a=this.config.toolbar);a?Array.isArray(a)?a={items:a}:typeof a===_$_496c[89]&&(a=a({items:h.getDefault()})):
356
+ a={};typeof a!==_$_496c[88]&&(a={});a.items||(a.items=h.getDefault());typeof a.responsive==_$_496c[13]&&(a.responsive=!0,a.bottom=!1,a.maxWidth=this.element.offsetWidth);return a};h.show=function(){this.toolbar.innerHTML||h.build.call(this);this.toolbar.style.display=_$_496c[3];this.element.classList.add(_$_496c[462])};h.hide=function(){this.toolbar.style.display=_$_496c[40];this.element.classList.remove(_$_496c[462])};h.update=function(a,c){var b=this.toolbarInstance;b&&(b.options.responsive&&(c=
357
+ this.config.fullscreen?a.element.offsetWidth:a.options.tableWidth?parseInt(a.options.tableWidth):null,b.options.maxWidth=c,b.refresh()),b.update(a))};h.build=function(){for(var a=h[_$_496c[46]].call(this),c=0;c<a.items.length;c++)if(a.items[c].type==_$_496c[410]){if(!a.items[c].options&&a.items[c].v){a.items[c].options=[];for(var b=0;b<a.items[c].v.length;b++)a.items[c].options.push(a.items[c].v[b]);a.items[c].k&&(a.items[c].onchange=function(d,e,f,g){v.current.setStyle(v.current.getSelected(!1,!0),
358
+ f.k,g)})}}else a.items[c].type==_$_496c[275]?(a.items[c].type=_$_496c[463],a.items[c].onclick=function(d,e,f){if(!f.color){var g=null;jSuites.color(f,{onchange:function(k,l){(g=v.current.getSelected(!1,!0))&&v.current.setStyle(g,f.k,l)},onopen:function(k){var l;v.current.cursor?(l=v.current.cursor.style[f.k])?k.color.select(k.color.toHex(l)):k.color.select(_$_496c[3]):k.color.select(_$_496c[3])}});f.color.open()}}):!a.items[c].onclick&&a.items[c].k&&(a.items[c].onclick=function(){v.current.setStyle(v.current.getSelected(!1,
359
+ !0),this.k,this.v)});(c=ra.execute.call(this,_$_496c[91],[a]))&&(a=c[0]);this.toolbarInstance=jSuites.toolbar(this.toolbar,a);this.toolbarInstance.application=this;a=this.element.tabs.getActive();this.toolbarInstance.update(this.worksheets[a])};h.getDefault=function(){return[{content:_$_496c[464],onclick:function(){v.current&&v.current.undo()}},{content:_$_496c[465],onclick:function(){v.current&&v.current.redo()}},{content:_$_496c[458],onclick:function(){v.current&&v.current.download()}},{type:_$_496c[466]},
360
+ {type:_$_496c[410],width:_$_496c[467],options:[_$_496c[468],_$_496c[469],_$_496c[470]],render:function(a){return _$_496c[471]+a+_$_496c[244]+a+_$_496c[472]},onchange:function(a,c,b,d){v.current&&v.current.setStyle(v.current.getSelected(!1,!0),_$_496c[473],d)}},{type:_$_496c[410],width:_$_496c[474],content:_$_496c[475],options:[_$_496c[476],_$_496c[477],_$_496c[478],_$_496c[479],_$_496c[480]],render:function(a){return _$_496c[481]+a+_$_496c[244]+a+_$_496c[472]},onchange:function(a,c,b,d){v.current&&
361
+ v.current.setStyle(v.current.getSelected(!1,!0),_$_496c[482],d)}},{type:_$_496c[410],options:[_$_496c[483],_$_496c[484],_$_496c[485],_$_496c[486]],render:function(a){return _$_496c[487]+a+_$_496c[488]},onchange:function(a,c,b,d){v.current&&v.current.setStyle(v.current.getSelected(!1,!0),_$_496c[489],d.split(_$_496c[490])[2])}},{type:_$_496c[463],content:_$_496c[491],k:_$_496c[492],v:_$_496c[493]},{type:_$_496c[275],content:_$_496c[494],k:_$_496c[275]},{type:_$_496c[275],content:_$_496c[495],k:_$_496c[496]},
362
+ {type:_$_496c[410],data:[_$_496c[497],_$_496c[498],_$_496c[499],_$_496c[500],_$_496c[501],_$_496c[502],_$_496c[503],_$_496c[504],_$_496c[505],_$_496c[506]],columns:5,render:function(a){return _$_496c[487]+a+_$_496c[488]},right:!0,onchange:function(a,c,b,d,e){if(a=v.current.getHighlighted()){b=c.thickness||1;c=c.color||_$_496c[507];e={};for(var f=a[0],g=a[1],k=a[2],l=a[3],n=a[1];n<=a[3];n++)for(var q=a[0];q<=a[2];q++){var p=F.getColumnNameFromCoords(q,n);e[p]||(e[p]=_$_496c[3]);e[p]=d!=_$_496c[502]&&
363
+ d!=_$_496c[498]||q!=f?(d==_$_496c[499]||d==_$_496c[501])&&q>f?e[p]+(_$_496c[508]+b+_$_496c[509]+c+_$_496c[316]):d==_$_496c[497]?e[p]+(_$_496c[508]+b+_$_496c[509]+c+_$_496c[316]):e[p]+_$_496c[510]:e[p]+(_$_496c[508]+b+_$_496c[509]+c+_$_496c[316]);e[p]=d!=_$_496c[497]&&d!=_$_496c[504]&&d!=_$_496c[498]||q!=k?e[p]+_$_496c[512]:e[p]+(_$_496c[511]+b+_$_496c[509]+c+_$_496c[316]);e[p]=d!=_$_496c[503]&&d!=_$_496c[498]||n!=g?(d==_$_496c[499]||d==_$_496c[500])&&n>g?e[p]+(_$_496c[513]+b+_$_496c[509]+c+_$_496c[316]):
364
+ d==_$_496c[497]?e[p]+(_$_496c[513]+b+_$_496c[509]+c+_$_496c[316]):e[p]+_$_496c[514]:e[p]+(_$_496c[513]+b+_$_496c[509]+c+_$_496c[316]);e[p]=d!=_$_496c[497]&&d!=_$_496c[505]&&d!=_$_496c[498]||n!=l?e[p]+_$_496c[516]:e[p]+(_$_496c[515]+b+_$_496c[509]+c+_$_496c[316])}Object.keys(e)&&v.current.setStyle(e,null,null,!0)}},onload:function(a,c){var b=document.createElement(_$_496c[20]),d=document.createElement(_$_496c[20]);b.appendChild(d);var e=jSuites.color(d,{closeOnChange:!1,onchange:function(f,g){f.parentNode.children[1].style.color=
365
+ g;c.color=g}});d=document.createElement(_$_496c[463]);d.classList.add(_$_496c[517]);d.innerHTML=_$_496c[518];d.onclick=function(){e.open()};b.appendChild(d);a.children[1].appendChild(b);d=document.createElement(_$_496c[20]);jSuites.picker(d,{type:_$_496c[410],data:[1,2,3,4,5],render:function(f){return _$_496c[519]+f+_$_496c[520]},onchange:function(f,g,k,l){c.thickness=l},width:_$_496c[521]});a.children[1].appendChild(d);d=document.createElement(_$_496c[20]);d.style.flex=_$_496c[522];a.children[1].appendChild(d)}},
366
+ {type:_$_496c[466]},{content:_$_496c[15],onclick:function(a,c,b){b.children[0].innerText==_$_496c[15]?(v.current.fullscreen(!0),b.children[0].innerText=_$_496c[523]):(v.current.fullscreen(!1),b.children[0].innerText=_$_496c[15])},tooltip:_$_496c[524],updateState:function(a,c,b,d){b.children[0].innerText=1==d.parent.config.fullscreen?_$_496c[523]:_$_496c[15]}},{content:_$_496c[525],onclick:function(a,c,b){b.children[0].innerText==_$_496c[525]?(sa.show.call(v.current),b.children[0].innerText=_$_496c[526]):
367
+ (sa.hide.call(v.current),b.children[0].innerText=_$_496c[525])},tooltip:_$_496c[527],updateState:function(a,c,b,d){b.children[0].innerText=1==d.options.search?_$_496c[526]:_$_496c[525]}}]};return h}(),la=function(){var h=function(a){a.createWorksheet=function(c){return a.parent.createWorksheet(c)};a.deleteWorksheet=function(c){return a.parent.deleteWorksheet(c)};a.renameWorksheet=function(c,b){return a.parent.renameWorksheet(c,b)};a.moveWorksheet=function(c,b){return a.parent.moveWorksheet(c,b)};
368
+ a.openWorksheet=function(){return a.parent.openWorksheet(a.parent.getWorksheet(a))};a.getWorksheet=function(c){return a.parent.getWorksheet(c)};a.getWorksheetActive=function(){return a.parent.getWorksheetActive()};a.getWorksheetName=function(){return a.options.worksheetName.toUpperCase()}};h.nextName=function(){var a=1,c,b=v.spreadsheet;if(b.length)for(var d=0;d<b.length;d++){var e=b[d].worksheets;if(e.length)for(var f=0;f<e.length;f++)e[f].options.worksheetName&&(c=e[f].options.worksheetName.match(/(\d+)/))&&
369
+ (c=parseInt(c[0])+1,c>a&&(a=c))}return a};h.createWorksheet=function(a){if(!R.call(this))return!1;a||(a={});var c=this.worksheets.length,b=G.call(this,_$_496c[528],a,c);if(typeof b===_$_496c[88])a=b;else if(!1===b)return!1;a.data||a.minDimensions||(a.minDimensions=[8,8]);a.worksheetId||(a.worksheetId=jSuites.guid().substring(0,8));a.worksheetName||(a.worksheetName=_$_496c[378]+h.nextName());if(H(a.worksheetName))jSuites.notification({error:_$_496c[522],message:_$_496c[529]});else return b=qa.worksheet(this,
370
+ a),b.onload(),v.current&&v.current.resetSelection(),v.current=b,K.call(b,_$_496c[530],[a]),fa.update.call(this,v.current),G.call(this,_$_496c[531],b,a,c),b};h.deleteWorksheet=function(a){var c=this.worksheets[a];if(!R.call(this,c))return!1;H(c.options.worksheetName,null);this.element.tabs.deleteElement(a);this.worksheets.splice(a,1);K.call(c,_$_496c[532],[a]);G.call(this,_$_496c[533],c,a)};h.renameWorksheet=function(a,c){var b=this.worksheets[a];if(!R.call(this,b))return!1;var d=b.options.worksheetName;
371
+ if(d.toLowerCase()==c.toLowerCase())return!1;c=c.replace(/[^0-9A-Za-z_\s^]+/gi,_$_496c[3]);Number(c)==c&&(c=_$_496c[378]+Number(c));H(c)?alert(_$_496c[534]):(H(d,null),this.element.tabs.rename(a,c),b.options.worksheetName=c,H(c,b),W.call(this,{worksheet:b,action:_$_496c[84],index:a,oldValue:d,newValue:c}),K.call(b,_$_496c[84],{worksheet:a,newValue:c}),Ia.updateWorksheetName.call(b,d,c),Y.updateWorksheetNames.call(b,d,c),G.call(this,_$_496c[535],b,a,c,d))};h.updateWorksheet=function(a,c){var b=this.worksheets;
372
+ if(!R.call(this))return!1;this.worksheets.splice(c,0,b.splice(a,1)[0]);W.call(this,{worksheet:b[c],action:_$_496c[85],f:a,t:c});K.call(b[c],_$_496c[85],{f:a,t:c});G.call(this,_$_496c[536],b[c],a,c)};h.moveWorksheet=function(a,c){this.element.tabs.move(a,c)};h.openWorksheet=function(a){var c=this.worksheets[a];!c||v.current&&v.current==c||(this.element.tabs.getActive()!=a?this.element.tabs.open(a):this.element.tabs.setBorder(a),v.current&&v.current.resetSelection(),v.current=c,v.current.refreshBorders(),
373
+ h.state.call(this,a),fa.update.call(this,v.current),G.call(this,_$_496c[537],c,a))};h.getWorksheet=function(a){if(a&&typeof a==_$_496c[88]){if(a=this.worksheets.indexOf(a),0<=a)return a}else for(var c=0;c<this.worksheets.length;c++)if(a===this.worksheets[c].options.worksheetId)return c;return!1};h.getWorksheetActive=function(){return this.element.tabs.getActive()};h.getWorksheetInstance=function(a){return a===_$_496c[3]||typeof a==_$_496c[17]?(a=h.getWorksheet.call(this,a),!1===a?!1:this.worksheets[a]):
374
+ this.worksheets[a]};h.state=function(a){try{if(typeof localStorage!==_$_496c[13]){var c=this.config.cloud?this.config.cloud:this.element.id;if(c)if(typeof a!==_$_496c[13])localStorage.setItem(_$_496c[538]+c,a);else{var b=parseInt(localStorage.getItem(_$_496c[538]+c));h.openWorksheet.call(this,b)}}}catch(d){}};return h}(),F=function(){var h={getCaretIndex:function(a){var c=0,b=(this.config.root?this.config.root:window).getSelection();b&&0!==b.rangeCount&&(c=b.getRangeAt(0),b=c.cloneRange(),b.selectNodeContents(a),
375
+ b.setEnd(c.endContainer,c.endOffset),c=b.toString().length);return c},invert:function(a){for(var c=[],b=Object.keys(a),d=0;d<b.length;d++)c[a[b[d]]]=b[d];return c},getColumnName:function(a){var c=_$_496c[3];701<a?(c+=String.fromCharCode(64+parseInt(a/676)),c+=String.fromCharCode(64+parseInt(a%676/26))):25<a&&(c+=String.fromCharCode(64+parseInt(a/26)));return c+=String.fromCharCode(65+a%26)},getColumnNameFromCoords:function(a,c){return h.getColumnName(parseInt(a))+(parseInt(c)+1)},getCoordsFromColumnName:function(a){var c=
376
+ /^[a-zA-Z]+/.exec(a);if(c){for(var b=0,d=0;d<c[0].length;d++)b+=parseInt(c[0].charCodeAt(d)-64)*Math.pow(26,c[0].length-1-d);b--;0>b&&(b=0);a=parseInt(/[0-9]+$/.exec(a))||null;0<a&&a--;return[b,a]}}};h.shiftFormula=Y.shiftFormula;h.createFromTable=function(a,c){if(a.tagName!=_$_496c[539])console.log(_$_496c[540]);else{c||(c={});c.columns=[];c.data=[];var b=a.querySelectorAll(_$_496c[541]);if(b.length)for(var d=0;d<b.length;d++){var e=b[d].style.width;e||(e=b[d].getAttribute(_$_496c[162]));e&&(c.columns[d]||
377
+ (c.columns[d]={}),c.columns[d].width=e)}e=function(B){var D=B.getBoundingClientRect();D=50<D.width?D.width:50;c.columns[d]||(c.columns[d]={});B.getAttribute(_$_496c[542])?c.columns[d].type=B.getAttribute(_$_496c[542]):c.columns[d].type=_$_496c[59];c.columns[d].width=D+_$_496c[47];c.columns[d].title=B.innerHTML;B.style.textAlign&&(c.columns[d].align=B.style.textAlign);B.classList.contains(_$_496c[543])&&(c.columns[d].readOnly=!0);if(D=B.getAttribute(_$_496c[544]))c.columns[d].name=D;if(D=B.getAttribute(_$_496c[545]))c.columns[d].id=
378
+ D};var f=[],g=a.querySelectorAll(_$_496c[546]);if(g.length){for(b=0;b<g.length-1;b++){var k=[];for(d=0;d<g[b].children.length;d++){var l={title:g[b].children[d].innerText,colspan:g[b].children[d].getAttribute(_$_496c[174])||1};k.push(l)}f.push(k)}g=g[g.length-1].children;for(d=0;d<g.length;d++)e(g[d])}l=0;var n={},q={},p={},u={},x=null;k=a.querySelectorAll(_$_496c[547]);for(b=0;b<k.length;b++)if(c.data[l]=[],1!=c.parseTableFirstRowAsHeader||g.length||0!=b){for(d=0;d<k[b].children.length;d++){var w=
379
+ k[b].children[d].getAttribute(_$_496c[548]);w?w.substr(0,1)!=_$_496c[12]&&(w=_$_496c[12]+w):w=k[b].children[d].innerHTML;c.data[l].push(w);w=F.getColumnNameFromCoords(d,b);(x=k[b].children[d].getAttribute(_$_496c[549]))&&(u[w]=x);x=parseInt(k[b].children[d].getAttribute(_$_496c[174]))||0;var y=parseInt(k[b].children[d].getAttribute(_$_496c[175]))||0;if(x||y)n[w]=[x||1,y||1];if(x=k[b].children[d].style&&k[b].children[d].style.display==_$_496c[40])k[b].children[d].style.display=_$_496c[3];(x=k[b].children[d].getAttribute(_$_496c[104]))&&
380
+ (p[w]=x);k[b].children[d].classList.contains(_$_496c[550])&&(p[w]=p[w]?p[w]+_$_496c[551]:_$_496c[552])}k[b].style&&k[b].style.height&&(q[b]={height:k[b].style.height});l++}else for(d=0;d<k[b].children.length;d++)e(k[b].children[d]);0<Object.keys(f).length&&(c.nestedHeaders=f);0<Object.keys(p).length&&(c.style=p);0<Object.keys(n).length&&(c.mergeCells=n);0<Object.keys(q).length&&(c.rows=q);0<Object.keys(u).length&&(c.classes=u);k=a.querySelectorAll(_$_496c[553]);if(k.length){a=[];for(b=0;b<k.length;b++){e=
381
+ [];for(d=0;d<k[b].children.length;d++)e.push(k[b].children[d].innerText);a.push(e)}0<Object.keys(a).length&&(c.footers=a)}if(1==c.parseTableAutoCellType)for(a=[],d=0;d<c.columns.length;d++){f=e=!0;a[d]=[];for(b=0;b<c.data.length;b++)if(w=c.data[b][d],a[d][w]||(a[d][w]=0),a[d][w]++,25<w.length&&(e=!1),10==w.length){if(w.substr(4,1)!=_$_496c[198]||w.substr(7,1)!=_$_496c[198])f=!1}else f=!1;b=Object.keys(a[d]).length;f?c.columns[d].type=_$_496c[197]:1==e&&1<b&&b<=parseInt(.1*c.data.length)&&(c.columns[d].type=
382
+ _$_496c[61],c.columns[d].source=Object.keys(a[d]))}return c}};h.injectArray=function(a,c,b){return a.slice(0,c).concat(b).concat(a.slice(c))};h.parseCSV=function(a,c){c=c||_$_496c[25];for(var b=0,d=0,e=[[]],f=0,g=null,k=!1,l=!1,n=0;n<a.length;n++)if(e[d]||(e[d]=[]),e[d][b]||(e[d][b]=_$_496c[3]),a[n]!=_$_496c[554])if(a[n]!=_$_496c[555]&&a[n]!=c||0!=k&&1!=l&&g){a[n]==_$_496c[200]&&(k=!k);if(null===g){if(g=k,1==g)continue}else if(!0===g&&!l&&a[n]==_$_496c[200]){a[n+1]==_$_496c[200]?(k=!0,e[d][b]+=a[n],
383
+ n++):l=!0;continue}e[d][b]+=a[n]}else{g=null;l=k=!1;if(e[d][b][0]==_$_496c[200]){var q=e[d][b].trim();q[q.length-1]==_$_496c[200]&&(e[d][b]=q.substr(1,q.length-2))}a[n]==_$_496c[555]?(b=0,d++):(b++,b>f&&(f=b))}for(a=0;a<e.length;a++)for(n=0;n<=f;n++)void 0===e[a][n]&&(e[a][n]=_$_496c[3]);return e};h.getTokensFromRange=Y.getTokensFromRange;h.getRangeFromTokens=Y.getRangeFromTokens;return h}(),Ba=function(){var h={},a=null,c=null,b=null,d=null,e=!1,f=null,g=null,k=null,l=function(r){function z(O){O.className&&
384
+ (O.classList.contains(_$_496c[368])&&(M=O),O.classList.contains(_$_496c[381])&&(J=O),O.classList.contains(_$_496c[556])&&(T=O));O.tagName==_$_496c[557]?A=1:O.tagName==_$_496c[558]?A=2:O.tagName==_$_496c[559]&&(A=3);O.parentNode&&!M&&z(O.parentNode)}var A=null,C=null,M=null,J=null,T=null,N=null,U=null,X=null;z(r.target);if(null!==T)return!1;if(M)if(r.target.classList.contains(_$_496c[350]))C=_$_496c[560];else if(r.target.classList.contains(_$_496c[358]))C=_$_496c[142];else if(r.target.classList.contains(_$_496c[288]))C=
385
+ _$_496c[431],N=parseInt(r.target.getAttribute(_$_496c[45]));else if(r.target.parentNode&&r.target.parentNode.classList&&r.target.parentNode.classList.contains(_$_496c[189]))N=r.target.getAttribute(_$_496c[194]),U=r.target.getAttribute(_$_496c[195]),null===N?C=_$_496c[560]:(C=_$_496c[428],N=parseInt(N),U=parseInt(U));else if(r.target.parentNode&&r.target.parentNode.classList&&r.target.parentNode.classList.contains(_$_496c[156]))C=_$_496c[561];else if(r.target.classList.contains(_$_496c[160]))C=_$_496c[561];
386
+ else if(r.target.parentNode&&r.target.parentNode.classList&&r.target.parentNode.classList.contains(_$_496c[562]))C=_$_496c[423],N=Array.prototype.indexOf.call(r.target.parentNode.children,r.target);else if(1==A)C=_$_496c[430],N=r.target.clientWidth-r.offsetX,r.target.classList.contains(_$_496c[179])&&3<N&&20>N&&(C=_$_496c[563]),N=r.target.getAttribute(_$_496c[44]);else if(2==A){if(r=n(r,M))C=_$_496c[432],N=r[0],U=r[1],X=r[2]}else if(3==A){if(N=r.target.getAttribute(_$_496c[44]),U=r.target.getAttribute(_$_496c[45]),
387
+ N||U)C=_$_496c[564]}else A||jSuites.findElement(r.target,_$_496c[565])&&(C=_$_496c[91]);return[M,J,A,C,N,U,X]},n=function(r,z){if(r.changedTouches&&r.changedTouches[0]){var A=r.changedTouches[0].clientX;r=r.changedTouches[0].clientY}else A=r.clientX,r=r.clientY;z=z.spreadsheet.config.root?z.spreadsheet.config.root:document;if(z.elementsFromPoint)var C=z.elementsFromPoint(A,r);else z.msElementsFromPoint&&(C=z.msElementsFromPoint(A,r));for(z=0;z<C.length;z++)if(A=C[z].getAttribute(_$_496c[44]),r=C[z].getAttribute(_$_496c[45]),
388
+ null!=A&&null!=r)return A=parseInt(A),r=parseInt(r),[A,r,C[z]];return!1},q=function(r){var z=l(r);if(!1===z)return!1;z[0]?z[1]?v.current&&document.activeElement.classList.contains(_$_496c[98])?document.activeElement.worksheet||(document.activeElement.worksheet=z[1].jexcel):v.current!=z[1].jexcel&&(v.current&&v.current.resetSelection(),v.current=z[1].jexcel):v.current||(r=z[0].tabs.getActive(),0<=r&&(v.current=z[0].spreadsheet.worksheets[r])):v.current&&!jSuites.findElement(r.target,_$_496c[238])&&
389
+ (v.current.resetSelection(!0),v.current=null);return z},p=function(r){I.limited.call(v.current)&&(g||(g=setTimeout(function(){var z=v.current.content.getBoundingClientRect();if(r.changedTouches&&r.changedTouches[0])var A=r.changedTouches[0].clientX,C=r.changedTouches[0].clientY;else A=r.clientX,C=r.clientY;50>z.height-(C-z.top)?I.down.call(v.current):80>C-z.top&&I.up.call(v.current);50>z.width-(A-z.left)?I.right.call(v.current):80>A-z.left&&I.left.call(v.current);g=null},50)))};h.input=function(r){if(r.target.tagName==
390
+ _$_496c[566]&&r.target.classList.contains(_$_496c[98])){var z=null;r.target.worksheet?z=r.target.worksheet:v.current&&(z=v.current);z&&na.parse.call(z,r.target)}};h.keydown=function(r){if(v.current){r.target.tagName==_$_496c[566]&&r.target.classList.contains(_$_496c[98])&&na.onkeydown.call(v.current,r);if(27==r.which){if(v.current.edition)return v.current.closeEditor(v.current.edition,!1),r.preventDefault(),!1;if(ta.event)return ta.cancel.call(v.current,r),r.preventDefault(),!1;if(ba.event)return ba.cancel.call(v.current,
391
+ r),!1;if(1==ea.isVisible())return ea.close.call(v.current,!1),r.preventDefault(),!1}if(r.target.classList.contains(_$_496c[401])){var z=r.target;f&&clearTimeout(f);f=setTimeout(function(){ea.search.call(v.current,z.value);f=null},500)}else if(r.target.classList.contains(_$_496c[415]))z=r.target,f&&clearTimeout(f),f=setTimeout(function(){v.current.search(z.value);f=null},400);else if(!r.target.classList.contains(_$_496c[238]))if(v.current.edition){var A=v.current.edition.getAttribute(_$_496c[44]);
392
+ 13==r.which?v.current.options.columns[A].type==_$_496c[197]?v.current.closeEditor(v.current.edition,!0):v.current.options.columns[A].type!=_$_496c[61]&&v.current.options.columns[A].type!=_$_496c[567]&&v.current.options.columns[A].type!=_$_496c[454]&&(r.altKey?v.current.parent.input.classList.contains(_$_496c[568])||document.execCommand(_$_496c[569],!1,_$_496c[570]):(v.current.closeEditor(v.current.edition,!0),v.current.parent.config.moveDownOnEnter&&v.current.down(),r.preventDefault())):9==r.which?
393
+ (v.current.closeEditor(v.current.edition,!0),v.current.right(),r.preventDefault()):39!=r.which&&37!=r.which&&38!=r.which&&40!=r.which||v.current.parent.input.selected||(v.current.closeEditor(v.current.edition,!0),37==r.which?v.current.left(r.shiftKey,r.ctrlKey):39==r.which?v.current.right(r.shiftKey,r.ctrlKey):38==r.which?v.current.up(r.shiftKey,r.ctrlKey):40==r.which&&v.current.down(r.shiftKey,r.ctrlKey),r.preventDefault())}else if(v.current.selectedCell)if(33==r.which)0<v.current.options.pagination?
394
+ Aa.pageUp.call(v.current):r.altKey?I.pageLeft.call(v.current):I.pageUp.call(v.current);else if(34==r.which)0<v.current.options.pagination?Aa.pageDown.call(v.current):r.altKey?I.pageRight.call(v.current):I.pageDown.call(v.current);else if(37==r.which)v.current.left(r.shiftKey,r.ctrlKey),r.preventDefault();else if(39==r.which)v.current.right(r.shiftKey,r.ctrlKey),r.preventDefault();else if(38==r.which)v.current.up(r.shiftKey,r.ctrlKey),r.preventDefault();else if(40==r.which)v.current.down(r.shiftKey,
395
+ r.ctrlKey),r.preventDefault();else if(36==r.which)v.current.first(r.shiftKey,r.ctrlKey),r.preventDefault();else if(35==r.which)v.current.last(r.shiftKey,r.ctrlKey),r.preventDefault();else if(32==r.which)v.current.setCheckRadioValue(),r.preventDefault();else if(46==r.which||8==r.which)v.current.isEditable()&&v.current.setValue(v.current.getSelected(!1,!0),_$_496c[3]);else if(13==r.which)r.shiftKey?v.current.up():(1==v.current.options.allowManualInsertRow&&v.current.selectedCell[1]==(v.current.results?
396
+ v.current.results[v.current.results.length-1]:v.current.rows.length-1)&&v.current.insertRow(null,null,null,null,r),v.current.selectedCell&&v.current.down()),r.preventDefault();else if(9==r.which)r.shiftKey?v.current.left():(A=v.current.selectedCell[0],v.current.right(),1==v.current.options.allowInsertColumn&&1==v.current.options.allowManualInsertColumn&&v.current.selectedCell[0]==A&&(v.current.insertColumn(null,null,null,null,null,null,r),v.current.right())),r.preventDefault();else if((r.ctrlKey||
397
+ r.metaKey)&&!r.shiftKey)65==r.which?(v.current.selectAll(),r.preventDefault()):83==r.which?(v.current.download(),r.preventDefault()):89==r.which?(v.current.parent.redo(),r.preventDefault()):90==r.which?(v.current.parent.undo(),r.preventDefault()):67==r.which?(v.current.copy(),r.preventDefault()):88==r.which?(v.current.cut(),r.preventDefault()):86==r.which?r.target.classList.contains(_$_496c[238])||h.paste(r):189==r.which&&(1==v.current.options.allowDeleteRow&&d==_$_496c[431]?(v.current.deleteRow(),
398
+ r.preventDefault()):1==v.current.options.allowDeleteColumn&&d==_$_496c[430]&&(v.current.deleteColumn(),r.preventDefault()));else if(v.current.selectedCell&&v.current.isEditable()){A=v.current.selectedCell[1];var C=v.current.selectedCell[0];v.current.options.columns[C].type!=_$_496c[18]&&(32==r.keyCode?v.current.options.columns[C].type==_$_496c[270]||v.current.options.columns[C].type==_$_496c[272]?r.preventDefault():v.current.openEditor(v.current.records[A][C].element,!0,r):113==r.keyCode?v.current.openEditor(v.current.records[A][C].element,
399
+ !1,r):1!=r.key.length&&r.key!=_$_496c[571]||r.altKey||r.ctrlKey||v.current.records[A]&&v.current.openEditor(v.current.records[A][C].element,!0,r))}}};var u=function(r,z,A,C,M,J,T){if(document.activeElement.classList.contains(_$_496c[98])&&na.update.call(v.current,r,z,A,C,M,document.activeElement,T))return!1;if(v.current.edition)v.current.closeEditor(v.current.edition,!0);else if(d&&d!==J)return!1;v.current!==T&&(v.current.resetSelection(),v.current=T);na.current?na.range.call(v.current,r,z,A,C,M):
400
+ ka[_$_496c[11]].call(v.current,r,z,A,C,M)};h.mousedown=function(r){r=r||window.event;var z=r.buttons?r.buttons:r.button?r.button:r.which;if(v.current)if(1==ea.isVisible()&&(jSuites.findElement(r.target,_$_496c[405])||ea.close.call(v.current,!1)),v.current.edition){if(jSuites.findElement(r.target,_$_496c[105]))return!1}else if(jSuites.findElement(r.target,_$_496c[238]))return!1;var A=q(r);if(!1===A)return!1;k=A;if(1<z)if(A[3]==_$_496c[430]){if(v.current.isSelected(A[4],null))return!1}else if(A[3]==
401
+ _$_496c[431]){if(v.current.isSelected(null,A[4]))return!1}else if(A[3]==_$_496c[432]&&v.current.isSelected(A[4],A[5]))return!1;if(v.current){if(A[3]==_$_496c[142])v.current.isEditable()&&(ba.event=!0);else if(A[3]==_$_496c[563])ea.open.call(v.current,A[4]);else{if(1==A[2])if(1==v.current.options.columnDrag&&6>r.target.offsetHeight-r.offsetY)ta.start.call(v.current,r);else if(1==v.current.options.columnResize&&6>r.target.offsetWidth-r.offsetX)za.start.call(v.current,r);else{z=v.current.options.columns.length-
402
+ 1;var C=v.current.options.data.length-1;if(A[3]==_$_496c[560])u(0,0,z,C,r,A[3],A[1].jexcel),b=c=0;else if(A[3]==_$_496c[428]){var M=wa.range.call(v.current,A[5])[A[4]];M[1]>z&&(M[1]=z);u(M[0],0,M[1],C,r,A[3],A[1].jexcel);c=M[0];b=0}else(r.shiftKey||r.ctrlKey)&&null!=c&&null!=b?u(c,0,A[4],C,r,A[3],A[1].jexcel):(A[3]==_$_496c[430]&&c==A[4]&&1==v.current.options.allowRenameColumn&&(g=setTimeout(function(){v.current.setHeader(A[4])},800)),u(A[4],0,A[4],C,r,A[3],A[1].jexcel),c=A[4],b=0)}if(2==A[2])if(A[3]==
403
+ _$_496c[431])1==v.current.options.rowDrag&&6>r.target.offsetWidth-r.offsetX?ta.start.call(v.current,r):1==v.current.options.rowResize&&6>r.target.offsetHeight-r.offsetY?za.start.call(v.current,r):(z=v.current.options.columns.length-1,C=parseInt(A[4]),(r.shiftKey||r.ctrlKey)&&null!=c&&null!=b?u(0,b,z,C,r,A[3],A[1].jexcel):(u(0,C,z,C,r,A[3],A[1].jexcel),c=0,b=C));else if(A[3]==_$_496c[432]){z=parseInt(A[4]);C=parseInt(A[5]);if(!v.current.edition&&(M=v.current.options.columns[A[4]].type,r.target.tagName==
404
+ _$_496c[572]&&(M==_$_496c[273]||M==_$_496c[274])&&r.target.parentNode.classList.contains(_$_496c[129]))){var J=r.target.innerText;M==_$_496c[273]&&(J=_$_496c[573]+J);window.open(J,_$_496c[574])}(r.shiftKey||r.ctrlKey)&&v.current.selectedCell?u(v.current.selectedCell[0],v.current.selectedCell[1],z,C,r,A[3],A[1].jexcel):(u(z,C,z,C,r,A[3],A[1].jexcel),c=z,b=C)}}d=A[3];typeof A[3]!==_$_496c[13]&&G.call(v.current.parent,_$_496c[575],v.current,A[3],A[4],A[5]);e=!0}else e=!1};h.mouseup=function(r){v.current&&
405
+ (ta.event?ta.end.call(v.current,r):za.event?za.end.call(v.current,r):ba.event?ba.end.call(v.current,r):r.target.classList.contains(_$_496c[404])?ea.close.call(v.current,!0):v.current.edition&&r.target.classList.contains(_$_496c[576])&&50>r.target.clientWidth-r.offsetX&&50>r.offsetY?ha.close.call(v.current,null,!0):r.target.classList.contains(_$_496c[339])&&(r=r.target.innerText==_$_496c[228]?0:r.target.innerText==_$_496c[229]?r.target.getAttribute(_$_496c[285])-1:r.target.innerText-1,Aa[_$_496c[11]].call(v.current,
406
+ parseInt(r))));g&&(clearTimeout(g),g=null);e=d=!1;na.current&&na.close.call(v.current)};h.mousemove=function(r){r=r||window.event;if(v.current){var z=r.target.getAttribute(_$_496c[44]),A=r.target.getAttribute(_$_496c[45]);if(1==e)ta.event?ta.update.call(v.current,r):za.event?za.update.call(v.current,r):Pa.event?Pa.update.call(v.current,r):v.current.options.tableOverflow&&(r=v.current.content,(r.w&&r.w!==r.offsetWidth||r.h&&r.h!==r.offsetHeight)&&v.current.setViewport(r.offsetWidth,r.offsetHeight),
407
+ r.w=r.offsetWidth,r.h=r.offsetHeight);else{var C=r.target.getBoundingClientRect();a&&(a.style.cursor=_$_496c[3],a=null);1==v.current.options.editable&&(z||A)&&(1==v.current.options.rowResize&&r.target&&z&&!A&&5>C.width-(r.clientX-C.left)?(a=r.target,a.style.cursor=_$_496c[577]):1==v.current.options.columnResize&&r.target&&!z&&A&&5>C.height-(r.clientY-C.top)?(a=r.target,a.style.cursor=_$_496c[578]):1==v.current.options.rowDrag&&r.target&&!z&&A&&5>C.width-(r.clientX-C.left)?(a=r.target,a.style.cursor=
408
+ _$_496c[579]):1==v.current.options.columnDrag&&r.target&&z&&!A&&5>C.height-(r.clientY-C.top)&&(a=r.target,a.style.cursor=_$_496c[579]))}}};h.mouseover=function(r){r=r||window.event;if(v.current&&1==e){var z=l(r);if(z[0]){if(!document.activeElement.classList.contains(_$_496c[98])&&z[1]&&v.current!=z[1].jexcel&&v.current)return!1;if(!ta.event&&!za.event)if(ba.event){var A=r.target.getAttribute(_$_496c[44]),C=r.target.getAttribute(_$_496c[45]);v.current.isSelected(A,C)||null===A||null===C||ba.call(v.current,
409
+ A,C)}else null!==c&&null!==b&&(1==z[2]&&(A=c,z[3]==_$_496c[430]&&(A=r.target.getAttribute(_$_496c[44])),C=v.current.options.data.length-1,u(c,0,A,C,r,z[3],z[1].jexcel)),2==z[2]&&(z[3]==_$_496c[431]?(A=v.current.options.columns.length-1,C=parseInt(r.target.getAttribute(_$_496c[45])),u(0,b,A,C,r,z[3],z[1].jexcel)):z[3]==_$_496c[432]&&(A=z[4],C=z[5],u(c,b,A,C,r,z[3],z[1].jexcel))))}}};h.dblclick=function(r){if(v.current)if(r.target.classList.contains(_$_496c[358]))ba.execute.call(v.current,!1);else{var z=
410
+ l(r);1==z[2]?1==v.current.options.columnSorting&&(r=r.target.getAttribute(_$_496c[44]))&&v.current.orderBy(r):2==z[2]&&v.current.isEditable()&&!v.current.edition&&z[6]&&v.current.openEditor(z[6],null,r)}};h.paste=function(r){if(!r.target.classList.contains(_$_496c[238])&&v.current&&v.current.selectedCell&&!v.current.edition){var z=r.clipboardData||window.clipboardData;z&&(v.current.paste(v.current.selectedCell[0],v.current.selectedCell[1],z.getData(_$_496c[59])),r&&r.preventDefault())}};h.contextmenu=
411
+ function(r){var z=q(r);!1!==z&&(z[1]||(z=k),v.current&&!v.current.edition&&(z=Array.prototype.slice.call(z,3),Ra.open.call(v.current,r,z)))};var x=null,w=null,y=null,B=null,D=null;h.touchstart=function(r){var z=l(r);z[0]?z[1]&&v.current!=z[1].jexcel&&(v.current&&v.current.resetSelection(),v.current=z[1].jexcel):v.current&&(v.current.resetSelection(),v.current=null);v.current&&!v.current.edition?z[3]==_$_496c[142]?v.current.isEditable()&&(ba.event=!0):r.target&&r.target.classList.contains(_$_496c[145])?
412
+ D=parseInt(r.target.getAttribute(_$_496c[146])):z[3]==_$_496c[432]?(B=z,x===r.target&&w?v.current.openEditor(r.target,!1,r):(w=setTimeout(function(){x=w=B=null},400),y=setTimeout(function(){h.contextmenu(r);y=null},800)),x=r.target):B=null:B=null};h.touchmove=function(r){if(v.current){var z=null,A=null,C=null,M=null;if(r.changedTouches&&r.changedTouches[0]){var J=r.changedTouches[0].clientX;var T=r.changedTouches[0].clientY}else J=r.clientX,T=r.clientY;if(T=document.elementFromPoint(J,T))if(J=T.getAttribute(_$_496c[44]),
413
+ T=T.getAttribute(_$_496c[45]),null!==J&&null!==T&&ba.event)v.current.isSelected(J,T)||(ba.call(v.current,J,T),p(r)),r.preventDefault();else if(null!==D){J=parseInt(J);T=parseInt(T);var N=v.current.selectedCell;0==D?J<=N[2]&&(z=J,C=N[2],A=N[1],M=N[3]):2==D?J>=N[0]&&(z=N[0],A=N[1],C=J,M=N[3]):1==D?T<=N[3]&&(z=N[0],A=T,C=N[2],M=N[3]):3==D&&T>=N[1]&&(z=N[0],A=N[1],C=N[2],M=T);null!==z&&v.current.updateSelectionFromCoords(z,A,C,M);r.preventDefault()}else B=null;y&&clearInterval(y)}};h.touchend=function(r){if(ba.event)ba.end.call(v.current,
414
+ r);else if(null!==D)D=null;else if(B){r=null;if(B[3]===_$_496c[432]){var z=B[4];var A=B[5];var C=z;r=A}else B[3]===_$_496c[431]?(z=0,A=B[4],C=v.current.options.columns.length-1,r=A):B[3]===_$_496c[430]&&(z=B[4],A=0,C=z,r=v.current.rows.length-1);null!=z&&v.current.updateSelectionFromCoords(z,A,C,r)}y&&clearInterval(y)};h.resize=function(){v.current&&1==v.current.parent.config.fullscreen&&I.call(v.current,!0)};return h}(),v=function(h,a,c){if(h)if(a||(a={}),a.cloud&&!c)typeof a.plugins.cloud==_$_496c[89]?
415
+ a.plugins.cloud.load(a,function(d){v(h,d,!0)}):console.error(_$_496c[581]);else{if(h.spreadsheet)b=h.spreadsheet,Da[_$_496c[11]].call(b,a);else var b=qa.spreadsheet(h,a);b.processing=!0;1==b.config.loadingSpin&&jSuites.loading.show();jSuites.ajax.oncomplete[b.name]=function(){for(var d=0;d<b.worksheets.length;d++)typeof b.worksheets[d].onload==_$_496c[89]&&(b.worksheets[d].onload(),b.worksheets[d].onload=null);b.processing=!1;if(Array.isArray(b.queue)&&0<b.queue.length)for(;d=b.queue.shift();)d[0].updateCell(d[1],
416
+ d[2],P.call(d[0],d[1],d[2]),!0);b.config.toolbar&&fa.show.call(b);for(d=0;d<b.worksheets.length;d++)Z.refresh.call(b.worksheets[d]);if(typeof b.config.onload==_$_496c[89])b.config.onload(b);la.state.call(b);for(d=0;d<b.worksheets.length;d++);jSuites.loading.hide()};Array.isArray(a.worksheets)&&(a=a.worksheets);if(Array.isArray(a)){for(c=0;c<a.length;c++)qa.worksheet(b,a[c]);a=b.worksheets}else a=qa.worksheet(b,a);jSuites.ajax.pending(b.name)||(jSuites.ajax.oncomplete[b.name](),jSuites.ajax.oncomplete[b.name]=
417
+ null);return a}else console.error(_$_496c[580])};v.license=null;v.setLicense=function(h){v.license=h};v.spreadsheet=[];v.picker=na;v.setDictionary=function(h){jSuites.setDictionary(h)};v.extensions={};v.setExtensions=function(h){for(var a=Object.keys(h),c=0;c<a.length;c++)typeof h[a[c]]===_$_496c[89]&&(v[a[c]]=h[a[c]],v.extensions[a[c]]=h[a[c]],v.license&&typeof v[a[c]].license==_$_496c[89]&&v[a[c]].license.call(v,v.license))};v.destroy=function(h,a){if(h.spreadsheet){a&&qa.unbind(h);a=v.spreadsheet.indexOf(h.spreadsheet);
418
+ v.spreadsheet.splice(a,1);for(a=0;a<h.spreadsheet.worksheets.length;a++)H(h.spreadsheet.worksheets[a].options.worksheetName,null);h.spreadsheet=null;h.jexcel=null;h.innerHTML=_$_496c[3];h.classList.remove(_$_496c[582]);h.classList.remove(_$_496c[368])}};v.version=L;v.helpers=F;v.events=Ba;typeof formula!==_$_496c[13]&&(v.formula=formula);v.editors=function(){var h={},a=function(c,b){return 1==c[b]||c.options&&1==c.options[b]?!0:c[b]==_$_496c[247]||c.options&&c.options[b]==_$_496c[247]?!0:!1};h.createEditor=
419
+ function(c,b,d,e){e.parent.input.setAttribute(_$_496c[106],!1);c==_$_496c[237]?(c=document.createElement(_$_496c[237]),c.type=_$_496c[59],c.value=d):c=document.createElement(_$_496c[20]);c.style.width=b.offsetWidth-2+_$_496c[47];c.style.height=b.offsetHeight-1+_$_496c[47];e.parent.input.appendChild(c);return c};h.createDialog=function(c,b,d,e,f,g){c=h.createEditor(_$_496c[20],c,b,f);c.classList.add(_$_496c[583]);c.classList.add(_$_496c[576]);800>window.innerWidth?(f.parent.input.style.top=_$_496c[149],
420
+ f.parent.input.style.left=_$_496c[149]):(b=f.parent.input.getBoundingClientRect(),window.innerHeight<b.bottom&&(f.parent.input.style.marginTop=-f.parent.input.offsetHeight));return c};h.general=function(){var c={},b=function(e){return(_$_496c[3]+e)[0]==_$_496c[12]?!0:!1},d=function(e){if(e.format||e.mask||e.locale){var f={};e.mask?f.mask=e.mask:e.format?f.mask=e.format:f.locale=e.locale;e.options&&(f.options=e.options);e.decimal&&(f.options||(f.options={}),f.options={decimal:e.decimal});return f}return null};
421
+ c.createCell=function(e,f,g,k,l,n){n.type!=_$_496c[14]&&n.type!=_$_496c[328]&&n.type!=_$_496c[327]||e.classList.add(_$_496c[584]);return c.updateCell(e,f,g,k,l,n)};c.updateCell=function(e,f,g,k,l,n){g=parseInt(g);k=parseInt(k);if(e){var q=d(n),p=null;f===_$_496c[3]||b(f)||typeof f===_$_496c[14]||(q?(q=jSuites.mask.extract(f,q,!0))&&q.value!==_$_496c[3]&&(p=q.value):1==(!1===l.parent.config.autoCasting||!1===n.autoCasting?!1:!0)&&(n.type==_$_496c[14]||n.type==_$_496c[328]||n.type==_$_496c[327]?(q=
422
+ jSuites.mask.extract(f,n,!0))&&q.value!==_$_496c[3]&&(p=q.value):jSuites.isNumeric(Number(f))&&(p=Number(f))));null!==p&&(f=p);f=c.parseValue(g,k,f,l,n,e);f instanceof Element||f instanceof HTMLDocument?(e.innerHTML=_$_496c[3],e.appendChild(f)):1==l.parent.config.stripHTML?e.innerText=f:e.innerHTML=f;if(null!==p)return p}};c.openEditor=function(e,f,g,k,l,n){var q=l.parent.input;q.onblur=function(){q.classList.contains(_$_496c[98])||l.closeEditor(e,!0)};if(n.type==_$_496c[14]||n.type==_$_496c[328]||
423
+ n.type==_$_496c[327])q.classList.add(_$_496c[568]),b(f)||n.inputmode||(n.inputmode=_$_496c[585]);g=null;b(f)||(n.inputmode&&q.setAttribute(_$_496c[102],n.inputmode),(g=d(n))?n.disabledMaskOnEdition||(n.mask?(k=n.mask.split(_$_496c[230]),q.setAttribute(_$_496c[100],k[0])):n.locale&&q.setAttribute(_$_496c[586],n.locale),g.input=q,q.mask=g,jSuites.mask.render(f,g,!1)):f&&n.type==_$_496c[327]&&(f*=100));if(!g||n.disabledMaskOnEdition)l.parent.config.stripHTML?q.innerText=f:q.innerHTML=f,jSuites.focus(q)};
424
+ c.closeEditor=function(e,f,g,k,l,n){e=l.parent.input;f=f&&e.innerText.trim().length?e.innerText:_$_496c[3];b(f)?f=f.replace(/(\r\n|\n|\r)/gm,_$_496c[3]):n.type==_$_496c[327]&&(f+=_$_496c[587],e.classList.remove(_$_496c[588]));return f};c.parseValue=function(e,f,g,k,l,n){1==k.parent.config.parseFormulas&&(k.resetArray(e,f),b(g)&&(g=k.executeFormula(g,e,f)));g instanceof Element||g instanceof HTMLDocument||!l||b(g)||!(f=d(l))||(e=jSuites.mask.render(g,f,!0),n&&f.mask&&(f=f.mask.split(_$_496c[230]),
425
+ f[1]&&(f[1].match(new RegExp(_$_496c[589],_$_496c[397]))&&(0>g?n.classList.add(_$_496c[590]):n.classList.remove(_$_496c[590])),f[1].match(new RegExp(_$_496c[591],_$_496c[397]))&&0>g&&(e=_$_496c[225]+e+_$_496c[250]))),e&&(g=e));return g};c[_$_496c[46]]=function(e,f){var g;return(g=d(e))?jSuites.mask.render(f,g,!0):e.type==_$_496c[327]?100*parseFloat(f):f};c.destroyCell=function(e){e.classList.remove(_$_496c[584])};return c}();h.text=h.general;h.number=h.general;h.numeric=h.general;h.percent=h.general;
426
+ h.notes=function(){var c={},b=null;c.updateCell=function(d,e,f,g,k,l){d&&(f=document.createElement(_$_496c[20]),f.classList.add(_$_496c[592]),1==k.parent.config.stripHTML?f.innerText=e:f.innerHTML=e,d.innerHTML=_$_496c[3],d.appendChild(f))};c.createCell=c.updateCell;c.openEditor=function(d,e,f,g,k,l){var n=l&&l.options?l.options:{};n.focus=!0;n.value=e;n.border=!1;n.height=_$_496c[593];n.toolbar=!1;b=h.createDialog(d,e,f,g,k,l);b=jSuites.editor(b,n)};c.closeEditor=function(d,e,f,g,k,l){return e?b.getData():
427
+ _$_496c[3]};return c}();h.dropdown=function(){var c={createCell:function(b,d,e,f,g,k){k.render==_$_496c[594]?b.classList.add(_$_496c[595]):b.classList.add(_$_496c[596]);if(b=c.updateCell(b,d,e,f,g,k))return b},destroyCell:function(b){b.classList.remove(_$_496c[596])},updateCell:function(b,d,e,f,g,k){if(b){var l=c.getItem(b,d,e,f,g,k);l?b.innerHTML=l:d?(d=c.fromLabel(b,d,e,f,g,k),d.length?(l=c.getItem(b,d,e,f,g,k),b.innerHTML=l):b.innerHTML=_$_496c[3]):b.innerHTML=_$_496c[3];return d}},openEditor:function(b,
428
+ d,e,f,g,k){var l=h.createEditor(_$_496c[20],b,d,g),n=k.delimiter||_$_496c[230];k=Object.create(k);k.options||(k.options={});typeof k.filter==_$_496c[89]&&(k.source=k.filter(g.el,b,e,f,k.source));typeof k.filterOptions==_$_496c[89]&&(k=k.filterOptions(g,b,e,f,d,k));e=k.options;k.source&&(e.data=JSON.parse(JSON.stringify(k.source)));a(k,_$_496c[597])&&(e.multiple=!0);a(k,_$_496c[60])&&(e.autocomplete=!0);e.format=!0;e.opened=!0;e.width=b.offsetWidth-2;e.onclose=function(){g.closeEditor(b,!0)};a(k,_$_496c[597])?
429
+ d&&(e.value=(_$_496c[3]+d).split(n)):e.value=d;jSuites.dropdown(l,e)},closeEditor:function(b,d,e,f,g,k){for(var l=g.parent.input.children[0],n=k.delimiter||_$_496c[230],q=l.dropdown.getText(!0),p=l.dropdown.getValue(!0),u=0;u<p.length;u++)!1===c.getItem(b,p[u],e,f,g,k)&&k.source.push({id:p[u],name:q[u]});l.dropdown.close(!0);if(d)return p.join(n)},fromLabel:function(b,d,e,f,g,k){b=k.delimiter||_$_496c[230];e=[];f=[];Array.isArray(d)||(d=(_$_496c[3]+d).split(b));for(g=0;g<d.length;g++)f[d[g].trim()]=
430
+ !0;d=Object.keys(f);!a(k,_$_496c[597])&&1<Object.keys(d).length&&(f=[],f[d[0]]=!0);for(d=0;d<k.source.length;d++)f[k.source[d].name]&&e.push(k.source[d].id);return e.join(b)},getItem:function(b,d,e,f,g,k){f=k.delimiter||_$_496c[230];b=[];e=[];Array.isArray(d)||(d=(_$_496c[3]+d).split(f));for(f=0;f<d.length;f++)e[d[f].trim()]=!0;f=Object.keys(e);!a(k,_$_496c[597])&&1<Object.keys(f).length&&(d=[],d[f[0]]=!0,e=d);if(k.source&&typeof k.source[0]!==_$_496c[88])for(d=0;d<k.source.length;d++)f=k.source[d],
431
+ k.source[d]={id:f,name:f};for(d=0;d<k.source.length;d++)typeof e[k.source[d].id]!==_$_496c[13]&&b.push(k.render==_$_496c[275]?k.source[d].color:k.render==_$_496c[598]?k.source[d].image:k.source[d].name);if(b.length){if(typeof k.render!==_$_496c[13]){for(d=0;d<b.length;d++)e=d,f=b[d],f=k.render==_$_496c[275]?_$_496c[599]+f+_$_496c[600]:k.render==_$_496c[598]?_$_496c[599]+f+_$_496c[600]:k.render==_$_496c[594]?_$_496c[602]+(k.source[d].color||_$_496c[601])+_$_496c[603]+f+_$_496c[604]:void 0,b[e]=f;return b.join(_$_496c[3])}for(d=
432
+ 0;d<b.length;d++)b[d]=(_$_496c[3]+b[d]).replace(_$_496c[228],_$_496c[605]);return b.join(_$_496c[316])}return!1}};c[_$_496c[46]]=function(b,d){for(var e=0;e<b.source.length;e++)if(b.source[e].id==d)return b.render==_$_496c[275]?b.source[e].color:b.render==_$_496c[598]?b.source[e].image:b.source[e].name};return c}();h.autocomplete=h.dropdown;h.calendar=function(){var c={},b=null;c.updateCell=function(d,e,f,g,k,l){if(d){f=e;l=c.getFormat(l);0<e&&Number(e)==e&&(f=jSuites.calendar.numToDate(e));g=_$_496c[3]+
433
+ e;g.substr(4,1)==_$_496c[198]&&g.substr(7,1)==_$_496c[198]?g=!0:(g=g.split(_$_496c[198]),g=4==g[0].length&&g[0]==Number(g[0])&&2==g[1].length&&g[1]==Number(g[1])?!0:!1);g||(g=jSuites.calendar.extractDateFromString(e,l))&&(f=g);if(f=jSuites.calendar.getDateString(f,l))return d.innerText=f,e;d.innerText=_$_496c[3];return _$_496c[3]}};c.createCell=c.updateCell;c.openEditor=function(d,e,f,g,k,l){l=Object.create(l);typeof l.filterOptions==_$_496c[89]&&(l=l.filterOptions(k,d,f,g,e,l));f=l.options||{};f.opened=
434
+ !0;f.onclose=function(n,q){k.closeEditor(d,!0)};typeof l.timepicker!==_$_496c[13]&&(f.time=a(l,_$_496c[606])?!0:!1);typeof f.readonly!==_$_496c[13]&&(f.readonly=f.readonly);f.value=e||null;f.placeholder=f.format;b=h.createEditor(_$_496c[237],d,e,k);jSuites.calendar(b,f);!1===b.calendar.options.readonly&&b.focus()};c.closeEditor=function(d,e,f,g,k){d=b.calendar.close(!0,b.value?!0:!1);d=b.value?d:_$_496c[3];if(e)return d};c.getFormat=function(d){return d&&d.format?d.format:d&&d.options&&d.options.format?
435
+ d.options.format:_$_496c[607]};c[_$_496c[46]]=function(d,e){d=c.getFormat(d);return jSuites.calendar.getDateString(e,d)};return c}();h.color=function(){var c={},b=null;c.updateCell=function(d,e,f,g,k,l){d&&(l.render==_$_496c[608]?(f=document.createElement(_$_496c[20]),f.className=_$_496c[275],f.style.backgroundColor=e,d.innerText=_$_496c[3],d.appendChild(f)):(d.style.color=e,d.innerText=e))};c.createCell=c.updateCell;c.openEditor=function(d,e,f,g,k,l){l=Object.create(l);typeof l.filterOptions==_$_496c[89]&&
436
+ (l=l.filterOptions(k,d,f,g,e,l));l.value=e;l.onclose=function(n,q){k.closeEditor(d,!0)};b=h.createEditor(_$_496c[237],d,e,k);b=jSuites.color(b,l);b.open()};c.closeEditor=function(d,e,f,g,k,l){d=b.close(!0);if(e)return d};c[_$_496c[46]]=function(d,e){d=document.createElement(_$_496c[20]);d.style.width=_$_496c[609];d.style.height=_$_496c[22];d.style.backgroundColor=e;return d.outerHTML};return c}();h.checkbox=function(){var c={createCell:function(b,d,e,f,g,k){d=d&&d!=_$_496c[610]&&d!=_$_496c[611]?!0:
437
+ !1;e=document.createElement(_$_496c[237]);e.type=_$_496c[270];e.checked=d;e.onclick=function(){g.setValue(b,this.checked)};(k&&1==k.readOnly||!g.isEditable())&&e.setAttribute(_$_496c[612],_$_496c[612]);b.innerHTML=_$_496c[3];b.appendChild(e);return d},updateCell:function(b,d){d=d&&d!=_$_496c[610]&&d!=_$_496c[611]?!0:!1;b&&(b.children[0].checked=d);return d},openEditor:function(b,d,e,f,g){d=b.children[0].checked?!1:!0;g.setValue(b,d);return!1},closeEditor:function(b,d){return!1}};c[_$_496c[46]]=function(b,
438
+ d){return 1==d||1==d||d==_$_496c[247]?jSuites.translate(_$_496c[247]):jSuites.translate(_$_496c[610])};return c}();h.radio=function(){var c={createCell:function(b,d,e,f,g,k){b.getAttribute(_$_496c[44]);e=document.createElement(_$_496c[237]);e.type=_$_496c[272];e.checked=1==d||1==d||d==_$_496c[247]?!0:!1;e.onclick=function(){g.setValue(b,!0)};(k&&1==k.readOnly||!g.isEditable())&&e.setAttribute(_$_496c[612],_$_496c[612]);b.innerHTML=_$_496c[3];b.appendChild(e)},updateCell:function(b,d,e,f,g){d=1==d||
439
+ 1==d||d==_$_496c[247]||d==_$_496c[613]?!0:!1;b&&(b.children[0].checked=d);if(1==d){b=[];for(var k=0;k<g.options.data.length;k++)f!=k&&g.options.data[k][e]&&b.push({x:e,y:k,value:0});b.length&&g.setValue(b)}return d},openEditor:function(b,d,e,f,g){return!1},closeEditor:function(b,d){return!1}};c[_$_496c[46]]=function(b,d){return 1==d||1==d||d==_$_496c[247]?_$_496c[247]:_$_496c[610]};return c}();h.autonumber=function(){var c={},b=null;c.createCell=function(d,e,f,g,k,l){(e=parseInt(e))||0<parseInt(d.innerText)&&
440
+ (e=parseInt(d.innerText));l.sequence||(l.sequence=0);e?c.isValid(e,f,g,k)||(e=_$_496c[262]):e=l.sequence+1;e>l.sequence&&(l.sequence=e);return d.innerText=e};c.updateCell=c.createCell;c.openEditor=function(d,e,f,g,k,l){b=h.createEditor(_$_496c[237],d,e,k);b.onblur=function(){k.closeEditor(d,!0)};b.focus();b.value=e};c.closeEditor=function(d,e,f,g,k){return e?b.value:_$_496c[3]};c.isValid=function(d,e,f,g){for(var k,l=0;l<g.options.data.length;l++)if(k=g.value(e,l),k==d&&l!=f)return!1;return!0};return c}();
441
+ h.progressbar=function(){var c={},b=null;c.createCell=function(d,e){e=parseInt(e);if(100<e)e=100;else if(!e||0>e)e=0;if(d.children[0]&&d.children[0].tagName==_$_496c[566])var f=d.children[0];else f=document.createElement(_$_496c[20]),f.classList.add(_$_496c[276]),d.innerText=_$_496c[3],d.classList.add(_$_496c[614]),d.appendChild(f);f.style.width=parseInt(e)+_$_496c[587];f.setAttribute(_$_496c[285],parseInt(e)+_$_496c[587])};c.destroyCell=function(d){d.classList.remove(_$_496c[614])};c.updateCell=
442
+ c.createCell;c.openEditor=function(d,e,f,g,k,l){b=h.createEditor(_$_496c[237],d,e,k);b.type=_$_496c[14];b.setAttribute(_$_496c[615],0);b.setAttribute(_$_496c[616],100);b.onblur=function(){k.closeEditor(d,!0)};b.focus();b.value=e};c.closeEditor=function(d,e,f,g,k){return e?b.value:_$_496c[3]};return c}();h.rating=function(){var c={},b=null;c.createCell=function(d,e,f,g,k,l){return c.setCell(d,e,l)};c.destroyCell=function(d){d.classList.remove(_$_496c[617])};c.updateCell=c.createCell;c.openEditor=function(d,
443
+ e,f,g,k,l){b=h.createEditor(_$_496c[237],d,e,k);b.type=_$_496c[14];b.setAttribute(_$_496c[615],0);b.setAttribute(_$_496c[616],5);b.onblur=function(){k.closeEditor(d,!0)};b.focus();b.value=e};c.closeEditor=function(d,e,f,g,k,l){return e?b.value:_$_496c[3]};c.setCell=function(d,e,f){e=parseInt(e);if(5<e)e=5;else if(!e||0>e)e=0;if(d){f=f&&f.color?f.color:_$_496c[590];var g=document.createElement(_$_496c[20]);g.setAttribute(_$_496c[285],parseInt(e)+_$_496c[618]);g.classList.add(_$_496c[277]);for(var k=
444
+ 0;k<e;k++){var l=document.createElement(_$_496c[463]);l.className=_$_496c[517];l.style.color=f;l.innerHTML=_$_496c[619];g.appendChild(l)}d.innerHTML=_$_496c[3];d.className=_$_496c[617];d.appendChild(g)}return e};return c}();h.email=function(){var c={createCell:function(b,d,e,f,g,k){b&&(b.children&&b.children[0]&&b.children[0].tagName==_$_496c[572]?e=b.children[0]:(e=document.createElement(_$_496c[214]),b.innerText=_$_496c[3],b.appendChild(e),k.options&&k.options.url&&e.setAttribute(_$_496c[620],k.options.url)),
445
+ e.innerText=d)}};c.updateCell=c.createCell;c.openEditor=function(b,d,e,f,g,k){g.parent.input.classList.add(_$_496c[568]);g.parent.input.onblur=function(){g.closeEditor(b,!0)};g.parent.input.innerText=d;jSuites.focus(g.parent.input)};c.closeEditor=function(b,d,e,f,g){g.parent.input.classList.remove(_$_496c[568]);return d?g.parent.input.innerText.replace(new RegExp(/\n/,_$_496c[201]),_$_496c[3]):_$_496c[3]};return c}();h.url=h.email;h.image=function(){var c={},b=null;c.createCell=function(d,e,f,g,k,
446
+ l){if(d)if(e)if(d.children&&d.children[0]&&d.children[0].tagName==_$_496c[621])d.children[0].src=e;else{var n=document.createElement(_$_496c[37]);l.render==_$_496c[622]&&n.classList.add(_$_496c[622]);l.options&&(n.style.maxWidth=_$_496c[623],l.options.absolute&&(d.classList.add(_$_496c[624]),n.setAttribute(_$_496c[625],-1),n.classList.add(_$_496c[238]),n.classList.add(_$_496c[626]),n.settings=function(){k.openEditor(d,e,f,g,k,l)},n.dblclick=function(){k.openEditor(d,!0)},n[_$_496c[627]]=function(){k.setValueFromCoords(f,
447
+ g,_$_496c[3])}),l.options.width&&(n.style.width=parseInt(l.options.width)+_$_496c[47]),l.options.height&&(n.style.height=parseInt(l.options.height)+_$_496c[47]));n.src=e;d.innerHTML=_$_496c[3];d.appendChild(n)}else d.innerHTML=_$_496c[3]};c.updateCell=c.createCell;c.openEditor=function(d,e,f,g,k,l){(l&&l.options?l.options:{}).value=e;b=h.createDialog(d,e,f,g,k,l);e&&(d=document.createElement(_$_496c[37]),d.src=e,d.classList.add(_$_496c[628]),d.style.width=_$_496c[623],b.appendChild(d));jSuites.image(b,
448
+ l)};c.closeEditor=function(d,e,f,g,k,l){if(e&&(d=b.children[0]))return d.tagName==_$_496c[621]?d.src:_$_496c[3]};c[_$_496c[46]]=function(d,e){return _$_496c[629]+e+_$_496c[630]};return c}();h.html=function(){var c={},b=null;c.createCell=function(d,e){d.classList.add(_$_496c[631]);var f=document.createElement(_$_496c[20]);f.innerHTML=e;d.appendChild(f)};c.updateCell=function(d,e){d&&(d.firstChild.innerHTML=e)};c.destroyCell=function(d){d.classList.remove(_$_496c[631])};c.openEditor=function(d,e,f,
449
+ g,k,l){var n=l&&l.options?l.options:{};n.focus=!0;n.value=e;n.border=!1;n.height=_$_496c[593];e=h.createDialog(d,e,f,g,k,l);b=jSuites.editor(e,n);b.close=function(){k.closeEditor(d,!0)};jSuites.tracking(b,!0)};c.closeEditor=function(d,e,f,g,k,l){jSuites.tracking(b,!1);d=b.getData();if(e)return d};return c}();h.hidden=function(){return{createCell:function(c,b,d,e,f){c.classList.contains(_$_496c[53]);c.innerText=b},updateCell:function(c,b,d,e,f){c&&(c.innerText=b)},openEditor:function(c,b,d,e,f){return!1},
450
+ closeEditor:function(c,b){return!1}}}();h.tags=function(){var c={},b=null;c.createCell=function(d,e){d.classList.add(_$_496c[632]);c.updateCell(d,e)};c.updateCell=function(d,e){d&&(d.innerHTML=e)};c.destroyCell=function(d){d.classList.remove(_$_496c[632])};c.openEditor=function(d,e,f,g,k,l){var n=l&&l.options?l.options:{};n.value=e;b=h.createDialog(d,e,f,g,k,l);d=document.createElement(_$_496c[20]);d.style.margin=_$_496c[22];d.style.marginRight=_$_496c[633];b.appendChild(d);b=jSuites.tags(d,n);d.focus();
451
+ jSuites.focus(d)};c.closeEditor=function(d,e,f,g,k,l){d=b.getValue();if(e)return d};return c}();h.record=function(){var c={},b=null;c.createCell=function(d,e,f,g,k,l){d.classList.add(_$_496c[596]);var n;(n=k.parent.getWorksheetInstance(l.worksheetId))?n.rows?c.updateCell(d,e,f,g,k,l):(d.innerText=_$_496c[262],k.parent.queue.push([k,f,g])):(d.innerText=_$_496c[262],k.parent.queue.push([k,f,g]))};c.destroyCell=function(d){d.classList.remove(_$_496c[596])};c.updateCell=function(d,e,f,g,k,l){d&&(typeof l.worksheetId==
452
+ _$_496c[13]?d.innerText=_$_496c[262]:d.innerHTML=c.getValue(d,e,f,g,k,l))};c.openEditor=function(d,e,f,g,k,l){var n=l.delimiter||_$_496c[230];l=Object.create(l);l.options||(l.options={});typeof l.filter==_$_496c[89]&&(l.source=l.filter(k.el,d,f,g,l.source));typeof l.filterOptions==_$_496c[89]&&(l=l.filterOptions(k,d,f,g,e,l));f=l.options;f.data=c.getSource(k,l);a(l,_$_496c[597])&&(f.multiple=!0);a(l,_$_496c[60])&&(f.autocomplete=!0);f.opened=!0;f.width=d.offsetWidth-2;f.onclose=function(){k.closeEditor(d,
453
+ !0)};a(l,_$_496c[597])?e&&(f.value=(_$_496c[3]+e).split(n)):f.value=e;b=h.createEditor(_$_496c[20],d,e,k);b=jSuites.dropdown(b,f)};c.closeEditor=function(d,e,f,g,k,l){d=l.delimiter||_$_496c[230];f=b.getValue(!0);b.close(!0);if(e)return f.join(d)};c.getValue=function(d,e,f,g,k,l){d=[];if(typeof l.worksheetId==_$_496c[17]&&(k=k.parent.getWorksheetInstance(l.worksheetId))){f=l.worksheetColumn?l.worksheetColumn:0;0<=l.worksheetImage&&(f=l.worksheetImage);if(e==_$_496c[3]||0==e||null==e||void 0==e)return _$_496c[3];
454
+ e=(_$_496c[3]+e).split(_$_496c[230]);for(g=0;g<e.length;g++){var n=e[g].trim();var q=k.name(f);n=k.getRowById(n);q=!1===n?_$_496c[634]:n[q];0<=l.worksheetImage&&(q=_$_496c[635]+q+_$_496c[636]);d.push(q)}return 0<=l.worksheetImage?d.join(_$_496c[3]):d.join(_$_496c[316])}return _$_496c[262]};c.getSource=function(d,e){var f=e.worksheetColumn?e.worksheetColumn:0,g=null;typeof e.worksheetId==_$_496c[17]&&(g=d.parent.getWorksheetInstance(e.worksheetId));if(g){var k,l=[];for(d=0;d<g.rows.length;d++)if(k=
455
+ g.value(f,d))k={id:g.getRowId(d),name:k},void 0!=e.worksheetImage&&(k.image=g.value(e.worksheetImage,d)),l.push(k)}else console.error(_$_496c[637]+e.worksheetId);return l};c[_$_496c[46]]=function(d,e){for(var f=0;f<d.source.length;f++)if(d.source[f].id==e)return d.render==_$_496c[275]?d.source[f].color:d.render==_$_496c[598]?d.source[f].image:d.source[f].name};return c}();return h}();typeof jQuery!==_$_496c[13]&&function(h){h.fn.jspreadsheet=h.fn.jexcel=function(a){var c=h(this)[_$_496c[46]](0);if(c.jspreadsheet){if(typeof arguments[0]==
456
+ _$_496c[14])var b=arguments[0],d=2;else b=0,d=1;return c.jspreadsheet[b][a].apply(c.jspreadsheet[b],Array.prototype.slice.call(arguments,d))}return v(h(this)[_$_496c[46]](0),arguments[0])}}(jQuery);return v});