jspreadsheet 8.6.5 → 9.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +12 -5
- package/dist/index.js +440 -452
- package/dist/jspreadsheet.css +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Jspreadsheet
|
|
2
|
+
* Jspreadsheet v9.0.2
|
|
3
3
|
*
|
|
4
4
|
* Website: https://jspreadsheet.com
|
|
5
5
|
* Description: Create amazing web based spreadsheets.
|
|
@@ -15,454 +15,442 @@ if (! jSuites && typeof(require) === 'function') {
|
|
|
15
15
|
var jSuites = require('jsuites');
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(
|
|
19
|
-
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(
|
|
20
|
-
$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(
|
|
21
|
-
$jscomp.polyfill=function(
|
|
22
|
-
$jscomp.polyfillIsolated=function(
|
|
23
|
-
$jscomp.global.Symbol(
|
|
24
|
-
$jscomp.iteratorFromArray=function(
|
|
25
|
-
var _$
|
|
26
|
-
"none","status","data-x","data-y","px","
|
|
27
|
-
"onundo","onredo","object","function","contextMenu","toolbar","onevent","Jspreadsheet: cursor not in the viewport","keydown","oneditionstart","oncreateeditor","jss_focus","jss_formula","oneditionend","data-mask","data-value","inputmode","0","style","jss_input","contentEditable","setRowId","onchangerowid","setBorder","resetBorders","updateCells","setFormula","updateData","onbeforesave","POST","Authorization","Bearer ","disconected",": ",
|
|
28
|
-
"_top","onsave","persistence","?","?worksheet=","&worksheet=","add","remove","jss_cursor","selected","main","copying","onblur","onfocus","onselection"," ","'","'!","!",":","jss_border","cloning","jss_border_","15","-
|
|
29
|
-
"51px","jss_helper_row","No cell selected","Invalid merged properties","onmerge","rowspan","Column name","data-title","onchangeheader","jss_filters_icon","col","oncreatecolumn","setFooter","onchangefooter","setFooterValue","onchangefootervalue","resetFooter","setNestedHeaders","onchangenested","jss_nested","resetNestedHeaders","setNestedCell",
|
|
30
|
-
"JSS: For better results, please allow pagination or tableOverflow.","onpaste","Export not allowed","\ufeff","text/csv;charset=utf-8;",".csv","a","download","setDefinedNames","#1a237e","#b71c1c","#880e4f","#1b5e20","#ff6f00","/","*","^","(","[","|","<",">",";","data-token","picker","jss_picker","click","active","focus","input","jss_object",
|
|
31
|
-
"#LOOP","Reference loop detected","#SELF","Self Reference detected","#ERROR","Table does not exist or is not loaded yet","CHART(","#SPILL!","#REF!","$","Something went wrong","onafterchanges","checkbox","autonumber","radio","email","url","color","progressbar","rating","onformulachain","onbeforechange","onchange","oncreatecell","values",
|
|
32
|
-
"
|
|
33
|
-
"Jspreadsheet: it is not possible to delete the last column","onbeforedeletecolumn","onbeforedeletecolumn returned false","ondeletecolumn","; ","onchangestyle","No cell provided","onresetstyle","onbeforecomments","oncomments","setMeta","onchangemeta","resetMeta",
|
|
34
|
-
"
|
|
35
|
-
"jss_loading","textarea","jss_textarea","-1","bottom","Defined names are only available on the Premium edition.","beforeinit","Sheet","Worksheet clash name: ",". It is highly recommended to define a unique worksheetName on the initialization.",
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"border_top","border_right","border_bottom","border_clear","black","border-left: ","px solid ","border-left: ; ","border-right: ","border-right: ; ","border-top: ","border-top: ; ","border-bottom: ","border-bottom: ; ","material-icons",
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
{
|
|
45
|
-
|
|
46
|
-
a
|
|
47
|
-
b
|
|
48
|
-
this.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
_$
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
(this.
|
|
61
|
-
|
|
62
|
-
this.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
this.results[
|
|
67
|
-
|
|
68
|
-
this.tbody.children
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
(
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
this.
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
k.
|
|
107
|
-
|
|
108
|
-
b
|
|
109
|
-
|
|
110
|
-
0;
|
|
111
|
-
|
|
112
|
-
this.
|
|
113
|
-
c
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
(
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
d)
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
(this.
|
|
139
|
-
a
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
this.
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
(
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
(
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
[];var
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
this))return
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
_$
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
this.
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
(
|
|
191
|
-
|
|
192
|
-
null
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
g.
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
_$
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
g
|
|
212
|
-
|
|
213
|
-
this;if(
|
|
214
|
-
|
|
215
|
-
0;
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
g)
|
|
219
|
-
|
|
220
|
-
[]
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
function(
|
|
231
|
-
0
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
b
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
(
|
|
249
|
-
|
|
250
|
-
this.
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
c
|
|
255
|
-
d.
|
|
256
|
-
|
|
257
|
-
this.
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
this.
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
(
|
|
268
|
-
|
|
269
|
-
this.
|
|
270
|
-
this
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
this.
|
|
275
|
-
|
|
276
|
-
!0
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
if(
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
p=
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
(
|
|
290
|
-
|
|
291
|
-
c
|
|
292
|
-
|
|
293
|
-
(
|
|
294
|
-
|
|
295
|
-
b
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
(
|
|
300
|
-
|
|
301
|
-
this.
|
|
302
|
-
|
|
303
|
-
(
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
this.
|
|
310
|
-
|
|
311
|
-
this.
|
|
312
|
-
this.
|
|
313
|
-
for(var
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
h
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
[])
|
|
336
|
-
|
|
337
|
-
(
|
|
338
|
-
|
|
339
|
-
this.
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
b,
|
|
346
|
-
(
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
g.
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
k.
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
_$
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
b=
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
b.
|
|
380
|
-
(
|
|
381
|
-
b)
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
_$
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
[
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
r.
|
|
405
|
-
|
|
406
|
-
r.current.
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
r.current.
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
(
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
function(e
|
|
436
|
-
l.
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
!
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
a.value=e
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
_$_c824[561]?e=a.children[0]:(e=document.createElement(_$_c824[203]),a.innerText=_$_c824[3],a.appendChild(e),h.options&&h.options.url&&e.setAttribute(_$_c824[609],h.options.url)),e.innerText=d)}};c.updateCell=c.createCell;c.openEditor=function(a,d,e,f,g,h){g.parent.input.classList.add(_$_c824[557]);g.parent.input.onblur=function(){g.closeEditor(a,!0)};g.parent.input.innerText=d;jSuites.focus(g.parent.input)};c.closeEditor=function(a,d,e,f,g){g.parent.input.classList.remove(_$_c824[557]);return d?
|
|
458
|
-
g.parent.input.innerText.replace(new RegExp(/\n/,_$_c824[190]),_$_c824[3]):_$_c824[3]};return c}();k.url=k.email;k.image=function(){var c={},a=null;c.createCell=function(d,e,f,g,h,l){if(d)if(e)if(d.children&&d.children[0]&&d.children[0].tagName==_$_c824[610])d.children[0].src=e;else{var m=document.createElement(_$_c824[37]);l.render==_$_c824[611]&&m.classList.add(_$_c824[611]);l.options&&(m.style.maxWidth=_$_c824[612],l.options.absolute&&(d.classList.add(_$_c824[613]),m.setAttribute(_$_c824[614],
|
|
459
|
-
-1),m.classList.add(_$_c824[227]),m.classList.add(_$_c824[615]),m.settings=function(){h.openEditor(d,e,f,g,h,l)},m.dblclick=function(){h.openEditor(d,!0)},m[_$_c824[616]]=function(){h.setValueFromCoords(f,g,_$_c824[3])}),l.options.width&&(m.style.width=parseInt(l.options.width)+_$_c824[44]),l.options.height&&(m.style.height=parseInt(l.options.height)+_$_c824[44]));m.src=e;d.innerHTML=_$_c824[3];d.appendChild(m)}else d.innerHTML=_$_c824[3]};c.updateCell=c.createCell;c.openEditor=function(d,e,f,g,h,
|
|
460
|
-
l){(l&&l.options?l.options:{}).value=e;a=k.createDialog(d,e,f,g,h,l);e&&(d=document.createElement(_$_c824[37]),d.src=e,d.classList.add(_$_c824[617]),d.style.width=_$_c824[612],a.appendChild(d));jSuites.image(a,l)};c.closeEditor=function(d,e,f,g,h,l){if(e&&(d=a.children[0]))return d.tagName==_$_c824[610]?d.src:_$_c824[3]};c[_$_c824[51]]=function(d,e){return _$_c824[618]+e+_$_c824[619]};return c}();k.html=function(){var c={},a=null;c.createCell=function(d,e){d.classList.add(_$_c824[620]);var f=document.createElement(_$_c824[20]);
|
|
461
|
-
f.innerHTML=e;d.appendChild(f)};c.updateCell=function(d,e){d&&(d.firstChild.innerHTML=e)};c.destroyCell=function(d){d.classList.remove(_$_c824[620])};c.openEditor=function(d,e,f,g,h,l){var m=l&&l.options?l.options:{};m.focus=!0;m.value=e;m.border=!1;m.height=_$_c824[582];e=k.createDialog(d,e,f,g,h,l);a=jSuites.editor(e,m);a.close=function(){h.closeEditor(d,!0)};jSuites.tracking(a,!0)};c.closeEditor=function(d,e,f,g,h,l){jSuites.tracking(a,!1);d=a.getData();if(e)return d};return c}();k.hidden=function(){return{createCell:function(c,
|
|
462
|
-
a,d,e,f){c.style.display=_$_c824[40];c.innerText=a},updateCell:function(c,a,d,e,f){c&&(c.innerText=a)},openEditor:function(c,a,d,e,f){return!1},closeEditor:function(c,a){return!1}}}();k.tags=function(){var c={},a=null;c.createCell=function(d,e){d.classList.add(_$_c824[621]);c.updateCell(d,e)};c.updateCell=function(d,e){d&&(d.innerHTML=e)};c.destroyCell=function(d){d.classList.remove(_$_c824[621])};c.openEditor=function(d,e,f,g,h,l){var m=l&&l.options?l.options:{};m.value=e;a=k.createDialog(d,e,f,
|
|
463
|
-
g,h,l);d=document.createElement(_$_c824[20]);d.style.margin=_$_c824[22];d.style.marginRight=_$_c824[622];a.appendChild(d);a=jSuites.tags(d,m);d.focus();jSuites.focus(d)};c.closeEditor=function(d,e,f,g,h,l){d=a.getValue();if(e)return d};return c}();k.record=function(){var c={},a=null;c.createCell=function(d,e,f,g,h,l){d.classList.add(_$_c824[585]);var m;(m=h.parent.getWorksheetInstance(l.worksheetId))?m.rows?c.updateCell(d,e,f,g,h,l):(d.innerText=_$_c824[251],h.parent.queue.push([h,f,g])):(d.innerText=
|
|
464
|
-
_$_c824[251],h.parent.queue.push([h,f,g]))};c.destroyCell=function(d){d.classList.remove(_$_c824[585])};c.updateCell=function(d,e,f,g,h,l){d&&(typeof l.worksheetId==_$_c824[13]?d.innerText=_$_c824[251]:d.innerHTML=c.getValue(d,e,f,g,h,l))};c.openEditor=function(d,e,f,g,h,l){var m=l.delimiter||_$_c824[219];l=Object.create(l);l.options||(l.options={});typeof l.filter==_$_c824[85]&&(l.source=l.filter(h.el,d,f,g,l.source));typeof l.filterOptions==_$_c824[85]&&(l=l.filterOptions(h,d,f,g,e,l));f=l.options;
|
|
465
|
-
f.data=c.getSource(h,l);b(l,_$_c824[586])&&(f.multiple=!0);b(l,_$_c824[56])&&(f.autocomplete=!0);f.opened=!0;f.width=d.offsetWidth-2;f.onclose=function(){h.closeEditor(d,!0)};b(l,_$_c824[586])?e&&(f.value=(_$_c824[3]+e).split(m)):f.value=e;a=k.createEditor(_$_c824[20],d,e,h);a=jSuites.dropdown(a,f)};c.closeEditor=function(d,e,f,g,h,l){d=l.delimiter||_$_c824[219];f=a.getValue(!0);a.close(!0);if(e)return f.join(d)};c.getValue=function(d,e,f,g,h,l){d=[];if(typeof l.worksheetId==_$_c824[17]&&(h=h.parent.getWorksheetInstance(l.worksheetId))){f=
|
|
466
|
-
l.worksheetColumn?l.worksheetColumn:0;0<=l.worksheetImage&&(f=l.worksheetImage);if(e==_$_c824[3]||0==e||null==e||void 0==e)return _$_c824[3];e=(_$_c824[3]+e).split(_$_c824[219]);for(g=0;g<e.length;g++){var m=e[g].trim();var p=h.name(f);m=h.getRowById(m);p=!1===m?_$_c824[623]:m[p];0<=l.worksheetImage&&(p=_$_c824[624]+p+_$_c824[625]);d.push(p)}return 0<=l.worksheetImage?d.join(_$_c824[3]):d.join(_$_c824[305])}return _$_c824[251]};c.getSource=function(d,e){var f=e.worksheetColumn?e.worksheetColumn:0,
|
|
467
|
-
g=null;typeof e.worksheetId==_$_c824[17]&&(g=d.parent.getWorksheetInstance(e.worksheetId));if(g){var h,l=[];for(d=0;d<g.rows.length;d++)if(h=g.value(f,d))h={id:g.getRowId(d),name:h},void 0!=e.worksheetImage&&(h.image=g.value(e.worksheetImage,d)),l.push(h)}else console.error(_$_c824[626]+e.worksheetId);return l};c[_$_c824[51]]=function(d,e){for(var f=0;f<d.source.length;f++)if(d.source[f].id==e)return d.render==_$_c824[264]?d.source[f].color:d.render==_$_c824[587]?d.source[f].image:d.source[f].name};
|
|
468
|
-
return c}();return k}();typeof jQuery!==_$_c824[13]&&function(k){k.fn.jspreadsheet=k.fn.jexcel=function(b){var c=k(this)[_$_c824[51]](0);if(c.jspreadsheet){if(typeof arguments[0]==_$_c824[14])var a=arguments[0],d=2;else a=0,d=1;return c.jspreadsheet[a][b].apply(c.jspreadsheet[a],Array.prototype.slice.call(arguments,d))}return r(k(this)[_$_c824[51]](0),arguments[0])}}(jQuery);return r});
|
|
18
|
+
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(E){var H=0;return function(){return H<E.length?{done:!1,value:E[H++]}:{done:!0}}};$jscomp.arrayIterator=function(E){return{next:$jscomp.arrayIteratorImpl(E)}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;
|
|
19
|
+
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(E,H,L){if(E==Array.prototype||E==Object.prototype)return E;E[H]=L.value;return E};$jscomp.getGlobal=function(E){E=["object"==typeof globalThis&&globalThis,E,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var H=0;H<E.length;++H){var L=E[H];if(L&&L.Math==Math)return L}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
|
|
20
|
+
$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(E,H){var L=$jscomp.propertyToPolyfillSymbol[H];if(null==L)return E[H];L=E[L];return void 0!==L?L:E[H]};
|
|
21
|
+
$jscomp.polyfill=function(E,H,L,V){H&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(E,H,L,V):$jscomp.polyfillUnisolated(E,H,L,V))};$jscomp.polyfillUnisolated=function(E,H,L,V){L=$jscomp.global;E=E.split(".");for(V=0;V<E.length-1;V++){var Q=E[V];if(!(Q in L))return;L=L[Q]}E=E[E.length-1];V=L[E];H=H(V);H!=V&&null!=H&&$jscomp.defineProperty(L,E,{configurable:!0,writable:!0,value:H})};
|
|
22
|
+
$jscomp.polyfillIsolated=function(E,H,L,V){var Q=E.split(".");E=1===Q.length;V=Q[0];V=!E&&V in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var da=0;da<Q.length-1;da++){var P=Q[da];if(!(P in V))return;V=V[P]}Q=Q[Q.length-1];L=$jscomp.IS_SYMBOL_NATIVE&&"es6"===L?V[Q]:null;H=H(L);null!=H&&(E?$jscomp.defineProperty($jscomp.polyfills,Q,{configurable:!0,writable:!0,value:H}):H!==L&&(void 0===$jscomp.propertyToPolyfillSymbol[Q]&&(L=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[Q]=$jscomp.IS_SYMBOL_NATIVE?
|
|
23
|
+
$jscomp.global.Symbol(Q):$jscomp.POLYFILL_PREFIX+L+"$"+Q),$jscomp.defineProperty(V,$jscomp.propertyToPolyfillSymbol[Q],{configurable:!0,writable:!0,value:H})))};$jscomp.initSymbol=function(){};$jscomp.iteratorPrototype=function(E){E={next:E};E[Symbol.iterator]=function(){return this};return E};
|
|
24
|
+
$jscomp.iteratorFromArray=function(E,H){E instanceof String&&(E+="");var L=0,V=!1,Q={next:function(){if(!V&&L<E.length){var da=L++;return{value:H(da,E[da]),done:!1}}V=!0;return{done:!0,value:void 0}}};Q[Symbol.iterator]=function(){return Q};return Q};$jscomp.polyfill("Array.prototype.values",function(E){return E?E:function(){return $jscomp.iteratorFromArray(this,function(H,L){return L})}},"es8","es3");
|
|
25
|
+
var _$_496c=["use strict","{","}","","9.0.2","Base","https://jspreadsheet.com","Unlicensed","Jspreadsheet Pro\r\n"," edition ","\r\n","set","=","undefined","number","fullscreen","block","string","readonly","jss_hidden_index","div","right","10px","pointer","/v8",",","localhost",".","v8"," (Expired)","Licensed to: ","Premium","License required","A valid license is required","This version is not included on the scope of this license","Your license is expired","jspreadsheet","img","/jspreadsheet/","logo.png",
|
|
26
|
+
"none","status","edition","scope","data-x","data-y","get","px","jss_frozen","scroll","wheel","goto","jss_scroll","jss_hidden","hidden","jss_content_overflow","onresize","300px","Jspreadsheet Pro","text","autocomplete","dropdown","GET","json","Jspreadsheet Alert: secureFormulas is set to false.","setConfig","insertRow","deleteRow","insertColumn","deleteColumn","moveRow","moveColumn","setMerge","removeMerge","setStyle","resetStyle","setWidth","setHeight","setHeader","setComments","orderBy","setValue",
|
|
27
|
+
"setProperty","updateProperty","renameWorksheet","moveWorksheet","onundo","onredo","object","function","contextMenu","toolbar","onevent","Jspreadsheet: cursor not in the viewport","keydown","oneditionstart","oncreateeditor","jss_focus","jss_formula","oneditionend","data-mask","data-value","inputmode","0","style","jss_input","contentEditable","setRowId","onchangerowid","setBorder","resetBorders","updateCells","setFormula","updateData","onbeforesave","POST","Authorization","Bearer ","disconected",": ",
|
|
28
|
+
"Sorry, something went wrong, refreshing your spreadsheet...","_top","onsave","persistence","?","?worksheet=","&worksheet=","add","remove","jss_cursor","selected","main","copying","onblur","onfocus","onselection"," ","'","'!","!",":","jss_border","cloning","jss_border_","15","jss_resize_corner","data-action","ontouchstart","moveLeft","0px","-6px","moveTop","moveRight","moveDown","-2000px","tr","jss_group_container","td"," ",".jss_group","jss_group","+","width","Jspreadsheet: This column is part of a merged cell.",
|
|
29
|
+
"jss_dragging","1px","jss_helper_col","Jspreadsheet: This row is part of a merged cell","Jspreadsheet: Please clear your search before perform this action","51px","jss_helper_row","No cell selected","Invalid merged properties","onmerge","colspan","rowspan","Column name","data-title","onchangeheader","jss_filters_icon","col","oncreatecolumn","setFooter","onchangefooter","setFooterValue","onchangefootervalue","resetFooter","setNestedHeaders","onchangenested","jss_nested","resetNestedHeaders","setNestedCell",
|
|
30
|
+
"onchangenestedcell","center","data-nested-x","data-nested-y","align","calendar","-","00:00:00",'"',"g",'""',"\t","oncopy","copy","color: initial","onbeforepaste","JSS: For better results, please allow pagination or tableOverflow.","onpaste","Export not allowed","\ufeff","text/csv;charset=utf-8;",".csv","a","download","setDefinedNames","#1a237e","#b71c1c","#880e4f","#1b5e20","#ff6f00","/","*","^","(","[","|","<",">",";","data-token","picker","jss_picker","click","active","focus","input","jss_object",
|
|
31
|
+
"contenteditable","blur","last",'<b class="','" data-token="','">',"</b>","data-single","true","b","&",")","]","var "," = {};"," = ",";\n","; return ","onbeforeformula","#LOOP","Reference loop detected","#SELF","Self Reference detected","#ERROR","Table does not exist or is not loaded yet","CHART(","#SPILL!","#REF!","$","Something went wrong","onafterchanges","checkbox","autonumber","radio","email","url","color","progressbar","rating","onformulachain","onbeforechange","onchange","oncreatecell","values",
|
|
32
|
+
"mergeCells","jss_wrap","title","jss_unlocked","onchangeproperty","jss_row","oncreaterow","Jspreadsheet: Invalid origin or destination","onmoverow","Jspreadsheet: Insert row is not enabled in the table configuration","onbeforeinsertrow","onbeforeinsertrow returned false","oninsertrow","Jspreadsheet: Delete row is not enabled in the table configuration","onbeforedeleterow","onbeforedeleterow returned false","meta","cells","comments","ondeleterow","Jspreadsheet: Invalid origin","Jspreadsheet: Invalid destination",
|
|
33
|
+
"onmovecolumn","Jspreadsheet: Insert column is not enabled in the table configuration","onbeforeinsertcolumn","onbeforeinsertcolumn returned false","col_","oninsertcolumn","Jspreadsheet: Delete column is not enabled in the table configuration","Jspreadsheet: it is not possible to delete the last column","onbeforedeletecolumn","onbeforedeletecolumn returned false","ondeletecolumn","; ","onchangestyle","No cell provided","onresetstyle","onbeforecomments","oncomments","setMeta","onchangemeta","resetMeta",
|
|
34
|
+
"onresetmeta","arrow-down","percent","numeric","onbeforesort","This action will destroy any existing merged cells. Are you sure?","onsort","arrow-up","jss_pagination","Jspreadsheet: No pagination defined","Jspreadsheet: pagination not defined","onbeforechangepage","onchangepage","No records found","jss_page","jss_page_selected","Showing page {0} of {1} entries","jss_content","selectstart","table","thead","tbody","tfoot","colgroup","50","jss_selectall","jss","cellpadding","cellspacing","unselectable",
|
|
35
|
+
"yes","jss_overflow","jss_locked","jss_corner","on","onselectstart","return false","X","Y","jss_content_pagination","Frozen columns cannot be greater than the number of available columns","rows","onchangereferences","jss_container","jss_toolbar","jss_helper","jss_loading","textarea","jss_textarea","-1","bottom","Defined names are only available on the Premium edition.","beforeinit","Sheet","Worksheet clash name: ",". It is highly recommended to define a unique worksheetName on the initialization.",
|
|
36
|
+
"jss_worksheet","init","To improve the performance, use tableOverflow or pagination.","resize","touchstart","touchmove","touchend","onresizecolumn","onresizerow","label","jss_filters_active","Jspreadsheet: the filter is not enabled.","onopenfilter","Blanks","onbeforefilter","onfilter","gi","jss_filters_options","INPUT","Search","jss_filters_search","button","Ok","jss_filters_apply","jss_filters",'<input type="checkbox"> ',"Add current selection to filter",'<input type="checkbox"> (',"Select all",
|
|
37
|
+
"select","jss_pagination_dropdown","option","Show","entries","jss_search","onbeforesearch","onsearch","jss_search_container","jss_contextmenu","Mac","⌘","Ctrl","tabs","Rename this worksheet","Delete this worksheet","Are you sure?","line","nested","Rename this cell","header","row","cell","Cut","content_cut"," + X","Copy","content_copy"," + C","Paste","content_paste"," + V","Insert a new column before","Insert a new column after","Delete selected columns","Rename this column","Create a new row",
|
|
38
|
+
"Order ascending","Order descending","Insert a new row before","Insert a new row after","Delete selected rows","Edit comments","Add comments","notes","Comments","Clear comments","Save as","save"," + S","About","info","with-toolbar","i","undo","redo","divisor","120px","Verdana","Arial","Courier New",'<span style="font-family:',"</span>","font-family","48px","format_size","x-small","small","medium","large","x-large",'<span style="font-size:',"font-size","format_align_left","format_align_center","format_align_right",
|
|
39
|
+
"format_align_justify",'<i class="material-icons">',"</i>","text-align","_","format_bold","font-weight","bold","format_color_text","format_color_fill","background-color","border_all","border_outer","border_inner","border_horizontal","border_vertical","border_left","border_top","border_right","border_bottom","border_clear","black","border-left: ","px solid ","border-left: ; ","border-right: ","border-right: ; ","border-top: ","border-top: ; ","border-bottom: ","border-bottom: ; ","material-icons",
|
|
40
|
+
"color_lens",'<div style="height: ','px; width: 50px; background-color: black;"></div>',"80px","1","fullscreen_exit","Toggle Fullscreen","search","search_off","Toggle Search","onbeforecreateworksheet","There is one existing worksheet with the same name.","createWorksheet","oncreateworksheet","deleteWorksheet","ondeleteworksheet","It was not possible to rename worksheet due conflict name","onrenameworksheet","onmoveworksheet","onopenworksheet","jss_","TABLE","Element is not a table","colgroup > col",
|
|
41
|
+
"data-celltype","readOnly","name","id",":scope > thead > tr",":scope > tr, :scope > tbody > tr","data-formula","class","styleBold","; font-weight:bold;","font-weight:bold;","tfoot tr","\r","\n","jss_ignore","THEAD","TBODY","TFOOT","selectall","header-group","jtabs-headers","filters","footer","jtoolbar","DIV","html","jss_nowrap","insertHTML","<br/>\n","Process","A","mailto:","_blank","onclick","jclose","col-resize","row-resize","move","DOM el not found","Cloud plugin not loaded.","jtabs","jss_dialog",
|
|
42
|
+
"jss_number","decimal","data-locale","%","jss_percent","\\[Red\\]","red","\\(","jss_notes","145px","tag","jss_dropdown_tags","jss_dropdown","multiple","image","<div class='jss_dropdown_icon' style='background-color: ","'></div>","orange","<div class='jss_dropdown_tag' style='background-color: ","'>","</div>","<","timepicker","YYYY-MM-DD","square","100px","false","FALSE","disabled","TRUE","jss_progressbar","min","max","jss_rating"," stars","star","href","IMG","round","100%","jss_image","tabindex",
|
|
43
|
+
"jpanel","delete","jfile",'<img src="','" alt="">',"jss_richtext","jss_tags","40px","#NOTFOUND","<img src='","' class='round small' />","Jspreadsheet: worksheet not found "];
|
|
44
|
+
(function(E,H){typeof exports===_$_496c[88]&&typeof module!==_$_496c[13]?module.exports=H():typeof define===_$_496c[89]&&define.amd?define(H):E.jspreadsheet=E.jexcel=H()})(this,function(){_$_496c[0];var E=function(h,a){h=jSuites.translate(h);if(a&&a.length)for(var c=0;c<a.length;c++)h=h.replace(_$_496c[1]+c+_$_496c[2],a[c]);return h},H=function(h,a){Array.isArray(h)&&(h=h[0]);h=h.replace(new RegExp(/'/g),_$_496c[3]).toUpperCase();if(void 0===a)return window[h]?window[h]:null;window[h]=a},L=function(){var h=
|
|
45
|
+
{version:_$_496c[4],edition:_$_496c[5],host:_$_496c[6],license:_$_496c[7],print:function(){return[_$_496c[8]+this.edition+_$_496c[9]+this.version+_$_496c[10]+this.host+_$_496c[10]+this.license]}};return function(){return h}}(),V=function(h){var a=parseInt(h.y);if(h.id)var c=parseInt(h.id);else h.value&&(c=parseInt(h.value));0<c&&(this.rows[a].id=c,va[_$_496c[11]].call(this,c))},Q=function(h){return(_$_496c[3]+h).substr(0,1)===_$_496c[12]},da=function(h){var a=this.options.columns;return a[h]&&a[h].name?
|
|
46
|
+
a[h].name:h},P=function(h,a,c){var b;if(b=this.options.data[a]){var d=0<=h?da.call(this,h):h;typeof c===_$_496c[13]?c=typeof d===_$_496c[14]?b[h]:jSuites.path.call(b,_$_496c[3]+d):(typeof d===_$_496c[14]?b[h]=c:jSuites.path.call(b,_$_496c[3]+d,c),!Q(c)&&this.records[a][h]&&(this.records[a][h].v=c))}else c=null;return c},R=function(h){return 0==this.config.editable||h&&0==h.options.editable?!1:(h=Ja.call(this))?7<=h?!0:!1:!0},Ka=function(h){var a=_$_496c[15];if(this.parent)var c=this.parent.config,
|
|
47
|
+
b=this.parent.element,d=this;else c=this.config,b=this.element,d=v.current?v.current:null;typeof h===_$_496c[13]&&(h=!b.classList.contains(a));h?(b.classList.add(a),c.fullscreen=!0):(b.classList.remove(a),c.fullscreen=!1);d&&(I.call(d,!0),fa.update.call(d.parent,d))},La=function(h){var a=this.loading;null===h&&(h=a.style.display==_$_496c[16]?!0:!1);a.style.display=h?_$_496c[16]:_$_496c[3];setTimeout(function(){a.style.display=_$_496c[3]},1E3)},Ga=function(h,a){if(typeof h===_$_496c[17]){var c=F.getCoordsFromColumnName(h);
|
|
48
|
+
c=this.records[c[1]][c[0]];if(c.element)h=c.element;else return typeof a===_$_496c[13]?c.readonly:c.readonly=a?!0:!1}c=_$_496c[18];h=h.classList;if(typeof a===_$_496c[13])return h.contains(c)?!0:!1;a?h.add(c):h.remove(c)},ya=function(h){var a=_$_496c[19],c=this.table.classList;if(typeof h==_$_496c[13])return c.contains(a)?!1:!0;h?c.remove(a):c.add(a);I.call(this,!0)},Ja=function(h){if(void 0===h)return this.status;var a=document.createElement(_$_496c[20]);a.style.textAlign=_$_496c[21];a.style.fontSize=
|
|
49
|
+
_$_496c[22];a.style.cursor=_$_496c[23];a.onclick=function(){window.location.href=L().host+_$_496c[24]};var c=null,b=[],d=[74,50,48,50,48,33].join(_$_496c[3]);(function(f){c=1;try{if(f){var g=window.atob(f);g=g.split(_$_496c[25]);if(g[1]){g[1]=window.atob(g[1]);var k=g[0];f=d;var l=g[1],n=jSuites.sha512,q=_$_496c[3],p=_$_496c[3];128<f.length&&(f=n(f));for(var u=0;128>u;u++){var x=f[u]?f[u].charCodeAt(0):0;q+=String.fromCharCode(54^x);p+=String.fromCharCode(92^x)}var w=n(p+n(q+l));if(k!=w)c=3;else if(g[1]=
|
|
50
|
+
JSON.parse(g[1]),g[1].date){var y=window.location.hostname||_$_496c[26];k=!1;if(-1===y.indexOf(_$_496c[27]))for(var B=0;B<g[1].domain.length;B++)y===g[1].domain[B]&&(k=!0);else for(B=0;B<g[1].domain.length;B++)-1!==y.indexOf(g[1].domain[B])&&y.substr(y.indexOf(g[1].domain[B]))==g[1].domain[B]&&(k=!0);!1===k?c=4:g[1].scope&&0<=g[1].scope.indexOf(_$_496c[28])?(y=new Date,k=parseInt(y.getTime()/1E3),B=L(),g[1].date<k?(c=g[1].date+2592E3<k&&!g[1].plan||g[1].date+15552E3<k?6:7,B.license=g[1].name+_$_496c[29]):
|
|
51
|
+
(c=8,B.license=_$_496c[30]+g[1].name,B.edition=3==g[1].plan||6==g[1].plan||31==g[1].plan||33==g[1].plan?_$_496c[31]:_$_496c[5],b=g[1].scope)):c=5}else c=4}else c=2}}catch(D){}})(h);h=_$_496c[3];if(1==c)h=_$_496c[32];else if(2==c||3==c||4==c)h=_$_496c[33];else if(5==c)h=_$_496c[34];else if(6==c||7==c)h=_$_496c[35];a.appendChild(document.createTextNode(h));if(8>c)try{if(typeof sessionStorage!==_$_496c[13]&&!sessionStorage.getItem(_$_496c[36])){sessionStorage.setItem(_$_496c[36],!0);var e=document.createElement(_$_496c[37]);
|
|
52
|
+
e.src=L().host+_$_496c[38]+_$_496c[39];e.style.display=_$_496c[40];a.appendChild(e)}}catch(f){}Object.defineProperty(this,_$_496c[41],{value:c,writable:!1,configurable:!1,enumerable:!1,extensible:!1});Object.defineProperty(this,_$_496c[42],{value:L().edition===_$_496c[31]?1:0,writable:!1,configurable:!1,enumerable:!1,extensible:!1});Object.defineProperty(this,_$_496c[43],{get:function(){return b},configurable:!1,enumerable:!1,extensible:!1});return a},I=function(){var h=function(l){-1==this.indexOf(l)&&
|
|
53
|
+
this.push(l)},a=function(l,n){if(!l||!n)return!1;var q=l.length;if(q!=n.length)return!1;for(;q--;)if(l[q]!==n[q])return!1;return!0},c=function(l){var n=null,q,p,u=0,x={},w=!1;for(q=0;q<this.options.columns.length;q++)if(-1===l.indexOf(q)){if(oa.attached.call(this,q)){this.headers[q].remove();this.colgroup[q].remove();if(this.options.footers)for(p=0;p<this.options.footers.length;p++)this.footers.content[p][q].element&&this.footers.content[p][q].element.parentNode&&this.footers.content[p][q].element.remove();
|
|
54
|
+
w=!0}for(p=0;p<this.visibleRows.length;p++){var y=this.records[this.visibleRows[p]][q];y.element&&y.element.parentNode&&y.element.remove()}}if(this.options.nestedHeaders)for(p=0;p<this.thead.children.length-1;p++)u+=this.thead.children[p].offsetHeight;for(q=0;q<l.length;q++){var B=l[q];var D=Ca.create.call(this,B);if(n){if(!D.parentNode){this.headerContainer.insertBefore(D,this.headerContainer.children[n].nextSibling);this.colgroupContainer.insertBefore(this.colgroup[B],this.colgroupContainer.children[n].nextSibling);
|
|
55
|
+
if(this.options.footers)for(p=0;p<this.options.footers.length;p++)this.tfoot.children[p].insertBefore(Z.create.call(this,B,p),this.tfoot.children[p].children[n].nextSibling);u&&(D.style.top+=u);w=!0}for(p=0;p<this.visibleRows.length;p++)y=this.visibleRows[p],y=S[_$_496c[46]].call(this,B,y),y.parentNode||this.tbody.children[p].insertBefore(y,this.tbody.children[p].children[n].nextSibling)}else{if(!D.parentNode){this.headerContainer.insertBefore(D,this.headerContainer.children[1]);this.colgroupContainer.insertBefore(this.colgroup[B],
|
|
56
|
+
this.colgroupContainer.children[1]);if(this.options.footers)for(p=0;p<this.options.footers.length;p++)this.tfoot.children[p].insertBefore(Z.create.call(this,B,p),this.tfoot.children[p].children[1]);u&&(D.style.top+=u);w=!0}for(p=0;p<this.visibleRows.length;p++)y=this.visibleRows[p],y=S[_$_496c[46]].call(this,B,y),y.parentNode||this.tbody.children[p].insertBefore(y,this.tbody.children[p].children[1])}if(this.options.mergeCells)for(p=0;p<this.visibleRows.length;p++)y=this.visibleRows[p],n=F.getColumnNameFromCoords(B,
|
|
57
|
+
y),this.options.mergeCells[n]&&(this.records[y][B].merged||(x[n]=!1));n=Array.prototype.indexOf.call(this.headerContainer.children,D)}u=0;if(this.options.nestedHeaders)for(p=0;p<this.options.nestedHeaders.length;p++){n=null;B=[];y=wa.getColumns.call(this,p);for(q=0;q<l.length;q++)void 0!==y[l[q]]&&-1==B.indexOf(y[l[q]])&&B.push(y[l[q]]);for(q=0;q<this.options.nestedHeaders[p].length;q++)-1==B.indexOf(q)&&this.nested.content[p][q]&&this.nested.content[p][q].element.offsetHeight&&this.nested.content[p][q].element.remove();
|
|
58
|
+
for(q=y=0;q<B.length;q++)D=wa.create.call(this,B[q],p),D.parentNode||(n?this.thead.children[p].children[n]?this.thead.children[p].insertBefore(D,this.thead.children[p].children[n].nextSibling):this.thead.children[p].appendChild(D):this.thead.children[p].insertBefore(D,this.thead.children[p].children[1]),D.style.top=u+_$_496c[47],this.options.freezeColumns&&this.options.nestedHeaders[p][B[q]].frozen&&(D.style.left=y+(ya.call(this)?50:0)+_$_496c[47],D.classList.add(_$_496c[48]))),y+=D.offsetWidth,n=
|
|
59
|
+
Array.prototype.indexOf.call(this.thead.children[p].children,D);u+=this.thead.children[p].offsetHeight}1==w&&(this.table.style.left=f.width.call(this,l[this.options.freezeColumns||0])+_$_496c[47]);pa.batch.call(this,x);this.visibleCols=l},b=function(l){var n=[],q=null,p,u=!1;for(p=0;p<this.tbody.children.length;p++)n.push(this.tbody.children[p]);for(p=0;p<n.length;p++){var x=parseInt(n[p].getAttribute(_$_496c[45]));-1===l.indexOf(x)&&(n[p].remove(),u=!0)}for(p=0;p<l.length;p++)n=ja.create.call(this,
|
|
60
|
+
l[p]),n.parentNode||(q?this.tbody.insertBefore(n,q.nextSibling):this.tbody.insertBefore(n,this.tbody.firstChild),u=!0),q=n;u&&(this.table.style.top=f.height.call(this,l[0])+_$_496c[47],this.visibleCols=null);this.visibleRows=l},d=function(){var l=[],n=0,q=null;if(I.limited.call(this)){var p=q=0;p=this.content.scrollLeft;var u=p+this.content.offsetWidth;q=this.options.columns;var x=null,w=this.options.freezeColumns||0,y=0;w&&(p+=ma.getWidth.call(this,!0));for(n=0;n<q.length;n++)x=oa.isVisible.call(this,
|
|
61
|
+
n)?parseInt(q[n].width):0,(y+x>p&&y<=u||n<w)&&h.call(l,n),y+=x;for(n=0;n<l.length;n++)if(p=pa.getAffected.call(this.merged.cols,l[n]))for(q=0;q<p.length;q++)h.call(l,p[q]);for(n=0;n<l.length;n++)if(p=wa.getAffected.call(this,l[n]))for(q=0;q<p.length;q++)this.options.columns[p[q]]&&h.call(l,p[q]);l.sort(function(B,D){return B-D})}else for(q=this.options.columns,n=0;n<q.length;n++)l.push(n);a(l,this.visibleCols)||c.call(this,l)},e=function(){var l=[],n=null,q=0,p=0;q=null;var u=0;if(I.limited.call(this)&&
|
|
62
|
+
!this.options.pagination){var x=0,w=0,y=0,B=0;if(n=this.options.frozenRows)for(p=0;p<n;p++)l.push(p);n=this.results?this.results:this.rows;x=this.content.scrollTop;w=x+this.content.offsetHeight;for(p=0;p<n.length;p++)q=this.results?n[p]:p,B=ja.height.call(this,q),y+B>x&&y<w&&l.push(q),y+=B}else for(n=this.results?this.results:this.rows,this.options.pagination?(q=parseInt(this.options.pagination)*this.pageNumber,u=q+parseInt(this.options.pagination),u>n.length&&(u=n.length)):(q=0,u=n.length),p=q;p<
|
|
63
|
+
u;p++)q=this.results?n[p]:p,l.push(q);if(this.options.mergeCells){for(p=0;p<l.length;p++)if(this.merged.rows[l[p]]&&(u=pa.getAffected.call(this.merged.rows,l[p])))for(q=0;q<u.length;q++)-1===l.indexOf(u[q])&&l.push(u[q]);l.sort(function(D,r){return D-r})}a(l,this.visibleRows)||b.call(this,l)},f=function(l,n){n&&(this.visibleCols=this.visibleRows=null);f.calculate.call(this);f.update.call(this);if(!0!==l){var q=this;this.content.addEventListener(_$_496c[49],function(){f.ignore||f.update.call(q)});
|
|
64
|
+
this.content.addEventListener(_$_496c[50],function(p){if(I.limited.call(q)&&!q.options.pagination){var u=Math.abs(p.deltaX),x=Math.abs(p.deltaY);p.shiftKey||u>x?0>p.deltaX||0>p.deltaY?f.left.call(q):f.right.call(q):0>p.deltaY?f.up.call(q):f.down.call(q);p.preventDefault()}})}};f.calculate=function(){if(I.limited.call(this)){var l=ma.getWidth.call(this);this.width=f.width.call(this)+(l?l:1);this.height=f.height.call(this);this.scrollX.style.width=this.width+100+_$_496c[47];this.scrollY.style.height=
|
|
65
|
+
this.height+100+_$_496c[47]}};f.update=function(){e.call(this);d.call(this);Aa.update.call(this);ma.refresh.call(this);aa.refresh.call(this)};f[_$_496c[51]]=function(l,n){null!==l&&(l=f.height.call(this,l),this.content.scrollTop=l);void 0!==n&&null!==n&&(n=f.width.call(this,n),this.content.scrollLeft=n)};f.x=0;f.y=0;f.up=function(l){if(l)this.content.scrollTop=0,f.y=null;else if(this.tbody.firstChild){l=f.y?f.y:f.y=this.tbody.firstChild.getAttribute(_$_496c[45]);for(var n,q=l;0<l;)if(l--,n=this.results?
|
|
66
|
+
this.results[l]:l,!this.rows[n]||!0!==this.rows[n].visible){q=n;break}l=q;n=ja.height.call(this,l);ja.attached.call(this,l)||(n+=this.content.scrollTop-this.table.offsetTop);this.content.scrollTop-=n;0<f.y&&f.y--}};f.down=function(l){l?this.content.scrollTop=this.content.scrollHeight:this.tbody.firstChild&&(this.content.scrollTop+=this.tbody.firstChild.offsetHeight);f.y=null};f.left=function(l){var n=this.options.freezeColumns||0;if(l)this.content.scrollLeft=0,f.x=null;else{for(n=l=f.x?f.x:f.x=this.thead.lastChild.children[1+
|
|
67
|
+
n].getAttribute(_$_496c[44]);0<l;)if(l--,oa.isVisible.call(this,l)){n=l;break}l=n;n=parseInt(this.options.columns[l].width);this.headers[l]&&this.headers[l].parentNode||(n+=this.content.scrollLeft-this.table.offsetLeft);this.content.scrollLeft-=n;0<f.x&&f.x--}};f.right=function(l){var n=this.options.freezeColumns||0;this.content.scrollLeft=l?this.content.scrollWidth:this.content.scrollLeft+this.thead.lastChild.children[1+n].offsetWidth;f.x=null};var g=function(){f.y=null;for(var l,n=this.content.offsetHeight-
|
|
68
|
+
this.thead.offsetHeight,q=0,p=0;p<this.tbody.children.length;p++)l=this.tbody.children[p].offsetHeight,n>l&&(q+=l,n-=l);return q},k=function(){f.x=null;for(var l,n=this.content.offsetWidth-ma.getWidth.call(this),q=(this.options.freezeColumns||0)+1,p=0,u=0;u<this.thead.lastChild.children.length;u++)l=this.thead.lastChild.children[q].offsetWidth,n>l&&(p+=l,n-=l);return p};f.pageUp=function(){this.content.scrollTop-=g.call(this)};f.pageDown=function(){this.content.scrollTop+=g.call(this)};f.pageLeft=
|
|
69
|
+
function(){this.content.scrollLeft-=k.call(this)};f.pageRight=function(){this.content.scrollLeft+=k.call(this)};f.build=function(l){var n=document.createElement(_$_496c[20]);n.className=_$_496c[52]+l;return n};f.width=function(l,n){for(var q=this.options.columns,p=0,u=this.options.freezeColumns||0;u<this.options.columns.length;u++){if(l===u)return p;oa.isVisible.call(this,u)&&(p+=parseInt(q[u].width));if(p>=n)return u}return n?u:p};f.height=function(l,n){for(var q=0,p=0,u=this.results?this.results:
|
|
70
|
+
this.rows,x=0;x<u.length;x++){p=x;this.results&&(p=u[x]);if(l===p)return q;this.rows[p]&&!1!==this.rows[p].visible&&(q+=ja.height.call(this,p));if(q>=n)return p}return n?p:q};f.adjust=function(l,n,q){var p=this.records[n][l].element;if(p)if(0==q||2==q){n=0;var u=ya.call(this)?50:0;this.options.freezeColumns&&(n=ma.getWidth.call(this,!0));n=this.content.scrollLeft+n;var x=this.content.scrollLeft+(this.content.offsetWidth-u);u=this.table.offsetLeft+p.offsetLeft-u;var w=p.offsetWidth;0==q?u+w<x&&l>this.options.freezeColumns-
|
|
71
|
+
1&&u<n&&(p.offsetHeight?(q=this.content.scrollLeft+(u-n),f.setX.call(this,q)):f[_$_496c[51]].call(this,null,l)):l>this.options.freezeColumns-1&&(u>n?u+w>x&&(p.parentNode?(q=this.content.scrollLeft+(u+w-x+16),f.setX.call(this,q)):f[_$_496c[51]].call(this,null,l)):f[_$_496c[51]].call(this,null,l))}else l=this.content.scrollTop,x=l+this.content.offsetHeight-this.thead.offsetHeight-16,u=this.table.offsetTop+p.offsetTop-this.thead.offsetHeight,w=p.offsetHeight,1==q?u+w<x&&(u+4<l?p.offsetHeight?4<l-u&&
|
|
72
|
+
(q=this.content.scrollTop+(u-l),f.setY.call(this,q)):f[_$_496c[51]].call(this,n):p.offsetHeight||f[_$_496c[51]].call(this,n)):u>l?u+w>x&&(p.parentNode?(q=this.content.scrollTop+(u+w-x),f.setY.call(this,q)):f[_$_496c[51]].call(this,n)):p.offsetHeight||f[_$_496c[51]].call(this,n);else 0==q||2==q?f[_$_496c[51]].call(this,null,l):f[_$_496c[51]].call(this,n)};f.setX=function(l){f.ignore=!0;this.content.scrollLeft=l;f.ignore=!1};f.setY=function(l){f.ignore=!0;this.content.scrollTop=l;f.ignore=!1};f.limited=
|
|
73
|
+
function(){return 1==this.options.tableOverflow||1==this.parent.config.fullscreen};return f}(),Ma=function(h,a,c,b){var d=a,e=null;if(this.results&&(a=this.results.indexOf(a),-1==a))return d;for(;0<a;){a--;var f=this.results?this.results[a]:a;if(!1!==this.rows[f].visible){var g=this.records[f][h].v===_$_496c[3]?!1:!0;null===e&&(e=g);if(this.records[f][h].element&&this.records[f][h].element.classList.contains(_$_496c[53])){if(this.records[f][h].merged){d=f-this.records[f][h].merged[1];if(!c)break;
|
|
74
|
+
g=!0}}else{if(c&&g!==e&&!b)break;if(c)d=this.records[f][h].merged?f-this.records[f][h].merged[1]:f;else return f}e=g}}return d},Na=function(h,a,c,b){for(var d=this.options.columns,e=h,f,g=null;0<h;)if(h--,!1!==d[h].visible&&d[h].type!==_$_496c[54]){f=!1;this.records[a]&&(f=this.records[a][h].merged?this.records[a-this.records[a][h].merged[1]][h-this.records[a][h].merged[0]].v?!0:!1:this.records[a][h].v?!0:!1);null===g&&(g=f);if(this.records[a]&&this.records[a][h].element&&this.records[a][h].element.classList.contains(_$_496c[53])){if(this.records[a][h].merged&&
|
|
75
|
+
(e=h-this.records[a][h].merged[0],!c))break}else{if(c&&f!==g&&!b)break;if(c)e=h;else return h}g=f}return e},Sa=function(){var h=function(c,b,d,e){1==c||3==c?ja.attached.call(this,d)||(0<this.options.pagination?this.page(this.whichPage(d)):1==c?I.up.call(this,e):I.down.call(this,e)):S.attached.call(this,b,d)||(0==c?I.left.call(this,e):I.right.call(this,e))},a=function(c){c.up=a.up;c.down=a.down;c.right=a.right;c.left=a.left;c.last=a.last;c.first=a.first};a.up=function(c,b,d){if(Array.isArray(this.selectedCell)){if(c)var e=
|
|
76
|
+
parseInt(this.selectedCell[2]),f=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),f=parseInt(this.selectedCell[1]);d=Ma.call(this,e,f,b,d);d!=f&&(f=d,c?(c=this.selectedCell[0],d=this.selectedCell[1]):(c=e,d=f,e=c,f=d),h.call(this,1,e,f,b),ka[_$_496c[11]].call(this,c,d,e,f),I.adjust.call(this,e,f,1))}};a.down=function(c,b,d){if(Array.isArray(this.selectedCell)){if(c)var e=parseInt(this.selectedCell[2]),f=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),f=parseInt(this.selectedCell[1]);
|
|
77
|
+
a:{var g=e,k=f,l=k,n=null;if(this.results){k=this.results.indexOf(k);if(-1==k){d=l;break a}var q=this.results.length-1}else q=this.rows.length-1;for(;k<q;){k++;var p=this.results?this.results[k]:k;if(!1!==this.rows[p].visible){var u=this.records[p][g].v===_$_496c[3]?!1:!0;null===n&&(n=u);if(this.records[p][g].element&&this.records[p][g].element.classList.contains(_$_496c[53])){if(this.records[p][g].merged){if(!this.records[p][g].merged[1]&&(l=p,!b))break;u=!0}}else if(b&&u!==n&&!d){d=l;break a}else if(b)l=
|
|
78
|
+
p;else{d=p;break a}n=u}}d=l}d!=f&&(f=d,c?(c=this.selectedCell[0],d=this.selectedCell[1]):(c=e,d=f,e=c,f=d),h.call(this,3,e,f,b),ka[_$_496c[11]].call(this,c,d,e,f),I.adjust.call(this,e,f,3))}};a.right=function(c,b,d){if(Array.isArray(this.selectedCell)){if(c)var e=parseInt(this.selectedCell[2]),f=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),f=parseInt(this.selectedCell[1]);a:{for(var g=e,k=f,l=this.options.columns,n=g,q,p=null;g<l.length-1;)if(g++,!1!==l[g].visible&&l[g].type!==
|
|
79
|
+
_$_496c[54]){q=!1;this.records[k]&&(q=this.records[k][g].merged?this.records[k-this.records[k][g].merged[1]][g-this.records[k][g].merged[0]].v?!0:!1:this.records[k][g].v?!0:!1);null===p&&(p=q);if(this.records[k]&&this.records[k][g].element&&this.records[k][g].element.classList.contains(_$_496c[53])){if(this.records[k][g].merged&&g==g+this.records[k][g].merged[0]&&(n=g,!b))break}else if(b&&q!==p&&!d){d=n;break a}else if(b)n=g;else{d=g;break a}p=q}d=n}d!=e&&(e=d,c?(c=this.selectedCell[0],d=this.selectedCell[1]):
|
|
80
|
+
(c=e,d=f,e=c,f=d),h.call(this,2,e,f,b),ka[_$_496c[11]].call(this,c,d,e,f),I.adjust.call(this,e,f,2))}};a.left=function(c,b,d){if(Array.isArray(this.selectedCell)){if(c)var e=parseInt(this.selectedCell[2]),f=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),f=parseInt(this.selectedCell[1]);d=Na.call(this,e,f,b,d);d!=e&&(e=d,c?(c=this.selectedCell[0],d=this.selectedCell[1]):(c=e,d=f,e=c,f=d),h.call(this,0,e,f,b),ka[_$_496c[11]].call(this,c,d,e,f),I.adjust.call(this,e,f,0))}};a.first=
|
|
81
|
+
function(c,b){Array.isArray(this.selectedCell)&&(b?a.up.call(this,c,!0,!0):a.left.call(this,c,!0,!0))};a.last=function(c,b){Array.isArray(this.selectedCell)&&(b?a.down.call(this,c,!0,!0):a.right.call(this,c,!0,!0))};return a}(),Ta=function(){return function(h){h.save=Oa;h.fullscreen=Ka;h.setReadOnly=Ga;h.getReadOnly=Ga;h.isReadOnly=Ga;h.setPlugins=function(a){ra.call(this.parent,a)};h.showIndex=function(){ya.call(this,!0)};h.hideIndex=function(){ya.call(this,!1)};h[_$_496c[51]]=I[_$_496c[51]];h.undo=
|
|
82
|
+
function(){W.undo.call(h.parent)};h.redo=function(){W.redo.call(h.parent)};h.isEditable=function(){return R.call(h.parent,h)};h.dispatch=function(){return G.apply(this.parent,arguments)};h.setViewport=function(a,c){this.options.tableOverflow=!0;a=parseInt(a);c=parseInt(c);this.content.classList.add(_$_496c[55]);150<a&&(this.options.tableWidth=a+_$_496c[47],this.content.style.width=this.options.tableWidth);150<c&&!this.options.pagination&&(this.options.tableHeight=parseInt(c)+_$_496c[47],this.content.style.height=
|
|
83
|
+
this.options.tableHeight);I.call(this,!0);fa.update.call(this.parent,this);G.call(this.parent,_$_496c[56],a,c)};h.helpers=F}}(),Da=function(){var h={logo:null,url:null,persistence:!1,sequence:!0,data:null,json:null,rows:[],columns:[],cells:{},role:null,nestedHeaders:null,defaultColWidth:100,defaultRowHeight:0,defaultColAlign:null,minSpareRows:0,minSpareCols:0,minDimensions:[0,0],csv:null,csvFileName:_$_496c[36],csvHeaders:!0,csvDelimiter:_$_496c[25],columnSorting:!0,columnDrag:!0,columnResize:!0,
|
|
84
|
+
rowResize:!0,rowDrag:!0,editable:!0,allowInsertRow:!0,allowManualInsertRow:!0,allowInsertColumn:!0,allowManualInsertColumn:!0,allowDeleteRow:!0,allowDeletingAllRows:!1,allowDeleteColumn:!0,allowRenameColumn:!0,allowComments:!0,selectionCopy:!0,mergeCells:{},search:!1,pagination:!1,paginationOptions:null,textOverflow:!1,tableOverflow:!1,tableHeight:_$_496c[57],tableWidth:null,resize:null,comments:null,meta:null,style:{},freezeColumns:0,orderBy:null,worksheetId:_$_496c[3],worksheetName:null,worksheetState:null,
|
|
85
|
+
filters:!1,footers:null,formify:null,applyMaskOnFooters:!1,pluginOptions:null,locked:!1,selectUnLockedCells:!0,selectLockedCells:!0,wrap:!1},a={application:_$_496c[58],cloud:null,root:null,definedNames:{},sorting:null,server:null,toolbar:null,editable:!0,allowExport:!0,includeHeadersOnDownload:!1,forceUpdateOnPaste:!1,loadingSpin:!1,fullscreen:!1,secureFormulas:!0,parseFormulas:!0,debugFormulas:!1,editorFormulas:!0,autoIncrement:!0,autoCasting:!0,stripHTML:!1,tabs:!1,allowDeleteWorksheet:!0,allowRenameWorksheet:!0,
|
|
86
|
+
allowMoveWorksheet:!0,moveDownOnEnter:!0,onevent:null,onclick:null,onload:null,onundo:null,onredo:null,onbeforesave:null,onsave:null,onbeforechange:null,onchange:null,onafterchanges:null,oncopy:null,onbeforepaste:null,onpaste:null,onbeforeinsertrow:null,oninsertrow:null,onbeforedeleterow:null,ondeleterow:null,onbeforeinsertcolumn:null,oninsertcolumn:null,onbeforedeletecolumn:null,ondeletecolumn:null,onmoverow:null,onmovecolumn:null,onresize:null,onresizerow:null,onresizecolumn:null,onselection:null,
|
|
87
|
+
onbeforecomments:null,oncomments:null,onbeforesort:null,onsort:null,onfocus:null,onblur:null,onmerge:null,onchangeheader:null,onchangefooter:null,onchangefootervalue:null,onchangenested:null,onchangenestedcell:null,oncreateeditor:null,oneditionstart:null,oneditionend:null,onchangestyle:null,onchangemeta:null,onbeforechangepage:null,onchangepage:null,onbeforecreateworksheet:null,oncreateworksheet:null,onrenameworksheet:null,ondeleteworksheet:null,onmoveworksheet:null,onopenworksheet:null,onchangerowid:null,
|
|
88
|
+
onbeforesearch:null,onsearch:null,onbeforefilter:null,onfilter:null,onopenfilter:null,oncreatecell:null,oncreaterow:null,oncreatecolumn:null,onbeforeformula:null,onformulachain:null,updateTable:null,contextMenu:null,parseTableFirstRowAsHeader:!1,parseTableAutoCellType:!1,plugins:null,about:!0,license:null,worksheets:null,validations:null},c=function(e,f){f=JSON.parse(JSON.stringify(f));var g={},k;for(k in f)e&&e.hasOwnProperty(k)?g[k]=e[k]:g[k]=f[k];return g},b=function(e){e&&(typeof e==_$_496c[17]&&
|
|
89
|
+
(e=JSON.parse(e)),this.options.data=e);this.options.json&&(this.options.data=this.options.json);this.options.data||(this.options.data=[]);e=this.options.columns.length;if(this.options.data&&typeof this.options.data[0]!==_$_496c[13]){var f=this.options.data[0].data&&0<Object.keys(this.options.data[0].data).length?Object.keys(this.options.data[0].data):Object.keys(this.options.data[0]);f.length>e&&(e=f.length)}this.options.minDimensions[0]>e&&(e=this.options.minDimensions[0]);e||(e=8);for(var g=0;g<
|
|
90
|
+
e;g++)this.options.columns[g]?this.options.columns[g].type||(this.options.columns[g].type=_$_496c[59]):this.options.columns[g]={type:_$_496c[59]},this.options.columns[g].type==_$_496c[60]&&(this.options.columns[g].type=_$_496c[61],this.options.columns[g].autocomplete=!0),!this.options.columns[g].name&&f&&f[g]&&Number(f[g])!=f[g]&&(this.options.columns[g].name=f[g]),this.options.columns[g].width||(this.options.columns[g].width=this.options.defaultColWidth),this.options.columns[g].type!=_$_496c[61]||
|
|
91
|
+
this.options.columns[g].source||(this.options.columns[g].source=[]),this.options.columns[g].type==_$_496c[61]&&this.options.columns[g].url&&jSuites.ajax({url:this.options.columns[g].url,index:g,method:_$_496c[62],dataType:_$_496c[63],worksheet:this,group:this.parent.name,success:function(k){this.worksheet.options.columns[this.index].source=k}})},d=function(e){e.getConfig=d[_$_496c[46]];e.setConfig=d[_$_496c[11]]};d.spreadsheet=function(e){this.config=c(e,a);1!=this.config.secureFormulas&&console.log(_$_496c[64])};
|
|
92
|
+
d.worksheet=function(e){var f=this;f.options=c(e,h);f.options.csv?jSuites.ajax({url:f.options.csv,method:_$_496c[62],dataType:_$_496c[59],group:f.parent.name,success:function(g){g=F.parseCSV(g,f.options.csvDelimiter);if(1==f.options.csvHeaders&&0<g.length)for(var k=g.shift(),l=0;l<k.length;l++)f.options.columns[l]||(f.options.columns[l]={type:_$_496c[59],width:f.options.defaultColWidth}),typeof f.options.columns[l].title===_$_496c[13]&&(f.options.columns[l].title=k[l]);b.call(f,g)}}):f.options.url?
|
|
93
|
+
jSuites.ajax({url:f.options.url,method:_$_496c[62],dataType:_$_496c[63],group:f.parent.name,success:function(g){b.call(f,g)}}):b.call(f)};d[_$_496c[46]]=function(){return this.options};d[_$_496c[11]]=function(e){typeof e==_$_496c[17]&&(e=JSON.parse(e));if(this.parent){f=Object.keys(e);for(g=0;g<f.length;g++)typeof h[f[g]]!==_$_496c[13]&&(this.options[f[g]]=e[f[g]]);this.content.style.resize=e.resize?e.resize:_$_496c[3];!0===e.filters?ea.show.call(this):!1===e.filters&&ea.hide.call(this);!0===e.search?
|
|
94
|
+
sa.show.call(this):!1===e.search&&sa.hide.call(this);!0===e.toolbar?fa.show.call(this.parent):!1===e.toolbar&&fa.hide.call(this.parent);e.minDimensions&&e.minDimensions[0]&&(f=parseInt(e.minDimensions[0])-this.headers.length,0<f&&this.insertColumn(f),f=parseInt(e.minDimensions[1])-this.rows.length,0<f&&this.insertRow(f));K.call(this,_$_496c[65],{data:JSON.stringify(e)})}else for(var f=Object.keys(e),g=0;g<f.length;g++)typeof a[f[g]]!==_$_496c[13]&&(this.config[f[g]]=e[f[g]])};return d}(),W=function(h){h=
|
|
95
|
+
function(a){if(1!=this.ignoreHistory){var c=++this.historyIndex;this.history=this.history.slice(0,c+1);this.history[c]=a}};h.undo=function(){if(0<=this.historyIndex)var a=this.history[this.historyIndex--];if(a){this.ignoreHistory=!0;var c=a.worksheet;c.openWorksheet();if(a.action==_$_496c[66])c.deleteRow(a.insertBefore?a.rowNumber:a.rowNumber+1,a.numOfRows);else if(a.action==_$_496c[67])c.insertRow(a.numOfRows,a.rowNumber,1,a.data),S.setAttributes.call(c,a.attributes);else if(a.action==_$_496c[68])c.deleteColumn(a.insertBefore?
|
|
96
|
+
a.columnNumber:a.columnNumber+1,a.numOfColumns);else if(a.action==_$_496c[69])c.insertColumn(a.numOfColumns,a.columnNumber,1,a.properties,a.data,a.extra),S.setAttributes.call(c,a.attributes);else if(a.action==_$_496c[70])c.moveRow(a.newValue,a.oldValue);else if(a.action==_$_496c[71])c.moveColumn(a.newValue,a.oldValue);else if(a.action==_$_496c[72])c.removeMerge(a.newValue,!0),c.setMerge(a.oldValue);else if(a.action==_$_496c[73])c.setMerge(a.oldValue);else if(a.action==_$_496c[74])c.setStyle(a.oldValue,
|
|
97
|
+
null,null,1);else if(a.action==_$_496c[75])c.setStyle(a.oldValue);else if(a.action==_$_496c[76])c.setWidth(a.column,a.oldValue);else if(a.action==_$_496c[77])c.setHeight(a.row,a.oldValue);else if(a.action==_$_496c[78])c.setHeader(a.column,a.oldValue);else if(a.action==_$_496c[79])c.setComments(a.oldValue);else if(a.action==_$_496c[80])c.orderBy(a.column,a.direction?0:1,a.oldValue,a.previousState);else if(a.action==_$_496c[81]||a.action==_$_496c[82]||a.action==_$_496c[83]){var b=[];for(var d=0;d<a.records.length;d++){var e=
|
|
98
|
+
{x:a.records[d].x,value:a.records[d].oldValue};void 0!==a.records[d].y&&(e.y=a.records[d].y);a.records[d].oldStyle&&(e.style=a.records[d].oldStyle);b.push(e)}c[a.action](b)}else a.action==_$_496c[84]?c.renameWorksheet(a.index,a.oldValue):a.action==_$_496c[85]&&c.moveWorksheet(a.t,a.f);a.selection&&c.updateSelectionFromCoords(a.selection);this.ignoreHistory=!1;G.call(this,_$_496c[86],c,a)}};h.redo=function(){if(this.historyIndex<this.history.length-1)var a=this.history[++this.historyIndex];if(a){this.ignoreHistory=
|
|
99
|
+
!0;var c=a.worksheet;c.openWorksheet();if(a.action==_$_496c[66])c.insertRow(a.numOfRows,a.rowNumber,a.insertBefore,a.data);else if(a.action==_$_496c[67])c.deleteRow(a.rowNumber,a.numOfRows);else if(a.action==_$_496c[68])c.insertColumn(a.numOfColumns,a.columnNumber,a.insertBefore,a.properties,a.data);else if(a.action==_$_496c[69])c.deleteColumn(a.columnNumber,a.numOfColumns);else if(a.action==_$_496c[70])c.moveRow(a.oldValue,a.newValue);else if(a.action==_$_496c[71])c.moveColumn(a.oldValue,a.newValue);
|
|
100
|
+
else if(a.action==_$_496c[72])c.setMerge(a.newValue);else if(a.action==_$_496c[73])c.removeMerge(a.newValue);else if(a.action==_$_496c[74])c.setStyle(a.newValue,null,null,1);else if(a.action==_$_496c[75])c.resetStyle(a.cells);else if(a.action==_$_496c[76])c.setWidth(a.column,a.newValue);else if(a.action==_$_496c[77])c.setHeight(a.row,a.newValue);else if(a.action==_$_496c[78])c.setHeader(a.column,a.newValue);else if(a.action==_$_496c[79])c.setComments(a.newValue);else if(a.action==_$_496c[80])c.orderBy(a.column,
|
|
101
|
+
a.direction,a.newValue);else if(a.action==_$_496c[81]||a.action==_$_496c[82]||a.action==_$_496c[83])c[a.action](a.records);else a.action==_$_496c[84]?c.renameWorksheet(a.index,a.newValue):a.action==_$_496c[85]&&c.moveWorksheet(a.f,a.t);a.selection&&c.updateSelectionFromCoords(a.selection);this.ignoreHistory=!1;G.call(this,_$_496c[87],c,a)}};return h}(),ra=function(){var h=function(a){var c=null;if(Array.isArray(a))c=a;else if(typeof a==_$_496c[88]){c=[];var b=Object.keys(a);for(var d=0;d<b.length;d++)c.push({name:b[d],
|
|
102
|
+
plugin:a[b[d]],options:{}})}if(c&&c.length)for(d=0;d<c.length;d++){if(c[d].name&&c[d].plugin){var e=c[d].name;var f=c[d].plugin;var g=c[d].options}typeof f===_$_496c[89]&&(this.plugins[e]=f.call(v,this,g,this.config),typeof f.license==_$_496c[89]&&v.license&&f.license(v.license))}};h.execute=function(a,c){if(this.plugins){var b=Object.keys(this.plugins);if(b.length)for(var d=0;d<b.length;d++)if(typeof this.plugins[b[d]][a]==_$_496c[89]){var e=this.plugins[b[d]][a].apply(this.plugins[b[d]],c);e&&(a==
|
|
103
|
+
_$_496c[90]&&(c[4]=e),a==_$_496c[91]&&(c[0]=e))}return c}};h.onevent=function(a){return function(){var c,b,d=this.plugins;if(d){var e=Object.keys(d);if(e.length)for(b=0;b<e.length;b++)if(typeof d[e[b]][a]==_$_496c[89]){var f=d[e[b]][a].apply(d[e[b]],arguments);typeof f!==_$_496c[13]&&(c=f)}}return c}}(_$_496c[92]);return h}(),ha=function(){var h=function(a){a.getEditor=h[_$_496c[46]];a.openEditor=h.open;a.closeEditor=h.close};h[_$_496c[46]]=function(a,c){a=Ha[_$_496c[46]].call(this,a,c);return[a.type&&
|
|
104
|
+
typeof a.type==_$_496c[88]?a.type:v.editors[a.type],a]};h.open=function(a,c,b){if(!R.call(this.parent,this))return!1;if(1!=a.classList.contains(_$_496c[18])){var d=parseInt(a.getAttribute(_$_496c[44])),e=parseInt(a.getAttribute(_$_496c[45]));if(!0===this.options.locked){var f=F.getColumnNameFromCoords(d,e);if(!this.options.cells||!this.options.cells[f]||!1!==this.options.cells[f].locked)return!1}if(f=this.records[e][d].merged)d-=f[0],e-=f[1],a=this.records[e][d].element;if(!S.attached.call(this,d,
|
|
105
|
+
e)){if(this.results&&0<this.results.length)return console.error(_$_496c[93]),!1;var g=f=null;oa.attached.call(this,d)||(f=d);ja.attached.call(this,e)||(g=e);I[_$_496c[51]].call(this,g,f)}h.position.call(this,d,e);f=this.parent.input;if(113===b.keyCode||b.type!==_$_496c[94])f.selected=!0;f.innerText=_$_496c[3];G.call(this.parent,_$_496c[95],this,a,d,e);c=1==c?_$_496c[3]:P.call(this,d,e);g=h[_$_496c[46]].call(this,d,e);var k=!0;typeof g[0].openEditor==_$_496c[89]&&(!1===g[0].openEditor(a,c,d,e,this,
|
|
106
|
+
g[1],b)?k=!1:G.call(this.parent,_$_496c[96],this,a,d,e,f,g[1]));k&&(1==this.options.textOverflow&&(this.records[e][d].element.style.overflow=_$_496c[54],0<d&&(this.records[e][d-1].element.style.overflow=_$_496c[54])),this.edition=a,f.classList.add(_$_496c[97]),1==this.parent.config.editorFormulas&&Q(c)&&(f.classList.add(_$_496c[98]),na.parse.call(this,f),a=document.createTextNode(_$_496c[3]),f.appendChild(a),jSuites.focus(f)))}};h.close=function(a,c){null===a&&(a=this.edition);this.parent.input.classList.contains(_$_496c[98])&&
|
|
107
|
+
na.close.call(this,this.parent.input);var b,d=parseInt(a.getAttribute(_$_496c[44])),e=parseInt(a.getAttribute(_$_496c[45]));1==this.options.textOverflow&&(b=this.records[e][d+1])&&b.element&&b.element.innerText==_$_496c[3]&&(this.records[e][d].element.style.overflow=_$_496c[3]);b=h[_$_496c[46]].call(this,d,e);if(1==c){var f=null;typeof b[0].closeEditor==_$_496c[89]&&(b=b[0].closeEditor(a,!0,d,e,this,b[1]),void 0!==b&&(f=b));null!==f&&P.call(this,d,e)!=f&&this.setValue(a,f)}else b[0].closeEditor(a,
|
|
108
|
+
!1,d,e,this,b[1]);G.call(this.parent,_$_496c[99],this,a,d,e,f,c);b=this.parent.input;b.selected=!1;b.onblur&&(b.onblur=null);b.children[0]&&b.children[0].onblur&&(b.children[0].onblur=null);b.update&&(b.update=null);ha.build(this.parent);b.removeAttribute(_$_496c[100]);b.removeAttribute(_$_496c[101]);b.removeAttribute(_$_496c[102]);this.edition=b.mask=null;this.refreshBorders()};h.position=function(a,c){var b=null;if(b=this.records[c][a].element){var d=this.parent.element.getBoundingClientRect();
|
|
109
|
+
b=b.getBoundingClientRect();var e=this.parent.input;e.x=a;e.y=c;0==b.width&&0==b.height?e.style.opacity=_$_496c[103]:(e.setAttribute(_$_496c[104],_$_496c[3]),a=b.top-d.top+1,c=b.left-d.left+1,e.style.top=a+_$_496c[47],e.style.left=c+_$_496c[47],e.style.minWidth=b.width-1+_$_496c[47],e.style.minHeight=b.height-1+_$_496c[47],setTimeout(function(){e.focus()},0))}};h.build=function(a){a.input||(a.input=document.createElement(_$_496c[20]));a.input.className=_$_496c[105];a.input.setAttribute(_$_496c[106],
|
|
110
|
+
!0);a.input.innerText=_$_496c[3];a.input.oninput=function(c){1==v.current.parent.config.editorFormulas&&(Q(c.target.innerText)?(c.target.classList.add(_$_496c[98]),c.target.selected=!0):c.target.classList.contains(_$_496c[98])&&na.close.call(v.current,this))};a.input.onclick=function(){this.selected=!0};return a.input};return h}(),G=function(h){var a;if(!this.ignoreEvents){if(typeof this.config.onevent==_$_496c[89]){var c=this.config.onevent.apply(this,arguments);typeof c!==_$_496c[13]&&(a=c)}typeof this.config[h]==
|
|
111
|
+
_$_496c[89]&&(c=this.config[h].apply(this,Array.prototype.slice.call(arguments,1)),typeof c!==_$_496c[13]&&(a=c));c=ra.onevent.apply(this,arguments);typeof c!==_$_496c[13]&&(a=c)}return a},va=function(){var h=function(a){a.sequence=0;a.getNextSequence=h.next;a.getRowId=h.getId;a.setRowId=h.setId;a.getRowById=h.getRowById};h[_$_496c[46]]=function(){return this.sequence};h[_$_496c[11]]=function(a,c){if(a>this.sequence||c)this.sequence=a};h.next=function(){return 1==this.options.sequence?++this.sequence:
|
|
112
|
+
null};h.reset=function(){this.sequence=0};h.getId=function(a){if(this.rows[a]&&this.rows[a].id)return this.rows[a].id;var c=this.getPrimaryKey();if(!1!==c)return P.call(this,c,a)};h.setId=function(a,c){if(void 0!==c&&0<=parseInt(a)){var b={};b[a]=c}else b=a;a=Object.keys(b);if(a.length){for(var d=0;d<a.length;d++)c=b[a[d]],this.rows[a[d]].id=c,h[_$_496c[11]].call(this,c);K.call(this,_$_496c[107],[b]);G.call(this.parent,_$_496c[108],this,b)}};h.getRowById=function(a,c){for(var b=0;b<this.rows.length;b++)if(h.getId.call(this,
|
|
113
|
+
b)==a)return!0===c?this.rows[b]:this.options.data[b];return!1};return h}(),Oa=function(){var h=function(c){for(var b=[],d={},e=0;e<c.length;e++){var f=c[e].x,g=c[e].y,k=va.getId.call(this,g);if(!k)if(d[g])k=d[g];else if(k=va.next.call(this))d[g]=k;b[g]||(b[g]={id:k,row:g,data:{}});f=da.call(this,f);b[g].data[f]=c[e].value}va.setId.call(this,d);return b.filter(function(l){return null!=l})},a=function(c){var b=c[0];if(0<=[_$_496c[109],_$_496c[110],_$_496c[107],_$_496c[111]].indexOf(b))return!1;var d=
|
|
114
|
+
{};b==_$_496c[81]||b==_$_496c[112]?(b=_$_496c[113],d[b]=h.call(this,c[1].data)):Array.isArray(c[1])&&1==c[1].length?d[b]=c[1][0]:d[b]=c[1];return d};return function(c,b,d,e){var f=this.parent,g=this;d=null;var k=a.call(this,b);if(k)b=k;else if(!1===k)return!1;if(k=G.call(f,_$_496c[114],f,g,b))b=k;else if(!1===k)return!1;La.call(f,!0);jSuites.ajax({url:c,method:_$_496c[115],dataType:_$_496c[63],data:{data:JSON.stringify(b)},queue:!0,beforeSend:function(l){d&&l.setRequestHeader(_$_496c[116],_$_496c[117]+
|
|
115
|
+
d)},success:function(l){f.element.classList.contains(_$_496c[118])&&f.element.classList.remove(_$_496c[118]);l&&(l.message&&(l.name=f.config.application,jSuites.notification.isVisible()?console.log(l.name+_$_496c[119]+l.message):jSuites.notification(l)),l.success?typeof e===_$_496c[89]?e(l):l.data&&Array.isArray(l.data)&&S.updateAll.call(g,l.data):l.error&&(alert(_$_496c[120]),window.open(window.location.href,_$_496c[121])));G.call(f,_$_496c[122],f,g,b,l)},error:function(){f.element.classList.add(_$_496c[118])}})}}(),
|
|
116
|
+
K=function(){return function(){ra.execute.call(this.parent,_$_496c[123],[this,arguments[0],arguments[1]]);if(!this.parent.ignorePersistence){var h=null;if(this.parent.config.server){var a=this.parent.worksheets.indexOf(this);h=this.parent.config.server;h=-1==h.indexOf(_$_496c[124])?h+(_$_496c[125]+a):h+(_$_496c[126]+a)}else this.options.persistence&&(h=typeof this.options.persistence==_$_496c[17]?this.options.persistence:this.options.url);h&&Oa.call(this,h,arguments)}}}(),Ea=function(h){if(this.selectedCell){var a=
|
|
117
|
+
this.selectedCell[0],c=this.selectedCell[1];this.records&&this.records[c]&&this.records[c][a]&&this.records[c][a].element||(this.selectedCell=this.getHighlighted(),a=this.selectedCell[0],c=this.selectedCell[1]);var b=this.getHighlighted(),d=b[0],e=b[1],f=b[2];b=b[3];var g=h?_$_496c[127]:_$_496c[128];this.records[c]&&this.records[c][a]&&this.records[c][a].element&&(this.records[c][a].element.classList[g](_$_496c[129]),this.cursor=h?this.records[c][a].element:null);for(h=d;h<=f;h++)if(this.headers[h])this.headers[h].classList[g](_$_496c[130]);
|
|
118
|
+
for(;e<=b;e++)if(this.rows[e]&&this.rows[e].element)this.rows[e].element.classList[g](_$_496c[130])}},ka=function(){var h=function(a){a.resetSelection=h.reset;a.updateSelection=h.fromElements;a.updateSelectionFromCoords=h[_$_496c[11]];a.selectAll=h.all;a.isSelected=h.isSelected;a.getHighlighted=h.getHighlighted;a.getRange=h.getRange};h.getHighlighted=function(){var a=this.borders;return(a=a.main)?[a.x1,a.y1,a.x2,a.y2]:null};h.isSelected=function(a,c,b){if(!b&&(b=this.getHighlighted(),!b))return!1;
|
|
119
|
+
var d=b[0],e=b[1],f=b[2];b=b[3];f||(f=d);b||(b=e);return null==a?c>=e&&c<=b:null==c?a>=d&&a<=f:a>=d&&a<=f&&c>=e&&c<=b};h.reset=function(){if(this.selectedCell)a=1,this.edition&&ha.close.call(this,this.edition,!0),this.resetBorders(_$_496c[131],!0),this.resetBorders(_$_496c[132],!0),this.selectedCell=null,1==a&&G.call(this.parent,_$_496c[133],this);else var a=0;return a};h.refresh=function(){this.selectedCell&&h[_$_496c[11]].call(this,this.selectedCell)};h.isValid=function(a,c,b,d){return this?!(a>=
|
|
120
|
+
this.options.columns.length||c>=this.rows.length||b>=this.options.columns.length||d>=this.rows.length):!1};h[_$_496c[11]]=function(a,c,b,d,e,f,g){f||(f=_$_496c[131]);Array.isArray(a)&&(d=a[3],b=a[2],c=a[1],a=a[0]);null==b&&(b=a);null==d&&(d=c);if(!h.isValid.call(this,a,c,b,d))return!1;if(null!=a){if(parseInt(a)<parseInt(b))var k=parseInt(a),l=parseInt(b);else k=parseInt(b),l=parseInt(a);if(parseInt(c)<parseInt(d))var n=parseInt(c),q=parseInt(d);else n=parseInt(d),q=parseInt(c);var p;var u={};if(this.options.mergeCells){for(var x=
|
|
121
|
+
n;x<=q;x++)for(var w=k;w<=l;w++)if(p=this.records[x][w].merged)p=F.getColumnNameFromCoords(w-p[0],x-p[1]),u[p]=!0;x=Object.keys(u);if(x.length)for(w=0;w<x.length;w++)p=F.getCoordsFromColumnName(x[w]),u=this.options.mergeCells[x[w]],p[0]<k&&(k=p[0]),p[0]+u[0]-1>l&&(l=p[0]+u[0]-1),p[1]<n&&(n=p[1]),p[1]+u[1]-1>q&&(q=p[1]+u[1]-1)}}f==_$_496c[131]&&(this.selectedCell?(Ea.call(this,!1),p=1):p=0,this.selectedCell=[a,c,b,d],this.records[d][b].element&&e&&(w=e.target.getAttribute(_$_496c[44]),u=e.target.getAttribute(_$_496c[45]),
|
|
122
|
+
null!==w&&null!==u&&(I.adjust.call(this,b,d,3),I.adjust.call(this,b,d,2),I.adjust.call(this,b,d,1),I.adjust.call(this,b,d,0))),ha.position.call(this,a,c),0==p&&G.call(this.parent,_$_496c[134],this));aa[_$_496c[11]].call(this,k,n,l,q,f,g);f==_$_496c[131]&&(G.call(this.parent,_$_496c[135],this,k,n,l,q,e),fa.update.call(this.parent,this,this.selectedCell))};h.fromElements=function(a,c,b){var d=a.getAttribute(_$_496c[44]);a=a.getAttribute(_$_496c[45]);if(c){var e=c.getAttribute(_$_496c[44]);c=c.getAttribute(_$_496c[45])}else e=
|
|
123
|
+
d,c=a;h[_$_496c[11]].call(this,d,a,e,c,b)};h.all=function(){h[_$_496c[11]].call(this,0,0,this.options.columns.length-1,this.records.length-1)};h.getRange=function(){var a=this.selectedCell;if(!a)return _$_496c[3];var c=F.getColumnNameFromCoords(a[0],a[1]);a=F.getColumnNameFromCoords(a[2],a[3]);var b=this.options.worksheetName;b=-1!=b.indexOf(_$_496c[136])?_$_496c[137]+b+_$_496c[138]:b+_$_496c[139];return c==a?b+c:b+F.getRangeFromTokens(v.helpers.getTokensFromRange(c+_$_496c[140]+a))};return h}(),
|
|
124
|
+
aa=function(){var h=function(b){b.borders=[];b.setBorder=h[_$_496c[11]];b.getBorder=h[_$_496c[46]];b.resetBorders=h.reset;b.refreshBorders=h.refresh};h[_$_496c[46]]=function(b){return this.borders[b]};var a=function(b,d,e,f,g,k){if(!ka.isValid.call(this,b,d,e,f))return!1;var l=!1,n=null,q=null,p=null,u=null,x=null,w=this.options.freezeColumns||0;g||(g=0);this.borders[g]?n=this.borders[g]:(n={},n.element=document.createElement(_$_496c[20]),n.element.classList.add(_$_496c[141]),g==_$_496c[132]||g==
|
|
125
|
+
_$_496c[142]||g==_$_496c[131]?n.element.classList.add(_$_496c[143]+g):(k=k?k:jSuites.randomColor(!0),n.color=k,n.element.style.backgroundColor=k+_$_496c[144],n.element.style.borderColor=k),g==_$_496c[131]&&(w=function(D,r){n[D]=document.createElement(_$_496c[20]);n[D].classList.add(_$_496c[145]);n[D].setAttribute(_$_496c[146],r);n.element.appendChild(n[D]);!1===_$_496c[147]in document.documentElement&&(n[D].style.display=_$_496c[40])},w(_$_496c[148],0),n.moveLeft.style.left=_$_496c[149],n.moveLeft.style.marginTop=
|
|
126
|
+
_$_496c[150],n.moveLeft.style.marginLeft=_$_496c[150],w(_$_496c[151],1),n.moveTop.style.left=_$_496c[149],n.moveTop.style.marginTop=_$_496c[150],n.moveTop.style.marginLeft=_$_496c[150],w(_$_496c[152],2),n.moveRight.style.right=_$_496c[149],n.moveRight.style.marginTop=_$_496c[150],n.moveRight.style.marginRight=_$_496c[150],w(_$_496c[153],3),n.moveDown.style.bottom=_$_496c[149],n.moveDown.style.marginLeft=_$_496c[150],n.moveDown.style.marginBottom=_$_496c[150]),this.content.appendChild(n.element));
|
|
127
|
+
n.x1=b;n.y1=d;n.x2=e;n.y2=f;n.element.style.top=_$_496c[154];n.element.style.left=_$_496c[154];n.active=0;w=[];for(k=b;k<=e;k++)w.push(k);w=this.options.freezeColumns||0;k=this.visibleRows[0];var y=this.visibleRows[this.visibleRows.length-1],B=this.visibleCols[w];b>this.visibleCols[this.visibleCols.length-1]||f<k||d>y||e<B&&b>=w||(q=this.headers[b]&&this.headers[b].parentNode?this.headers[b].offsetLeft:0,this.headers[e]&&this.headers[e].parentNode?(oa.isVisible.call(this,e)||(e=Na.call(this,e,f)),
|
|
128
|
+
p=this.headers[e].offsetLeft):(p=this.thead.lastChild.lastChild.getAttribute(_$_496c[44]),p=w&&e<p?this.thead.lastChild.children[this.options.freezeColumns].offsetLeft:this.thead.lastChild.lastChild.offsetLeft),p=p-q+parseInt(this.options.columns[e].width)-1,q+=this.table.offsetLeft,u=this.rows[d].element&&this.rows[d].element.parentNode?this.rows[d].element.offsetTop:0,this.rows[f].element&&this.rows[f].element.parentNode?(!1===this.rows[f].visible&&(f=Ma.call(this,e,f)),x=this.rows[f].element.offsetTop+
|
|
129
|
+
this.rows[f].element.offsetHeight,n.element.style.borderBottomWidth=_$_496c[3]):(x=this.tbody.lastChild?this.tbody.lastChild.offsetTop+this.tbody.lastChild.offsetHeight:0,l=!0,n.element.style.borderBottomWidth=_$_496c[149]),x=x-u-1,u+=this.table.offsetTop,this.options.freezeColumns&&(n.element.style.borderLeftWidth=_$_496c[3],n.element.style.borderRightWidth=_$_496c[3],d=ma.getWidth.call(this),b=b<this.options.freezeColumns,e=e<this.options.freezeColumns,b&&e||(b&&!e?(e=this.content.scrollLeft+d,
|
|
130
|
+
e>q+p&&(p+=e-(q+p),n.element.style.borderRightWidth=_$_496c[149])):(e=this.content.scrollLeft+d,e>q&&(e-=q,e>p?q=u=-2E3:(q=q+e+1,p-=e,n.element.style.borderLeftWidth=_$_496c[149]))))),n.element.style.top=u+_$_496c[47],n.element.style.left=q+_$_496c[47],n.element.style.width=p+_$_496c[47],n.element.style.height=x+_$_496c[47],n.t=u,n.l=q,n.w=p,n.h=x,g==_$_496c[131]&&(n.moveLeft.style.top=n.h/2+_$_496c[47],n.moveRight.style.top=n.h/2+_$_496c[47],n.moveTop.style.left=n.w/2+_$_496c[47],n.moveDown.style.left=
|
|
131
|
+
n.w/2+_$_496c[47]),n.active=1);g==_$_496c[131]&&(l?(this.corner.style.top=_$_496c[154],this.corner.style.left=_$_496c[154]):(this.corner.style.top=u+x-2+_$_496c[47],this.corner.style.left=q+p-2+_$_496c[47]));this.borders[g]=n},c=function(b,d){b.element.style.top=_$_496c[154];b.element.style.left=_$_496c[154];b.active=0;d&&(b.x1=null,b.y1=null,b.x2=null,b.y2=null)};h[_$_496c[11]]=function(b,d,e,f,g,k){a.call(this,b,d,e,f,g,k);g==_$_496c[131]&&(Ea.call(this,!0),K.call(this,_$_496c[109],{x1:b,y1:d,x2:e,
|
|
132
|
+
y2:f}))};h.reset=function(b,d){b&&b!=_$_496c[131]||(this.corner.style.top=_$_496c[154],this.corner.style.left=_$_496c[154],Ea.call(this,!1));if(b)this.borders[b]&&c(this.borders[b],d);else for(var e=Object.keys(this.borders),f=0;f<e.length;f++)c(this.borders[e[f]],d);b&&b!=_$_496c[131]||K.call(this,_$_496c[110])};h.refresh=function(b){var d=this.borders;if(b)d[b]&&null!=d[b].x1&&a.call(this,d[b].x1,d[b].y1,d[b].x2,d[b].y2,b);else{b=Object.keys(d);for(var e=0;e<b.length;e++)d[b[e]]&&null!=d[b[e]].x1&&
|
|
133
|
+
a.call(this,d[b[e]].x1,d[b[e]].y1,d[b[e]].x2,d[b[e]].y2,b[e])}this.edition&&(d=this.parent.input,ha.position.call(this,d.x,d.y))};h.destroy=function(b){var d;this&&(d=this.borders[b])&&(d.element.remove(),delete this.borders[b])};return h}(),Ua=function(){var h=function(a){a.setGroup=h[_$_496c[11]];a.unsetGroup=h.unset};h[_$_496c[11]]=function(a,c,b){0==a&&(b=document.createElement(_$_496c[155]),b.classList.add(_$_496c[156]),this.thead.insertBefore(b,this.thead.firstChild),a=document.createElement(_$_496c[157]),
|
|
134
|
+
a.innerHTML=_$_496c[158],b.appendChild(a),a=document.createElement(_$_496c[157]),b.appendChild(a),c=this.headers[c])&&(c=c.querySelector(_$_496c[159]),c||(c=document.createElement(_$_496c[20]),c.classList.add(_$_496c[160]),c.innerText=_$_496c[161],a.appendChild(c)))};h.unset=function(a,c){};return h}(),za=function(){var h={start:function(a){if(!R.call(this.parent,this))return!1;if(null!==a.target.getAttribute(_$_496c[45])){var c=a.target.getAttribute(_$_496c[45]);h.event={y:parseInt(c),h:a.target.offsetHeight,
|
|
135
|
+
p:a.pageY}}else null!==a.target.getAttribute(_$_496c[44])&&(c=a.target.getAttribute(_$_496c[44]),h.event={x:parseInt(c),w:a.target.offsetWidth,p:a.pageX})},end:function(a){var c=[];if(null!=h.event.y){var b=parseInt(this.rows[h.event.y].element.offsetHeight);var d=this.getSelectedRows(!0);a=d.indexOf(parseInt(h.event.y));if(d.length&&-1<a)for(var e=0;e<d.length;e++)c.push(parseInt(this.rows[d[e]].element.offsetHeight));else d=[];-1==a?(d.push(h.event.y),c.push(h.event.h)):c[a]=h.event.h;this.setHeight(d,
|
|
136
|
+
b,c)}else if(null!=h.event.x){b=parseInt(this.colgroup[h.event.x].getAttribute(_$_496c[162]));d=this.getSelectedColumns();a=d.indexOf(parseInt(h.event.x));if(d.length&&-1<a)for(e=0;e<d.length;e++)c.push(parseInt(this.options.columns[d[e]].width));else d=[];-1==a?(d.push(h.event.x),c.push(h.event.w)):c[a]=h.event.w;this.setWidth(d,b,c)}h.event=null},update:function(a){null!=h.event.y?(a=a.pageY-h.event.p,0<h.event.h+a&&(this.rows[h.event.y].element.style.height=h.event.h+a+_$_496c[47],this.refreshBorders())):
|
|
137
|
+
null!=h.event.x&&(a=a.pageX-h.event.p,0<h.event.w+a&&(this.colgroup[h.event.x].setAttribute(_$_496c[162],h.event.w+a),this.options.columns[h.event.x].width=h.event.w+a,0<this.options.freezeColumns&&ma.getWidth.call(this),this.refreshBorders()))},cancel:function(){h.end.call(this)}};return h}(),Pa=function(){var h={start:function(a){var c=this.parent.helper;a=parseInt(a.target.getAttribute(_$_496c[44]));if(this.merged.cols[a])console.error(_$_496c[163]);else{h.event={x:a,d:a};this.headers[a].classList.add(_$_496c[164]);
|
|
138
|
+
for(var b=0;b<this.tbody.children.length;b++){var d=this.tbody.children[b].getAttribute(_$_496c[45]);this.records[d][a].element.classList.add(_$_496c[164])}b=this.parent.element.getBoundingClientRect();a=this.headers[a].getBoundingClientRect();d=this.content.getBoundingClientRect();c.style.display=_$_496c[16];c.style.top=d.top-b.top+_$_496c[47];c.style.left=a.left-d.left+_$_496c[47];c.style.width=_$_496c[165];c.style.height=d.height+_$_496c[47];c.classList.add(_$_496c[166])}},end:function(){this.headers[h.event.x].classList.remove(_$_496c[164]);
|
|
139
|
+
for(var a=0;a<this.tbody.children.length;a++){var c=this.tbody.children[a].getAttribute(_$_496c[45]);this.records[c][h.event.x].element.classList.remove(_$_496c[164])}null!=h.event.d&&h.event.x!=h.event.d&&(this.moveColumn(h.event.x,h.event.d),this.refreshBorders());this.parent.helper.classList.remove(_$_496c[166]);this.parent.helper.style.display=_$_496c[3];h.event=null},cancel:function(){h.event.d=null;h.end.call(this)},update:function(a){var c=a.target.getAttribute(_$_496c[44]);if(null!=c)if(c=
|
|
140
|
+
parseInt(c),this.merged.cols[c])console.error(_$_496c[163]);else{a=a.target.clientWidth/2>a.offsetX;h.event.d=a?h.event.x<c?parseInt(c)-1:parseInt(c):h.event.x>c?parseInt(c)+1:parseInt(c);c=this.headers[c].getBoundingClientRect();var b=this.content.getBoundingClientRect();this.parent.helper.style.left=(a?c.left:c.right)-b.left+_$_496c[47]}}};return h}(),ta=function(){var h={start:function(a){if(R.call(this.parent,this)){this.resetSelection();var c=this.parent.helper;if(null!==a.target.getAttribute(_$_496c[45])){var b=
|
|
141
|
+
parseInt(a.target.getAttribute(_$_496c[45]));this.merged.rows[b]?console.error(_$_496c[167]):this.results?console.error(_$_496c[168]):(h.event={y:b,d:b},this.rows[b].element.classList.add(_$_496c[164]),a=this.parent.element.getBoundingClientRect(),b=this.rows[b].element.getBoundingClientRect(),c.style.display=_$_496c[16],c.style.top=b.top-a.top+_$_496c[47],c.style.left=_$_496c[169],c.style.width=this.content.offsetWidth-50+_$_496c[47],c.style.height=_$_496c[165],c.classList.add(_$_496c[170]))}else if(null!==
|
|
142
|
+
a.target.getAttribute(_$_496c[44]))if(b=parseInt(a.target.getAttribute(_$_496c[44])),this.merged.cols[b])console.error(_$_496c[163]);else{h.event={x:b,d:b};this.headers[b].classList.add(_$_496c[164]);for(a=0;a<this.tbody.children.length;a++){var d=this.tbody.children[a].getAttribute(_$_496c[45]);this.records[d][b].element.classList.add(_$_496c[164])}a=this.parent.element.getBoundingClientRect();b=this.headers[b].getBoundingClientRect();d=this.content.getBoundingClientRect();c.style.display=_$_496c[16];
|
|
143
|
+
c.style.top=d.top-a.top+_$_496c[47];c.style.left=b.left-d.left+_$_496c[47];c.style.width=_$_496c[165];c.style.height=d.height+_$_496c[47];c.classList.add(_$_496c[166])}}else return!1},end:function(){if(null!=h.event.y)this.rows[h.event.y].element.classList.remove(_$_496c[164]),null!=h.event.d&&h.event.y!=h.event.d&&(this.moveRow(h.event.y,h.event.d),this.updateSelectionFromCoords(0,h.event.d,this.options.columns.length-1,h.event.d)),this.parent.helper.classList.remove(_$_496c[170]);else if(null!=
|
|
144
|
+
h.event.x){this.headers[h.event.x].classList.remove(_$_496c[164]);for(var a=0;a<this.tbody.children.length;a++){var c=this.tbody.children[a].getAttribute(_$_496c[45]);this.records[c][h.event.x].element.classList.remove(_$_496c[164])}null!=h.event.d&&h.event.x!=h.event.d&&(this.moveColumn(h.event.x,h.event.d),this.refreshBorders());this.parent.helper.classList.remove(_$_496c[166])}this.parent.helper.style.display=_$_496c[3];h.event=null},cancel:function(){h.event.d=null;h.end.call(this)},update:function(a){if(null!=
|
|
145
|
+
h.event.y){var c=a.target.getAttribute(_$_496c[45]);if(null!=c){var b=c=parseInt(c),d=a.target.clientHeight/2>a.offsetY;d?h.event.y<c&&(b=c-1):h.event.y>c&&(b=c+1);a=!1;this.merged.rows[b]&&(h.event.y>b?this.merged.rows[b-1]&&(a=!0):this.merged.rows[b+1]&&(a=!0));a||(h.event.d=b,b=this.parent.element.getBoundingClientRect(),c=this.rows[c].element.getBoundingClientRect(),this.parent.helper.style.top=(d?c.top:c.bottom)-b.top+_$_496c[47])}}else d=a.target.getAttribute(_$_496c[44]),null!=d&&(b=d=parseInt(d),
|
|
146
|
+
(c=a.target.clientWidth/2>a.offsetX)?h.event.x<d&&(b=d-1):h.event.x>d&&(b=d+1),a=!1,this.merged.cols[b]&&(h.event.x>b?this.merged.cols[b-1]&&(a=!0):this.merged.cols[b+1]&&(a=!0)),a||(h.event.d=b,b=this.headers[d].getBoundingClientRect(),d=this.content.getBoundingClientRect(),this.parent.helper.style.left=(c?b.left:b.right)-d.left+_$_496c[47]))}};return h}(),pa=function(){var h=function(a){a.getMerge=h[_$_496c[46]];a.setMerge=h[_$_496c[11]];a.updateMerge=h.update;a.removeMerge=h.remove;a.destroyMerged=
|
|
147
|
+
a.destroyMerge=h.destroy};h.isMerged=function(a,c){var b=F.getColumnNameFromCoords(a,c);if(b=this.merged.cells[b])if(i=this.options.mergeCells[b])m&&void 0!==m[b]||(i[1]>t&&(t=i[1]),m&&(m[b]=this.records[c][a].element&&!this.records[c][a].merged?!0:!1))};h.getAffected=function(a){if(void 0!==this[a]){for(var c=a,b=this[a],d=[];this[c]==b;)d.push(c),c--;for(c=a+1;this[c]==b;)d.push(c),c++;d.sort(function(e,f){return e-f});return d}return!1};h[_$_496c[46]]=function(a){return a?this.options.mergeCells[a]:
|
|
148
|
+
this.options.mergeCells};h[_$_496c[11]]=function(a,c,b){if(!R.call(this.parent,this))return!1;this.options.mergeCells||(this.options.mergeCells={});var d,e=null,f={},g={},k={},l=!1;typeof a==_$_496c[17]?k[a]=[c,b]:typeof a==_$_496c[88]?k=a:((e=this.getHighlighted())?e=[F.getColumnNameFromCoords(e[0],e[1]),e[2]-e[0]+1,e[3]-e[1]+1]:(jSuites.notification({message:E(_$_496c[171])}),e=!1),e&&(k[e[0]]=[e[1],e[2]]));c=Object.keys(k);if(c.length){for(b=0;b<c.length;b++){var n=c[b],q=k[c[b]][0],p=k[c[b]][1];
|
|
149
|
+
q=parseInt(q);p=parseInt(p);if((!q||2>q)&&(!p||2>p))console.log(E(_$_496c[172])+_$_496c[140]+n);else if(this.options.mergeCells[n])g[n]=[q,p],f[n]=this.options.mergeCells[n],h.update.call(this,n,q,p);else{e=F.getCoordsFromColumnName(n);for(var u=e[1];u<e[1]+p;u++)for(var x=e[0];x<e[0]+q;x++)a=F.getColumnNameFromCoords(x,u),(d=this.merged.cells[a])&&this.options.mergeCells[d]&&(f[d]=this.options.mergeCells[d],h.applyDestroy.call(this,d));g[n]=this.options.mergeCells[n]=[q,p];h.applyCreate.call(this,
|
|
150
|
+
n);S.attached.call(this,e[0],e[1])||(l=e)}}Object.keys(g).length&&(l&&I[_$_496c[51]].call(this,e[1],e[0]),W.call(this.parent,{worksheet:this,action:_$_496c[72],newValue:g,oldValue:f}),K.call(this,_$_496c[72],[g]),h.build.call(this),ka.refresh.call(this),aa.refresh.call(this),G.call(this.parent,_$_496c[173],this,g,f))}};h.update=function(a,c,b){var d=this.options.mergeCells;if(d[a]){var e=d[a][1];if(c!==d[a][0]||e!==b)h.applyDestroy.call(this,a),c&&b&&(d[a]=[c,b],h.applyCreate.call(this,a));h.build.call(this)}};
|
|
151
|
+
h.remove=function(a,c){if(!R.call(this.parent,this))return!1;c={};var b={},d={};typeof a==_$_496c[17]?d[a]=!0:typeof a==_$_496c[88]&&(d=a);a=Object.keys(d);for(d=0;d<a.length;d++)this.options.mergeCells[a[d]]&&(c[a[d]]=this.options.mergeCells[a[d]],b[a[d]]=!0,h.applyDestroy.call(this,a[d],!0));h.build.call(this);W.call(this.parent,{worksheet:this,action:_$_496c[73],newValue:b,oldValue:c});K.call(this,_$_496c[73],{data:b})};h.destroy=function(){h.remove.call(this,this.options.mergeCells,!0)};h.applyCreate=
|
|
152
|
+
function(a,c){var b=this.options.mergeCells;if(b[a]){var d=b[a][0]||1,e=b[a][1]||1;a=F.getCoordsFromColumnName(a);if(!this.records[a[1]][a[0]].merged||1==c)if(b=S[_$_496c[46]].call(this,a[0],a[1])){b.classList.remove(_$_496c[53]);b.style.display=_$_496c[3];1<d?b.setAttribute(_$_496c[174],d):b.removeAttribute(_$_496c[174]);1<e?b.setAttribute(_$_496c[175],e):b.removeAttribute(_$_496c[175]);1==this.options.textOverflow&&(b.style.overflow=_$_496c[54]);for(var f=0;f<e;f++)for(var g=0;g<d;g++){c=a[0]+g;
|
|
153
|
+
var k=a[1]+f;if(b=this.records[k][c])if(b.merged=[g,f,b.v,d,e],0!=g||0!=f)b.element||S[_$_496c[46]].call(this,c,k),b.element.classList.add(_$_496c[53]),b.merged[3]=b.element.innerText,b.element.innerText=_$_496c[3],P.call(this,c,k,_$_496c[3])}}}};h.applyDestroy=function(a,c){var b=this.options.mergeCells;if(b[a]){var d=F.getCoordsFromColumnName(a),e=d[0];d=d[1];var f=b[a][0],g=b[a][1];delete this.options.mergeCells[a];for(a=0;a<g;a++)for(var k=0;k<f;k++)if(b=this.records[d+a][e+k])b.element&&(0==
|
|
154
|
+
k&&0==a?(b.element.removeAttribute(_$_496c[174]),b.element.removeAttribute(_$_496c[175])):(b.element.classList.remove(_$_496c[53]),1==c&&(P.call(this,e+k,d+a,b.merged[2]),b.element.innerHTML=b.merged[3]))),b.merged&&delete b.merged}};h.updateConfig=function(a,c,b,d){if(1==c)var e=[b];else{e=[];for(var f=b;f<b+d;f++)e.push(f)}var g=this.options.mergeCells,k=Object.keys(g),l={};for(f=0;f<k.length;f++){b=F.getCoordsFromColumnName(k[f]);for(var n=b[a];n<b[a]+g[k[f]][a];n++)-1!==e.indexOf(n)&&(l[k[f]]||
|
|
155
|
+
(l[k[f]]=[g[k[f]][0],g[k[f]][1]],1==c&&(l[k[f]][a]+=d)),0==c&&l[k[f]][a]--)}k=Object.keys(l);for(f=0;f<k.length;f++)h.update.call(this,k[f],l[k[f]][0],l[k[f]][1]);h.build.call(this)};h.build=function(){var a=this.options.mergeCells;this.merged={cols:[],rows:[],cells:[]};if(a)for(var c=Object.keys(a),b=0;b<c.length;b++){for(var d=F.getCoordsFromColumnName(c[b]),e=parseInt(a[c[b]][0]),f=parseInt(a[c[b]][1]),g=0;g<e;g++)this.merged.cols[d[0]+g]=!0;for(var k=0;k<f;k++)this.merged.rows[d[1]+k]=!0;for(k=
|
|
156
|
+
0;k<f;k++)for(g=0;g<e;g++){var l=F.getColumnNameFromCoords(d[0]+g,d[1]+k);this.merged.cells[l]=c[b]}}};h.batch=function(a){var c=Object.keys(a);if(c.length)for(var b=0;b<c.length;b++)!1===a[c[b]]&&h.applyCreate.call(this,c[b])};return h}(),Ca=function(){var h=function(a){a.getHeader=h[_$_496c[46]];a.setHeader=h[_$_496c[11]];a.getHeaders=h.all};h[_$_496c[46]]=function(a){var c;if(c=this.options.columns)return c[a].title||F.getColumnName(a)};h.all=function(a){for(var c=[],b=0;b<this.options.columns.length;b++)c.push(h[_$_496c[46]].call(this,
|
|
157
|
+
b));return a?c:c.join(this.options.csvDelimiter)};h[_$_496c[11]]=function(a,c){if(!R.call(this.parent,this))return!1;var b;if(b=this.options.columns[a]){var d=h[_$_496c[46]].call(this,a);if(!c&&(c=prompt(E(_$_496c[176]),d),!c))return!1;b.title=c;if(b=this.headers[a])b.innerHTML=c,b.setAttribute(_$_496c[177],c);W.call(this.parent,{worksheet:this,action:_$_496c[78],column:a,oldValue:d,newValue:c});K.call(this,_$_496c[78],{column:a,title:c});G.call(this.parent,_$_496c[178],this,a,c,d)}};h.create=function(a){if(this.headers[a])return this.headers[a];
|
|
158
|
+
var c=this.options.columns[a],b=c.width||this.options.defaultColWidth,d=c.title||F.getColumnName(a),e=document.createElement(_$_496c[157]);this.parent.config.stripHTML?e.innerText=d:e.innerHTML=d;e.setAttribute(_$_496c[44],a);c.align&&(e.style.textAlign=c.align);c.title&&e.setAttribute(_$_496c[177],e.innerText);c.tooltip&&(e.title=c.tooltip);d=this.options.filters;!0===c.filter&&(d=!0);!1===c.filter&&(d=!1);!0===d&&e.classList.add(_$_496c[179]);!1===c.visible&&(b=_$_496c[103]);d=document.createElement(_$_496c[180]);
|
|
159
|
+
d.setAttribute(_$_496c[162],b);c.type==_$_496c[54]&&(e.style.display=_$_496c[40],d.style.display=_$_496c[40]);this.headers[a]=e;this.colgroup[a]=d;G.call(this.parent,_$_496c[181],this,a,e,c);return e};return h}(),Z=function(){var h=function(c,b,d){var e=this.footers.content,f;e&&e[b]&&e[b][c]&&(f=e[b][c].element)&&(void 0===d&&(e=this.options.footers,d=e[b]&&e[b][c]?e[b][c]:_$_496c[3]),Q(d)&&1==this.parent.config.parseFormulas&&(d=Y.execute.call(this,d,c,null,!1)),this.options.applyMaskOnFooters&&
|
|
160
|
+
(e=ha[_$_496c[46]].call(this,c),d=v.editors.general.parseValue(c,b,d,this,e[1],f)),d instanceof Element||d instanceof HTMLDocument?(f.innerHTML=_$_496c[3],f.appendChild(d)):1==this.parent.config.stripHTML?f.innerText=d:f.innerHTML=d)},a=function(c){c.getFooter=a[_$_496c[46]];c.setFooter=a[_$_496c[11]];c.resetFooter=a.reset;c.refreshFooter=a.refresh;c.getFooterValue=a.value;c.setFooterValue=a.value};a[_$_496c[46]]=function(){return this.options.footers};a[_$_496c[11]]=function(c){if(c){var b=this.options.footers;
|
|
161
|
+
this.options.footers=c}this.options.footers!=b&&(Z.build.call(this),a.render.call(this),K.call(this,_$_496c[182],{data:this.options.footers}),G.call(this.parent,_$_496c[183],this,this.options.footers,b))};a.refresh=function(){var c=this.options.footers;if(c&&c.length)for(var b=0;b<c.length;b++)for(var d=0;d<c[b].length;d++)h.call(this,d,b,c[b][d])};a.value=function(c,b,d){if(void 0===d)return this.options.footers[b][c];h.call(this,c,b,d);K.call(this,_$_496c[184],{x:c,y:b,value:d});G.call(this.parent,
|
|
162
|
+
_$_496c[185],this,c,b,d)};a.reset=function(){var c=this.options.footers;this.options.footers=null;this.footers.content=null;this.tfoot.innerHTML=_$_496c[3];K.call(this,_$_496c[186],{});G.call(this.parent,_$_496c[183],this,null,c)};a.create=function(c,b){var d=this.footers.content[b][c];if(d&&d.element)return d.element;d=this.footers.content[b][c]={};var e=this.options.columns[c].align;d.element=document.createElement(_$_496c[157]);d.element.setAttribute(_$_496c[44],c);d.element.setAttribute(_$_496c[45],
|
|
163
|
+
b);e&&(d.element.style.textAlign=e);h.call(this,c,b);this.options.columns[c].type==_$_496c[54]&&d.element.classList.add(_$_496c[53]);return d.element};a.build=function(){this.footers={element:this.tfoot,content:[]};if(this.options.footers){this.tfoot.innerHTML=_$_496c[3];for(var c=0;c<this.options.footers.length;c++){if(!this.footers.content[c]){this.footers.content[c]=[];var b=document.createElement(_$_496c[155]),d=document.createElement(_$_496c[157]);d.innerHTML=_$_496c[158];b.appendChild(d);this.footers.element.appendChild(b)}for(b=
|
|
164
|
+
0;b<this.options.columns.length;b++)this.options.footers[c][b]||(this.options.footers[c][b]=_$_496c[3]),this.footers.content[c][b]||(this.footers.content[c][b]={})}}};a.render=function(){for(var c=this.options.footers,b=0;b<c.length;b++)for(var d=0;d<c[b].length;d++){var e=Z.create.call(this,d,b);this.tfoot.children[b].appendChild(e)}};a.adjust=function(c,b,d){var e=[],f=this.options.footers,g=this.footers.content;if(f)if(1==d){if(this.headers[c]&&this.headers[c].parentNode)var k=this.headers[c]==
|
|
165
|
+
this.thead.lastChild.lastChild?!0:!1,l=!0;for(d=0;d<f.length;d++){for(var n=f[d].splice(c),q=c;q<c+b;q++)f[d][q]=_$_496c[3];f[d]=f[d].concat(n);n=g[d].splice(c);for(q=c;q<c+b;q++)g[d][q]={element:a.create.call(this,q,d)},l&&(1==k?this.tfoot.children[d].appendChild(g[d][q].element):this.tfoot.children[d].insertBefore(g[d][q].element,this.tfoot.children[d].children[c].nextSibling));g[d]=g[d].concat(n)}}else for(d=0;d<f.length;d++){for(q=c;q<c+b;q++)(k=this.footers.content[d][q].element)&&k.parentNode&&
|
|
166
|
+
k.parentNode.removeChild(k);g[d].splice(c,b);e[d]=f[d].splice(c,b)}return e};return a}(),wa=function(){var h=function(a){a.setNestedCell=h.cell;a.getNestedCell=h.cell;a.setNestedHeaders=h[_$_496c[11]];a.getNestedHeaders=h[_$_496c[46]];a.resetNestedHeaders=h.reset};h[_$_496c[46]]=function(){return this.options.nestedHeaders};h[_$_496c[11]]=function(a){h.reset.call(this);this.options.nestedHeaders=a;h.build.call(this);h.render.call(this);aa.refresh.call(this);K.call(this,_$_496c[187],{data:a});G.call(this.parent,
|
|
167
|
+
_$_496c[188],this,a)};h.reset=function(){var a=[],c=this.thead.children;this.options.nestedHeaders=null;for(var b=0;b<c.length;b++)c[b].classList.contains(_$_496c[189])&&a.push(c[b]);if(a.length)for(;c=a.shift();)c.remove();this.nested=null;aa.refresh.call(this);K.call(this,_$_496c[190]);G.call(this.parent,_$_496c[188],this,[])};h.cell=function(a,c,b){if(b){if(!R.call(this.parent,this))return!1;var d=this.options.nestedHeaders[c][a],e=this.nested.content[c][a].element;void 0!==b.title&&(e.innerText=
|
|
168
|
+
b.title);void 0!==b.tooltip&&(e.title=b.tooltip);void 0!==b.colspan&&(d.colspan=b.colspan,e.setAttribute(_$_496c[174],b.colspan),e.style.display=0==d.colspan?_$_496c[40]:_$_496c[3]);K.call(this,_$_496c[191],{x:a,y:c,properties:b});G.call(this.parent,_$_496c[192],this,a,c,b)}else return this.nested.content[c][a].element};h.range=function(a){a=this.options.nestedHeaders[a];for(var c=[],b=0,d=0;d<a.length;d++){var e=parseInt(a[d].colspan);c[d]=[b,b+e-1];b+=e}return c};h.getColumns=function(a){a=this.options.nestedHeaders[a];
|
|
169
|
+
for(var c=[],b=0;b<a.length;b++)for(var d=a[b].colspan,e=0;e<d;e++)c.push(b);return c};h.getAffected=function(a){var c=[],b=this.options.nestedHeaders;if(b){var d,e,f;for(e=0;e<b.length;e++)if((d=h.getColumns.call(this,e))&&void 0!==d[a]){var g=h.range.call(this,e);for(f=g[d[a]][0];f<=g[d[a]][1];f++)c.push(f)}}return c};h.create=function(a,c){if(this.nested.content[c][a])return this.nested.content[c][a].element;var b=this.options.nestedHeaders[c][a]||{},d=this.nested.content[c][a]={};b.colspan||(b.colspan=
|
|
170
|
+
1);b.align||(b.align=_$_496c[193]);b.title||(b.title=_$_496c[3]);var e=document.createElement(_$_496c[157]);e.setAttribute(_$_496c[194],a);e.setAttribute(_$_496c[195],c);e.setAttribute(_$_496c[174],b.colspan);e.setAttribute(_$_496c[196],b.align);e.innerHTML=b.title;b.tooltip&&(e.title=b.tooltip);return d.element=e};h.build=function(){this.nested||(this.nested={content:[]});var a,c,b=0;if(a=this.options.nestedHeaders){for(c=0;c<a.length;c++){this.nested.content[c]=[];var d=document.createElement(_$_496c[157]);
|
|
171
|
+
d.innerHTML=_$_496c[158];var e=document.createElement(_$_496c[155]);e.classList.add(_$_496c[189]);e.appendChild(d);this.thead.insertBefore(e,this.thead.lastChild)}for(c=0;c<this.thead.children.length;c++)this.thead.children[c].firstChild.style.top=b+_$_496c[47],b+=this.thead.children[c].offsetHeight}};h.adjust=function(a,c,b,d){var e=this.options.nestedHeaders;if(e)if(1==b)if(d&&d.nested)for(b=0;b<e.length;b++)for(var f=0;f<e[b].length;f++)h.cell.call(this,f,b,{colspan:d.nested[b][f]});else for(b=
|
|
172
|
+
0;b<e.length;b++){if((f=h.getColumns.call(this,b))&&e[b][f]){f=f[a];var g=parseInt(e[b][f].colspan)+c;h.cell.call(this,f,b,{colspan:g})}}else{d=[];for(b=0;b<e.length;b++)if(g=h.getColumns.call(this,b)){d[b]=[];for(f=0;f<c;f++){var k=g[a+f];typeof d[b][k]==_$_496c[13]&&(d[b][k]=e[b][k].colspan);e[b][k].colspan--}g=Object.keys(d[b]);for(f=0;f<g.length;f++)h.cell.call(this,g[f],b,{colspan:e[b][g[f]].colspan})}return d}};return h}(),ba=function(){var h=function(a,c){var b=function(q){var p;(p=this.results)?
|
|
173
|
+
q=p.indexOf(q):p=this.rows;q--;for(var u=q;0<=u;u--)if(q=this.results?p[u]:u,this.rows[q]&&this.rows[q].element)return q;return 0},d=function(q){var p;(p=this.results)?q=p.indexOf(q):p=this.rows;q++;for(var u=q;u<p.length;u++)if(q=this.results?p[u]:u,this.rows[q]&&this.rows[q].element)return q;return p[p.length-1]},e=function(q,p){for(;0<=q;q--)if(this.records[p][q].element&&!this.records[p][q].element.classList.contains(_$_496c[53]))return q;return 0},f=function(q,p){for(;q<this.options.columns.length;q++)if(this.records[p][q].element&&
|
|
174
|
+
!this.records[p][q].element.classList.contains(_$_496c[53]))return q;return this.options.columns-1},g=this.getHighlighted(),k=g[0],l=g[1],n=g[2];g=g[3];a=parseInt(a);c=parseInt(c);null!=a&&null!=c&&(0<a-n?(f=f.call(this,parseInt(n)+1,c),a=parseInt(a)):(f=parseInt(a),a=e.call(this,parseInt(k)-1,c)),0<c-g?(d=d.call(this,parseInt(g)),c=parseInt(c)):(d=parseInt(c),c=b.call(this,parseInt(l))),a-f<c-d?(f=parseInt(k),a=parseInt(n)):(d=parseInt(l),c=parseInt(g)),this.setBorder(f,d,a,c,_$_496c[142]))};h.execute=
|
|
175
|
+
function(a){if(!R.call(this.parent,this))return!1;var c=this.borders.cloning;if(a)if(c&&c.active){a=c.x1;var b=c.y1,d=c.x2,e=c.y2}else return!1;else if(d=this.getSelected(),d.length)a=d[0].x,b=parseInt(d[d.length-1].y)+1,d=d[d.length-1].x,e=this.options.data.length-1;else return!1;var f=0,g,k=[],l=[],n=!1;var q=this.getHighlighted();var p=Fa[_$_496c[46]].call(this,q,!1,!1),u=this.getSelected();if(g=this.getStyle(u,!0)){var x=Object.keys(g);if(x.length)for(var w=0;w<x.length;w++)k.push(g[x[w]])}if(q[0]==
|
|
176
|
+
a){g=b<q[1]?b-q[1]:1;var y=0}else y=a<q[0]?a-q[0]:1,g=0;x=0;a=parseInt(a);d=parseInt(d);b=parseInt(b);e=parseInt(e);for(var B=q[0]==a?1:0,D=g,r=y,z=b;z<=e;z++)if(!this.results||-1!=this.results.indexOf(z)){void 0==p[f]&&(f=0);q=0;0==B?(y=r,g=D):y=r;for(w=a;w<=d;w++){if(!(0!=n||this.records[z][w].element&&this.records[z][w].element.classList.contains(_$_496c[18]))){if((!c||1!=c.active)&&P.call(this,w,z)){n=!0;continue}void 0==p[f][q]&&(q=0);var A=p[f][q];var C=void 0!==this.options.columns[w].autoIncrement?
|
|
177
|
+
this.options.columns[w].autoIncrement?!0:!1:this.parent.config.autoIncrement;1==this.options.columns[w].shiftFormulas&&(C=!0);A&&C&&(this.options.columns[w].type==_$_496c[59]||this.options.columns[w].type==_$_496c[14]?Q(A)?A=Y.shiftFormula(A,y,g):A==Number(A)&&(A=Number(A)+g):this.options.columns[w].type==_$_496c[197]&&(C=new Date(A),C.setDate(C.getDate()+g),A=C.getFullYear()+_$_496c[198]+jSuites.two(parseInt(C.getMonth()+1))+_$_496c[198]+jSuites.two(C.getDate())+_$_496c[136]+_$_496c[199]));C={x:w,
|
|
178
|
+
y:z,value:A};k&&null!=k[x]&&(C.style=k[x],x++,x>=k.length&&(x=0));l.push(C)}q++;0==B&&y++}f++;g++}l.length&&(u[0].x<a&&(a=u[0].x),u[0].y<b&&(b=u[0].y),u[u.length-1].x>d&&(d=u[u.length-1].x),u[u.length-1].y>e&&(e=u[u.length-1].y),this.setValue(l),this.resetBorders(_$_496c[142],!0),this.updateSelectionFromCoords(a,b,d,e))};h.end=function(a){ba.event=!1;ba.execute.call(this,!0);ma.refresh.call(this)};h.cancel=function(a){ba.event=!1;this.resetBorders(_$_496c[142],!0)};return h}(),Fa=function(){var h=
|
|
179
|
+
function(a){a.getData=h[_$_496c[46]];a.getJson=h[_$_496c[46]];a.setData=h[_$_496c[11]];a.loadData=h.load;a.getRowData=h.getRowData;a.setRowData=h.setRowData;a.getColumnData=h.getColumnData;a.setColumnData=h.setColumnData;a.updateData=h.update;a.refresh=h.refresh;a.data=h[_$_496c[46]];a.download=h.download;a.copy=h.copy;a.paste=h.paste;a.cut=function(){return a.copy(!0)}};h[_$_496c[46]]=function(a,c,b,d){!0===a&&(a=this.getHighlighted());var e=a?!0:!1,f=[],g=this.options.columns.length,k=this.options.data.length;
|
|
180
|
+
void 0===d&&(d=this.dataType&&typeof b==_$_496c[13]?1:0);for(var l=0;l<k;l++){var n=null;var q=d?{}:[];for(var p=0;p<g;p++){var u;if(!(u=!e)){u=a[1];var x=a[2],w=a[3];u=p>=a[0]&&p<=x&&l>=u&&l<=w?!0:!1}if(u&&(!e||!this.results||-1!=this.results.indexOf(l))){u=P.call(this,p,l);if(c){if(e&&!1===this.rows[l].visible)continue;n=ia.processed.call(this,p,l);void 0!==n&&(u=n)}b&&u.match&&(u.match(b)||u.match(/\n/)||u.match(/"/))&&(u=u.replace(new RegExp(_$_496c[200],_$_496c[201]),_$_496c[202]),u=_$_496c[200]+
|
|
181
|
+
u+_$_496c[200]);d?jSuites.path.call(q,_$_496c[3]+da.call(this,p),u):q.push(u);n=!0}}n&&(b?f.push(q.join(b)):f.push(q))}return b?f.join(_$_496c[10])+_$_496c[10]:f};h.parse=function(){for(var a,c={},b=0,d,e=[],f=this.options.data,g=0;g<f.length;g++)a=null,d=g,f[g].data&&(Array.isArray(f[g].data)||typeof f[g].data==_$_496c[88])&&(typeof f[g].id==_$_496c[14]&&(a=parseInt(f[g].id)),typeof f[g].row==_$_496c[14]&&(d=f[g].row),e[d]=f[g].data,f[g]=[]),d>b&&(b=d),a&&(c[d]=a);if(Object.keys(e).length)for(g=
|
|
182
|
+
0;g<=b;g++)e[g]&&(f[g]=e[g]);b=this.getPrimaryKey();if(!1!==b)for(b=da.call(this,b),g=0;g<f.length;g++)c[g]||!1===b||(a=parseInt(f[g][b]),0<a&&(c[g]=a));return c};h.type=function(){for(var a=this.dataType=0;a<this.options.columns.length;a++)typeof this.options.columns[a].name!==_$_496c[13]&&(this.dataType=1)};h[_$_496c[11]]=function(a){a=h.standardize(a);var c={},b=[],d={};var e=Object.keys(a[0]).length-this.options.columns.length;0<e&&this.insertRow(e);var f=a.length-this.options.data.length;0<f&&
|
|
183
|
+
this.insertRow(f);for(var g=0;g<this.options.data.length;g++){void 0===a[g]&&(a[g]={row:g,data:[]});for(var k=0;k<this.options.columns.length;k++)a[g].data[k]||(a[g].data[k]=_$_496c[3])}for(k=0;k<this.options.columns.length;k++){var l=da.call(this,k);d[l]=k}for(g=0;g<a.length;g++){f=a[g].row;l=Object.keys(a[g].data);for(k=0;k<l.length;k++)e=null,void 0!==d[l[k]]?e=d[l[k]]:-1<l[k]&&(e=parseInt(l[k])),null!==e&&b.push({x:e,y:f,value:a[g].data[l[k]]});a[g].id&&(c[f]=a[g].id)}va.setId.call(this,c);ia[_$_496c[11]].call(this,
|
|
184
|
+
b,null,!0)};h.build=function(){this.results=null;this.rows=[];this.records=[];this.sequence=0;h.type.call(this);if(this.options.data){var a=h.parse.call(this),c=this.options.data.length;this.options.minDimensions[1]>c&&(c=this.options.minDimensions[1]);for(var b=0;b<c;b++){var d=a[b]?a[b]:null;qa.row.call(this,b,d)}}};h.load=function(a){this.resetBorders();this.resetSelection();this.tbody.innerText=_$_496c[3];this.options.data=a;h.build.call(this);ca.update.call(this);I.call(this,!0,!0)};h.refresh=
|
|
185
|
+
function(a){if(typeof a!==_$_496c[13])for(var c=0;c<this.options.columns.length;c++){var b=this.records[a]&&this.records[a][c].element?this.records[a][c].element:null,d=ha[_$_496c[46]].call(this,c,a);typeof d[0].updateCell==_$_496c[89]&&d[0].updateCell(b,P.call(this,c,a),c,a,this,d[1]);b&&S.applyOverflow.call(this,b,c,a)}else if(this.options.url){var e=this;1==this.parent.config.loadingSpin&&jSuites.loading.show();jSuites.ajax({url:this.options.url,method:_$_496c[62],dataType:_$_496c[63],success:function(f){e.setData(f);
|
|
186
|
+
jSuites.loading.hide()}})}};h.getRowData=function(a,c){if(typeof this.options.data[a]===_$_496c[13])return!1;if(c){if(this.dataType){c={};for(var b=0;b<this.options.columns.length;b++){var d=_$_496c[3]+da.call(this,b),e=_$_496c[3]+ia.processed.call(this,b,a,!0);jSuites.path.call(c,d,e)}}else for(c=[],b=0;b<this.options.columns.length;b++)c.push(ia.processed.call(this,b,a,!0));return c}return JSON.parse(JSON.stringify(this.options.data[a]))};h.setRowData=function(a,c,b){for(var d=[],e=0;e<this.options.columns.length;e++)typeof c[e]===
|
|
187
|
+
_$_496c[13]&&(c[e]=_$_496c[3]),d.push({x:e,y:a,value:c[e]});d.length&&this.setValue(d,null,b)};h.getColumnData=function(a,c){if(typeof this.options.columns[a]===_$_496c[13])return!1;for(var b=[],d=0;d<this.options.data.length;d++){var e=c?ia.processed.call(this,a,d,!0):P.call(this,a,d);b.push(e)}return b};h.setColumnData=function(a,c,b){for(var d=[],e=0;e<this.rows.length;e++)typeof c[e]===_$_496c[13]&&(c[e]=_$_496c[3]),d.push({x:a,y:e,value:c[e]});d.length&&this.setValue(d,null,b)};h.copy=function(a){var c=
|
|
188
|
+
this,b=this.getHighlighted(),d=function(){c.setBorder(b[0],b[1],b[2],b[3],_$_496c[132]);c.borders.copying.clear=1==a?!0:!1},e=h[_$_496c[46]].call(this,b,!0,_$_496c[203]),f=G.call(this.parent,_$_496c[204],this,b,e);if(f)e=f;else if(!1===f)return!1;navigator.clipboard?navigator.clipboard.writeText(e).then(d):(this.parent.textarea.value=e,this.parent.textarea.select(),document.execCommand(_$_496c[205]),d());return e};h.paste=function(a,c,b){if(!R.call(this.parent,this))return!1;var d=this,e=function(){d.borders.copying&&
|
|
189
|
+
(d.resetBorders(_$_496c[132],!0),d.borders.copying.clear=!1)},f=null,g=this.options.style,k=null,l=null,n=[];if(this.borders.copying){var q=[this.borders.copying.x1,this.borders.copying.y1,this.borders.copying.x2,this.borders.copying.y2];k=q[0];l=q[1];var p=jSuites.hash(b),u=jSuites.hash(h[_$_496c[46]].call(this,q,!0,_$_496c[203]));if(p!=u)e();else{var x=0,w=0;b=h[_$_496c[46]].call(this,q,!1,!1);for(p=q[1];p<=q[3];p++)if(!this.results||-1!=this.results.indexOf(p)){n[w]=[];x=0;for(u=q[0];u<=q[2];u++)f=
|
|
190
|
+
F.getColumnNameFromCoords(u,p),n[w][x]=g&&g[f]?g[f]:_$_496c[206],x++;w++}}}a=parseInt(a);c=parseInt(c);if(b){Array.isArray(b)||(b=F.parseCSV(b,_$_496c[203]));if(p=G.call(this.parent,_$_496c[207],this,b,a,c,n))b=p;else if(!1===p)return!1;100<b.length&&!this.options.pagination&&!I.limited.call(this)&&console.log(_$_496c[208]);if(f=this.getHighlighted()){x=[];w=[];var y=[];g=[];var B=0,D=0;for(p=f[1];p<=f[3];p++)if(!this.results||-1!=this.results.indexOf(p)){x=[];w=[];for(u=f[0];u<=f[2];u++)x.push(b[D][B]),
|
|
191
|
+
n&&n[D]&&n[D][B]?w.push(n[D][B]):w.push(_$_496c[3]),B++,B>=b[0].length&&(B=0);y.push(x);g.push(w);D++;D>=b.length&&(D=0)}0==y.length%b.length&&0==y[0].length%b[0].length&&(b=y,n=g)}g=null;f=[];if(this.borders.copying&&!0===this.borders.copying.clear){for(p=q[1];p<=q[3];p++)for(u=q[0];u<=q[2];u++)(!this.results||this.results&&0<=this.results.indexOf(p))&&f.push({x:u,y:p,value:_$_496c[3],style:_$_496c[3]});e()}p=a+b[0].length-this.options.columns.length;0<p&&this.insertColumn(p);p=c+b.length-this.rows.length;
|
|
192
|
+
0<p&&this.insertRow(p);w=x=a;B=y=c;D=null;this.results&&(g=this.results.indexOf(c));for(p=0;p<b.length;p++)for(u=0;u<b[p].length;u++){null!==k&&null!==l&&b[p][u][0]==_$_496c[12]&&(b[p][u]=Y.shiftFormula(b[p][u],a-k,c-l));w=a+u;B=c+p;this.results&&(B=this.results[g+p]);var r={x:w,y:B,value:b[p][u]};n&&n[p]&&n[p][u]&&(r.style=n[p][u]);f.push(r);null===D&&ka.isSelected.call(this,w,B,q)&&(D=!0)}D&&e();f.length&&(ia[_$_496c[11]].call(this,f,null,this.parent.config.forceUpdateOnPaste?!0:!1),G.call(this.parent,
|
|
193
|
+
_$_496c[209],this,f),this.updateSelectionFromCoords(x,y,w,B))}};h.download=function(a,c){if(this.parent.config.allowExport){void 0===c&&(c=!0);var b=_$_496c[3];if(1==a||1==this.parent.config.includeHeadersOnDownload)b+=this.getHeaders().replace(/\s+/gm,_$_496c[136])+_$_496c[10];b+=h[_$_496c[46]].call(this,null,c,this.options.csvDelimiter);c=new Blob([_$_496c[211]+b],{type:_$_496c[212]});window.navigator&&window.navigator.msSaveOrOpenBlob?window.navigator.msSaveOrOpenBlob(c,this.options.csvFileName+
|
|
194
|
+
_$_496c[213]):(a=document.createElement(_$_496c[214]),c=URL.createObjectURL(c),a.href=c,a.setAttribute(_$_496c[215],this.options.csvFileName+_$_496c[213]),document.body.appendChild(a),a.click(),a.parentNode.removeChild(a))}else console.error(_$_496c[210])};h.standardize=function(a){a||(a=[]);Array.isArray(a)||(a=[a]);void 0==a[0]||Array.isArray(a[0])||typeof a[0]==_$_496c[88]||(a=[a]);for(var c=0;c<a.length;c++){var b={};Array.isArray(a[c])||void 0==a[c].data?b.data=a[c]:b=a[c];b.row=void 0==a[c].row?
|
|
195
|
+
c:a[c].row;a[c]=b}return a};return h}(),Va=function(){var h=function(a){a.getLabel=h[_$_496c[46]];a.getLabelFromCoords=h[_$_496c[46]]};h[_$_496c[46]]=function(a,c,b){if(typeof a==_$_496c[17]){a=F.getCoordsFromColumnName(a);var d=a[0];c=a[1]}else d=a;return this.getProcessed(d,c,b)};return h}(),Ia=function(){var h=function(a){a.getDefinedNames=h[_$_496c[46]];a.setDefinedNames=h[_$_496c[11]]};h[_$_496c[11]]=function(a){var c=Object.keys(a);if(c.length){for(var b=0;b<c.length;b++)this.parent.config.definedNames[c[b]]=
|
|
196
|
+
a[c[b]],a[c[b]]||delete this.parent.config.definedNames[c[b]];K.call(this,_$_496c[216],[a])}};h[_$_496c[46]]=function(a){var c=this.parent.config.definedNames;return a?c[a]:c};h.updateAll=function(a,c){var b,d={};if(b=this.parent.config.definedNames){var e=Object.keys(b);if(e.length){for(var f=this.getWorksheetName(),g=0;g<e.length;g++){var k=Y.update.call(this,b[e[g]],a,c,f);k!==b[e[g]]&&(d[e[g]]=k)}h[_$_496c[11]].call(this,d)}}};h.updateWorksheetName=function(a,c){var b,d={};if(b=this.parent.config.definedNames){var e=
|
|
197
|
+
Object.keys(b);if(e.length){for(var f=0;f<e.length;f++){var g=Y.updateWorksheetName(b[e[f]],a,c);g!==b[e[f]]&&(d[e[f]]=g)}h[_$_496c[11]].call(this,d)}}};return h}(),na=function(){var h=[_$_496c[217],_$_496c[218],_$_496c[219],_$_496c[220],_$_496c[221]],a=[_$_496c[198],_$_496c[161],_$_496c[222],_$_496c[223],_$_496c[224],_$_496c[225],_$_496c[1],_$_496c[226],_$_496c[25],_$_496c[227],_$_496c[12],_$_496c[228],_$_496c[229],_$_496c[230]],c=[],b=function(){if(0<c.length){for(var f,g=0;g<c.length;g++)f=-1===
|
|
198
|
+
c[g].indexOf(_$_496c[139])?this:H(c[g].split(_$_496c[139])[0]),aa.destroy.call(f,c[g]);c=[]}},d=function(f){b.call(this);for(var g=0,k=[],l,n,q,p=0;p<f.children.length;p++)if(l=f.children[p].getAttribute(_$_496c[231])){k[l]||(k[l]=h[g++],4<g&&(g=0));f.children[p].style.color=k[l];-1===l.indexOf(_$_496c[139])?(n=this,q=l):(n=l.split(_$_496c[139]),q=n[1],n=H(n[0]));if(0<=q.indexOf(_$_496c[140])){var u=q.split(_$_496c[140]);q=F.getCoordsFromColumnName(u[0]);u=F.getCoordsFromColumnName(u[1])}else u=q=
|
|
199
|
+
F.getCoordsFromColumnName(q);ka[_$_496c[11]].call(n,q[0],q[1],u[0],u[1],null,l,k[l]);c.push(l)}},e=function(f,g){g&&typeof g!=_$_496c[89]||(g={type:_$_496c[232],onchange:g});g.type===_$_496c[232]?(f.classList.add(_$_496c[233]),f.addEventListener(_$_496c[234],function(k){k=k.changedTouches&&k.changedTouches[0]?k.changedTouches[0].clientX:k.clientX;var l=this.getBoundingClientRect();24>l.width-(k-l.left)&&(e.current=f,f.classList.add(_$_496c[235]),f.classList.add(_$_496c[98]))})):(f.addEventListener(_$_496c[236],
|
|
200
|
+
function(k){Q(f.innerText)&&(f.classList.add(_$_496c[98]),v.current&&setTimeout(function(){f.worksheet=v.current;e.parse.call(v.current,f);var l=document.createTextNode(_$_496c[3]);f.appendChild(l);jSuites.focus(f)}))}),f.addEventListener(_$_496c[237],function(k){Q(f.innerText)?f.classList.add(_$_496c[98]):f.classList.contains(_$_496c[98])&&(f.classList.remove(_$_496c[98]),f.innerText=f.innerText,f.worksheet&&b.call(f.worksheet));k.preventDefault()}));f.classList.add(_$_496c[238]);f.classList.add(_$_496c[237]);
|
|
201
|
+
f.setAttribute(_$_496c[239],!0);f.addEventListener(_$_496c[240],function(k){f.worksheet&&(b.call(f.worksheet),typeof f.onchange==_$_496c[89]&&f.onchange.call(f),f.worksheet=null)});f.val=function(k){if(void 0===k)return f.innerText;f.innerText=k};g.onchange&&(f.onchange=g.onchange)};e.current=null;e.parse=function(f){for(var g=_$_496c[3],k=_$_496c[3],l=window.getSelection(),n=document.createRange(),q=F.getCaretIndex.call(this.parent,f),p=Y.tokenize(f.innerText.replace(/(\r\n|\n|\r)/gm,_$_496c[3])),
|
|
202
|
+
u=0;u<p.length;u++)p[u]&&Y.tokenIdentifier.test(p[u].trim())?(u==p.length-1&&(k=_$_496c[241]),g+=_$_496c[242]+k+_$_496c[243]+p[u].trim().replace(/\$/g,_$_496c[3])+_$_496c[244]+p[u]+_$_496c[245]):g+=p[u];f.innerHTML=g;g=null;for(u=0;u<f.childNodes.length&&!(g=f.childNodes[u],k=g.tagName?g.innerText.length:g.length,0>=q-k);u++)q-=k;g&&(g.tagName?n.setStart(g.firstChild,q):n.setStart(g,q),l.removeAllRanges(),l.addRange(n));d.call(this,f)};e.close=function(f){b.call(this);f?f.classList.remove(_$_496c[98]):
|
|
203
|
+
e.current&&(typeof e.current.onchange==_$_496c[89]&&e.current.onchange.call(e.current),e.current.classList.remove(_$_496c[235]),e.current.classList.remove(_$_496c[98]),e.current.worksheet=null,e.current=null)};e.getName=function(f,g,k,l,n){f=F.getColumnNameFromCoords(f,g);k=F.getColumnNameFromCoords(k,l);n.ctrlKey&&(f=k);return f!==k?(n=f+_$_496c[140]+k,n=Y.getTokensFromRange.call(this,n),Y.getRangeFromTokens.call(this,n)):f};e.range=function(f,g,k,l,n){e.current.getAttribute(_$_496c[246])==_$_496c[247]&&
|
|
204
|
+
(f=k,g=l);f=e.getName.call(this,f,g,k,l,n);g=document.createElement(_$_496c[248]);g.innerText=f;g.setAttribute(_$_496c[231],f);e.current.innerText=_$_496c[3];e.current.appendChild(g);d.call(this,e.current);jSuites.focus(g);n.preventDefault()};e.update=function(f,g,k,l,n,q,p){q.getAttribute(_$_496c[246])==_$_496c[247]&&(f=k,g=l);var u=jSuites.getNode();if(u){var x=e.getName.call(this,f,g,k,l,n);this!==p&&(x=p.getWorksheetName()+_$_496c[139]+x);f=function(w){var y=document.createElement(_$_496c[248]);
|
|
205
|
+
y.innerText=x;y.setAttribute(_$_496c[231],x);u.parentNode===q&&!1===w?u.parentNode.insertBefore(y,u.nextSibling):q.appendChild(y);u=y};if(u.getAttribute(_$_496c[231]))n.ctrlKey?(q.appendChild(document.createTextNode(_$_496c[25])),f(!0)):(u.innerText=x,u.setAttribute(_$_496c[231],x));else{if(!u.innerText||u.innerText!==_$_496c[3]&&-1==a.indexOf(u.innerText.slice(-1))||u.nextElementSibling&&u.nextElementSibling.getAttribute(_$_496c[231]))return!1;f(!1)}jSuites.focus(u);d.call(this,q);if(typeof q.onchange==
|
|
206
|
+
_$_496c[89])q.onchange();n.preventDefault();return!0}return!1};e.onkeydown=function(f){f.target.worksheet=this;if(f.ctrlKey){if(67==f.which||88==f.which)f=window.getSelection().toString().replace(/(\r\n|\n|\r)/gm,_$_496c[3]),navigator.clipboard?navigator.clipboard.writeText(f):(this.parent.textarea.value=f,this.parent.textarea.select(),document.execCommand(_$_496c[205]))}else if(36==f.which){var g=window.getSelection(),k=document.createRange();k.setStart(f.target,0);g.removeAllRanges();g.addRange(k)}else 35==
|
|
207
|
+
f.which?jSuites.focus(f.target):187==f.which?!f.target.innerText.replace(/(\r\n|\n|\r)/gm,_$_496c[3])&&f.target.getAttribute(_$_496c[100])&&f.target.removeAttribute(_$_496c[100]):13==f.which&&f.target.blur()};return e}(),Y=function(){var h=new RegExp(/^(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]+)(:\$?[A-Z]+\$?[0-9]+)?$/i),a=function(g){g=c(g);for(var k=[_$_496c[198],_$_496c[161],_$_496c[222],_$_496c[223],_$_496c[224],_$_496c[249]],l=[_$_496c[225],_$_496c[250],_$_496c[1],_$_496c[2],_$_496c[226],_$_496c[251],
|
|
208
|
+
_$_496c[25],_$_496c[227],_$_496c[12],_$_496c[228],_$_496c[229],_$_496c[230]],n=_$_496c[3],q=[],p=0,u=0;u<g.length;u++){if(g[u]==_$_496c[200]||g[u]==_$_496c[137])p=0==p?1:0;0==p&&(-1<k.indexOf(g[u])||-1<l.indexOf(g[u]))?(n&&(q.push(n),n=_$_496c[3]),q.push(g[u])):n+=g[u]}n&&q.push(n);for(u=0;u<q.length;u++)-1==q[u].indexOf(_$_496c[200])&&-1==q[u].indexOf(_$_496c[137])&&(q[u]=q[u].replace(/\s/g,_$_496c[3]));return q},c=function(g,k){for(var l=_$_496c[3],n=0,q=[_$_496c[12],_$_496c[139],_$_496c[229],_$_496c[228]],
|
|
209
|
+
p=0;p<g.length;p++)g[p]==_$_496c[200]&&(n=0==n?1:0),1==n?l+=g[p]:(l+=g[p].toUpperCase(),1==k&&0<p&&g[p]==_$_496c[12]&&-1==q.indexOf(g[p-1])&&-1==q.indexOf(g[p+1])&&(l+=_$_496c[12]));return l},b=function(g){g.setFormula=b[_$_496c[11]];g.updateFormula=b.update;g.executeFormula=b.execute;g.resetArray=b.resetArray;g.formula=[]};b.run=function(g,k){var l=_$_496c[3],n=Object.keys(k);if(n.length){for(var q={},p=0;p<n.length;p++){var u=n[p].replace(/!/g,_$_496c[27]);0<u.indexOf(_$_496c[27])&&(u=u.split(_$_496c[27]),
|
|
210
|
+
q[u[0]]=!0)}u=Object.keys(q);for(p=0;p<u.length;p++)l+=_$_496c[252]+u[p]+_$_496c[253];for(p=0;p<n.length;p++)u=n[p].replace(/!/g,_$_496c[27]),null===k[n[p]]||jSuites.isNumeric(k[n[p]])||(q=k[n[p]].match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&q.length&&(k[n[p]]=e(q,k[n[p]])),l=0<u.indexOf(_$_496c[27])?l+(u+_$_496c[254]+k[n[p]]+_$_496c[255]):l+(_$_496c[252]+u+_$_496c[254]+k[n[p]]+_$_496c[255])}g=g.replace(/\$/g,_$_496c[3]);(q=g.match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&
|
|
211
|
+
q.length&&(g=e(q,g));g=g.replace(/!/g,_$_496c[27]);g=(new Function(l+_$_496c[256]+g))();null===g&&(g=0);return g};b[_$_496c[11]]=function(){};var d=function(g){g=c(g,!0);return g.replace(/\$/g,_$_496c[3])},e=function(g,k){for(var l=0;l<g.length;l++){var n=b.getTokensFromRange.call(this,g[l]);k=k.replace(g[l],_$_496c[226]+n.join(_$_496c[25])+_$_496c[251])}return k},f=function(g,k,l){for(var n=this.config.definedNames,q=0;q<g.length;q++)g[q]&&n&&n[g[q]]&&(k=k.replace(g[q],n[g[q]]),l&&(l[g[q]]=n[g[q]]));
|
|
212
|
+
return d(k)};b.resetArray=function(g,k){var l;if(l=this.records[k][g].a){for(var n=0;n<l.length;n++)for(var q=0;q<l[n].length;q++)this.options.data[k+n][g+q]||(this.records[k+n][g+q].v=_$_496c[3],this.records[k+n][g+q].element&&(this.records[k+n][g+q].element.innerText=_$_496c[3]));this.records[k][g].a=null}};b.execute=function(g,k,l,n,q){if(1==this.parent.processing)return null!==k&&null!==l&&this.parent.queue.push([this,k,l]),_$_496c[3];if(typeof this.parent.config.onbeforeformula==_$_496c[89]){var p=
|
|
213
|
+
G.call(this.parent,_$_496c[257],this,g,k,l);if(!1===p)return g;p&&(g=p)}var u=[],x=function(C,M,J,T){if(void 0!=M&&void 0!=J){var N=F.getColumnNameFromCoords(M,J);J=T.getWorksheetName()+_$_496c[27]+N;u[J]||(u[J]=0);u[J]++;if(3<u[J])throw{error:_$_496c[258],message:_$_496c[259],reference:J};}else N=null;q||(C=d(C));var U=C,X=U.match(/[A-Z_]+[A-Z0-9_\.]*/g);X&&X.length&&(U=f.call(T.parent,X,U,w));(X=U.match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&X.length&&(U=e.call(T,X,U));
|
|
214
|
+
X=[];U=a(U);for(var O=0;O<U.length;O++)U[O]&&h.test(U[O])&&X.push(U[O]);if(X){if(-1<X.indexOf(N))throw{error:_$_496c[260],message:_$_496c[261]};for(U=0;U<X.length;U++){O=X[U].split(_$_496c[139]);O[1]?(M=O[1],O=H(O[0]),J=T.getWorksheetName()+_$_496c[27]+N):(M=O[0],O=T,J=N);if(typeof O==_$_496c[13]||typeof O.formula==_$_496c[13])throw{error:_$_496c[262],message:_$_496c[263]};J&&(O.formula[M]||(O.formula[M]=[]),0>O.formula[M].indexOf(J)&&O.formula[M].push(J));if(!w[X[U]]){J=F.getCoordsFromColumnName(M);
|
|
215
|
+
M=J[0];J=J[1];var ua=void 0!==O.records[J][M].v?O.records[J][M].v:P.call(O,M,J);w[X[U]]||((_$_496c[3]+ua).substr(0,1)==_$_496c[12]?w[X[U]]=x(ua,M,J,O):(ua===_$_496c[3]?ua=null:ua!=Number(ua)&&(ua=_$_496c[200]+ua+_$_496c[200]),w[X[U]]=ua))}}}return C.substr(1)},w={};try{g=x(g,k,l,this);if(g==_$_496c[3])return _$_496c[3];0==g.indexOf(_$_496c[264])&&(q=!0);var y=q?b.run(g,w):v.formula(g,w,k,l,this);if(!1!==n&&void 0!=k&&void 0!=l)if(y instanceof Date)this.records[l][k].v=jSuites.calendar.dateToNum(y);
|
|
216
|
+
else if(Array.isArray(y)){n=[];p=null;for(var B=0;B<y.length;B++)for(var D=0;D<y[B].length;D++){(0<D||0<B)&&this.options.data[l+B][k+D]!==_$_496c[3]&&(p=_$_496c[265]);var r=F.getColumnNameFromCoords(k+D,l+B);n.push(r)}if(!p){r=F.getColumnNameFromCoords(k,l);var z=Object.keys(this.formula);for(B=0;B<z.length;B++){var A=this.formula[z[B]].indexOf(r);if(0<=A)for(D=0;D<n.length;D++)A=this.formula[z[B]].indexOf(n[D]),-1==A&&this.formula[z[B]].push(n[D])}for(B=0;B<y.length;B++)for(D=0;D<y[B].length;D++)this.records[l+
|
|
217
|
+
B][k+D].v=y[B][D],this.records[l+B][k+D].element&&(this.records[l+B][k+D].element.innerText=y[B][D]);this.records[l][k].a=y;p=y[0][0];this.records[l][k].v=p}y=p}else this.records[l][k].v=y;return y}catch(C){return 1==this.parent.config.debugFormulas&&console.log(g,w,C),C&&C.error?C.error:_$_496c[262]}};b.update=function(g,k,l,n){var q=null,p=null,u=function(y){l&&l[y]&&(y=_$_496c[266]);k[y]&&(y=k[y]);return y};g=c(g,!0);g=a(g);for(var x=0;x<g.length;x++)if(g[x]&&h.test(g[x])){if(-1==g[x].indexOf(_$_496c[139])){if(p=
|
|
218
|
+
g[x],q=_$_496c[3],n)continue}else if(p=g[x].split(_$_496c[139]),q=p[0],p=p[1],n!=q)continue;if(0<=p.indexOf(_$_496c[140])){p=b.getTokensFromRange.call(this,p);for(var w=0;w<p.length;w++)p[w]=u(p[w]);p=b.getRangeFromTokens.call(this,p)}else-1==p.indexOf(_$_496c[267])?p=u(p):(p=u(p.replace(/\$/g,_$_496c[3])),p=_$_496c[267]+p.match(/[A-Z]+/g)+_$_496c[267]+p.match(/[0-9]+/g));q&&(p=q+_$_496c[139]+p);g[x]=p}return g.join(_$_496c[3])};b.getChain=function(g){if(void 0===g)return[];var k=[],l=[],n=[],q=function(x){if(0<=
|
|
219
|
+
x.indexOf(_$_496c[27])){var w=x.split(_$_496c[27]),y=w.pop(),B=w.join(_$_496c[27]);w=H(B)}else w=this,B=w.getWorksheetName(),y=x;if(w.formula[y]&&!n[x]){var D=!1;n[x]=!0;for(x=0;x<w.formula[y].length;x++){var r=w.formula[y][x];-1==r.indexOf(_$_496c[27])&&(r=B+_$_496c[27]+r);if(!l[r]){var z=w.getValue(r);Q(z)?k.push([r,z,b.getTokens.call(w,z,B)]):(D=!0,w.formula[y][x]=null);q.call(w,r);l[r]=!0}}1==D&&(w.formula[y]=w.formula[y].filter(function(A){return null!=A}))}},p=Object.keys(g);for(g=0;g<p.length;g++)q.call(this,
|
|
220
|
+
p[g]);p=0;for(g=k.length-1;0<=g;g--){for(var u=0;u<g;u++)if(0<=k[u][2].indexOf(k[g][0])){k.splice(u,0,k.splice(g,1)[0]);g=k.length;break}p++;if(1E6<p){console.error(_$_496c[268]);break}}l=[];for(g=0;g<k.length;g++)l[k[g][0]]=k[g][1];return l};b.updateAll=function(g,k){var l,n;Ia.updateAll.call(this,g,k);var q=Object.keys(this.formula);var p=[];var u=[];for(l=0;l<q.length;l++){var x=q[l];var w=this.formula[x];if(k&&k[x])for(var y=0;y<w.length;y++)g[w[y]]&&(w[y]=g[w[y]]),u[w[y]]=!0;else{var B=[];for(y=
|
|
221
|
+
0;y<w.length;y++)k&&k[w[y]]||(g[w[y]]&&(w[y]=g[w[y]]),u[w[y]]=!0,B.push(w[y]));B.length&&(g[x]&&(x=g[x]),p[x]=B)}}this.formula=p;B=this.getWorksheetName();for(var D=0;D<v.spreadsheet.length;D++)for(var r=v.spreadsheet[D].worksheets,z=0;z<r.length;z++)if(r[z].getWorksheetName()!==B)for(q=Object.keys(r[z].formula),l=0;l<q.length;l++){p=[];w=r[z].formula[q[l]];for(y=0;y<w.length;y++)x=w[y].split(_$_496c[27]),x[0]==B&&x[1]?k&&k[x[1]]||(g[x[1]]&&(x[1]=g[x[1]]),p.push(x[0]+_$_496c[27]+x[1])):p.push(w[y]);
|
|
222
|
+
r[z].formula[q[l]]=p}q=[];x=Object.keys(u);for(y=0;y<x.length;y++)0<=x[y].indexOf(_$_496c[27])?(w=x[y].split(_$_496c[27]),p=H(w[0]),l=w[1],B=this.getWorksheetName(),w=w[0]):(p=this,l=x[y],B=null,w=this.getWorksheetName()),(n=p.getValue(l))&&Q(n)&&(p=b.update.call(p,n,g,k,B),p!=n&&(u[x[y]]=p,l=F.getCoordsFromColumnName(l),q[w]||(q[w]=[]),q[w].push({x:l[0],y:l[1],value:p,force:!0})));x=Object.keys(q);for(g=0;g<x.length;g++)p=H(x[g]),q[x[g]]=ia.applyValues.call(p,q[x[g]]),ia.setValueChained.call(p,q[x[g]]),
|
|
223
|
+
K.call(p,_$_496c[112],{data:q[x[g]]})};b.updateWorksheetName=function(g,k,l){for(var n=a(g),q=0;q<n.length;q++)g=n[q].split(_$_496c[139]),g[1]&&(g[0]=g[0].replace(new RegExp(_$_496c[137],_$_496c[201]),_$_496c[3]),g[0].toUpperCase()==k.toUpperCase()&&(g[0]=l,0<=g[0].indexOf(_$_496c[136])&&(g[0]=_$_496c[137]+g[0]+_$_496c[137]),n[q]=g.join(_$_496c[139])));return n.join(_$_496c[3])};b.updateWorksheetNames=function(g,k){for(var l,n,q=0;q<v.spreadsheet.length;q++)for(var p=[],u=v.spreadsheet[q].worksheets,
|
|
224
|
+
x=0;x<u.length;x++){for(var w=0;w<u[x].options.data.length;w++)for(var y=0;y<u[x].options.data[w].length;y++)(l=u[x].options.data[w][y])&&Q(l)&&(n=b.updateWorksheetName(l,g,k),n!=l&&p.push({x:y,y:w,value:n,force:!0}));p.length&&(p=ia.applyValues.call(u[x],p),K.call(u[x],_$_496c[112],{data:p}))}};b.shiftFormula=function(g,k,l){var n=a(g,!0);g=function(x){if(-1==x.indexOf(_$_496c[139])){x=F.getCoordsFromColumnName(x);var w=_$_496c[3]}else w=n[q].split(_$_496c[139]),x=F.getCoordsFromColumnName(w[1]),
|
|
225
|
+
w=w[0]+_$_496c[139];var y=x[0]+k;x=x[1]+l;return x=0>y||0>x?_$_496c[266]:w+F.getColumnNameFromCoords(y,x)};for(var q=0;q<n.length;q++)if(h.test(n[q])&&-1==n[q].indexOf(_$_496c[267])){var p=-1==n[q].indexOf(_$_496c[139])?[_$_496c[3],n[q]]:n[q].split(_$_496c[139]);if(-1==p[1].indexOf(_$_496c[140]))p[1]=g(p[1]);else{var u=p[1].split(_$_496c[140]);p[1]=g(u[0])+_$_496c[140]+g(u[1])}n[q]=p[0]?p.join(_$_496c[139]):p[1]}return n.join(_$_496c[3])};b.getTokensFromRange=function(g){var k=this,l=_$_496c[3],n=
|
|
226
|
+
_$_496c[3];0<=g.indexOf(_$_496c[139])?n=_$_496c[139]:0<=g.indexOf(_$_496c[27])&&(n=_$_496c[27]);g=g.replace(/\$/g,_$_496c[3]);n&&(l=g.split(n),g=l.pop(),l=l.join(_$_496c[27]),k=H(l),l+=n);if(-1==g.indexOf(_$_496c[140]))return[g];n=[];g=g.split(_$_496c[140]);var q=F.getCoordsFromColumnName(g[0]),p=F.getCoordsFromColumnName(g[1]);if(q[0]<=p[0]){g=q[0];var u=p[0]}else g=p[0],u=q[0];if(null===q[1]&&null==p[1]){var x=0;q=0;k.options&&k.options.data&&(q=k.options.data.length-1)}else q[1]<=p[1]?(x=q[1],
|
|
227
|
+
q=p[1]):(x=p[1],q=q[1]);for(k=x;k<=q;k++)for(x=g;x<=u;x++)n.push(l+F.getColumnNameFromCoords(x,k));return n};b.getRangeFromTokens=function(g){g=g.filter(function(n){return n!=_$_496c[266]});for(var k=_$_496c[3],l=0;l<g.length;l++)0<=g[l].indexOf(_$_496c[27])&&(k=g[l].split(_$_496c[27]),g[l]=k.pop(),k=k.join(_$_496c[27]));k&&(k+=_$_496c[27]);g.sort(function(n,q){n=F.getCoordsFromColumnName(n);q=F.getCoordsFromColumnName(q);return n[1]>q[1]?1:n[1]<q[1]?-1:n[0]>q[0]?1:n[0]<q[0]?-1:0});return g.length?
|
|
228
|
+
k+(g[0]+_$_496c[140]+g[g.length-1]):_$_496c[266]};b.getTokens=function(g,k){var l=d(g);g.replace(/!/g,_$_496c[27]);(g=l.match(/[A-Z_]+[A-Z0-9_\.]*/g))&&g.length&&(l=f.call(this.parent,g,l));(g=l.match(/('.*?'?|\w*\.)?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&g.length&&(l=e.call(this,g,l));if(g=l.match(/('.*?'?|\w*\.)?(\$?[A-Z]+\$?[0-9]+)(:\$?[A-Z]+\$?[0-9]+)?/g))for(l=0;l<g.length;l++)-1==g[l].indexOf(_$_496c[27])&&k&&(g[l]=k+_$_496c[27]+g[l]);return g};b.tokenIdentifier=h;b.tokenize=a;return b}(),
|
|
229
|
+
ia=function(){var h=function(a){a.name=da;a.value=P;a.getValue=h[_$_496c[46]];a.getValueFromCoords=h.getFromCoords;a.setValue=h[_$_496c[11]];a.setValueFromCoords=h.setFromCoords;a.setCheckRadioValue=h.setCheckRadio;a.getProcessed=h.processed};h[_$_496c[46]]=function(a,c){var b=this;if(typeof a==_$_496c[88]){var d=a.x;a=a.y}else 0<=a.indexOf(_$_496c[27])&&(b=a.split(_$_496c[27]),a=b.pop(),b=H(b.join(_$_496c[27]))),a=F.getCoordsFromColumnName(a),d=a[0],a=a[1];return h.getFromCoords.call(b,d,a,c)};h.getFromCoords=
|
|
230
|
+
function(a,c,b){var d=null;null!=a&&null!=c&&(d=b?h.processed.call(this,a,c):P.call(this,a,c));return d};h[_$_496c[11]]=function(a,c,b){if(!R.call(this.parent,this))return!1;var d=null,e=null,f=null,g=[];b=b?!0:!1;var k=function(q,p){var u=null;typeof q==_$_496c[17]?(f=F.getCoordsFromColumnName(q),d=f[0],e=f[1]):q.tagName?(d=q.getAttribute(_$_496c[44]),e=q.getAttribute(_$_496c[45])):q.element&&q.element.tagName?(d=q.element.getAttribute(_$_496c[44]),e=q.element.getAttribute(_$_496c[45])):(d=q.x,e=
|
|
231
|
+
q.y,void 0!==q.value&&(p=q.value),void 0!==q.style&&(u=q.style));q={x:d,y:e,value:p,force:b};null!==u&&(q.style=u);g.push(q)};if(a&&Array.isArray(a))for(var l=0;l<a.length;l++)k(a[l],c);else if(typeof a==_$_496c[88]&&void 0==a.x&&void 0==a.tagName)for(c=Object.keys(a),l=0;l<c.length;l++)k(c[l],a[c[l]]);else k(a,c);if(g.length){g=h.applyValues.call(this,g);this.parent.config.parseFormulas&&h.setValueChained.call(this,g);ca.update.call(this,!0);this.refreshBorders();var n=this;setTimeout(function(){aa.refresh.call(n)},
|
|
232
|
+
250);if(g.length){W.call(this.parent,{worksheet:n,action:_$_496c[81],records:g,selection:this.selectedCell});a=this.getPrimaryKey();if(!1!==a)for(l=0;l<g.length;l++)g[l].x===a&&g[l].value&&V.call(this,g[l]);K.call(this,_$_496c[81],{data:g});G.call(this.parent,_$_496c[269],this,g)}}};h.setFromCoords=function(a,c,b,d){var e=[];e.push({x:a,y:c,value:b});h[_$_496c[11]].call(this,e,null,d)};h.setCheckRadio=function(){for(var a=[],c=this.getSelected(),b=0;b<c.length;b++){var d=c[b].x,e=c[b].y;if(!this.options.columns[d].readOnly&&
|
|
233
|
+
this.options.columns[d].type==_$_496c[270]){var f=P.call(this,d,e)?!1:!0;a.push({x:d,y:e,value:f})}}a.length&&h[_$_496c[11]].call(this,a)};h.applyValues=function(a){for(var c,b,d=this.options.style||{},e=[],f={},g=0;g<a.length;g++)if(c=a[g],b=this.updateCell(c.x,c.y,c.value,c.force),void 0!==b.value){if(void 0!==c.style){var k=F.getColumnNameFromCoords(c.x,c.y);b.style=f[k]=c.style;b.oldStyle=d&&d[k]?d[k]:_$_496c[206]}e.push(b)}0<Object.keys(f).length&&Qa.update.call(this,f);return e};h.processed=
|
|
234
|
+
function(a,c,b){var d=P.call(this,a,c);if(null===d)return null;var e=ha[_$_496c[46]].call(this,a,c),f=e[1];f.type!=_$_496c[54]&&f.type!=_$_496c[271]&&f.type!=_$_496c[272]&&f.type!=_$_496c[273]&&f.type!=_$_496c[274]&&0!=f.process&&(!0===b||f.type!=_$_496c[275]&&f.type!=_$_496c[276]&&f.type!=_$_496c[277])&&(f.type==_$_496c[270]?d=e[0][_$_496c[46]](f,d,b):this.records[c][a].element?d=1==this.parent.config.stripHTML?this.records[c][a].element.innerText:this.records[c][a].element.innerHTML:((_$_496c[3]+
|
|
235
|
+
d).substr(0,1)==_$_496c[12]&&(d=this.executeFormula(d,a,c,!1)),e[0]&&typeof e[0][_$_496c[46]]==_$_496c[89]&&(d=e[0][_$_496c[46]](f,d,b))));return d};h.setValueChained=function(a){for(var c,b=[],d,e=0;e<a.length;e++)c=a[e],d=F.getColumnNameFromCoords(c.x,c.y),b[d]=c.value;b=Y.getChain.call(this,b);var f=[],g=Object.keys(b);for(e=0;e<g.length;e++)0<=g[e].indexOf(_$_496c[27])?(c=g[e].split(_$_496c[27]),d=c.pop(),c=H(c.join(_$_496c[27]))):(d=g[e],c=this),d=F.getCoordsFromColumnName(d),a=S.update.call(c,
|
|
236
|
+
d[0],d[1],b[g[e]],!0),a.w=c,a.value=a.v=c.records[d[1]][d[0]].v,a.cell=g[e],a.f=b[g[e]],f.push(a);f.length&&G.call(this.parent,_$_496c[278],this,f)};return h}(),S=function(){var h=function(a){a.getCell=h[_$_496c[46]];a.getCellFromCoords=h[_$_496c[46]];a.updateCell=h.update;a.updateCells=h.updateAll;a.getSelected=h.selected;a.isAttached=h.attached};h.attached=function(a,c){return this.records[c]&&this.records[c][a]&&this.records[c][a].element&&this.records[c][a].element.parentNode&&this.records[c][a].element.parentNode.parentNode?
|
|
237
|
+
!0:!1};h[_$_496c[46]]=function(a,c,b){typeof a==_$_496c[17]&&(c=F.getCoordsFromColumnName(a),a=c[0],c=c[1]);a=parseInt(a);c=parseInt(c);if(this.records[c]&&this.records[c][a]&&this.records[c][a].element)return this.records[c][a].element;var d=P.call(this,a,c);null===d&&(d=_$_496c[3]);return S.create.call(this,a,c,d,b)};h.getFromCoords=function(a,c,b){if(!a)return null;var d=[],e=a[0],f=a[1],g=a[2];a=a[3];for(b&&(b=this.results?F.invert(this.results):null);f<=a;f++)for(var k=e;k<=g;k++)if(!b||b[f])c?
|
|
238
|
+
d.push(F.getColumnNameFromCoords(k,f)):d.push(this.records[f][k]);return d};h.selected=function(a,c){return h.getFromCoords.call(this,this.getHighlighted(),a,c)};h.getSelectedColumns=function(){var a=[],c=this.getHighlighted();if(c)for(var b=c[0];b<=c[2];b++)a.push(b);return a};h.updateAll=function(a){for(var c=this.getPrimaryKey(),b=[],d=0;d<a.length;d++)void 0!==a[d].id?(V.call(this,a[d]),b.push({id:a[d].id,y:a[d].y}),!1!==c&&h.update.call(this,c,a[d].y,a[d].id,!0)):b.push(h.update.call(this,a[d].x,
|
|
239
|
+
a[d].y,a[d].value,a[d].force));K.call(this,_$_496c[111],[b])};h.update=function(a,c,b,d){var e=this.records[c];if(e=e&&e[a]?e[a]:null){e=e.element;var f={x:a,y:c};if(d||!e||1!=e.classList.contains(_$_496c[18])){if(d=G.call(this.parent,_$_496c[279],this,e,a,c,b))b=d;else if(!1===d)return f;d=ha[_$_496c[46]].call(this,a,c);if(typeof d[0].updateCell==_$_496c[89]){var g=d[0].updateCell(e,b,a,c,this,d[1]);void 0!==g&&(b=g)}g=P.call(this,a,c);if(g!==b){var k=P.call(this,a,c,b);f.oldValue=g;f.value=k;e&&
|
|
240
|
+
h.applyOverflow.call(this,e,a,c);d[1]&&typeof d[1].render==_$_496c[89]&&d[1].render(e,b,a,c,this,d[1]);G.call(this.parent,_$_496c[280],this,e,a,c,f.value,f.oldValue)}}}else return!1;return f};h.create=function(a,c,b,d){var e=document.createElement(_$_496c[157]);e.setAttribute(_$_496c[44],a);e.setAttribute(_$_496c[45],c);var f=ha[_$_496c[46]].call(this,a,c);f[0]&&typeof f[0].createCell==_$_496c[89]&&(f=f[0].createCell(e,b,a,c,this,f[1]),void 0!==f&&(b=f));P.call(this,a,c,b);this.records[c][a]||qa.cell.call(this,
|
|
241
|
+
a,c,b);this.records[c][a].element=e;!b&&this.records[c][a].v&&(e.innerText=this.records[c][a].v);h.applyProperties.call(this,e,a,c,d);h.applyOverflow.call(this,e,a,c);G.call(this.parent,_$_496c[281],this,e,a,c,b);return e};h.getAttributes=function(a,c,b){b[a]||(b[a]={});a==_$_496c[282]?b[a][c]=this.getValue(c):a==_$_496c[283]?this.merged.cells&&(c=this.merged.cells[c])&&(b[a][c]=this.options.mergeCells[c]):this.options[a]&&this.options[a][c]&&(b[a][c]=this.options[a][c])};h.setAttributes=function(a){a&&
|
|
242
|
+
a.style&&this.setStyle(a.style);a&&a.comments&&this.setComments(a.comments);a&&a.meta&&this.setMeta(a.meta);a&&a.cells&&this.setCells(a.cells);a&&a.mergeCells&&this.setMerge(a.mergeCells);a&&a.values&&h.batch.call(this,a.values);a&&a.formulas&&h.batch.call(this,a.formulas,!0)};h.applyProperties=function(a,c,b,d){if(!d){var e=F.getColumnNameFromCoords(c,b),f=this.options.style;d=this.options.comments;var g=this.options.cells,k=this.options.rows;if(f&&f[e]){var l=(l=a.getAttribute(_$_496c[104]))?l+
|
|
243
|
+
(_$_496c[230]+f[e]):f[e];a.setAttribute(_$_496c[104],l)}this.options.columns[c]&&this.options.columns[c].wrap&&a.classList.add(_$_496c[284]);d&&d[e]&&a.setAttribute(_$_496c[285],d[e]);g&&g[e]&&(1==g[e].readOnly&&a.classList.add(_$_496c[18]),!1===g[e].locked&&!0===this.options.selectUnLockedCells&&a.classList.add(_$_496c[286]),1==g[e].wrap&&a.classList.add(_$_496c[284]));k&&k[b]&&1==k[b].readOnly&&a.classList.add(_$_496c[18])}d=this.options.columns[c];if(!a.style.textAlign||d.align)if(l=d.align?d.align:
|
|
244
|
+
this.options.defaultColAlign)a.style.textAlign=l;!1===this.records[b][c].readonly||1!=this.records[b][c].readonly&&1!=d.readOnly&&1!=d.readonly||a.classList.add(_$_496c[18])};h.applyOverflow=function(a,c,b){1==this.options.textOverflow&&0<c&&(c==this.options.columns.length-1&&(a.style.overflow=_$_496c[54]),this.records[b][c-1]&&this.records[b][c-1].element&&(this.records[b][c-1].element.style.overflow=!a.innerText&&this.headers[c-1]&&this.headers[c-1].offsetWidth?_$_496c[3]:_$_496c[54]))};h.batch=
|
|
245
|
+
function(a,c){var b=[],d=Object.keys(a);if(d.length)for(var e=0;e<d.length;e++){if(0<=d[e].indexOf(_$_496c[27])){var f=d[e].split(_$_496c[27]);var g=H(f[0]);var k=f[1];f=f[0]}else g=this,k=d[e],f=this.getWorksheetName();k=F.getCoordsFromColumnName(k);k=g.updateCell(k[0],k[1],a[d[e]],!0);b[f]||(b[f]=[]);b[f].push(k)}if(1==c&&(d=Object.keys(b),d.length))for(e=0;e<d.length;e++)g=H(d[e]),K.call(g,_$_496c[112],b[d[e]])};return h}(),Ha=function(){var h=function(a){a.getColumnOptions=h[_$_496c[46]];a.setColumnOptions=
|
|
246
|
+
h[_$_496c[11]];a.getCells=h.getCells;a.setCells=h.setCells;a.getProperties=h[_$_496c[46]];a.setProperties=h[_$_496c[11]];a.getProperty=h[_$_496c[46]];a.setProperty=h[_$_496c[11]];a.resetProperty=h[_$_496c[11]];a.updateProperty=h.update;a.getOptions=h[_$_496c[46]]};h.getCells=function(a){return a?this.options.cells[a]:this.options.cells};h.setCells=function(a,c){if(!R.call(this.parent,this))return!1;if(typeof a==_$_496c[17])this.options.cells[a]=c;else{c=Object.keys(a);for(var b=0;b<c.length;b++)this.options.cells[c[b]]=
|
|
247
|
+
a[c[b]]}};h[_$_496c[46]]=function(a,c){var b=null;void 0!==c&&(c=F.getColumnNameFromCoords(a,c),this.options.cells&&this.options.cells[c]&&(b=this.options.cells[c]));null===b&&(b=this.options.columns[a]);if(!b)b={type:_$_496c[59]};else if(!b.type||typeof b.type==_$_496c[17]&&!v.editors[b.type])b.type=_$_496c[59];return b};h[_$_496c[11]]=function(a,c,b){if(!R.call(this.parent,this))return!1;this.edition&&this.closeEditor(this.edition,!1);var d=[];Array.isArray(a)?d=a:jSuites.isNumeric(a)&&jSuites.isNumeric(c)?
|
|
248
|
+
(a={x:a,y:c},typeof b==_$_496c[88]&&(a.value=b),d.push(a)):typeof c===_$_496c[88]&&(a={x:a,value:c},d.push(a));if(Array.isArray(d))for(b=0;b<d.length;b++){var e=d[b];a=e.x;c=e.y;var f=h[_$_496c[46]].call(this,a,c),g=e.value,k=v.editors[f.type],l=null;g&&g.type&&(l=v.editors[g.type]);if(typeof c===_$_496c[13])for(e.oldValue=f,parseInt(g.width)||(g.width=this.options.defaultColWidth||100),g.type&&v.editors[g.type]||(g.type=_$_496c[59]),this.options.columns[a]=g,g.width&&this.colgroup[a]&&this.colgroup[a].setAttribute(_$_496c[162],
|
|
249
|
+
parseInt(g.width)),typeof g.title!==_$_496c[13]&&this.headers[a]&&(g.title?(this.headers[a].innerText=g.title,this.headers[a].setAttribute(_$_496c[177],g.title)):(this.headers[a].innerText=F.getColumnName(a),this.headers[a].removeAttribute(_$_496c[177]))),g.tooltip&&this.headers[a]&&(this.headers[a].title=g.tooltip),c=0;c<this.records.length;c++)this.records[c][a].element&&(k&&typeof k.destroyCell==_$_496c[89]&&k.destroyCell(this.records[c][a].element,a,c),l&&typeof l.createCell==_$_496c[89]&&(S.applyProperties.call(this,
|
|
250
|
+
this.records[c][a].element,a,c),l.createCell(this.records[c][a].element,P.call(this,a,c),a,c,this,g)));else if(f=F.getColumnNameFromCoords(a,c),e.oldValue=this.options.cells&&this.options.cells[f]?this.options.cells[f]:_$_496c[3],g?(this.options.cells||(this.options.cells={}),this.options.cells[f]=g):(delete this.options.cells[f],g=h[_$_496c[46]].call(this,a,c),l=v.editors[g.type]),e=this.records[c][a].element)k&&typeof k.destroyCell==_$_496c[89]&&k.destroyCell(e,a,c,this),l&&typeof l.createCell==
|
|
251
|
+
_$_496c[89]&&(k=P.call(this,a,c),S.applyProperties.call(this,e,a,c,this),g=l.createCell(e,k,a,c,this,g),void 0!==g&&P.call(this,a,c,g))}else return console.error(_$_496c[268]),!1;this.refreshBorders();W.call(this.parent,{worksheet:this,action:_$_496c[82],records:d});K.call(this,_$_496c[82],{data:d});G.call(this.parent,_$_496c[287],this,d);return!0};h.update=function(a){var c=JSON.parse(JSON.stringify(a));if(Array.isArray(a))for(var b=0;b<a.length;b++){var d=a[b].x,e=a[b].y,f=a[b];var g=F.getColumnNameFromCoords(d,
|
|
252
|
+
e);this.options.cells[g]||(this.options.cells[g]={});g=this.options.cells[g];f.oldValue=Object.assign({},g);for(var k=Object.keys(f.value),l=0;l<k.length;l++)g[k[l]]=f.value[k[l]];f=ha[_$_496c[46]].call(this,d,e);typeof f[0].updateProperty==_$_496c[89]&&f[0].updateProperty(d,e,this,f[1])}W.call(this.parent,{worksheet:this,action:_$_496c[83],records:a});K.call(this,_$_496c[83],{data:c});G.call(this.parent,_$_496c[287],this,a)};return h}(),ja=function(){var h=function(c,b){Array.isArray(b)||(b=[b]);
|
|
253
|
+
for(var d,e=c?_$_496c[3]:_$_496c[40],f=Object.keys(b),g=0;g<f.length;g++)if(d=this.rows[b[f[g]]])d.element&&(d.element.style.display=e),d.visible=c;I.call(this,!0);this.resetBorders()},a=function(c){c.getRow=a[_$_496c[46]];c.moveRow=a.move;c.insertRow=a.add;c.deleteRow=a.del;c.getSelectedRows=a.selected;c.showRow=h.bind(c,!0);c.hideRow=h.bind(c,!1)};a.height=function(c){var b=0,d=this.rows,e=this.options.rows||{};d[c]&&!1!==d[c].visible&&(b=e[c]&&e[c].height?parseInt(e[c].height):d[c].element&&d[c].element.offsetHeight?
|
|
254
|
+
d[c].element.offsetHeight:d[c].height?d[c].height:this.options.defaultRowHeight||24);return b};a[_$_496c[46]]=function(c){return this.rows[c]};a.attached=function(c){return this.rows[c]&&this.rows[c].element&&this.rows[c].element.parentNode?!0:!1};a.selected=function(c){var b=[],d=this.getHighlighted();if(d)for(var e=d[1];e<=d[3];e++)c?b.push(e):b.push(this.rows[e].element);return b};a.create=function(c,b){if(this.rows[c]&&this.rows[c].element)return this.rows[c].element;this.rows[c]||qa.row.call(this,
|
|
255
|
+
c);var d=document.createElement(_$_496c[155]);d.setAttribute(_$_496c[45],c);this.rows[c].element=d;var e=null;this.options.rows[c]&&!b&&(this.options.rows[c].style&&d.setAttribute(_$_496c[104],this.options.rows[c].style),this.options.rows[c].height&&(d.style.height=parseInt(this.options.rows[c].height)+_$_496c[47]),this.options.rows[c].title&&(e=this.options.rows[c].title),0==this.options.rows[c].visible&&(this.rows[c].visible=!1),this.options.rows[c].id&&(this.rows[c].id=this.options.rows[c].id));
|
|
256
|
+
0==this.rows[c].visible&&(d.style.display=_$_496c[40]);e||(e=parseInt(c+1));b=document.createElement(_$_496c[157]);b.innerHTML=e;b.setAttribute(_$_496c[45],c);b.className=_$_496c[288];d.appendChild(b);G.call(this.parent,_$_496c[289],this,c,d);return d};a.move=function(c,b){if(!R.call(this.parent,this))return!1;c=parseInt(c);b=parseInt(b);if(!this.rows[b]||!this.rows[c])return console.error(_$_496c[290]),!1;if(0<Object.keys(this.getMerge()).length){var d=null;this.merged.rows[c]?d=!0:this.merged.rows[b]&&
|
|
257
|
+
(c>b?this.merged.rows[b-1]&&(d=!0):this.merged.rows[b+1]&&(d=!0));d&&this.destroyMerged()}this.resetBorders();ja.attached.call(this,b)?(d=ja.create.call(this,c),c>b?this.tbody.insertBefore(d,this.rows[b].element):this.tbody.insertBefore(d,this.rows[b].element.nextSibling)):ja.attached.call(this,c)&&this.tbody.removeChild(this.rows[c].element);this.rows.splice(b,0,this.rows.splice(c,1)[0]);this.records.splice(b,0,this.records.splice(c,1)[0]);this.options.data.splice(b,0,this.options.data.splice(c,
|
|
258
|
+
1)[0]);K.call(this,_$_496c[70],{f:c,t:b});ca.references.call(this);ca.update.call(this);W.call(this.parent,{worksheet:this,action:_$_496c[70],oldValue:c,newValue:b});I.call(this,!0,!0);G.call(this.parent,_$_496c[291],this,c,b)};a.add=function(c,b,d,e,f){if(!R.call(this.parent,this))return!1;if(!this.options.allowInsertRow)return console.error(_$_496c[292]),!1;var g=[];if(0<c)var k=parseInt(c);else k=1,Array.isArray(c)&&!e&&(Array.isArray(c[0])?e=c:(e=[],e.push(c)));e=Fa.standardize(e);d=d?!0:!1;c=
|
|
259
|
+
this.options.data?this.options.data.length-1:0;if(void 0==b||b>c||0>b)b=c,d=!1;k||(k=1);if(!1===G.call(this.parent,_$_496c[293],this,b,k,d))return console.log(_$_496c[294]),!1;aa.reset.call(this);c=d?b:b+1;for(var l,n,q=0,p=[],u=[],x=this.rows.splice(c),w=this.options.data?this.options.data.splice(c):[],y=this.records.splice(c),B=c;B<k+c;B++){var D=e[q]&&e[q].id?e[q].id:va.next.call(this);qa.row.call(this,B,D);n=this.dataType?{}:[];for(var r=0;r<this.options.columns.length;r++)l=da.call(this,r),n[l]=
|
|
260
|
+
_$_496c[3],e&&e[q]&&e[q].data&&(typeof e[q].data[l]!==_$_496c[13]?n[l]=e[q].data[l]:typeof e[q].data[r]!==_$_496c[13]&&(n[l]=e[q].data[r])),g.push({x:r,y:B,value:n[l],force:!0});u.push({id:D,data:n});q++}this.rows=this.rows.concat(x);this.records=this.records.concat(y);Array.prototype.push.apply(this.options.data,w);for(B=c;B<k+c;B++)this.results&&(this.rows[B].results=!0),p.push(this.records[B]);this.merged.rows[c]&&pa.updateConfig.call(this,1,1,c-1,k);K.call(this,_$_496c[66],{numOfRows:k,rowNumber:b,
|
|
261
|
+
insertBefore:d?1:0,data:u});this.results&&(this.results=xa.refresh.call(this));ca.references.call(this);g.length&&ia.applyValues.call(this,g);ca.update.call(this);W.call(this.parent,{worksheet:this,action:_$_496c[66],rowNumber:b,numOfRows:k,insertBefore:d,data:u});f||ka[_$_496c[11]].call(this,0,c,this.options.columns.length-1,k+c-1);I.call(this,!0,!0);G.call(this.parent,_$_496c[295],this,b,k,p,d)};a.del=function(c,b){if(!R.call(this.parent,this))return!1;if(!this.options.allowDeleteRow)return console.error(_$_496c[296]),
|
|
262
|
+
!1;var d={},e=[];void 0==c&&(b=this.getSelectedRows(),b[0]?(c=parseInt(b[0].getAttribute(_$_496c[45])),b=b.length):(c=this.options.data.length-1,b=1));var f=this.options.data.length-1;if(void 0==c||c>f||0>c)c=f;b||(b=1);c+b>=this.options.data.length&&(b=this.options.data.length-c,b>=this.options.data.length&&(b=this.options.data.length,this.resetSelection()));if(!1===G.call(this.parent,_$_496c[297],this,c,b))return console.log(_$_496c[298]),!1;if(-1<parseInt(c)&&0<parseInt(b)){aa.reset.call(this);
|
|
263
|
+
for(var g=c;g<c+b;g++)for(var k=0;k<this.options.columns.length;k++)f=F.getColumnNameFromCoords(k,g),S.getAttributes.call(this,_$_496c[299],f,d),S.getAttributes.call(this,_$_496c[104],f,d),S.getAttributes.call(this,_$_496c[300],f,d),S.getAttributes.call(this,_$_496c[301],f,d),S.getAttributes.call(this,_$_496c[283],f,d),S.getAttributes.call(this,_$_496c[282],f,d),e[f]=!0;if(f=Y.getChain.call(this,d.values))d.formulas=f;for(g=c;g<c+b;g++)ja.attached.call(this,g)&&this.rows[g].element.remove(),this.options.rows&&
|
|
264
|
+
this.options.rows[g]&&(this.options.rows[g]=null);f=[];for(g=c;g<c+b;g++)f.push({id:this.getRowId(g),row:g,data:this.getRowData(g)});this.rows.splice(c,b);g=this.records.splice(c,b);this.options.data.splice(c,b);pa.updateConfig.call(this,1,0,c,b);this.results&&(this.results=xa.refresh.call(this));K.call(this,_$_496c[67],{rowNumber:c,numOfRows:b,data:f});ca.references.call(this,e);ca.update.call(this,!0);W.call(this.parent,{worksheet:this,action:_$_496c[67],rowNumber:c,numOfRows:b,insertBefore:1,data:f,
|
|
265
|
+
attributes:d});I.call(this,!0,!0);G.call(this.parent,_$_496c[302],this,c,b,g,f,d)}};return a}(),oa=function(){var h=function(c,b){Array.isArray(b)||(b=[b]);for(var d,e,f=Object.keys(b),g=0;g<f.length;g++)if(d=b[f[g]],e=this.options.columns[d])this.colgroup[d]&&(this.colgroup[d].style.width=c?parseInt(e.width||this.options.defaultColWidth)+_$_496c[47]:_$_496c[149]),e.visible=c;I.call(this,!0);this.resetBorders()},a=function(c){c.getColumn=a[_$_496c[46]];c.getColumnIdByName=a.getByName;c.getPrimaryKey=
|
|
266
|
+
a.getPrimaryKey;c.getSelectedColumns=a.selected;c.moveColumn=a.move;c.insertColumn=a.add;c.deleteColumn=a.del;c.showColumn=h.bind(c,!0);c.hideColumn=h.bind(c,!1)};a[_$_496c[46]]=function(c){return this.options.columns[c]||!1};a.attached=function(c){return this.headers[c]&&this.headers[c].parentNode?!0:!1};a.getByName=function(c){for(var b=this.options.columns,d=0;d<b.length;d++)if(b[d].name==c)return d;return!1};a.getPrimaryKey=function(){for(var c=0;c<this.options.columns.length;c++)if(1==this.options.columns[c].primaryKey)return c;
|
|
267
|
+
return!1};a.selected=function(){var c=[],b=this.getHighlighted();if(b)for(var d=b[0];d<=b[2];d++)c.push(d);return c};a.move=function(c,b){if(!R.call(this.parent,this))return!1;c=parseInt(c);b=parseInt(b);if(!this.options.columns[c])return console.error(_$_496c[303]),!1;if(!this.options.columns[b])return console.error(_$_496c[304]),!1;if(0<Object.keys(this.getMerge()).length){var d=null;this.merged.cols[c]?d=!0:this.merged.cols[b]&&(c>b?this.merged.cols[b-1]&&(d=!0):this.merged.cols[b+1]&&(d=!0));
|
|
268
|
+
d&&this.destroyMerged()}aa.reset.call(this);this.options.freezeColumns&&ma.applyReset.call(this);if(oa.attached.call(this,b)){Ca.create.call(this,c);var e=(c>b?this.headers[b]:this.headers[b].nextSibling)||null;this.headerContainer.insertBefore(this.headers[c],e);e=(c>b?this.colgroup[b]:this.colgroup[b].nextSibling)||null;this.colgroupContainer.insertBefore(this.colgroup[c],e);for(var f=0;f<this.tbody.children.length;f++)d=this.tbody.children[f].getAttribute(_$_496c[45]),e=(c>b?this.records[d][b].element:
|
|
269
|
+
this.records[d][b].element.nextSibling)||null,this.tbody.children[f].insertBefore(S[_$_496c[46]].call(this,c,d),e);if(this.options.footers)for(f=0;f<this.tfoot.children.length;f++)e=(c>b?this.footers.content[f][b].element:this.footers.content[f][b].element.nextSibling)||null,this.tfoot.children[f].insertBefore(Z.create.call(this,c,f),e)}else if(oa.attached.call(this,c)){this.headerContainer.removeChild(this.headers[c]);this.colgroupContainer.removeChild(this.colgroup[c]);for(f=0;f<this.tbody.children.length;f++)d=
|
|
270
|
+
parseInt(this.tbody.children[f].getAttribute(_$_496c[45])),this.tbody.children[f].removeChild(this.records[d][c].element);if(this.options.footers)for(f=0;f<this.tfoot.children.length;f++)this.tfoot.children[f].removeChild(this.footers.content[f][c].element)}this.options.columns.splice(b,0,this.options.columns.splice(c,1)[0]);this.headers.splice(b,0,this.headers.splice(c,1)[0]);this.colgroup.splice(b,0,this.colgroup.splice(c,1)[0]);for(f=0;f<this.rows.length;f++)this.dataType||this.options.data[f].splice(b,
|
|
271
|
+
0,this.options.data[f].splice(c,1)[0]),this.records[f].splice(b,0,this.records[f].splice(c,1)[0]);if(this.options.footers)for(f=0;f<this.options.footers.length;f++)this.options.footers[f].splice(b,0,this.options.footers[f].splice(c,1)[0]),this.footers.content[f].splice(b,0,this.footers.content[f].splice(c,1)[0]);K.call(this,_$_496c[71],{f:c,t:b});ca.references.call(this);ca.update.call(this);W.call(this.parent,{worksheet:this,action:_$_496c[71],oldValue:c,newValue:b});I.call(this,!0,!0);G.call(this.parent,
|
|
272
|
+
_$_496c[305],this,c,b)};a.add=function(c,b,d,e,f,g,k){if(!R.call(this.parent,this))return!1;if(!this.options.allowInsertColumn)return console.error(_$_496c[306]),!1;var l=[];if(0<c)var n=parseInt(c);else if(n=1,Array.isArray(c)&&!f)if(Array.isArray(c[0]))f=c;else{f=[];for(var q=0;q<c.length;q++)f[q]=[c[q]]}f||(f=[]);d=d?!0:!1;c=this.options.columns.length-1;if(void 0==b||b>c||0>b)b=c,d=!1;n||(n=1);if(!1===G.call(this.parent,_$_496c[307],this,b,n,d))return console.log(_$_496c[308]),!1;aa.reset.call(this);
|
|
273
|
+
this.options.freezeColumns&&ma.applyReset.call(this);if(1==this.dataType)var p=parseInt((_$_496c[3]+Date.now()).substr(-8));e||(e=[]);for(q=0;q<n;q++)e[q]||(e[q]={type:_$_496c[59],source:[],options:[],width:this.options.defaultColWidth}),1==this.dataType&&typeof e[q].name==_$_496c[13]&&(e[q].name=_$_496c[309]+(p+q));p=d?b:b+1;this.options.columns=F.injectArray(this.options.columns,p,e);q=this.headers.splice(p);var u=this.colgroup.splice(p);for(c=p;c<n+p;c++)Ca.create.call(this,c);this.headers=this.headers.concat(q);
|
|
274
|
+
this.colgroup=this.colgroup.concat(u);Z.adjust.call(this,p,n,1);wa.adjust.call(this,b,n,1,g);u=null;for(var x,w=0;w<this.options.data.length;w++){this.dataType||(u=this.options.data[w].splice(p));x=this.records[w].splice(p);g=0;for(c=p;c<n+p;c++)q=f[w]&&f[w][g]?f[w][g]:_$_496c[3],P.call(this,c,w,q),l.push({x:c,y:w,value:q}),qa.cell.call(this,c,w),g++;this.dataType||(this.options.data[w]=this.options.data[w].concat(u));this.records[w]=this.records[w].concat(x)}this.merged.cols[p]&&pa.updateConfig.call(this,
|
|
275
|
+
0,1,p-1,n);K.call(this,_$_496c[68],{numOfColumns:n,columnNumber:b,insertBefore:d?1:0,properties:e,data:f});ca.references.call(this);l.length&&ia.applyValues.call(this,l);ca.update.call(this);W.call(this.parent,{worksheet:this,action:_$_496c[68],columnNumber:b,numOfColumns:n,insertBefore:d,properties:e,data:f});k||ka[_$_496c[11]].call(this,p,0,n+p-1,this.rows.length-1);I.call(this,!0,!0);G.call(this.parent,_$_496c[310],this,b,n,[],d)};a.del=function(c,b){if(!R.call(this.parent,this))return!1;if(!this.options.allowDeleteColumn)return console.error(_$_496c[311]),
|
|
276
|
+
!1;var d={},e=[];if(1<this.options.columns.length){void 0==c&&(b=this.getSelectedColumns(!0),b.length?(c=parseInt(b[0]),b=parseInt(b.length)):(c=this.options.columns.length-1,b=1));var f=this.options.columns.length-1;if(void 0==c||c>f||0>c)c=f;b||(b=1);c+b>=this.options.columns.length&&(b=this.options.columns.length-c,b>=this.options.columns.length&&(b--,console.error(_$_496c[312])));if(!1===G.call(this.parent,_$_496c[313],this,c,b))return console.log(_$_496c[314]),!1;if(-1<parseInt(c)&&0<parseInt(b)){aa.reset.call(this);
|
|
277
|
+
f=null;var g=[],k=[],l=[];var n=0;for(var q=c;q<c+b;q++)oa.attached.call(this,q)&&(this.colgroup[q].parentNode.removeChild(this.colgroup[q]),this.headers[q].parentNode.removeChild(this.headers[q])),l[n]=this.options.columns[q],n++;for(var p=0;p<this.options.data.length;p++)for(q=c;q<c+b;q++)n=F.getColumnNameFromCoords(q,p),S.getAttributes.call(this,_$_496c[299],n,d),S.getAttributes.call(this,_$_496c[104],n,d),S.getAttributes.call(this,_$_496c[300],n,d),S.getAttributes.call(this,_$_496c[301],n,d),
|
|
278
|
+
S.getAttributes.call(this,_$_496c[283],n,d),S.getAttributes.call(this,_$_496c[282],n,d),e[n]=!0,this.records[p][q].element&&0<=Array.prototype.indexOf.call(this.rows[p].element.children,this.records[p][q].element)&&this.records[p][q].element.parentNode.removeChild(this.records[p][q].element);if(q=Y.getChain.call(this,d.values))d.formulas=q;this.options.columns.splice(c,b);this.headers.splice(c,b);this.colgroup.splice(c,b);for(p=0;p<this.options.data.length;p++)this.dataType||(k[p]=this.options.data[p].splice(c,
|
|
279
|
+
b)),g[p]=this.records[p].splice(c,b);Z.adjust.call(this,c,b,0);(q=wa.adjust.call(this,c,b,0))&&(f={nested:q});pa.updateConfig.call(this,0,0,c,b);K.call(this,_$_496c[69],{columnNumber:c,numOfColumns:b});ca.references.call(this,e);ca.update.call(this,!0);W.call(this.parent,{worksheet:this,action:_$_496c[69],columnNumber:c,numOfColumns:b,insertBefore:1,data:k,properties:l,attributes:d,extra:f});I.call(this,!0,!0);G.call(this.parent,_$_496c[315],this,c,b,g,l,d)}}};a.isVisible=function(c){var b=this.options.columns;
|
|
280
|
+
return!1===b[c].visible||b[c].type===_$_496c[54]?!1:!0};return a}(),Qa=function(){var h={},a={},c=function(d){if(typeof d==_$_496c[17]){var e=d;d=F.getCoordsFromColumnName(d);var f=d[0];d=d[1]}else f=d.x,d=d.y,e=F.getColumnNameFromCoords(f,d);if(this.records[d]&&this.records[d][f]&&this.records[d][f].element){a[e]=this.options.style[e];this.records[d][f].element.setAttribute(_$_496c[104],_$_496c[3]);if(this.options.cells&&this.options.cells[e]&&this.options.cells[e].align)var g=this.options.cells[e].align;
|
|
281
|
+
else this.options.columns[f].align?g=this.options.columns[f].align:this.options.defaultColAlign&&(g=this.options.defaultColAlign);g&&(this.records[d][f].element.style.textAlign=g)}this.options.style&&this.options.style[e]&&delete this.options.style[e]},b=function(d){d.getStyle=b[_$_496c[46]];d.setStyle=b[_$_496c[11]];d.resetStyle=b.reset};b[_$_496c[46]]=function(d){var e=this.options.style;if(!e)return!1;if(d){if(typeof d==_$_496c[17])return e[d];var f=[],g=Object.keys(d);if(0<g.length)for(var k=
|
|
282
|
+
0;k<g.length;k++){if(typeof d[k]==_$_496c[17])var l=e&&e[d[k]]?e[d[k]]:_$_496c[3];else l=F.getColumnNameFromCoords(d[k].x,d[k].y),l=e&&e[l]?e[l]:_$_496c[3];f.push(l)}return f}return this.options.style};b[_$_496c[11]]=function(d,e,f,g){if(!R.call(this.parent,this))return!1;this.options.style||(this.options.style={});var k=this.options.style,l=null,n=[],q=[],p={};q=function(w,y,B){if(!p[w]&&(k[w]?n=k[w].split(_$_496c[230]):(k[w]=_$_496c[3],n=[]),p[w]={},n.length))for(var D=0;D<n.length;D++)n[D]&&n[D].trim()&&
|
|
283
|
+
(l=n[D].split(_$_496c[140]),p[w][l[0].trim()]=l[1].trim());a[w]||(a[w]=[]);h[w]||(h[w]=[]);p[w][y]||(p[w][y]=_$_496c[3]);a[w].push([y+_$_496c[140]+p[w][y]]);p[w][y]=p[w][y]&&p[w][y]==B&&!g?_$_496c[3]:B;h[w].push([y+_$_496c[140]+p[w][y]]);B=F.getCoordsFromColumnName(w);this.records[B[1]]&&this.records[B[1]][B[0]]&&this.records[B[1]][B[0]].element&&(this.records[B[1]][B[0]].element.style[y]=p[w][y]);p[w][y]||delete p[w][y]};h={};a={};if(e)if(typeof d==_$_496c[17])q.call(this,d,e,f);else{if(d&&d.length)for(var u=
|
|
284
|
+
0;u<d.length;u++){var x=F.getColumnNameFromCoords(d[u].x,d[u].y);q.call(this,x,e,f)}}else for(f=Object.keys(d),u=0;u<f.length;u++)if(x=d[f[u]])for(typeof x==_$_496c[17]&&(x=x.split(_$_496c[230])),e=0;e<x.length;e++)x[e]&&(typeof x[e]==_$_496c[17]&&(x[e]=x[e].split(_$_496c[140])),x[e][0].trim()&&q.call(this,f[u],x[e][0].trim(),x[e][1].trim()));n={};q=Object.keys(p);if(q.length){for(u=0;u<q.length;u++){n[q[u]]||(n[q[u]]=[]);d=Object.keys(p[q[u]]);for(e=0;e<d.length;e++)n[q[u]].push(d[e]+_$_496c[119]+
|
|
285
|
+
p[q[u]][d[e]]);this.options.style[q[u]]=n[q[u]].join(_$_496c[316])}q=Object.keys(h);for(u=0;u<q.length;u++)h[q[u]]=h[q[u]].join(_$_496c[230]);q=Object.keys(a);for(u=0;u<q.length;u++)a[q[u]]=a[q[u]].join(_$_496c[230]);this.refreshBorders();W.call(this.parent,{worksheet:this,action:_$_496c[74],oldValue:a,newValue:h});K.call(this,_$_496c[74],[h]);G.call(this.parent,_$_496c[317],this,h,a)}};b.reset=function(d){if(!R.call(this.parent,this))return!1;if(d){a={};if(Array.isArray(d))for(var e=0;e<d.length;e++)c.call(this,
|
|
286
|
+
d[e]);else c.call(this,d);this.refreshBorders();W.call(this.parent,{worksheet:this,action:_$_496c[75],cells:d,oldValue:a});K.call(this,_$_496c[75],[d]);G.call(this.parent,_$_496c[319],this,d)}else console.error(_$_496c[318])};b.update=function(d){h={};a={};for(var e,f=Object.keys(d),g=0;g<f.length;g++){a[f[g]]=this.options.style[f[g]]||_$_496c[3];h[f[g]]=this.options.style[f[g]]=d[f[g]];e=F.getCoordsFromColumnName(f[g]);var k=e[0],l=e[1];this.records[l]&&this.records[l][k]&&this.records[l][k].element&&
|
|
287
|
+
(this.records[l][k].element.setAttribute(_$_496c[104],d[f[g]]),!this.records[l][k].element.style.textAlign&&(e=this.options.columns[k].align?this.options.columns[k].align:this.options.defaultColAlign))&&(this.records[l][k].element.style.textAlign=e)}K.call(this,_$_496c[75],[f]);K.call(this,_$_496c[74],[h]);G.call(this.parent,_$_496c[317],this,h,a)};return b}(),Wa=function(){var h=function(a){a.getComments=h[_$_496c[46]];a.setComments=h[_$_496c[11]]};h[_$_496c[46]]=function(a){return a&&typeof a==
|
|
288
|
+
_$_496c[17]?this.options.comments&&this.options.comments[a]?this.options.comments[a]:!1:this.options.comments};h[_$_496c[11]]=function(a,c){if(!R.call(this.parent,this))return!1;if(typeof a==_$_496c[17]){var b={};b[a]=c}else b=a;if(c=G.call(this.parent,_$_496c[320],this,b))b=c;else if(!1===c)return!1;this.options.comments||(this.options.comments={});a={};var d=Object.keys(b);if(d.length){for(var e=0;e<d.length;e++){var f=F.getCoordsFromColumnName(d[e]);this.records[f[1]]&&this.records[f[1]][f[0]]&&
|
|
289
|
+
(a[d[e]]=this.options.comments[d[e]]||_$_496c[3],(c=b[d[e]])?this.options.comments[d[e]]=c:delete this.options.comments[d[e]],this.records[f[1]][f[0]].element&&(c?this.records[f[1]][f[0]].element.setAttribute(_$_496c[285],c):this.records[f[1]][f[0]].element.removeAttribute(_$_496c[285])))}W.call(this.parent,{worksheet:this,action:_$_496c[79],newValue:b,oldValue:a});K.call(this,_$_496c[79],[b]);G.call(this.parent,_$_496c[321],this,b,a)}};return h}(),Xa=function(){var h=function(a){a.getMeta=h[_$_496c[46]];
|
|
290
|
+
a.setMeta=h[_$_496c[11]];a.resetMeta=h.reset};h[_$_496c[46]]=function(a,c){if(a){if(this.options.meta[a])return c?this.options.meta[a][c]:this.options.meta[a]}else return this.options.meta};h[_$_496c[11]]=function(a,c,b){if(!R.call(this.parent,this))return!1;this.options.meta||(this.options.meta={});if(typeof a==_$_496c[17]&&c){b||(b=_$_496c[3]);var d={};d[a]={};d[a][c]=b;a=d}c=Object.keys(a);if(c.length){b={};for(d=0;d<c.length;d++){this.options.meta[c[d]]||(this.options.meta[c[d]]={});b[c[d]]||
|
|
291
|
+
(b[c[d]]={});for(var e=Object.keys(a[c[d]]),f=0;f<e.length;f++)this.options.meta[c[d]][e[f]]=a[c[d]][e[f]],b[c[d]][e[f]]=a[c[d]][e[f]]}Object.keys(b).length&&(K.call(this,_$_496c[322],[b]),G.call(this.parent,_$_496c[323],this,b))}};h.reset=function(){this.options.meta={};K.call(this,_$_496c[324],{});G.call(this.parent,_$_496c[325],this,{})};return h}(),Ya=function(){var h=function(a){a.orderBy=h.execute};h.handler=function(a,c){return function(b,d){b=b[1];d=d[1];return a?b===_$_496c[3]&&d!==_$_496c[3]?
|
|
292
|
+
1:b!==_$_496c[3]&&d===_$_496c[3]?-1:b>d?-1:b<d?1:0:b===_$_496c[3]&&d!==_$_496c[3]?1:b!==_$_496c[3]&&d===_$_496c[3]?-1:b>d?1:b<d?-1:0}};h.execute=function(a,c,b,d){if(0<=a){c=null==c?this.headers[a].classList.contains(_$_496c[326])?1:0:c?1:0;for(var e,f,g=[],k=0;k<this.options.data.length;k++)e=Ha[_$_496c[46]].call(this,a,k),f=this.records[k][a].v,f=e.type==_$_496c[271]||e.type==_$_496c[276]||e.type==_$_496c[277]||e.type==_$_496c[327]||e.type==_$_496c[14]||e.type==_$_496c[328]?Number(f):jSuites.isNumeric(f)?
|
|
293
|
+
Number(f):f.toLowerCase(),g[k]=[k,f];k=typeof this.parent.config.sorting===_$_496c[89]?this.parent.config.sorting(c,a):h.handler(c,a);g.sort(k);e=b?!0:!1;if(!b)for(b=[],k=0;k<g.length;k++)b[k]=g[k][0];if(k=G.call(this.parent,_$_496c[329],this,a,c,b))b=k;else if(!1===k)return!1;if(e)this.destroyMerged();else if(0<Object.keys(this.getMerge()).length)if(confirm(E(_$_496c[330])))this.destroyMerged();else return!1;if(b.length<g.length)for(k=0;k<g.length;k++)-1==b.indexOf(g[k][0])&&b.push(g[k][0]);g=[];
|
|
294
|
+
for(k=0;k<b.length;k++)g[b[k]]=k;Ea.call(this,!1);aa.reset.call(this);K.call(this,_$_496c[80],{column:a,direction:c,order:b});W.call(this.parent,{worksheet:this,action:_$_496c[80],column:a,newValue:b,oldValue:g,direction:c,previousState:h.getState.call(this)});h.update.call(this,b);h.arrow.call(this,a,c,d);aa.refresh.call(this);G.call(this.parent,_$_496c[331],this,a,c,b);return!0}};h.update=function(a){for(var c=[],b=0;b<a.length;b++)c[b]=this.options.data[a[b]];for(b=0;b<a.length;b++)this.options.data[b]=
|
|
295
|
+
c[b];c=[];for(b=0;b<a.length;b++)c[b]=this.records[a[b]];this.records=c;c=[];for(b=0;b<a.length;b++)c[b]=this.rows[a[b]];this.rows=c;ca.references.call(this);this.tbody.innerHTML=_$_496c[3];I.call(this,!0,!0);this.searchInput&&this.searchInput.value?sa.update.call(this,null):ea.update.call(this)};h.arrow=function(a,c,b){for(var d=0;d<this.headers.length;d++)this.headers[d].classList.remove(_$_496c[332]),this.headers[d].classList.remove(_$_496c[326]);void 0===b?this.headers[a].classList.add(c?_$_496c[332]:
|
|
296
|
+
_$_496c[326]):Array.isArray(b)&&this.headers[b[0]].classList.add(b[1]?_$_496c[332]:_$_496c[326])};h.getState=function(){for(var a=0;a<this.headers.length;a++){if(this.headers[a].classList.contains(_$_496c[332]))return[a,1];if(this.headers[a].classList.contains(_$_496c[326]))return[a,0]}return null};return h}(),Aa=function(){var h=function(a){a.whichPage=h.whichPage;a.quantityOfPages=h.quantityOfPages;a.page=h[_$_496c[11]];a.updatePagination=h.update};h.build=function(){this.pageNumber=0;var a=document.createElement(_$_496c[20]),
|
|
297
|
+
c=document.createElement(_$_496c[20]);this.pagination=document.createElement(_$_496c[20]);this.pagination.classList.add(_$_496c[333]);this.pagination.appendChild(a);this.pagination.appendChild(c);this.options.pagination||(this.pagination.style.display=_$_496c[40]);this.element.appendChild(this.pagination)};h.pageUp=function(){0<this.pageNumber&&(this.pageNumber--,h[_$_496c[11]].call(this,this.pageNumber))};h.pageDown=function(){this.pageNumber<h.quantityOfPages.call(this)-1&&(this.pageNumber++,h[_$_496c[11]].call(this,
|
|
298
|
+
this.pageNumber))};h.whichPage=function(a){if(0<this.options.pagination)return this.rows[a]?(this.results&&(a=this.results.indexOf(parseInt(a))),Math.ceil((parseInt(a)+1)/parseInt(this.options.pagination))-1):null;console.log(_$_496c[334]);return!1};h.quantityOfPages=function(){if(0<this.options.pagination)return Math.ceil((this.results?this.results.length:this.rows.length)/parseInt(this.options.pagination));console.log(_$_496c[334]);return!1};h[_$_496c[11]]=function(a,c){var b=this.pageNumber,d=
|
|
299
|
+
parseInt(this.options.pagination);if(d){if(null==a||-1==a)a=Math.ceil((this.results?this.results:this.rows).length/d)-1;if(!1===G.call(this.parent,_$_496c[336],this,a,b,d))return!1;this.pageNumber=a;I.update.call(this);Z.refresh.call(this);typeof c==_$_496c[89]&&c.call(this);G.call(this.parent,_$_496c[337],this,a,b,d)}else console.error(_$_496c[335])};h.update=function(){this.pagination.children[0].innerHTML=_$_496c[3];this.pagination.children[1].innerHTML=_$_496c[3];if(this.options.pagination){var a=
|
|
300
|
+
this.results?this.results.length:this.rows.length;if(a){a=Math.ceil(a/this.options.pagination);if(6>this.pageNumber)var c=1,b=10>a?a:10;else 5>a-this.pageNumber?(c=a-9,b=a,1>c&&(c=1)):(c=this.pageNumber-4,b=this.pageNumber+5);if(1<c){var d=document.createElement(_$_496c[20]);d.className=_$_496c[339];d.innerHTML=_$_496c[228];d.title=1;this.pagination.children[1].appendChild(d)}for(;c<=b;c++)d=document.createElement(_$_496c[20]),d.className=_$_496c[339],d.innerHTML=c,this.pagination.children[1].appendChild(d),
|
|
301
|
+
this.pageNumber==c-1&&d.classList.add(_$_496c[340]);b<a&&(d=document.createElement(_$_496c[20]),d.className=_$_496c[339],d.innerHTML=_$_496c[229],d.title=a,this.pagination.children[1].appendChild(d));this.pagination.children[0].innerHTML=E(_$_496c[341],[this.pageNumber+1,a])}else this.pagination.children[0].innerHTML=E(_$_496c[338]);this.options.tableOverflow&&(this.content.style.height=this.table.offsetHeight+16+_$_496c[47],this.table.style.top=0)}};return h}(),ma=function(){var h=function(a){a.setFreezeColumns=
|
|
302
|
+
h[_$_496c[11]];a.resetFreezeColumns=h.reset};h.width=function(){if(this.options.freezeColumns){h.headers.call(this);for(var a=0;a<this.rows.length;a++)this.rows[a].element&&h.update.call(this,a)}};h.update=function(a){var c,b;if(b=this.options.freezeColumns){var d=ya.call(this)?50:0;if(this.rows[a].element)for(var e=0;e<b;e++){if(c=this.records[a][e].element)c.classList.add(_$_496c[48]),c.style.left=d+_$_496c[47];!1!==this.options.columns[e].visible&&(d+=this.options.columns[e].width)}}};h.headers=
|
|
303
|
+
function(){var a=ya.call(this)?50:0,c;if(c=this.options.freezeColumns)for(var b=0;b<c;b++){if(this.headers[b]){this.headers[b].classList.add(_$_496c[48]);this.headers[b].style.left=a+_$_496c[47];if(this.options.footers)for(var d=0;d<this.options.footers.length;d++)this.footers.content[d][b].element.classList.add(_$_496c[48]),this.footers.content[d][b].element.style.left=a+_$_496c[47];!1!==this.options.columns[b].visible&&(a+=this.options.columns[b].width)}}else h.reset.call(this)};h.refresh=function(){if(0<
|
|
304
|
+
this.options.freezeColumns){h.headers.call(this);for(var a=0;a<this.visibleRows.length;a++)h.update.call(this,this.visibleRows[a])}};h[_$_496c[11]]=function(a){h.reset.call(this);this.options.freezeColumns=a;h.width.call(this);I.limited.call(this)&&I.call(this)};h.reset=function(){h.applyReset.call(this);aa.refresh.call(this);this.options.freezeColumns=0};h.applyReset=function(){for(var a,c=1;c<=this.options.freezeColumns;c++){if(a=this.thead.lastChild)a.children[c].classList.remove(_$_496c[48]),
|
|
305
|
+
a.children[c].style.left=_$_496c[3];for(var b=0;b<this.rows.length;b++)if(a=this.rows[b].element)a.children[c].classList.remove(_$_496c[48]),a.children[c].style.left=_$_496c[3];if(this.options.footers)for(b=0;b<this.options.footers.length;b++)this.tfoot.children[b].children[c].classList.remove(_$_496c[48]),this.tfoot.children[b].children[c].style.left=_$_496c[3]}};h.getWidth=function(a){a=a?0:ya.call(this)?50:0;if(0<this.options.freezeColumns)for(var c=0;c<this.options.freezeColumns;c++)a+=this.options.columns[c].width;
|
|
306
|
+
return a};return h}(),ca=function(){var h=function(b,d){if(this.options[b]){for(var e={},f=Object.keys(this.options[b]),g=0;g<f.length;g++)e[d&&void 0!=d[f[g]]?d[f[g]]:f[g]]=this.options[b][f[g]];this.options[b]=e}},a=function(){if(0<this.options.minSpareRows){for(var b=0,d=this.rows.length-1;0<=d;d--){for(var e=!1,f=0;f<this.options.columns.length;f++)P.call(this,f,d)&&(e=!0);if(e)break;else b++}0<this.options.minSpareRows-b&&this.insertRow(this.options.minSpareRows-b)}if(0<this.options.minSpareCols){b=
|
|
307
|
+
0;for(f=this.options.columns.length-1;0<=f;f--){e=!1;for(d=0;d<this.rows.length;d++)P.call(this,f,d)&&(e=!0);if(e)break;else b++}0<this.options.minSpareCols-b&&this.insertColumn(this.options.minSpareCols-b)}},c=function(){};c.build=function(){var b=this;this.content=document.createElement(_$_496c[20]);this.content.classList.add(_$_496c[342]);this.content.addEventListener(_$_496c[343],function(e){if(!b.edition)return e.preventDefault(),!1});this.table=document.createElement(_$_496c[344]);this.thead=
|
|
308
|
+
document.createElement(_$_496c[345]);this.tbody=document.createElement(_$_496c[346]);this.tfoot=document.createElement(_$_496c[347]);this.headers=[];this.colgroup=[];this.colgroupContainer=document.createElement(_$_496c[348]);var d=document.createElement(_$_496c[180]);d.setAttribute(_$_496c[162],_$_496c[349]);this.colgroupContainer.appendChild(d);this.headerContainer=document.createElement(_$_496c[155]);d=document.createElement(_$_496c[157]);d.classList.add(_$_496c[350]);this.headerContainer.appendChild(d);
|
|
309
|
+
this.thead.appendChild(this.headerContainer);this.table.classList.add(_$_496c[351]);this.table.setAttribute(_$_496c[352],_$_496c[103]);this.table.setAttribute(_$_496c[353],_$_496c[103]);this.table.setAttribute(_$_496c[354],_$_496c[355]);this.table.appendChild(this.colgroupContainer);this.table.appendChild(this.thead);this.table.appendChild(this.tbody);this.table.appendChild(this.tfoot);this.options.textOverflow||this.table.classList.add(_$_496c[356]);!1===this.options.selectLockedCells&&this.table.classList.add(_$_496c[357]);
|
|
310
|
+
this.corner=document.createElement(_$_496c[20]);this.corner.className=_$_496c[358];this.corner.setAttribute(_$_496c[354],_$_496c[359]);this.corner.setAttribute(_$_496c[360],_$_496c[361]);0==this.options.selectionCopy&&(this.corner.style.display=_$_496c[40]);this.scrollX=I.build.call(b,_$_496c[362]);this.scrollY=I.build.call(b,_$_496c[363]);this.content.appendChild(this.scrollX);this.content.appendChild(this.scrollY);this.content.appendChild(this.table);this.content.appendChild(this.corner);this.element.appendChild(this.content);
|
|
311
|
+
1==this.options.tableOverflow&&(this.content.classList.add(_$_496c[55]),this.options.tableHeight||(this.options.tableHeight=document.body.offsetHeight-18),this.options.tableWidth||(this.options.tableWidth=document.body.offsetWidth-18),this.content.style.width=parseInt(this.options.tableWidth)+_$_496c[47],this.options.pagination?this.content.classList.add(_$_496c[364]):this.content.style.height=parseInt(this.options.tableHeight)+_$_496c[47]);this.options.resize&&(this.content.style.resize=this.options.resize);
|
|
312
|
+
this.options.freezeColumns>this.options.columns.length&&console.error(_$_496c[365]);sa.build.call(this);wa.build.call(this);Aa.build.call(this);Fa.build.call(this);pa.build.call(this);Z.build.call(this);ea.onload.call(this);a.call(this);I.call(this)};c.references=function(b){var d=[],e=[],f=null,g=null,k=null,l=null;for(f=0;f<this.options.columns.length;f++)if(g=this.headers[f])k=g.getAttribute(_$_496c[44]),k!=f&&(g.setAttribute(_$_496c[44],f),g.getAttribute(_$_496c[177])||(g.innerHTML=F.getColumnName(f)));
|
|
313
|
+
for(var n=0;n<this.rows.length;n++)g=this.rows[n],l=g.y,l!=n&&(g.y=n,d[l]=n,g.element&&(g.element.setAttribute(_$_496c[45],n),g.element.children[0].setAttribute(_$_496c[45],n),f=this.options.rows&&this.options.rows[l]&&this.options.rows[l].title?this.options.rows[l].title:n+1,g.element.children[0].innerHTML=f));var q=function(u,x){g=this.records[x][u];k=g.x;l=g.y;k!=u&&(g.x=u,g.element&&g.element.setAttribute(_$_496c[44],u));l!=x&&(g.y=x,g.element&&g.element.setAttribute(_$_496c[45],x));if(k!=u||
|
|
314
|
+
l!=x){var w=F.getColumnNameFromCoords(k,l);u=F.getColumnNameFromCoords(u,x);e[w]=u}};if(b){n=function(u,x){u&&u[x]&&delete u[x]};var p=Object.keys(b);for(f=0;f<p.length;f++)n(this,p[f]),n(this.options.meta,p[f]),n(this.options.cells,p[f]),n(this.options.style,p[f]),n(this.options.comments,p[f])}for(n=0;n<this.rows.length;n++)for(f=0;f<this.options.columns.length;f++)q.call(this,f,n);h.call(this,_$_496c[366],d);h.call(this,_$_496c[299],e);h.call(this,_$_496c[300],e);h.call(this,_$_496c[104],e);h.call(this,
|
|
315
|
+
_$_496c[301],e);h.call(this,_$_496c[283],e);this.options.mergeCells&&pa.build.call(this);G.call(this.parent,_$_496c[367],this,e,b);Y.updateAll.call(this,e,b);return e};c.update=function(b){b&&a.call(this);if(typeof this.parent.config.updateTable==_$_496c[89])for(var d=0;d<this.rows.length;d++)for(var e=0;e<this.options.columns.length;e++)b=this.records[d][e],this.parent.config.updateTable.call(this,this,b.element,e,d,P.call(this,e,d),b.r?b.r:b.v);Z.refresh.call(this)};return c}(),qa=function(){var h=
|
|
316
|
+
{spreadsheet:function(a,c){var b={name:null,config:{},el:a,element:a,plugins:[],worksheets:[],history:[],historyIndex:-1,queue:[],ignoreEvents:!1,ignoreHistory:!1,ignorePersistence:!1};Da.spreadsheet.call(b,c);b.config.license&&(v.license=b.config.license);a.spreadsheet=b;a.jspreadsheet=a.jexcel=b.worksheets;v.spreadsheet.push(b);b.name||(b.name=jSuites.guid());h.bind(b.config.root?b.config.root:document);var d=b.config.tabs;typeof d!==_$_496c[88]&&(d={allowCreate:d?!0:!1,hideHeaders:d?!1:!0,allowChangePosition:b.config.allowMoveWorksheet?
|
|
317
|
+
!0:!1});d.maxWidth||(d.maxWidth=a.offsetWidth-50+_$_496c[47]);d.animation=void 0==d.animation?!0:d.animation;d.onbeforecreate=function(){b.createWorksheet();return!1};d.onclick=function(f,g,k,l,n){0<=k&&b.openWorksheet(k,!0)};d.onchangeposition=function(f,g,k){b.updateWorksheet(g,k)};jSuites.tabs(a,d);a.classList.add(_$_496c[368]);1==c.fullscreen&&a.classList.add(_$_496c[15]);var e=document.createElement(_$_496c[20]);b.toolbar=document.createElement(_$_496c[20]);b.toolbar.className=_$_496c[369];e.appendChild(b.toolbar);
|
|
318
|
+
b.filter=ea.build.call(b);e.appendChild(b.filter);b.helper=document.createElement(_$_496c[20]);b.helper.className=_$_496c[370];e.appendChild(b.helper);b.loading=document.createElement(_$_496c[20]);b.loading.classList.add(_$_496c[371]);e.appendChild(b.loading);e.appendChild(ha.build(b));e.appendChild(Ra(b));b.textarea=document.createElement(_$_496c[372]);b.textarea.className=_$_496c[373];b.textarea.tabIndex=_$_496c[374];e.appendChild(b.textarea);d.position===_$_496c[375]?a.insertBefore(e,a.children[0]):
|
|
319
|
+
a.insertBefore(e,a.children[1]);a.appendChild(Ja.call(b,v.license));b.createWorksheet=la.createWorksheet;b.deleteWorksheet=la.deleteWorksheet;b.renameWorksheet=la.renameWorksheet;b.updateWorksheet=la.updateWorksheet;b.openWorksheet=la.openWorksheet;b.moveWorksheet=la.moveWorksheet;b.getWorksheet=la.getWorksheet;b.getWorksheetActive=la.getWorksheetActive;b.getWorksheetInstance=la.getWorksheetInstance;b.getConfig=function(){var f=b.config;f.worksheets=[];for(var g=0;g<b.worksheets.length;g++)f.worksheets.push(b.worksheets[g].getConfig());
|
|
320
|
+
return f};b.fullscreen=Ka;b.progress=La;b.undo=W.undo;b.redo=W.redo;b.setToolbar=fa[_$_496c[11]];b.getToolbar=fa[_$_496c[46]];b.showToolbar=fa.show;b.hideToolbar=fa.hide;b.tools=e;1!==b.edition&&(a=Object.keys(b.config.definedNames))&&a.length&&(b.config.definedNames={},console.log(_$_496c[376]));c.plugins&&ra.call(b,c.plugins);b.setPlugins=function(f){ra.call(b,f)};a=Object.keys(v.extensions);if(a.length)for(d=0;d<a.length;d++)if(typeof v.extensions[a[d]].oninit==_$_496c[89])v.extensions[a[d]].oninit(b,
|
|
321
|
+
c);return b},worksheet:function(a,c){var b={};a.worksheets.push(b);b.parent=a;Da(b);Sa(b);ka(b);aa(b);ha(b);Fa(b);Ua(b);pa(b);Qa(b);Va(b);ia(b);Y(b);S(b);ja(b);oa(b);Xa(b);Wa(b);Ca(b);Z(b);wa(b);sa(b);ea(b);fa(b);va(b);Za(b);$a(b);Aa(b);la(b);ma(b);Ta(b);Ya(b);Ia(b);Ha(b);Da.worksheet.call(b,c);!v.license&&b.options.license&&(v.license=b.options.license);a.element.jexcel=a.element.jexcel?a.worksheets:b;ra.execute.call(b.parent,_$_496c[377],[b]);b.onload=function(){this.options.worksheetName||(this.options.worksheetName=
|
|
322
|
+
_$_496c[378]+la.nextName());var d=this.options.worksheetName;H(d)&&console.log(_$_496c[379]+d+_$_496c[380]);H(d,b);this.element=a.element.tabs.appendElement(this.options.worksheetName,function(e,f){b.options.worksheetState===_$_496c[54]&&(f.style.display=_$_496c[40])});this.element.classList.add(_$_496c[381]);this.element.jexcel=this;ca.build.call(this);ra.execute.call(this.parent,_$_496c[382],[this]);this.options.data&&500<this.options.data.length&&!I.limited.call(this)&&!this.options.pagination&&
|
|
323
|
+
console.error(_$_496c[383])};return b},row:function(a,c){this.rows[a]||(this.rows[a]={element:null,y:a});c&&(this.rows[a].id=c,va[_$_496c[11]].call(this,c));this.options.rows&&this.options.rows[a]&&this.options.rows[a].height&&(this.rows[a].height=this.options.rows[a].height);this.records[a]||(this.records[a]=[]);this.options.data[a]||(this.options.data[a]=this.dataType?{}:[]);for(c=0;c<this.options.columns.length;c++)h.cell.call(this,c,a)},cell:function(a,c,b){typeof b==_$_496c[13]&&(b=P.call(this,
|
|
324
|
+
a,c),null===b||void 0===b)&&(b=_$_496c[3],P.call(this,a,c,b));this.records[c][a]||(this.records[c][a]={element:null,x:a,y:c,v:b})},bind:function(a){for(var c=Object.keys(Ba),b=0;b<c.length;b++)(c[b]==_$_496c[384]?window:a).addEventListener(c[b],Ba[c[b]],c[b]==_$_496c[385]||c[b]==_$_496c[386]||c[b]==_$_496c[387]?{passive:!1}:{})},unbind:function(a){for(var c=Object.keys(Ba),b=0;b<c.length;b++)(c[b]==_$_496c[384]?window:a).removeEventListener(c[b],Ba[c[b]])}};return h}(),Za=function(){var h=function(a){a.getWidth=
|
|
325
|
+
h[_$_496c[46]];a.setWidth=h[_$_496c[11]]};h[_$_496c[46]]=function(a){var c=this.options.columns;if(typeof a===_$_496c[13]){a=[];for(var b=0;b<c.length;b++)a.push(c[b].width)}else a=c[a].width;return a};h[_$_496c[11]]=function(a,c,b){if(!R.call(this.parent,this))return!1;if(c){if(Array.isArray(a)){b||(b=[]);for(var d=0;d<a.length;d++){b[d]||(b[d]=this.options.columns[a[d]].width);var e=Array.isArray(c)&&c[d]?c[d]:c;this.options.columns[a[d]].width=e;this.colgroup[a[d]]&&this.colgroup[a[d]].setAttribute(_$_496c[162],
|
|
326
|
+
e)}}else b||(b=this.options.columns[a].width),this.options.columns[a].width=c,this.colgroup[a]&&this.colgroup[a].setAttribute(_$_496c[162],c);this.refreshBorders();W.call(this.parent,{worksheet:this,action:_$_496c[76],column:a,oldValue:b,newValue:c});K.call(this,_$_496c[76],{column:a,width:c,oldWidth:b});G.call(this.parent,_$_496c[388],this,a,c,b);I.call(this,!0)}};return h}(),$a=function(){var h=function(c){c.getHeight=h[_$_496c[46]];c.setHeight=h[_$_496c[11]]};h[_$_496c[46]]=function(c){if(c)c=
|
|
327
|
+
this.rows[c].element.style.height;else{c=[];for(var b=0;b<this.rows.length;b++){var d=this.rows[b].element.style.height;d&&(c[b]=d)}}return c};var a=function(c,b){b=parseInt(b);var d=this.rows[c].height?this.rows[c].height:this.rows[c].element.offsetHeight||this.options.defaultRowHeight;this.rows[c].element.style.height=b+_$_496c[47];this.options.rows[c]||(this.options.rows[c]={});this.options.rows[c].height=b+_$_496c[47];this.rows[c].height=b;return d};h[_$_496c[11]]=function(c,b,d){if(!R.call(this.parent,
|
|
328
|
+
this))return!1;var e,f=typeof d==_$_496c[13]?!0:!1;if(b){if(Array.isArray(c))for(!0===f&&(d=[]),e=0;e<c.length;e++){var g=Array.isArray(b)&&b[e]?b[e]:b;a.call(this,c[e],g);1==f&&d.push(f)}else e=a.call(this,c,b),1==f&&(d=e);this.refreshBorders();W.call(this.parent,{worksheet:this,action:_$_496c[77],row:c,oldValue:d,newValue:b});K.call(this,_$_496c[77],{row:c,height:b,oldHeight:d});G.call(this.parent,_$_496c[389],this,c,b,d);I.call(this,!0)}};return h}(),ea=function(){var h=function(g){var k=e[g];
|
|
329
|
+
g=b[e[g]];if(!g.element){g.element=document.createElement(_$_496c[390]);g.element.innerHTML=g.value;var l=document.createElement(_$_496c[237]);l.type=_$_496c[270];l.value=k;l.o=g;g.element.insertBefore(l,g.element.firstChild)}g.element.firstChild.checked=g.selected;return g.element},a=null,c=null,b=[],d=0,e=null,f=function(g){g.setFilter=f[_$_496c[11]];g.getFilter=f[_$_496c[46]];g.openFilter=f.open;g.closeFilter=f.close;g.resetFilters=f.reset;g.showFilter=f.show;g.hideFilter=f.hide};f.isVisible=function(){return c};
|
|
330
|
+
f[_$_496c[11]]=function(g,k){var l=this.headers[g];g=this.options.columns[g];Array.isArray(k)&&0<k.length?(l&&l.classList.add(_$_496c[391]),g.filters=k):(l&&l.classList.remove(_$_496c[391]),g.filters=null);f.update.call(this)};f[_$_496c[46]]=function(g){if(g)return this.options.columns[g].filters||null;g={};for(var k=0;k<this.options.columns.length;k++)g[k]=this.options.columns[k].filters||null;return g};f.open=function(g){a=parseInt(g);if(this.headers[a].classList.contains(_$_496c[179])){c=!0;var k=
|
|
331
|
+
this.parent.element.getBoundingClientRect(),l=this.headers[a].getBoundingClientRect();g=l.left-k.left;var n=l.top-k.top+l.height;l=this.parent.filter;k=k.left+k.width;l.style.display=_$_496c[16];g+l.offsetWidth>k&&(g=k-(l.offsetWidth+18));l.style.top=n+_$_496c[47];l.style.left=g+_$_496c[47];l.children[0].focus();g=l.children[1].selectAll;l.children[1].textContent=_$_496c[3];l.children[1].appendChild(g);g.children[0].checked=this.options.columns[a].filters?!1:!0;g=sa.execute.call(this,null,a);g=F.invert(g);
|
|
332
|
+
l=[];for(k=0;k<this.rows.length;k++)if(g[k]){n=_$_496c[3]+P.call(this,a,k);var q=_$_496c[3]+ia.processed.call(this,a,k,!0);n.substr(0,1)==_$_496c[12]&&(n=q);l.push([n,q])}l.sort(function(p,u){return p[0]>u[0]?1:p[0]<u[0]?-1:0});b=[];for(k=0;k<l.length;k++)b[l[k][0]]={value:l[k][1],element:null};(g=G.call(this.parent,_$_496c[393],this,a,b))&&(b=g);void 0!==b[_$_496c[3]]&&(delete b[_$_496c[3]],b[_$_496c[3]]={value:_$_496c[225]+E(_$_496c[394])+_$_496c[250],element:null});f.search.call(this,_$_496c[3])}else console.log(_$_496c[392])};
|
|
333
|
+
f.close=function(g){if(g){g=this.parent.filter.children[1];if(1==g.selectAll.firstChild.checked&&e.length==Object.keys(b).length)g=null;else{g=1==g.currentSelection.firstChild.checked?this.options.columns[a].filters||[]:[];for(var k=0;k<e.length;k++)b[e[k]].selected&&g.push(e[k])}f[_$_496c[11]].call(this,a,g)}this.parent.filter.style.display=_$_496c[3];this.parent.filter.children[0].value=_$_496c[3];a=null;c=!1;b=null;d=0;e=null};f.reset=function(g){f.updateDOM.call(this,g,!1);xa.reset.call(this);
|
|
334
|
+
f.update.call(this)};f.execute=function(g){for(var k=this.options.columns,l=[],n=0;n<this.options.data.length;n++){for(var q=!0,p=0;p<k.length;p++)if(k[p].filters&&g!==p){var u=_$_496c[3]+P.call(this,p,n),x=_$_496c[3]+this.getLabelFromCoords(p,n,!0);-1==k[p].filters.indexOf(u)&&-1==k[p].filters.indexOf(x)&&(q=!1)}q&&l.push(n)}return l};f.update=function(){xa.reset.call(this);this.resetSelection();this.resetBorders();var g=sa.execute.call(this,null);if(typeof this.parent.config.onbeforefilter==_$_496c[89]){var k=
|
|
335
|
+
f[_$_496c[46]].call(this),l=G.call(this.parent,_$_496c[395],this,k,g);if(l)g=l;else if(!1===l)return!1}this.pageNumber=0;g&&g.length<this.rows.length&&xa[_$_496c[11]].call(this,g);Z.refresh.call(this);I.call(this,!0);G.call(this.parent,_$_496c[396],this,k,g)};f.show=function(g){f.updateDOM.call(this,g,!0)};f.hide=function(g){f.updateDOM.call(this,g,!1,!0);f.update.call(this)};f.search=function(g){for(var k=this.parent.filter.children[1];k.children[1];)k.removeChild(k.lastChild);k.currentSelection.firstChild.checked=
|
|
336
|
+
!1;if(g){e=[];g=new RegExp(g,_$_496c[397]);for(var l=Object.keys(b),n=0;n<l.length;n++)b[l[n]]&&(_$_496c[3]+b[l[n]].value).match(g)?(e.push(l[n]),b[l[n]].selected=!0):b[l[n]].selected=!1;e.length&&this.options.columns[a].filters&&(k.firstChild.checked=!0,k.appendChild(k.currentSelection))}else{e=Object.keys(b);if(g=this.options.columns[a].filters)for(n=0;n<e.length;n++)b[e[n]].selected=!1,0<=g.indexOf(e[n])&&(b[e[n]].selected=!0);else for(n=0;n<e.length;n++)b[e[n]].selected=!0;k.firstChild.checked=
|
|
337
|
+
g?!1:!0}for(n=d=0;n<e.length;n++)200>n&&(g=d++,k.appendChild(h(g)))};f.build=function(){var g=document.createElement(_$_496c[20]);g.className=_$_496c[398];g.onclick=function(q){q.target.tagName==_$_496c[399]&&q.target.o&&(q.target.o.selected=q.target.checked);q=!0;for(var p=1;p<this.children.length;p++)this.children[p].children[0].checked||(q=!1);this.children[0].children[0].checked=q};var k=document.createElement(_$_496c[237]);k.type=_$_496c[59];k.placeholder=E(_$_496c[400]);k.classList.add(_$_496c[401]);
|
|
338
|
+
k.classList.add(_$_496c[238]);var l=document.createElement(_$_496c[237]);l.type=_$_496c[402];l.value=_$_496c[403];l.className=_$_496c[404];var n=document.createElement(_$_496c[20]);n.className=_$_496c[405];n.appendChild(k);n.appendChild(g);n.appendChild(l);g.currentSelection=document.createElement(_$_496c[390]);g.currentSelection.innerHTML=_$_496c[406]+E(_$_496c[407]);g.selectAll=document.createElement(_$_496c[390]);g.selectAll.innerHTML=_$_496c[408]+E(_$_496c[409])+_$_496c[250];g.selectAll.onclick=
|
|
339
|
+
function(){for(var q=this.children[0].checked,p=1;p<this.parentNode.children.length;p++)this.parentNode.children[p].children[0].checked=q;if(1==q)for(p=0;p<e.length;p++)b[e[p]].selected=!0;else for(q=Object.keys(b),p=0;p<q.length;p++)b[q[p]].selected=!1};jSuites.lazyLoading(g,{loadDown:function(q){for(q=0;d<e.length-1&&10>q;){var p=d++;g.appendChild(h(p));q++}}});return n};f.updateDOM=function(g,k,l){var n=this.headers,q=function(p){1==k?n[p].classList.add(_$_496c[179]):(this.options.columns[p].filters=
|
|
340
|
+
null,n[p].classList.remove(_$_496c[391]),1==l&&n[p].classList.remove(_$_496c[179]))};if(g)q.call(this,g);else for(g=0;g<n.length;g++)q.call(this,g)};f.onload=function(){var g,k=!1;if(g=this.options.columns)for(var l=0;l<g.length;l++)Array.isArray(g[l].filters)&&0<g[l].filters.length&&this.headers[l]&&(this.headers[l].classList.add(_$_496c[391]),k=!0);1==k&&f.update.call(this)};return f}(),xa=function(){var h={};h[_$_496c[11]]=function(a){for(var c=0;c<a.length;c++)this.rows[a[c]].results=!0;this.results=
|
|
341
|
+
a};h.reset=function(){for(var a=0;a<this.rows.length;a++)!0===this.rows[a].results&&delete this.rows[a].results;this.results=null};h.refresh=function(){for(var a=[],c=0;c<this.rows.length;c++)!0===this.rows[c].results&&a.push(c);return a};return h}(),sa=function(){var h=function(b){var d=document.createElement(_$_496c[20]);if(0<b.options.pagination&&b.options.paginationOptions&&0<b.options.paginationOptions.length){b.paginationDropdown=document.createElement(_$_496c[410]);b.paginationDropdown.classList.add(_$_496c[411]);
|
|
342
|
+
b.paginationDropdown.onchange=function(){b.options.pagination=parseInt(this.value);b.page(0)};for(var e=0;e<b.options.paginationOptions.length;e++){var f=document.createElement(_$_496c[412]);f.value=b.options.paginationOptions[e];f.innerHTML=b.options.paginationOptions[e];b.paginationDropdown.appendChild(f)}b.paginationDropdown.value=b.options.pagination;d.appendChild(document.createTextNode(E(_$_496c[413])));d.appendChild(b.paginationDropdown);d.appendChild(document.createTextNode(E(_$_496c[414])))}return d},
|
|
343
|
+
a=function(b,d){var e=this.merged.rows;if(e[d]){for(;0<d&&e[d-1];)d--;for(;e[d];)b.push(d++)}else b.push(d)},c=function(b){b.search=c.update;b.resetSearch=c.reset;b.updateSearch=c.refresh;b.showSearch=c.show;b.hideSearch=c.hide};c.execute=function(b,d){null===b?b=this.searchInput.value||_$_496c[3]:b!==this.searchInput.value&&(this.searchInput.value=b);this.pageNumber=0;var e=[],f=null;d=ea.execute.call(this,d);if(b)try{b=new RegExp(b,_$_496c[397]);for(var g=0;g<this.rows.length;g++){f=!1;if(!d||0<=
|
|
344
|
+
d.indexOf(g))for(var k=0;k<this.options.columns.length;k++){var l=_$_496c[3]+P.call(this,k,g),n=_$_496c[3]+this.getLabelFromCoords(k,g);if(l.match(b)||n.match(b))f=!0}1==f&&a.call(this,e,g)}}catch(q){}else e=d;if(e.length){for(g=0;g<this.rows.length;g++)!0===this.rows[g].results&&e.push(g);e.sort(function(q,p){return q-p})}return e};c.update=function(b){xa.reset.call(this);this.resetSelection();this.resetBorders();var d=c.execute.call(this,b);if(typeof this.parent.config.onbeforesearch==_$_496c[89]){var e=
|
|
345
|
+
G.call(this.parent,_$_496c[416],this,b,d);if(e)d=e;else if(!1===e)return!1}this.pageNumber=0;d&&d.length<this.rows.length&&xa[_$_496c[11]].call(this,d);Z.refresh.call(this);I.call(this,!0);G.call(this.parent,_$_496c[417],this,b,d)};c.refresh=function(){I.update.call(this);Z.refresh.call(this)};c.reset=function(){this.searchInput.value=_$_496c[3];xa.reset.call(this);I.update.call(this);Z.refresh.call(this)};c.show=function(){this.options.search=!0;this.searchContainer.style.display=_$_496c[3]};c.hide=
|
|
346
|
+
function(){this.options.search=!1;this.searchContainer.style.display=_$_496c[40]};c.build=function(){this.searchContainer=document.createElement(_$_496c[20]);this.searchContainer.classList.add(_$_496c[418]);this.searchContainer.appendChild(h(this));var b=this.searchContainer,d=b.appendChild,e=document.createElement(_$_496c[20]);e.innerHTML=E(_$_496c[400])+_$_496c[119];this.searchInput=document.createElement(_$_496c[237]);this.searchInput.classList.add(_$_496c[415]);this.searchInput.classList.add(_$_496c[238]);
|
|
347
|
+
e.appendChild(this.searchInput);d.call(b,e);0==this.options.search&&(this.searchContainer.style.display=_$_496c[40]);this.element.insertBefore(this.searchContainer,this.element.firstChild)};return c}(),Ra=function(){var h=function(a){a.contextmenu=document.createElement(_$_496c[20]);a.contextmenu.className=_$_496c[419];jSuites.contextmenu(a.contextmenu,{onclick:function(c,b,d){c.close()}});return a.contextmenu};h.open=function(a,c){var b=a.target.getAttribute(_$_496c[44]),d=a.target.getAttribute(_$_496c[45]),
|
|
348
|
+
e=h[_$_496c[46]](this,b,d,a,c[0],c[1],c[2]);if(typeof this.parent.config.contextMenu==_$_496c[89]){var f=this.parent.config.contextMenu(this,b,d,a,e,c[0],c[1],c[2]);if(f)e=f;else if(!1===f)return!1}a.preventDefault();f=ra.execute.call(this.parent,_$_496c[90],[this,b,d,a,e,c[0],c[1],c[2]]);e=f[4];this.parent.contextmenu.contextmenu.open(a,e)};h.isOpened=function(){return this.parent.contextmenu.contextmenu.isOpened()};h[_$_496c[46]]=function(a,c,b,d,e,f,g){var k=[],l=a.parent.config,n=-1!=navigator.userAgent.indexOf(_$_496c[420])?
|
|
349
|
+
_$_496c[421]:_$_496c[422];e==_$_496c[423]&&(1==l.allowRenameWorksheet&&k.push({title:E(_$_496c[424]),onclick:function(){var p=prompt(E(_$_496c[424]),d.target.innerText);p&&a.parent.renameWorksheet(f,p)}}),1==l.allowDeleteWorksheet&&k.push({title:E(_$_496c[425]),onclick:function(){confirm(E(_$_496c[426]),d.target.innerText)&&a.parent.deleteWorksheet(f)}}),k.push({type:_$_496c[427]}));e==_$_496c[428]&&(k.push({title:E(_$_496c[429]),onclick:function(){var p=prompt(E(_$_496c[429]),d.target.innerText);
|
|
350
|
+
a.setNestedCell(f,g,{title:p})}}),k.push({type:_$_496c[427]}));if(e==_$_496c[430]||e==_$_496c[431]||e==_$_496c[432]||e==_$_496c[428])k.push({title:E(_$_496c[433]),icon:_$_496c[434],shortcut:n+_$_496c[435],onclick:function(){a.cut()}}),k.push({title:E(_$_496c[436]),icon:_$_496c[437],shortcut:n+_$_496c[438],onclick:function(){a.copy()}}),navigator&&navigator.clipboard&&navigator.clipboard.readText&&k.push({title:E(_$_496c[439]),icon:_$_496c[440],shortcut:n+_$_496c[441],onclick:function(){a.selectedCell&&
|
|
351
|
+
navigator.clipboard.readText().then(function(p){p&&a.paste(a.selectedCell[0],a.selectedCell[1],p)})}}),k.push({type:_$_496c[427]});e==_$_496c[430]&&(1==a.options.allowInsertColumn&&k.push({title:E(_$_496c[442]),onclick:function(){a.insertColumn(1,parseInt(f),1)}}),1==a.options.allowInsertColumn&&k.push({title:E(_$_496c[443]),onclick:function(){a.insertColumn(1,parseInt(f),0)}}),1==a.options.allowDeleteColumn&&k.push({title:E(_$_496c[444]),onclick:function(){a.deleteColumn(a.getSelectedColumns().length?
|
|
352
|
+
void 0:parseInt(c))}}),1==a.options.allowRenameColumn&&k.push({title:E(_$_496c[445]),onclick:function(){a.setHeader(f)}}),a.options.data.length||(k.push({type:_$_496c[427]}),k.push({title:E(_$_496c[446]),onclick:function(){a.insertRow(0)}})),1==a.options.columnSorting&&(k.push({type:_$_496c[427]}),k.push({title:E(_$_496c[447]),onclick:function(){a.orderBy(f,0)}}),k.push({title:E(_$_496c[448]),onclick:function(){a.orderBy(f,1)}}),k.push({type:_$_496c[427]})));if(e==_$_496c[432]||e==_$_496c[431])1==
|
|
353
|
+
a.options.allowInsertRow&&(k.push({title:E(_$_496c[449]),onclick:function(){a.insertRow(1,parseInt(b),1)}}),k.push({title:E(_$_496c[450]),onclick:function(){a.insertRow(1,parseInt(b))}})),1==a.options.allowDeleteRow&&k.push({title:E(_$_496c[451]),onclick:function(){a.deleteRow(a.getSelectedRows().length?void 0:parseInt(b))}}),k.push({type:_$_496c[427]});if(e==_$_496c[432]&&1==a.options.allowComments){var q=a.records[g][f].element.getAttribute(_$_496c[285])||_$_496c[3];k.push({title:q?E(_$_496c[452]):
|
|
354
|
+
E(_$_496c[453]),icon:_$_496c[454],onclick:function(){var p=F.getColumnNameFromCoords(f,g),u=prompt(E(_$_496c[455]),q);u&&a.setComments(p,u)}});q&&k.push({title:E(_$_496c[456]),onclick:function(){var p=F.getColumnNameFromCoords(f,g);a.setComments(p,_$_496c[3])}});k.push({type:_$_496c[427]})}l.allowExport&&k.push({title:E(_$_496c[457]),icon:_$_496c[458],shortcut:n+_$_496c[459],onclick:function(){a.download()}});l.about&&k.push({title:E(_$_496c[460]),icon:_$_496c[461],onclick:function(){!0===l.about?
|
|
355
|
+
alert(L().print()):alert(l.about)}});return k};return h}(),fa=function(){var h=function(a){a.showToolbar=function(){h.show.call(a.parent)};a.hideToolbar=function(){h.hide.call(a.parent)};a.refreshToolbar=function(){h.update.call(a.parent,a)}};h[_$_496c[11]]=function(a){this.toolbar.innerHTML=_$_496c[3];this.config.toolbar=h[_$_496c[46]].call(this,a);h.show.call(this)};h[_$_496c[46]]=function(a){a||(a=this.config.toolbar);a?Array.isArray(a)?a={items:a}:typeof a===_$_496c[89]&&(a=a({items:h.getDefault()})):
|
|
356
|
+
a={};typeof a!==_$_496c[88]&&(a={});a.items||(a.items=h.getDefault());typeof a.responsive==_$_496c[13]&&(a.responsive=!0,a.bottom=!1,a.maxWidth=this.element.offsetWidth);return a};h.show=function(){this.toolbar.innerHTML||h.build.call(this);this.toolbar.style.display=_$_496c[3];this.element.classList.add(_$_496c[462])};h.hide=function(){this.toolbar.style.display=_$_496c[40];this.element.classList.remove(_$_496c[462])};h.update=function(a,c){var b=this.toolbarInstance;b&&(b.options.responsive&&(c=
|
|
357
|
+
this.config.fullscreen?a.element.offsetWidth:a.options.tableWidth?parseInt(a.options.tableWidth):null,b.options.maxWidth=c,b.refresh()),b.update(a))};h.build=function(){for(var a=h[_$_496c[46]].call(this),c=0;c<a.items.length;c++)if(a.items[c].type==_$_496c[410]){if(!a.items[c].options&&a.items[c].v){a.items[c].options=[];for(var b=0;b<a.items[c].v.length;b++)a.items[c].options.push(a.items[c].v[b]);a.items[c].k&&(a.items[c].onchange=function(d,e,f,g){v.current.setStyle(v.current.getSelected(!1,!0),
|
|
358
|
+
f.k,g)})}}else a.items[c].type==_$_496c[275]?(a.items[c].type=_$_496c[463],a.items[c].onclick=function(d,e,f){if(!f.color){var g=null;jSuites.color(f,{onchange:function(k,l){(g=v.current.getSelected(!1,!0))&&v.current.setStyle(g,f.k,l)},onopen:function(k){var l;v.current.cursor?(l=v.current.cursor.style[f.k])?k.color.select(k.color.toHex(l)):k.color.select(_$_496c[3]):k.color.select(_$_496c[3])}});f.color.open()}}):!a.items[c].onclick&&a.items[c].k&&(a.items[c].onclick=function(){v.current.setStyle(v.current.getSelected(!1,
|
|
359
|
+
!0),this.k,this.v)});(c=ra.execute.call(this,_$_496c[91],[a]))&&(a=c[0]);this.toolbarInstance=jSuites.toolbar(this.toolbar,a);this.toolbarInstance.application=this;a=this.element.tabs.getActive();this.toolbarInstance.update(this.worksheets[a])};h.getDefault=function(){return[{content:_$_496c[464],onclick:function(){v.current&&v.current.undo()}},{content:_$_496c[465],onclick:function(){v.current&&v.current.redo()}},{content:_$_496c[458],onclick:function(){v.current&&v.current.download()}},{type:_$_496c[466]},
|
|
360
|
+
{type:_$_496c[410],width:_$_496c[467],options:[_$_496c[468],_$_496c[469],_$_496c[470]],render:function(a){return _$_496c[471]+a+_$_496c[244]+a+_$_496c[472]},onchange:function(a,c,b,d){v.current&&v.current.setStyle(v.current.getSelected(!1,!0),_$_496c[473],d)}},{type:_$_496c[410],width:_$_496c[474],content:_$_496c[475],options:[_$_496c[476],_$_496c[477],_$_496c[478],_$_496c[479],_$_496c[480]],render:function(a){return _$_496c[481]+a+_$_496c[244]+a+_$_496c[472]},onchange:function(a,c,b,d){v.current&&
|
|
361
|
+
v.current.setStyle(v.current.getSelected(!1,!0),_$_496c[482],d)}},{type:_$_496c[410],options:[_$_496c[483],_$_496c[484],_$_496c[485],_$_496c[486]],render:function(a){return _$_496c[487]+a+_$_496c[488]},onchange:function(a,c,b,d){v.current&&v.current.setStyle(v.current.getSelected(!1,!0),_$_496c[489],d.split(_$_496c[490])[2])}},{type:_$_496c[463],content:_$_496c[491],k:_$_496c[492],v:_$_496c[493]},{type:_$_496c[275],content:_$_496c[494],k:_$_496c[275]},{type:_$_496c[275],content:_$_496c[495],k:_$_496c[496]},
|
|
362
|
+
{type:_$_496c[410],data:[_$_496c[497],_$_496c[498],_$_496c[499],_$_496c[500],_$_496c[501],_$_496c[502],_$_496c[503],_$_496c[504],_$_496c[505],_$_496c[506]],columns:5,render:function(a){return _$_496c[487]+a+_$_496c[488]},right:!0,onchange:function(a,c,b,d,e){if(a=v.current.getHighlighted()){b=c.thickness||1;c=c.color||_$_496c[507];e={};for(var f=a[0],g=a[1],k=a[2],l=a[3],n=a[1];n<=a[3];n++)for(var q=a[0];q<=a[2];q++){var p=F.getColumnNameFromCoords(q,n);e[p]||(e[p]=_$_496c[3]);e[p]=d!=_$_496c[502]&&
|
|
363
|
+
d!=_$_496c[498]||q!=f?(d==_$_496c[499]||d==_$_496c[501])&&q>f?e[p]+(_$_496c[508]+b+_$_496c[509]+c+_$_496c[316]):d==_$_496c[497]?e[p]+(_$_496c[508]+b+_$_496c[509]+c+_$_496c[316]):e[p]+_$_496c[510]:e[p]+(_$_496c[508]+b+_$_496c[509]+c+_$_496c[316]);e[p]=d!=_$_496c[497]&&d!=_$_496c[504]&&d!=_$_496c[498]||q!=k?e[p]+_$_496c[512]:e[p]+(_$_496c[511]+b+_$_496c[509]+c+_$_496c[316]);e[p]=d!=_$_496c[503]&&d!=_$_496c[498]||n!=g?(d==_$_496c[499]||d==_$_496c[500])&&n>g?e[p]+(_$_496c[513]+b+_$_496c[509]+c+_$_496c[316]):
|
|
364
|
+
d==_$_496c[497]?e[p]+(_$_496c[513]+b+_$_496c[509]+c+_$_496c[316]):e[p]+_$_496c[514]:e[p]+(_$_496c[513]+b+_$_496c[509]+c+_$_496c[316]);e[p]=d!=_$_496c[497]&&d!=_$_496c[505]&&d!=_$_496c[498]||n!=l?e[p]+_$_496c[516]:e[p]+(_$_496c[515]+b+_$_496c[509]+c+_$_496c[316])}Object.keys(e)&&v.current.setStyle(e,null,null,!0)}},onload:function(a,c){var b=document.createElement(_$_496c[20]),d=document.createElement(_$_496c[20]);b.appendChild(d);var e=jSuites.color(d,{closeOnChange:!1,onchange:function(f,g){f.parentNode.children[1].style.color=
|
|
365
|
+
g;c.color=g}});d=document.createElement(_$_496c[463]);d.classList.add(_$_496c[517]);d.innerHTML=_$_496c[518];d.onclick=function(){e.open()};b.appendChild(d);a.children[1].appendChild(b);d=document.createElement(_$_496c[20]);jSuites.picker(d,{type:_$_496c[410],data:[1,2,3,4,5],render:function(f){return _$_496c[519]+f+_$_496c[520]},onchange:function(f,g,k,l){c.thickness=l},width:_$_496c[521]});a.children[1].appendChild(d);d=document.createElement(_$_496c[20]);d.style.flex=_$_496c[522];a.children[1].appendChild(d)}},
|
|
366
|
+
{type:_$_496c[466]},{content:_$_496c[15],onclick:function(a,c,b){b.children[0].innerText==_$_496c[15]?(v.current.fullscreen(!0),b.children[0].innerText=_$_496c[523]):(v.current.fullscreen(!1),b.children[0].innerText=_$_496c[15])},tooltip:_$_496c[524],updateState:function(a,c,b,d){b.children[0].innerText=1==d.parent.config.fullscreen?_$_496c[523]:_$_496c[15]}},{content:_$_496c[525],onclick:function(a,c,b){b.children[0].innerText==_$_496c[525]?(sa.show.call(v.current),b.children[0].innerText=_$_496c[526]):
|
|
367
|
+
(sa.hide.call(v.current),b.children[0].innerText=_$_496c[525])},tooltip:_$_496c[527],updateState:function(a,c,b,d){b.children[0].innerText=1==d.options.search?_$_496c[526]:_$_496c[525]}}]};return h}(),la=function(){var h=function(a){a.createWorksheet=function(c){return a.parent.createWorksheet(c)};a.deleteWorksheet=function(c){return a.parent.deleteWorksheet(c)};a.renameWorksheet=function(c,b){return a.parent.renameWorksheet(c,b)};a.moveWorksheet=function(c,b){return a.parent.moveWorksheet(c,b)};
|
|
368
|
+
a.openWorksheet=function(){return a.parent.openWorksheet(a.parent.getWorksheet(a))};a.getWorksheet=function(c){return a.parent.getWorksheet(c)};a.getWorksheetActive=function(){return a.parent.getWorksheetActive()};a.getWorksheetName=function(){return a.options.worksheetName.toUpperCase()}};h.nextName=function(){var a=1,c,b=v.spreadsheet;if(b.length)for(var d=0;d<b.length;d++){var e=b[d].worksheets;if(e.length)for(var f=0;f<e.length;f++)e[f].options.worksheetName&&(c=e[f].options.worksheetName.match(/(\d+)/))&&
|
|
369
|
+
(c=parseInt(c[0])+1,c>a&&(a=c))}return a};h.createWorksheet=function(a){if(!R.call(this))return!1;a||(a={});var c=this.worksheets.length,b=G.call(this,_$_496c[528],a,c);if(typeof b===_$_496c[88])a=b;else if(!1===b)return!1;a.data||a.minDimensions||(a.minDimensions=[8,8]);a.worksheetId||(a.worksheetId=jSuites.guid().substring(0,8));a.worksheetName||(a.worksheetName=_$_496c[378]+h.nextName());if(H(a.worksheetName))jSuites.notification({error:_$_496c[522],message:_$_496c[529]});else return b=qa.worksheet(this,
|
|
370
|
+
a),b.onload(),v.current&&v.current.resetSelection(),v.current=b,K.call(b,_$_496c[530],[a]),fa.update.call(this,v.current),G.call(this,_$_496c[531],b,a,c),b};h.deleteWorksheet=function(a){var c=this.worksheets[a];if(!R.call(this,c))return!1;H(c.options.worksheetName,null);this.element.tabs.deleteElement(a);this.worksheets.splice(a,1);K.call(c,_$_496c[532],[a]);G.call(this,_$_496c[533],c,a)};h.renameWorksheet=function(a,c){var b=this.worksheets[a];if(!R.call(this,b))return!1;var d=b.options.worksheetName;
|
|
371
|
+
if(d.toLowerCase()==c.toLowerCase())return!1;c=c.replace(/[^0-9A-Za-z_\s^]+/gi,_$_496c[3]);Number(c)==c&&(c=_$_496c[378]+Number(c));H(c)?alert(_$_496c[534]):(H(d,null),this.element.tabs.rename(a,c),b.options.worksheetName=c,H(c,b),W.call(this,{worksheet:b,action:_$_496c[84],index:a,oldValue:d,newValue:c}),K.call(b,_$_496c[84],{worksheet:a,newValue:c}),Ia.updateWorksheetName.call(b,d,c),Y.updateWorksheetNames.call(b,d,c),G.call(this,_$_496c[535],b,a,c,d))};h.updateWorksheet=function(a,c){var b=this.worksheets;
|
|
372
|
+
if(!R.call(this))return!1;this.worksheets.splice(c,0,b.splice(a,1)[0]);W.call(this,{worksheet:b[c],action:_$_496c[85],f:a,t:c});K.call(b[c],_$_496c[85],{f:a,t:c});G.call(this,_$_496c[536],b[c],a,c)};h.moveWorksheet=function(a,c){this.element.tabs.move(a,c)};h.openWorksheet=function(a){var c=this.worksheets[a];!c||v.current&&v.current==c||(this.element.tabs.getActive()!=a?this.element.tabs.open(a):this.element.tabs.setBorder(a),v.current&&v.current.resetSelection(),v.current=c,v.current.refreshBorders(),
|
|
373
|
+
h.state.call(this,a),fa.update.call(this,v.current),G.call(this,_$_496c[537],c,a))};h.getWorksheet=function(a){if(a&&typeof a==_$_496c[88]){if(a=this.worksheets.indexOf(a),0<=a)return a}else for(var c=0;c<this.worksheets.length;c++)if(a===this.worksheets[c].options.worksheetId)return c;return!1};h.getWorksheetActive=function(){return this.element.tabs.getActive()};h.getWorksheetInstance=function(a){return a===_$_496c[3]||typeof a==_$_496c[17]?(a=h.getWorksheet.call(this,a),!1===a?!1:this.worksheets[a]):
|
|
374
|
+
this.worksheets[a]};h.state=function(a){try{if(typeof localStorage!==_$_496c[13]){var c=this.config.cloud?this.config.cloud:this.element.id;if(c)if(typeof a!==_$_496c[13])localStorage.setItem(_$_496c[538]+c,a);else{var b=parseInt(localStorage.getItem(_$_496c[538]+c));h.openWorksheet.call(this,b)}}}catch(d){}};return h}(),F=function(){var h={getCaretIndex:function(a){var c=0,b=(this.config.root?this.config.root:window).getSelection();b&&0!==b.rangeCount&&(c=b.getRangeAt(0),b=c.cloneRange(),b.selectNodeContents(a),
|
|
375
|
+
b.setEnd(c.endContainer,c.endOffset),c=b.toString().length);return c},invert:function(a){for(var c=[],b=Object.keys(a),d=0;d<b.length;d++)c[a[b[d]]]=b[d];return c},getColumnName:function(a){var c=_$_496c[3];701<a?(c+=String.fromCharCode(64+parseInt(a/676)),c+=String.fromCharCode(64+parseInt(a%676/26))):25<a&&(c+=String.fromCharCode(64+parseInt(a/26)));return c+=String.fromCharCode(65+a%26)},getColumnNameFromCoords:function(a,c){return h.getColumnName(parseInt(a))+(parseInt(c)+1)},getCoordsFromColumnName:function(a){var c=
|
|
376
|
+
/^[a-zA-Z]+/.exec(a);if(c){for(var b=0,d=0;d<c[0].length;d++)b+=parseInt(c[0].charCodeAt(d)-64)*Math.pow(26,c[0].length-1-d);b--;0>b&&(b=0);a=parseInt(/[0-9]+$/.exec(a))||null;0<a&&a--;return[b,a]}}};h.shiftFormula=Y.shiftFormula;h.createFromTable=function(a,c){if(a.tagName!=_$_496c[539])console.log(_$_496c[540]);else{c||(c={});c.columns=[];c.data=[];var b=a.querySelectorAll(_$_496c[541]);if(b.length)for(var d=0;d<b.length;d++){var e=b[d].style.width;e||(e=b[d].getAttribute(_$_496c[162]));e&&(c.columns[d]||
|
|
377
|
+
(c.columns[d]={}),c.columns[d].width=e)}e=function(B){var D=B.getBoundingClientRect();D=50<D.width?D.width:50;c.columns[d]||(c.columns[d]={});B.getAttribute(_$_496c[542])?c.columns[d].type=B.getAttribute(_$_496c[542]):c.columns[d].type=_$_496c[59];c.columns[d].width=D+_$_496c[47];c.columns[d].title=B.innerHTML;B.style.textAlign&&(c.columns[d].align=B.style.textAlign);B.classList.contains(_$_496c[543])&&(c.columns[d].readOnly=!0);if(D=B.getAttribute(_$_496c[544]))c.columns[d].name=D;if(D=B.getAttribute(_$_496c[545]))c.columns[d].id=
|
|
378
|
+
D};var f=[],g=a.querySelectorAll(_$_496c[546]);if(g.length){for(b=0;b<g.length-1;b++){var k=[];for(d=0;d<g[b].children.length;d++){var l={title:g[b].children[d].innerText,colspan:g[b].children[d].getAttribute(_$_496c[174])||1};k.push(l)}f.push(k)}g=g[g.length-1].children;for(d=0;d<g.length;d++)e(g[d])}l=0;var n={},q={},p={},u={},x=null;k=a.querySelectorAll(_$_496c[547]);for(b=0;b<k.length;b++)if(c.data[l]=[],1!=c.parseTableFirstRowAsHeader||g.length||0!=b){for(d=0;d<k[b].children.length;d++){var w=
|
|
379
|
+
k[b].children[d].getAttribute(_$_496c[548]);w?w.substr(0,1)!=_$_496c[12]&&(w=_$_496c[12]+w):w=k[b].children[d].innerHTML;c.data[l].push(w);w=F.getColumnNameFromCoords(d,b);(x=k[b].children[d].getAttribute(_$_496c[549]))&&(u[w]=x);x=parseInt(k[b].children[d].getAttribute(_$_496c[174]))||0;var y=parseInt(k[b].children[d].getAttribute(_$_496c[175]))||0;if(x||y)n[w]=[x||1,y||1];if(x=k[b].children[d].style&&k[b].children[d].style.display==_$_496c[40])k[b].children[d].style.display=_$_496c[3];(x=k[b].children[d].getAttribute(_$_496c[104]))&&
|
|
380
|
+
(p[w]=x);k[b].children[d].classList.contains(_$_496c[550])&&(p[w]=p[w]?p[w]+_$_496c[551]:_$_496c[552])}k[b].style&&k[b].style.height&&(q[b]={height:k[b].style.height});l++}else for(d=0;d<k[b].children.length;d++)e(k[b].children[d]);0<Object.keys(f).length&&(c.nestedHeaders=f);0<Object.keys(p).length&&(c.style=p);0<Object.keys(n).length&&(c.mergeCells=n);0<Object.keys(q).length&&(c.rows=q);0<Object.keys(u).length&&(c.classes=u);k=a.querySelectorAll(_$_496c[553]);if(k.length){a=[];for(b=0;b<k.length;b++){e=
|
|
381
|
+
[];for(d=0;d<k[b].children.length;d++)e.push(k[b].children[d].innerText);a.push(e)}0<Object.keys(a).length&&(c.footers=a)}if(1==c.parseTableAutoCellType)for(a=[],d=0;d<c.columns.length;d++){f=e=!0;a[d]=[];for(b=0;b<c.data.length;b++)if(w=c.data[b][d],a[d][w]||(a[d][w]=0),a[d][w]++,25<w.length&&(e=!1),10==w.length){if(w.substr(4,1)!=_$_496c[198]||w.substr(7,1)!=_$_496c[198])f=!1}else f=!1;b=Object.keys(a[d]).length;f?c.columns[d].type=_$_496c[197]:1==e&&1<b&&b<=parseInt(.1*c.data.length)&&(c.columns[d].type=
|
|
382
|
+
_$_496c[61],c.columns[d].source=Object.keys(a[d]))}return c}};h.injectArray=function(a,c,b){return a.slice(0,c).concat(b).concat(a.slice(c))};h.parseCSV=function(a,c){c=c||_$_496c[25];for(var b=0,d=0,e=[[]],f=0,g=null,k=!1,l=!1,n=0;n<a.length;n++)if(e[d]||(e[d]=[]),e[d][b]||(e[d][b]=_$_496c[3]),a[n]!=_$_496c[554])if(a[n]!=_$_496c[555]&&a[n]!=c||0!=k&&1!=l&&g){a[n]==_$_496c[200]&&(k=!k);if(null===g){if(g=k,1==g)continue}else if(!0===g&&!l&&a[n]==_$_496c[200]){a[n+1]==_$_496c[200]?(k=!0,e[d][b]+=a[n],
|
|
383
|
+
n++):l=!0;continue}e[d][b]+=a[n]}else{g=null;l=k=!1;if(e[d][b][0]==_$_496c[200]){var q=e[d][b].trim();q[q.length-1]==_$_496c[200]&&(e[d][b]=q.substr(1,q.length-2))}a[n]==_$_496c[555]?(b=0,d++):(b++,b>f&&(f=b))}for(a=0;a<e.length;a++)for(n=0;n<=f;n++)void 0===e[a][n]&&(e[a][n]=_$_496c[3]);return e};h.getTokensFromRange=Y.getTokensFromRange;h.getRangeFromTokens=Y.getRangeFromTokens;return h}(),Ba=function(){var h={},a=null,c=null,b=null,d=null,e=!1,f=null,g=null,k=null,l=function(r){function z(O){O.className&&
|
|
384
|
+
(O.classList.contains(_$_496c[368])&&(M=O),O.classList.contains(_$_496c[381])&&(J=O),O.classList.contains(_$_496c[556])&&(T=O));O.tagName==_$_496c[557]?A=1:O.tagName==_$_496c[558]?A=2:O.tagName==_$_496c[559]&&(A=3);O.parentNode&&!M&&z(O.parentNode)}var A=null,C=null,M=null,J=null,T=null,N=null,U=null,X=null;z(r.target);if(null!==T)return!1;if(M)if(r.target.classList.contains(_$_496c[350]))C=_$_496c[560];else if(r.target.classList.contains(_$_496c[358]))C=_$_496c[142];else if(r.target.classList.contains(_$_496c[288]))C=
|
|
385
|
+
_$_496c[431],N=parseInt(r.target.getAttribute(_$_496c[45]));else if(r.target.parentNode&&r.target.parentNode.classList&&r.target.parentNode.classList.contains(_$_496c[189]))N=r.target.getAttribute(_$_496c[194]),U=r.target.getAttribute(_$_496c[195]),null===N?C=_$_496c[560]:(C=_$_496c[428],N=parseInt(N),U=parseInt(U));else if(r.target.parentNode&&r.target.parentNode.classList&&r.target.parentNode.classList.contains(_$_496c[156]))C=_$_496c[561];else if(r.target.classList.contains(_$_496c[160]))C=_$_496c[561];
|
|
386
|
+
else if(r.target.parentNode&&r.target.parentNode.classList&&r.target.parentNode.classList.contains(_$_496c[562]))C=_$_496c[423],N=Array.prototype.indexOf.call(r.target.parentNode.children,r.target);else if(1==A)C=_$_496c[430],N=r.target.clientWidth-r.offsetX,r.target.classList.contains(_$_496c[179])&&3<N&&20>N&&(C=_$_496c[563]),N=r.target.getAttribute(_$_496c[44]);else if(2==A){if(r=n(r,M))C=_$_496c[432],N=r[0],U=r[1],X=r[2]}else if(3==A){if(N=r.target.getAttribute(_$_496c[44]),U=r.target.getAttribute(_$_496c[45]),
|
|
387
|
+
N||U)C=_$_496c[564]}else A||jSuites.findElement(r.target,_$_496c[565])&&(C=_$_496c[91]);return[M,J,A,C,N,U,X]},n=function(r,z){if(r.changedTouches&&r.changedTouches[0]){var A=r.changedTouches[0].clientX;r=r.changedTouches[0].clientY}else A=r.clientX,r=r.clientY;z=z.spreadsheet.config.root?z.spreadsheet.config.root:document;if(z.elementsFromPoint)var C=z.elementsFromPoint(A,r);else z.msElementsFromPoint&&(C=z.msElementsFromPoint(A,r));for(z=0;z<C.length;z++)if(A=C[z].getAttribute(_$_496c[44]),r=C[z].getAttribute(_$_496c[45]),
|
|
388
|
+
null!=A&&null!=r)return A=parseInt(A),r=parseInt(r),[A,r,C[z]];return!1},q=function(r){var z=l(r);if(!1===z)return!1;z[0]?z[1]?v.current&&document.activeElement.classList.contains(_$_496c[98])?document.activeElement.worksheet||(document.activeElement.worksheet=z[1].jexcel):v.current!=z[1].jexcel&&(v.current&&v.current.resetSelection(),v.current=z[1].jexcel):v.current||(r=z[0].tabs.getActive(),0<=r&&(v.current=z[0].spreadsheet.worksheets[r])):v.current&&!jSuites.findElement(r.target,_$_496c[238])&&
|
|
389
|
+
(v.current.resetSelection(!0),v.current=null);return z},p=function(r){I.limited.call(v.current)&&(g||(g=setTimeout(function(){var z=v.current.content.getBoundingClientRect();if(r.changedTouches&&r.changedTouches[0])var A=r.changedTouches[0].clientX,C=r.changedTouches[0].clientY;else A=r.clientX,C=r.clientY;50>z.height-(C-z.top)?I.down.call(v.current):80>C-z.top&&I.up.call(v.current);50>z.width-(A-z.left)?I.right.call(v.current):80>A-z.left&&I.left.call(v.current);g=null},50)))};h.input=function(r){if(r.target.tagName==
|
|
390
|
+
_$_496c[566]&&r.target.classList.contains(_$_496c[98])){var z=null;r.target.worksheet?z=r.target.worksheet:v.current&&(z=v.current);z&&na.parse.call(z,r.target)}};h.keydown=function(r){if(v.current){r.target.tagName==_$_496c[566]&&r.target.classList.contains(_$_496c[98])&&na.onkeydown.call(v.current,r);if(27==r.which){if(v.current.edition)return v.current.closeEditor(v.current.edition,!1),r.preventDefault(),!1;if(ta.event)return ta.cancel.call(v.current,r),r.preventDefault(),!1;if(ba.event)return ba.cancel.call(v.current,
|
|
391
|
+
r),!1;if(1==ea.isVisible())return ea.close.call(v.current,!1),r.preventDefault(),!1}if(r.target.classList.contains(_$_496c[401])){var z=r.target;f&&clearTimeout(f);f=setTimeout(function(){ea.search.call(v.current,z.value);f=null},500)}else if(r.target.classList.contains(_$_496c[415]))z=r.target,f&&clearTimeout(f),f=setTimeout(function(){v.current.search(z.value);f=null},400);else if(!r.target.classList.contains(_$_496c[238]))if(v.current.edition){var A=v.current.edition.getAttribute(_$_496c[44]);
|
|
392
|
+
13==r.which?v.current.options.columns[A].type==_$_496c[197]?v.current.closeEditor(v.current.edition,!0):v.current.options.columns[A].type!=_$_496c[61]&&v.current.options.columns[A].type!=_$_496c[567]&&v.current.options.columns[A].type!=_$_496c[454]&&(r.altKey?v.current.parent.input.classList.contains(_$_496c[568])||document.execCommand(_$_496c[569],!1,_$_496c[570]):(v.current.closeEditor(v.current.edition,!0),v.current.parent.config.moveDownOnEnter&&v.current.down(),r.preventDefault())):9==r.which?
|
|
393
|
+
(v.current.closeEditor(v.current.edition,!0),v.current.right(),r.preventDefault()):39!=r.which&&37!=r.which&&38!=r.which&&40!=r.which||v.current.parent.input.selected||(v.current.closeEditor(v.current.edition,!0),37==r.which?v.current.left(r.shiftKey,r.ctrlKey):39==r.which?v.current.right(r.shiftKey,r.ctrlKey):38==r.which?v.current.up(r.shiftKey,r.ctrlKey):40==r.which&&v.current.down(r.shiftKey,r.ctrlKey),r.preventDefault())}else if(v.current.selectedCell)if(33==r.which)0<v.current.options.pagination?
|
|
394
|
+
Aa.pageUp.call(v.current):r.altKey?I.pageLeft.call(v.current):I.pageUp.call(v.current);else if(34==r.which)0<v.current.options.pagination?Aa.pageDown.call(v.current):r.altKey?I.pageRight.call(v.current):I.pageDown.call(v.current);else if(37==r.which)v.current.left(r.shiftKey,r.ctrlKey),r.preventDefault();else if(39==r.which)v.current.right(r.shiftKey,r.ctrlKey),r.preventDefault();else if(38==r.which)v.current.up(r.shiftKey,r.ctrlKey),r.preventDefault();else if(40==r.which)v.current.down(r.shiftKey,
|
|
395
|
+
r.ctrlKey),r.preventDefault();else if(36==r.which)v.current.first(r.shiftKey,r.ctrlKey),r.preventDefault();else if(35==r.which)v.current.last(r.shiftKey,r.ctrlKey),r.preventDefault();else if(32==r.which)v.current.setCheckRadioValue(),r.preventDefault();else if(46==r.which||8==r.which)v.current.isEditable()&&v.current.setValue(v.current.getSelected(!1,!0),_$_496c[3]);else if(13==r.which)r.shiftKey?v.current.up():(1==v.current.options.allowManualInsertRow&&v.current.selectedCell[1]==(v.current.results?
|
|
396
|
+
v.current.results[v.current.results.length-1]:v.current.rows.length-1)&&v.current.insertRow(null,null,null,null,r),v.current.selectedCell&&v.current.down()),r.preventDefault();else if(9==r.which)r.shiftKey?v.current.left():(A=v.current.selectedCell[0],v.current.right(),1==v.current.options.allowInsertColumn&&1==v.current.options.allowManualInsertColumn&&v.current.selectedCell[0]==A&&(v.current.insertColumn(null,null,null,null,null,null,r),v.current.right())),r.preventDefault();else if((r.ctrlKey||
|
|
397
|
+
r.metaKey)&&!r.shiftKey)65==r.which?(v.current.selectAll(),r.preventDefault()):83==r.which?(v.current.download(),r.preventDefault()):89==r.which?(v.current.parent.redo(),r.preventDefault()):90==r.which?(v.current.parent.undo(),r.preventDefault()):67==r.which?(v.current.copy(),r.preventDefault()):88==r.which?(v.current.cut(),r.preventDefault()):86==r.which?r.target.classList.contains(_$_496c[238])||h.paste(r):189==r.which&&(1==v.current.options.allowDeleteRow&&d==_$_496c[431]?(v.current.deleteRow(),
|
|
398
|
+
r.preventDefault()):1==v.current.options.allowDeleteColumn&&d==_$_496c[430]&&(v.current.deleteColumn(),r.preventDefault()));else if(v.current.selectedCell&&v.current.isEditable()){A=v.current.selectedCell[1];var C=v.current.selectedCell[0];v.current.options.columns[C].type!=_$_496c[18]&&(32==r.keyCode?v.current.options.columns[C].type==_$_496c[270]||v.current.options.columns[C].type==_$_496c[272]?r.preventDefault():v.current.openEditor(v.current.records[A][C].element,!0,r):113==r.keyCode?v.current.openEditor(v.current.records[A][C].element,
|
|
399
|
+
!1,r):1!=r.key.length&&r.key!=_$_496c[571]||r.altKey||r.ctrlKey||v.current.records[A]&&v.current.openEditor(v.current.records[A][C].element,!0,r))}}};var u=function(r,z,A,C,M,J,T){if(document.activeElement.classList.contains(_$_496c[98])&&na.update.call(v.current,r,z,A,C,M,document.activeElement,T))return!1;if(v.current.edition)v.current.closeEditor(v.current.edition,!0);else if(d&&d!==J)return!1;v.current!==T&&(v.current.resetSelection(),v.current=T);na.current?na.range.call(v.current,r,z,A,C,M):
|
|
400
|
+
ka[_$_496c[11]].call(v.current,r,z,A,C,M)};h.mousedown=function(r){r=r||window.event;var z=r.buttons?r.buttons:r.button?r.button:r.which;if(v.current)if(1==ea.isVisible()&&(jSuites.findElement(r.target,_$_496c[405])||ea.close.call(v.current,!1)),v.current.edition){if(jSuites.findElement(r.target,_$_496c[105]))return!1}else if(jSuites.findElement(r.target,_$_496c[238]))return!1;var A=q(r);if(!1===A)return!1;k=A;if(1<z)if(A[3]==_$_496c[430]){if(v.current.isSelected(A[4],null))return!1}else if(A[3]==
|
|
401
|
+
_$_496c[431]){if(v.current.isSelected(null,A[4]))return!1}else if(A[3]==_$_496c[432]&&v.current.isSelected(A[4],A[5]))return!1;if(v.current){if(A[3]==_$_496c[142])v.current.isEditable()&&(ba.event=!0);else if(A[3]==_$_496c[563])ea.open.call(v.current,A[4]);else{if(1==A[2])if(1==v.current.options.columnDrag&&6>r.target.offsetHeight-r.offsetY)ta.start.call(v.current,r);else if(1==v.current.options.columnResize&&6>r.target.offsetWidth-r.offsetX)za.start.call(v.current,r);else{z=v.current.options.columns.length-
|
|
402
|
+
1;var C=v.current.options.data.length-1;if(A[3]==_$_496c[560])u(0,0,z,C,r,A[3],A[1].jexcel),b=c=0;else if(A[3]==_$_496c[428]){var M=wa.range.call(v.current,A[5])[A[4]];M[1]>z&&(M[1]=z);u(M[0],0,M[1],C,r,A[3],A[1].jexcel);c=M[0];b=0}else(r.shiftKey||r.ctrlKey)&&null!=c&&null!=b?u(c,0,A[4],C,r,A[3],A[1].jexcel):(A[3]==_$_496c[430]&&c==A[4]&&1==v.current.options.allowRenameColumn&&(g=setTimeout(function(){v.current.setHeader(A[4])},800)),u(A[4],0,A[4],C,r,A[3],A[1].jexcel),c=A[4],b=0)}if(2==A[2])if(A[3]==
|
|
403
|
+
_$_496c[431])1==v.current.options.rowDrag&&6>r.target.offsetWidth-r.offsetX?ta.start.call(v.current,r):1==v.current.options.rowResize&&6>r.target.offsetHeight-r.offsetY?za.start.call(v.current,r):(z=v.current.options.columns.length-1,C=parseInt(A[4]),(r.shiftKey||r.ctrlKey)&&null!=c&&null!=b?u(0,b,z,C,r,A[3],A[1].jexcel):(u(0,C,z,C,r,A[3],A[1].jexcel),c=0,b=C));else if(A[3]==_$_496c[432]){z=parseInt(A[4]);C=parseInt(A[5]);if(!v.current.edition&&(M=v.current.options.columns[A[4]].type,r.target.tagName==
|
|
404
|
+
_$_496c[572]&&(M==_$_496c[273]||M==_$_496c[274])&&r.target.parentNode.classList.contains(_$_496c[129]))){var J=r.target.innerText;M==_$_496c[273]&&(J=_$_496c[573]+J);window.open(J,_$_496c[574])}(r.shiftKey||r.ctrlKey)&&v.current.selectedCell?u(v.current.selectedCell[0],v.current.selectedCell[1],z,C,r,A[3],A[1].jexcel):(u(z,C,z,C,r,A[3],A[1].jexcel),c=z,b=C)}}d=A[3];typeof A[3]!==_$_496c[13]&&G.call(v.current.parent,_$_496c[575],v.current,A[3],A[4],A[5]);e=!0}else e=!1};h.mouseup=function(r){v.current&&
|
|
405
|
+
(ta.event?ta.end.call(v.current,r):za.event?za.end.call(v.current,r):ba.event?ba.end.call(v.current,r):r.target.classList.contains(_$_496c[404])?ea.close.call(v.current,!0):v.current.edition&&r.target.classList.contains(_$_496c[576])&&50>r.target.clientWidth-r.offsetX&&50>r.offsetY?ha.close.call(v.current,null,!0):r.target.classList.contains(_$_496c[339])&&(r=r.target.innerText==_$_496c[228]?0:r.target.innerText==_$_496c[229]?r.target.getAttribute(_$_496c[285])-1:r.target.innerText-1,Aa[_$_496c[11]].call(v.current,
|
|
406
|
+
parseInt(r))));g&&(clearTimeout(g),g=null);e=d=!1;na.current&&na.close.call(v.current)};h.mousemove=function(r){r=r||window.event;if(v.current){var z=r.target.getAttribute(_$_496c[44]),A=r.target.getAttribute(_$_496c[45]);if(1==e)ta.event?ta.update.call(v.current,r):za.event?za.update.call(v.current,r):Pa.event?Pa.update.call(v.current,r):v.current.options.tableOverflow&&(r=v.current.content,(r.w&&r.w!==r.offsetWidth||r.h&&r.h!==r.offsetHeight)&&v.current.setViewport(r.offsetWidth,r.offsetHeight),
|
|
407
|
+
r.w=r.offsetWidth,r.h=r.offsetHeight);else{var C=r.target.getBoundingClientRect();a&&(a.style.cursor=_$_496c[3],a=null);1==v.current.options.editable&&(z||A)&&(1==v.current.options.rowResize&&r.target&&z&&!A&&5>C.width-(r.clientX-C.left)?(a=r.target,a.style.cursor=_$_496c[577]):1==v.current.options.columnResize&&r.target&&!z&&A&&5>C.height-(r.clientY-C.top)?(a=r.target,a.style.cursor=_$_496c[578]):1==v.current.options.rowDrag&&r.target&&!z&&A&&5>C.width-(r.clientX-C.left)?(a=r.target,a.style.cursor=
|
|
408
|
+
_$_496c[579]):1==v.current.options.columnDrag&&r.target&&z&&!A&&5>C.height-(r.clientY-C.top)&&(a=r.target,a.style.cursor=_$_496c[579]))}}};h.mouseover=function(r){r=r||window.event;if(v.current&&1==e){var z=l(r);if(z[0]){if(!document.activeElement.classList.contains(_$_496c[98])&&z[1]&&v.current!=z[1].jexcel&&v.current)return!1;if(!ta.event&&!za.event)if(ba.event){var A=r.target.getAttribute(_$_496c[44]),C=r.target.getAttribute(_$_496c[45]);v.current.isSelected(A,C)||null===A||null===C||ba.call(v.current,
|
|
409
|
+
A,C)}else null!==c&&null!==b&&(1==z[2]&&(A=c,z[3]==_$_496c[430]&&(A=r.target.getAttribute(_$_496c[44])),C=v.current.options.data.length-1,u(c,0,A,C,r,z[3],z[1].jexcel)),2==z[2]&&(z[3]==_$_496c[431]?(A=v.current.options.columns.length-1,C=parseInt(r.target.getAttribute(_$_496c[45])),u(0,b,A,C,r,z[3],z[1].jexcel)):z[3]==_$_496c[432]&&(A=z[4],C=z[5],u(c,b,A,C,r,z[3],z[1].jexcel))))}}};h.dblclick=function(r){if(v.current)if(r.target.classList.contains(_$_496c[358]))ba.execute.call(v.current,!1);else{var z=
|
|
410
|
+
l(r);1==z[2]?1==v.current.options.columnSorting&&(r=r.target.getAttribute(_$_496c[44]))&&v.current.orderBy(r):2==z[2]&&v.current.isEditable()&&!v.current.edition&&z[6]&&v.current.openEditor(z[6],null,r)}};h.paste=function(r){if(!r.target.classList.contains(_$_496c[238])&&v.current&&v.current.selectedCell&&!v.current.edition){var z=r.clipboardData||window.clipboardData;z&&(v.current.paste(v.current.selectedCell[0],v.current.selectedCell[1],z.getData(_$_496c[59])),r&&r.preventDefault())}};h.contextmenu=
|
|
411
|
+
function(r){var z=q(r);!1!==z&&(z[1]||(z=k),v.current&&!v.current.edition&&(z=Array.prototype.slice.call(z,3),Ra.open.call(v.current,r,z)))};var x=null,w=null,y=null,B=null,D=null;h.touchstart=function(r){var z=l(r);z[0]?z[1]&&v.current!=z[1].jexcel&&(v.current&&v.current.resetSelection(),v.current=z[1].jexcel):v.current&&(v.current.resetSelection(),v.current=null);v.current&&!v.current.edition?z[3]==_$_496c[142]?v.current.isEditable()&&(ba.event=!0):r.target&&r.target.classList.contains(_$_496c[145])?
|
|
412
|
+
D=parseInt(r.target.getAttribute(_$_496c[146])):z[3]==_$_496c[432]?(B=z,x===r.target&&w?v.current.openEditor(r.target,!1,r):(w=setTimeout(function(){x=w=B=null},400),y=setTimeout(function(){h.contextmenu(r);y=null},800)),x=r.target):B=null:B=null};h.touchmove=function(r){if(v.current){var z=null,A=null,C=null,M=null;if(r.changedTouches&&r.changedTouches[0]){var J=r.changedTouches[0].clientX;var T=r.changedTouches[0].clientY}else J=r.clientX,T=r.clientY;if(T=document.elementFromPoint(J,T))if(J=T.getAttribute(_$_496c[44]),
|
|
413
|
+
T=T.getAttribute(_$_496c[45]),null!==J&&null!==T&&ba.event)v.current.isSelected(J,T)||(ba.call(v.current,J,T),p(r)),r.preventDefault();else if(null!==D){J=parseInt(J);T=parseInt(T);var N=v.current.selectedCell;0==D?J<=N[2]&&(z=J,C=N[2],A=N[1],M=N[3]):2==D?J>=N[0]&&(z=N[0],A=N[1],C=J,M=N[3]):1==D?T<=N[3]&&(z=N[0],A=T,C=N[2],M=N[3]):3==D&&T>=N[1]&&(z=N[0],A=N[1],C=N[2],M=T);null!==z&&v.current.updateSelectionFromCoords(z,A,C,M);r.preventDefault()}else B=null;y&&clearInterval(y)}};h.touchend=function(r){if(ba.event)ba.end.call(v.current,
|
|
414
|
+
r);else if(null!==D)D=null;else if(B){r=null;if(B[3]===_$_496c[432]){var z=B[4];var A=B[5];var C=z;r=A}else B[3]===_$_496c[431]?(z=0,A=B[4],C=v.current.options.columns.length-1,r=A):B[3]===_$_496c[430]&&(z=B[4],A=0,C=z,r=v.current.rows.length-1);null!=z&&v.current.updateSelectionFromCoords(z,A,C,r)}y&&clearInterval(y)};h.resize=function(){v.current&&1==v.current.parent.config.fullscreen&&I.call(v.current,!0)};return h}(),v=function(h,a,c){if(h)if(a||(a={}),a.cloud&&!c)typeof a.plugins.cloud==_$_496c[89]?
|
|
415
|
+
a.plugins.cloud.load(a,function(d){v(h,d,!0)}):console.error(_$_496c[581]);else{if(h.spreadsheet)b=h.spreadsheet,Da[_$_496c[11]].call(b,a);else var b=qa.spreadsheet(h,a);b.processing=!0;1==b.config.loadingSpin&&jSuites.loading.show();jSuites.ajax.oncomplete[b.name]=function(){for(var d=0;d<b.worksheets.length;d++)typeof b.worksheets[d].onload==_$_496c[89]&&(b.worksheets[d].onload(),b.worksheets[d].onload=null);b.processing=!1;if(Array.isArray(b.queue)&&0<b.queue.length)for(;d=b.queue.shift();)d[0].updateCell(d[1],
|
|
416
|
+
d[2],P.call(d[0],d[1],d[2]),!0);b.config.toolbar&&fa.show.call(b);for(d=0;d<b.worksheets.length;d++)Z.refresh.call(b.worksheets[d]);if(typeof b.config.onload==_$_496c[89])b.config.onload(b);la.state.call(b);for(d=0;d<b.worksheets.length;d++);jSuites.loading.hide()};Array.isArray(a.worksheets)&&(a=a.worksheets);if(Array.isArray(a)){for(c=0;c<a.length;c++)qa.worksheet(b,a[c]);a=b.worksheets}else a=qa.worksheet(b,a);jSuites.ajax.pending(b.name)||(jSuites.ajax.oncomplete[b.name](),jSuites.ajax.oncomplete[b.name]=
|
|
417
|
+
null);return a}else console.error(_$_496c[580])};v.license=null;v.setLicense=function(h){v.license=h};v.spreadsheet=[];v.picker=na;v.setDictionary=function(h){jSuites.setDictionary(h)};v.extensions={};v.setExtensions=function(h){for(var a=Object.keys(h),c=0;c<a.length;c++)typeof h[a[c]]===_$_496c[89]&&(v[a[c]]=h[a[c]],v.extensions[a[c]]=h[a[c]],v.license&&typeof v[a[c]].license==_$_496c[89]&&v[a[c]].license.call(v,v.license))};v.destroy=function(h,a){if(h.spreadsheet){a&&qa.unbind(h);a=v.spreadsheet.indexOf(h.spreadsheet);
|
|
418
|
+
v.spreadsheet.splice(a,1);for(a=0;a<h.spreadsheet.worksheets.length;a++)H(h.spreadsheet.worksheets[a].options.worksheetName,null);h.spreadsheet=null;h.jexcel=null;h.innerHTML=_$_496c[3];h.classList.remove(_$_496c[582]);h.classList.remove(_$_496c[368])}};v.version=L;v.helpers=F;v.events=Ba;typeof formula!==_$_496c[13]&&(v.formula=formula);v.editors=function(){var h={},a=function(c,b){return 1==c[b]||c.options&&1==c.options[b]?!0:c[b]==_$_496c[247]||c.options&&c.options[b]==_$_496c[247]?!0:!1};h.createEditor=
|
|
419
|
+
function(c,b,d,e){e.parent.input.setAttribute(_$_496c[106],!1);c==_$_496c[237]?(c=document.createElement(_$_496c[237]),c.type=_$_496c[59],c.value=d):c=document.createElement(_$_496c[20]);c.style.width=b.offsetWidth-2+_$_496c[47];c.style.height=b.offsetHeight-1+_$_496c[47];e.parent.input.appendChild(c);return c};h.createDialog=function(c,b,d,e,f,g){c=h.createEditor(_$_496c[20],c,b,f);c.classList.add(_$_496c[583]);c.classList.add(_$_496c[576]);800>window.innerWidth?(f.parent.input.style.top=_$_496c[149],
|
|
420
|
+
f.parent.input.style.left=_$_496c[149]):(b=f.parent.input.getBoundingClientRect(),window.innerHeight<b.bottom&&(f.parent.input.style.marginTop=-f.parent.input.offsetHeight));return c};h.general=function(){var c={},b=function(e){return(_$_496c[3]+e)[0]==_$_496c[12]?!0:!1},d=function(e){if(e.format||e.mask||e.locale){var f={};e.mask?f.mask=e.mask:e.format?f.mask=e.format:f.locale=e.locale;e.options&&(f.options=e.options);e.decimal&&(f.options||(f.options={}),f.options={decimal:e.decimal});return f}return null};
|
|
421
|
+
c.createCell=function(e,f,g,k,l,n){n.type!=_$_496c[14]&&n.type!=_$_496c[328]&&n.type!=_$_496c[327]||e.classList.add(_$_496c[584]);return c.updateCell(e,f,g,k,l,n)};c.updateCell=function(e,f,g,k,l,n){g=parseInt(g);k=parseInt(k);if(e){var q=d(n),p=null;f===_$_496c[3]||b(f)||typeof f===_$_496c[14]||(q?(q=jSuites.mask.extract(f,q,!0))&&q.value!==_$_496c[3]&&(p=q.value):1==(!1===l.parent.config.autoCasting||!1===n.autoCasting?!1:!0)&&(n.type==_$_496c[14]||n.type==_$_496c[328]||n.type==_$_496c[327]?(q=
|
|
422
|
+
jSuites.mask.extract(f,n,!0))&&q.value!==_$_496c[3]&&(p=q.value):jSuites.isNumeric(Number(f))&&(p=Number(f))));null!==p&&(f=p);f=c.parseValue(g,k,f,l,n,e);f instanceof Element||f instanceof HTMLDocument?(e.innerHTML=_$_496c[3],e.appendChild(f)):1==l.parent.config.stripHTML?e.innerText=f:e.innerHTML=f;if(null!==p)return p}};c.openEditor=function(e,f,g,k,l,n){var q=l.parent.input;q.onblur=function(){q.classList.contains(_$_496c[98])||l.closeEditor(e,!0)};if(n.type==_$_496c[14]||n.type==_$_496c[328]||
|
|
423
|
+
n.type==_$_496c[327])q.classList.add(_$_496c[568]),b(f)||n.inputmode||(n.inputmode=_$_496c[585]);g=null;b(f)||(n.inputmode&&q.setAttribute(_$_496c[102],n.inputmode),(g=d(n))?n.disabledMaskOnEdition||(n.mask?(k=n.mask.split(_$_496c[230]),q.setAttribute(_$_496c[100],k[0])):n.locale&&q.setAttribute(_$_496c[586],n.locale),g.input=q,q.mask=g,jSuites.mask.render(f,g,!1)):f&&n.type==_$_496c[327]&&(f*=100));if(!g||n.disabledMaskOnEdition)l.parent.config.stripHTML?q.innerText=f:q.innerHTML=f,jSuites.focus(q)};
|
|
424
|
+
c.closeEditor=function(e,f,g,k,l,n){e=l.parent.input;f=f&&e.innerText.trim().length?e.innerText:_$_496c[3];b(f)?f=f.replace(/(\r\n|\n|\r)/gm,_$_496c[3]):n.type==_$_496c[327]&&(f+=_$_496c[587],e.classList.remove(_$_496c[588]));return f};c.parseValue=function(e,f,g,k,l,n){1==k.parent.config.parseFormulas&&(k.resetArray(e,f),b(g)&&(g=k.executeFormula(g,e,f)));g instanceof Element||g instanceof HTMLDocument||!l||b(g)||!(f=d(l))||(e=jSuites.mask.render(g,f,!0),n&&f.mask&&(f=f.mask.split(_$_496c[230]),
|
|
425
|
+
f[1]&&(f[1].match(new RegExp(_$_496c[589],_$_496c[397]))&&(0>g?n.classList.add(_$_496c[590]):n.classList.remove(_$_496c[590])),f[1].match(new RegExp(_$_496c[591],_$_496c[397]))&&0>g&&(e=_$_496c[225]+e+_$_496c[250]))),e&&(g=e));return g};c[_$_496c[46]]=function(e,f){var g;return(g=d(e))?jSuites.mask.render(f,g,!0):e.type==_$_496c[327]?100*parseFloat(f):f};c.destroyCell=function(e){e.classList.remove(_$_496c[584])};return c}();h.text=h.general;h.number=h.general;h.numeric=h.general;h.percent=h.general;
|
|
426
|
+
h.notes=function(){var c={},b=null;c.updateCell=function(d,e,f,g,k,l){d&&(f=document.createElement(_$_496c[20]),f.classList.add(_$_496c[592]),1==k.parent.config.stripHTML?f.innerText=e:f.innerHTML=e,d.innerHTML=_$_496c[3],d.appendChild(f))};c.createCell=c.updateCell;c.openEditor=function(d,e,f,g,k,l){var n=l&&l.options?l.options:{};n.focus=!0;n.value=e;n.border=!1;n.height=_$_496c[593];n.toolbar=!1;b=h.createDialog(d,e,f,g,k,l);b=jSuites.editor(b,n)};c.closeEditor=function(d,e,f,g,k,l){return e?b.getData():
|
|
427
|
+
_$_496c[3]};return c}();h.dropdown=function(){var c={createCell:function(b,d,e,f,g,k){k.render==_$_496c[594]?b.classList.add(_$_496c[595]):b.classList.add(_$_496c[596]);if(b=c.updateCell(b,d,e,f,g,k))return b},destroyCell:function(b){b.classList.remove(_$_496c[596])},updateCell:function(b,d,e,f,g,k){if(b){var l=c.getItem(b,d,e,f,g,k);l?b.innerHTML=l:d?(d=c.fromLabel(b,d,e,f,g,k),d.length?(l=c.getItem(b,d,e,f,g,k),b.innerHTML=l):b.innerHTML=_$_496c[3]):b.innerHTML=_$_496c[3];return d}},openEditor:function(b,
|
|
428
|
+
d,e,f,g,k){var l=h.createEditor(_$_496c[20],b,d,g),n=k.delimiter||_$_496c[230];k=Object.create(k);k.options||(k.options={});typeof k.filter==_$_496c[89]&&(k.source=k.filter(g.el,b,e,f,k.source));typeof k.filterOptions==_$_496c[89]&&(k=k.filterOptions(g,b,e,f,d,k));e=k.options;k.source&&(e.data=JSON.parse(JSON.stringify(k.source)));a(k,_$_496c[597])&&(e.multiple=!0);a(k,_$_496c[60])&&(e.autocomplete=!0);e.format=!0;e.opened=!0;e.width=b.offsetWidth-2;e.onclose=function(){g.closeEditor(b,!0)};a(k,_$_496c[597])?
|
|
429
|
+
d&&(e.value=(_$_496c[3]+d).split(n)):e.value=d;jSuites.dropdown(l,e)},closeEditor:function(b,d,e,f,g,k){for(var l=g.parent.input.children[0],n=k.delimiter||_$_496c[230],q=l.dropdown.getText(!0),p=l.dropdown.getValue(!0),u=0;u<p.length;u++)!1===c.getItem(b,p[u],e,f,g,k)&&k.source.push({id:p[u],name:q[u]});l.dropdown.close(!0);if(d)return p.join(n)},fromLabel:function(b,d,e,f,g,k){b=k.delimiter||_$_496c[230];e=[];f=[];Array.isArray(d)||(d=(_$_496c[3]+d).split(b));for(g=0;g<d.length;g++)f[d[g].trim()]=
|
|
430
|
+
!0;d=Object.keys(f);!a(k,_$_496c[597])&&1<Object.keys(d).length&&(f=[],f[d[0]]=!0);for(d=0;d<k.source.length;d++)f[k.source[d].name]&&e.push(k.source[d].id);return e.join(b)},getItem:function(b,d,e,f,g,k){f=k.delimiter||_$_496c[230];b=[];e=[];Array.isArray(d)||(d=(_$_496c[3]+d).split(f));for(f=0;f<d.length;f++)e[d[f].trim()]=!0;f=Object.keys(e);!a(k,_$_496c[597])&&1<Object.keys(f).length&&(d=[],d[f[0]]=!0,e=d);if(k.source&&typeof k.source[0]!==_$_496c[88])for(d=0;d<k.source.length;d++)f=k.source[d],
|
|
431
|
+
k.source[d]={id:f,name:f};for(d=0;d<k.source.length;d++)typeof e[k.source[d].id]!==_$_496c[13]&&b.push(k.render==_$_496c[275]?k.source[d].color:k.render==_$_496c[598]?k.source[d].image:k.source[d].name);if(b.length){if(typeof k.render!==_$_496c[13]){for(d=0;d<b.length;d++)e=d,f=b[d],f=k.render==_$_496c[275]?_$_496c[599]+f+_$_496c[600]:k.render==_$_496c[598]?_$_496c[599]+f+_$_496c[600]:k.render==_$_496c[594]?_$_496c[602]+(k.source[d].color||_$_496c[601])+_$_496c[603]+f+_$_496c[604]:void 0,b[e]=f;return b.join(_$_496c[3])}for(d=
|
|
432
|
+
0;d<b.length;d++)b[d]=(_$_496c[3]+b[d]).replace(_$_496c[228],_$_496c[605]);return b.join(_$_496c[316])}return!1}};c[_$_496c[46]]=function(b,d){for(var e=0;e<b.source.length;e++)if(b.source[e].id==d)return b.render==_$_496c[275]?b.source[e].color:b.render==_$_496c[598]?b.source[e].image:b.source[e].name};return c}();h.autocomplete=h.dropdown;h.calendar=function(){var c={},b=null;c.updateCell=function(d,e,f,g,k,l){if(d){f=e;l=c.getFormat(l);0<e&&Number(e)==e&&(f=jSuites.calendar.numToDate(e));g=_$_496c[3]+
|
|
433
|
+
e;g.substr(4,1)==_$_496c[198]&&g.substr(7,1)==_$_496c[198]?g=!0:(g=g.split(_$_496c[198]),g=4==g[0].length&&g[0]==Number(g[0])&&2==g[1].length&&g[1]==Number(g[1])?!0:!1);g||(g=jSuites.calendar.extractDateFromString(e,l))&&(f=g);if(f=jSuites.calendar.getDateString(f,l))return d.innerText=f,e;d.innerText=_$_496c[3];return _$_496c[3]}};c.createCell=c.updateCell;c.openEditor=function(d,e,f,g,k,l){l=Object.create(l);typeof l.filterOptions==_$_496c[89]&&(l=l.filterOptions(k,d,f,g,e,l));f=l.options||{};f.opened=
|
|
434
|
+
!0;f.onclose=function(n,q){k.closeEditor(d,!0)};typeof l.timepicker!==_$_496c[13]&&(f.time=a(l,_$_496c[606])?!0:!1);typeof f.readonly!==_$_496c[13]&&(f.readonly=f.readonly);f.value=e||null;f.placeholder=f.format;b=h.createEditor(_$_496c[237],d,e,k);jSuites.calendar(b,f);!1===b.calendar.options.readonly&&b.focus()};c.closeEditor=function(d,e,f,g,k){d=b.calendar.close(!0,b.value?!0:!1);d=b.value?d:_$_496c[3];if(e)return d};c.getFormat=function(d){return d&&d.format?d.format:d&&d.options&&d.options.format?
|
|
435
|
+
d.options.format:_$_496c[607]};c[_$_496c[46]]=function(d,e){d=c.getFormat(d);return jSuites.calendar.getDateString(e,d)};return c}();h.color=function(){var c={},b=null;c.updateCell=function(d,e,f,g,k,l){d&&(l.render==_$_496c[608]?(f=document.createElement(_$_496c[20]),f.className=_$_496c[275],f.style.backgroundColor=e,d.innerText=_$_496c[3],d.appendChild(f)):(d.style.color=e,d.innerText=e))};c.createCell=c.updateCell;c.openEditor=function(d,e,f,g,k,l){l=Object.create(l);typeof l.filterOptions==_$_496c[89]&&
|
|
436
|
+
(l=l.filterOptions(k,d,f,g,e,l));l.value=e;l.onclose=function(n,q){k.closeEditor(d,!0)};b=h.createEditor(_$_496c[237],d,e,k);b=jSuites.color(b,l);b.open()};c.closeEditor=function(d,e,f,g,k,l){d=b.close(!0);if(e)return d};c[_$_496c[46]]=function(d,e){d=document.createElement(_$_496c[20]);d.style.width=_$_496c[609];d.style.height=_$_496c[22];d.style.backgroundColor=e;return d.outerHTML};return c}();h.checkbox=function(){var c={createCell:function(b,d,e,f,g,k){d=d&&d!=_$_496c[610]&&d!=_$_496c[611]?!0:
|
|
437
|
+
!1;e=document.createElement(_$_496c[237]);e.type=_$_496c[270];e.checked=d;e.onclick=function(){g.setValue(b,this.checked)};(k&&1==k.readOnly||!g.isEditable())&&e.setAttribute(_$_496c[612],_$_496c[612]);b.innerHTML=_$_496c[3];b.appendChild(e);return d},updateCell:function(b,d){d=d&&d!=_$_496c[610]&&d!=_$_496c[611]?!0:!1;b&&(b.children[0].checked=d);return d},openEditor:function(b,d,e,f,g){d=b.children[0].checked?!1:!0;g.setValue(b,d);return!1},closeEditor:function(b,d){return!1}};c[_$_496c[46]]=function(b,
|
|
438
|
+
d){return 1==d||1==d||d==_$_496c[247]?jSuites.translate(_$_496c[247]):jSuites.translate(_$_496c[610])};return c}();h.radio=function(){var c={createCell:function(b,d,e,f,g,k){b.getAttribute(_$_496c[44]);e=document.createElement(_$_496c[237]);e.type=_$_496c[272];e.checked=1==d||1==d||d==_$_496c[247]?!0:!1;e.onclick=function(){g.setValue(b,!0)};(k&&1==k.readOnly||!g.isEditable())&&e.setAttribute(_$_496c[612],_$_496c[612]);b.innerHTML=_$_496c[3];b.appendChild(e)},updateCell:function(b,d,e,f,g){d=1==d||
|
|
439
|
+
1==d||d==_$_496c[247]||d==_$_496c[613]?!0:!1;b&&(b.children[0].checked=d);if(1==d){b=[];for(var k=0;k<g.options.data.length;k++)f!=k&&g.options.data[k][e]&&b.push({x:e,y:k,value:0});b.length&&g.setValue(b)}return d},openEditor:function(b,d,e,f,g){return!1},closeEditor:function(b,d){return!1}};c[_$_496c[46]]=function(b,d){return 1==d||1==d||d==_$_496c[247]?_$_496c[247]:_$_496c[610]};return c}();h.autonumber=function(){var c={},b=null;c.createCell=function(d,e,f,g,k,l){(e=parseInt(e))||0<parseInt(d.innerText)&&
|
|
440
|
+
(e=parseInt(d.innerText));l.sequence||(l.sequence=0);e?c.isValid(e,f,g,k)||(e=_$_496c[262]):e=l.sequence+1;e>l.sequence&&(l.sequence=e);return d.innerText=e};c.updateCell=c.createCell;c.openEditor=function(d,e,f,g,k,l){b=h.createEditor(_$_496c[237],d,e,k);b.onblur=function(){k.closeEditor(d,!0)};b.focus();b.value=e};c.closeEditor=function(d,e,f,g,k){return e?b.value:_$_496c[3]};c.isValid=function(d,e,f,g){for(var k,l=0;l<g.options.data.length;l++)if(k=g.value(e,l),k==d&&l!=f)return!1;return!0};return c}();
|
|
441
|
+
h.progressbar=function(){var c={},b=null;c.createCell=function(d,e){e=parseInt(e);if(100<e)e=100;else if(!e||0>e)e=0;if(d.children[0]&&d.children[0].tagName==_$_496c[566])var f=d.children[0];else f=document.createElement(_$_496c[20]),f.classList.add(_$_496c[276]),d.innerText=_$_496c[3],d.classList.add(_$_496c[614]),d.appendChild(f);f.style.width=parseInt(e)+_$_496c[587];f.setAttribute(_$_496c[285],parseInt(e)+_$_496c[587])};c.destroyCell=function(d){d.classList.remove(_$_496c[614])};c.updateCell=
|
|
442
|
+
c.createCell;c.openEditor=function(d,e,f,g,k,l){b=h.createEditor(_$_496c[237],d,e,k);b.type=_$_496c[14];b.setAttribute(_$_496c[615],0);b.setAttribute(_$_496c[616],100);b.onblur=function(){k.closeEditor(d,!0)};b.focus();b.value=e};c.closeEditor=function(d,e,f,g,k){return e?b.value:_$_496c[3]};return c}();h.rating=function(){var c={},b=null;c.createCell=function(d,e,f,g,k,l){return c.setCell(d,e,l)};c.destroyCell=function(d){d.classList.remove(_$_496c[617])};c.updateCell=c.createCell;c.openEditor=function(d,
|
|
443
|
+
e,f,g,k,l){b=h.createEditor(_$_496c[237],d,e,k);b.type=_$_496c[14];b.setAttribute(_$_496c[615],0);b.setAttribute(_$_496c[616],5);b.onblur=function(){k.closeEditor(d,!0)};b.focus();b.value=e};c.closeEditor=function(d,e,f,g,k,l){return e?b.value:_$_496c[3]};c.setCell=function(d,e,f){e=parseInt(e);if(5<e)e=5;else if(!e||0>e)e=0;if(d){f=f&&f.color?f.color:_$_496c[590];var g=document.createElement(_$_496c[20]);g.setAttribute(_$_496c[285],parseInt(e)+_$_496c[618]);g.classList.add(_$_496c[277]);for(var k=
|
|
444
|
+
0;k<e;k++){var l=document.createElement(_$_496c[463]);l.className=_$_496c[517];l.style.color=f;l.innerHTML=_$_496c[619];g.appendChild(l)}d.innerHTML=_$_496c[3];d.className=_$_496c[617];d.appendChild(g)}return e};return c}();h.email=function(){var c={createCell:function(b,d,e,f,g,k){b&&(b.children&&b.children[0]&&b.children[0].tagName==_$_496c[572]?e=b.children[0]:(e=document.createElement(_$_496c[214]),b.innerText=_$_496c[3],b.appendChild(e),k.options&&k.options.url&&e.setAttribute(_$_496c[620],k.options.url)),
|
|
445
|
+
e.innerText=d)}};c.updateCell=c.createCell;c.openEditor=function(b,d,e,f,g,k){g.parent.input.classList.add(_$_496c[568]);g.parent.input.onblur=function(){g.closeEditor(b,!0)};g.parent.input.innerText=d;jSuites.focus(g.parent.input)};c.closeEditor=function(b,d,e,f,g){g.parent.input.classList.remove(_$_496c[568]);return d?g.parent.input.innerText.replace(new RegExp(/\n/,_$_496c[201]),_$_496c[3]):_$_496c[3]};return c}();h.url=h.email;h.image=function(){var c={},b=null;c.createCell=function(d,e,f,g,k,
|
|
446
|
+
l){if(d)if(e)if(d.children&&d.children[0]&&d.children[0].tagName==_$_496c[621])d.children[0].src=e;else{var n=document.createElement(_$_496c[37]);l.render==_$_496c[622]&&n.classList.add(_$_496c[622]);l.options&&(n.style.maxWidth=_$_496c[623],l.options.absolute&&(d.classList.add(_$_496c[624]),n.setAttribute(_$_496c[625],-1),n.classList.add(_$_496c[238]),n.classList.add(_$_496c[626]),n.settings=function(){k.openEditor(d,e,f,g,k,l)},n.dblclick=function(){k.openEditor(d,!0)},n[_$_496c[627]]=function(){k.setValueFromCoords(f,
|
|
447
|
+
g,_$_496c[3])}),l.options.width&&(n.style.width=parseInt(l.options.width)+_$_496c[47]),l.options.height&&(n.style.height=parseInt(l.options.height)+_$_496c[47]));n.src=e;d.innerHTML=_$_496c[3];d.appendChild(n)}else d.innerHTML=_$_496c[3]};c.updateCell=c.createCell;c.openEditor=function(d,e,f,g,k,l){(l&&l.options?l.options:{}).value=e;b=h.createDialog(d,e,f,g,k,l);e&&(d=document.createElement(_$_496c[37]),d.src=e,d.classList.add(_$_496c[628]),d.style.width=_$_496c[623],b.appendChild(d));jSuites.image(b,
|
|
448
|
+
l)};c.closeEditor=function(d,e,f,g,k,l){if(e&&(d=b.children[0]))return d.tagName==_$_496c[621]?d.src:_$_496c[3]};c[_$_496c[46]]=function(d,e){return _$_496c[629]+e+_$_496c[630]};return c}();h.html=function(){var c={},b=null;c.createCell=function(d,e){d.classList.add(_$_496c[631]);var f=document.createElement(_$_496c[20]);f.innerHTML=e;d.appendChild(f)};c.updateCell=function(d,e){d&&(d.firstChild.innerHTML=e)};c.destroyCell=function(d){d.classList.remove(_$_496c[631])};c.openEditor=function(d,e,f,
|
|
449
|
+
g,k,l){var n=l&&l.options?l.options:{};n.focus=!0;n.value=e;n.border=!1;n.height=_$_496c[593];e=h.createDialog(d,e,f,g,k,l);b=jSuites.editor(e,n);b.close=function(){k.closeEditor(d,!0)};jSuites.tracking(b,!0)};c.closeEditor=function(d,e,f,g,k,l){jSuites.tracking(b,!1);d=b.getData();if(e)return d};return c}();h.hidden=function(){return{createCell:function(c,b,d,e,f){c.classList.contains(_$_496c[53]);c.innerText=b},updateCell:function(c,b,d,e,f){c&&(c.innerText=b)},openEditor:function(c,b,d,e,f){return!1},
|
|
450
|
+
closeEditor:function(c,b){return!1}}}();h.tags=function(){var c={},b=null;c.createCell=function(d,e){d.classList.add(_$_496c[632]);c.updateCell(d,e)};c.updateCell=function(d,e){d&&(d.innerHTML=e)};c.destroyCell=function(d){d.classList.remove(_$_496c[632])};c.openEditor=function(d,e,f,g,k,l){var n=l&&l.options?l.options:{};n.value=e;b=h.createDialog(d,e,f,g,k,l);d=document.createElement(_$_496c[20]);d.style.margin=_$_496c[22];d.style.marginRight=_$_496c[633];b.appendChild(d);b=jSuites.tags(d,n);d.focus();
|
|
451
|
+
jSuites.focus(d)};c.closeEditor=function(d,e,f,g,k,l){d=b.getValue();if(e)return d};return c}();h.record=function(){var c={},b=null;c.createCell=function(d,e,f,g,k,l){d.classList.add(_$_496c[596]);var n;(n=k.parent.getWorksheetInstance(l.worksheetId))?n.rows?c.updateCell(d,e,f,g,k,l):(d.innerText=_$_496c[262],k.parent.queue.push([k,f,g])):(d.innerText=_$_496c[262],k.parent.queue.push([k,f,g]))};c.destroyCell=function(d){d.classList.remove(_$_496c[596])};c.updateCell=function(d,e,f,g,k,l){d&&(typeof l.worksheetId==
|
|
452
|
+
_$_496c[13]?d.innerText=_$_496c[262]:d.innerHTML=c.getValue(d,e,f,g,k,l))};c.openEditor=function(d,e,f,g,k,l){var n=l.delimiter||_$_496c[230];l=Object.create(l);l.options||(l.options={});typeof l.filter==_$_496c[89]&&(l.source=l.filter(k.el,d,f,g,l.source));typeof l.filterOptions==_$_496c[89]&&(l=l.filterOptions(k,d,f,g,e,l));f=l.options;f.data=c.getSource(k,l);a(l,_$_496c[597])&&(f.multiple=!0);a(l,_$_496c[60])&&(f.autocomplete=!0);f.opened=!0;f.width=d.offsetWidth-2;f.onclose=function(){k.closeEditor(d,
|
|
453
|
+
!0)};a(l,_$_496c[597])?e&&(f.value=(_$_496c[3]+e).split(n)):f.value=e;b=h.createEditor(_$_496c[20],d,e,k);b=jSuites.dropdown(b,f)};c.closeEditor=function(d,e,f,g,k,l){d=l.delimiter||_$_496c[230];f=b.getValue(!0);b.close(!0);if(e)return f.join(d)};c.getValue=function(d,e,f,g,k,l){d=[];if(typeof l.worksheetId==_$_496c[17]&&(k=k.parent.getWorksheetInstance(l.worksheetId))){f=l.worksheetColumn?l.worksheetColumn:0;0<=l.worksheetImage&&(f=l.worksheetImage);if(e==_$_496c[3]||0==e||null==e||void 0==e)return _$_496c[3];
|
|
454
|
+
e=(_$_496c[3]+e).split(_$_496c[230]);for(g=0;g<e.length;g++){var n=e[g].trim();var q=k.name(f);n=k.getRowById(n);q=!1===n?_$_496c[634]:n[q];0<=l.worksheetImage&&(q=_$_496c[635]+q+_$_496c[636]);d.push(q)}return 0<=l.worksheetImage?d.join(_$_496c[3]):d.join(_$_496c[316])}return _$_496c[262]};c.getSource=function(d,e){var f=e.worksheetColumn?e.worksheetColumn:0,g=null;typeof e.worksheetId==_$_496c[17]&&(g=d.parent.getWorksheetInstance(e.worksheetId));if(g){var k,l=[];for(d=0;d<g.rows.length;d++)if(k=
|
|
455
|
+
g.value(f,d))k={id:g.getRowId(d),name:k},void 0!=e.worksheetImage&&(k.image=g.value(e.worksheetImage,d)),l.push(k)}else console.error(_$_496c[637]+e.worksheetId);return l};c[_$_496c[46]]=function(d,e){for(var f=0;f<d.source.length;f++)if(d.source[f].id==e)return d.render==_$_496c[275]?d.source[f].color:d.render==_$_496c[598]?d.source[f].image:d.source[f].name};return c}();return h}();typeof jQuery!==_$_496c[13]&&function(h){h.fn.jspreadsheet=h.fn.jexcel=function(a){var c=h(this)[_$_496c[46]](0);if(c.jspreadsheet){if(typeof arguments[0]==
|
|
456
|
+
_$_496c[14])var b=arguments[0],d=2;else b=0,d=1;return c.jspreadsheet[b][a].apply(c.jspreadsheet[b],Array.prototype.slice.call(arguments,d))}return v(h(this)[_$_496c[46]](0),arguments[0])}}(jQuery);return v});
|