jspreadsheet 8.4.1 → 8.5.0
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 +418 -416
- package/dist/jspreadsheet.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -22,12 +22,12 @@ $jscomp.polyfill=function(B,I,J,T){I&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfil
|
|
|
22
22
|
$jscomp.polyfillIsolated=function(B,I,J,T){var O=B.split(".");B=1===O.length;T=O[0];T=!B&&T in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var Z=0;Z<O.length-1;Z++){var L=O[Z];if(!(L in T))return;T=T[L]}O=O[O.length-1];J=$jscomp.IS_SYMBOL_NATIVE&&"es6"===J?T[O]:null;I=I(J);null!=I&&(B?$jscomp.defineProperty($jscomp.polyfills,O,{configurable:!0,writable:!0,value:I}):I!==J&&(void 0===$jscomp.propertyToPolyfillSymbol[O]&&(J=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[O]=$jscomp.IS_SYMBOL_NATIVE?
|
|
23
23
|
$jscomp.global.Symbol(O):$jscomp.POLYFILL_PREFIX+J+"$"+O),$jscomp.defineProperty(T,$jscomp.propertyToPolyfillSymbol[O],{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
24
|
$jscomp.iteratorFromArray=function(B,I){B instanceof String&&(B+="");var J=0,T=!1,O={next:function(){if(!T&&J<B.length){var Z=J++;return{value:I(Z,B[Z]),done:!1}}T=!0;return{done:!0,value:void 0}}};O[Symbol.iterator]=function(){return O};return O};$jscomp.polyfill("Array.prototype.values",function(B){return B?B:function(){return $jscomp.iteratorFromArray(this,function(I,J){return J})}},"es8","es3");
|
|
25
|
-
var _$
|
|
25
|
+
var _$_cd07=["use strict","{","}","","8.5.0","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
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","renameWorksheet","moveWorksheet","onundo",
|
|
27
27
|
"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...","_top","onsave",
|
|
28
28
|
"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"," ",".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
29
|
"51px","jss_helper_row","No cell selected","Invalid merged properties","onmerge","rowspan","Column name","data-title","onchangeheader","jss_filters_icon","col","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","JSS: For better results, please allow pagination or tableOverflow.",
|
|
30
|
-
"onpaste","Export not allowed","\ufeff","text/csv;charset=utf-8;",".csv","a","download","setDefinedNames","#1a237e","#b71c1c","#880e4f","#1b5e20","#ff6f00","/","*","^","(","[","|","<",">",";","data-token","jss_picker","jss_object","input","contenteditable","
|
|
30
|
+
"onpaste","Export not allowed","\ufeff","text/csv;charset=utf-8;",".csv","a","download","setDefinedNames","#1a237e","#b71c1c","#880e4f","#1b5e20","#ff6f00","/","*","^","(","[","|","<",">",";","data-token","picker","jss_picker","active","jss_object","input","contenteditable","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",
|
|
31
31
|
"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","oncreaterow","jss_row","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",
|
|
32
32
|
"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","Jspreadsheet: it is not possible to delete the last column","onbeforedeletecolumn","onbeforedeletecolumn returned false",
|
|
33
33
|
"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","onbeforechangepage","onchangepage","No records found","jss_page","jss_page_selected","Showing page {0} of {1} entries",
|
|
@@ -35,429 +35,431 @@ var _$_7134=["use strict","{","}","","8.4.1","Base","https://jspreadsheet.com","
|
|
|
35
35
|
"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","onbeforefilter","onfilter","gi","jss_filters_options","INPUT","Search","jss_filters_search","button","Ok","jss_filters_apply",
|
|
36
36
|
"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","⌘","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",
|
|
37
37
|
"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","Arial","Courier New",'<span style="font-family:',"</span>","font-family","48px","format_size","x-small","small","medium","large",
|
|
38
|
-
"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","
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
(function(B,I){typeof exports===_$
|
|
44
|
-
{version:_$
|
|
45
|
-
b[k].name:k},L=function(k,b,c){var a;if(a=this.options.data[b]){var d=0<=k?Z.call(this,k):k;typeof c===_$
|
|
46
|
-
a=this.parent.element,d=this;else c=this.config,a=this.element,d=t.current?t.current:null;typeof k===_$
|
|
47
|
-
b){if(typeof k===_$
|
|
48
|
-
this.refreshBorders()},Ja=function(k){if(void 0===k)return this.status;var b=document.createElement(_$
|
|
49
|
-
l(e));for(var n=0;128>n;n++){var
|
|
50
|
-
new Date;y=parseInt(u.getTime()/1E3);var
|
|
51
|
-
_$
|
|
52
|
-
da.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(_$
|
|
38
|
+
"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","border_top","border_right","border_bottom","border_clear","black","border-left: ","px solid ","border-left: ; ","border-right: ",
|
|
39
|
+
"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","oncreateworksheet","deleteWorksheet","ondeleteworksheet","It was not possible to rename worksheet due conflict name","onrenameworksheet",
|
|
40
|
+
"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","filters","footer","jtoolbar","DIV","html","jss_nowrap","insertHTML","<br/>\n","Process","A","mailto:","_blank","onclick","jclose","col-resize",
|
|
41
|
+
"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: ","'>","</div>","<","timepicker","YYYY-MM-DD","square","100px","false","FALSE","disabled","TRUE","jss_progressbar","min","max","jss_rating",
|
|
42
|
+
" 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===_$_cd07[83]&&typeof module!==_$_cd07[13]?module.exports=I():typeof define===_$_cd07[84]&&define.amd?define(I):B.jspreadsheet=B.jexcel=I()})(this,function(){_$_cd07[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(_$_cd07[1]+c+_$_cd07[2],b[c]);return k},I=function(k,b){Array.isArray(k)&&(k=k[0]);k=k.replace(new RegExp(/'/g),_$_cd07[3]).toUpperCase();if(void 0===b)return window[k]?window[k]:null;window[k]=b},J=function(){var k=
|
|
44
|
+
{version:_$_cd07[4],edition:_$_cd07[5],host:_$_cd07[6],license:_$_cd07[7],print:function(){return[_$_cd07[8]+this.edition+_$_cd07[9]+this.version+_$_cd07[10]+this.host+_$_cd07[10]+this.license]}};return function(){return k}}(),T=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[_$_cd07[11]].call(this,c))},O=function(k){return(_$_cd07[3]+k).substr(0,1)===_$_cd07[12]},Z=function(k){var b=this.options.columns;return b[k]&&b[k].name?
|
|
45
|
+
b[k].name:k},L=function(k,b,c){var a;if(a=this.options.data[b]){var d=0<=k?Z.call(this,k):k;typeof c===_$_cd07[13]?c=typeof d===_$_cd07[14]?a[k]:jSuites.path.call(a,_$_cd07[3]+d):(typeof d===_$_cd07[14]?a[k]=c:jSuites.path.call(a,_$_cd07[3]+d,c),!O(c)&&this.records[b][k]&&(this.records[b][k].v=c))}else c=null;return c},R=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=_$_cd07[15];if(this.parent)var c=this.parent.config,
|
|
46
|
+
a=this.parent.element,d=this;else c=this.config,a=this.element,d=t.current?t.current:null;typeof k===_$_cd07[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=_$_cd07[3],H.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==_$_cd07[16]?!0:!1);b.style.display=k?_$_cd07[16]:_$_cd07[3];setTimeout(function(){b.style.display=_$_cd07[3]},1E3)},Ga=function(k,
|
|
47
|
+
b){if(typeof k===_$_cd07[17]){var c=E.getCoordsFromColumnName(k);c=this.records[c[1]][c[0]];if(c.element)k=c.element;else return typeof b===_$_cd07[13]?c.readonly:c.readonly=b?!0:!1}c=_$_cd07[18];k=k.classList;if(typeof b===_$_cd07[13])return k.contains(c)?!0:!1;b?k.add(c):k.remove(c)},ya=function(k){var b=_$_cd07[19],c=this.table.classList;if(typeof k==_$_cd07[13])return c.contains(b)?!1:!0;k?c.remove(b):c.add(b);0<this.options.freezeColumns&&ka[_$_cd07[11]].call(this,this.options.freezeColumns);
|
|
48
|
+
this.refreshBorders()},Ja=function(k){if(void 0===k)return this.status;var b=document.createElement(_$_cd07[20]);b.style.textAlign=_$_cd07[21];b.style.fontSize=_$_cd07[22];b.style.cursor=_$_cd07[23];b.onclick=function(){window.location.href=J().host+_$_cd07[24]};var c=null,a=[74,50,48,50,48,33].join(_$_cd07[3]);(function(e){c=1;try{if(e){var f=window.atob(e);f=f.split(_$_cd07[25]);if(f[1]){f[1]=window.atob(f[1]);var g=f[0];e=a;var h=f[1],l=jSuites.sha512,m=_$_cd07[3],p=_$_cd07[3];128<e.length&&(e=
|
|
49
|
+
l(e));for(var n=0;128>n;n++){var q=e[n]?e[n].charCodeAt(0):0;m+=String.fromCharCode(54^q);p+=String.fromCharCode(92^q)}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||_$_cd07[26],y=u.split(_$_cd07[27]);u=u.split(_$_cd07[27]);2<u.length&&!jSuites.isNumeric(u[u.length-1])&&y.shift();y=y.join(_$_cd07[27]);u=u.join(_$_cd07[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(_$_cd07[28])){u=
|
|
50
|
+
new Date;y=parseInt(u.getTime()/1E3);var x=J();f[1].date<y?(c=f[1].date+2592E3<y&&!f[1].plan||f[1].date+15552E3<y?6:7,x.license=f[1].name+_$_cd07[29]):(c=8,x.license=_$_cd07[30]+f[1].name,x.edition=3==f[1].plan||6==f[1].plan?_$_cd07[31]:_$_cd07[5])}else c=5}else c=4}else c=2}}catch(C){}})(k);k=_$_cd07[3];if(1==c)k=_$_cd07[32];else if(2==c||3==c||4==c)k=_$_cd07[33];else if(5==c)k=_$_cd07[34];else if(6==c||7==c)k=_$_cd07[35];b.appendChild(document.createTextNode(k));if(8>c)try{if(typeof sessionStorage!==
|
|
51
|
+
_$_cd07[13]&&!sessionStorage.getItem(_$_cd07[36])){sessionStorage.setItem(_$_cd07[36],!0);var d=document.createElement(_$_cd07[37]);d.src=J().host+_$_cd07[38]+_$_cd07[39];d.style.display=_$_cd07[40];b.appendChild(d)}}catch(e){}Object.defineProperty(this,_$_cd07[41],{value:c,writable:!1,configurable:!1,enumerable:!1,extensible:!1});J().edition===_$_cd07[31]&&(this.edition=1);return b},U=function(){var k=function(){if(this.edition){var d=this.edition.getAttribute(_$_cd07[42]),e=this.edition.getAttribute(_$_cd07[43]);
|
|
52
|
+
da.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(_$_cd07[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
53
|
1].y)&&e?0:this.content.scrollHeight;k.call(this)},a=function(){if(H.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+_$
|
|
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(_$
|
|
56
|
-
d};a.update=function(d,e){e==_$
|
|
57
|
-
f.className=_$
|
|
54
|
+
26);this.scrollX.firstChild.style.width=this.width+_$_cd07[44];this.scrollY.firstChild.style.height=this.height+_$_cd07[44];this.scrollX.style.width=e+_$_cd07[44];this.scrollY.style.height=f+_$_cd07[44];this.scrollX.style.display=this.width>e?_$_cd07[3]:_$_cd07[40];this.scrollY.style.display=this.height>f&&!this.options.pagination?_$_cd07[3]:_$_cd07[40]}else this.scrollX.style.display=_$_cd07[40],this.scrollY.style.display=_$_cd07[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(_$_cd07[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(_$_cd07[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==_$_cd07[45]?(d=a.width.call(this,null,d.target.scrollLeft/(d.target.scrollWidth-this.content.offsetWidth)*this.width),H.reset.call(this),H[_$_cd07[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=_$_cd07[3],H[_$_cd07[46]].call(this,d),c.call(this))};a.build=function(d){var e=this,f=document.createElement(_$_cd07[20]),g=document.createElement(_$_cd07[20]);
|
|
57
|
+
f.className=_$_cd07[47]+d;g.className=_$_cd07[48]+d;f.appendChild(g);d==_$_cd07[45]?f.style.height=_$_cd07[22]:f.style.width=_$_cd07[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!==_$_cd07[49]&&(g+=parseInt(f[h].width));if(g>=e)return h}return e?h:g};a.height=function(d,
|
|
58
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}(),H=function(){var k=function(c,
|
|
59
|
-
a){var d=this.thead.clientHeight;a||(a=1);var e=!1,f=!1,g=c.getAttribute(_$
|
|
60
|
-
(this.content.scrollTop+=h-
|
|
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&&
|
|
59
|
+
a){var d=this.thead.clientHeight;a||(a=1);var e=!1,f=!1,g=c.getAttribute(_$_cd07[42]),h=c.getAttribute(_$_cd07[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 q=h.top+h.height;var v=0;h=l.top;h>=g&&h<=q||(v++,e=!0);h=l.top+l.height;h>=g&&h<=q||v++;if(v>=a)return 2>a&&(a=this.content.scrollTop,0==e?q-g>l.height&&
|
|
60
|
+
(this.content.scrollTop+=h-q+3,U.ignore=!0,this.scrollY.scrollTop+=h-q+3):(this.content.scrollTop=c.offsetTop-d,U.ignore=!0,this.scrollY.scrollTop-=a-this.content.scrollTop)),!1;if(!m||!c.classList.contains(_$_cd07[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(_$_cd07[42]))+1,a=parseInt(this.tbody.lastChild.getAttribute(_$_cd07[43]));
|
|
62
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=0,g=[],h=(this.options.freezeColumns||0)+1;1==this.parent.config.fullscreen?f=this.content.offsetWidth:1==this.options.tableOverflow&&(f=parseInt(this.options.tableWidth));var l=this.headerContainer.offsetWidth||
|
|
63
|
-
0;for(d||(d=0);e[c]&&(!f||l<f||0<d);){!1!==e[c].visible&&e[c].type!==_$
|
|
64
|
-
(e-=this.tfoot.offsetHeight+14));var g=this.tbody.offsetHeight;var h=this.options.freezeColumns||0,l=parseInt(this.headerContainer.lastChild.getAttribute(_$
|
|
65
|
-
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,
|
|
66
|
-
c);if(this.options.nestedHeaders)for(d=0;d<this.options.nestedHeaders.length;d++){var e=
|
|
67
|
-
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(_$
|
|
68
|
-
1].getAttribute(_$
|
|
69
|
-
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=_$
|
|
70
|
-
1),!Aa.attached.call(this,c)){if(this.merged.rows[c]){for(;this.merged.rows[c]&&0<=c;)c--;c++}this.tbody.textContent=_$
|
|
71
|
-
(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(_$
|
|
72
|
-
e+=ba.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(_$
|
|
73
|
-
1&&f++);if(f>e){if(null==c)this.tbody.textContent=_$
|
|
74
|
-
else return!1;if(this.options.mergeCells){for(var e=0,f=d,g=0;g<c;g++){var h=ba.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=
|
|
63
|
+
0;for(d||(d=0);e[c]&&(!f||l<f||0<d);){!1!==e[c].visible&&e[c].type!==_$_cd07[49]&&(l+=parseInt(e[c].width));0<d&&d--;var m=ba.getWidth.call(this,c,g);m>d&&(d=m);a?(b.renderColumn.call(this,c,h),c--):(b.renderColumn.call(this,c),c++)}ba.batch.call(this,g)};b.renderY=function(c,a,d){var e=0,f=[];1==this.parent.config.fullscreen?e=this.content.offsetHeight:1==this.options.tableOverflow&&(e=0<this.options.pagination?0:parseInt(this.options.tableHeight));e&&(e-=this.thead.offsetHeight+4,this.tfoot.offsetHeight&&
|
|
64
|
+
(e-=this.tfoot.offsetHeight+14));var g=this.tbody.offsetHeight;var h=this.options.freezeColumns||0,l=parseInt(this.headerContainer.lastChild.getAttribute(_$_cd07[42]));h=this.headerContainer.children[h+1]?parseInt(this.headerContainer.children[h+1].getAttribute(_$_cd07[42])):l;var m=this.results?this.results.indexOf(c):c,p=parseInt(this.options.pagination)||0,n=this.tbody.children.length||0,q=!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,
|
|
65
|
+
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,q=!0),g+=this.rows[c].height):(g=(q=v.offsetHeight)?g+(this.rows[c].height=q):g+(this.options.defaultRowHeight||23),q=!0);0<d&&d--;c=ba.getHeight.call(this,c,f);c>d&&(d=c);c=this.results?this.results[m]:m;n++}ba.batch.call(this,f);q&&U.call(this)};b.renderColumn=function(c,a,d){this.headers[c]||Ca.create.call(this,
|
|
66
|
+
c);if(this.options.nestedHeaders)for(d=0;d<this.options.nestedHeaders.length;d++){var e=pa.getColumns.call(this,d);void 0!==e[c]&&pa.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]);null===a?(this.headerContainer.appendChild(this.headers[c]),this.colgroupContainer.appendChild(this.colgroup[c])):(this.headerContainer.insertBefore(this.headers[c],
|
|
67
|
+
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(_$_cd07[43])),(e=M[_$_cd07[51]].call(this,c,e))&&(null===a?this.tbody.children[d].appendChild(e):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+
|
|
68
|
+
1].getAttribute(_$_cd07[42])));null==d&&(d=parseInt(this.headerContainer.lastChild.getAttribute(_$_cd07[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(M[_$_cd07[51]].call(this,h,c));ka.update.call(this,c)}for(h=a;h<=d;h++)a=M[_$_cd07[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*
|
|
69
|
+
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=_$_cd07[3];this.results&&this.results.length&&(c=this.results[c]);(!this.results||0<this.results.length)&&H.renderY.call(this,c,0,a);0<this.options.pagination&&ua.update.call(this);U.call(this);this.refreshBorders()};b[_$_cd07[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-
|
|
70
|
+
1),!Aa.attached.call(this,c)){if(this.merged.rows[c]){for(;this.merged.rows[c]&&0<=c;)c--;c++}this.tbody.textContent=_$_cd07[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]||(a=this.options.columns.length-1),c||(c=b.getY.call(this)),!M.attached.call(this,a,c))){if(this.merged.cols[a]){for(d=c=0;d<this.rows.length;d++)this.records[d][a].merged&&
|
|
71
|
+
(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(_$_cd07[43]));if(a){c=null;var f=this.results?this.results[0]:0}else this.results?(f=this.results.indexOf(e),0<f&&f--,f=this.results[f]):(f=e,0<f&&f--);if(f<e){if(null==c)this.tbody.textContent=_$_cd07[3];else{e=c;if(this.options.mergeCells){var g=parseInt(this.tbody.lastChild.getAttribute(_$_cd07[43]));
|
|
72
|
+
e+=ba.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(_$_cd07[43]));if(a){c=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-
|
|
73
|
+
1&&f++);if(f>e){if(null==c)this.tbody.textContent=_$_cd07[3];else{e=c;if(this.options.mergeCells){var g=parseInt(this.tbody.firstChild.getAttribute(_$_cd07[43]));e+=ba.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,!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(_$_cd07[42]));
|
|
74
|
+
else return!1;if(this.options.mergeCells){for(var e=0,f=d,g=0;g<c;g++){var h=ba.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=pa.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(_$_cd07[52]);0<m&&m--;0<m?l.setAttribute(_$_cd07[52],m):
|
|
75
75
|
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]),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):
|
|
76
|
-
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])};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(_$
|
|
77
|
-
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(_$
|
|
78
|
-
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(_$
|
|
79
|
-
_$
|
|
80
|
-
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!==_$
|
|
81
|
-
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!==_$
|
|
82
|
-
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!==_$
|
|
83
|
-
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?H.pageUp.call(this,1,e):H.pageDown.call(this,1,e),Aa.attached.call(this,d)||H[_$
|
|
84
|
-
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===_$
|
|
76
|
+
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])};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(_$_cd07[42]))-1;e>=d&&(null==c?b.reset.call(this):
|
|
77
|
+
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(_$_cd07[42]))+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()};
|
|
78
|
+
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(_$_cd07[42]))};b.getY=function(){if(this.tbody.firstChild)return parseInt(this.tbody.firstChild.getAttribute(_$_cd07[43]))};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!==
|
|
79
|
+
_$_cd07[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+1].getAttribute(_$_cd07[42])):parseInt(this.tbody.firstChild.lastChild.getAttribute(_$_cd07[42]));c?d--:d++;b.renderX.call(this,d,c)};
|
|
80
|
+
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!==_$_cd07[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(_$_cd07[43])));if(a.length)for(d=0;d<a.length;d++)this.rows[a[d]].element.remove()}a=c?parseInt(this.tbody.firstChild.getAttribute(_$_cd07[43])):parseInt(this.tbody.lastChild.getAttribute(_$_cd07[43]));this.results?(a=this.results.indexOf(a),
|
|
81
|
+
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!==_$_cd07[49]){f=this.records[b]&&this.records[b][k].v===_$_cd07[3]?!1:!0;null===g&&(g=f);if(this.records[b]&&this.records[b][k].element&&this.records[b][k].element.style.display==_$_cd07[40]){if(this.records[b][k].merged){if(k==k+this.records[b][k].merged[0]&&(e=k,!c))break;f=!1}}else{if(c&&
|
|
82
|
+
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!==_$_cd07[49]){f=this.records[b]&&this.records[b][k].v===_$_cd07[3]?!1:!0;null===g&&(g=f);if(this.records[b]&&this.records[b][k].element&&this.records[b][k].element.style.display==_$_cd07[40]){if(this.records[b][k].merged){e=k-this.records[b][k].merged[0];if(!c)break;f=!0}}else{if(c&&f!==g&&!a)break;if(c)e=k;else return k}g=f}return e},Ta=function(){var k=
|
|
83
|
+
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?H.pageUp.call(this,1,e):H.pageDown.call(this,1,e),Aa.attached.call(this,d)||H[_$_cd07[46]].call(this,d))):M.attached.call(this,a,d)||(0==c?H.pageLeft.call(this,1,e):H.pageRight.call(this,1,e),M.attached.call(this,a,d)||H[_$_cd07[46]].call(this,d,a))},b=function(c){c.up=b.up;c.down=b.down;c.right=b.right;c.left=b.left;c.last=b.last;c.first=b.first};b.up=function(c,a,d){if(c)var e=parseInt(this.selectedCell[2]),
|
|
84
|
+
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===_$_cd07[3]?!1:!0;null===m&&(m=n);if(this.records[p][g].element&&this.records[p][g].element.style.display==_$_cd07[40]){if(this.records[p][g].merged){l=p-this.records[p][g].merged[1];if(!a)break;n=
|
|
85
85
|
!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]),f=parseInt(this.selectedCell[1]);a:{var g=e,h=f,l=h,m=null;if(this.results){h=this.results.indexOf(h);
|
|
86
|
-
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
|
|
86
|
+
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 q=this.records[n][g].v===_$_cd07[3]?!1:!0;null===m&&(m=q);if(this.records[n][g].element&&this.records[n][g].element.style.display==_$_cd07[40]){if(this.records[n][g].merged){if(!this.records[n][g].merged[1]&&(l=n,!a))break;q=!0}}else if(a&&q!==m&&!d){d=l;break a}else if(a)l=n;else{d=n;break a}m=q}}d=l}d!=f&&(f=d,c?(c=this.selectedCell[0],
|
|
87
87
|
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,d,e,f))};b.left=function(c,a,d){if(c)var e=parseInt(this.selectedCell[2]),
|
|
88
88
|
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}(),Ua=function(){return function(k){k.save=Oa;k.fullscreen=Ka;k.setReadOnly=
|
|
89
|
-
Ga;k.getReadOnly=Ga;k.isReadOnly=Ga;k.setPlugins=function(b){
|
|
90
|
-
_$
|
|
91
|
-
minSpareCols:0,minDimensions:[0,0],csv:null,csvFileName:_$
|
|
92
|
-
tableWidth:null,comments:null,meta:null,style:{},freezeColumns:0,orderBy:null,worksheetId:_$
|
|
89
|
+
Ga;k.getReadOnly=Ga;k.isReadOnly=Ga;k.setPlugins=function(b){qa.call(this.parent,b)};k.showIndex=function(){ya.call(this,!0)};k.hideIndex=function(){ya.call(this,!1)};k[_$_cd07[46]]=H[_$_cd07[46]];k.undo=function(){V.undo.call(k.parent)};k.redo=function(){V.redo.call(k.parent)};k.isEditable=function(){return R.call(k.parent,k)};k.dispatch=function(){return F.apply(this.parent,arguments)};k.setViewport=function(b,c){this.options.tableOverflow=!0;b=parseInt(b);c=parseInt(c);this.content.style.overflow=
|
|
90
|
+
_$_cd07[49];100<b&&(this.options.tableWidth=b+_$_cd07[44],this.content.style.maxWidth=this.options.tableWidth);100<c&&(this.options.tableHeight=parseInt(c)+_$_cd07[44],this.content.style.maxHeight=this.options.tableHeight);H.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,defaultRowHeight:0,defaultColAlign:null,minSpareRows:0,
|
|
91
|
+
minSpareCols:0,minDimensions:[0,0],csv:null,csvFileName:_$_cd07[36],csvHeaders:!0,csvDelimiter:_$_cd07[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,textOverflow:!1,tableOverflow:!1,tableHeight:_$_cd07[53],
|
|
92
|
+
tableWidth:null,comments:null,meta:null,style:{},freezeColumns:0,orderBy:null,worksheetId:_$_cd07[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:_$_cd07[54],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,
|
|
93
93
|
parseFormulas:!0,debugFormulas:!1,editorFormulas:!0,autoIncrement:!0,autoCasting:!0,stripHTML:!1,tabs:!1,allowDeleteWorksheet:!0,allowRenameWorksheet:!0,allowMoveWorksheet:!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,
|
|
94
94
|
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,onchangepage:null,onbeforecreateworksheet:null,oncreateworksheet:null,
|
|
95
95
|
onrenameworksheet:null,ondeleteworksheet:null,onmoveworksheet:null,onopenworksheet:null,onchangerowid:null,onbeforesearch:null,onsearch:null,onbeforefilter:null,onfilter:null,onopenfilter:null,oncreatecell:null,oncreaterow: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={},h;for(h in f)e&&
|
|
96
|
-
e.hasOwnProperty(h)?g[h]=e[h]:g[h]=f[h];return g},a=function(e){e&&(typeof e==_$
|
|
97
|
-
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=_$
|
|
98
|
-
this.options.columns[g].type!=_$
|
|
99
|
-
b);1!=this.config.secureFormulas&&console.log(_$
|
|
100
|
-
h[l]);a.call(f,g)}}):f.options.url?jSuites.ajax({url:f.options.url,method:_$
|
|
101
|
-
!1===e.search&&
|
|
102
|
-
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==_$
|
|
103
|
-
b.columnNumber:b.columnNumber+1,b.numOfColumns);else if(b.action==_$
|
|
104
|
-
null,null,1);else if(b.action==_$
|
|
105
|
-
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==_$
|
|
106
|
-
!0;var c=b.worksheet;c.openWorksheet();if(b.action==_$
|
|
107
|
-
else if(b.action==_$
|
|
108
|
-
b.direction,b.newValue);else if(b.action==_$
|
|
109
|
-
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===_$
|
|
110
|
-
_$
|
|
111
|
-
typeof b.type==_$
|
|
112
|
-
e)){if(this.results&&0<this.results.length)return console.error(_$
|
|
113
|
-
(this.records[e][d].element.style.overflow=_$
|
|
114
|
-
e=parseInt(b.getAttribute(_$
|
|
115
|
-
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);da.build(this.parent);a.removeAttribute(_$
|
|
116
|
-
e.style.opacity=_$
|
|
117
|
-
(O(c.target.innerText)?(c.target.classList.add(_$
|
|
118
|
-
_$
|
|
119
|
-
var c=this.getPrimaryKey();if(!1!==c)return L.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[_$
|
|
120
|
-
function(c){for(var a=[],d={},e=0;e<c.length;e++){var f=c[e].x,g=c[e].y,h=
|
|
121
|
-
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,_$
|
|
122
|
-
l&&(l.message&&(l.name=f.config.application,jSuites.notification.isVisible()?console.log(l.name+_$
|
|
123
|
-
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(_$
|
|
124
|
-
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?_$
|
|
125
|
-
this.rows[e].element)this.rows[e].element.classList[g](_$
|
|
126
|
-
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&&da.close.call(this,this.edition,!0),this.resetBorders(_$
|
|
127
|
-
a>=this.options.columns.length||d>=this.rows.length)};k[_$
|
|
128
|
-
h;u<=l;u++)if(n=this.records[v][u].merged)n=E.getColumnNameFromCoords(u-n[0],v-n[1]),
|
|
129
|
-
c),0==n&&F.call(this.parent,_$
|
|
130
|
-
1,this.records.length-1)};k.getRange=function(){var b=this.selectedCell;if(!b)return _$
|
|
131
|
-
k.reset;a.refreshBorders=k.refresh};k[_$
|
|
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=_$
|
|
133
|
-
C=parseInt(this.tbody.lastChild.getAttribute(_$
|
|
134
|
-
1].offsetLeft,l.element.style.borderLeftColor=g==_$
|
|
135
|
-
l.element.style.borderTopColor=g==_$
|
|
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=_$
|
|
137
|
-
1!=v?(this.corner.style.top=p+n-2+_$
|
|
138
|
-
(this.corner.style.top=_$
|
|
139
|
-
a[e])}this.edition&&(d=this.parent.input,da.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[_$
|
|
140
|
-
a.appendChild(b),c=this.headers[c])&&(c=c.querySelector(_$
|
|
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(_$
|
|
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+_$
|
|
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(_$
|
|
144
|
-
this.records[d][b].element.classList.add(_$
|
|
145
|
-
this.tbody.children[b].getAttribute(_$
|
|
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+_$
|
|
147
|
-
this.merged.rows[a]?console.error(_$
|
|
148
|
-
parseInt(b.target.getAttribute(_$
|
|
149
|
-
c.style.left=a.left-d.left+_$
|
|
150
|
-
for(var b=0;b<this.tbody.children.length;b++){var c=this.tbody.children[b].getAttribute(_$
|
|
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+_$
|
|
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+_$
|
|
96
|
+
e.hasOwnProperty(h)?g[h]=e[h]:g[h]=f[h];return g},a=function(e){e&&(typeof e==_$_cd07[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]!==_$_cd07[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]>
|
|
97
|
+
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=_$_cd07[55]):this.options.columns[g]={type:_$_cd07[55]},this.options.columns[g].type==_$_cd07[56]&&(this.options.columns[g].type=_$_cd07[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=f[g]),this.options.columns[g].width||(this.options.columns[g].width=this.options.defaultColWidth),
|
|
98
|
+
this.options.columns[g].type!=_$_cd07[57]||this.options.columns[g].source||(this.options.columns[g].source=[]),this.options.columns[g].type==_$_cd07[57]&&this.options.columns[g].url&&jSuites.ajax({url:this.options.columns[g].url,index:g,method:_$_cd07[58],dataType:_$_cd07[59],worksheet:this,group:this.parent.name,success:function(h){this.worksheet.options.columns[this.index].source=h}})},d=function(e){e.getConfig=d[_$_cd07[51]];e.setConfig=d[_$_cd07[11]]};d.spreadsheet=function(e){this.config=c(e,
|
|
99
|
+
b);1!=this.config.secureFormulas&&console.log(_$_cd07[60])};d.worksheet=function(e){var f=this;f.options=c(e,k);f.options.csv?jSuites.ajax({url:f.options.csv,method:_$_cd07[58],dataType:_$_cd07[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:_$_cd07[55],width:f.options.defaultColWidth}),typeof f.options.columns[l].title===_$_cd07[13]&&(f.options.columns[l].title=
|
|
100
|
+
h[l]);a.call(f,g)}}):f.options.url?jSuites.ajax({url:f.options.url,method:_$_cd07[58],dataType:_$_cd07[59],group:f.parent.name,success:function(g){a.call(f,g)}}):a.call(f)};d[_$_cd07[51]]=function(){return this.options};d[_$_cd07[11]]=function(e){typeof e==_$_cd07[17]&&(e=JSON.parse(e));if(this.parent){f=Object.keys(e);for(g=0;g<f.length;g++)typeof k[f[g]]!==_$_cd07[13]&&(this.options[f[g]]=e[f[g]]);!0===e.filters?ca.show.call(this):!1===e.filters&&ca.hide.call(this);!0===e.search?ra.show.call(this):
|
|
101
|
+
!1===e.search&&ra.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,_$_cd07[61],{data:JSON.stringify(e)})}else for(var f=Object.keys(e),g=0;g<f.length;g++)typeof b[f[g]]!==_$_cd07[13]&&(this.config[f[g]]=e[f[g]])};return d}(),V=function(k){k=function(b){if(1!=
|
|
102
|
+
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==_$_cd07[62])c.deleteRow(b.insertBefore?b.rowNumber:b.rowNumber+1,b.numOfRows);else if(b.action==_$_cd07[63])c.insertRow(b.numOfRows,b.rowNumber,1,b.data),M.setAttributes.call(c,b.attributes);else if(b.action==_$_cd07[64])c.deleteColumn(b.insertBefore?
|
|
103
|
+
b.columnNumber:b.columnNumber+1,b.numOfColumns);else if(b.action==_$_cd07[65])c.insertColumn(b.numOfColumns,b.columnNumber,1,b.properties,b.data,b.extra),M.setAttributes.call(c,b.attributes);else if(b.action==_$_cd07[66])c.moveRow(b.newValue,b.oldValue);else if(b.action==_$_cd07[67])c.moveColumn(b.newValue,b.oldValue);else if(b.action==_$_cd07[68])c.removeMerge(b.newValue,!0),c.setMerge(b.oldValue);else if(b.action==_$_cd07[69])c.setMerge(b.oldValue);else if(b.action==_$_cd07[70])c.setStyle(b.oldValue,
|
|
104
|
+
null,null,1);else if(b.action==_$_cd07[71])c.setStyle(b.oldValue);else if(b.action==_$_cd07[72])c.setWidth(b.column,b.oldValue);else if(b.action==_$_cd07[73])c.setHeight(b.row,b.oldValue);else if(b.action==_$_cd07[74])c.setHeader(b.column,b.oldValue);else if(b.action==_$_cd07[75])c.setComments(b.oldValue);else if(b.action==_$_cd07[76])c.orderBy(b.column,b.direction?0:1,b.oldValue);else if(b.action==_$_cd07[77]||b.action==_$_cd07[78]){var a=[];for(var d=0;d<b.records.length;d++){var e={x:b.records[d].x,
|
|
105
|
+
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==_$_cd07[79]?c.renameWorksheet(b.index,b.oldValue):b.action==_$_cd07[80]&&c.moveWorksheet(b.t,b.f);b.selection&&c.updateSelectionFromCoords(b.selection);this.ignoreHistory=!1;F.call(this,_$_cd07[81],c,b)}};k.redo=function(){if(this.historyIndex<this.history.length-1)var b=this.history[++this.historyIndex];if(b){this.ignoreHistory=
|
|
106
|
+
!0;var c=b.worksheet;c.openWorksheet();if(b.action==_$_cd07[62])c.insertRow(b.numOfRows,b.rowNumber,b.insertBefore,b.data);else if(b.action==_$_cd07[63])c.deleteRow(b.rowNumber,b.numOfRows);else if(b.action==_$_cd07[64])c.insertColumn(b.numOfColumns,b.columnNumber,b.insertBefore,b.properties,b.data);else if(b.action==_$_cd07[65])c.deleteColumn(b.columnNumber,b.numOfColumns);else if(b.action==_$_cd07[66])c.moveRow(b.oldValue,b.newValue);else if(b.action==_$_cd07[67])c.moveColumn(b.oldValue,b.newValue);
|
|
107
|
+
else if(b.action==_$_cd07[68])c.setMerge(b.newValue);else if(b.action==_$_cd07[69])c.removeMerge(b.newValue);else if(b.action==_$_cd07[70])c.setStyle(b.newValue,null,null,1);else if(b.action==_$_cd07[71])c.resetStyle(b.cells);else if(b.action==_$_cd07[72])c.setWidth(b.column,b.newValue);else if(b.action==_$_cd07[73])c.setHeight(b.row,b.newValue);else if(b.action==_$_cd07[74])c.setHeader(b.column,b.newValue);else if(b.action==_$_cd07[75])c.setComments(b.newValue);else if(b.action==_$_cd07[76])c.orderBy(b.column,
|
|
108
|
+
b.direction,b.newValue);else if(b.action==_$_cd07[77]||b.action==_$_cd07[78])c[b.action](b.records);else b.action==_$_cd07[79]?c.renameWorksheet(b.index,b.newValue):b.action==_$_cd07[80]&&c.moveWorksheet(b.f,b.t);b.selection&&c.updateSelectionFromCoords(b.selection);this.ignoreHistory=!1;F.call(this,_$_cd07[82],c,b)}};return k}(),qa=function(){var k=function(b){var c=null;if(Array.isArray(b))c=b;else if(typeof b==_$_cd07[83]){c=[];var a=Object.keys(b);for(var d=0;d<a.length;d++)c.push({name:a[d],
|
|
109
|
+
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===_$_cd07[84]&&(this.plugins[e]=f.call(t,this,g,this.config),typeof f.license==_$_cd07[84]&&t.license&&f.license(t.license))}};k.execute=function(b,c){if(this.plugins){var a=Object.keys(this.plugins);if(a.length)for(var d=0;d<a.length;d++)if(typeof this.plugins[a[d]][b]==_$_cd07[84]){var e=this.plugins[a[d]][b].apply(this.plugins[a[d]],c);e&&(b==
|
|
110
|
+
_$_cd07[85]&&(c[4]=e),b==_$_cd07[86]&&(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]==_$_cd07[84]){var f=d[e[a]][b].apply(d[e[a]],arguments);typeof f!==_$_cd07[13]&&(c=f)}}return c}}(_$_cd07[87]);return k}(),da=function(){var k=function(b){b.getEditor=k[_$_cd07[51]];b.openEditor=k.open;b.closeEditor=k.close};k[_$_cd07[51]]=function(b,c){b=Ha[_$_cd07[51]].call(this,b,c);return[b.type&&
|
|
111
|
+
typeof b.type==_$_cd07[83]?b.type:t.editors[b.type],b]};k.open=function(b,c,a){if(!R.call(this.parent,this))return!1;if(1!=b.classList.contains(_$_cd07[18])){var d=parseInt(b.getAttribute(_$_cd07[42])),e=parseInt(b.getAttribute(_$_cd07[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=this.records[e][d].merged)d-=f[0],e-=f[1],b=this.records[e][d].element;if(!M.attached.call(this,d,
|
|
112
|
+
e)){if(this.results&&0<this.results.length)return console.error(_$_cd07[88]),!1;H[_$_cd07[46]].call(this,e,d)}k.position.call(this,d,e);f=this.parent.input;if(113===a.keyCode||a.type!==_$_cd07[89])f.selected=!0;f.innerText=_$_cd07[3];F.call(this.parent,_$_cd07[90],this,b,d,e);c=1==c?_$_cd07[3]:L.call(this,d,e);var g=k[_$_cd07[51]].call(this,d,e),h=!0;typeof g[0].openEditor==_$_cd07[84]&&(!1===g[0].openEditor(b,c,d,e,this,g[1],a)?h=!1:F.call(this.parent,_$_cd07[91],this,b,d,e,f,g[1]));h&&(1==this.options.textOverflow&&
|
|
113
|
+
(this.records[e][d].element.style.overflow=_$_cd07[49],0<d&&(this.records[e][d-1].element.style.overflow=_$_cd07[49])),this.edition=b,f.classList.add(_$_cd07[92]),1==this.parent.config.editorFormulas&&O(c)&&(f.classList.add(_$_cd07[93]),la.parse.call(this,f),b=document.createTextNode(_$_cd07[3]),f.appendChild(b),jSuites.focus(f)))}};k.close=function(b,c){null===b&&(b=this.edition);this.parent.input.classList.contains(_$_cd07[93])&&la.close.call(this,this.parent.input);var a,d=parseInt(b.getAttribute(_$_cd07[42])),
|
|
114
|
+
e=parseInt(b.getAttribute(_$_cd07[43]));1==this.options.textOverflow&&(a=this.records[e][d+1])&&a.element&&a.element.innerText==_$_cd07[3]&&(this.records[e][d].element.style.overflow=_$_cd07[3]);a=k[_$_cd07[51]].call(this,d,e);if(1==c){var f=null;typeof a[0].closeEditor==_$_cd07[84]&&(a=a[0].closeEditor(b,!0,d,e,this,a[1]),void 0!==a&&(f=a));null!==f&&L.call(this,d,e)!=f&&this.setValue(b,f)}else a[0].closeEditor(b,!1,d,e,this,a[1]);F.call(this.parent,_$_cd07[94],this,b,d,e,f,c);a=this.parent.input;
|
|
115
|
+
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);da.build(this.parent);a.removeAttribute(_$_cd07[95]);a.removeAttribute(_$_cd07[96]);a.removeAttribute(_$_cd07[97]);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();var e=this.parent.input;e.x=b;e.y=c;0==a.width&&0==a.height?
|
|
116
|
+
e.style.opacity=_$_cd07[98]:(e.setAttribute(_$_cd07[99],_$_cd07[3]),b=a.top-d.top+1,c=a.left-d.left+1,e.style.top=b+_$_cd07[44],e.style.left=c+_$_cd07[44],e.style.minWidth=a.width-1+_$_cd07[44],e.style.minHeight=a.height-1+_$_cd07[44],setTimeout(function(){e.focus()},0))}};k.build=function(b){b.input||(b.input=document.createElement(_$_cd07[20]));b.input.className=_$_cd07[100];b.input.setAttribute(_$_cd07[101],!0);b.input.innerText=_$_cd07[3];b.input.oninput=function(c){1==t.current.parent.config.editorFormulas&&
|
|
117
|
+
(O(c.target.innerText)?(c.target.classList.add(_$_cd07[93]),c.target.selected=!0):c.target.classList.contains(_$_cd07[93])&&la.close.call(t.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==_$_cd07[84]){var c=this.config.onevent.apply(this,arguments);typeof c!==_$_cd07[13]&&(b=c)}typeof this.config[k]==_$_cd07[84]&&(c=this.config[k].apply(this,Array.prototype.slice.call(arguments,1)),typeof c!==
|
|
118
|
+
_$_cd07[13]&&(b=c));c=qa.onevent.apply(this,arguments);typeof c!==_$_cd07[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[_$_cd07[51]]=function(){return this.sequence};k[_$_cd07[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=function(){this.sequence=0};k.getId=function(b){if(this.rows[b]&&this.rows[b].id)return this.rows[b].id;
|
|
119
|
+
var c=this.getPrimaryKey();if(!1!==c)return L.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[_$_cd07[11]].call(this,c);K.call(this,_$_cd07[102],[a]);F.call(this.parent,_$_cd07[103],this,a)}};k.getRowById=function(b,c){for(var a=0;a<this.rows.length;a++)if(k.getId.call(this,a)==b)return!0===c?this.rows[a]:this.options.data[a];return!1};return k}(),Oa=function(){var k=
|
|
120
|
+
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<=[_$_cd07[104],_$_cd07[105],_$_cd07[102],_$_cd07[106]].indexOf(a))return!1;var d={};a==_$_cd07[77]||a==_$_cd07[107]?(a=_$_cd07[108],d[a]=k.call(this,c[1].data)):Array.isArray(c[1])&&
|
|
121
|
+
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,_$_cd07[109],f,g,a))a=h;else if(!1===h)return!1;La.call(f,!0);jSuites.ajax({url:c,method:_$_cd07[110],dataType:_$_cd07[59],data:{data:JSON.stringify(a)},queue:!0,beforeSend:function(l){d&&l.setRequestHeader(_$_cd07[111],_$_cd07[112]+d)},success:function(l){f.element.classList.contains(_$_cd07[113])&&f.element.classList.remove(_$_cd07[113]);
|
|
122
|
+
l&&(l.message&&(l.name=f.config.application,jSuites.notification.isVisible()?console.log(l.name+_$_cd07[114]+l.message):jSuites.notification(l)),l.success?typeof e===_$_cd07[84]?e(l):l.data&&Array.isArray(l.data)&&M.updateAll.call(g,l.data):l.error&&(alert(_$_cd07[115]),window.open(window.location.href,_$_cd07[116])));F.call(f,_$_cd07[117],f,g,a,l)},error:function(){f.element.classList.add(_$_cd07[113])}})}}(),K=function(){return function(){qa.execute.call(this.parent,_$_cd07[118],[this,arguments[0],
|
|
123
|
+
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(_$_cd07[119])?k+(_$_cd07[120]+b):k+(_$_cd07[121]+b)}else this.options.persistence&&(k=typeof this.options.persistence==_$_cd07[17]?this.options.persistence:this.options.url);k&&Oa.call(this,k,arguments)}}}(),Ea=function(k){if(this.selectedCell){var b=this.selectedCell[0],c=this.selectedCell[1];this.records&&this.records[c]&&
|
|
124
|
+
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?_$_cd07[122]:_$_cd07[123];this.records[c]&&this.records[c][b]&&this.records[c][b].element&&(this.records[c][b].element.classList[g](_$_cd07[124]),this.cursor=k?this.records[c][b].element:null);for(k=d;k<=f;k++)if(this.headers[k])this.headers[k].classList[g](_$_cd07[125]);for(;e<=a;e++)if(this.rows[e]&&
|
|
125
|
+
this.rows[e].element)this.rows[e].element.classList[g](_$_cd07[125])}},za=function(){var k=function(b){b.resetSelection=k.reset;b.updateSelection=k.fromElements;b.updateSelectionFromCoords=k[_$_cd07[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;var d=a[0],e=a[1],f=a[2];a=a[3];
|
|
126
|
+
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&&da.close.call(this,this.edition,!0),this.resetBorders(_$_cd07[126],!0),this.resetBorders(_$_cd07[127],!0),this.selectedCell=null,1==b&&F.call(this.parent,_$_cd07[128],this);else var b=0;return b};k.refresh=function(){this.selectedCell&&k[_$_cd07[11]].call(this,this.selectedCell)};k.isValid=function(b,c,a,d){return!(b>=this.options.columns.length||c>=this.rows.length||
|
|
127
|
+
a>=this.options.columns.length||d>=this.rows.length)};k[_$_cd07[11]]=function(b,c,a,d,e,f,g){f||(f=_$_cd07[126]);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 q={};if(this.options.mergeCells){for(var v=m;v<=p;v++)for(var u=
|
|
128
|
+
h;u<=l;u++)if(n=this.records[v][u].merged)n=E.getColumnNameFromCoords(u-n[0],v-n[1]),q[n]=!0;v=Object.keys(q);if(v.length)for(u=0;u<v.length;u++)n=E.getCoordsFromColumnName(v[u]),q=this.options.mergeCells[v[u]],n[0]<h&&(h=n[0]),n[0]+q[0]-1>l&&(l=n[0]+q[0]-1),n[1]<m&&(m=n[1]),n[1]+q[1]-1>p&&(p=n[1]+q[1]-1)}}f==_$_cd07[126]&&(this.selectedCell?(Ea.call(this,!1),n=1):n=0,this.selectedCell=[b,c,a,d],this.records[d][a].element&&H.isVisible.call(this,this.records[d][a].element),da.position.call(this,b,
|
|
129
|
+
c),0==n&&F.call(this.parent,_$_cd07[129],this));ha[_$_cd07[11]].call(this,h,m,l,p,f,g);f==_$_cd07[126]&&(F.call(this.parent,_$_cd07[130],this,h,m,l,p,e),fa.update.call(this.parent,t.current,this.selectedCell))};k.fromElements=function(b,c,a){var d=b.getAttribute(_$_cd07[42]);b=b.getAttribute(_$_cd07[43]);if(c){var e=c.getAttribute(_$_cd07[42]);c=c.getAttribute(_$_cd07[43])}else e=d,c=b;this.updateSelectionFromCoords(d,b,e,c,a)};k.all=function(){k[_$_cd07[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 _$_cd07[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(_$_cd07[131])?_$_cd07[132]+a+_$_cd07[133]:a+_$_cd07[134];return c==b?a+c:a+t.helpers.getRangeFromTokens(t.helpers.getTokensFromRange(c+_$_cd07[135]+b))};return k}(),ha=function(){var k=function(a){a.borders=[];a.setBorder=k[_$_cd07[11]];a.getBorder=k[_$_cd07[51]];a.resetBorders=
|
|
131
|
+
k.reset;a.refreshBorders=k.refresh};k[_$_cd07[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(_$_cd07[20]);l.element.classList.add(_$_cd07[136]);g==_$_cd07[127]||g==_$_cd07[137]||g==_$_cd07[126]?l.element.classList.add(_$_cd07[138]+g):(h=h?h:jSuites.randomColor(!0),l.color=h,l.element.style.backgroundColor=h+_$_cd07[139],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=_$_cd07[140];l.element.style.left=_$_cd07[140];l.active=0;var q=this.options.freezeColumns||0,v=!1,u=null,y=null,x=null,C=null;this.tbody.firstChild&&(y=parseInt(this.tbody.firstChild.getAttribute(_$_cd07[43])),
|
|
133
|
+
C=parseInt(this.tbody.lastChild.getAttribute(_$_cd07[43])));this.thead.lastChild&&(u=parseInt(this.thead.lastChild.children[q+1].getAttribute(_$_cd07[42])),x=parseInt(this.thead.lastChild.lastChild.getAttribute(_$_cd07[42])),this.thead.lastChild.children[1].style.display==_$_cd07[40]&&(u=Ma.call(this,u,y)),this.thead.lastChild.lastChild.style.display==_$_cd07[40]&&(x=Na.call(this,x,C)));null==u||e<u&&a>=q||a>x||f<y||d>C||(h?l.element.style.borderLeftColor=l.color?l.color:_$_cd07[3]:(h=this.thead.lastChild.children[q+
|
|
134
|
+
1].offsetLeft,l.element.style.borderLeftColor=g==_$_cd07[127]?_$_cd07[141]:_$_cd07[142]),m?(m+=this.headers[e].offsetWidth,l.element.style.borderRightColor=l.color?l.color:_$_cd07[3]):(e>x?(m=this.headers[x].offsetLeft+this.headers[x].offsetWidth,v=!0):m=this.thead.lastChild.children[q].offsetLeft+this.thead.lastChild.children[q].offsetWidth,l.element.style.borderRightColor=g==_$_cd07[127]?_$_cd07[141]:_$_cd07[142]),m=m-h-1,p?l.element.style.borderTopColor=l.color?l.color:_$_cd07[3]:(p=this.tbody.firstChild.offsetTop,
|
|
135
|
+
l.element.style.borderTopColor=g==_$_cd07[127]?_$_cd07[141]:_$_cd07[142]),n?(n+=this.rows[f].element.offsetHeight,l.element.style.borderBottomColor=l.color?l.color:_$_cd07[3]):(n=this.rows[C].element.offsetTop+this.rows[C].element.offsetHeight,l.element.style.borderBottomColor=g==_$_cd07[127]?_$_cd07[141]:_$_cd07[142],v=!0),n=n-p-1,this.options.freezeColumns&&(l.element.style.borderLeftWidth=_$_cd07[3],l.element.style.borderRightWidth=_$_cd07[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=_$_cd07[143],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=_$_cd07[143]))))),l.element.style.top=p+_$_cd07[44],l.element.style.left=h+_$_cd07[44],l.element.style.width=m+_$_cd07[44],l.element.style.height=n+_$_cd07[44],l.t=p,l.l=h,l.w=m,l.h=n,l.active=1);g==_$_cd07[126]&&(l.active&&
|
|
137
|
+
1!=v?(this.corner.style.top=p+n-2+_$_cd07[44],this.corner.style.left=h+m-2+_$_cd07[44]):(this.corner.style.top=_$_cd07[140],this.corner.style.left=_$_cd07[140]));this.borders[g]=l},c=function(a,d){a.element.style.top=_$_cd07[140];a.element.style.left=_$_cd07[140];a.active=0;d&&(a.x1=null,a.y1=null,a.x2=null,a.y2=null)};k[_$_cd07[11]]=function(a,d,e,f,g,h){b.call(this,a,d,e,f,g,h);g==_$_cd07[126]&&(Ea.call(this,!0),K.call(this,_$_cd07[104],{x1:a,y1:d,x2:e,y2:f}))};k.reset=function(a,d){a&&a!=_$_cd07[126]||
|
|
138
|
+
(this.corner.style.top=_$_cd07[140],this.corner.style.left=_$_cd07[140],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!=_$_cd07[126]||K.call(this,_$_cd07[105])};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,da.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[_$_cd07[11]];b.unsetGroup=k.unset};k[_$_cd07[11]]=function(b,c,a){0==b&&(a=document.createElement(_$_cd07[144]),a.classList.add(_$_cd07[145]),this.thead.insertBefore(a,this.thead.firstChild),b=document.createElement(_$_cd07[146]),b.innerHTML=_$_cd07[147],a.appendChild(b),b=document.createElement(_$_cd07[146]),
|
|
140
|
+
a.appendChild(b),c=this.headers[c])&&(c=c.querySelector(_$_cd07[148]),c||(c=document.createElement(_$_cd07[20]),c.classList.add(_$_cd07[149]),c.innerText=_$_cd07[150],b.appendChild(c)))};k.unset=function(b,c){};return k}(),wa=function(){var k={start:function(b){if(!R.call(this.parent,this))return!1;if(null!==b.target.getAttribute(_$_cd07[43])){var c=b.target.getAttribute(_$_cd07[43]);k.event={y:parseInt(c),h:b.target.offsetHeight,p:b.pageY}}else null!==b.target.getAttribute(_$_cd07[42])&&(c=b.target.getAttribute(_$_cd07[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(_$_cd07[151]));
|
|
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+_$_cd07[44],this.refreshBorders())):null!=k.event.x&&(b=b.pageX-k.event.p,0<k.event.w+b&&(this.colgroup[k.event.x].setAttribute(_$_cd07[151],
|
|
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(_$_cd07[42]));if(this.merged.cols[b])console.error(_$_cd07[152]);else{k.event={x:b,d:b};this.headers[b].classList.add(_$_cd07[153]);for(var a=0;a<this.tbody.children.length;a++){var d=this.tbody.children[a].getAttribute(_$_cd07[43]);
|
|
144
|
+
this.records[d][b].element.classList.add(_$_cd07[153])}a=this.parent.element.getBoundingClientRect();b=this.headers[b].getBoundingClientRect();d=this.content.getBoundingClientRect();c.style.display=_$_cd07[16];c.style.top=d.top-a.top+_$_cd07[44];c.style.left=b.left-d.left+_$_cd07[44];c.style.width=_$_cd07[154];c.style.height=d.height+_$_cd07[44];c.classList.add(_$_cd07[155])}},end:function(){this.headers[k.event.x].classList.remove(_$_cd07[153]);for(var b=0;b<this.tbody.children.length;b++){var c=
|
|
145
|
+
this.tbody.children[b].getAttribute(_$_cd07[43]);this.records[c][k.event.x].element.classList.remove(_$_cd07[153])}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(_$_cd07[155]);this.parent.helper.style.display=_$_cd07[3];k.event=null},cancel:function(){k.event.d=null;k.end.call(this)},update:function(b){var c=b.target.getAttribute(_$_cd07[42]);if(null!=c)if(c=parseInt(c),this.merged.cols[c])console.error(_$_cd07[152]);
|
|
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+_$_cd07[44]}}};return k}(),sa=function(){var k={start:function(b){if(R.call(this.parent,this)){this.resetSelection();var c=this.parent.helper;if(null!==b.target.getAttribute(_$_cd07[43])){var a=parseInt(b.target.getAttribute(_$_cd07[43]));
|
|
147
|
+
this.merged.rows[a]?console.error(_$_cd07[156]):this.results?console.error(_$_cd07[157]):(k.event={y:a,d:a},this.rows[a].element.classList.add(_$_cd07[153]),b=this.parent.element.getBoundingClientRect(),a=this.rows[a].element.getBoundingClientRect(),c.style.display=_$_cd07[16],c.style.top=a.top-b.top+_$_cd07[44],c.style.left=_$_cd07[158],c.style.width=this.content.offsetWidth-50+_$_cd07[44],c.style.height=_$_cd07[154],c.classList.add(_$_cd07[159]))}else if(null!==b.target.getAttribute(_$_cd07[42]))if(a=
|
|
148
|
+
parseInt(b.target.getAttribute(_$_cd07[42])),this.merged.cols[a])console.error(_$_cd07[152]);else{k.event={x:a,d:a};this.headers[a].classList.add(_$_cd07[153]);for(b=0;b<this.tbody.children.length;b++){var d=this.tbody.children[b].getAttribute(_$_cd07[43]);this.records[d][a].element.classList.add(_$_cd07[153])}b=this.parent.element.getBoundingClientRect();a=this.headers[a].getBoundingClientRect();d=this.content.getBoundingClientRect();c.style.display=_$_cd07[16];c.style.top=d.top-b.top+_$_cd07[44];
|
|
149
|
+
c.style.left=a.left-d.left+_$_cd07[44];c.style.width=_$_cd07[154];c.style.height=d.height+_$_cd07[44];c.classList.add(_$_cd07[155])}}else return!1},end:function(){if(null!=k.event.y)this.rows[k.event.y].element.classList.remove(_$_cd07[153]),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(_$_cd07[159]);else if(null!=k.event.x){this.headers[k.event.x].classList.remove(_$_cd07[153]);
|
|
150
|
+
for(var b=0;b<this.tbody.children.length;b++){var c=this.tbody.children[b].getAttribute(_$_cd07[43]);this.records[c][k.event.x].element.classList.remove(_$_cd07[153])}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(_$_cd07[155])}this.parent.helper.style.display=_$_cd07[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(_$_cd07[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+_$_cd07[44])}}else d=b.target.getAttribute(_$_cd07[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+_$_cd07[44]))}};return k}(),ba=function(){var k=function(b){b.getMerge=k[_$_cd07[51]];b.setMerge=k[_$_cd07[11]];b.updateMerge=k.update;b.removeMerge=k.remove;b.destroyMerged=b.destroyMerge=k.destroy};k.getHeight=function(b,
|
|
153
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[_$
|
|
155
|
-
(jSuites.notification({message: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);M.attached.call(this,e[0],e[1])||(l=e)}}Object.keys(g).length&&(l&&H[_$
|
|
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(!R.call(this.parent,this))return!1;c={};var a={},d={};typeof b==_$
|
|
158
|
-
oldValue:c});K.call(this,_$
|
|
159
|
-
(a.style.overflow=_$
|
|
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(_$
|
|
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[_$_cd07[51]]=function(b){return b?this.options.mergeCells[b]:this.options.mergeCells};k[_$_cd07[11]]=function(b,c,a){if(!R.call(this.parent,this))return!1;this.options.mergeCells||(this.options.mergeCells={});var d,e=null,f={},g={},h={},l=!1;typeof b==_$_cd07[17]?h[b]=[c,a]:typeof b==_$_cd07[83]?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(_$_cd07[160])}),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(_$_cd07[161])+_$_cd07[135]+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 q=e[1];q<e[1]+n;q++)for(var v=e[0];v<e[0]+p;v++)b=E.getColumnNameFromCoords(v,q),(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);M.attached.call(this,e[0],e[1])||(l=e)}}Object.keys(g).length&&(l&&H[_$_cd07[46]].call(this,e[1],e[0]),V.call(this.parent,{worksheet:this,action:_$_cd07[68],newValue:g,oldValue:f}),K.call(this,_$_cd07[68],[g]),k.build.call(this),za.refresh.call(this),ha.refresh.call(this),F.call(this.parent,_$_cd07[162],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(!R.call(this.parent,this))return!1;c={};var a={},d={};typeof b==_$_cd07[17]?d[b]=!0:typeof b==_$_cd07[83]&&(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));V.call(this.parent,{worksheet:this,action:_$_cd07[69],newValue:a,
|
|
158
|
+
oldValue:c});K.call(this,_$_cd07[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=M[_$_cd07[51]].call(this,b[0],b[1])){a.style.display=_$_cd07[3];1<d?a.setAttribute(_$_cd07[52],d):a.removeAttribute(_$_cd07[52]);1<e?a.setAttribute(_$_cd07[163],e):a.removeAttribute(_$_cd07[163]);1==this.options.textOverflow&&
|
|
159
|
+
(a.style.overflow=_$_cd07[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||M[_$_cd07[51]].call(this,c,h),a.element.style.display=_$_cd07[40],a.merged[3]=a.element.innerText,a.element.innerText=_$_cd07[3],L.call(this,c,h,_$_cd07[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(_$_cd07[52]),a.element.removeAttribute(_$_cd07[163])):(a.element.style.display=_$_cd07[3],1==c&&(L.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
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[_$
|
|
163
|
-
k.all=function(b){for(var c=[],a=0;a<this.options.columns.length;a++)c.push(k[_$
|
|
164
|
-
_$
|
|
165
|
-
(d=!1);!0===d&&e.classList.add(_$
|
|
166
|
-
d,c,null,!1)),this.options.applyMaskOnFooters&&(e=da[_$
|
|
167
|
-
b[_$
|
|
168
|
-
function(c,a,d){if(void 0===d)return this.options.footers[a][c];k.call(this,c,a,d);K.call(this,_$
|
|
169
|
-
this.options.columns[c].align;d.element=document.createElement(_$
|
|
170
|
-
[];var a=document.createElement(_$
|
|
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]=_$
|
|
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}(),
|
|
173
|
-
b;k.build.call(this);k.render.call(this);ha.refresh.call(this);U.call(this);K.call(this,_$
|
|
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(_$
|
|
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=_$
|
|
176
|
-
e.setAttribute(_$
|
|
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(_$
|
|
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(_$
|
|
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]==_$
|
|
180
|
-
n[
|
|
181
|
-
_$
|
|
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[_$
|
|
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&&(
|
|
184
|
-
this.options.columns[u].type==_$
|
|
185
|
-
|
|
186
|
-
b.getColumnData=k.getColumnData;b.setColumnData=k.setColumnData;b.updateData=k.update;b.refresh=k.refresh;b.data=k[_$
|
|
187
|
-
b[1];var v=b[2],u=b[3];
|
|
188
|
-
_$
|
|
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!==_$
|
|
190
|
-
(b[g].data[h]=_$
|
|
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=_$
|
|
192
|
-
null,d=da[_$
|
|
193
|
-
for(var a=0;a<this.options.columns.length;a++){var d=_$
|
|
194
|
-
function(b,c){if(typeof this.options.columns[b]===_$
|
|
195
|
-
1==b?!0:!1},e=k[_$
|
|
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),
|
|
197
|
-
c=parseInt(c);if(a){Array.isArray(a)||(a=E.parseCSV(a,_$
|
|
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(
|
|
199
|
-
for(n=0;n<a.length;n++)for(
|
|
200
|
-
c){if(this.parent.config.allowExport){void 0===c&&(c=!0);var a=_$
|
|
201
|
-
c,b.setAttribute(_$
|
|
202
|
-
k[_$
|
|
203
|
-
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[_$
|
|
204
|
-
(d[e[f]]=g)}k[_$
|
|
205
|
-
(h[l]=k[g++],4<g&&(g=0));f.children[
|
|
206
|
-
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(_$
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
(
|
|
231
|
-
h.
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
c);
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
function(b){
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
b,
|
|
245
|
-
b,c
|
|
246
|
-
this.
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
this.records[c][b].element,
|
|
256
|
-
|
|
257
|
-
a.
|
|
258
|
-
(e=
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
this.
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
this.tbody.children[f].
|
|
276
|
-
0
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
var
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
(
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
K.call(this,_$
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
this,b
|
|
302
|
-
this.
|
|
303
|
-
this.
|
|
304
|
-
|
|
305
|
-
_$
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
b
|
|
312
|
-
a
|
|
313
|
-
|
|
314
|
-
this.
|
|
315
|
-
|
|
316
|
-
_$
|
|
317
|
-
this.
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
d
|
|
324
|
-
a.
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
(a=_$
|
|
331
|
-
b.
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
f
|
|
337
|
-
|
|
338
|
-
l
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
this.
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
(this.
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
h.push({
|
|
358
|
-
onclick:function(){b.
|
|
359
|
-
h.push({title:B(_$
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
b.
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
{
|
|
368
|
-
|
|
369
|
-
_$
|
|
370
|
-
|
|
371
|
-
_$
|
|
372
|
-
d.innerHTML=_$
|
|
373
|
-
_$
|
|
374
|
-
|
|
375
|
-
(c
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
function(b,c){var a=this.worksheets;if(!R.call(this))return!1;
|
|
379
|
-
|
|
380
|
-
(
|
|
381
|
-
|
|
382
|
-
c)
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
(
|
|
388
|
-
|
|
389
|
-
_$
|
|
390
|
-
|
|
391
|
-
t.current
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
t.current.
|
|
406
|
-
|
|
407
|
-
!1)
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
(
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
m.
|
|
431
|
-
_$
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
_$
|
|
439
|
-
function(a,d){for(
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
(
|
|
445
|
-
|
|
446
|
-
h&&g.
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
_$
|
|
452
|
-
function(){
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
e)};c.updateCell=function(d,e){d&&(d.innerHTML=e)};c.destroyCell=function(d){d.classList.remove(_$
|
|
458
|
-
function(
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
d)
|
|
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[_$_cd07[51]];b.setHeader=k[_$_cd07[11]];b.getHeaders=k.all};k[_$_cd07[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[_$_cd07[51]].call(this,a));return b?c:c.join(this.options.csvDelimiter)};k[_$_cd07[11]]=function(b,c){if(!R.call(this.parent,this))return!1;var a;if(a=this.options.columns[b]){var d=k[_$_cd07[51]].call(this,b);if(!c&&(c=prompt(B(_$_cd07[164]),d),!c))return!1;a.title=c;if(a=this.headers[b])a.innerHTML=c,a.setAttribute(_$_cd07[165],c);V.call(this.parent,{worksheet:this,action:_$_cd07[74],column:b,oldValue:d,newValue:c});K.call(this,
|
|
164
|
+
_$_cd07[74],{column:b,title:c});F.call(this.parent,_$_cd07[166],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(_$_cd07[146]);this.parent.config.stripHTML?e.innerText=d:e.innerHTML=d;e.setAttribute(_$_cd07[42],b);c.align&&(e.style.textAlign=c.align);c.title&&e.setAttribute(_$_cd07[165],e.innerText);c.tooltip&&(e.title=c.tooltip);d=this.options.filters;!0===c.filter&&(d=!0);!1===c.filter&&
|
|
165
|
+
(d=!1);!0===d&&e.classList.add(_$_cd07[167]);!1===c.visible&&(a=_$_cd07[98]);d=document.createElement(_$_cd07[168]);d.setAttribute(_$_cd07[151],a);c.type==_$_cd07[49]&&(e.style.display=_$_cd07[40],d.style.display=_$_cd07[40]);this.headers[b]=e;this.colgroup[b]=d};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]:_$_cd07[3]),O(d)&&1==this.parent.config.parseFormulas&&(d=W.execute.call(this,
|
|
166
|
+
d,c,null,!1)),this.options.applyMaskOnFooters&&(e=da[_$_cd07[51]].call(this,c),d=t.editors.general.parseValue(c,a,d,this,e[1],f)),d instanceof Element||d instanceof HTMLDocument?(f.innerHTML=_$_cd07[3],f.appendChild(d)):1==this.parent.config.stripHTML?f.innerText=d:f.innerHTML=d)},b=function(c){c.getFooter=b[_$_cd07[51]];c.setFooter=b[_$_cd07[11]];c.resetFooter=b.reset;c.refreshFooter=b.refresh;c.getFooterValue=b.value;c.setFooterValue=b.value};b[_$_cd07[51]]=function(){return this.options.footers};
|
|
167
|
+
b[_$_cd07[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),H.limited.call(this)&&(this.scrollY.style.display=_$_cd07[40],H.resetY.call(this)),K.call(this,_$_cd07[169],{data:this.options.footers}),F.call(this.parent,_$_cd07[170],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);K.call(this,_$_cd07[171],{x:c,y:a,value:d});F.call(this.parent,_$_cd07[172],this,c,a,d)};b.reset=function(){var c=this.options.footers;this.options.footers=null;this.footers.content=null;this.tfoot.innerHTML=_$_cd07[3];K.call(this,_$_cd07[173],{});F.call(this.parent,_$_cd07[170],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(_$_cd07[146]);d.element.setAttribute(_$_cd07[42],c);d.element.setAttribute(_$_cd07[43],a);e&&(d.element.style.textAlign=e);k.call(this,c,a);this.options.columns[c].type==_$_cd07[49]&&(d.element.style.display=_$_cd07[40]);return d.element};b.build=function(){this.footers={element:this.tfoot,content:[]};if(this.options.footers){this.tfoot.innerHTML=_$_cd07[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(_$_cd07[144]),d=document.createElement(_$_cd07[146]);d.innerHTML=_$_cd07[147];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]=_$_cd07[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]=_$_cd07[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}(),pa=function(){var k=function(b){b.setNestedCell=k.cell;b.getNestedCell=k.cell;b.setNestedHeaders=k[_$_cd07[11]];b.getNestedHeaders=k[_$_cd07[51]];b.resetNestedHeaders=k.reset};k[_$_cd07[51]]=function(){return this.options.nestedHeaders};k[_$_cd07[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);K.call(this,_$_cd07[174],{data:b});F.call(this.parent,_$_cd07[175],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(_$_cd07[176])&&b.push(c[a]);if(b.length)for(;c=b.shift();)c.remove();this.nested=null;ha.refresh.call(this);U.call(this);K.call(this,_$_cd07[177]);F.call(this.parent,_$_cd07[175],this,[])};k.cell=function(b,c,a){if(a){if(!R.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(_$_cd07[52],a.colspan),e.style.display=0==d.colspan?_$_cd07[40]:_$_cd07[3]);K.call(this,_$_cd07[178],{x:b,y:c,properties:a});F.call(this.parent,_$_cd07[179],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=_$_cd07[180]);a.title||(a.title=_$_cd07[3]);var e=document.createElement(_$_cd07[146]);
|
|
176
|
+
e.setAttribute(_$_cd07[181],b);e.setAttribute(_$_cd07[182],c);e.setAttribute(_$_cd07[52],a.colspan);e.setAttribute(_$_cd07[183],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(_$_cd07[146]);c.innerHTML=_$_cd07[147];var a=document.createElement(_$_cd07[144]);a.classList.add(_$_cd07[176]);
|
|
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(_$_cd07[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=pa.create.call(this,b,c);d.parentNode?(b=d.getAttribute(_$_cd07[52]),b++,d.setAttribute(_$_cd07[52],b)):(d.setAttribute(_$_cd07[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(_$_cd07[50]),d.style.left=ya.call(this)?_$_cd07[158]:_$_cd07[154]))};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]==_$_cd07[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 q=p;0<=q;q--)if(p=this.results?
|
|
180
|
+
n[q]:q,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 q=p;q<n.length;q++)if(p=this.results?n[q]:q,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!=_$_cd07[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
|
+
_$_cd07[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,_$_cd07[137]))};k.execute=function(b){if(!R.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[_$_cd07[51]].call(this,p,!1,!1),q=this.getSelected();if(f=this.getStyle(q,!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,x=0;else x=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&&(x=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(_$_cd07[18]))){if((!c||1!=c.active)&&L.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==_$_cd07[55]||
|
|
184
|
+
this.options.columns[u].type==_$_cd07[14]||1==this.options.columns[u].shiftFormulas?O(A)?A=W.shiftFormula(A,x,C-p[1]):A==Number(A)&&(A=Number(A)+y):this.options.columns[u].type==_$_cd07[184]&&(A=new Date(A),A.setDate(A.getDate()+y),A=A.getFullYear()+_$_cd07[185]+jSuites.two(parseInt(A.getMonth()+1))+_$_cd07[185]+jSuites.two(A.getDate())+_$_cd07[131]+_$_cd07[186]));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&&x++}g++;y++}l.length&&(q[0].x<b&&(b=q[0].x),
|
|
185
|
+
q[0].y<a&&(a=q[0].y),q[q.length-1].x>d&&(d=q[q.length-1].x),q[q.length-1].y>e&&(e=q[q.length-1].y),this.setValue(l),this.resetBorders(_$_cd07[137],!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(_$_cd07[137],!0)};return k}(),Fa=function(){var k=function(b){b.getData=k[_$_cd07[51]];b.getJson=k[_$_cd07[51]];b.setData=k[_$_cd07[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[_$_cd07[51]];b.download=k.download;b.copy=k.copy;b.paste=k.paste;b.cut=function(){return b.copy(!0)}};k[_$_cd07[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==_$_cd07[13]?1:0);for(var l=0;l<h;l++){var m=null;var p=d?{}:[];for(var n=0;n<g;n++){var q;if(!(q=!e)){q=
|
|
187
|
+
b[1];var v=b[2],u=b[3];q=n>=b[0]&&n<=v&&l>=q&&l<=u?!0:!1}if(q&&(!e||!this.results||-1!=this.results.indexOf(l))){q=L.call(this,n,l);if(c){if(e&&!1===this.rows[l].visible)continue;m=ea.processed.call(this,n,l);void 0!==m&&(q=m)}a&&q.match&&(q.match(a)||q.match(/\n/)||q.match(/"/))&&(q=q.replace(new RegExp(_$_cd07[187],_$_cd07[188]),_$_cd07[189]),q=_$_cd07[187]+q+_$_cd07[187]);d?jSuites.path.call(p,_$_cd07[3]+Z.call(this,n),q):p.push(q);m=!0}}m&&(a?f.push(p.join(a)):f.push(p))}return a?f.join(_$_cd07[10])+
|
|
188
|
+
_$_cd07[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==_$_cd07[83])&&(typeof f[g].id==_$_cd07[14]&&(b=parseInt(f[g].id)),typeof f[g].row==_$_cd07[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!==_$_cd07[13]&&(this.dataType=1)};k[_$_cd07[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]=_$_cd07[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[_$_cd07[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=_$_cd07[3];this.options.data=b;k.build.call(this);H.call(this);Y.update.call(this)};k.refresh=function(b){if(typeof b!==_$_cd07[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=da[_$_cd07[51]].call(this,c,b);typeof d[0].updateCell==_$_cd07[84]&&d[0].updateCell(a,L.call(this,c,b),c,b,this,d[1]);a&&M.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:_$_cd07[58],dataType:_$_cd07[59],success:function(f){e.setData(f);jSuites.loading.hide()}})}};k.getRowData=function(b,c){if(typeof this.options.data[b]===_$_cd07[13])return!1;if(c){if(this.dataType){c={};
|
|
193
|
+
for(var a=0;a<this.options.columns.length;a++){var d=_$_cd07[3]+Z.call(this,a),e=_$_cd07[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]===_$_cd07[13]&&(c[e]=_$_cd07[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]===_$_cd07[13])return!1;for(var a=[],d=0;d<this.options.data.length;d++){var e=c?ea.processed.call(this,b,d,!0):L.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]===_$_cd07[13]&&(c[e]=_$_cd07[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],_$_cd07[127]);c.borders.copying.clear=
|
|
195
|
+
1==b?!0:!1},e=k[_$_cd07[51]].call(this,a,!0,_$_cd07[190]),f=F.call(this.parent,_$_cd07[191],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(_$_cd07[192]),d());return e};k.paste=function(b,c,a){if(!R.call(this.parent,this))return!1;var d=this,e=function(){d.borders.copying&&(d.resetBorders(_$_cd07[127],!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),q=jSuites.hash(k[_$_cd07[51]].call(this,p,!0,_$_cd07[190]));if(n!=q)e();else{var v=0,u=0;a=k[_$_cd07[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(q=p[0];q<=p[2];q++)f=E.getColumnNameFromCoords(q,n),m[u][v]=g&&g[f]?g[f]:_$_cd07[193],v++;u++}}}b=parseInt(b);
|
|
197
|
+
c=parseInt(c);if(a){Array.isArray(a)||(a=E.parseCSV(a,_$_cd07[190]));if(n=F.call(this.parent,_$_cd07[194],this,a,b,c,m))a=n;else if(!1===n)return!1;100<a.length&&!this.options.pagination&&!H.limited.call(this)&&console.log(_$_cd07[195]);if(f=this.getHighlighted()){v=[];u=[];var y=[];g=[];var x=0,C=0;for(n=f[1];n<=f[3];n++)if(!this.results||-1!=this.results.indexOf(n)){v=[];u=[];for(q=f[0];q<=f[2];q++)v.push(a[C][x]),m&&m[C]&&m[C][x]?u.push(m[C][x]):u.push(_$_cd07[3]),x++,x>=a[0].length&&(x=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(q=p[0];q<=p[2];q++)(!this.results||this.results&&0<=this.results.indexOf(n))&&f.push({x:q,y:n,value:_$_cd07[3],style:_$_cd07[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;x=y=c;C=null;this.results&&(g=this.results.indexOf(c));
|
|
199
|
+
for(n=0;n<a.length;n++)for(q=0;q<a[n].length;q++){null!==h&&null!==l&&a[n][q][0]==_$_cd07[12]&&(a[n][q]=W.shiftFormula(a[n][q],b-h,c-l));u=b+q;x=c+n;this.results&&(x=this.results[g+n]);var A={x:u,y:x,value:a[n][q]};m&&m[n]&&m[n][q]&&(A.style=m[n][q]);f.push(A);null===C&&za.isSelected.call(this,u,x,p)&&(C=!0)}C&&e();f.length&&(ea[_$_cd07[11]].call(this,f,null,this.parent.config.forceUpdateOnPaste?!0:!1),F.call(this.parent,_$_cd07[196],this,f),this.updateSelectionFromCoords(v,y,u,x))}};k.download=function(b,
|
|
200
|
+
c){if(this.parent.config.allowExport){void 0===c&&(c=!0);var a=_$_cd07[3];if(1==b||1==this.parent.config.includeHeadersOnDownload)a+=this.getHeaders().replace(/\s+/gm,_$_cd07[131])+_$_cd07[10];a+=k[_$_cd07[51]].call(this,null,c,this.options.csvDelimiter);c=new Blob([_$_cd07[198]+a],{type:_$_cd07[199]});window.navigator&&window.navigator.msSaveOrOpenBlob?window.navigator.msSaveOrOpenBlob(c,this.options.csvFileName+_$_cd07[200]):(b=document.createElement(_$_cd07[201]),c=URL.createObjectURL(c),b.href=
|
|
201
|
+
c,b.setAttribute(_$_cd07[202],this.options.csvFileName+_$_cd07[200]),document.body.appendChild(b),b.click(),b.parentNode.removeChild(b))}else console.error(_$_cd07[197])};k.standardize=function(b){b||(b=[]);Array.isArray(b)||(b=[b]);void 0==b[0]||Array.isArray(b[0])||typeof b[0]==_$_cd07[83]||(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[_$_cd07[51]];b.getLabelFromCoords=k[_$_cd07[51]]};k[_$_cd07[51]]=function(b,c,a){if(typeof b==_$_cd07[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[_$_cd07[51]];b.setDefinedNames=k[_$_cd07[11]]};k[_$_cd07[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]];K.call(this,_$_cd07[203],[b])}};k[_$_cd07[51]]=function(b){var c=
|
|
203
|
+
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[_$_cd07[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=W.updateWorksheetName(a[e[f]],b,c);g!==a[e[f]]&&
|
|
204
|
+
(d[e[f]]=g)}k[_$_cd07[11]].call(this,d)}}};return k}(),la=function(){var k=[_$_cd07[204],_$_cd07[205],_$_cd07[206],_$_cd07[207],_$_cd07[208]],b=[_$_cd07[185],_$_cd07[150],_$_cd07[209],_$_cd07[210],_$_cd07[211],_$_cd07[212],_$_cd07[1],_$_cd07[213],_$_cd07[25],_$_cd07[214],_$_cd07[12],_$_cd07[215],_$_cd07[216],_$_cd07[217]],c=[],a=function(){if(0<c.length){for(var f,g=0;g<c.length;g++)f=-1===c[g].indexOf(_$_cd07[134])?this:I(c[g].split(_$_cd07[134])[0]),ha.destroy.call(f,c[g]);c=[]}},d=function(f){a.call(this);
|
|
205
|
+
for(var g=0,h=[],l,m,p,n=0;n<f.children.length;n++)if(l=f.children[n].getAttribute(_$_cd07[218])){h[l]||(h[l]=k[g++],4<g&&(g=0));f.children[n].style.color=h[l];-1===l.indexOf(_$_cd07[134])?(m=this,p=l):(m=l.split(_$_cd07[134]),p=m[1],m=I(m[0]));if(0<=p.indexOf(_$_cd07[135])){var q=p.split(_$_cd07[135]);p=E.getCoordsFromColumnName(q[0]);q=E.getCoordsFromColumnName(q[1])}else q=p=E.getCoordsFromColumnName(p);za[_$_cd07[11]].call(m,p[0],p[1],q[0],q[1],null,l,h[l]);c.push(l)}},e=function(f,g){g&&typeof g!=
|
|
206
|
+
_$_cd07[84]||(g={type:_$_cd07[219],onchange:g});g.type===_$_cd07[219]?(f.classList.add(_$_cd07[220]),f.onclick=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(_$_cd07[221]),f.classList.add(_$_cd07[93]))}):f.classList.add(_$_cd07[93]);f.classList.add(_$_cd07[222]);f.classList.add(_$_cd07[223]);f.setAttribute(_$_cd07[224],!0);f.onblur=function(){f.worksheet&&(a.call(f.worksheet),
|
|
207
|
+
typeof f.onchange==_$_cd07[84]&&f.onchange.call(f),f.worksheet=null)};g.type!==_$_cd07[219]&&(f.onfocus=function(){t.current&&setTimeout(function(){f.worksheet=t.current;e.parse.call(t.current,f);var h=document.createTextNode(_$_cd07[3]);f.appendChild(h);jSuites.focus(f)})});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=_$_cd07[3],h=_$_cd07[3],l=window.getSelection(),m=document.createRange(),p=E.getCaretIndex.call(this.parent,
|
|
208
|
+
f),n=W.tokenize(f.innerText.replace(/(\r\n|\n|\r)/gm,_$_cd07[3])),q=0;q<n.length;q++)n[q]&&W.tokenIdentifier.test(n[q].trim())?(q==n.length-1&&(h=_$_cd07[225]),g+=_$_cd07[226]+h+_$_cd07[227]+n[q].trim().replace(/\$/g,_$_cd07[3])+_$_cd07[228]+n[q]+_$_cd07[229]):g+=n[q];f.innerHTML=g;g=null;for(q=0;q<f.childNodes.length&&!(g=f.childNodes[q],h=g.tagName?g.innerText.length:g.length,0>=p-h);q++)p-=h;g&&(g.tagName?m.setStart(g.firstChild,p):m.setStart(g,p),l.removeAllRanges(),l.addRange(m));d.call(this,
|
|
209
|
+
f)};e.close=function(f){a.call(this);f?f.classList.remove(_$_cd07[93]):e.current&&(typeof e.current.onchange==_$_cd07[84]&&e.current.onchange.call(e.current),e.current.classList.remove(_$_cd07[221]),e.current.classList.remove(_$_cd07[93]),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+_$_cd07[135]+h,m=W.getTokensFromRange.call(this,m),W.getRangeFromTokens.call(this,m)):f};
|
|
210
|
+
e.range=function(f,g,h,l,m){e.current.getAttribute(_$_cd07[230])==_$_cd07[231]&&(f=h,g=l);f=e.getName.call(this,f,g,h,l,m);g=document.createElement(_$_cd07[232]);g.innerText=f;g.setAttribute(_$_cd07[218],f);e.current.innerText=_$_cd07[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(_$_cd07[230])==_$_cd07[231]&&(f=h,g=l);var q=jSuites.getNode();if(q){var v=e.getName.call(this,f,g,h,l,m);this!==n&&(v=n.getWorksheetName()+
|
|
211
|
+
_$_cd07[134]+v);f=function(u){var y=document.createElement(_$_cd07[232]);y.innerText=v;y.setAttribute(_$_cd07[218],v);q.parentNode===p&&!1===u?q.parentNode.insertBefore(y,q.nextSibling):p.appendChild(y);q=y};if(q.getAttribute(_$_cd07[218]))m.ctrlKey?(p.appendChild(document.createTextNode(_$_cd07[25])),f(!0)):(q.innerText=v,q.setAttribute(_$_cd07[218],v));else{if(!q.innerText||q.innerText!==_$_cd07[3]&&-1==b.indexOf(q.innerText.slice(-1))||q.nextElementSibling&&q.nextElementSibling.getAttribute(_$_cd07[218]))return!1;
|
|
212
|
+
f(!1)}jSuites.focus(q);d.call(this,p);m.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,_$_cd07[3]),navigator.clipboard?navigator.clipboard.writeText(f):(this.parent.textarea.value=f,this.parent.textarea.select(),document.execCommand(_$_cd07[192]))}else if(36==f.which){var g=window.getSelection(),h=document.createRange();h.setStart(f.target,0);g.removeAllRanges();
|
|
213
|
+
g.addRange(h)}else 35==f.which?jSuites.focus(f.target):187==f.which?!f.target.innerText.replace(/(\r\n|\n|\r)/gm,_$_cd07[3])&&f.target.getAttribute(_$_cd07[95])&&f.target.removeAttribute(_$_cd07[95]):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(h){h=c(h);for(var l=[_$_cd07[185],_$_cd07[150],_$_cd07[209],_$_cd07[210],_$_cd07[211],_$_cd07[233]],m=[_$_cd07[212],_$_cd07[234],_$_cd07[1],_$_cd07[2],
|
|
214
|
+
_$_cd07[213],_$_cd07[235],_$_cd07[25],_$_cd07[214],_$_cd07[12],_$_cd07[215],_$_cd07[216],_$_cd07[217]],p=_$_cd07[3],n=[],q=0,v=0;v<h.length;v++){if(h[v]==_$_cd07[187]||h[v]==_$_cd07[132])q=0==q?1:0;0==q&&(-1<l.indexOf(h[v])||-1<m.indexOf(h[v]))?(p&&(n.push(p),p=_$_cd07[3]),n.push(h[v])):p+=h[v]}p&&n.push(p);for(v=0;v<n.length;v++)-1==n[v].indexOf(_$_cd07[187])&&-1==n[v].indexOf(_$_cd07[132])&&(n[v]=n[v].replace(/\s/g,_$_cd07[3]));return n},c=function(h,l){for(var m=_$_cd07[3],p=0,n=[_$_cd07[12],_$_cd07[134],
|
|
215
|
+
_$_cd07[216],_$_cd07[215]],q=0;q<h.length;q++)h[q]==_$_cd07[187]&&(p=0==p?1:0),1==p?m+=h[q]:(m+=h[q].toUpperCase(),1==l&&0<q&&h[q]==_$_cd07[12]&&-1==n.indexOf(h[q-1])&&-1==n.indexOf(h[q+1])&&(m+=_$_cd07[12]));return m},a=function(h){h.setFormula=a[_$_cd07[11]];h.executeFormula=a.execute;h.formula=[]};a.run=function(h,l){var m=_$_cd07[3],p=Object.keys(l);if(p.length){for(var n={},q=0;q<p.length;q++){var v=p[q].replace(/!/g,_$_cd07[27]);0<v.indexOf(_$_cd07[27])&&(v=v.split(_$_cd07[27]),n[v[0]]=!0)}v=
|
|
216
|
+
Object.keys(n);for(q=0;q<v.length;q++)m+=_$_cd07[236]+v[q]+_$_cd07[237];for(q=0;q<p.length;q++)v=p[q].replace(/!/g,_$_cd07[27]),jSuites.isNumeric(l[p[q]])||(n=l[p[q]].match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&n.length&&(l[p[q]]=e(n,l[p[q]])),m=0<v.indexOf(_$_cd07[27])?m+(v+_$_cd07[238]+l[p[q]]+_$_cd07[239]):m+(_$_cd07[236]+v+_$_cd07[238]+l[p[q]]+_$_cd07[239])}h=h.replace(/\$/g,_$_cd07[3]);(n=h.match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&
|
|
217
|
+
n.length&&(h=e(n,h));h=h.replace(/!/g,_$_cd07[27]);return(new Function(m+_$_cd07[240]+h))()};a[_$_cd07[11]]=function(){};var d=function(h){h=c(h,!0);return h.replace(/\$/g,_$_cd07[3])},e=function(h,l){for(var m=0;m<h.length;m++){var p=a.getTokensFromRange.call(this,h[m]);l=l.replace(h[m],_$_cd07[213]+p.join(_$_cd07[25])+_$_cd07[235])}return l},f=function(h,l,m){for(var p=this.config.definedNames,n=0;n<h.length;n++)h[n]&&p&&p[h[n]]&&(l=l.replace(h[n],p[h[n]]),m&&(m[h[n]]=p[h[n]]));return d(l)},g=function(h,
|
|
218
|
+
l){var m;if(m=this.records[l][h].a)for(var p=0;p<m.length;p++)for(var n=0;n<m[p].length;n++)m[p][n]&&(m[p][n].innerText=_$_cd07[3],this.records[l+p][h+n].v=_$_cd07[3]);this.records[l][h].a=[]};a.execute=function(h,l,m,p,n){if(1==this.parent.processing)return null!==l&&null!==m&&this.parent.queue.push([this,l,m]),_$_cd07[3];if(typeof this.parent.config.onbeforeformula==_$_cd07[84]){var q=F.call(this.parent,_$_cd07[241],this,h,l,m);if(!1===q)return h;q&&(h=q)}var v=[],u=function(N,S,P,r){if(void 0!=
|
|
219
|
+
S&&void 0!=P){var z=E.getColumnNameFromCoords(S,P);P=r.getWorksheetName()+_$_cd07[27]+z;v[P]||(v[P]=0);v[P]++;if(3<v[P])throw{error:_$_cd07[242],message:_$_cd07[243],reference:P};}else z=null;n||(N=d(N));var w=N,D=w.match(/[A-Z_]+[A-Z0-9_\.]*/g);D&&D.length&&(w=f.call(r.parent,D,w,y));(D=w.match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&D.length&&(w=e.call(r,D,w));D=[];w=b(w);for(var G=0;G<w.length;G++)w[G]&&k.test(w[G])&&D.push(w[G]);if(D){if(-1<D.indexOf(z))throw{error:_$_cd07[244],
|
|
220
|
+
message:_$_cd07[245]};for(w=0;w<D.length;w++){G=D[w].split(_$_cd07[134]);G[1]?(S=G[1],G=I(G[0]),P=r.getWorksheetName()+_$_cd07[27]+z):(S=G[0],G=r,P=z);if(typeof G==_$_cd07[13]||typeof G.formula==_$_cd07[13])throw{error:_$_cd07[246],message:_$_cd07[247]};P&&(G.formula[S]||(G.formula[S]=[]),0>G.formula[S].indexOf(P)&&G.formula[S].push(P));if(!y[D[w]]){P=E.getCoordsFromColumnName(S);S=P[0];P=P[1];var Q=void 0!==G.records[P][S].v?G.records[P][S].v:L.call(G,S,P);y[D[w]]||((_$_cd07[3]+Q).substr(0,1)==_$_cd07[12]?
|
|
221
|
+
y[D[w]]=u(Q,S,P,G):(Q?Q!=Number(Q)&&(Q=_$_cd07[187]+Q+_$_cd07[187]):Q=0,y[D[w]]=Q))}}}return N.substr(1)},y={};try{h=u(h,l,m,this);if(h==_$_cd07[3])return _$_cd07[3];0==h.indexOf(_$_cd07[248])&&(n=!0);var x=n?a.run(h,y):t.formula(h,y,l,m,this);if(!1!==p&&void 0!=l&&void 0!=m)if(x instanceof Date)this.records[m][l].v=jSuites.calendar.dateToNum(x);else if(Array.isArray(x)){g.call(this,l,m);p=[];q=null;for(var C=0;C<x.length;C++)for(var A=0;A<x[C].length;A++)null===q&&(0<C&&C>A&&this.options.data[m+
|
|
222
|
+
C][l+A]?q=_$_cd07[249]:(this.records[m+C][l+A].v=x[C][A],this.records[m+C][l+A].element&&(p[C]||(p[C]=[]),p[C][A]=this.records[m+C][l+A].element,this.records[m+C][l+A].element.innerText=x[C][A])));null===q?(q=x[0][0],this.records[m][l].a=p):g.call(this,l,m);x=this.records[m][l].v=q}else this.records[m][l].v=x;return x}catch(N){return 1==this.parent.config.debugFormulas&&console.log(h,y,N),N&&N.error?N.error:_$_cd07[246]}};a.update=function(h,l,m,p){var n=null,q=null,v=function(x){m&&m[x]&&(x=_$_cd07[250]);
|
|
223
|
+
l[x]&&(x=l[x]);return x};h=c(h,!0);h=b(h);for(var u=0;u<h.length;u++)if(h[u]&&k.test(h[u])){if(-1==h[u].indexOf(_$_cd07[134])){if(q=h[u],n=_$_cd07[3],p)continue}else if(q=h[u].split(_$_cd07[134]),n=q[0],q=q[1],p!=n)continue;if(0<=q.indexOf(_$_cd07[135])){q=a.getTokensFromRange.call(this,q);for(var y=0;y<q.length;y++)q[y]=v(q[y]);q=a.getRangeFromTokens.call(this,q)}else-1==q.indexOf(_$_cd07[251])?q=v(q):(q=v(q.replace(/\$/g,_$_cd07[3])),q=_$_cd07[251]+q.match(/[A-Z]+/g)+_$_cd07[251]+q.match(/[0-9]+/g));
|
|
224
|
+
n&&(q=n+_$_cd07[134]+q);h[u]=q}return h.join(_$_cd07[3])};a.getChain=function(h){if(void 0===h)return[];var l=[],m=[],p=[],n=function(u){if(0<=u.indexOf(_$_cd07[27])){var y=u.split(_$_cd07[27]),x=y[0],C=y[1];y=I(y[0])}else y=this,x=y.getWorksheetName(),C=u;if(y.formula[C]&&!p[u]){var A=!1;p[u]=!0;for(u=0;u<y.formula[C].length;u++){var N=y.formula[C][u];-1==N.indexOf(_$_cd07[27])&&(N=x+_$_cd07[27]+N);if(!m[N]){var S=y.getValue(N);O(S)?l.push([N,S,a.getTokens.call(y,S,x)]):(A=!0,y.formula[C][u]=null);
|
|
225
|
+
n.call(y,N);m[N]=!0}}1==A&&(y.formula[C]=y.formula[C].filter(function(P){return null!=P}))}},q=Object.keys(h);for(h=0;h<q.length;h++)n.call(this,q[h]);q=0;for(h=l.length-1;0<=h;h--){for(var v=0;v<h;v++)if(0<=l[v][2].indexOf(l[h][0])){l.splice(v,0,l.splice(h,1)[0]);h=l.length;break}q++;if(1E6<q){console.error(_$_cd07[252]);break}}m=[];for(h=0;h<l.length;h++)m[l[h][0]]=l[h][1];return m};a.updateAll=function(h,l){var m,p;Ia.updateAll.call(this,h,l);var n=Object.keys(this.formula);var q=[];var v=[];for(m=
|
|
226
|
+
0;m<n.length;m++){var u=n[m];var y=this.formula[u];if(l&&l[u])for(var x=0;x<y.length;x++)h[y[x]]&&(y[x]=h[y[x]]),v[y[x]]=!0;else{var C=[];for(x=0;x<y.length;x++)l&&l[y[x]]||(h[y[x]]&&(y[x]=h[y[x]]),v[y[x]]=!0,C.push(y[x]));C.length&&(h[u]&&(u=h[u]),q[u]=C)}}this.formula=q;C=this.getWorksheetName();for(var A=0;A<t.spreadsheet.length;A++)for(var N=t.spreadsheet[A].worksheets,S=0;S<N.length;S++)if(N[S].getWorksheetName()!==C)for(n=Object.keys(N[S].formula),m=0;m<n.length;m++){q=[];y=N[S].formula[n[m]];
|
|
227
|
+
for(x=0;x<y.length;x++)u=y[x].split(_$_cd07[27]),u[0]==C&&u[1]?l&&l[u[1]]||(h[u[1]]&&(u[1]=h[u[1]]),q.push(u[0]+_$_cd07[27]+u[1])):q.push(y[x]);N[S].formula[n[m]]=q}n=[];u=Object.keys(v);for(x=0;x<u.length;x++)0<=u[x].indexOf(_$_cd07[27])?(y=u[x].split(_$_cd07[27]),q=I(y[0]),m=y[1],C=this.getWorksheetName(),y=y[0]):(q=this,m=u[x],C=null,y=this.getWorksheetName()),(p=q.getValue(m))&&O(p)&&(q=a.update.call(q,p,h,l,C),q!=p&&(v[u[x]]=q,m=E.getCoordsFromColumnName(m),n[y]||(n[y]=[]),n[y].push({x:m[0],
|
|
228
|
+
y:m[1],value:q,force:!0})));u=Object.keys(n);for(h=0;h<u.length;h++)q=I(u[h]),n[u[h]]=ea.applyValues.call(q,n[u[h]]),ea.setValueChained.call(q,n[u[h]]),K.call(q,_$_cd07[107],{data:n[u[h]]})};a.updateWorksheetName=function(h,l,m){for(var p=b(h),n=0;n<p.length;n++)h=p[n].split(_$_cd07[134]),h[1]&&(h[0]=h[0].replace(new RegExp(_$_cd07[132],_$_cd07[188]),_$_cd07[3]),h[0].toUpperCase()==l.toUpperCase()&&(h[0]=m,0<=h[0].indexOf(_$_cd07[131])&&(h[0]=_$_cd07[132]+h[0]+_$_cd07[132]),p[n]=h.join(_$_cd07[134])));
|
|
229
|
+
return p.join(_$_cd07[3])};a.updateWorksheetNames=function(h,l){for(var m,p,n=0;n<t.spreadsheet.length;n++)for(var q=[],v=t.spreadsheet[n].worksheets,u=0;u<v.length;u++){for(var y=0;y<v[u].options.data.length;y++)for(var x=0;x<v[u].options.data[y].length;x++)(m=v[u].options.data[y][x])&&O(m)&&(p=a.updateWorksheetName(m,h,l),p!=m&&q.push({x,y,value:p,force:!0}));q.length&&(q=ea.applyValues.call(v[u],q),K.call(v[u],_$_cd07[107],{data:q}))}};a.shiftFormula=function(h,l,m){var p=b(h,!0);h=function(u){if(-1==
|
|
230
|
+
u.indexOf(_$_cd07[134])){u=E.getCoordsFromColumnName(u);var y=_$_cd07[3]}else y=p[n].split(_$_cd07[134]),u=E.getCoordsFromColumnName(y[1]),y=y[0]+_$_cd07[134];var x=u[0]+l;u=u[1]+m;return u=0>x||0>u?_$_cd07[250]:y+E.getColumnNameFromCoords(x,u)};for(var n=0;n<p.length;n++)if(k.test(p[n])&&-1==p[n].indexOf(_$_cd07[251])){var q=-1==p[n].indexOf(_$_cd07[134])?[_$_cd07[3],p[n]]:p[n].split(_$_cd07[134]);if(-1==q[1].indexOf(_$_cd07[135]))q[1]=h(q[1]);else{var v=q[1].split(_$_cd07[135]);q[1]=h(v[0])+_$_cd07[135]+
|
|
231
|
+
h(v[1])}p[n]=q[0]?q.join(_$_cd07[134]):q[1]}return p.join(_$_cd07[3])};a.getTokensFromRange=function(h){var l=this,m=_$_cd07[3],p=_$_cd07[3];0<=h.indexOf(_$_cd07[27])?p=_$_cd07[27]:0<=h.indexOf(_$_cd07[134])&&(p=_$_cd07[134]);h=h.replace(/\$/g,_$_cd07[3]);p&&(m=h.split(p),l=I(m[0]),h=m[1],m=m[0]+p);p=[];h=h.split(_$_cd07[135]);var n=E.getCoordsFromColumnName(h[0]),q=E.getCoordsFromColumnName(h[1]);if(n[0]<=q[0]){h=n[0];var v=q[0]}else h=q[0],v=n[0];if(null===n[1]&&null==q[1]){var u=0;n=0;l.options&&
|
|
232
|
+
l.options.data&&(n=l.options.data.length-1)}else n[1]<=q[1]?(u=n[1],n=q[1]):(u=q[1],n=n[1]);for(l=u;l<=n;l++)for(u=h;u<=v;u++)p.push(m+E.getColumnNameFromCoords(u,l));return p};a.getRangeFromTokens=function(h){h=h.filter(function(p){return p!=_$_cd07[250]});for(var l=_$_cd07[3],m=0;m<h.length;m++)0<=h[m].indexOf(_$_cd07[27])&&(l=h[m].split(_$_cd07[27]),h[m]=l[1],l=l[0]);l&&(l+=_$_cd07[27]);h.sort(function(p,n){p=E.getCoordsFromColumnName(p);n=E.getCoordsFromColumnName(n);return p[1]>n[1]?1:p[1]<n[1]?
|
|
233
|
+
-1:p[0]>n[0]?1:p[0]<n[0]?-1:0});return h.length?l+(h[0]+_$_cd07[135]+h[h.length-1]):_$_cd07[250]};a.getTokens=function(h,l){var m=d(h);h.replace(/!/g,_$_cd07[27]);(h=m.match(/[A-Z_]+[A-Z0-9_\.]*/g))&&h.length&&(m=f.call(this.parent,h,m));(h=m.match(/('.*?'?|\w*\.)?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&h.length&&(m=e.call(this,h,m));h=m.match(/('.*?'?|\w*\.)?(\$?[A-Z]+\$?[0-9]+)(:\$?[A-Z]+\$?[0-9]+)?/g);for(m=0;m<h.length;m++)-1==h[m].indexOf(_$_cd07[27])&&l&&(h[m]=l+_$_cd07[27]+h[m]);return h};
|
|
234
|
+
a.tokenIdentifier=k;a.tokenize=b;return a}(),ea=function(){var k=function(b){b.name=Z;b.value=L;b.getValue=k[_$_cd07[51]];b.getValueFromCoords=k.getFromCoords;b.setValue=k[_$_cd07[11]];b.setValueFromCoords=k.setFromCoords;b.setCheckRadioValue=k.setCheckRadio;b.getProcessed=k.processed};k[_$_cd07[51]]=function(b,c){var a=this;if(typeof b==_$_cd07[83]){var d=b.x;b=b.y}else 0<=b.indexOf(_$_cd07[27])&&(a=b.split(_$_cd07[27]),b=a[1],a=I(a[0])),b=E.getCoordsFromColumnName(b),d=b[0],b=b[1];return k.getFromCoords.call(a,
|
|
235
|
+
d,b,c)};k.getFromCoords=function(b,c,a){var d=null;null!=b&&null!=c&&(d=a?k.processed.call(this,b,c):L.call(this,b,c));return d};k[_$_cd07[11]]=function(b,c,a){if(!R.call(this.parent,this))return!1;var d=null,e=null,f=null,g=[];a=a?!0:!1;var h=function(p,n){var q=null;typeof p==_$_cd07[17]?(f=E.getCoordsFromColumnName(p),d=f[0],e=f[1]):p.tagName?(d=p.getAttribute(_$_cd07[42]),e=p.getAttribute(_$_cd07[43])):p.element&&p.element.tagName?(d=p.element.getAttribute(_$_cd07[42]),e=p.element.getAttribute(_$_cd07[43])):
|
|
236
|
+
(d=p.x,e=p.y,void 0!==p.value&&(n=p.value),void 0!==p.style&&(q=p.style));p={x:d,y:e,value:n,force:a};null!==q&&(p.style=q);g.push(p)};if(b&&Array.isArray(b))for(var l=0;l<b.length;l++)h(b[l],c);else if(typeof b==_$_cd07[83]&&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);Y.update.call(this,!0);this.refreshBorders();var m=this;setTimeout(function(){ha.refresh.call(m)},
|
|
237
|
+
250);if(g.length){V.call(this.parent,{worksheet:m,action:_$_cd07[77],records:g,selection:this.selectedCell});b=this.getPrimaryKey();if(!1!==b)for(l=0;l<g.length;l++)g[l].x===b&&g[l].value&&T.call(this,g[l]);K.call(this,_$_cd07[77],{data:g});F.call(this.parent,_$_cd07[253],this,g)}}};k.setFromCoords=function(b,c,a,d){var e=[];e.push({x:b,y:c,value:a});k[_$_cd07[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&&
|
|
238
|
+
this.options.columns[d].type==_$_cd07[254]){var f=L.call(this,d,e)?!1:!0;b.push({x:d,y:e,value:f})}}b.length&&k[_$_cd07[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]:_$_cd07[193]}e.push(a)}0<Object.keys(f).length&&Qa.update.call(this,f);return e};k.processed=
|
|
239
|
+
function(b,c,a){var d=L.call(this,b,c);if(null===d)return null;var e=da[_$_cd07[51]].call(this,b,c),f=e[1];f.type!=_$_cd07[49]&&f.type!=_$_cd07[255]&&f.type!=_$_cd07[256]&&f.type!=_$_cd07[257]&&f.type!=_$_cd07[258]&&0!=f.process&&(!0===a||f.type!=_$_cd07[259]&&f.type!=_$_cd07[260]&&f.type!=_$_cd07[261])&&(f.type==_$_cd07[254]?d=e[0][_$_cd07[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:((_$_cd07[3]+
|
|
240
|
+
d).substr(0,1)==_$_cd07[12]&&(d=this.executeFormula(d,b,c,!1)),e[0]&&typeof e[0][_$_cd07[51]]==_$_cd07[84]&&(d=e[0][_$_cd07[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(_$_cd07[27])?(c=g[e].split(_$_cd07[27]),d=c[1],c=I(c[0])):(d=g[e],c=this),d=E.getCoordsFromColumnName(d),b=M.update.call(c,d[0],d[1],a[g[e]],
|
|
241
|
+
!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]],f.push(b));F.call(this.parent,_$_cd07[262],this,f)};return k}(),M=function(){var k=function(b){b.getCell=k[_$_cd07[51]];b.getCellFromCoords=k[_$_cd07[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?
|
|
242
|
+
!0:!1};k[_$_cd07[51]]=function(b,c,a){typeof b==_$_cd07[17]&&(c=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=L.call(this,b,c);null===d&&(d=_$_cd07[3]);return M.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?
|
|
243
|
+
d.push(E.getColumnNameFromCoords(h,f)):d.push(this.records[f][h]);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?(T.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,
|
|
244
|
+
b[d].y,b[d].value,b[d].force));K.call(this,_$_cd07[106],[a])};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(_$_cd07[18])){var g=F.call(this.parent,_$_cd07[263],this,e,b,c,a);void 0!==g&&(a=g);d=da[_$_cd07[51]].call(this,b,c);typeof d[0].updateCell==_$_cd07[84]&&(g=d[0].updateCell(e,a,b,c,this,d[1]),void 0!==g&&(a=g));g=L.call(this,b,c);if(g!==a){var h=L.call(this,b,c,a);f.oldValue=g;f.value=h;e&&k.applyOverflow.call(this,
|
|
245
|
+
e,b,c);d[1]&&typeof d[1].render==_$_cd07[84]&&d[1].render(e,a,b,c,this,d[1]);F.call(this.parent,_$_cd07[264],this,e,b,c,f.value,f.oldValue)}}}else return!1;return f};k.create=function(b,c,a,d){var e=document.createElement(_$_cd07[146]);e.setAttribute(_$_cd07[42],b);e.setAttribute(_$_cd07[43],c);var f=da[_$_cd07[51]].call(this,b,c);f[0]&&typeof f[0].createCell==_$_cd07[84]&&(f=f[0].createCell(e,a,b,c,this,f[1]),void 0!==f&&(a=f));L.call(this,b,c,a);this.records[c][b]||na.cell.call(this,b,c,a);this.records[c][b].element=
|
|
246
|
+
e;!a&&this.records[c][b].v&&(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,_$_cd07[265],this,e,b,c,a);return e};k.getAttributes=function(b,c,a){a[b]||(a[b]={});b==_$_cd07[266]?a[b][c]=this.getValue(c):b==_$_cd07[267]?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);
|
|
247
|
+
b&&b.comments&&this.setComments(b.comments);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(_$_cd07[99]))?l+(_$_cd07[217]+f[e]):f[e];b.setAttribute(_$_cd07[99],
|
|
248
|
+
l)}this.options.columns[c]&&this.options.columns[c].wrap&&b.classList.add(_$_cd07[268]);d&&d[e]&&b.setAttribute(_$_cd07[269],d[e]);g&&g[e]&&(1==g[e].readOnly&&b.classList.add(_$_cd07[18]),!1===g[e].locked&&!0===this.options.selectUnLockedCells&&b.classList.add(_$_cd07[270]),1==g[e].wrap&&b.classList.add(_$_cd07[268]));h&&h[a]&&1==h[a].readOnly&&b.classList.add(_$_cd07[18])}d=this.options.columns[c];!b.style.textAlign&&(l=d.align?d.align:this.options.defaultColAlign)&&(b.style.textAlign=l);!1===this.records[a][c].readonly||
|
|
249
|
+
1!=this.records[a][c].readonly&&1!=d.readOnly&&1!=d.readonly||b.classList.add(_$_cd07[18])};k.applyOverflow=function(b,c,a){1==this.options.textOverflow&&0<c&&(c==this.options.columns.length-1&&(b.style.overflow=_$_cd07[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?_$_cd07[3]:_$_cd07[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<=
|
|
250
|
+
d[e].indexOf(_$_cd07[27])){var f=d[e].split(_$_cd07[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]),K.call(g,_$_cd07[107],a[d[e]])};return k}(),Ha=function(){var k=function(b){b.getColumnOptions=k[_$_cd07[51]];b.setColumnOptions=k[_$_cd07[11]];b.getCells=k.getCells;b.setCells=k.setCells;b.getProperties=
|
|
251
|
+
k[_$_cd07[51]];b.setProperties=k[_$_cd07[11]];b.getProperty=k[_$_cd07[51]];b.setProperty=k[_$_cd07[11]];b.resetProperty=k[_$_cd07[11]];b.getOptions=k[_$_cd07[51]]};k.getCells=function(b){return b?this.options.cells[b]:this.options.cells};k.setCells=function(b,c){if(!R.call(this.parent,this))return!1;if(typeof b==_$_cd07[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[_$_cd07[51]]=function(b,c){var a=null;void 0!==c&&(c=E.getColumnNameFromCoords(b,
|
|
252
|
+
c),this.options.cells&&this.options.cells[c]&&(a=this.options.cells[c]));null===a&&(a=this.options.columns[b]);if(!a)a={type:_$_cd07[55]};else if(!a.type||typeof a.type==_$_cd07[17]&&!t.editors[a.type])a.type=_$_cd07[55];return a};k[_$_cd07[11]]=function(b,c,a){if(!R.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==_$_cd07[83]&&(b.value=a),d.push(b)):typeof c===_$_cd07[83]&&
|
|
253
|
+
(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[_$_cd07[51]].call(this,b,c),g=e.value,h=t.editors[f.type],l=null;g&&g.type&&(l=t.editors[g.type]);if(typeof c===_$_cd07[13]){e.oldValue=f;if(h&&typeof h.destroyCell==_$_cd07[84])for(c=0;c<this.records.length;c++)this.records[c][b].element&&h.destroyCell(this.records[c][b].element,b,c);parseInt(g.width)||(g.width=this.options.defaultColWidth||100);g.type&&t.editors[g.type]||(g.type=_$_cd07[55]);this.options.columns[b]=
|
|
254
|
+
g;g.width&&this.colgroup[b]&&this.colgroup[b].setAttribute(_$_cd07[151],parseInt(g.width));typeof g.title!==_$_cd07[13]&&this.headers[b]&&(g.title?(this.headers[b].innerText=g.title,this.headers[b].setAttribute(_$_cd07[165],g.title)):(this.headers[b].innerText=E.getColumnName(b),this.headers[b].removeAttribute(_$_cd07[165])));g.tooltip&&this.headers[b]&&(this.headers[b].title=g.tooltip);if(l&&typeof l.createCell==_$_cd07[84])for(c=0;c<this.records.length;c++)this.records[c]&&this.records[c][b]&&(M.applyProperties.call(this,
|
|
255
|
+
this.records[c][b].element,b,c),l.createCell(this.records[c][b].element,L.call(this,b,c),b,c,this,g))}else f=E.getColumnNameFromCoords(b,c),e.oldValue=this.options.cells&&this.options.cells[f]?this.options.cells[f]:_$_cd07[3],h&&typeof h.destroyCell==_$_cd07[84]&&this.records[c][b].element&&h.destroyCell(this.records[c][b].element,b,c,this),g?(this.options.cells||(this.options.cells={}),this.options.cells[f]=g):(delete this.options.cells[f],g=k[_$_cd07[51]].call(this,b,c),l=t.editors[g.type]),l&&
|
|
256
|
+
typeof l.createCell==_$_cd07[84]&&this.records[c]&&this.records[c][b]&&(h=this.records[c][b].element,e=L.call(this,b,c),M.applyProperties.call(this,h,b,c,this),g=l.createCell(h,e,b,c,this,g),void 0!==g&&L.call(this,b,c,g))}else return console.error(_$_cd07[252]),!1;this.refreshBorders();V.call(this.parent,{worksheet:this,action:_$_cd07[78],records:d});K.call(this,_$_cd07[78],{data:d});return!0};return k}(),Aa=function(){var k=function(c,a){Array.isArray(a)||(a=[a]);for(var d,e=c?_$_cd07[3]:_$_cd07[40],
|
|
257
|
+
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();H.refresh.call(this)},b=function(c){c.getRow=b[_$_cd07[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[_$_cd07[51]]=function(c){return this.rows[c]};b.attached=function(c){return this.rows[c]&&this.rows[c].element&&this.rows[c].element.parentNode?!0:!1};b.selected=function(c){var a=
|
|
258
|
+
[],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(_$_cd07[144]);d.setAttribute(_$_cd07[43],c);this.rows[c].element=d;var e=null;this.options.rows[c]&&!a&&(this.options.rows[c].style&&d.setAttribute(_$_cd07[99],this.options.rows[c].style),this.options.rows[c].height&&(d.style.height=parseInt(this.options.rows[c].height)+
|
|
259
|
+
_$_cd07[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,_$_cd07[271],this,c,d);0==this.rows[c].visible&&(d.style.display=_$_cd07[40]);e||(e=parseInt(c+1));a=document.createElement(_$_cd07[146]);a.innerHTML=e;a.setAttribute(_$_cd07[43],c);a.className=_$_cd07[272];d.appendChild(a);return d};b.move=function(c,a){if(!R.call(this.parent,this))return!1;
|
|
260
|
+
c=parseInt(c);a=parseInt(a);if(!this.rows[a]||!this.rows[c])return console.error(_$_cd07[273]),!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=H.renderRow.call(this,c),c>a?this.tbody.insertBefore(d,this.rows[a].element):this.tbody.insertBefore(d,this.rows[a].element.nextSibling)):
|
|
261
|
+
this.rows[c].element&&(this.tbody.removeChild(this.rows[c].element),H.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);K.call(this,_$_cd07[66],{f:c,t:a});Y.references.call(this);Y.update.call(this);V.call(this.parent,{worksheet:this,action:_$_cd07[66],oldValue:c,
|
|
262
|
+
newValue:a});F.call(this.parent,_$_cd07[274],this,c,a)};b.add=function(c,a,d,e){if(!R.call(this.parent,this))return!1;if(!this.options.allowInsertRow)return console.error(_$_cd07[275]),!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,_$_cd07[276],this,a,g,d))return console.log(_$_cd07[277]),
|
|
263
|
+
!1;this.resetBorders();var l=d?a:a+1,m=0;c=[];for(var p=[],n=this.rows.splice(l),q=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 x=this.dataType?{}:[];for(var C=0;C<this.options.columns.length;C++){var A=Z.call(this,C);x[A]=_$_cd07[3];e&&e[m]&&e[m].data&&(typeof e[m].data[A]!==_$_cd07[13]?x[A]=e[m].data[A]:typeof e[m].data[C]!==_$_cd07[13]&&(x[A]=e[m].data[C]));f.push({x:C,y:u,value:x[A],
|
|
264
|
+
force:!0})}p.push({id:y,data:x});m++}this.rows=this.rows.concat(n);this.records=this.records.concat(v);Array.prototype.push.apply(this.options.data,q);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&&(this.rows[u].results=!0),1==e&&(h=
|
|
265
|
+
n[0]?n[0].element:null,A=H.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):H.limited.call(this)&&(H.isVisible.call(this,A.children[1])||(e=!1))),c.push(this.records[u]);this.merged.rows[l]&&ba.updateConfig.call(this,1,1,l-1,g);K.call(this,_$_cd07[62],{numOfRows:g,rowNumber:a,insertBefore:d?1:0,data:p});l=this.tbody.firstChild.getAttribute(_$_cd07[43]);
|
|
266
|
+
this.results&&(l=this.results.indexOf(parseInt(l)),this.results=va.refresh.call(this));Y.references.call(this);f.length&&ea.applyValues.call(this,f);0<this.options.pagination?ua[_$_cd07[11]].call(this,this.pageNumber):(this.results&&(l=this.results[l]),this.tbody.textContent=_$_cd07[3],H[_$_cd07[46]].call(this,l));Y.update.call(this);U.call(this);ha.refresh.call(this);V.call(this.parent,{worksheet:this,action:_$_cd07[62],rowNumber:a,numOfRows:g,insertBefore:d,data:p});F.call(this.parent,_$_cd07[278],
|
|
267
|
+
this,a,g,c,d)};b.del=function(c,a){if(!R.call(this.parent,this))return!1;if(!this.options.allowDeleteRow)return console.error(_$_cd07[279]),!1;var d=null,e={},f=[],g=0;void 0==c&&(a=this.getSelectedRows(),a[0]?(c=parseInt(a[0].getAttribute(_$_cd07[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()));
|
|
268
|
+
if(!1===F.call(this.parent,_$_cd07[280],this,c,a))return console.log(_$_cd07[281]),!1;if(-1<parseInt(c)&&0<parseInt(a)){h=parseInt(this.thead.lastChild.children[1].getAttribute(_$_cd07[42]));var l=parseInt(this.tbody.firstChild.getAttribute(_$_cd07[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),M.getAttributes.call(this,_$_cd07[282],d,e),M.getAttributes.call(this,_$_cd07[99],d,e),M.getAttributes.call(this,_$_cd07[283],
|
|
269
|
+
d,e),M.getAttributes.call(this,_$_cd07[284],d,e),M.getAttributes.call(this,_$_cd07[267],d,e),M.getAttributes.call(this,_$_cd07[266],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,
|
|
270
|
+
a);ba.updateConfig.call(this,1,0,c,a);K.call(this,_$_cd07[63],{rowNumber:c,numOfRows:a,data:d});Y.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)}}):H.limited.call(this)&&0<g&&(this.tbody.textContent=_$_cd07[3],H.call(this),H[_$_cd07[46]].call(this,l,h));Y.update.call(this,!0);V.call(this.parent,{worksheet:this,action:_$_cd07[63],
|
|
271
|
+
rowNumber:c,numOfRows:a,insertBefore:1,data:d,attributes:e});F.call(this.parent,_$_cd07[285],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]],e=this.options.columns[d])this.colgroup[d]&&(this.colgroup[d].style.width=c?parseInt(e.width||this.options.defaultColWidth)+_$_cd07[44]:_$_cd07[143]),e.visible=c;H.refresh.call(this);0<this.options.freezeColumns&&ka[_$_cd07[11]].call(this,this.options.freezeColumns);
|
|
272
|
+
this.resetBorders()},b=function(c){c.getColumn=b[_$_cd07[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,!0);c.hideColumn=k.bind(c,!1)};b[_$_cd07[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==
|
|
273
|
+
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(!R.call(this.parent,this))return!1;c=parseInt(c);a=parseInt(a);if(!this.options.columns[c])return console.error(_$_cd07[286]),!1;if(!this.options.columns[a])return console.error(_$_cd07[287]),!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-
|
|
274
|
+
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]||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=
|
|
275
|
+
this.tbody.children[f].getAttribute(_$_cd07[43]);e=(c>a?this.records[g][a].element:this.records[g][a].element.nextSibling)||null;this.tbody.children[f].insertBefore(M[_$_cd07[51]].call(this,c,g),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]);
|
|
276
|
+
this.colgroupContainer.removeChild(this.colgroup[c]);for(f=0;f<this.tbody.children.length;f++)g=parseInt(this.tbody.children[f].getAttribute(_$_cd07[43])),this.tbody.children[f].removeChild(this.records[g][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(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,
|
|
277
|
+
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=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]);K.call(this,_$_cd07[67],{f:c,t:a});Y.references.call(this);Y.update.call(this);0<
|
|
278
|
+
d&&(c<=d||d<=d)&&ka[_$_cd07[11]].call(this,d);V.call(this.parent,{worksheet:this,action:_$_cd07[67],oldValue:c,newValue:a});F.call(this.parent,_$_cd07[288],this,c,a)};b.add=function(c,a,d,e,f,g){if(!R.call(this.parent,this))return!1;if(!this.options.allowInsertColumn)return console.error(_$_cd07[289]),!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;
|
|
279
|
+
if(void 0==a||a>c||0>a)a=c,d=!1;l||(l=1);if(!1===F.call(this.parent,_$_cd07[290],this,a,l,d))return console.log(_$_cd07[291]),!1;ha.reset.call(this);if(1==this.dataType)var p=parseInt((_$_cd07[3]+Date.now()).substr(-8));e||(e=[]);for(m=0;m<l;m++)e[m]||(e[m]={type:_$_cd07[55],source:[],options:[],width:this.options.defaultColWidth}),1==this.dataType&&typeof e[m].name==_$_cd07[13]&&(e[m].name=_$_cd07[292]+(p+m));var n=d?a:a+1;this.options.columns=E.injectArray(this.options.columns,n,e);p=function(x,
|
|
280
|
+
C){for(var A=n;A<l+n;A++)Ca.create.call(this,A),x?(this.headerContainer.insertBefore(this.headers[A],x),this.colgroupContainer.insertBefore(this.colgroup[A],C)):(this.headerContainer.appendChild(this.headers[A]),this.colgroupContainer.appendChild(this.colgroup[A]))};m=function(x,C){if(C)for(var A=n;A<l+n;A++)this.rows[x].element.insertBefore(M[_$_cd07[51]].call(this,A,x,!0),C);else for(A=n;A<l+n;A++)this.rows[x].element.appendChild(M[_$_cd07[51]].call(this,A,x,!0))};var q=this.headers.splice(n),v=
|
|
281
|
+
this.colgroup.splice(n);q[0]?0<=Array.prototype.indexOf.call(this.headerContainer.children,q[0])&&p.call(this,q[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(q);this.colgroup=this.colgroup.concat(v);aa.adjust.call(this,n,l,1);pa.adjust.call(this,a,l,1,g);g=0;v=q=p=null;for(var u=0;u<this.options.data.length;u++){this.dataType||(q=this.options.data[u].splice(n));v=this.records[u].splice(n);g=0;
|
|
282
|
+
for(var y=n;y<l+n;y++)p=f[u]&&f[u][g]?f[u][g]:_$_cd07[3],L.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,this.records[u][c].element)&&m.call(this,u));this.dataType||(this.options.data[u]=this.options.data[u].concat(q));this.records[u]=
|
|
283
|
+
this.records[u].concat(v)}this.merged.cols[n]&&ba.updateConfig.call(this,0,1,n-1,l);K.call(this,_$_cd07[64],{numOfColumns:l,columnNumber:a,insertBefore:d?1:0,properties:e,data:f});Y.references.call(this);h.length&&ea.applyValues.call(this,h);Y.update.call(this);this.refreshBorders();V.call(this.parent,{worksheet:this,action:_$_cd07[64],columnNumber:a,numOfColumns:l,insertBefore:d,properties:e,data:f});F.call(this.parent,_$_cd07[293],this,a,l,[],d)};b.del=function(c,a){if(!R.call(this.parent,this))return!1;
|
|
284
|
+
if(!this.options.allowDeleteColumn)return console.error(_$_cd07[294]),!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-c,a>=this.options.columns.length&&(a--,console.error(_$_cd07[295])));if(!1===F.call(this.parent,_$_cd07[296],
|
|
285
|
+
this,c,a))return console.log(_$_cd07[297]),!1;if(-1<parseInt(c)&&0<parseInt(a)){g=parseInt(this.thead.lastChild.children[1].getAttribute(_$_cd07[42]));var h=0;this.tbody.firstChild&&(h=parseInt(this.tbody.firstChild.getAttribute(_$_cd07[43])));this.resetBorders();var l=null,m=[],p=[],n=[];var q=0;for(var v=c;v<c+a;v++)0<=Array.prototype.indexOf.call(this.headerContainer.children,this.headers[v])&&(this.colgroup[v].parentNode.removeChild(this.colgroup[v]),this.headers[v].parentNode.removeChild(this.headers[v]),
|
|
286
|
+
f++),n[q]=this.options.columns[v],q++;for(var u=0;u<this.options.data.length;u++)for(v=c;v<c+a;v++)q=E.getColumnNameFromCoords(v,u),M.getAttributes.call(this,_$_cd07[282],q,d),M.getAttributes.call(this,_$_cd07[99],q,d),M.getAttributes.call(this,_$_cd07[283],q,d),M.getAttributes.call(this,_$_cd07[284],q,d),M.getAttributes.call(this,_$_cd07[267],q,d),M.getAttributes.call(this,_$_cd07[266],q,d),e[q]=!0,this.records[u][v].element&&0<=Array.prototype.indexOf.call(this.rows[u].element.children,this.records[u][v].element)&&
|
|
287
|
+
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=pa.adjust.call(this,c,a,0))&&(l={nested:v});ba.updateConfig.call(this,0,0,c,a);K.call(this,_$_cd07[65],{columnNumber:c,numOfColumns:a});
|
|
288
|
+
Y.references.call(this,e);H.limited.call(this)&&0<f&&(this.tbody.textContent=_$_cd07[3],H.call(this),H[_$_cd07[46]].call(this,h,g));Y.update.call(this,!0);V.call(this.parent,{worksheet:this,action:_$_cd07[65],columnNumber:c,numOfColumns:a,insertBefore:1,data:p,properties:n,attributes:d,extra:l});F.call(this.parent,_$_cd07[298],this,c,a,m,n,d)}}};return b}(),Qa=function(){var k={},b={},c=function(d){if(typeof d==_$_cd07[17]){var e=d;d=E.getCoordsFromColumnName(d);var f=d[0];d=d[1]}else f=d.x,d=d.y,
|
|
289
|
+
e=E.getColumnNameFromCoords(f,d);this.records[d]&&this.records[d][f]&&this.records[d][f].element&&(b[e]=this.options.style[e],this.records[d][f].element.setAttribute(_$_cd07[99],_$_cd07[3]));this.options.style&&this.options.style[e]&&delete this.options.style[e]},a=function(d){d.getStyle=a[_$_cd07[51]];d.setStyle=a[_$_cd07[11]];d.resetStyle=a.reset};a[_$_cd07[51]]=function(d){var e=this.options.style;if(!e)return!1;if(d){if(typeof d==_$_cd07[17])return e[d];var f=[],g=Object.keys(d);if(0<g.length)for(var h=
|
|
290
|
+
0;h<g.length;h++){if(typeof d[h]==_$_cd07[17])var l=e&&e[d[h]]?e[d[h]]:_$_cd07[3];else l=E.getColumnNameFromCoords(d[h].x,d[h].y),l=e&&e[l]?e[l]:_$_cd07[3];f.push(l)}return f}return this.options.style};a[_$_cd07[11]]=function(d,e,f,g){if(!R.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,x){if(!n[u]&&(h[u]?m=h[u].split(_$_cd07[217]):(h[u]=_$_cd07[3],m=[]),n[u]={},m.length))for(var C=0;C<m.length;C++)m[C]&&m[C].trim()&&
|
|
291
|
+
(l=m[C].split(_$_cd07[135]),n[u][l[0].trim()]=l[1].trim());b[u]||(b[u]=[]);k[u]||(k[u]=[]);n[u][y]||(n[u][y]=_$_cd07[3]);b[u].push([y+_$_cd07[135]+n[u][y]]);n[u][y]=n[u][y]&&n[u][y]==x&&!g?_$_cd07[3]:x;k[u].push([y+_$_cd07[135]+n[u][y]]);x=E.getCoordsFromColumnName(u);this.records[x[1]]&&this.records[x[1]][x[0]]&&this.records[x[1]][x[0]].element&&(this.records[x[1]][x[0]].element.style[y]=n[u][y]);n[u][y]||delete n[u][y]};k={};b={};if(e)if(typeof d==_$_cd07[17])p.call(this,d,e,f);else{if(d&&d.length)for(var q=
|
|
292
|
+
0;q<d.length;q++){var v=E.getColumnNameFromCoords(d[q].x,d[q].y);p.call(this,v,e,f)}}else for(f=Object.keys(d),q=0;q<f.length;q++)if(v=d[f[q]])for(typeof v==_$_cd07[17]&&(v=v.split(_$_cd07[217])),e=0;e<v.length;e++)v[e]&&(typeof v[e]==_$_cd07[17]&&(v[e]=v[e].split(_$_cd07[135])),v[e][0].trim()&&p.call(this,f[q],v[e][0].trim(),v[e][1].trim()));m={};p=Object.keys(n);if(p.length){for(q=0;q<p.length;q++){m[p[q]]||(m[p[q]]=[]);d=Object.keys(n[p[q]]);for(e=0;e<d.length;e++)m[p[q]].push(d[e]+_$_cd07[114]+
|
|
293
|
+
n[p[q]][d[e]]);this.options.style[p[q]]=m[p[q]].join(_$_cd07[299])}p=Object.keys(k);for(q=0;q<p.length;q++)k[p[q]]=k[p[q]].join(_$_cd07[217]);p=Object.keys(b);for(q=0;q<p.length;q++)b[p[q]]=b[p[q]].join(_$_cd07[217]);this.refreshBorders();V.call(this.parent,{worksheet:this,action:_$_cd07[70],oldValue:b,newValue:k});K.call(this,_$_cd07[70],[k]);F.call(this.parent,_$_cd07[300],this,k,b)}};a.reset=function(d){if(!R.call(this.parent,this))return!1;if(d){b={};if(Array.isArray(d))for(var e=0;e<d.length;e++)c.call(this,
|
|
294
|
+
d[e]);else c.call(this,d);this.refreshBorders();V.call(this.parent,{worksheet:this,action:_$_cd07[71],cells:d,oldValue:b});K.call(this,_$_cd07[71],[d]);F.call(this.parent,_$_cd07[302],this,d)}else console.error(_$_cd07[301])};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]]||_$_cd07[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&&
|
|
295
|
+
(this.records[l][h].element.setAttribute(_$_cd07[99],d[f[g]]),!this.records[l][h].element.style.textAlign&&(e=this.options.columns[h].align?this.options.columns[h].align:this.options.defaultColAlign))&&(this.records[l][h].element.style.textAlign=e)}K.call(this,_$_cd07[71],[f]);K.call(this,_$_cd07[70],[k]);F.call(this.parent,_$_cd07[300],this,k,b)};return a}(),Ya=function(){var k=function(b){b.getComments=k[_$_cd07[51]];b.setComments=k[_$_cd07[11]]};k[_$_cd07[51]]=function(b){return b&&typeof b==_$_cd07[17]?
|
|
296
|
+
this.options.comments&&this.options.comments[b]?this.options.comments[b]:!1:this.options.comments};k[_$_cd07[11]]=function(b,c){if(!R.call(this.parent,this))return!1;if(typeof b==_$_cd07[17]){var a={};a[b]=c}else a=b;if(c=F.call(this.parent,_$_cd07[303],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]]||
|
|
297
|
+
_$_cd07[3],(c=a[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(_$_cd07[269],c):this.records[f[1]][f[0]].element.removeAttribute(_$_cd07[269])))}V.call(this.parent,{worksheet:this,action:_$_cd07[75],newValue:a,oldValue:b});K.call(this,_$_cd07[75],[a]);F.call(this.parent,_$_cd07[304],this,a,b)}};return k}(),Za=function(){var k=function(b){b.getMeta=k[_$_cd07[51]];b.setMeta=k[_$_cd07[11]];b.resetMeta=
|
|
298
|
+
k.reset};k[_$_cd07[51]]=function(b,c){if(b){if(this.options.meta[b])return c?this.options.meta[b][c]:this.options.meta[b]}else return this.options.meta};k[_$_cd07[11]]=function(b,c,a){if(!R.call(this.parent,this))return!1;this.options.meta||(this.options.meta={});if(typeof b==_$_cd07[17]&&c){a||(a=_$_cd07[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]]),
|
|
299
|
+
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&&(K.call(this,_$_cd07[305],[a]),F.call(this.parent,_$_cd07[306],this,a))}};k.reset=function(){this.options.meta={};K.call(this,_$_cd07[307],{});F.call(this.parent,_$_cd07[308],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===_$_cd07[3]&&d!==_$_cd07[3]?1:a!==_$_cd07[3]&&d===_$_cd07[3]?-1:a>
|
|
300
|
+
d?-1:a<d?1:0:a===_$_cd07[3]&&d!==_$_cd07[3]?1:a!==_$_cd07[3]&&d===_$_cd07[3]?-1:a>d?1:a<d?-1:0}};k.execute=function(b,c,a){if(0<=b){c=null==c?this.headers[b].classList.contains(_$_cd07[309])?1:0:c?1:0;for(var d,e,f=[],g=0;g<this.options.data.length;g++)d=Ha[_$_cd07[51]].call(this,b,g),e=this.records[g][b].v,e=d.type==_$_cd07[255]||d.type==_$_cd07[260]||d.type==_$_cd07[261]||d.type==_$_cd07[310]||d.type==_$_cd07[14]||d.type==_$_cd07[311]?Number(e):jSuites.isNumeric(e)?Number(e):e.toLowerCase(),f[g]=
|
|
301
|
+
[g,e];g=typeof this.parent.config.sorting===_$_cd07[84]?this.parent.config.sorting(c,b):k.handler(c,b);f.sort(g);d=a?!0:!1;if(!a)for(a=[],g=0;g<f.length;g++)a[g]=f[g][0];if(g=F.call(this.parent,_$_cd07[312],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(_$_cd07[313])))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]]=
|
|
302
|
+
g;Ea.call(this,!1);ha.reset.call(this);K.call(this,_$_cd07[76],{column:b,direction:c,order:a});k.update.call(this,a);k.arrow.call(this,b,c);ha.refresh.call(this);V.call(this.parent,{worksheet:this,action:_$_cd07[76],column:b,newValue:a,oldValue:f,direction:c});F.call(this.parent,_$_cd07[314],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=
|
|
303
|
+
c;c=[];for(a=0;a<b.length;a++)c[a]=this.rows[b[a]];this.rows=c;Y.references.call(this);this.searchInput&&this.searchInput.value?ra.update.call(this,null):ca.update.call(this)};k.arrow=function(b,c){for(var a=0;a<this.headers.length;a++)this.headers[a].classList.remove(_$_cd07[315]),this.headers[a].classList.remove(_$_cd07[309]);c?this.headers[b].classList.add(_$_cd07[315]):this.headers[b].classList.add(_$_cd07[309])};return k}(),ua=function(){var k=function(b){b.whichPage=k.whichPage;b.quantityOfPages=
|
|
304
|
+
k.quantityOfPages;b.page=k[_$_cd07[11]];b.updatePagination=k.update};k.build=function(){this.pageNumber=0;var b=document.createElement(_$_cd07[20]),c=document.createElement(_$_cd07[20]);this.pagination=document.createElement(_$_cd07[20]);this.pagination.classList.add(_$_cd07[316]);this.pagination.appendChild(b);this.pagination.appendChild(c);this.options.pagination||(this.pagination.style.display=_$_cd07[40]);this.element.appendChild(this.pagination)};k.pageUp=function(){0<this.pageNumber&&(this.pageNumber--,
|
|
305
|
+
k[_$_cd07[11]].call(this,this.pageNumber))};k.pageDown=function(){this.pageNumber<k.quantityOfPages.call(this)-1&&(this.pageNumber++,k[_$_cd07[11]].call(this,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(_$_cd07[317]);return!1};k.quantityOfPages=function(){if(0<this.options.pagination)return Math.ceil((this.results?this.results.length:
|
|
306
|
+
this.rows.length)/parseInt(this.options.pagination));console.log(_$_cd07[317]);return!1};k[_$_cd07[11]]=function(b,c){var a=this.pageNumber,d=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,_$_cd07[319],this,b,a,d))return!1;this.pageNumber=b;H.resetY.call(this);aa.refresh.call(this);typeof c==_$_cd07[84]&&c.call(this);F.call(this.parent,_$_cd07[320],this,b,a,d)}else console.error(_$_cd07[318])};k.update=
|
|
307
|
+
function(){this.pagination.children[0].innerHTML=_$_cd07[3];this.pagination.children[1].innerHTML=_$_cd07[3];if(this.options.pagination){var b=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(_$_cd07[20]);d.className=_$_cd07[322];d.innerHTML=_$_cd07[215];d.title=1;this.pagination.children[1].appendChild(d)}for(;c<=
|
|
308
|
+
a;c++)d=document.createElement(_$_cd07[20]),d.className=_$_cd07[322],d.innerHTML=c,this.pagination.children[1].appendChild(d),this.pageNumber==c-1&&d.classList.add(_$_cd07[323]);a<b&&(d=document.createElement(_$_cd07[20]),d.className=_$_cd07[322],d.innerHTML=_$_cd07[216],d.title=b,this.pagination.children[1].appendChild(d));this.pagination.children[0].innerHTML=B(_$_cd07[324],[this.pageNumber+1,b])}else this.pagination.children[0].innerHTML=B(_$_cd07[321])}};return k}(),ka=function(){var k=function(b){b.setFreezeColumns=
|
|
309
|
+
k[_$_cd07[11]];b.resetFreezeColumns=k.reset};k.width=function(){if(this.options.freezeColumns){k.headers.call(this);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(_$_cd07[50]),c.style.left=d+1+_$_cd07[44];!1!==this.options.columns[e].visible&&(d+=this.options.columns[e].width)}}};k.headers=
|
|
310
|
+
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(_$_cd07[50]);this.headers[a].style.left=b+1+_$_cd07[44];if(this.options.footers)for(var d=0;d<this.options.footers.length;d++)this.footers.content[d][a].element.classList.add(_$_cd07[50]),this.footers.content[d][a].element.style.left=b+1+_$_cd07[44];!1!==this.options.columns[a].visible&&(b+=this.options.columns[a].width)}}else k.reset.call(this)};k[_$_cd07[11]]=
|
|
311
|
+
function(b){k.reset.call(this);this.options.freezeColumns=b;k.width.call(this);H.limited.call(this)&&U.call(this)};k.reset=function(){H[_$_cd07[46]].call(this,null,this.options.freezeColumns);for(var b,c=1;c<=this.options.freezeColumns;c++){if(b=this.thead.lastChild)b.children[c].classList.remove(_$_cd07[50]),b.children[c].style.left=_$_cd07[3];for(var a=0;a<this.rows.length;a++)if(b=this.rows[a].element)b.children[c].classList.remove(_$_cd07[50]),b.children[c].style.left=_$_cd07[3];if(this.options.footers)for(a=
|
|
312
|
+
0;a<this.options.footers.length;a++)this.tfoot.children[a].children[c].classList.remove(_$_cd07[50]),this.tfoot.children[a].children[c].style.left=_$_cd07[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}(),Y=function(){var k=function(a,d){if(this.options[a]){for(var e=
|
|
313
|
+
{},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<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++)L.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++)L.call(this,
|
|
314
|
+
f,d)&&(e=!0);if(e)break;else a++}0<this.options.minSpareCols-a&&this.insertColumn(this.options.minSpareCols-a)}},c=function(){};c.build=function(){var a=this;this.content=document.createElement(_$_cd07[20]);this.content.classList.add(_$_cd07[325]);this.content.addEventListener(_$_cd07[326],function(f){if(H.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?H.pageLeft.call(a,1,null,f):H.pageRight.call(a,1,null,f):0>f.deltaY?
|
|
315
|
+
H.pageUp.call(a,1,null,f):H.pageDown.call(a,1,null,f)}});this.content.addEventListener(_$_cd07[327],function(f){if(!a.edition)return f.preventDefault(),!1});this.table=document.createElement(_$_cd07[328]);this.thead=document.createElement(_$_cd07[329]);this.tbody=document.createElement(_$_cd07[330]);this.tfoot=document.createElement(_$_cd07[331]);this.headers=[];this.colgroup=[];this.colgroupContainer=document.createElement(_$_cd07[332]);var d=document.createElement(_$_cd07[168]);d.setAttribute(_$_cd07[151],
|
|
316
|
+
_$_cd07[333]);this.colgroupContainer.appendChild(d);this.headerContainer=document.createElement(_$_cd07[144]);d=document.createElement(_$_cd07[146]);d.classList.add(_$_cd07[334]);this.headerContainer.appendChild(d);this.thead.appendChild(this.headerContainer);this.table.classList.add(_$_cd07[335]);this.table.setAttribute(_$_cd07[336],_$_cd07[98]);this.table.setAttribute(_$_cd07[337],_$_cd07[98]);this.table.setAttribute(_$_cd07[338],_$_cd07[339]);this.table.appendChild(this.colgroupContainer);this.table.appendChild(this.thead);
|
|
317
|
+
this.table.appendChild(this.tbody);this.table.appendChild(this.tfoot);this.options.textOverflow||this.table.classList.add(_$_cd07[340]);!1===this.options.selectLockedCells&&this.table.classList.add(_$_cd07[341]);this.corner=document.createElement(_$_cd07[20]);this.corner.className=_$_cd07[342];this.corner.setAttribute(_$_cd07[338],_$_cd07[343]);this.corner.setAttribute(_$_cd07[344],_$_cd07[345]);0==this.options.selectionCopy&&(this.corner.style.display=_$_cd07[40]);this.scrollX=U.build.call(a,_$_cd07[45]);
|
|
318
|
+
this.scrollY=U.build.call(a,_$_cd07[346]);d=document.createElement(_$_cd07[20]);d.appendChild(this.content);d.appendChild(this.scrollY);d.classList.add(_$_cd07[347]);var e=document.createElement(_$_cd07[20]);e.appendChild(d);e.appendChild(this.scrollX);e.classList.add(_$_cd07[348]);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),
|
|
319
|
+
this.options.tableWidth||(this.options.tableWidth=document.body.offsetWidth-18),this.content.style.overflow=_$_cd07[49],this.content.style.maxWidth=parseInt(this.options.tableWidth)+_$_cd07[44],this.options.pagination||(this.content.style.maxHeight=parseInt(this.options.tableHeight)+_$_cd07[44]));this.options.freezeColumns>this.options.columns.length&&console.error(_$_cd07[349]);ra.build.call(this);pa.build.call(this);ua.build.call(this);Fa.build.call(this);ba.build.call(this);aa.build.call(this);
|
|
320
|
+
H.call(this);ca.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=this.headers[f])h=g.getAttribute(_$_cd07[42]),h!=f&&(g.setAttribute(_$_cd07[42],f),g.getAttribute(_$_cd07[165])||(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(_$_cd07[43],m),g.element.children[0].setAttribute(_$_cd07[43],m),f=this.options.rows&&
|
|
321
|
+
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(q,v){g=this.records[v][q];h=g.x;l=g.y;h!=q&&(g.x=q,g.element&&g.element.setAttribute(_$_cd07[42],q));l!=v&&(g.y=v,g.element&&g.element.setAttribute(_$_cd07[43],v));if(h!=q||l!=v){var u=E.getColumnNameFromCoords(h,l);q=E.getColumnNameFromCoords(q,v);e[u]=q}};if(a){m=function(q,v){q&&q[v]&&delete q[v]};var n=Object.keys(a);for(f=0;f<n.length;f++)m(this,n[f]),m(this.options.meta,
|
|
322
|
+
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,f,m);k.call(this,_$_cd07[350],d);k.call(this,_$_cd07[282],e);k.call(this,_$_cd07[283],e);k.call(this,_$_cd07[99],e);k.call(this,_$_cd07[284],e);k.call(this,_$_cd07[267],e);this.options.mergeCells&&ba.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==
|
|
323
|
+
_$_cd07[84])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,e,d,L.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&&(t.license=
|
|
324
|
+
a.config.license);b.spreadsheet=a;b.jspreadsheet=b.jexcel=a.worksheets;t.spreadsheet.push(a);a.name||(a.name=jSuites.guid());k.bind(a.config.root?a.config.root:document);var d=a.config.tabs;typeof d!==_$_cd07[83]&&(d={allowCreate:d?!0:!1,hideHeaders:d?!1:!0,allowChangePosition:a.config.allowMoveWorksheet?!0:!1});d.maxWidth||(d.maxWidth=b.offsetWidth-50+_$_cd07[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<=
|
|
325
|
+
h&&a.openWorksheet(h)};d.onchangeposition=function(f,g,h){a.updateWorksheet(g,h)};jSuites.tabs(b,d);b.classList.add(_$_cd07[351]);1==c.fullscreen&&b.classList.add(_$_cd07[15]);var e=document.createElement(_$_cd07[20]);a.toolbar=document.createElement(_$_cd07[20]);a.toolbar.className=_$_cd07[352];e.appendChild(a.toolbar);a.filter=ca.build.call(a);e.appendChild(a.filter);a.helper=document.createElement(_$_cd07[20]);a.helper.className=_$_cd07[353];e.appendChild(a.helper);a.loading=document.createElement(_$_cd07[20]);
|
|
326
|
+
a.loading.classList.add(_$_cd07[354]);e.appendChild(a.loading);e.appendChild(da.build(a));e.appendChild(Ra(a));a.textarea=document.createElement(_$_cd07[355]);a.textarea.className=_$_cd07[356];a.textarea.tabIndex=_$_cd07[357];e.appendChild(a.textarea);d.position===_$_cd07[358]?b.insertBefore(e,b.children[0]):b.insertBefore(e,b.children[1]);b.appendChild(Ja.call(a,t.license));a.createWorksheet=ia.createWorksheet;a.deleteWorksheet=ia.deleteWorksheet;a.renameWorksheet=ia.renameWorksheet;a.updateWorksheet=
|
|
327
|
+
ia.updateWorksheet;a.openWorksheet=ia.openWorksheet;a.moveWorksheet=ia.moveWorksheet;a.getWorksheet=ia.getWorksheet;a.getWorksheetActive=ia.getWorksheetActive;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=V.undo;a.redo=V.redo;a.setToolbar=fa[_$_cd07[11]];a.getToolbar=fa[_$_cd07[51]];a.showToolbar=fa.show;a.hideToolbar=
|
|
328
|
+
fa.hide;a.tools=e;1!==a.edition&&(b=Object.keys(a.config.definedNames))&&b.length&&(a.config.definedNames={},console.log(_$_cd07[359]));c.plugins&&qa.call(a,c.plugins);a.setPlugins=function(f){qa.call(a,f)};b=Object.keys(t.extensions);if(b.length)for(d=0;d<b.length;d++)if(typeof t.extensions[b[d]].oninit==_$_cd07[84])t.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);da(a);Fa(a);Va(a);ba(a);Qa(a);Wa(a);ea(a);W(a);M(a);
|
|
329
|
+
Aa(a);Xa(a);Za(a);Ya(a);Ca(a);aa(a);pa(a);ra(a);ca(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);!t.license&&a.options.license&&(t.license=a.options.license);b.element.jexcel=b.element.jexcel?b.worksheets:a;qa.execute.call(a.parent,_$_cd07[360],[a]);a.onload=function(){this.options.worksheetName||(this.options.worksheetName=_$_cd07[361]+ia.nextName());var d=this.options.worksheetName;I(d)&&console.log(_$_cd07[362]+d+_$_cd07[363]);I(d,a);this.element=b.element.tabs.appendElement(this.options.worksheetName,
|
|
330
|
+
function(e,f){a.options.worksheetState===_$_cd07[49]&&(f.style.display=_$_cd07[40])});this.element.classList.add(_$_cd07[364]);this.element.jexcel=this;Y.build.call(this);qa.execute.call(this.parent,_$_cd07[365],[this]);this.options.data&&500<this.options.data.length&&!H.limited.call(this)&&!this.options.pagination&&console.error(_$_cd07[366])};return a},row:function(b,c){this.rows[b]||(this.rows[b]={element:null,y:b});c&&(this.rows[b].id=c,ta[_$_cd07[11]].call(this,c));this.options.rows&&this.options.rows[b]&&
|
|
331
|
+
this.options.rows[b].height&&(this.rows[b].height=this.options.rows[b].height);this.records[b]||(this.records[b]=[]);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==_$_cd07[13]&&(a=L.call(this,b,c),null===a||void 0===a)&&(a=_$_cd07[3],L.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]==
|
|
332
|
+
_$_cd07[367]?window:b).addEventListener(c[a],Ba[c[a]],c[a]==_$_cd07[368]||c[a]==_$_cd07[369]||c[a]==_$_cd07[370]?{passive:!1}:{})},unbind:function(b){for(var c=Object.keys(Ba),a=0;a<c.length;a++)(c[a]==_$_cd07[367]?window:b).removeEventListener(c[a],Ba[c[a]])}};return k}(),ab=function(){var k=function(b){b.getWidth=k[_$_cd07[51]];b.setWidth=k[_$_cd07[11]]};k[_$_cd07[51]]=function(b){var c=this.options.columns;if(typeof b===_$_cd07[13]){b=[];for(var a=0;a<c.length;a++)b.push(c[a].width)}else b=c[b].width;
|
|
333
|
+
return b};k[_$_cd07[11]]=function(b,c,a){if(!R.call(this.parent,this))return!1;if(c){if(Array.isArray(b)){a||(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(_$_cd07[151],e)}}else a||(a=this.options.columns[b].width),this.options.columns[b].width=c,this.colgroup[b]&&this.colgroup[b].setAttribute(_$_cd07[151],c);this.refreshBorders();V.call(this.parent,
|
|
334
|
+
{worksheet:this,action:_$_cd07[72],column:b,oldValue:a,newValue:c});K.call(this,_$_cd07[72],{column:b,width:c,oldWidth:a});F.call(this.parent,_$_cd07[371],this,b,c,a)}H.refresh.call(this)};return k}(),bb=function(){var k=function(c){c.getHeight=k[_$_cd07[51]];c.setHeight=k[_$_cd07[11]]};k[_$_cd07[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=
|
|
335
|
+
this.rows[c].height?this.rows[c].height:this.rows[c].element.offsetHeight||this.options.defaultRowHeight;this.rows[c].element.style.height=a+_$_cd07[44];this.options.rows[c]||(this.options.rows[c]={});this.options.rows[c].height=a+_$_cd07[44];this.rows[c].height=a;return d};k[_$_cd07[11]]=function(c,a,d){if(!R.call(this.parent,this))return!1;var e,f=typeof d==_$_cd07[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);
|
|
336
|
+
1==f&&d.push(f)}else e=b.call(this,c,a),1==f&&(d=e);this.refreshBorders();V.call(this.parent,{worksheet:this,action:_$_cd07[73],row:c,oldValue:d,newValue:a});K.call(this,_$_cd07[73],{row:c,height:a,oldHeight:d});F.call(this.parent,_$_cd07[372],this,c,a,d)}H.refresh.call(this)};return k}(),ca=function(){var k=function(g){var h=e[g];g=a[e[g]];if(!g.element){g.element=document.createElement(_$_cd07[373]);g.element.innerHTML=g.value;var l=document.createElement(_$_cd07[223]);l.type=_$_cd07[254];l.value=
|
|
337
|
+
h;l.o=g;g.element.insertBefore(l,g.element.firstChild)}g.element.firstChild.checked=g.selected;return g.element},b=null,c=null,a=[],d=0,e=null,f=function(g){g.setFilter=f[_$_cd07[11]];g.getFilter=f[_$_cd07[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[_$_cd07[11]]=function(g,h){var l=this.headers[g];g=this.options.columns[g];Array.isArray(h)&&0<h.length?(l&&l.classList.add(_$_cd07[374]),g.filters=h):
|
|
338
|
+
(l&&l.classList.remove(_$_cd07[374]),g.filters=null);f.update.call(this)};f[_$_cd07[51]]=function(g){if(g)return this.options.columns[g].filters||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(_$_cd07[167])){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;
|
|
339
|
+
h=h.left+h.width;l.style.display=_$_cd07[16];g+l.offsetWidth>h&&(g=h-(l.offsetWidth+18));l.style.top=m+_$_cd07[44];l.style.left=g+_$_cd07[44];l.children[0].focus();g=l.children[1].selectAll;l.children[1].textContent=_$_cd07[3];l.children[1].appendChild(g);g.children[0].checked=this.options.columns[b].filters?!1:!0;g=ra.execute.call(this,null,b);g=E.invert(g);l=[];for(h=0;h<this.rows.length;h++)if(g[h]){m=_$_cd07[3]+L.call(this,b,h);var p=_$_cd07[3]+ea.processed.call(this,b,h,!0);m.substr(0,1)==_$_cd07[12]&&
|
|
340
|
+
(m=p);l.push([m,p])}l.sort(function(n,q){return n[0]>q[0]?1:n[0]<q[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,_$_cd07[376],this,b,a))&&(a=g);void 0!==a[_$_cd07[3]]&&(delete a[_$_cd07[3]],a[_$_cd07[3]]={value:_$_cd07[212]+B(_$_cd07[377])+_$_cd07[234],element:null});f.search.call(this,_$_cd07[3])}else console.log(_$_cd07[375])};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=
|
|
341
|
+
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[_$_cd07[11]].call(this,b,g)}this.parent.filter.style.display=_$_cd07[3];this.parent.filter.children[0].value=_$_cd07[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=
|
|
342
|
+
0;n<h.length;n++)if(h[n].filters&&g!==n){var q=_$_cd07[3]+L.call(this,n,m),v=_$_cd07[3]+this.getLabelFromCoords(n,m,!0);-1==h[n].filters.indexOf(q)&&-1==h[n].filters.indexOf(v)&&(p=!1)}p&&l.push(m)}return l};f.update=function(){va.reset.call(this);this.resetSelection();this.resetBorders();var g=ra.execute.call(this,null);if(typeof this.parent.config.onbeforefilter==_$_cd07[84]){var h=f[_$_cd07[51]].call(this),l=F.call(this.parent,_$_cd07[378],this,h,g);if(l)g=l;else if(!1===l)return!1}this.pageNumber=
|
|
343
|
+
0;g&&g.length<this.rows.length&&va[_$_cd07[11]].call(this,g);H.resetY.call(this);aa.refresh.call(this);F.call(this.parent,_$_cd07[379],this,h,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 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,_$_cd07[380]);for(var l=Object.keys(a),m=0;m<l.length;m++)(_$_cd07[3]+
|
|
344
|
+
l[m]).match(g)||(_$_cd07[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=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(_$_cd07[20]);
|
|
345
|
+
g.className=_$_cd07[381];g.onclick=function(p){p.target.tagName==_$_cd07[382]&&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||(p=!1);this.children[0].children[0].checked=p};var h=document.createElement(_$_cd07[223]);h.type=_$_cd07[55];h.placeholder=B(_$_cd07[383]);h.className=_$_cd07[384];var l=document.createElement(_$_cd07[223]);l.type=_$_cd07[385];l.value=_$_cd07[386];l.className=_$_cd07[387];var m=document.createElement(_$_cd07[20]);
|
|
346
|
+
m.className=_$_cd07[388];m.appendChild(h);m.appendChild(g);m.appendChild(l);g.currentSelection=document.createElement(_$_cd07[373]);g.currentSelection.innerHTML=_$_cd07[389]+B(_$_cd07[390]);g.selectAll=document.createElement(_$_cd07[373]);g.selectAll.innerHTML=_$_cd07[391]+B(_$_cd07[392])+_$_cd07[234];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=
|
|
347
|
+
!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};f.updateDOM=function(g,h,l){var m=this.headers,p=function(n){1==h?m[n].classList.add(_$_cd07[167]):(this.options.columns[n].filters=null,m[n].classList.remove(_$_cd07[374]),1==l&&m[n].classList.remove(_$_cd07[167]))};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;
|
|
348
|
+
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(_$_cd07[374]),h=!0);1==h&&f.update.call(this)};return f}(),va=function(){var k={};k[_$_cd07[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===
|
|
349
|
+
this.rows[c].results&&b.push(c);return b};return k}(),ra=function(){var k=function(a){var d=document.createElement(_$_cd07[20]);if(0<a.options.pagination&&a.options.paginationOptions&&0<a.options.paginationOptions.length){a.paginationDropdown=document.createElement(_$_cd07[393]);a.paginationDropdown.classList.add(_$_cd07[394]);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(_$_cd07[395]);
|
|
350
|
+
f.value=a.options.paginationOptions[e];f.innerHTML=a.options.paginationOptions[e];a.paginationDropdown.appendChild(f)}a.paginationDropdown.value=a.options.pagination;d.appendChild(document.createTextNode(B(_$_cd07[396])));d.appendChild(a.paginationDropdown);d.appendChild(document.createTextNode(B(_$_cd07[397])))}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=
|
|
351
|
+
c.refresh;a.showSearch=c.show;a.hideSearch=c.hide};c.execute=function(a,d){null===a?a=this.searchInput.value||_$_cd07[3]:a!==this.searchInput.value&&(this.searchInput.value=a);this.pageNumber=0;var e=[],f=null;d=ca.execute.call(this,d);if(a)try{a=new RegExp(a,_$_cd07[380]);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=_$_cd07[3]+L.call(this,h,g),m=_$_cd07[3]+this.getLabelFromCoords(h,g);if(l.match(a)||m.match(a))f=!0}1==f&&b.call(this,
|
|
352
|
+
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);this.resetSelection();this.resetBorders();var d=c.execute.call(this,a);if(typeof this.parent.config.onbeforesearch==_$_cd07[84]){var e=F.call(this.parent,_$_cd07[399],this,a,d);if(e)d=e;else if(!1===e)return!1}this.pageNumber=0;d&&d.length<this.rows.length&&va[_$_cd07[11]].call(this,d);H.resetY.call(this);aa.refresh.call(this);
|
|
353
|
+
F.call(this.parent,_$_cd07[400],this,a,d)};c.refresh=function(){H.resetY.call(this);aa.refresh.call(this)};c.reset=function(){this.searchInput.value=_$_cd07[3];va.reset.call(this);H.resetY.call(this);aa.refresh.call(this)};c.show=function(){this.options.search=!0;this.searchContainer.style.display=_$_cd07[3]};c.hide=function(){this.options.search=!1;this.searchContainer.style.display=_$_cd07[40]};c.build=function(){this.searchContainer=document.createElement(_$_cd07[20]);this.searchContainer.classList.add(_$_cd07[401]);
|
|
354
|
+
this.searchContainer.appendChild(k(this));var a=this.searchContainer,d=a.appendChild,e=document.createElement(_$_cd07[20]);e.innerHTML=B(_$_cd07[383])+_$_cd07[114];this.searchInput=document.createElement(_$_cd07[223]);this.searchInput.classList.add(_$_cd07[398]);e.appendChild(this.searchInput);d.call(a,e);0==this.options.search&&(this.searchContainer.style.display=_$_cd07[40]);this.element.insertBefore(this.searchContainer,this.element.firstChild)};return c}(),Ra=function(){var k=function(b){b.contextmenu=
|
|
355
|
+
document.createElement(_$_cd07[20]);b.contextmenu.className=_$_cd07[402];jSuites.contextmenu(b.contextmenu,{onclick:function(c,a,d){c.close()}});return b.contextmenu};k.open=function(b,c){var a=b.target.getAttribute(_$_cd07[42]),d=b.target.getAttribute(_$_cd07[43]),e=k[_$_cd07[51]](this,a,d,b,c[0],c[1],c[2]);if(typeof this.parent.config.contextMenu==_$_cd07[84]){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=qa.execute.call(this.parent,
|
|
356
|
+
_$_cd07[85],[this,a,d,b,e,c[0],c[1],c[2]]);e=f[4];this.parent.contextmenu.contextmenu.open(b,e)};k[_$_cd07[51]]=function(b,c,a,d,e,f,g){var h=[],l=b.parent.config,m=-1!=navigator.userAgent.indexOf(_$_cd07[403])?_$_cd07[404]:_$_cd07[405];e==_$_cd07[406]&&(1==l.allowRenameWorksheet&&h.push({title:B(_$_cd07[407]),onclick:function(){var n=prompt(B(_$_cd07[407]),d.target.innerText);n&&b.parent.renameWorksheet(f,n)}}),1==l.allowDeleteWorksheet&&h.push({title:B(_$_cd07[408]),onclick:function(){confirm(B(_$_cd07[409]),
|
|
357
|
+
d.target.innerText)&&b.parent.deleteWorksheet(f)}}),h.push({type:_$_cd07[410]}));e==_$_cd07[411]&&(h.push({title:B(_$_cd07[412]),onclick:function(){var n=prompt(B(_$_cd07[412]),d.target.innerText);b.setNestedCell(f,g,{title:n})}}),h.push({type:_$_cd07[410]}));if(e==_$_cd07[413]||e==_$_cd07[414]||e==_$_cd07[415]||e==_$_cd07[411])h.push({title:B(_$_cd07[416]),icon:_$_cd07[417],shortcut:m+_$_cd07[418],onclick:function(){b.cut()}}),h.push({title:B(_$_cd07[419]),icon:_$_cd07[420],shortcut:m+_$_cd07[421],
|
|
358
|
+
onclick:function(){b.copy()}}),navigator&&navigator.clipboard&&navigator.clipboard.readText&&h.push({title:B(_$_cd07[422]),icon:_$_cd07[423],shortcut:m+_$_cd07[424],onclick:function(){b.selectedCell&&navigator.clipboard.readText().then(function(n){n&&b.paste(b.selectedCell[0],b.selectedCell[1],n)})}}),h.push({type:_$_cd07[410]});e==_$_cd07[413]&&(1==b.options.allowInsertColumn&&h.push({title:B(_$_cd07[425]),onclick:function(){b.insertColumn(1,parseInt(f),1)}}),1==b.options.allowInsertColumn&&h.push({title:B(_$_cd07[426]),
|
|
359
|
+
onclick:function(){b.insertColumn(1,parseInt(f),0)}}),1==b.options.allowDeleteColumn&&h.push({title:B(_$_cd07[427]),onclick:function(){b.deleteColumn(b.getSelectedColumns().length?void 0:parseInt(c))}}),1==b.options.allowRenameColumn&&h.push({title:B(_$_cd07[428]),onclick:function(){b.setHeader(f)}}),b.options.data.length||(h.push({type:_$_cd07[410]}),h.push({title:B(_$_cd07[429]),onclick:function(){b.insertRow(0)}})),1==b.options.columnSorting&&(h.push({type:_$_cd07[410]}),h.push({title:B(_$_cd07[430]),
|
|
360
|
+
onclick:function(){b.orderBy(f,0)}}),h.push({title:B(_$_cd07[431]),onclick:function(){b.orderBy(f,1)}}),h.push({type:_$_cd07[410]})));if(e==_$_cd07[415]||e==_$_cd07[414])1==b.options.allowInsertRow&&(h.push({title:B(_$_cd07[432]),onclick:function(){b.insertRow(1,parseInt(a),1)}}),h.push({title:B(_$_cd07[433]),onclick:function(){b.insertRow(1,parseInt(a))}})),1==b.options.allowDeleteRow&&h.push({title:B(_$_cd07[434]),onclick:function(){b.deleteRow(b.getSelectedRows().length?void 0:parseInt(a))}}),
|
|
361
|
+
h.push({type:_$_cd07[410]});if(e==_$_cd07[415]&&1==b.options.allowComments){var p=b.records[g][f].element.getAttribute(_$_cd07[269])||_$_cd07[3];h.push({title:p?B(_$_cd07[435]):B(_$_cd07[436]),icon:_$_cd07[437],onclick:function(){var n=E.getColumnNameFromCoords(f,g),q=prompt(B(_$_cd07[438]),p);q&&b.setComments(n,q)}});p&&h.push({title:B(_$_cd07[439]),onclick:function(){var n=E.getColumnNameFromCoords(f,g);b.setComments(n,_$_cd07[3])}});h.push({type:_$_cd07[410]})}l.allowExport&&h.push({title:B(_$_cd07[440]),
|
|
362
|
+
icon:_$_cd07[441],shortcut:m+_$_cd07[442],onclick:function(){b.download()}});l.about&&h.push({title:B(_$_cd07[443]),icon:_$_cd07[444],onclick:function(){!0===l.about?alert(J().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[_$_cd07[11]]=function(b){this.toolbar.innerHTML=_$_cd07[3];this.config.toolbar=k[_$_cd07[51]].call(this,
|
|
363
|
+
b);k.show.call(this)};k[_$_cd07[51]]=function(b){b||(b=this.config.toolbar);b?Array.isArray(b)?b={items:b}:typeof b===_$_cd07[84]&&(b=b({items:k.getDefault()})):b={};typeof b!==_$_cd07[83]&&(b={});b.items||(b.items=k.getDefault());typeof b.responsive==_$_cd07[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=_$_cd07[3];this.element.classList.add(_$_cd07[445])};k.hide=function(){this.toolbar.style.display=
|
|
364
|
+
_$_cd07[40];this.element.classList.remove(_$_cd07[445])};k.update=function(b,c){if(c=this.toolbarInstance)if(c.update(b),c.options.responsive){var a=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[_$_cd07[51]].call(this),c=0;c<b.items.length;c++)if(b.items[c].type==_$_cd07[393]){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]);
|
|
365
|
+
b.items[c].k&&(b.items[c].onchange=function(d,e,f,g){t.current.setStyle(t.current.getSelected(),f.k,g)})}}else b.items[c].type==_$_cd07[259]?(b.items[c].type=_$_cd07[446],b.items[c].onclick=function(d,e,f){if(!f.color){var g=null;jSuites.color(f,{onchange:function(h,l){(g=t.current.getSelected())&&t.current.setStyle(g,f.k,l)},onopen:function(h){var l;t.current.cursor?(l=t.current.cursor.style[f.k])?h.color.select(h.color.toHex(l)):h.color.select(_$_cd07[3]):h.color.select(_$_cd07[3])}});f.color.open()}}):
|
|
366
|
+
!b.items[c].onclick&&b.items[c].k&&(b.items[c].onclick=function(){t.current.setStyle(t.current.getSelected(),this.k,this.v)});(c=qa.execute.call(this,_$_cd07[86],[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:_$_cd07[447],onclick:function(){t.current&&t.current.undo()}},{content:_$_cd07[448],onclick:function(){t.current&&
|
|
367
|
+
t.current.redo()}},{content:_$_cd07[441],onclick:function(){t.current&&t.current.download()}},{type:_$_cd07[449]},{type:_$_cd07[393],width:_$_cd07[450],options:[_$_cd07[451],_$_cd07[452],_$_cd07[453]],render:function(b){return _$_cd07[454]+b+_$_cd07[228]+b+_$_cd07[455]},onchange:function(b,c,a,d){t.current&&t.current.setStyle(t.current.getSelected(),_$_cd07[456],d)}},{type:_$_cd07[393],width:_$_cd07[457],content:_$_cd07[458],options:[_$_cd07[459],_$_cd07[460],_$_cd07[461],_$_cd07[462],_$_cd07[463]],
|
|
368
|
+
render:function(b){return _$_cd07[464]+b+_$_cd07[228]+b+_$_cd07[455]},onchange:function(b,c,a,d){t.current&&t.current.setStyle(t.current.getSelected(),_$_cd07[465],d)}},{type:_$_cd07[393],options:[_$_cd07[466],_$_cd07[467],_$_cd07[468],_$_cd07[469]],render:function(b){return _$_cd07[470]+b+_$_cd07[471]},onchange:function(b,c,a,d){t.current&&t.current.setStyle(t.current.getSelected(),_$_cd07[472],d.split(_$_cd07[473])[2])}},{type:_$_cd07[446],content:_$_cd07[474],k:_$_cd07[475],v:_$_cd07[476]},{type:_$_cd07[259],
|
|
369
|
+
content:_$_cd07[477],k:_$_cd07[259]},{type:_$_cd07[259],content:_$_cd07[478],k:_$_cd07[479]},{type:_$_cd07[393],data:[_$_cd07[480],_$_cd07[481],_$_cd07[482],_$_cd07[483],_$_cd07[484],_$_cd07[485],_$_cd07[486],_$_cd07[487],_$_cd07[488],_$_cd07[489]],columns:5,render:function(b){return _$_cd07[470]+b+_$_cd07[471]},right:!0,onchange:function(b,c,a,d,e){if(b=t.current.getHighlighted()){a=c.thickness||1;c=c.color||_$_cd07[490];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<=
|
|
370
|
+
b[2];p++){var n=E.getColumnNameFromCoords(p,m);e[n]||(e[n]=_$_cd07[3]);e[n]=d!=_$_cd07[485]&&d!=_$_cd07[481]||p!=f?(d==_$_cd07[482]||d==_$_cd07[484])&&p>f?e[n]+(_$_cd07[491]+a+_$_cd07[492]+c+_$_cd07[299]):d==_$_cd07[480]?e[n]+(_$_cd07[491]+a+_$_cd07[492]+c+_$_cd07[299]):e[n]+_$_cd07[493]:e[n]+(_$_cd07[491]+a+_$_cd07[492]+c+_$_cd07[299]);e[n]=d!=_$_cd07[480]&&d!=_$_cd07[487]&&d!=_$_cd07[481]||p!=h?e[n]+_$_cd07[495]:e[n]+(_$_cd07[494]+a+_$_cd07[492]+c+_$_cd07[299]);e[n]=d!=_$_cd07[486]&&d!=_$_cd07[481]||
|
|
371
|
+
m!=g?(d==_$_cd07[482]||d==_$_cd07[483])&&m>g?e[n]+(_$_cd07[496]+a+_$_cd07[492]+c+_$_cd07[299]):d==_$_cd07[480]?e[n]+(_$_cd07[496]+a+_$_cd07[492]+c+_$_cd07[299]):e[n]+_$_cd07[497]:e[n]+(_$_cd07[496]+a+_$_cd07[492]+c+_$_cd07[299]);e[n]=d!=_$_cd07[480]&&d!=_$_cd07[488]&&d!=_$_cd07[481]||m!=l?e[n]+_$_cd07[499]:e[n]+(_$_cd07[498]+a+_$_cd07[492]+c+_$_cd07[299])}Object.keys(e)&&t.current.setStyle(e,null,null,!0)}},onload:function(b,c){var a=document.createElement(_$_cd07[20]),d=document.createElement(_$_cd07[20]);
|
|
372
|
+
a.appendChild(d);var e=jSuites.color(d,{closeOnChange:!1,onchange:function(f,g){f.parentNode.children[1].style.color=g;c.color=g}});d=document.createElement(_$_cd07[446]);d.classList.add(_$_cd07[500]);d.innerHTML=_$_cd07[501];d.onclick=function(){e.open()};a.appendChild(d);b.children[1].appendChild(a);d=document.createElement(_$_cd07[20]);jSuites.picker(d,{type:_$_cd07[393],data:[1,2,3,4,5],render:function(f){return _$_cd07[502]+f+_$_cd07[503]},onchange:function(f,g,h,l){c.thickness=l},width:_$_cd07[504]});
|
|
373
|
+
b.children[1].appendChild(d);d=document.createElement(_$_cd07[20]);d.style.flex=_$_cd07[505];b.children[1].appendChild(d)}},{type:_$_cd07[449]},{content:_$_cd07[15],onclick:function(b,c,a){a.children[0].innerText==_$_cd07[15]?(t.current.fullscreen(!0),a.children[0].innerText=_$_cd07[506]):(t.current.fullscreen(!1),a.children[0].innerText=_$_cd07[15])},tooltip:_$_cd07[507],updateState:function(b,c,a,d){a.children[0].innerText=1==d.parent.config.fullscreen?_$_cd07[506]:_$_cd07[15]}},{content:_$_cd07[508],
|
|
374
|
+
onclick:function(b,c,a){a.children[0].innerText==_$_cd07[508]?(ra.show.call(t.current),a.children[0].innerText=_$_cd07[509]):(ra.hide.call(t.current),a.children[0].innerText=_$_cd07[508])},tooltip:_$_cd07[510],updateState:function(b,c,a,d){a.children[0].innerText=1==d.options.search?_$_cd07[509]:_$_cd07[508]}}]};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=
|
|
375
|
+
function(c,a){return b.parent.renameWorksheet(c,a)};b.moveWorksheet=function(c,a){return b.parent.moveWorksheet(c,a)};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=t.spreadsheet;if(a.length)for(var d=0;d<a.length;d++){var e=
|
|
376
|
+
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+)/))&&(c=parseInt(c[0])+1,c>b&&(b=c))}return b};k.createWorksheet=function(b){if(!R.call(this))return!1;b||(b={});var c=this.worksheets.length,a=F.call(this,_$_cd07[511],b,c);if(typeof a===_$_cd07[83])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=_$_cd07[361]+
|
|
377
|
+
k.nextName());if(I(b.worksheetName))jSuites.notification({error:_$_cd07[505],message:_$_cd07[512]});else return a=na.worksheet(this,b),a.onload(),t.current&&t.current.resetSelection(),t.current=a,K.call(a,_$_cd07[513],[b]),F.call(this,_$_cd07[514],a,b,c),a};k.deleteWorksheet=function(b){var c=this.worksheets[b];if(!R.call(this,c))return!1;I(c.options.worksheetName,null);this.element.tabs.deleteElement(b);this.worksheets.splice(b,1);K.call(c,_$_cd07[515],[b]);F.call(this,_$_cd07[516],c,b)};k.renameWorksheet=
|
|
378
|
+
function(b,c){var a=this.worksheets[b];if(!R.call(this,a))return!1;var d=a.options.worksheetName;if(d.toLowerCase()==c.toLowerCase())return!1;c=c.replace(/[^0-9A-Za-z_\s^]+/gi,_$_cd07[3]);Number(c)==c&&(c=_$_cd07[361]+Number(c));I(c)?alert(_$_cd07[517]):(I(d,null),this.element.tabs.rename(b,c),a.options.worksheetName=c,I(c,a),V.call(this,{worksheet:a,action:_$_cd07[79],index:b,oldValue:d,newValue:c}),K.call(a,_$_cd07[79],{worksheet:b,newValue:c}),Ia.updateWorksheetName.call(a,d,c),W.updateWorksheetNames.call(a,
|
|
379
|
+
d,c),F.call(this,_$_cd07[518],a,b,c,d))};k.updateWorksheet=function(b,c){var a=this.worksheets;if(!R.call(this))return!1;this.worksheets.splice(c,0,a.splice(b,1)[0]);V.call(this,{worksheet:a[c],action:_$_cd07[80],f:b,t:c});K.call(a[c],_$_cd07[80],{f:b,t:c});F.call(this,_$_cd07[519],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||t.current&&t.current==c||(this.element.tabs.getActive()!=b?this.element.tabs.open(b):this.element.tabs.setBorder(b),
|
|
380
|
+
t.current&&t.current.resetSelection(),t.current=c,t.current.refreshBorders(),U.call(t.current),k.state.call(this,b),fa.update.call(this,t.current),F.call(this,_$_cd07[520],c,b))};k.getWorksheet=function(b){if(b&&typeof b==_$_cd07[83]){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===
|
|
381
|
+
_$_cd07[3]||typeof b==_$_cd07[17]?(b=k.getWorksheet.call(this,b),!1===b?!1:this.worksheets[b]):this.worksheets[b]};k.state=function(b){try{if(typeof localStorage!==_$_cd07[13]){var c=this.config.cloud?this.config.cloud:this.element.id;if(c)if(typeof b!==_$_cd07[13])localStorage.setItem(_$_cd07[521]+c,b);else{var a=parseInt(localStorage.getItem(_$_cd07[521]+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:
|
|
382
|
+
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);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=_$_cd07[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,
|
|
383
|
+
c){return k.getColumnName(parseInt(b))+(parseInt(c)+1)},getCoordsFromColumnName:function(b){var c=/^[a-zA-Z]+/.exec(b);if(c){for(var a=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!=_$_cd07[522])console.log(_$_cd07[523]);else{c||(c={});c.columns=[];c.data=[];var a=b.querySelectorAll(_$_cd07[524]);if(a.length)for(var d=
|
|
384
|
+
0;d<a.length;d++){var e=a[d].style.width;e||(e=a[d].getAttribute(_$_cd07[151]));e&&(c.columns[d]||(c.columns[d]={}),c.columns[d].width=e)}e=function(x){var C=x.getBoundingClientRect();C=50<C.width?C.width:50;c.columns[d]||(c.columns[d]={});x.getAttribute(_$_cd07[525])?c.columns[d].type=x.getAttribute(_$_cd07[525]):c.columns[d].type=_$_cd07[55];c.columns[d].width=C+_$_cd07[44];c.columns[d].title=x.innerHTML;x.style.textAlign&&(c.columns[d].align=x.style.textAlign);x.classList.contains(_$_cd07[526])&&
|
|
385
|
+
(c.columns[d].readOnly=!0);if(C=x.getAttribute(_$_cd07[527]))c.columns[d].name=C;if(C=x.getAttribute(_$_cd07[528]))c.columns[d].id=C};var f=[],g=b.querySelectorAll(_$_cd07[529]);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(_$_cd07[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={},q={},v=null;h=b.querySelectorAll(_$_cd07[530]);
|
|
386
|
+
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(_$_cd07[531]);u?u.substr(0,1)!=_$_cd07[12]&&(u=_$_cd07[12]+u):u=h[a].children[d].innerHTML;c.data[l].push(u);u=E.getColumnNameFromCoords(d,a);(v=h[a].children[d].getAttribute(_$_cd07[532]))&&(q[u]=v);v=parseInt(h[a].children[d].getAttribute(_$_cd07[52]))||0;var y=parseInt(h[a].children[d].getAttribute(_$_cd07[163]))||0;if(v||y)m[u]=[v||1,y||
|
|
387
|
+
1];if(v=h[a].children[d].style&&h[a].children[d].style.display==_$_cd07[40])h[a].children[d].style.display=_$_cd07[3];(v=h[a].children[d].getAttribute(_$_cd07[99]))&&(n[u]=v);h[a].children[d].classList.contains(_$_cd07[533])&&(n[u]=n[u]?n[u]+_$_cd07[534]:_$_cd07[535])}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&&
|
|
388
|
+
(c.mergeCells=m);0<Object.keys(p).length&&(c.rows=p);0<Object.keys(q).length&&(c.classes=q);h=b.querySelectorAll(_$_cd07[536]);if(h.length){b=[];for(a=0;a<h.length;a++){e=[];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,
|
|
389
|
+
1)!=_$_cd07[185]||u.substr(7,1)!=_$_cd07[185])f=!1}else f=!1;a=Object.keys(b[d]).length;f?c.columns[d].type=_$_cd07[184]:1==e&&1<a&&a<=parseInt(.1*c.data.length)&&(c.columns[d].type=_$_cd07[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||_$_cd07[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]=_$_cd07[3]),b[m]!=_$_cd07[537])if(b[m]!=
|
|
390
|
+
_$_cd07[538]&&b[m]!=c||0!=h&&1!=l&&g){b[m]==_$_cd07[187]&&(h=!h);if(null===g){if(g=h,1==g)continue}else if(!0===g&&!l&&b[m]==_$_cd07[187]){b[m+1]==_$_cd07[187]?(h=!0,e[d][a]+=b[m],m++):l=!0;continue}e[d][a]+=b[m]}else{g=null;l=h=!1;if(e[d][a][0]==_$_cd07[187]){var p=e[d][a].trim();p[p.length-1]==_$_cd07[187]&&(e[d][a]=p.substr(1,p.length-2))}b[m]==_$_cd07[538]?(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]=_$_cd07[3]);return e};k.getTokensFromRange=W.getTokensFromRange;
|
|
391
|
+
k.getRangeFromTokens=W.getRangeFromTokens;return k}(),Ba=function(){function k(r){return t.current&&t.current.options.tableOverflow&&r.target.tagName==_$_cd07[563]&&r.target.hasAttribute(_$_cd07[42])}function b(){A.x1=A.x2;A.y1=A.y2;N=null}function c(r,z){z||(z=1);z*=.1;return 0>r?Math.min(0,Math.ceil(r/(1+z))+1):Math.max(0,Math.ceil(r/(1+z))-1)}function a(){0<Math.abs(A.speeds.vertical)&&(A.speeds.vertical=c(A.speeds.vertical,1),t.current.scrollY.scrollTop+=d(A.speeds.vertical),0==t.current.scrollY.scrollTop||
|
|
392
|
+
t.current.scrollY.scrollHeight-t.current.scrollY.scrollTop===t.current.scrollY.clientHeight)&&(A.speeds.vertical=0);0<Math.abs(A.speeds.horizontal)&&(A.speeds.horizontal=c(A.speeds.horizontal,1),t.current.scrollX.scrollLeft+=d(A.speeds.horizontal),0==t.current.scrollX.scrollLeft||t.current.scrollX.scrollWidth-t.current.scrollX.scrollLeft===t.current.scrollX.clientWidth)&&(A.speeds.horizontal=0);0>=Math.abs(A.speeds.vertical)&&0>=Math.abs(A.speeds.horizontal)||requestAnimationFrame(a)}function d(r,
|
|
393
|
+
z){z||(z=100);return Math.ceil(z/1E3*r)}var e={},f=null,g=null,h=null,l=null,m=!1,p=null,n=null,q=null,v=function(r){function z(ja){ja.className&&(ja.classList.contains(_$_cd07[351])&&(G=ja),ja.classList.contains(_$_cd07[364])&&(Q=ja),ja.classList.contains(_$_cd07[539])&&(oa=ja));ja.tagName==_$_cd07[540]?w=1:ja.tagName==_$_cd07[541]?w=2:ja.tagName==_$_cd07[542]&&(w=3);ja.parentNode&&!G&&z(ja.parentNode)}var w=null,D=null,G=null,Q=null,oa=null,X=null,xa=null,Sa=null;z(r.target);if(null!==oa)return!1;
|
|
394
|
+
if(G)if(r.target.classList.contains(_$_cd07[334]))D=_$_cd07[543];else if(r.target.classList.contains(_$_cd07[342]))D=_$_cd07[137];else if(r.target.classList.contains(_$_cd07[272]))D=_$_cd07[414],X=parseInt(r.target.getAttribute(_$_cd07[43]));else if(r.target.parentNode&&r.target.parentNode.classList&&r.target.parentNode.classList.contains(_$_cd07[176]))X=r.target.getAttribute(_$_cd07[181]),xa=r.target.getAttribute(_$_cd07[182]),null===X?D=_$_cd07[543]:(D=_$_cd07[411],X=parseInt(X),xa=parseInt(xa));
|
|
395
|
+
else if(r.target.parentNode&&r.target.parentNode.classList&&r.target.parentNode.classList.contains(_$_cd07[145]))D=_$_cd07[544];else if(r.target.classList.contains(_$_cd07[149]))D=_$_cd07[544];else if(r.target.parentNode&&r.target.parentNode.classList&&r.target.parentNode.classList.contains(_$_cd07[545]))D=_$_cd07[406],X=Array.prototype.indexOf.call(r.target.parentNode.children,r.target);else if(1==w)D=_$_cd07[413],X=r.target.clientWidth-r.offsetX,r.target.classList.contains(_$_cd07[167])&&3<X&&20>
|
|
396
|
+
X&&(D=_$_cd07[546]),X=r.target.getAttribute(_$_cd07[42]);else if(2==w){if(r=u(r,G))D=_$_cd07[415],X=r[0],xa=r[1],Sa=r[2]}else if(3==w){if(X=r.target.getAttribute(_$_cd07[42]),xa=r.target.getAttribute(_$_cd07[43]),X||xa)D=_$_cd07[547]}else w||jSuites.findElement(r.target,_$_cd07[548])&&(D=_$_cd07[86]);return[G,Q,w,D,X,xa,Sa]},u=function(r,z){if(r.changedTouches&&r.changedTouches[0]){var w=r.changedTouches[0].clientX;r=r.changedTouches[0].clientY}else w=r.clientX,r=r.clientY;z=(z.spreadsheet.config.root?
|
|
397
|
+
z.spreadsheet.config.root:document).elementsFromPoint(w,r);for(var D=0;D<z.length;D++)if(w=z[D].getAttribute(_$_cd07[42]),r=z[D].getAttribute(_$_cd07[43]),null!=w&&null!=r)return w=parseInt(w),r=parseInt(r),[w,r,z[D]];return!1},y=function(r){var z=v(r);if(!1===z)return!1;z[0]?z[1]?t.current&&document.activeElement.classList.contains(_$_cd07[93])?document.activeElement.worksheet||(document.activeElement.worksheet=z[1].jexcel):t.current!=z[1].jexcel&&(t.current&&t.current.resetSelection(),t.current=
|
|
398
|
+
z[1].jexcel):(r=z[0].tabs.getActive(),0<=r&&(t.current=z[0].spreadsheet.worksheets[r])):t.current&&!jSuites.findElement(r.target,_$_cd07[222])&&(t.current.resetSelection(!0),t.current=null);return z};e.input=function(r){if(r.target.tagName==_$_cd07[549]&&r.target.classList.contains(_$_cd07[93])){var z=null;r.target.worksheet?z=r.target.worksheet:t.current&&(z=t.current);z&&la.parse.call(z,r.target)}};e.keydown=function(r){if(t.current){r.target.tagName==_$_cd07[549]&&r.target.classList.contains(_$_cd07[93])&&
|
|
399
|
+
la.onkeydown.call(t.current,r);if(27==r.which){if(t.current.edition)return t.current.closeEditor(t.current.edition,!1),r.preventDefault(),!1;if(sa.event)return sa.cancel.call(t.current,r),r.preventDefault(),!1;if(ma.event)return ma.cancel.call(t.current,r),!1;if(1==ca.isVisible())return ca.close.call(t.current,!1),r.preventDefault(),!1}if(!r.target.classList.contains(_$_cd07[222]))if(r.target.classList.contains(_$_cd07[384])){var z=r.target;p&&clearTimeout(p);p=setTimeout(function(){ca.search.call(t.current,
|
|
400
|
+
z.value);p=null},500)}else if(r.target.classList.contains(_$_cd07[398]))z=r.target,p&&clearTimeout(p),p=setTimeout(function(){t.current.search(z.value);p=null},400);else if(t.current.edition){var w=t.current.edition.getAttribute(_$_cd07[42]);13==r.which?t.current.options.columns[w].type==_$_cd07[184]?t.current.closeEditor(t.current.edition,!0):t.current.options.columns[w].type!=_$_cd07[57]&&t.current.options.columns[w].type!=_$_cd07[550]&&t.current.options.columns[w].type!=_$_cd07[437]&&(r.altKey?
|
|
401
|
+
t.current.parent.input.classList.contains(_$_cd07[551])||document.execCommand(_$_cd07[552],!1,_$_cd07[553]):(t.current.closeEditor(t.current.edition,!0),t.current.down(),r.preventDefault())):9==r.which?(t.current.closeEditor(t.current.edition,!0),t.current.right(),r.preventDefault()):39!=r.which&&37!=r.which&&38!=r.which&&40!=r.which||t.current.parent.input.selected||(t.current.closeEditor(t.current.edition,!0),37==r.which?t.current.left(r.shiftKey,r.ctrlKey):39==r.which?t.current.right(r.shiftKey,
|
|
402
|
+
r.ctrlKey):38==r.which?t.current.up(r.shiftKey,r.ctrlKey):40==r.which&&t.current.down(r.shiftKey,r.ctrlKey),r.preventDefault())}else if(t.current.selectedCell)if(33==r.which)0<t.current.options.pagination?ua.pageUp.call(t.current):H.pageUp.call(t.current);else if(34==r.which)0<t.current.options.pagination?ua.pageDown.call(t.current):H.pageDown.call(t.current);else if(37==r.which)t.current.left(r.shiftKey,r.ctrlKey),r.preventDefault();else if(39==r.which)t.current.right(r.shiftKey,r.ctrlKey),r.preventDefault();
|
|
403
|
+
else if(38==r.which)t.current.up(r.shiftKey,r.ctrlKey),r.preventDefault();else if(40==r.which)t.current.down(r.shiftKey,r.ctrlKey),r.preventDefault();else if(36==r.which)t.current.first(r.shiftKey,r.ctrlKey),r.preventDefault();else if(35==r.which)t.current.last(r.shiftKey,r.ctrlKey),r.preventDefault();else if(32==r.which)t.current.setCheckRadioValue(),r.preventDefault();else if(46==r.which||8==r.which)t.current.isEditable()&&t.current.setValue(t.current.getSelected(!1,!0),_$_cd07[3]);else if(13==
|
|
404
|
+
r.which)r.shiftKey?t.current.up():(1==t.current.options.allowManualInsertRow&&t.current.selectedCell[1]==(t.current.results?t.current.results[t.current.results.length-1]:t.current.rows.length-1)&&t.current.insertRow(),t.current.selectedCell&&t.current.down()),r.preventDefault();else if(9==r.which)r.shiftKey?t.current.left():(w=t.current.selectedCell[0],t.current.right(),1==t.current.options.allowInsertColumn&&1==t.current.options.allowManualInsertColumn&&t.current.selectedCell[0]==w&&(t.current.insertColumn(),
|
|
405
|
+
t.current.right())),r.preventDefault();else if((r.ctrlKey||r.metaKey)&&!r.shiftKey)65==r.which?(t.current.selectAll(),r.preventDefault()):83==r.which?(t.current.download(),r.preventDefault()):89==r.which?(t.current.parent.redo(),r.preventDefault()):90==r.which?(t.current.parent.undo(),r.preventDefault()):67==r.which?(t.current.copy(),r.preventDefault()):88==r.which?(t.current.cut(),r.preventDefault()):86==r.which?e.paste(r):189==r.which&&(1==t.current.options.allowDeleteRow&&l==_$_cd07[414]?(t.current.deleteRow(),
|
|
406
|
+
r.preventDefault()):1==t.current.options.allowDeleteColumn&&l==_$_cd07[413]&&(t.current.deleteColumn(),r.preventDefault()));else if(t.current.selectedCell&&t.current.isEditable()){w=t.current.selectedCell[1];var D=t.current.selectedCell[0];t.current.options.columns[D].type!=_$_cd07[18]&&(32==r.keyCode?t.current.options.columns[D].type==_$_cd07[254]||t.current.options.columns[D].type==_$_cd07[256]?r.preventDefault():t.current.openEditor(t.current.records[w][D].element,!0,r):113==r.keyCode?t.current.openEditor(t.current.records[w][D].element,
|
|
407
|
+
!1,r):1!=r.key.length&&r.key!=_$_cd07[554]||r.altKey||r.ctrlKey||t.current.records[w]&&t.current.openEditor(t.current.records[w][D].element,!0,r))}}};var x=function(r,z,w,D,G,Q,oa){if(document.activeElement.classList.contains(_$_cd07[93])&&la.update.call(t.current,r,z,w,D,G,document.activeElement,oa))return!1;if(t.current.edition)t.current.closeEditor(t.current.edition,!0);else if(l&&l!==Q)return!1;t.current!==oa&&(t.current.resetSelection(),t.current=oa);la.current?la.range.call(t.current,r,z,w,
|
|
408
|
+
D,G):za[_$_cd07[11]].call(t.current,r,z,w,D,G)};e.mousedown=function(r){r=r||window.event;var z=r.buttons?r.buttons:r.button?r.button:r.which;if(t.current)if(1==ca.isVisible()&&(jSuites.findElement(r.target,_$_cd07[388])||ca.close.call(t.current,!1)),t.current.edition){if(jSuites.findElement(r.target,_$_cd07[100]))return!1}else if(jSuites.findElement(r.target,_$_cd07[222]))return!1;var w=y(r);if(!1===w)return!1;q=w;if(1<z)if(w[3]==_$_cd07[413]){if(t.current.isSelected(w[4],null))return!1}else if(w[3]==
|
|
409
|
+
_$_cd07[414]){if(t.current.isSelected(null,w[4]))return!1}else if(w[3]==_$_cd07[415]&&t.current.isSelected(w[4],w[5]))return!1;if(t.current){if(w[3]==_$_cd07[137])t.current.isEditable()&&(ma.event=!0);else if(w[3]==_$_cd07[546])ca.open.call(t.current,w[4]);else{if(1==w[2])if(1==t.current.options.columnDrag&&6>r.target.offsetHeight-r.offsetY)sa.start.call(t.current,r);else if(1==t.current.options.columnResize&&6>r.target.offsetWidth-r.offsetX)wa.start.call(t.current,r);else{z=t.current.options.columns.length-
|
|
410
|
+
1;var D=t.current.options.data.length-1;if(w[3]==_$_cd07[543])x(0,0,z,D,r,w[3],w[1].jexcel),h=g=0;else if(w[3]==_$_cd07[411]){var G=pa.range.call(t.current,w[5])[w[4]];G[1]>z&&(G[1]=z);x(G[0],0,G[1],D,r,w[3],w[1].jexcel);g=G[0];h=0}else(r.shiftKey||r.ctrlKey)&&null!=g&&null!=h?x(g,0,w[4],D,r,w[3],w[1].jexcel):(w[3]==_$_cd07[413]&&g==w[4]&&1==t.current.options.allowRenameColumn&&(n=setTimeout(function(){t.current.setHeader(w[4])},800)),x(w[4],0,w[4],D,r,w[3],w[1].jexcel),g=w[4],h=0)}if(2==w[2])if(w[3]==
|
|
411
|
+
_$_cd07[414])1==t.current.options.rowDrag&&6>r.target.offsetWidth-r.offsetX?sa.start.call(t.current,r):1==t.current.options.rowResize&&6>r.target.offsetHeight-r.offsetY?wa.start.call(t.current,r):(z=t.current.options.columns.length-1,D=parseInt(w[4]),(r.shiftKey||r.ctrlKey)&&null!=g&&null!=h?x(0,h,z,D,r,w[3],w[1].jexcel):(x(0,D,z,D,r,w[3],w[1].jexcel),g=0,h=D));else if(w[3]==_$_cd07[415]){z=parseInt(w[4]);D=parseInt(w[5]);if(!t.current.edition&&(G=t.current.options.columns[w[4]].type,r.target.tagName==
|
|
412
|
+
_$_cd07[555]&&(G==_$_cd07[257]||G==_$_cd07[258])&&r.target.parentNode.classList.contains(_$_cd07[124]))){var Q=r.target.innerText;G==_$_cd07[257]&&(Q=_$_cd07[556]+Q);window.open(Q,_$_cd07[557])}(r.shiftKey||r.ctrlKey)&&t.current.selectedCell?x(t.current.selectedCell[0],t.current.selectedCell[1],z,D,r,w[3],w[1].jexcel):(x(z,D,z,D,r,w[3],w[1].jexcel),g=z,h=D)}}l=w[3];typeof w[3]!==_$_cd07[13]&&F.call(t.current.parent,_$_cd07[558],t.current,w[3],w[4],w[5]);m=!0}else m=!1};e.mouseup=function(r){t.current&&
|
|
413
|
+
(sa.event?sa.end.call(t.current,r):wa.event?wa.end.call(t.current,r):ma.event?ma.end.call(t.current,r):r.target.classList.contains(_$_cd07[387])?ca.close.call(t.current,!0):t.current.edition&&r.target.classList.contains(_$_cd07[559])&&50>r.target.clientWidth-r.offsetX&&50>r.offsetY?da.close.call(t.current,null,!0):r.target.classList.contains(_$_cd07[322])&&(r=r.target.innerText==_$_cd07[215]?0:r.target.innerText==_$_cd07[216]?r.target.getAttribute(_$_cd07[269])-1:r.target.innerText-1,ua[_$_cd07[11]].call(t.current,
|
|
414
|
+
parseInt(r))));n&&(clearTimeout(n),n=null);m=l=!1;la.current&&la.close.call(t.current)};e.mousemove=function(r){r=r||window.event;if(t.current){var z=r.target.getAttribute(_$_cd07[42]),w=r.target.getAttribute(_$_cd07[43]);if(1==m)sa.event?sa.update.call(t.current,r):wa.event?wa.update.call(t.current,r):Pa.event&&Pa.update.call(t.current,r);else{var D=r.target.getBoundingClientRect();f&&(f.style.cursor=_$_cd07[3],f=null);1==t.current.options.editable&&(z||w)&&(1==t.current.options.rowResize&&r.target&&
|
|
415
|
+
z&&!w&&5>D.width-(r.clientX-D.left)?(f=r.target,f.style.cursor=_$_cd07[560]):1==t.current.options.columnResize&&r.target&&!z&&w&&5>D.height-(r.clientY-D.top)?(f=r.target,f.style.cursor=_$_cd07[561]):1==t.current.options.rowDrag&&r.target&&!z&&w&&5>D.width-(r.clientX-D.left)?(f=r.target,f.style.cursor=_$_cd07[562]):1==t.current.options.columnDrag&&r.target&&z&&!w&&5>D.height-(r.clientY-D.top)&&(f=r.target,f.style.cursor=_$_cd07[562]))}}};e.mouseover=function(r){r=r||window.event;var z=!1;if(t.current&&
|
|
416
|
+
1==m){var w=v(r);if(w[0]){if(!document.activeElement.classList.contains(_$_cd07[93])&&w[1]&&t.current!=w[1].jexcel&&t.current)return!1;if(!sa.event&&!wa.event)if(ma.event){var D=r.target.getAttribute(_$_cd07[42]),G=r.target.getAttribute(_$_cd07[43]);t.current.isSelected(D,G)||null===D||null===G||(ma.call(t.current,D,G),z=!0)}else null!==g&&null!==h&&(1==w[2]&&(D=g,w[3]==_$_cd07[413]&&(D=r.target.getAttribute(_$_cd07[42])),G=t.current.options.data.length-1,x(g,0,D,G,r,w[3],w[1].jexcel)),2==w[2]&&(w[3]==
|
|
417
|
+
_$_cd07[414]?(D=t.current.options.columns.length-1,G=parseInt(r.target.getAttribute(_$_cd07[43])),x(0,h,D,G,r,w[3],w[1].jexcel)):w[3]==_$_cd07[415]&&(D=r.target.getAttribute(_$_cd07[42]),G=r.target.getAttribute(_$_cd07[43]),D&&G&&(x(g,h,D,G,r,w[3],w[1].jexcel),z=!0))))}}1==z&&!n&&H.limited.call(t.current)?n=setTimeout(function(){var Q=t.current.content.getBoundingClientRect();if(r.changedTouches&&r.changedTouches[0])var oa=r.changedTouches[0].clientX,X=r.changedTouches[0].clientY;else oa=r.clientX,
|
|
418
|
+
X=r.clientY;50>Q.height-(X-Q.top)?H.pageDown.call(t.current,1,null,r):80>X-Q.top&&H.pageUp.call(t.current,1,null,r);50>Q.width-(oa-Q.left)?H.pageRight.call(t.current,1,null,r):80>oa-Q.left&&H.pageLeft.call(t.current,1,null,r);n=null},100):n&&(clearTimeout(n),n=null)};e.dblclick=function(r){if(t.current)if(r.target.classList.contains(_$_cd07[342]))ma.execute.call(t.current,!1);else{var z=v(r);1==z[2]?1==t.current.options.columnSorting&&(r=r.target.getAttribute(_$_cd07[42]))&&t.current.orderBy(r):2==
|
|
419
|
+
z[2]&&t.current.isEditable()&&!t.current.edition&&z[6]&&t.current.openEditor(z[6],null,r)}};e.paste=function(r){if(t.current&&t.current.selectedCell&&!t.current.edition){var z=r.clipboardData||window.clipboardData;z&&(t.current.paste(t.current.selectedCell[0],t.current.selectedCell[1],z.getData(_$_cd07[55])),r&&r.preventDefault())}};e.contextmenu=function(r){var z=y(r);!1!==z&&(z[1]||(z=q),t.current&&!t.current.edition&&(z=Array.prototype.slice.call(z,3),Ra.open.call(t.current,r,z)))};var C=Date.now(),
|
|
420
|
+
A={},N=null,S=null,P=null;e.touchstart=function(r){var z=v(r);z[0]?z[1]&&t.current!=z[1].jexcel&&(t.current&&t.current.resetSelection(),t.current=z[1].jexcel):t.current&&(t.current.resetSelection(),t.current=null);if(t.current&&!t.current.edition){var w=z[4];z=z[5];k(r)&&(P=r.touches[0],S=r.touches.length,C=Date.now(),A.x1=r.touches[0].screenX,A.y1=r.touches[0].screenY,A.x2=r.touches[0].screenX,A.y2=r.touches[0].screenY,N=setTimeout(b,250),null!=A.speeds&&(A.speeds.vertical=0,A.speeds.horizontal=
|
|
421
|
+
0));if(null!==w&&null!==z){t.current.updateSelectionFromCoords(w,z,w,z);var D=r.target;n=setTimeout(function(){t.current.openEditor(D,!1,r);n=null;r.preventDefault();r.stopPropagation();r.stopImmediatePropagation()},750)}}};e.touchmove=function(r){n&&(clearTimeout(n),n=null);if(k(r)&&1==S){var z=r.changedTouches[0];P&&(t.current.scrollY.scrollTop+=-1*(z.clientY-P.clientY),t.current.scrollX.scrollLeft+=-1*(z.clientX-P.clientX));P=z;A.x2=r.touches[0].screenX;A.y2=r.touches[0].screenY;null!=A.speeds&&
|
|
422
|
+
(A.speeds.vertical=0,A.speeds.horizontal=0);null==N&&(N=setTimeout(b,250));r.cancelable&&t.current.options.tableOverflow&&r.preventDefault()}};e.touchend=function(r){n&&(clearTimeout(n),n=null);N&&(clearTimeout(N),N=null);P=S=null;if(k(r)){r=Date.now()-C;var z=A.x1,w=A.y1,D=A.x2,G=A.y2,Q=z==z&&w==G?0:Math.sqrt(Math.pow(z-z,2)+Math.pow(w-G,2));G>w&&(Q=-Q);10>Math.abs(G-w)&&(Q=0);G=0>=r?-1:Math.ceil(Q/(r/1E3));w=z==D&&w==w?0:Math.sqrt(Math.pow(z-D,2)+Math.pow(w-w,2));D>z&&(w=-w);10>Math.abs(D-z)&&(w=
|
|
423
|
+
0);A.speeds={vertical:G,horizontal:0>=r?-1:Math.ceil(w/(r/1E3))};(250>r&&200<Math.abs(A.speeds.vertical)||250>r&&200<Math.abs(A.speeds.horizontal))&&requestAnimationFrame(a)}};e.resize=function(){t.current&&1==t.current.parent.config.fullscreen&&H.refresh.call(t.current)};return e}(),t=function(k,b,c){b||(b={});if(b.cloud&&!c)typeof b.plugins.cloud==_$_cd07[84]?b.plugins.cloud.load(b,function(d){t(k,d,!0)}):console.error(_$_cd07[564]);else{if(k.spreadsheet)a=k.spreadsheet,Da[_$_cd07[11]].call(a,b);
|
|
424
|
+
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==_$_cd07[84]&&(a.worksheets[d].onload(),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],L.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]);
|
|
425
|
+
if(typeof a.config.onload==_$_cd07[84])a.config.onload(a);ia.state.call(a);for(d=0;d<a.worksheets.length;d++)Y.update.call(a.worksheets[d]);jSuites.loading.hide()};Array.isArray(b.worksheets)&&(b=b.worksheets);if(Array.isArray(b)){for(c=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}};t.license=null;t.setLicense=function(k){t.license=k};t.spreadsheet=[];t.picker=
|
|
426
|
+
la;t.setDictionary=function(k){jSuites.setDictionary(k)};t.extensions={};t.setExtensions=function(k){for(var b=Object.keys(k),c=0;c<b.length;c++)typeof k[b[c]]===_$_cd07[84]&&(t[b[c]]=k[b[c]],t.extensions[b[c]]=k[b[c]],t.license&&typeof t[b[c]].license==_$_cd07[84]&&t[b[c]].license.call(t,t.license))};t.destroy=function(k,b){if(k.spreadsheet){b&&na.unbind(k);b=t.spreadsheet.indexOf(k.spreadsheet);t.spreadsheet.splice(b,1);for(b=0;b<k.spreadsheet.worksheets.length;b++)I(k.spreadsheet.worksheets[b].options.worksheetName,
|
|
427
|
+
null);k.spreadsheet=null;k.jexcel=null;k.innerHTML=_$_cd07[3];k.classList.remove(_$_cd07[565]);k.classList.remove(_$_cd07[351])}};t.version=J;t.helpers=E;t.events=Ba;typeof formula!==_$_cd07[13]&&(t.formula=formula);t.editors=function(){var k={},b=function(c,a){return 1==c[a]||c.options&&1==c.options[a]?!0:c[a]==_$_cd07[231]||c.options&&c.options[a]==_$_cd07[231]?!0:!1};k.createEditor=function(c,a,d,e){e.parent.input.setAttribute(_$_cd07[101],!1);c==_$_cd07[223]?(c=document.createElement(_$_cd07[223]),
|
|
428
|
+
c.type=_$_cd07[55],c.value=d):c=document.createElement(_$_cd07[20]);c.style.width=a.offsetWidth-2+_$_cd07[44];c.style.height=a.offsetHeight-1+_$_cd07[44];e.parent.input.appendChild(c);return c};k.createDialog=function(c,a,d,e,f,g){c=k.createEditor(_$_cd07[20],c,a,f);c.classList.add(_$_cd07[566]);c.classList.add(_$_cd07[559]);800>window.innerWidth?(f.parent.input.style.top=_$_cd07[143],f.parent.input.style.left=_$_cd07[143]):(a=f.parent.input.getBoundingClientRect(),window.innerHeight<a.bottom&&(f.parent.input.style.marginTop=
|
|
429
|
+
-f.parent.input.offsetHeight));return c};k.general=function(){var c={},a=function(e){return(_$_cd07[3]+e)[0]==_$_cd07[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,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!=_$_cd07[14]&&m.type!=_$_cd07[311]&&m.type!=_$_cd07[310]||e.classList.add(_$_cd07[567]);return c.updateCell(e,
|
|
430
|
+
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===_$_cd07[3]||a(f)||typeof f===_$_cd07[14]||(p?(p=jSuites.mask.extract(f,p,!0))&&p.value!==_$_cd07[3]&&(n=p.value):1==(!1===l.parent.config.autoCasting||!1===m.autoCasting?!1:!0)&&(m.type==_$_cd07[14]||m.type==_$_cd07[311]||m.type==_$_cd07[310]?(p=jSuites.mask.extract(f,m,!0))&&p.value!==_$_cd07[3]&&(n=p.value):jSuites.isNumeric(Number(f))&&(n=Number(f))));null!==n&&(f=n);f=c.parseValue(g,h,f,l,m,
|
|
431
|
+
e);f instanceof Element||f instanceof HTMLDocument?(e.innerHTML=_$_cd07[3],e.appendChild(f)):1==l.parent.config.stripHTML?e.innerText=f:e.innerHTML=f;if(null!==n)return n}};c.openEditor=function(e,f,g,h,l,m){var p=l.parent.input;p.onblur=function(){p.classList.contains(_$_cd07[93])||l.closeEditor(e,!0)};if(m.type==_$_cd07[14]||m.type==_$_cd07[311]||m.type==_$_cd07[310])p.classList.add(_$_cd07[551]),a(f)||m.inputmode||(m.inputmode=_$_cd07[568]);g=null;a(f)||(m.inputmode&&p.setAttribute(_$_cd07[97],
|
|
432
|
+
m.inputmode),(g=d(m))?(m.disabledMaskOnEdition||(m.mask?(m=m.mask.split(_$_cd07[217]),p.setAttribute(_$_cd07[95],m[0])):m.locale&&p.setAttribute(_$_cd07[569],m.locale)),g.input=l.parent.input,l.parent.input.mask=g,jSuites.mask.render(f,g,!1)):f&&m.type==_$_cd07[310]&&(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:_$_cd07[3];a(f)?f=f.replace(/(\r\n|\n|\r)/gm,
|
|
433
|
+
_$_cd07[3]):m.type==_$_cd07[310]&&(f+=_$_cd07[570],e.classList.remove(_$_cd07[571]));return f};c.parseValue=function(e,f,g,h,l,m){a(g)&&1==h.parent.config.parseFormulas&&(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(_$_cd07[217]),f[1]&&(f[1].match(new RegExp(_$_cd07[572],_$_cd07[380]))&&(0>g?m.classList.add(_$_cd07[573]):m.classList.remove(_$_cd07[573])),f[1].match(new RegExp(_$_cd07[574],
|
|
434
|
+
_$_cd07[380]))&&0>g&&(e=_$_cd07[212]+e+_$_cd07[234]))),e&&(g=e));return g};c[_$_cd07[51]]=function(e,f){var g;return(g=d(e))?jSuites.mask.render(f,g,!0):e.type==_$_cd07[310]?100*parseFloat(f):f};c.destroyCell=function(e){e.classList.remove(_$_cd07[567])};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(_$_cd07[20]),f.classList.add(_$_cd07[575]),1==h.parent.config.stripHTML?
|
|
435
|
+
f.innerText=e:f.innerHTML=e,d.innerHTML=_$_cd07[3],d.appendChild(f))};c.createCell=c.updateCell;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=_$_cd07[576];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():_$_cd07[3]};return c}();k.dropdown=function(){var c={createCell:function(a,d,e,f,g,h){h.render==_$_cd07[577]?a.classList.add(_$_cd07[578]):a.classList.add(_$_cd07[579]);
|
|
436
|
+
if(a=c.updateCell(a,d,e,f,g,h))return a},destroyCell:function(a){a.classList.remove(_$_cd07[579])},updateCell:function(a,d,e,f,g,h){if(a){var l=c.getItem(a,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=_$_cd07[3]):a.innerHTML=_$_cd07[3];return d}},openEditor:function(a,d,e,f,g,h){var l=k.createEditor(_$_cd07[20],a,d,g),m=h.delimiter||_$_cd07[217];h=Object.create(h);h.options||(h.options={});typeof h.filter==_$_cd07[84]&&(h.source=
|
|
437
|
+
h.filter(g.el,a,e,f,h.source));typeof h.filterOptions==_$_cd07[84]&&(h=h.filterOptions(g,a,e,f,d,h));e=h.options;h.source&&(e.data=JSON.parse(JSON.stringify(h.source)));b(h,_$_cd07[580])&&(e.multiple=!0);b(h,_$_cd07[56])&&(e.autocomplete=!0);e.format=!0;e.opened=!0;e.width=a.offsetWidth-2;e.onclose=function(){g.closeEditor(a,!0)};b(h,_$_cd07[580])?d&&(e.value=(_$_cd07[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||
|
|
438
|
+
_$_cd07[217],p=l.dropdown.getText(!0),n=l.dropdown.getValue(!0),q=0;q<n.length;q++)!1===c.getItem(a,n[q],e,f,g,h)&&h.source.push({id:n[q],name:p[q]});l.dropdown.close(!0);if(d)return n.join(m)},fromLabel:function(a,d,e,f,g,h){a=h.delimiter||_$_cd07[217];e=[];f=[];Array.isArray(d)||(d=(_$_cd07[3]+d).split(a));for(g=0;g<d.length;g++)f[d[g].trim()]=!0;d=Object.keys(f);!b(h,_$_cd07[580])&&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);
|
|
439
|
+
return e.join(a)},getItem:function(a,d,e,f,g,h){f=h.delimiter||_$_cd07[217];a=[];e=[];Array.isArray(d)||(d=(_$_cd07[3]+d).split(f));for(f=0;f<d.length;f++)e[d[f].trim()]=!0;f=Object.keys(e);!b(h,_$_cd07[580])&&1<Object.keys(f).length&&(d=[],d[f[0]]=!0,e=d);if(h.source&&typeof h.source[0]!==_$_cd07[83])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]!==_$_cd07[13]&&a.push(h.render==_$_cd07[259]?h.source[d].color:h.render==
|
|
440
|
+
_$_cd07[581]?h.source[d].image:h.source[d].name);if(a.length){if(typeof h.render!==_$_cd07[13]){for(d=0;d<a.length;d++)e=d,f=a[d],f=h.render==_$_cd07[259]?_$_cd07[582]+f+_$_cd07[583]:h.render==_$_cd07[581]?_$_cd07[582]+f+_$_cd07[583]:h.render==_$_cd07[577]?_$_cd07[585]+(h.source[d].color||_$_cd07[584])+_$_cd07[586]+f+_$_cd07[587]:void 0,a[e]=f;return a.join(_$_cd07[3])}for(d=0;d<a.length;d++)a[d]=(_$_cd07[3]+a[d]).replace(_$_cd07[215],_$_cd07[588]);return a.join(_$_cd07[299])}return!1}};c[_$_cd07[51]]=
|
|
441
|
+
function(a,d){for(var e=0;e<a.source.length;e++)if(a.source[e].id==d)return a.render==_$_cd07[259]?a.source[e].color:a.render==_$_cd07[581]?a.source[e].image:a.source[e].name};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=_$_cd07[3]+e;g.substr(4,1)==_$_cd07[185]&&g.substr(7,1)==_$_cd07[185]?g=!0:(g=g.split(_$_cd07[185]),g=4==g[0].length&&g[0]==Number(g[0])&&
|
|
442
|
+
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=_$_cd07[3];return _$_cd07[3]}};c.createCell=c.updateCell;c.openEditor=function(d,e,f,g,h,l){l=Object.create(l);typeof l.filterOptions==_$_cd07[84]&&(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!==_$_cd07[13]&&(f.time=b(l,_$_cd07[589])?!0:!1);typeof f.readonly!==
|
|
443
|
+
_$_cd07[13]&&(f.readonly=f.readonly);f.value=e||null;f.placeholder=f.format;a=k.createEditor(_$_cd07[223],d,e,h);jSuites.calendar(a,f);!1===a.calendar.options.readonly&&a.focus()};c.closeEditor=function(d,e,f,g,h){d=a.calendar.close(!0,a.value?!0:!1);d=a.value?d:_$_cd07[3];if(e)return d};c.getFormat=function(d){return d&&d.format?d.format:d&&d.options&&d.options.format?d.options.format:_$_cd07[590]};c[_$_cd07[51]]=function(d,e){d=c.getFormat(d);return jSuites.calendar.getDateString(e,d)};return c}();
|
|
444
|
+
k.color=function(){var c={},a=null;c.updateCell=function(d,e,f,g,h,l){d&&(l.render==_$_cd07[591]?(f=document.createElement(_$_cd07[20]),f.className=_$_cd07[259],f.style.backgroundColor=e,d.innerText=_$_cd07[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==_$_cd07[84]&&(l=l.filterOptions(h,d,f,g,e,l));l.value=e;l.onclose=function(m,p){h.closeEditor(d,!0)};a=k.createEditor(_$_cd07[223],d,e,
|
|
445
|
+
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[_$_cd07[51]]=function(d,e){d=document.createElement(_$_cd07[20]);d.style.width=_$_cd07[592];d.style.height=_$_cd07[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!=_$_cd07[593]&&d!=_$_cd07[594]?!0:!1;e=document.createElement(_$_cd07[223]);e.type=_$_cd07[254];e.checked=d;e.onclick=function(){g.setValue(a,this.checked)};
|
|
446
|
+
(h&&1==h.readOnly||!g.isEditable())&&e.setAttribute(_$_cd07[595],_$_cd07[595]);a.innerHTML=_$_cd07[3];a.appendChild(e);return d},updateCell:function(a,d){d=d&&d!=_$_cd07[593]&&d!=_$_cd07[594]?!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[_$_cd07[51]]=function(a,d){return 1==d||1==d||d==_$_cd07[231]?jSuites.translate(_$_cd07[231]):jSuites.translate(_$_cd07[593])};return c}();
|
|
447
|
+
k.radio=function(){var c={createCell:function(a,d,e,f,g,h){a.getAttribute(_$_cd07[42]);e=document.createElement(_$_cd07[223]);e.type=_$_cd07[256];e.checked=1==d||1==d||d==_$_cd07[231]?!0:!1;e.onclick=function(){g.setValue(a,!0)};(h&&1==h.readOnly||!g.isEditable())&&e.setAttribute(_$_cd07[595],_$_cd07[595]);a.innerHTML=_$_cd07[3];a.appendChild(e)},updateCell:function(a,d,e,f,g){d=1==d||1==d||d==_$_cd07[231]||d==_$_cd07[596]?!0:!1;a&&(a.children[0].checked=d);if(1==d){a=[];for(var h=0;h<g.options.data.length;h++)f!=
|
|
448
|
+
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[_$_cd07[51]]=function(a,d){return 1==d||1==d||d==_$_cd07[231]?_$_cd07[231]:_$_cd07[593]};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=_$_cd07[246]):e=l.sequence+1;e>l.sequence&&
|
|
449
|
+
(l.sequence=e);return d.innerText=e};c.updateCell=c.createCell;c.openEditor=function(d,e,f,g,h,l){a=k.createEditor(_$_cd07[223],d,e,h);a.onblur=function(){h.closeEditor(d,!0)};a.focus();a.value=e};c.closeEditor=function(d,e,f,g,h){return e?a.value:_$_cd07[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>
|
|
450
|
+
e)e=0;if(d.children[0]&&d.children[0].tagName==_$_cd07[549])var f=d.children[0];else f=document.createElement(_$_cd07[20]),f.classList.add(_$_cd07[260]),d.innerText=_$_cd07[3],d.classList.add(_$_cd07[597]),d.appendChild(f);f.style.width=parseInt(e)+_$_cd07[570];f.setAttribute(_$_cd07[269],parseInt(e)+_$_cd07[570])};c.destroyCell=function(d){d.classList.remove(_$_cd07[597])};c.updateCell=c.createCell;c.openEditor=function(d,e,f,g,h,l){a=k.createEditor(_$_cd07[223],d,e,h);a.type=_$_cd07[14];a.setAttribute(_$_cd07[598],
|
|
451
|
+
0);a.setAttribute(_$_cd07[599],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:_$_cd07[3]};return c}();k.rating=function(){var c={},a=null;c.createCell=function(d,e,f,g,h,l){return c.setCell(d,e,l)};c.destroyCell=function(d){d.classList.remove(_$_cd07[600])};c.updateCell=c.createCell;c.openEditor=function(d,e,f,g,h,l){a=k.createEditor(_$_cd07[223],d,e,h);a.type=_$_cd07[14];a.setAttribute(_$_cd07[598],0);a.setAttribute(_$_cd07[599],
|
|
452
|
+
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:_$_cd07[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:_$_cd07[573];var g=document.createElement(_$_cd07[20]);g.setAttribute(_$_cd07[269],parseInt(e)+_$_cd07[601]);g.classList.add(_$_cd07[261]);for(var h=0;h<e;h++){var l=document.createElement(_$_cd07[446]);l.className=_$_cd07[500];l.style.color=f;l.innerHTML=_$_cd07[602];g.appendChild(l)}d.innerHTML=
|
|
453
|
+
_$_cd07[3];d.className=_$_cd07[600];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==_$_cd07[555]?e=a.children[0]:(e=document.createElement(_$_cd07[201]),a.innerText=_$_cd07[3],a.appendChild(e),h.options&&h.options.url&&e.setAttribute(_$_cd07[603],h.options.url)),e.innerText=d)}};c.updateCell=c.createCell;c.openEditor=function(a,d,e,f,g,h){g.parent.input.classList.add(_$_cd07[551]);g.parent.input.onblur=
|
|
454
|
+
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(_$_cd07[551]);return d?g.parent.input.innerText.replace(new RegExp(/\n/,_$_cd07[188]),_$_cd07[3]):_$_cd07[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==_$_cd07[604])d.children[0].src=e;else{var m=document.createElement(_$_cd07[37]);
|
|
455
|
+
l.render==_$_cd07[605]&&m.classList.add(_$_cd07[605]);l.options&&(m.style.maxWidth=_$_cd07[606],l.options.absolute&&(d.classList.add(_$_cd07[607]),m.setAttribute(_$_cd07[608],-1),m.classList.add(_$_cd07[222]),m.classList.add(_$_cd07[609]),m.settings=function(){h.openEditor(d,e,f,g,h,l)},m.dblclick=function(){h.openEditor(d,!0)},m[_$_cd07[610]]=function(){h.setValueFromCoords(f,g,_$_cd07[3])}),l.options.width&&(m.style.width=parseInt(l.options.width)+_$_cd07[44]),l.options.height&&(m.style.height=
|
|
456
|
+
parseInt(l.options.height)+_$_cd07[44]));m.src=e;d.innerHTML=_$_cd07[3];d.appendChild(m)}else d.innerHTML=_$_cd07[3]};c.updateCell=c.createCell;c.openEditor=function(d,e,f,g,h,l){(l&&l.options?l.options:{}).value=e;a=k.createDialog(d,e,f,g,h,l);e&&(d=document.createElement(_$_cd07[37]),d.src=e,d.classList.add(_$_cd07[611]),d.style.width=_$_cd07[606],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==_$_cd07[604]?d.src:_$_cd07[3]};c[_$_cd07[51]]=
|
|
457
|
+
function(d,e){return _$_cd07[612]+e+_$_cd07[613]};return c}();k.html=function(){var c={},a=null;c.createCell=function(d,e){d.classList.add(_$_cd07[614]);var f=document.createElement(_$_cd07[20]);f.innerHTML=e;d.appendChild(f)};c.updateCell=function(d,e){d&&(d.firstChild.innerHTML=e)};c.destroyCell=function(d){d.classList.remove(_$_cd07[614])};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=_$_cd07[576];e=k.createDialog(d,e,f,g,h,l);a=jSuites.editor(e,
|
|
458
|
+
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,a,d,e,f){c.style.display=_$_cd07[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(_$_cd07[615]);c.updateCell(d,
|
|
459
|
+
e)};c.updateCell=function(d,e){d&&(d.innerHTML=e)};c.destroyCell=function(d){d.classList.remove(_$_cd07[615])};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,g,h,l);d=document.createElement(_$_cd07[20]);d.style.margin=_$_cd07[22];d.style.marginRight=_$_cd07[616];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=
|
|
460
|
+
function(d,e,f,g,h,l){d.classList.add(_$_cd07[579]);var m;(m=h.parent.getWorksheetInstance(l.worksheetId))?m.rows?c.updateCell(d,e,f,g,h,l):(d.innerText=_$_cd07[246],h.parent.queue.push([h,f,g])):(d.innerText=_$_cd07[246],h.parent.queue.push([h,f,g]))};c.destroyCell=function(d){d.classList.remove(_$_cd07[579])};c.updateCell=function(d,e,f,g,h,l){d&&(typeof l.worksheetId==_$_cd07[13]?d.innerText=_$_cd07[246]:d.innerHTML=c.getValue(d,e,f,g,h,l))};c.openEditor=function(d,e,f,g,h,l){var m=l.delimiter||
|
|
461
|
+
_$_cd07[217];l=Object.create(l);l.options||(l.options={});typeof l.filter==_$_cd07[84]&&(l.source=l.filter(h.el,d,f,g,l.source));typeof l.filterOptions==_$_cd07[84]&&(l=l.filterOptions(h,d,f,g,e,l));f=l.options;f.data=c.getSource(h,l);b(l,_$_cd07[580])&&(f.multiple=!0);b(l,_$_cd07[56])&&(f.autocomplete=!0);f.opened=!0;f.width=d.offsetWidth-2;f.onclose=function(){h.closeEditor(d,!0)};b(l,_$_cd07[580])?e&&(f.value=(_$_cd07[3]+e).split(m)):f.value=e;a=k.createEditor(_$_cd07[20],d,e,h);a=jSuites.dropdown(a,
|
|
462
|
+
f)};c.closeEditor=function(d,e,f,g,h,l){d=l.delimiter||_$_cd07[217];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==_$_cd07[17]&&(h=h.parent.getWorksheetInstance(l.worksheetId))){f=l.worksheetColumn?l.worksheetColumn:0;0<=l.worksheetImage&&(f=l.worksheetImage);if(e==_$_cd07[3]||0==e||null==e||void 0==e)return _$_cd07[3];e=(_$_cd07[3]+e).split(_$_cd07[217]);for(g=0;g<e.length;g++){var m=e[g].trim();var p=h.name(f);m=h.getRowById(m);
|
|
463
|
+
p=!1===m?_$_cd07[617]:m[p];0<=l.worksheetImage&&(p=_$_cd07[618]+p+_$_cd07[619]);d.push(p)}return 0<=l.worksheetImage?d.join(_$_cd07[3]):d.join(_$_cd07[299])}return _$_cd07[246]};c.getSource=function(d,e){var f=e.worksheetColumn?e.worksheetColumn:0,g=null;typeof e.worksheetId==_$_cd07[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(_$_cd07[620]+
|
|
464
|
+
e.worksheetId);return l};c[_$_cd07[51]]=function(d,e){for(var f=0;f<d.source.length;f++)if(d.source[f].id==e)return d.render==_$_cd07[259]?d.source[f].color:d.render==_$_cd07[581]?d.source[f].image:d.source[f].name};return c}();return k}();typeof jQuery!==_$_cd07[13]&&function(k){k.fn.jspreadsheet=k.fn.jexcel=function(b){var c=k(this)[_$_cd07[51]](0);if(c.jspreadsheet){if(typeof arguments[0]==_$_cd07[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,
|
|
465
|
+
d))}return t(k(this)[_$_cd07[51]](0),arguments[0])}}(jQuery);return t});
|