intrasheets 6.0.2 → 6.0.4

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.mjs CHANGED
@@ -64,42 +64,42 @@ const Ua = {
64
64
  return c.criteria && (y.criteria = c.criteria), h && (y.value = h), c.format && (y.format = c.format), c.className && (y.className = c.className), typeof c.allowBlank < "u" && (y.allowBlank = c.allowBlank), y;
65
65
  }, s = function() {
66
66
  return (e || (typeof jspreadsheet < "u" ? jspreadsheet : null)).helpers;
67
- }, m = function(c, h) {
67
+ }, u = function(c, h) {
68
68
  if (h[0] > c[2] || h[2] < c[0] || h[1] > c[3] || h[3] < c[1])
69
69
  return [c];
70
70
  let y = [];
71
71
  h[1] > c[1] && y.push([c[0], c[1], c[2], h[1] - 1]), h[3] < c[3] && y.push([c[0], h[3] + 1, c[2], c[3]]);
72
- let T = Math.max(c[1], h[1]), u = Math.min(c[3], h[3]);
73
- return h[0] > c[0] && y.push([c[0], T, h[0] - 1, u]), h[2] < c[2] && y.push([h[2] + 1, T, c[2], u]), y;
72
+ let T = Math.max(c[1], h[1]), m = Math.min(c[3], h[3]);
73
+ return h[0] > c[0] && y.push([c[0], T, h[0] - 1, m]), h[2] < c[2] && y.push([h[2] + 1, T, c[2], m]), y;
74
74
  }, b = function() {
75
75
  let c = e || (typeof jspreadsheet < "u" ? jspreadsheet : null), h = c && c.version && c.version();
76
76
  return !!(h && parseInt(h.version) >= 13);
77
77
  }, d = function(c) {
78
78
  let h = [], y = "", T = !1;
79
- const u = function() {
79
+ const m = function() {
80
80
  let D = y.trim();
81
81
  D && h.push(D), y = "";
82
82
  };
83
83
  for (let D = 0; D < c.length; D++) {
84
- let B = c[D];
85
- B === "'" && (T = !T), !T && B === "," ? u() : y += B;
84
+ let V = c[D];
85
+ V === "'" && (T = !T), !T && V === "," ? m() : y += V;
86
86
  }
87
- return u(), h;
87
+ return m(), h;
88
88
  }, i = function(c, h) {
89
89
  if (typeof h != "string" || !h)
90
90
  return null;
91
91
  let y = d(h);
92
92
  if (!y.length)
93
93
  return null;
94
- let T = "", u = y[0].indexOf("!");
95
- if (u !== -1 && (T = y[0].substring(0, u + 1), c.getWorksheetInstanceByName(y[0].substring(0, u).replace(/'/g, "")) !== c))
94
+ let T = "", m = y[0].indexOf("!");
95
+ if (m !== -1 && (T = y[0].substring(0, m + 1), c.getWorksheetInstanceByName(y[0].substring(0, m).replace(/'/g, "")) !== c))
96
96
  return null;
97
97
  let D = [];
98
- for (let B = 0; B < y.length; B++) {
99
- let H = c.getCoordsFromRange(y[B]);
100
- if (isNaN(H[0]) || isNaN(H[1]) || isNaN(H[2]) || isNaN(H[3]))
98
+ for (let V = 0; V < y.length; V++) {
99
+ let P = c.getCoordsFromRange(y[V]);
100
+ if (isNaN(P[0]) || isNaN(P[1]) || isNaN(P[2]) || isNaN(P[3]))
101
101
  return null;
102
- D.push([Math.min(H[0], H[2]), Math.min(H[1], H[3]), Math.max(H[0], H[2]), Math.max(H[1], H[3])]);
102
+ D.push([Math.min(P[0], P[2]), Math.min(P[1], P[3]), Math.max(P[0], P[2]), Math.max(P[1], P[3])]);
103
103
  }
104
104
  return {
105
105
  prefix: T,
@@ -115,68 +115,68 @@ const Ua = {
115
115
  return h.getRules = function() {
116
116
  let y = [], T = c.config.validations;
117
117
  if (T)
118
- for (let u = 0; u < T.length; u++) {
119
- let D = T[u];
120
- D && Object.keys(D).length && (D.action === "format" || D.action === "dataBar" || D.action === "colorScale") && y.push({ index: u, rule: D });
118
+ for (let m = 0; m < T.length; m++) {
119
+ let D = T[m];
120
+ D && Object.keys(D).length && (D.action === "format" || D.action === "dataBar" || D.action === "colorScale") && y.push({ index: m, rule: D });
121
121
  }
122
122
  return y;
123
123
  }, h.setRule = function(y, T) {
124
- let u = T.index;
125
- if (typeof u > "u" && (T.action === "dataBar" || T.action === "colorScale")) {
126
- let B = h.getRules().find((H) => H.rule.action === T.action && String(H.rule.range).toUpperCase() === String(T.range).toUpperCase());
127
- B && (u = B.index);
124
+ let m = T.index;
125
+ if (typeof m > "u" && (T.action === "dataBar" || T.action === "colorScale")) {
126
+ let V = h.getRules().find((P) => P.rule.action === T.action && String(P.rule.range).toUpperCase() === String(T.range).toUpperCase());
127
+ V && (m = V.index);
128
128
  }
129
129
  let D = { value: l(T) };
130
- return typeof u < "u" && (D.index = u), y.setValidations([D]);
130
+ return typeof m < "u" && (D.index = m), y.setValidations([D]);
131
131
  }, h.removeRule = function(y, T) {
132
132
  return y.resetValidations([T]);
133
133
  }, h.clearRules = function(y) {
134
- let T = h.getRules().map((u) => u.index);
134
+ let T = h.getRules().map((m) => m.index);
135
135
  if (T.length)
136
136
  return y.resetValidations(T);
137
137
  }, h.clearRange = function(y, T) {
138
138
  if (!Array.isArray(T) || !T.length)
139
139
  return !1;
140
- let u = [];
140
+ let m = [];
141
141
  return h.getRules().forEach(function(D) {
142
- let B = D.rule, H = i(y, B.range);
143
- if (!H)
142
+ let V = D.rule, P = i(y, V.range);
143
+ if (!P)
144
144
  return;
145
- let I = H.rects.slice();
146
- if (T.forEach(function(j) {
147
- let G = [];
148
- I.forEach(function(M) {
149
- G.push.apply(G, m(M, j));
150
- }), I = G;
151
- }), I.length === H.rects.length && I.every(function(j, G) {
152
- return j === H.rects[G];
145
+ let S = P.rects.slice();
146
+ if (T.forEach(function(G) {
147
+ let j = [];
148
+ S.forEach(function(M) {
149
+ j.push.apply(j, u(M, G));
150
+ }), S = j;
151
+ }), S.length === P.rects.length && S.every(function(G, j) {
152
+ return G === P.rects[j];
153
153
  }))
154
154
  return;
155
- if (!I.length) {
156
- u.push({ index: D.index, value: null });
155
+ if (!S.length) {
156
+ m.push({ index: D.index, value: null });
157
157
  return;
158
158
  }
159
- let P = B.type === "formula" && Array.isArray(B.value) && typeof B.value[0] == "string";
159
+ let B = V.type === "formula" && Array.isArray(V.value) && typeof V.value[0] == "string";
160
160
  if (b()) {
161
- let j = JSON.parse(JSON.stringify(B));
162
- if (j.range = I.map(function(G) {
163
- return H.prefix + y.getRange(G, !1);
164
- }).join(","), P) {
165
- let G = g(H.rects), M = g(I), K = M[0] - G[0], W = M[1] - G[1];
166
- (K || W) && (j.value[0] = s().shiftFormula(j.value[0], K, W));
161
+ let G = JSON.parse(JSON.stringify(V));
162
+ if (G.range = S.map(function(j) {
163
+ return P.prefix + y.getRange(j, !1);
164
+ }).join(","), B) {
165
+ let j = g(P.rects), M = g(S), K = M[0] - j[0], W = M[1] - j[1];
166
+ (K || W) && (G.value[0] = s().shiftFormula(G.value[0], K, W));
167
167
  }
168
- u.push({ index: D.index, value: j });
168
+ m.push({ index: D.index, value: G });
169
169
  return;
170
170
  }
171
- I.forEach(function(j, G) {
172
- let M = JSON.parse(JSON.stringify(B));
173
- if (M.range = H.prefix + y.getRange(j, !1), P) {
174
- let K = j[0] - H.rects[0][0], W = j[1] - H.rects[0][1];
171
+ S.forEach(function(G, j) {
172
+ let M = JSON.parse(JSON.stringify(V));
173
+ if (M.range = P.prefix + y.getRange(G, !1), B) {
174
+ let K = G[0] - P.rects[0][0], W = G[1] - P.rects[0][1];
175
175
  (K || W) && (M.value[0] = s().shiftFormula(M.value[0], K, W));
176
176
  }
177
- u.push(G === 0 ? { index: D.index, value: M } : { value: M });
177
+ m.push(j === 0 ? { index: D.index, value: M } : { value: M });
178
178
  });
179
- }), u.length ? (y.setValidations(u), !0) : !1;
179
+ }), m.length ? (y.setValidations(m), !0) : !1;
180
180
  }, h.presets = t, h.criteria = n, h.dataBars = r, h.colorScales = a, h;
181
181
  }, f = function() {
182
182
  return !0;
@@ -204,20 +204,20 @@ if (!Ga && typeof it == "function")
204
204
  let s = "";
205
205
  return this.status === 8 ? (!this.scope || this.scope.indexOf("importer") === -1) && (s = "Importer is not included on the scope of this license") : s = "License required", s;
206
206
  }, r = function(s) {
207
- const m = {};
208
- m.options = {}, m.toolbar = function(i) {
209
- return m.options.icon || (m.options.icon = "file_download"), i.items.push({
210
- content: m.options.icon,
207
+ const u = {};
208
+ u.options = {}, u.toolbar = function(i) {
209
+ return u.options.icon || (u.options.icon = "file_download"), i.items.push({
210
+ content: u.options.icon,
211
211
  onclick: function(g, p, f) {
212
- m.open(e.current);
212
+ u.open(e.current);
213
213
  },
214
214
  tooltip: t("Import CSV"),
215
215
  updateState: function(g, p, f, c) {
216
216
  c.isEditable() ? f.classList.remove("jtoolbar-disabled") : f.classList.add("jtoolbar-disabled");
217
217
  }
218
218
  }), i;
219
- }, m.init = function(i) {
220
- i.options.pluginOptions && i.options.pluginOptions.importer && (m.options = i.options.pluginOptions.importer);
219
+ }, u.init = function(i) {
220
+ i.options.pluginOptions && i.options.pluginOptions.importer && (u.options = i.options.pluginOptions.importer);
221
221
  };
222
222
  const b = function() {
223
223
  const i = this;
@@ -250,9 +250,9 @@ if (!Ga && typeof it == "function")
250
250
  h.innerText = p[f] || "", c.appendChild(h), h = document.createElement("td");
251
251
  let y = document.createElement("select"), T = document.createElement("option");
252
252
  T.innerText = t("(Do not import)"), T.value = "", y.appendChild(T);
253
- for (let u = 0; u < i.worksheet.options.columns.length; u++) {
254
- let D = i.worksheet.options.columns[u].title || "";
255
- D.trim() || (D = i.worksheet.helpers.getColumnName(u)), T = document.createElement("option"), T.value = u, T.innerText = D, y.appendChild(T), T.innerText.match(new RegExp(p[f], "gi")) && T.setAttribute("selected", "selected");
253
+ for (let m = 0; m < i.worksheet.options.columns.length; m++) {
254
+ let D = i.worksheet.options.columns[m].title || "";
255
+ D.trim() || (D = i.worksheet.helpers.getColumnName(m)), T = document.createElement("option"), T.value = m, T.innerText = D, y.appendChild(T), T.innerText.match(new RegExp(p[f], "gi")) && T.setAttribute("selected", "selected");
256
256
  }
257
257
  h.appendChild(y), c.appendChild(h), i.tbody.appendChild(c);
258
258
  }
@@ -270,7 +270,7 @@ if (!Ga && typeof it == "function")
270
270
  }
271
271
  this.value = null;
272
272
  };
273
- }, m.open = function(p) {
273
+ }, u.open = function(p) {
274
274
  i.modal.open(), p || (p = s.worksheets[s.getWorksheetActive()]), i.worksheet = p;
275
275
  }, `<lm-modal icon="file_download" title="${t("Advanced CSV")}" width="480" height="480" overflow="true" closed="true" closable="true" draggable="true" :ref="self.modal">
276
276
  <div class="lm-p20">
@@ -288,16 +288,16 @@ if (!Ga && typeof it == "function")
288
288
  </div>
289
289
  </lm-modal>`;
290
290
  }, d = document.createElement("div");
291
- return s.tools.appendChild(d), zn.render(b, d), m;
291
+ return s.tools.appendChild(d), zn.render(b, d), u;
292
292
  };
293
293
  let a = {};
294
- const l = function(s, m = {}) {
294
+ const l = function(s, u = {}) {
295
295
  var b;
296
- return a = m, e && !s && (s = e.current), s && (b = s.parent) != null && b.plugins.importer && s.parent.plugins.importer.open(s), !0;
296
+ return a = u, e && !s && (s = e.current), s && (b = s.parent) != null && b.plugins.importer && s.parent.plugins.importer.open(s), !0;
297
297
  };
298
298
  return l.oninit = function(s) {
299
- let m = n.call(s);
300
- m ? console.error(m) : s.setPlugins({
299
+ let u = n.call(s);
300
+ u ? console.error(u) : s.setPlugins({
301
301
  importer: r
302
302
  });
303
303
  }, l.license = function(s) {
@@ -337,7 +337,7 @@ if (!Ye && typeof it == "function")
337
337
  bubbles: !0,
338
338
  cancelable: !0
339
339
  }));
340
- }, m = function(p, f) {
340
+ }, u = function(p, f) {
341
341
  f.removeAttribute("readonly"), f.setAttribute("aria-label", "Name box"), f.setAttribute("title", "Name box: type a reference to go to it, or a name to define the selection"), f.addEventListener("keydown", function(c) {
342
342
  if (c.key === "Escape") {
343
343
  f.blur();
@@ -351,9 +351,9 @@ if (!Ye && typeof it == "function")
351
351
  if (t(y) || y.indexOf("!") !== -1)
352
352
  r(h, y);
353
353
  else {
354
- let T = p.config.definedNames || {}, u = Object.keys(T).find((D) => D.toUpperCase() === y);
355
- if (u) {
356
- let D = typeof T[u] == "string" ? T[u] : T[u].value;
354
+ let T = p.config.definedNames || {}, m = Object.keys(T).find((D) => D.toUpperCase() === y);
355
+ if (m) {
356
+ let D = typeof T[m] == "string" ? T[m] : T[m].value;
357
357
  r(h, D);
358
358
  } else if (n(y)) {
359
359
  let D = h.getRange();
@@ -367,30 +367,30 @@ if (!Ye && typeof it == "function")
367
367
  let h = a("div", "xl-namebox-menu");
368
368
  h.hidden = !0, c.appendChild(h);
369
369
  const y = function() {
370
- h.hidden = !0, document.removeEventListener("mousedown", T, !0), document.removeEventListener("keydown", u, !0);
371
- }, T = function(B) {
372
- h.contains(B.target) || y();
373
- }, u = function(B) {
374
- B.key === "Escape" && y();
370
+ h.hidden = !0, document.removeEventListener("mousedown", T, !0), document.removeEventListener("keydown", m, !0);
371
+ }, T = function(V) {
372
+ h.contains(V.target) || y();
373
+ }, m = function(V) {
374
+ V.key === "Escape" && y();
375
375
  }, D = function() {
376
- let B = p.config.definedNames || {}, H = Object.keys(B).sort();
377
- if (h.innerHTML = "", !H.length) {
378
- let I = a("div", "xl-namebox-item xl-disabled", "No defined names");
379
- h.appendChild(I);
380
- }
381
- H.forEach((I) => {
382
- let P = typeof B[I] == "string" ? B[I] : B[I] && B[I].value || "", j = a("div", "xl-namebox-item");
383
- j.appendChild(a("b", "", I)), j.appendChild(a("span", "xl-namebox-range", P)), j.addEventListener("mousedown", function(G) {
384
- G.preventDefault(), y();
376
+ let V = p.config.definedNames || {}, P = Object.keys(V).sort();
377
+ if (h.innerHTML = "", !P.length) {
378
+ let S = a("div", "xl-namebox-item xl-disabled", "No defined names");
379
+ h.appendChild(S);
380
+ }
381
+ P.forEach((S) => {
382
+ let B = typeof V[S] == "string" ? V[S] : V[S] && V[S].value || "", G = a("div", "xl-namebox-item");
383
+ G.appendChild(a("b", "", S)), G.appendChild(a("span", "xl-namebox-range", B)), G.addEventListener("mousedown", function(j) {
384
+ j.preventDefault(), y();
385
385
  let M = e && e.current ? e.current : p.worksheets[0];
386
- M && P && r(M, P);
387
- }), h.appendChild(j);
388
- }), h.hidden = !1, document.addEventListener("mousedown", T, !0), document.addEventListener("keydown", u, !0);
386
+ M && B && r(M, B);
387
+ }), h.appendChild(G);
388
+ }), h.hidden = !1, document.addEventListener("mousedown", T, !0), document.addEventListener("keydown", m, !0);
389
389
  };
390
- c.addEventListener("mousedown", function(B) {
391
- B.target.closest && B.target.closest(".jss_bar_cursor") && (B.preventDefault(), B.stopPropagation());
392
- }, !0), c.addEventListener("click", function(B) {
393
- B.target.closest && B.target.closest(".jss_bar_cursor") && (B.preventDefault(), B.stopPropagation(), h.hidden ? D() : y());
390
+ c.addEventListener("mousedown", function(V) {
391
+ V.target.closest && V.target.closest(".jss_bar_cursor") && (V.preventDefault(), V.stopPropagation());
392
+ }, !0), c.addEventListener("click", function(V) {
393
+ V.target.closest && V.target.closest(".jss_bar_cursor") && (V.preventDefault(), V.stopPropagation(), h.hidden ? D() : y());
394
394
  }, !0);
395
395
  }, d = function(p, f) {
396
396
  let c = f.querySelector(".jss_bar");
@@ -401,21 +401,37 @@ if (!Ye && typeof it == "function")
401
401
  return;
402
402
  let T = a("div", "xl-fx-btn xl-disabled", l("close"));
403
403
  T.title = "Cancel";
404
- let u = a("div", "xl-fx-btn xl-disabled", l("check"));
405
- u.title = "Enter", h.title = "Insert Function", c.insertBefore(a("div", "xl-fbar-sep"), h), c.insertBefore(a("span", "material-symbols-outlined xl-icon xl-fbar-dots", "more_vert"), h), c.insertBefore(T, h), c.insertBefore(u, h), c.insertBefore(a("div", "xl-fbar-sep"), y);
406
- let D = function(B) {
407
- T.classList.toggle("xl-disabled", !B), u.classList.toggle("xl-disabled", !B);
404
+ let m = a("div", "xl-fx-btn xl-disabled", l("check"));
405
+ m.title = "Enter", h.title = "Insert Function", c.insertBefore(a("div", "xl-fbar-sep"), h), c.insertBefore(a("span", "material-symbols-outlined xl-icon xl-fbar-dots", "more_vert"), h), c.insertBefore(T, h), c.insertBefore(m, h), c.insertBefore(a("div", "xl-fbar-sep"), y);
406
+ let D = function(S) {
407
+ T.classList.toggle("xl-disabled", !S), m.classList.toggle("xl-disabled", !S);
408
408
  };
409
409
  y.addEventListener("focus", function() {
410
410
  D(!0);
411
411
  }), y.addEventListener("blur", function() {
412
412
  D(!1);
413
- }), T.addEventListener("mousedown", function(B) {
414
- B.preventDefault(), T.classList.contains("xl-disabled") || s(y, "Escape", 27);
415
- }), u.addEventListener("mousedown", function(B) {
416
- B.preventDefault(), u.classList.contains("xl-disabled") || s(y, "Enter", 13);
417
- }), h.addEventListener("mousedown", function(B) {
418
- B.preventDefault();
413
+ });
414
+ let V = 0, P = function(S) {
415
+ let B = parseFloat(getComputedStyle(y).lineHeight);
416
+ if (B) {
417
+ let G = y.scrollTop / B, j = S > 0 ? Math.ceil(G - 0.05) : S < 0 ? Math.floor(G + 0.05) : Math.round(G), M = Math.min(j * B, y.scrollHeight - y.clientHeight);
418
+ Math.abs(M - y.scrollTop) > 1 && (y.scrollTop = M), V = y.scrollTop;
419
+ }
420
+ };
421
+ y.addEventListener("keydown", function() {
422
+ requestAnimationFrame(function() {
423
+ P(0);
424
+ });
425
+ }), y.addEventListener("scrollend", function() {
426
+ P(Math.sign(y.scrollTop - V));
427
+ }), c.addEventListener("click", function(S) {
428
+ S.target.parentNode === c && S.target.tagName === "I" && P(0);
429
+ }), T.addEventListener("mousedown", function(S) {
430
+ S.preventDefault(), T.classList.contains("xl-disabled") || s(y, "Escape", 27);
431
+ }), m.addEventListener("mousedown", function(S) {
432
+ S.preventDefault(), m.classList.contains("xl-disabled") || s(y, "Enter", 13);
433
+ }), h.addEventListener("mousedown", function(S) {
434
+ S.preventDefault();
419
435
  }), h.addEventListener("click", function() {
420
436
  f.dispatchEvent(new CustomEvent("insertfunction", { bubbles: !0 }));
421
437
  }), b(p, f, c);
@@ -424,7 +440,7 @@ if (!Ye && typeof it == "function")
424
440
  if (!f)
425
441
  return;
426
442
  let c = f.querySelector(".range-input");
427
- c && m(p, c), d(p, f);
443
+ c && u(p, c), d(p, f);
428
444
  }, g = function(p) {
429
445
  if (typeof Ye == "function")
430
446
  return Ye(p);
@@ -467,7 +483,7 @@ if (!Jn && typeof it == "function")
467
483
  console.log("Not connected...");
468
484
  }, s = function() {
469
485
  return typeof document == "object";
470
- }, m = function() {
486
+ }, u = function() {
471
487
  const d = {};
472
488
  return d.PROMPT = function() {
473
489
  let i = this.instance, g = this.x, p = this.y, f = i.getCellObject(g, p);
@@ -499,7 +515,7 @@ if (!Jn && typeof it == "function")
499
515
  };
500
516
  return b.license = function(d, i) {
501
517
  if (t === null && (t = this), e = i, t.formula) {
502
- let g = m();
518
+ let g = u();
503
519
  g && t.formula.setFormula(g);
504
520
  }
505
521
  }, b;
@@ -541,11 +557,11 @@ const Ya = Wt.exports, o = function(e, t, n) {
541
557
  }), t;
542
558
  }, de = function(e, t, n) {
543
559
  let r = o("div", "xl-overlay jss_object"), a = o("div", "xl-dialog"), l, s = function() {
544
- r.remove(), document.removeEventListener("keydown", m), l.cleanup.forEach((c) => c()), typeof l.onclose == "function" && l.onclose();
545
- }, m = function(c) {
560
+ r.remove(), document.removeEventListener("keydown", u), l.cleanup.forEach((c) => c()), typeof l.onclose == "function" && l.onclose();
561
+ }, u = function(c) {
546
562
  c.key === "Escape" && s();
547
563
  };
548
- document.addEventListener("keydown", m);
564
+ document.addEventListener("keydown", u);
549
565
  let b = o("div", "xl-dialog-header", o("span", null, e)), d = o("span", "xl-dialog-close", "&#10005;");
550
566
  d.onclick = s, b.appendChild(d);
551
567
  let i = o("div", "xl-dialog-body");
@@ -566,23 +582,23 @@ const Ya = Wt.exports, o = function(e, t, n) {
566
582
  return;
567
583
  let a = t.getBoundingClientRect(), l = r.clientX - a.left, s = r.clientY - a.top;
568
584
  t.style.position = "fixed", t.style.margin = "0";
569
- const m = function(d) {
585
+ const u = function(d) {
570
586
  t.style.left = Math.max(0, Math.min(window.innerWidth - a.width, d.clientX - l)) + "px", t.style.top = Math.max(0, Math.min(window.innerHeight - a.height, d.clientY - s)) + "px";
571
587
  }, b = function() {
572
- document.removeEventListener("mousemove", m), document.removeEventListener("mouseup", b);
588
+ document.removeEventListener("mousemove", u), document.removeEventListener("mouseup", b);
573
589
  };
574
- document.addEventListener("mousemove", m), document.addEventListener("mouseup", b), m(r), r.preventDefault();
590
+ document.addEventListener("mousemove", u), document.addEventListener("mouseup", b), u(r), r.preventDefault();
575
591
  })), e;
576
592
  }, bt = function(e, t, n, r, a) {
577
593
  let l = o("input", "xl-input");
578
594
  l.type = a || "text", l.value = n ?? "";
579
- let s = o("div", null, [o("label", "xl-label", t), l]), m = de(e, s, [
595
+ let s = o("div", null, [o("label", "xl-label", t), l]), u = de(e, s, [
580
596
  { label: "OK", primary: !0, onclick: () => r(l.value) },
581
597
  { label: "Cancel" }
582
598
  ]);
583
599
  return ie(l, "keydown", (b) => {
584
- b.key === "Enter" && (r(l.value), m.close());
585
- }), m;
600
+ b.key === "Enter" && (r(l.value), u.close());
601
+ }), u;
586
602
  };
587
603
  let Ze = window.location.href.includes("intrasheets.com") ? "https://app.intrasheets.com/s" : "http://localhost:3099", Qn = null, mn = null;
588
604
  const $a = function(e) {
@@ -717,10 +733,10 @@ const $a = function(e) {
717
733
  // grid wrapper: receives the format painter state
718
734
  guid: null
719
735
  // the server document being shown (set by intrasheets.load)
720
- }, S = function() {
736
+ }, I = function() {
721
737
  return k.jss.current || k.active || k.sheets && k.sheets[0];
722
738
  }, et = function() {
723
- let e = S();
739
+ let e = I();
724
740
  if (!e)
725
741
  return [];
726
742
  let t = e.getHighlighted();
@@ -746,10 +762,10 @@ const $a = function(e) {
746
762
  return e ? { x: e[0], y: e[1], name: se(e[0], e[1]) } : null;
747
763
  }, Pe = function() {
748
764
  let e = pe();
749
- return e ? un(S().getStyle(e.name)) : {};
765
+ return e ? un(I().getStyle(e.name)) : {};
750
766
  }, Be = function(e, t) {
751
767
  let n = Yt();
752
- n.length && S().setStyle(n, e, t), Z();
768
+ n.length && I().setStyle(n, e, t), Z();
753
769
  }, Z = function() {
754
770
  k.refresh && k.refresh();
755
771
  }, dn = function(e, t, n) {
@@ -772,19 +788,19 @@ const $a = function(e) {
772
788
  }, or = function(e, t, n, r) {
773
789
  let a = t === e ? "" : k.jss.helpers.verifyWorksheetName(t.options.worksheetName || "Sheet1") + "!", l = [];
774
790
  for (let s = n[1]; s <= n[3]; s++)
775
- for (let m = n[0]; m <= n[2]; m++)
791
+ for (let u = n[0]; u <= n[2]; u++)
776
792
  l.push({
777
- x: r.x + (m - n[0]),
793
+ x: r.x + (u - n[0]),
778
794
  y: r.y + (s - n[1]),
779
- value: "=" + a + se(m, s)
795
+ value: "=" + a + se(u, s)
780
796
  });
781
797
  e.setValue(l), Z();
782
798
  }, ke = {
783
799
  cut: () => {
784
- S().cut();
800
+ I().cut();
785
801
  },
786
802
  copy: () => {
787
- S().copy();
803
+ I().copy();
788
804
  },
789
805
  /**
790
806
  * Whether the system clipboard still holds the copy made in here. The core
@@ -796,7 +812,7 @@ const $a = function(e) {
796
812
  return k.internalClipboard === !0;
797
813
  },
798
814
  track: function() {
799
- let e = S();
815
+ let e = I();
800
816
  if (!(e && e.getClipboard && e.getClipboard())) {
801
817
  k.internalClipboard = !1;
802
818
  return;
@@ -815,7 +831,7 @@ const $a = function(e) {
815
831
  * The options say what of each cell to take (see pasteArea)
816
832
  */
817
833
  paste: function(e) {
818
- let t = pe(), n = S();
834
+ let t = pe(), n = I();
819
835
  !t || !n || navigator.clipboard.readText().then((r) => {
820
836
  r && n.paste(t.x, t.y, r, !0, e);
821
837
  }).catch((r) => {
@@ -829,7 +845,7 @@ const $a = function(e) {
829
845
  * can mean. Content from another application leaves only the plain paste
830
846
  */
831
847
  source: function() {
832
- let e = S(), t = e && e.getClipboard && e.getClipboard();
848
+ let e = I(), t = e && e.getClipboard && e.getClipboard();
833
849
  return t && !t.cut && this.ours() ? t : null;
834
850
  },
835
851
  /**
@@ -838,7 +854,7 @@ const $a = function(e) {
838
854
  * or a link back to the origin
839
855
  */
840
856
  pasteAs: function(e) {
841
- let t = S(), n = pe(), r = this.source(), a = Dn[e];
857
+ let t = I(), n = pe(), r = this.source(), a = Dn[e];
842
858
  if (!n || !t || !r)
843
859
  return;
844
860
  if (e !== "link" && e !== "keepWidths") {
@@ -846,8 +862,8 @@ const $a = function(e) {
846
862
  return;
847
863
  }
848
864
  let l = r.highlighted[0], s = r.worksheet;
849
- navigator.clipboard.readText().then((m) => {
850
- if (!t.isClipboardText(m)) {
865
+ navigator.clipboard.readText().then((u) => {
866
+ if (!t.isClipboardText(u)) {
851
867
  k.internalClipboard = !1, this.paste(), Z();
852
868
  return;
853
869
  }
@@ -855,11 +871,11 @@ const $a = function(e) {
855
871
  or(t, s, l, n);
856
872
  return;
857
873
  }
858
- Je([() => t.paste(n.x, n.y, m, !0, a)].concat(
874
+ Je([() => t.paste(n.x, n.y, u, !0, a)].concat(
859
875
  Array.from({ length: l[2] - l[0] + 1 }, (b, d) => () => t.setWidth(n.x + d, s.getWidth(l[0] + d)))
860
876
  )), Z();
861
- }).catch((m) => {
862
- console.warn("Clipboard unavailable", m);
877
+ }).catch((u) => {
878
+ console.warn("Clipboard unavailable", u);
863
879
  });
864
880
  },
865
881
  // Format painter: a copy whose paste carries the formats alone. The
@@ -873,7 +889,7 @@ const $a = function(e) {
873
889
  ke.cancelPainter();
874
890
  return;
875
891
  }
876
- let e = S();
892
+ let e = I();
877
893
  !e || e.copy() === !1 || Nn({ worksheet: e });
878
894
  },
879
895
  cancelPainter: function() {
@@ -884,7 +900,7 @@ const $a = function(e) {
884
900
  let e = k.painter;
885
901
  if (e === null)
886
902
  return;
887
- let t = S(), n = pe(), r = t && t.getClipboard && t.getClipboard();
903
+ let t = I(), n = pe(), r = t && t.getClipboard && t.getClipboard();
888
904
  t && n && r && r.worksheet === e.worksheet && t.paste(n.x, n.y, r.value, !0, Dn.formatting), ke.cancelPainter(), Z();
889
905
  }
890
906
  }, Nn = function(e) {
@@ -938,14 +954,14 @@ const $a = function(e) {
938
954
  left: "left",
939
955
  right: "right"
940
956
  }, Xe = function(e) {
941
- let t = S(), n = bn[e === "thick" ? "thick" : e === "double-bottom" ? "double" : ze.style].split(" "), r = k.jss.helpers.getBorderStyle.call(t, et(), sr[e] || e, {
957
+ let t = I(), n = bn[e === "thick" ? "thick" : e === "double-bottom" ? "double" : ze.style].split(" "), r = k.jss.helpers.getBorderStyle.call(t, et(), sr[e] || e, {
942
958
  thickness: parseInt(n[0]),
943
959
  style: n[1],
944
960
  color: ze.color
945
961
  });
946
962
  Object.keys(r).length && t.setStyle(r), Z();
947
963
  }, ct = function() {
948
- let e = pe(), t = S();
964
+ let e = pe(), t = I();
949
965
  if (e && t && t.getCellObject) {
950
966
  let n = t.getCellObject(e.x, e.y);
951
967
  if (n && n.element) {
@@ -968,7 +984,7 @@ const $a = function(e) {
968
984
  let e = le();
969
985
  if (!e)
970
986
  return;
971
- let t = S(), n = se(e[0], e[1]);
987
+ let t = I(), n = se(e[0], e[1]);
972
988
  !Fn(t, e) && (e[2] > e[0] || e[3] > e[1]) && (t.setMerge(n, e[2] - e[0] + 1, e[3] - e[1] + 1), k.jss.history.cascade = !0, t.setStyle(n, "text-align", "center"), k.jss.history.cascade = !1), Z();
973
989
  },
974
990
  mergeAcross: function() {
@@ -977,23 +993,23 @@ const $a = function(e) {
977
993
  let t = {};
978
994
  for (let n = e[1]; n <= e[3]; n++)
979
995
  t[se(e[0], n)] = [e[2] - e[0] + 1, 1];
980
- S().setMerge(t);
996
+ I().setMerge(t);
981
997
  }
982
998
  Z();
983
999
  },
984
1000
  merge: function() {
985
1001
  let e = le();
986
- e && (e[2] > e[0] || e[3] > e[1]) && S().setMerge(se(e[0], e[1]), e[2] - e[0] + 1, e[3] - e[1] + 1), Z();
1002
+ e && (e[2] > e[0] || e[3] > e[1]) && I().setMerge(se(e[0], e[1]), e[2] - e[0] + 1, e[3] - e[1] + 1), Z();
987
1003
  },
988
1004
  unmerge: function() {
989
1005
  let e = le();
990
- e && Fn(S(), e), Z();
1006
+ e && Fn(I(), e), Z();
991
1007
  }
992
- }, la = new Intl.NumberFormat(navigator.languages[0], { maximumFractionDigits: 1 }).formatToParts(1234.5), Te = la.find((e) => e.type === "decimal").value, Re = la.find((e) => e.type === "group").value, Ue = Te === "." ? "\\." : Te, Oe = Re === "." ? "\\." : Re, ca = [
1008
+ }, la = new Intl.NumberFormat(navigator.languages[0], { maximumFractionDigits: 1 }).formatToParts(1234.5), Te = la.find((e) => e.type === "decimal").value, Se = la.find((e) => e.type === "group").value, Ue = Te === "." ? "\\." : Te, Oe = Se === "." ? "\\." : Se, ca = [
993
1009
  { id: "general", label: "General", hint: "No specific format", mask: null },
994
- { id: "number", label: "Number", hint: `1${Re}234${Te}10`, mask: `#${Re}##0${Te}00` },
995
- { id: "currency", label: "Currency", hint: `$ 1${Re}234${Te}10`, mask: `$ #${Re}##0${Te}00` },
996
- { id: "accounting", label: "Accounting", hint: `$ 1${Re}234${Te}10`, mask: `_-$ * #${Re}##0${Te}00_-;-$ * #${Re}##0${Te}00_-;_-$ * -??_-;_-@_-` },
1010
+ { id: "number", label: "Number", hint: `1${Se}234${Te}10`, mask: `#${Se}##0${Te}00` },
1011
+ { id: "currency", label: "Currency", hint: `$ 1${Se}234${Te}10`, mask: `$ #${Se}##0${Te}00` },
1012
+ { id: "accounting", label: "Accounting", hint: `$ 1${Se}234${Te}10`, mask: `_-$ * #${Se}##0${Te}00_-;-$ * #${Se}##0${Te}00_-;_-$ * -??_-;_-@_-` },
997
1013
  { id: "date", label: "Short Date", hint: "31/12/2026", mask: "dd/mm/yyyy" },
998
1014
  { id: "time", label: "Time", hint: "13:30:55", mask: "hh:mm:ss" },
999
1015
  { id: "percentage", label: "Percentage", hint: `12${Te}00%`, mask: `0${Te}00%` },
@@ -1026,7 +1042,7 @@ const $a = function(e) {
1026
1042
  { id: "date", match: (e) => ["dd/mm/yyyy", "dd/mmm/yy", "dd/mmm", "mmm/yy", "dd/mm/yyyy hh:mm"].includes(e) },
1027
1043
  { id: "time", match: (e) => ["h:mm AM/PM", "h:mm:ss AM/PM", "hh:mm", "hh:mm:ss", "mm:ss", "[h]:mm:ss"].includes(e) }
1028
1044
  ], vt = function(e) {
1029
- let t = S(), n = [];
1045
+ let t = I(), n = [];
1030
1046
  et().forEach((r) => {
1031
1047
  for (let a = r[1]; a <= r[3]; a++)
1032
1048
  for (let l = r[0]; l <= r[2]; l++)
@@ -1043,17 +1059,17 @@ const $a = function(e) {
1043
1059
  },
1044
1060
  // Excel "More Number Formats...": the format modal of the jss extension
1045
1061
  moreFormats: function() {
1046
- let e = pe(), t = S();
1062
+ let e = pe(), t = I();
1047
1063
  e && t.parent.plugins && t.parent.plugins.format && t.parent.plugins.format.open(t, [e.x, e.y]);
1048
1064
  },
1049
1065
  percent: () => vt("0%"),
1050
1066
  // Excel's Comma Style: the accounting format without the currency symbol
1051
- comma: () => vt(`_-* #${Re}##0${Te}00_-;-* #${Re}##0${Te}00_-;_-* "-"??_-;_-@_-`),
1067
+ comma: () => vt(`_-* #${Se}##0${Te}00_-;-* #${Se}##0${Te}00_-;_-* "-"??_-;_-@_-`),
1052
1068
  decimals: function(e) {
1053
1069
  let t = pe();
1054
1070
  if (!t)
1055
1071
  return;
1056
- let n = S(), a = (n.getCellProperties && n.getCellProperties(t.x, t.y) || {}).mask, l;
1072
+ let n = I(), a = (n.getCellProperties && n.getCellProperties(t.x, t.y) || {}).mask, l;
1057
1073
  if (a) {
1058
1074
  let b = a.match(new RegExp(`0${Ue}(0+)`));
1059
1075
  l = b ? b[1].length : 0;
@@ -1063,16 +1079,16 @@ const $a = function(e) {
1063
1079
  return;
1064
1080
  l = b[1] ? b[1].length : 0, a = "0";
1065
1081
  }
1066
- let s = Math.max(0, l + e), m = a.split(";").map(
1082
+ let s = Math.max(0, l + e), u = a.split(";").map(
1067
1083
  (b) => b.replace(new RegExp(`0(${Ue}0+)?`), s ? "0" + Te + "0".repeat(s) : "0")
1068
1084
  ).join(";");
1069
- vt(m);
1085
+ vt(u);
1070
1086
  },
1071
1087
  currentMask: function() {
1072
1088
  let e = pe();
1073
1089
  if (!e)
1074
1090
  return null;
1075
- let t = S();
1091
+ let t = I();
1076
1092
  return (t.getCellProperties && t.getCellProperties(e.x, e.y) || {}).mask || null;
1077
1093
  },
1078
1094
  // FORMATS id of a mask, decided by the same category matchers the format
@@ -1150,10 +1166,10 @@ const $a = function(e) {
1150
1166
  {
1151
1167
  title: "Number Format",
1152
1168
  styles: [
1153
- { label: "Comma", mask: `_-* #${Re}##0${Te}00_-;-* #${Re}##0${Te}00_-;_-* "-"??_-;_-@_-` },
1154
- { label: "Comma [0]", mask: `_-* #${Re}##0_-;-* #${Re}##0_-;_-* "-"_-;_-@_-` },
1155
- { label: "Currency", mask: `$ #${Re}##0${Te}00` },
1156
- { label: "Currency [0]", mask: `$ #${Re}##0` },
1169
+ { label: "Comma", mask: `_-* #${Se}##0${Te}00_-;-* #${Se}##0${Te}00_-;_-* "-"??_-;_-@_-` },
1170
+ { label: "Comma [0]", mask: `_-* #${Se}##0_-;-* #${Se}##0_-;_-* "-"_-;_-@_-` },
1171
+ { label: "Currency", mask: `$ #${Se}##0${Te}00` },
1172
+ { label: "Currency [0]", mask: `$ #${Se}##0` },
1157
1173
  { label: "Percent", mask: "0%" }
1158
1174
  ]
1159
1175
  }
@@ -1167,7 +1183,7 @@ const $a = function(e) {
1167
1183
  vt(e.mask);
1168
1184
  return;
1169
1185
  }
1170
- let t = S();
1186
+ let t = I();
1171
1187
  if (e.css === "")
1172
1188
  t.resetStyle(Yt());
1173
1189
  else {
@@ -1199,7 +1215,7 @@ const $a = function(e) {
1199
1215
  }, Q = {
1200
1216
  /** Create a table over the current selection */
1201
1217
  create: function() {
1202
- let e = Zt(), t = S(), n = le();
1218
+ let e = Zt(), t = I(), n = le();
1203
1219
  if (!e || !t || !t.setTable)
1204
1220
  return;
1205
1221
  let r = Bn(t, n);
@@ -1241,12 +1257,12 @@ const $a = function(e) {
1241
1257
  },
1242
1258
  /** The worksheet (active by default) has the sheet filter on */
1243
1259
  filtered: function(e) {
1244
- let t = e || S();
1260
+ let t = e || I();
1245
1261
  return !!(t && t.options && t.options.filters);
1246
1262
  },
1247
1263
  /** The worksheet (active by default) has at least one table */
1248
1264
  any: function(e) {
1249
- let t = e || S();
1265
+ let t = e || I();
1250
1266
  return !!(t && t.options && t.options.tables && t.options.tables.length);
1251
1267
  },
1252
1268
  /**
@@ -1265,7 +1281,7 @@ const $a = function(e) {
1265
1281
  },
1266
1282
  /** Table containing the selection anchor, or null */
1267
1283
  current: function() {
1268
- let e = S(), t = pe(), n = e && e.options && e.options.tables;
1284
+ let e = I(), t = pe(), n = e && e.options && e.options.tables;
1269
1285
  if (!t || !n || !n.length)
1270
1286
  return null;
1271
1287
  for (let r = 0; r < n.length; r++) {
@@ -1281,7 +1297,7 @@ const $a = function(e) {
1281
1297
  * range picker moved the selection passes the table it opened on
1282
1298
  */
1283
1299
  update: function(e, t) {
1284
- let n = t || Q.current(), r = S();
1300
+ let n = t || Q.current(), r = I();
1285
1301
  if (!n || !r)
1286
1302
  return;
1287
1303
  let a = {
@@ -1320,7 +1336,7 @@ const $a = function(e) {
1320
1336
  * for the header instead
1321
1337
  */
1322
1338
  headerRow: function(e, t) {
1323
- let n = t || Q.current(), r = S(), a = n && $e(n.range);
1339
+ let n = t || Q.current(), r = I(), a = n && $e(n.range);
1324
1340
  if (!r || !a || !!n.headerRow == !!e)
1325
1341
  return;
1326
1342
  let l = n.headers ? n.headers.slice() : void 0;
@@ -1342,10 +1358,10 @@ const $a = function(e) {
1342
1358
  ]);
1343
1359
  return;
1344
1360
  }
1345
- let s = [a[0], a[1] - 1, a[2], a[1] - 1], m = a[1] > 0 && !Bn(r, s) && !en(r, s).length;
1346
- for (let f = a[0]; m && f <= a[2]; f++)
1347
- ot(r.getValueFromCoords(f, s[1])) || (m = !1);
1348
- if (m) {
1361
+ let s = [a[0], a[1] - 1, a[2], a[1] - 1], u = a[1] > 0 && !Bn(r, s) && !en(r, s).length;
1362
+ for (let f = a[0]; u && f <= a[2]; f++)
1363
+ ot(r.getValueFromCoords(f, s[1])) || (u = !1);
1364
+ if (u) {
1349
1365
  Q.update({
1350
1366
  range: se(a[0], a[1] - 1) + ":" + se(a[2], a[3]),
1351
1367
  headerRow: !0,
@@ -1355,7 +1371,7 @@ const $a = function(e) {
1355
1371
  }
1356
1372
  let d = Kt(r, (f, c) => [c, f], !1, [a[0], a[2]], a[1]), i = [a[0], a[1], a[2], d], g = nt(n, n.range, l && l.slice()), p = nt(n, se(a[0], a[1]) + ":" + se(a[2], a[3] + 1), l && l.slice());
1357
1373
  p.headerRow = !0, Tt(r, i, function() {
1358
- Rt(r, i, 0, 1), k.jss.history.cascade = !0, Ve(function() {
1374
+ St(r, i, 0, 1), k.jss.history.cascade = !0, Ve(function() {
1359
1375
  r.setTable(p);
1360
1376
  }), k.jss.history.call(r.parent, {
1361
1377
  worksheet: r.options.worksheetId,
@@ -1378,10 +1394,10 @@ const $a = function(e) {
1378
1394
  * back up over it, and the table shrinks past it
1379
1395
  */
1380
1396
  totalRow: function(e, t) {
1381
- let n = t || Q.current(), r = S(), a = n && $e(n.range);
1397
+ let n = t || Q.current(), r = I(), a = n && $e(n.range);
1382
1398
  if (!r || !a || !!n.totalRow == !!e)
1383
1399
  return;
1384
- let l = n.headers ? n.headers.slice() : void 0, s = [a[0], a[2]], m = r.rows.length - 1, b = (h, y) => [y, h];
1400
+ let l = n.headers ? n.headers.slice() : void 0, s = [a[0], a[2]], u = r.rows.length - 1, b = (h, y) => [y, h];
1385
1401
  if (!e) {
1386
1402
  if (a[3] === a[1]) {
1387
1403
  Q.update({ totalRow: !1, headers: l }, n);
@@ -1389,7 +1405,7 @@ const $a = function(e) {
1389
1405
  }
1390
1406
  let h = nt(n, se(a[0], a[1]) + ":" + se(a[2], a[3] - 1), l);
1391
1407
  h.totalRow = !1;
1392
- let y = [s[0], a[3], s[1], m];
1408
+ let y = [s[0], a[3], s[1], u];
1393
1409
  Tt(r, y, function() {
1394
1410
  Je(da(r, b, !1, s, a[3], 1).concat([
1395
1411
  () => r.setTable(h)
@@ -1398,7 +1414,7 @@ const $a = function(e) {
1398
1414
  return;
1399
1415
  }
1400
1416
  let d = se(a[0], a[1]) + ":" + se(a[2], a[3] + 1);
1401
- if (a[3] >= m) {
1417
+ if (a[3] >= u) {
1402
1418
  Je([
1403
1419
  () => r.insertRow(1, a[3], !1),
1404
1420
  () => Q.update({ range: d, totalRow: !0, headers: l }, n)
@@ -1407,7 +1423,7 @@ const $a = function(e) {
1407
1423
  }
1408
1424
  let i = a[3] + 1, g = Kt(r, b, !1, s, i), p = [s[0], i, s[1], g], f = nt(n, n.range, l && l.slice()), c = nt(n, d, l && l.slice());
1409
1425
  c.totalRow = !0, Tt(r, p, function() {
1410
- Rt(r, p, 0, 1), k.jss.history.cascade = !0, Ve(function() {
1426
+ St(r, p, 0, 1), k.jss.history.cascade = !0, Ve(function() {
1411
1427
  r.setTable(c);
1412
1428
  }), k.jss.history.call(r.parent, {
1413
1429
  worksheet: r.options.worksheetId,
@@ -1422,7 +1438,7 @@ const $a = function(e) {
1422
1438
  });
1423
1439
  },
1424
1440
  rename: function(e) {
1425
- let t = Q.current(), n = S();
1441
+ let t = Q.current(), n = I();
1426
1442
  if (!t || !n || !e || !e.trim() || (e = e.trim().replace(/\s+/g, ""), e.toLowerCase() === t.name.toLowerCase()))
1427
1443
  return;
1428
1444
  if (n.getTable(e)) {
@@ -1451,7 +1467,7 @@ const $a = function(e) {
1451
1467
  /** Convert back to a normal range */
1452
1468
  remove: function() {
1453
1469
  let e = Q.current();
1454
- e && (S().resetTable(e.name), Z());
1470
+ e && (I().resetTable(e.name), Z());
1455
1471
  }
1456
1472
  }, pr = function() {
1457
1473
  Q.create();
@@ -1459,7 +1475,7 @@ const $a = function(e) {
1459
1475
  let e = le();
1460
1476
  return e ? se(e[0], e[1]) + ":" + se(e[2], e[3]) : null;
1461
1477
  }, gn = function() {
1462
- let e = S().options && S().options.worksheetName || "Sheet1";
1478
+ let e = I().options && I().options.worksheetName || "Sheet1";
1463
1479
  return k.jss.helpers.verifyWorksheetName(e);
1464
1480
  }, ua = function() {
1465
1481
  let e = Zt();
@@ -1471,12 +1487,12 @@ const $a = function(e) {
1471
1487
  let t = gn() + "!";
1472
1488
  return e.map((n) => t + se(n[0], n[1]) + ":" + se(n[2], n[3])).join(",");
1473
1489
  }, ut = function() {
1474
- let e = S();
1490
+ let e = I();
1475
1491
  return e && e.parent.plugins && e.parent.plugins.formatType;
1476
1492
  }, Qe = {
1477
1493
  rule: function(e) {
1478
1494
  let t = ut(), n = ua();
1479
- !t || !n || (t.setRule(S(), Object.assign({ range: n }, e)), Z());
1495
+ !t || !n || (t.setRule(I(), Object.assign({ range: n }, e)), Z());
1480
1496
  },
1481
1497
  presets: function() {
1482
1498
  let e = ut();
@@ -1488,11 +1504,11 @@ const $a = function(e) {
1488
1504
  },
1489
1505
  remove: function(e) {
1490
1506
  let t = ut();
1491
- t && (t.removeRule(S(), e), Z());
1507
+ t && (t.removeRule(I(), e), Z());
1492
1508
  },
1493
1509
  clear: function() {
1494
1510
  let e = ut();
1495
- e && (e.clearRules(S()), Z());
1511
+ e && (e.clearRules(I()), Z());
1496
1512
  },
1497
1513
  /**
1498
1514
  * Excel "Clear Rules from Selected Cells": the selected cells leave
@@ -1500,7 +1516,7 @@ const $a = function(e) {
1500
1516
  * their rules
1501
1517
  */
1502
1518
  clearSelection: function() {
1503
- let e = ut(), t = S();
1519
+ let e = ut(), t = I();
1504
1520
  e && t && e.clearRange(t, et()) && Z();
1505
1521
  }
1506
1522
  }, hr = function(e) {
@@ -1509,52 +1525,52 @@ const $a = function(e) {
1509
1525
  n++;
1510
1526
  return "Sheet" + n;
1511
1527
  }, Ft = function() {
1512
- let e = le(), t = S();
1528
+ let e = le(), t = I();
1513
1529
  return !!(e && t && e[0] === 0 && e[2] === t.cols.length - 1);
1514
1530
  }, Lt = function() {
1515
- let e = le(), t = S();
1531
+ let e = le(), t = I();
1516
1532
  return !!(e && t && e[1] === 0 && e[3] === t.rows.length - 1);
1517
1533
  }, ot = function(e) {
1518
1534
  return e === "" || e === null || typeof e > "u";
1519
- }, Rt = function(e, t, n, r) {
1535
+ }, St = function(e, t, n, r) {
1520
1536
  return e.pasteArea(t, [t[0] + n, t[1] + r], !0);
1521
1537
  }, Kt = function(e, t, n, r, a) {
1522
1538
  let l = (n ? e.cols.length : e.rows.length) - 1, s = function(d, i) {
1523
1539
  let g = se(d, i);
1524
1540
  return !ot(e.getValueFromCoords(d, i)) || !!e.getStyle(g) || !!e.getComments(g) || !!e.getCells(g);
1525
- }, m = a;
1541
+ }, u = a;
1526
1542
  for (let d = r[0]; d <= r[1]; d++)
1527
- for (let i = l; i > m; i--) {
1543
+ for (let i = l; i > u; i--) {
1528
1544
  let g = t(i, d);
1529
1545
  if (s(g[0], g[1])) {
1530
- m = i;
1546
+ u = i;
1531
1547
  break;
1532
1548
  }
1533
1549
  }
1534
1550
  let b = e.options.mergeCells || {};
1535
1551
  return Object.keys(b).forEach(function(d) {
1536
1552
  let i = e.helpers.getCoordsFromCellName(d), g = b[d], p = [i[0], i[1], i[0] + g[0] - 1, i[1] + g[1] - 1], f = n ? [p[0], p[2]] : [p[1], p[3]], c = n ? [p[1], p[3]] : [p[0], p[2]];
1537
- c[0] <= r[1] && c[1] >= r[0] && f[1] > m && (m = f[1]);
1538
- }), m;
1553
+ c[0] <= r[1] && c[1] >= r[0] && f[1] > u && (u = f[1]);
1554
+ }), u;
1539
1555
  }, da = function(e, t, n, r, a, l) {
1540
- let s = (n ? e.cols.length : e.rows.length) - 1, m = a + l, b = Math.min(s, Math.max(Kt(e, t, n, r, m), m + l - 1)), d = Math.max(0, b - m + 1), i = [];
1556
+ let s = (n ? e.cols.length : e.rows.length) - 1, u = a + l, b = Math.min(s, Math.max(Kt(e, t, n, r, u), u + l - 1)), d = Math.max(0, b - u + 1), i = [];
1541
1557
  return d < l && i.push(function() {
1542
1558
  let g = {};
1543
1559
  for (let p = r[0]; p <= r[1]; p++)
1544
- for (let f = a + d; f < m; f++) {
1560
+ for (let f = a + d; f < u; f++) {
1545
1561
  let c = t(f, p);
1546
1562
  g[se(c[0], c[1])] = "";
1547
1563
  }
1548
1564
  e.setValue(g);
1549
1565
  }), d > 0 && i.push(function() {
1550
- let g = n ? [m, r[0], b, r[1]] : [r[0], m, r[1], b];
1551
- Rt(e, g, n ? -l : 0, n ? 0 : -l);
1566
+ let g = n ? [u, r[0], b, r[1]] : [r[0], u, r[1], b];
1567
+ St(e, g, n ? -l : 0, n ? 0 : -l);
1552
1568
  }), i;
1553
1569
  }, en = function(e, t) {
1554
1570
  let n = [], r = e && e.options.mergeCells || {};
1555
1571
  return Object.keys(r).forEach(function(a) {
1556
- let l = e.helpers.getCoordsFromCellName(a), s = r[a], m = [l[0], l[1], l[0] + s[0] - 1, l[1] + s[1] - 1];
1557
- m[0] <= t[2] && m[2] >= t[0] && m[1] <= t[3] && m[3] >= t[1] && n.push({ anchor: a, rect: m });
1572
+ let l = e.helpers.getCoordsFromCellName(a), s = r[a], u = [l[0], l[1], l[0] + s[0] - 1, l[1] + s[1] - 1];
1573
+ u[0] <= t[2] && u[2] >= t[0] && u[1] <= t[3] && u[3] >= t[1] && n.push({ anchor: a, rect: u });
1558
1574
  }), n;
1559
1575
  }, Fn = function(e, t) {
1560
1576
  let n = {};
@@ -1605,17 +1621,17 @@ const $a = function(e) {
1605
1621
  k.jss.history.ignore = !1;
1606
1622
  }
1607
1623
  }, Ln = function(e) {
1608
- let t = S(), n = Q.current(), r = le(), a = n && $e(n.range);
1624
+ let t = I(), n = Q.current(), r = le(), a = n && $e(n.range);
1609
1625
  if (!t || !a || !r)
1610
1626
  return;
1611
- let l = (T, u) => e ? [T, u] : [u, T], s = e ? [a[1], a[3]] : [a[0], a[2]], m = Math.max(e ? a[0] : a[1], e ? r[0] : r[1]), b = Math.max(1, Math.min(e ? a[2] : a[3], e ? r[2] : r[3]) - m + 1);
1612
- if (!e && n.headerRow && m === a[1])
1627
+ let l = (T, m) => e ? [T, m] : [m, T], s = e ? [a[1], a[3]] : [a[0], a[2]], u = Math.max(e ? a[0] : a[1], e ? r[0] : r[1]), b = Math.max(1, Math.min(e ? a[2] : a[3], e ? r[2] : r[3]) - u + 1);
1628
+ if (!e && n.headerRow && u === a[1])
1613
1629
  return;
1614
- let d = Kt(t, l, e, s, m), i = e ? [m, s[0], d, s[1]] : [s[0], m, s[1], d], g = e ? b : 0, p = e ? 0 : b, f = n.headers ? n.headers.slice() : void 0, c = f && e ? f.slice() : f;
1615
- c && e && c.splice(m - a[0], 0, ...new Array(b).fill(""));
1630
+ let d = Kt(t, l, e, s, u), i = e ? [u, s[0], d, s[1]] : [s[0], u, s[1], d], g = e ? b : 0, p = e ? 0 : b, f = n.headers ? n.headers.slice() : void 0, c = f && e ? f.slice() : f;
1631
+ c && e && c.splice(u - a[0], 0, ...new Array(b).fill(""));
1616
1632
  let h = nt(n, n.range, f), y = nt(n, e ? se(a[0], a[1]) + ":" + se(a[2] + b, a[3]) : se(a[0], a[1]) + ":" + se(a[2], a[3] + b), c);
1617
1633
  Tt(t, i, function() {
1618
- Rt(t, i, g, p), k.jss.history.cascade = !0, Ve(function() {
1634
+ St(t, i, g, p), k.jss.history.cascade = !0, Ve(function() {
1619
1635
  t.setTable(y);
1620
1636
  }), k.jss.history.call(t.parent, {
1621
1637
  worksheet: t.options.worksheetId,
@@ -1631,11 +1647,11 @@ const $a = function(e) {
1631
1647
  }), k.jss.history.cascade = !1, Z();
1632
1648
  });
1633
1649
  }, _n = function(e) {
1634
- let t = S(), n = Q.current(), r = le(), a = n && $e(n.range);
1650
+ let t = I(), n = Q.current(), r = le(), a = n && $e(n.range);
1635
1651
  if (!t || !a || !r)
1636
1652
  return;
1637
- let l = e ? [a[1], a[3]] : [a[0], a[2]], s = (e ? t.cols.length : t.rows.length) - 1, m = !e && n.headerRow ? a[1] + 1 : e ? a[0] : a[1], b = e ? a[2] : a[3], d = Math.max(m, e ? r[0] : r[1]), i = Math.max(1, Math.min(b, e ? r[2] : r[3]) - d + 1);
1638
- if (d === m && (i = Math.min(i, b - m)), i < 1 || d > b)
1653
+ let l = e ? [a[1], a[3]] : [a[0], a[2]], s = (e ? t.cols.length : t.rows.length) - 1, u = !e && n.headerRow ? a[1] + 1 : e ? a[0] : a[1], b = e ? a[2] : a[3], d = Math.max(u, e ? r[0] : r[1]), i = Math.max(1, Math.min(b, e ? r[2] : r[3]) - d + 1);
1654
+ if (d === u && (i = Math.min(i, b - u)), i < 1 || d > b)
1639
1655
  return;
1640
1656
  let g = n.headers ? n.headers.slice() : void 0;
1641
1657
  g && e && g.splice(d - a[0], i);
@@ -1652,50 +1668,50 @@ const $a = function(e) {
1652
1668
  deleteTableRows: () => _n(!1),
1653
1669
  insertRowAbove: function() {
1654
1670
  let e = le();
1655
- S().insertRow(Math.max(1, e ? e[3] - e[1] + 1 : 1), e ? e[1] : 0, !0);
1671
+ I().insertRow(Math.max(1, e ? e[3] - e[1] + 1 : 1), e ? e[1] : 0, !0);
1656
1672
  },
1657
1673
  insertRowBelow: function() {
1658
1674
  let e = le();
1659
- S().insertRow(Math.max(1, e ? e[3] - e[1] + 1 : 1), e ? e[3] : 0, !1);
1675
+ I().insertRow(Math.max(1, e ? e[3] - e[1] + 1 : 1), e ? e[3] : 0, !1);
1660
1676
  },
1661
1677
  insertColLeft: function() {
1662
1678
  let e = le();
1663
- S().insertColumn(Math.max(1, e ? e[2] - e[0] + 1 : 1), e ? e[0] : 0, !0);
1679
+ I().insertColumn(Math.max(1, e ? e[2] - e[0] + 1 : 1), e ? e[0] : 0, !0);
1664
1680
  },
1665
1681
  insertColRight: function() {
1666
1682
  let e = le();
1667
- S().insertColumn(Math.max(1, e ? e[2] - e[0] + 1 : 1), e ? e[2] : 0, !1);
1683
+ I().insertColumn(Math.max(1, e ? e[2] - e[0] + 1 : 1), e ? e[2] : 0, !1);
1668
1684
  },
1669
1685
  insertSheet: function() {
1670
- let e = S();
1686
+ let e = I();
1671
1687
  e.createWorksheet({ worksheetName: hr(e.parent) }), Z();
1672
1688
  },
1673
1689
  deleteSheet: function() {
1674
- let e = S();
1690
+ let e = I();
1675
1691
  e.parent.worksheets.length > 1 && e.deleteWorksheet(e.parent.worksheets.indexOf(e)), Z();
1676
1692
  },
1677
1693
  deleteRows: function() {
1678
1694
  let e = le();
1679
- e && S().deleteRow(e[1], e[3] - e[1] + 1);
1695
+ e && I().deleteRow(e[1], e[3] - e[1] + 1);
1680
1696
  },
1681
1697
  deleteCols: function() {
1682
1698
  let e = le();
1683
- e && S().deleteColumn(e[0], e[2] - e[0] + 1);
1699
+ e && I().deleteColumn(e[0], e[2] - e[0] + 1);
1684
1700
  },
1685
1701
  setRowHeight: function(e) {
1686
1702
  let t = le();
1687
1703
  if (t)
1688
1704
  for (let n = t[1]; n <= t[3]; n++)
1689
- S().setHeight(n, parseInt(e));
1705
+ I().setHeight(n, parseInt(e));
1690
1706
  },
1691
1707
  setColWidth: function(e) {
1692
1708
  let t = le();
1693
1709
  if (t)
1694
1710
  for (let n = t[0]; n <= t[2]; n++)
1695
- S().setWidth(n, parseInt(e));
1711
+ I().setWidth(n, parseInt(e));
1696
1712
  },
1697
1713
  autoFit: function() {
1698
- let e = le(), t = S();
1714
+ let e = le(), t = I();
1699
1715
  if (e && typeof t.autoWidth == "function") {
1700
1716
  let n = [];
1701
1717
  for (let r = e[0]; r <= e[2]; r++)
@@ -1713,7 +1729,7 @@ const $a = function(e) {
1713
1729
  },
1714
1730
  /** Excel "Group": the selected rows or columns become a collapsible group */
1715
1731
  group: function(e) {
1716
- let t = le(), n = S();
1732
+ let t = le(), n = I();
1717
1733
  this.canGroup(e) && (e ? n.setRowGroup(t[1], t[3] - t[1], !0) : n.setColumnGroup(t[0], t[2] - t[0], !0), Z());
1718
1734
  },
1719
1735
  /**
@@ -1724,7 +1740,7 @@ const $a = function(e) {
1724
1740
  * A group owns the lines from its owner to owner + group
1725
1741
  */
1726
1742
  groupCut: function(e) {
1727
- let t = le(), n = S();
1743
+ let t = le(), n = I();
1728
1744
  if (!t || !n)
1729
1745
  return null;
1730
1746
  let r = e ? n.getRowGroup() : n.getColumnGroup(), a = e ? t[1] : t[0], l = e ? t[3] : t[2], s = null;
@@ -1732,12 +1748,12 @@ const $a = function(e) {
1732
1748
  g + r[g].group < a || g > l || (s === null || r[g].group < r[s].group || r[g].group === r[s].group && g > s) && (s = g);
1733
1749
  }), s === null)
1734
1750
  return null;
1735
- let m = s + r[s].group, b = r[s].state, d = [], i = l >= m ? a - 1 : a;
1736
- return i > s && d.push({ owner: s, span: i - s, state: b }), m > l + 1 && d.push({ owner: l + 1, span: m - l - 1, state: b }), { owner: s, pieces: d };
1751
+ let u = s + r[s].group, b = r[s].state, d = [], i = l >= u ? a - 1 : a;
1752
+ return i > s && d.push({ owner: s, span: i - s, state: b }), u > l + 1 && d.push({ owner: l + 1, span: u - l - 1, state: b }), { owner: s, pieces: d };
1737
1753
  },
1738
1754
  /** Excel "Ungroup": one step, whatever the cut takes */
1739
1755
  ungroup: function(e) {
1740
- let t = S(), n = this.groupCut(e);
1756
+ let t = I(), n = this.groupCut(e);
1741
1757
  if (!n)
1742
1758
  return;
1743
1759
  let r = [];
@@ -1750,7 +1766,7 @@ const $a = function(e) {
1750
1766
  if (e) {
1751
1767
  let t = [];
1752
1768
  for (let n = e[1]; n <= e[3]; n++) t.push(n);
1753
- S().hideRow(t);
1769
+ I().hideRow(t);
1754
1770
  }
1755
1771
  },
1756
1772
  showRows: function() {
@@ -1758,7 +1774,7 @@ const $a = function(e) {
1758
1774
  if (e) {
1759
1775
  let t = [];
1760
1776
  for (let n = e[1]; n <= e[3]; n++) t.push(n);
1761
- S().showRow(t);
1777
+ I().showRow(t);
1762
1778
  }
1763
1779
  },
1764
1780
  hideCols: function() {
@@ -1766,7 +1782,7 @@ const $a = function(e) {
1766
1782
  if (e) {
1767
1783
  let t = [];
1768
1784
  for (let n = e[0]; n <= e[2]; n++) t.push(n);
1769
- S().hideColumn(t);
1785
+ I().hideColumn(t);
1770
1786
  }
1771
1787
  },
1772
1788
  showCols: function() {
@@ -1774,37 +1790,37 @@ const $a = function(e) {
1774
1790
  if (e) {
1775
1791
  let t = [];
1776
1792
  for (let n = e[0]; n <= e[2]; n++) t.push(n);
1777
- S().showColumn(t);
1793
+ I().showColumn(t);
1778
1794
  }
1779
1795
  }
1780
1796
  }, yr = function(e, t, n, r) {
1781
- let a = t.filter((d) => d).sort((d, i) => i.length - d.length), l = [], s = "", m = 0, b = function() {
1797
+ let a = t.filter((d) => d).sort((d, i) => i.length - d.length), l = [], s = "", u = 0, b = function() {
1782
1798
  for (let d = 0; d < a.length; d++)
1783
- if (e.substr(m, a[d].length) === a[d])
1799
+ if (e.substr(u, a[d].length) === a[d])
1784
1800
  return a[d];
1785
1801
  return null;
1786
1802
  };
1787
- for (; m < e.length; ) {
1803
+ for (; u < e.length; ) {
1788
1804
  let d = b();
1789
1805
  if (d) {
1790
- if (l.push(s), s = "", m += d.length, n)
1806
+ if (l.push(s), s = "", u += d.length, n)
1791
1807
  for (; d = b(); )
1792
- m += d.length;
1808
+ u += d.length;
1793
1809
  continue;
1794
1810
  }
1795
- if (r && !s && e.charAt(m) === r) {
1796
- for (m++; m < e.length; )
1797
- if (e.charAt(m) !== r)
1798
- s += e.charAt(m++);
1799
- else if (e.charAt(m + 1) === r)
1800
- s += r, m += 2;
1811
+ if (r && !s && e.charAt(u) === r) {
1812
+ for (u++; u < e.length; )
1813
+ if (e.charAt(u) !== r)
1814
+ s += e.charAt(u++);
1815
+ else if (e.charAt(u + 1) === r)
1816
+ s += r, u += 2;
1801
1817
  else {
1802
- m++;
1818
+ u++;
1803
1819
  break;
1804
1820
  }
1805
1821
  continue;
1806
1822
  }
1807
- s += e.charAt(m++);
1823
+ s += e.charAt(u++);
1808
1824
  }
1809
1825
  return l.push(s), l;
1810
1826
  }, br = function(e) {
@@ -1847,26 +1863,26 @@ const $a = function(e) {
1847
1863
  let t = le();
1848
1864
  if (!t)
1849
1865
  return;
1850
- let n = S(), r = (s, m) => !ot(n.getValueFromCoords(s, m)), a = function(s, m) {
1851
- let b = m - 1;
1866
+ let n = I(), r = (s, u) => !ot(n.getValueFromCoords(s, u)), a = function(s, u) {
1867
+ let b = u - 1;
1852
1868
  for (; b >= 0 && !r(s, b); )
1853
1869
  b--;
1854
1870
  if (b >= 0) {
1855
1871
  for (; b > 0 && r(s, b - 1); )
1856
1872
  b--;
1857
- return [s, b, s, m - 1];
1873
+ return [s, b, s, u - 1];
1858
1874
  }
1859
1875
  let d = s - 1;
1860
- for (; d >= 0 && !r(d, m); )
1876
+ for (; d >= 0 && !r(d, u); )
1861
1877
  d--;
1862
1878
  if (d >= 0) {
1863
- for (; d > 0 && r(d - 1, m); )
1879
+ for (; d > 0 && r(d - 1, u); )
1864
1880
  d--;
1865
- return [d, m, s - 1, m];
1881
+ return [d, u, s - 1, u];
1866
1882
  }
1867
1883
  return null;
1868
- }, l = function(s, m) {
1869
- let b = a(s, m), d = b ? se(b[0], b[1]) + ":" + se(b[2], b[3]) : "", i = n.getCell(s, m);
1884
+ }, l = function(s, u) {
1885
+ let b = a(s, u), d = b ? se(b[0], b[1]) + ":" + se(b[2], b[3]) : "", i = n.getCell(s, u);
1870
1886
  if (i && n.openEditor(i, !0) !== !1) {
1871
1887
  let g = n.parent.editor.input;
1872
1888
  g.textContent = "=" + e + "(" + d + ")";
@@ -1875,7 +1891,7 @@ const $a = function(e) {
1875
1891
  }
1876
1892
  };
1877
1893
  if (t[0] === t[2] != (t[1] === t[3])) {
1878
- let s = a(t[0], t[1]), m = [];
1894
+ let s = a(t[0], t[1]), u = [];
1879
1895
  for (let b = t[1]; b <= t[3]; b++)
1880
1896
  for (let d = t[0]; d <= t[2]; d++) {
1881
1897
  let i = "";
@@ -1883,9 +1899,9 @@ const $a = function(e) {
1883
1899
  let g = d - t[0], p = b - t[1];
1884
1900
  i = se(s[0] + g, s[1] + p) + ":" + se(s[2] + g, s[3] + p);
1885
1901
  }
1886
- m.push({ x: d, y: b, value: "=" + e + "(" + i + ")" });
1902
+ u.push({ x: d, y: b, value: "=" + e + "(" + i + ")" });
1887
1903
  }
1888
- n.setValue(m);
1904
+ n.setValue(u);
1889
1905
  } else
1890
1906
  l(t[0], t[1]);
1891
1907
  },
@@ -1893,7 +1909,7 @@ const $a = function(e) {
1893
1909
  let t = le();
1894
1910
  if (!t)
1895
1911
  return;
1896
- let n = S(), r = [];
1912
+ let n = I(), r = [];
1897
1913
  if (e === "down")
1898
1914
  for (let a = t[0]; a <= t[2]; a++) {
1899
1915
  let l = n.getValueFromCoords(a, t[1]);
@@ -1914,14 +1930,14 @@ const $a = function(e) {
1914
1930
  */
1915
1931
  canRemoveDuplicates: function() {
1916
1932
  let e = le();
1917
- return !!e && e[3] > e[1] && !en(S(), e).length;
1933
+ return !!e && e[3] > e[1] && !en(I(), e).length;
1918
1934
  },
1919
1935
  /** Columns the dialog offers: the header text names them when there is one */
1920
1936
  duplicateColumns: function(e) {
1921
1937
  let t = le();
1922
1938
  if (!t)
1923
1939
  return [];
1924
- let n = S(), r = [];
1940
+ let n = I(), r = [];
1925
1941
  for (let a = t[0]; a <= t[2]; a++) {
1926
1942
  let l = e ? n.getValueFromCoords(a, t[1]) : null;
1927
1943
  r.push({ x: a, label: ot(l) ? "Column " + Ct(a) : String(l) });
@@ -1938,16 +1954,16 @@ const $a = function(e) {
1938
1954
  let t = le();
1939
1955
  if (!this.canRemoveDuplicates() || !e.columns.length)
1940
1956
  return null;
1941
- let n = S(), r = t[1] + (e.headers ? 1 : 0), a = {}, l = [], s = 0;
1942
- for (let m = r; m <= t[3]; m++) {
1943
- let b = JSON.stringify(e.columns.map((d) => br(n.getValueFromCoords(d, m))));
1944
- a[b] ? s++ : (a[b] = !0, l.push(m));
1957
+ let n = I(), r = t[1] + (e.headers ? 1 : 0), a = {}, l = [], s = 0;
1958
+ for (let u = r; u <= t[3]; u++) {
1959
+ let b = JSON.stringify(e.columns.map((d) => br(n.getValueFromCoords(d, u))));
1960
+ a[b] ? s++ : (a[b] = !0, l.push(u));
1945
1961
  }
1946
1962
  if (s) {
1947
- let m = [];
1963
+ let u = [];
1948
1964
  l.forEach((p, f) => {
1949
- let c = p - (r + f), h = m[m.length - 1];
1950
- h && h.offset === c && p === h.to + 1 ? h.to = p : m.push({ from: p, to: p, offset: c });
1965
+ let c = p - (r + f), h = u[u.length - 1];
1966
+ h && h.offset === c && p === h.to + 1 ? h.to = p : u.push({ from: p, to: p, offset: c });
1951
1967
  });
1952
1968
  let b = [t[0], r, t[2], t[3]], d = Un(n, b), i = Un(n, [t[0], r + l.length, t[2], t[3]]).map((p) => ({
1953
1969
  x: p.x,
@@ -1958,8 +1974,8 @@ const $a = function(e) {
1958
1974
  comment: ""
1959
1975
  })), g = function() {
1960
1976
  Ve(function() {
1961
- m.forEach((p) => {
1962
- p.offset && Rt(n, [t[0], p.from, t[2], p.to], 0, -p.offset);
1977
+ u.forEach((p) => {
1978
+ p.offset && St(n, [t[0], p.from, t[2], p.to], 0, -p.offset);
1963
1979
  }), Pn(n, i);
1964
1980
  }), Z();
1965
1981
  };
@@ -1986,7 +2002,7 @@ const $a = function(e) {
1986
2002
  let t = le();
1987
2003
  if (!this.canSplit() || !e.delimiters.filter((a) => a).length)
1988
2004
  return [];
1989
- let n = S(), r = [];
2005
+ let n = I(), r = [];
1990
2006
  for (let a = t[1]; a <= t[3]; a++) {
1991
2007
  let l = n.getValueFromCoords(t[0], a);
1992
2008
  r.push({
@@ -2000,30 +2016,30 @@ const $a = function(e) {
2000
2016
  let t = le(), n = this.splitRows(e);
2001
2017
  if (!n.length)
2002
2018
  return;
2003
- let r = S(), a = 1, l = [];
2019
+ let r = I(), a = 1, l = [];
2004
2020
  n.forEach((b) => {
2005
2021
  a = Math.max(a, b.fields.length), b.fields.forEach((d, i) => {
2006
2022
  l.push({ x: t[0] + i, y: b.y, value: d });
2007
2023
  });
2008
2024
  });
2009
- let s = [], m = t[0] + a - r.cols.length;
2010
- m > 0 && s.push(() => r.insertColumn(m)), s.push(() => r.setValue(l)), Je(s), Z();
2025
+ let s = [], u = t[0] + a - r.cols.length;
2026
+ u > 0 && s.push(() => r.insertColumn(u)), s.push(() => r.setValue(l)), Je(s), Z();
2011
2027
  },
2012
2028
  clear: function(e) {
2013
- let t = S(), n = et(), r = Yt(), a = [];
2029
+ let t = I(), n = et(), r = Yt(), a = [];
2014
2030
  if (e === "all" || e === "contents") {
2015
2031
  let l = [];
2016
2032
  n.forEach((s) => {
2017
- for (let m = s[1]; m <= s[3]; m++)
2033
+ for (let u = s[1]; u <= s[3]; u++)
2018
2034
  for (let b = s[0]; b <= s[2]; b++)
2019
- l.push({ x: b, y: m, value: "" });
2035
+ l.push({ x: b, y: u, value: "" });
2020
2036
  }), l.length && a.push(() => t.setValue(l));
2021
2037
  }
2022
2038
  if (e === "all" || e === "formats") {
2023
2039
  a.push(() => t.resetStyle(r));
2024
2040
  let l = {};
2025
- r.forEach((m) => {
2026
- l[m] = null;
2041
+ r.forEach((u) => {
2042
+ l[u] = null;
2027
2043
  }), a.push(() => t.setCellProperties(l));
2028
2044
  let s = ut();
2029
2045
  s && a.push(() => s.clearRange(t, n));
@@ -2031,33 +2047,33 @@ const $a = function(e) {
2031
2047
  if (e === "all" || e === "notes" || e === "comments") {
2032
2048
  let l = {};
2033
2049
  r.forEach((s) => {
2034
- let m = t.getComments(s);
2035
- m && (e === "all" || Array.isArray(m) === (e === "comments")) && (l[s] = "");
2050
+ let u = t.getComments(s);
2051
+ u && (e === "all" || Array.isArray(u) === (e === "comments")) && (l[s] = "");
2036
2052
  }), Object.keys(l).length && a.push(() => t.setComments(l));
2037
2053
  }
2038
2054
  Je(a), Z();
2039
2055
  },
2040
2056
  sort: function(e) {
2041
2057
  let t = pe();
2042
- t && !Q.refuseSortFilter("Sort") && S().orderBy(t.x, e);
2058
+ t && !Q.refuseSortFilter("Sort") && I().orderBy(t.x, e);
2043
2059
  },
2044
2060
  /** The Excel Sort dialog: several levels, each a column and a direction */
2045
2061
  customSort: function() {
2046
- let e = S();
2062
+ let e = I();
2047
2063
  e && e.parent.plugins && e.parent.plugins.customSort && !Q.refuseSortFilter("Sort") && e.parent.plugins.customSort.open(e);
2048
2064
  },
2049
2065
  filter: function() {
2050
- let e = S();
2066
+ let e = I();
2051
2067
  Q.refuseSortFilter("Filter") || (k.filterOn ? (e.hideFilter(), k.filterOn = !1) : (e.showFilter(), k.filterOn = !0), Z());
2052
2068
  },
2053
2069
  find: function(e) {
2054
- S().search(e);
2070
+ I().search(e);
2055
2071
  },
2056
2072
  resetFind: function() {
2057
- S().resetSearch();
2073
+ I().resetSearch();
2058
2074
  },
2059
2075
  goTo: function(e) {
2060
- let t = S(), n = e.trim().toUpperCase().match(/^([A-Z]+)([0-9]+)(:([A-Z]+)([0-9]+))?$/);
2076
+ let t = I(), n = e.trim().toUpperCase().match(/^([A-Z]+)([0-9]+)(:([A-Z]+)([0-9]+))?$/);
2061
2077
  if (!n)
2062
2078
  return !1;
2063
2079
  let r = function(b) {
@@ -2065,46 +2081,46 @@ const $a = function(e) {
2065
2081
  for (let i = 0; i < b.length; i++)
2066
2082
  d = d * 26 + (b.charCodeAt(i) - 64);
2067
2083
  return d - 1;
2068
- }, a = r(n[1]), l = parseInt(n[2]) - 1, s = n[4] ? r(n[4]) : a, m = n[5] ? parseInt(n[5]) - 1 : l;
2069
- return t.updateSelectionFromCoords(a, l, s, m), t.goto(l, a), !0;
2084
+ }, a = r(n[1]), l = parseInt(n[2]) - 1, s = n[4] ? r(n[4]) : a, u = n[5] ? parseInt(n[5]) - 1 : l;
2085
+ return t.updateSelectionFromCoords(a, l, s, u), t.goto(l, a), !0;
2070
2086
  }
2071
2087
  }, xe = {
2072
2088
  freezePanes: function() {
2073
- let e = pe(), t = S();
2089
+ let e = pe(), t = I();
2074
2090
  e && (e.x > 0 && t.setFreezeColumns(e.x), e.y > 0 && (k.jss.history.cascade = e.x > 0, t.setFreezeRows(e.y), k.jss.history.cascade = !1)), Z();
2075
2091
  },
2076
2092
  freezeTopRow: function() {
2077
- S().setFreezeRows(1), Z();
2093
+ I().setFreezeRows(1), Z();
2078
2094
  },
2079
2095
  /** Freeze every row from the top through the anchor row */
2080
2096
  freezeUpToRow: function() {
2081
2097
  let e = pe();
2082
- e && (S().setFreezeRows(e.y + 1), Z());
2098
+ e && (I().setFreezeRows(e.y + 1), Z());
2083
2099
  },
2084
2100
  freezeFirstCol: function() {
2085
- S().setFreezeColumns(1), Z();
2101
+ I().setFreezeColumns(1), Z();
2086
2102
  },
2087
2103
  /** Freeze every column from the left through the anchor column */
2088
2104
  freezeUpToCol: function() {
2089
2105
  let e = pe();
2090
- e && (S().setFreezeColumns(e.x + 1), Z());
2106
+ e && (I().setFreezeColumns(e.x + 1), Z());
2091
2107
  },
2092
2108
  frozen: function() {
2093
- let e = S();
2109
+ let e = I();
2094
2110
  return !!(e && (e.options.freezeRows || e.options.freezeColumns));
2095
2111
  },
2096
2112
  unfreeze: function() {
2097
- let e = S();
2113
+ let e = I();
2098
2114
  e.resetFreezeRows(), k.jss.history.cascade = !0, e.resetFreezeColumns(), k.jss.history.cascade = !1, Z();
2099
2115
  },
2100
2116
  /** Gridlines are a per worksheet view setting, like in Excel */
2101
2117
  gridlinesOn: function() {
2102
- let e = S();
2118
+ let e = I();
2103
2119
  return !e || e.options.gridline !== !1;
2104
2120
  },
2105
2121
  gridlines: function(e) {
2106
2122
  k.gridlines = e;
2107
- let t = S();
2123
+ let t = I();
2108
2124
  t && (t.options.gridline = !!e, t.table && t.table.classList.toggle("jss_nogridline", !e));
2109
2125
  },
2110
2126
  /**
@@ -2112,20 +2128,20 @@ const $a = function(e) {
2112
2128
  * and the index column of the row numbers
2113
2129
  */
2114
2130
  headingsOn: function() {
2115
- let e = S();
2131
+ let e = I();
2116
2132
  return !e || !e.table || !e.table.classList.contains("jss_hidden_index");
2117
2133
  },
2118
2134
  headings: function(e) {
2119
- let t = S();
2135
+ let t = I();
2120
2136
  t && (e ? (t.showHeaders(), t.showIndex()) : (t.hideHeaders(), t.hideIndex()));
2121
2137
  },
2122
2138
  /** Zoom is a per worksheet view setting, like in Excel */
2123
2139
  zoomPct: function() {
2124
- let e = S();
2140
+ let e = I();
2125
2141
  return Math.round((e ? e.getZoom() : 1) * 100);
2126
2142
  },
2127
2143
  zoom: function(e) {
2128
- let t = S();
2144
+ let t = I();
2129
2145
  t && t.setZoom(Math.max(25, Math.min(200, e)) / 100);
2130
2146
  },
2131
2147
  fullscreen: function() {
@@ -2135,24 +2151,24 @@ const $a = function(e) {
2135
2151
  // A note is a plain string; the threaded comments of the extension share
2136
2152
  // the same storage as an array, so they are not a note
2137
2153
  getNote: function() {
2138
- let e = pe(), t = e ? S().getComments(e.name) : null;
2154
+ let e = pe(), t = e ? I().getComments(e.name) : null;
2139
2155
  return Array.isArray(t) ? null : t;
2140
2156
  },
2141
2157
  hasNote: function() {
2142
- let e = pe(), t = e ? S().getComments(e.name) : null;
2158
+ let e = pe(), t = e ? I().getComments(e.name) : null;
2143
2159
  return !!t && !Array.isArray(t);
2144
2160
  },
2145
2161
  hasComment: function() {
2146
2162
  let e = pe();
2147
- return Array.isArray(e ? S().getComments(e.name) : null);
2163
+ return Array.isArray(e ? I().getComments(e.name) : null);
2148
2164
  },
2149
2165
  setNote: function(e) {
2150
2166
  let t = pe();
2151
- t && S().setComments(t.name, e);
2167
+ t && I().setComments(t.name, e);
2152
2168
  },
2153
2169
  deleteNote: function() {
2154
2170
  let e = pe();
2155
- e && !Array.isArray(S().getComments(e.name)) && S().setComments(e.name, "");
2171
+ e && !Array.isArray(I().getComments(e.name)) && I().setComments(e.name, "");
2156
2172
  }
2157
2173
  }, an = function(e, t) {
2158
2174
  let n = String(t).trim(), r = n.lastIndexOf("!");
@@ -2165,11 +2181,11 @@ const $a = function(e) {
2165
2181
  * except the ones whose own properties say locked false
2166
2182
  */
2167
2183
  isOn: function() {
2168
- let e = S();
2184
+ let e = I();
2169
2185
  return !!(e && e.options.locked);
2170
2186
  },
2171
2187
  set: function(e) {
2172
- let t = S();
2188
+ let t = I();
2173
2189
  t.options.locked = !!e, k.protected = !!e, Z();
2174
2190
  },
2175
2191
  /**
@@ -2178,22 +2194,22 @@ const $a = function(e) {
2178
2194
  * name would decorate nothing
2179
2195
  */
2180
2196
  ranges: function() {
2181
- let e = S();
2197
+ let e = I();
2182
2198
  return e && e.options.unlockedRanges || [];
2183
2199
  },
2184
2200
  addRange: function(e) {
2185
- let t = S();
2201
+ let t = I();
2186
2202
  return an(t, e) ? (t.options.unlockedRanges = this.ranges().concat([e]), this.lock(e, !1), !0) : !1;
2187
2203
  },
2188
2204
  updateRange: function(e, t) {
2189
- let n = S(), r = this.ranges().slice();
2205
+ let n = I(), r = this.ranges().slice();
2190
2206
  if (!r[e] || !an(n, t))
2191
2207
  return !1;
2192
2208
  let a = r[e];
2193
2209
  return r[e] = t, n.options.unlockedRanges = r, this.lock(a, !0), this.unlockAll(), !0;
2194
2210
  },
2195
2211
  removeRange: function(e) {
2196
- let t = S(), n = this.ranges().slice(), r = n.splice(e, 1)[0];
2212
+ let t = I(), n = this.ranges().slice(), r = n.splice(e, 1)[0];
2197
2213
  t.options.unlockedRanges = n, r && (this.lock(r, !0), this.unlockAll());
2198
2214
  },
2199
2215
  unlockAll: function() {
@@ -2201,7 +2217,7 @@ const $a = function(e) {
2201
2217
  },
2202
2218
  /** Only the locked flag of the cells changes, the rest of them stays */
2203
2219
  lock: function(e, t) {
2204
- let n = S(), r = an(n, e);
2220
+ let n = I(), r = an(n, e);
2205
2221
  if (!r)
2206
2222
  return;
2207
2223
  let a = [];
@@ -2212,11 +2228,11 @@ const $a = function(e) {
2212
2228
  },
2213
2229
  /** Selection options of the worksheet, both on unless turned off */
2214
2230
  option: function(e) {
2215
- let t = S();
2231
+ let t = I();
2216
2232
  return !t || t.options[e] !== !1;
2217
2233
  },
2218
2234
  setOption: function(e, t) {
2219
- S().options[e] = !!t, Z();
2235
+ I().options[e] = !!t, Z();
2220
2236
  }
2221
2237
  }, At = {
2222
2238
  /**
@@ -2228,13 +2244,13 @@ const $a = function(e) {
2228
2244
  let r = [];
2229
2245
  n && n.toUpperCase() !== e.toUpperCase() && r.push({ index: n, value: void 0 });
2230
2246
  let a = t.charAt(0) === "=" ? t.substring(1).trim() : t;
2231
- /^\$?[A-Za-z]+\$?[0-9]+(:\$?[A-Za-z]+\$?[0-9]+)?$/.test(a) && (a = gn() + "!" + a), r.push({ index: e, value: a }), S().setDefinedNames(r);
2247
+ /^\$?[A-Za-z]+\$?[0-9]+(:\$?[A-Za-z]+\$?[0-9]+)?$/.test(a) && (a = gn() + "!" + a), r.push({ index: e, value: a }), I().setDefinedNames(r);
2232
2248
  },
2233
2249
  deleteName: function(e) {
2234
- S().setDefinedNames([{ index: e, value: void 0 }]);
2250
+ I().setDefinedNames([{ index: e, value: void 0 }]);
2235
2251
  },
2236
2252
  getNames: function() {
2237
- let e = S(), t = e.getDefinedNames && e.getDefinedNames() || {}, n = {};
2253
+ let e = I(), t = e.getDefinedNames && e.getDefinedNames() || {}, n = {};
2238
2254
  return Object.keys(t).forEach((r) => {
2239
2255
  ot(t[r]) || (n[r] = t[r]);
2240
2256
  }), n;
@@ -2245,7 +2261,7 @@ const $a = function(e) {
2245
2261
  * travels in the url property of the url editor
2246
2262
  */
2247
2263
  link: function(e, t) {
2248
- let n = pe(), r = S();
2264
+ let n = pe(), r = I();
2249
2265
  !n || !r || (Je([
2250
2266
  () => r.setValue([{ x: n.x, y: n.y, value: e }]),
2251
2267
  () => r.setCellProperties([{ x: n.x, y: n.y, value: { type: "url", options: { url: t } } }])
@@ -2253,17 +2269,17 @@ const $a = function(e) {
2253
2269
  },
2254
2270
  /** The anchor cell holds a link */
2255
2271
  hasLink: function() {
2256
- let e = pe(), t = e && S().getCellProperties(e.x, e.y);
2272
+ let e = pe(), t = e && I().getCellProperties(e.x, e.y);
2257
2273
  return !!(t && t.type === "url");
2258
2274
  },
2259
2275
  /** Destination of the link on the anchor cell, empty when it has none */
2260
2276
  linkAddress: function() {
2261
- let e = pe(), t = e && S().getCellProperties(e.x, e.y);
2277
+ let e = pe(), t = e && I().getCellProperties(e.x, e.y);
2262
2278
  return t && t.options && t.options.url || "";
2263
2279
  },
2264
2280
  /** Excel "Remove Link": the text stays, the link goes */
2265
2281
  removeLink: function() {
2266
- let e = pe(), t = S();
2282
+ let e = pe(), t = I();
2267
2283
  if (!e || !t)
2268
2284
  return;
2269
2285
  let n = Object.assign({}, t.getCells(e.name));
@@ -2271,7 +2287,7 @@ const $a = function(e) {
2271
2287
  },
2272
2288
  /** Excel "Checkbox": the selected cells become checkboxes */
2273
2289
  checkbox: function() {
2274
- let e = S(), t = [];
2290
+ let e = I(), t = [];
2275
2291
  et().forEach((n) => {
2276
2292
  for (let r = n[1]; r <= n[3]; r++)
2277
2293
  for (let a = n[0]; a <= n[2]; a++)
@@ -2279,15 +2295,15 @@ const $a = function(e) {
2279
2295
  }), t.length && e.setCellProperties(t), Z();
2280
2296
  },
2281
2297
  chart: function() {
2282
- let e = S(), t = e.parent.plugins && e.parent.plugins.charts;
2298
+ let e = I(), t = e.parent.plugins && e.parent.plugins.charts;
2283
2299
  t && t.open(e, Zt() || "A1:B4", "");
2284
2300
  },
2285
2301
  shape: function() {
2286
- let e = S(), t = e.parent.plugins && e.parent.plugins.shapes;
2302
+ let e = I(), t = e.parent.plugins && e.parent.plugins.shapes;
2287
2303
  t && (t.worksheet = e, t.insertModal.open());
2288
2304
  },
2289
2305
  picture: function() {
2290
- let e = S(), t = document.createElement("input");
2306
+ let e = I(), t = document.createElement("input");
2291
2307
  t.type = "file", t.accept = "image/*", t.onchange = function() {
2292
2308
  let n = t.files[0];
2293
2309
  if (!n)
@@ -2309,12 +2325,12 @@ const $a = function(e) {
2309
2325
  }, He = {
2310
2326
  /** Find tab of the find and replace dialog */
2311
2327
  find: function() {
2312
- let e = S();
2328
+ let e = I();
2313
2329
  e.parent.plugins && e.parent.plugins.findReplace && e.parent.plugins.findReplace.open(e, "find");
2314
2330
  },
2315
2331
  /** Replace tab of the find and replace dialog */
2316
2332
  findReplace: function() {
2317
- let e = S();
2333
+ let e = I();
2318
2334
  e.parent.plugins && e.parent.plugins.findReplace && e.parent.plugins.findReplace.open(e, "replace");
2319
2335
  },
2320
2336
  /** Import an XLSX file via the parser extension; rebuilds the workbook */
@@ -2322,12 +2338,12 @@ const $a = function(e) {
2322
2338
  openFile: ia,
2323
2339
  /** Export the whole workbook to XLSX via the render extension */
2324
2340
  exportXlsx: function() {
2325
- let e = S();
2341
+ let e = I();
2326
2342
  k.jss.render && k.jss.render(e.parent, { onbeforeloadimage: er });
2327
2343
  },
2328
2344
  /** Print to PDF via the print extension; browser print as fallback */
2329
2345
  printPdf: function() {
2330
- let e = S();
2346
+ let e = I();
2331
2347
  e.parent.tools && typeof e.parent.tools.exportPdf == "function" ? e.parent.tools.exportPdf(!0) : window.print();
2332
2348
  }
2333
2349
  }, _t = {
@@ -2346,25 +2362,25 @@ const $a = function(e) {
2346
2362
  let e = pe();
2347
2363
  if (!e)
2348
2364
  return "";
2349
- let t = S().getValueFromCoords(e.x, e.y);
2365
+ let t = I().getValueFromCoords(e.x, e.y);
2350
2366
  return t == null ? "" : String(t);
2351
2367
  }, vr = function(e) {
2352
2368
  let t = pe();
2353
- t && S().setValueFromCoords(t.x, t.y, e);
2369
+ t && I().setValueFromCoords(t.x, t.y, e);
2354
2370
  }, xr = function() {
2355
- let e = S();
2371
+ let e = I();
2356
2372
  if (!e)
2357
2373
  return null;
2358
2374
  let t = et(), n = 0, r = 0, a = 0;
2359
2375
  return t.forEach((l) => {
2360
2376
  for (let s = l[1]; s <= l[3]; s++)
2361
- for (let m = l[0]; m <= l[2]; m++) {
2362
- let b = e.getValueFromCoords(m, s);
2377
+ for (let u = l[0]; u <= l[2]; u++) {
2378
+ let b = e.getValueFromCoords(u, s);
2363
2379
  if (b === "" || b === null || b === void 0)
2364
2380
  continue;
2365
2381
  n++;
2366
2382
  let d = b;
2367
- typeof b == "string" && b.charAt(0) === "=" && (d = String(e.getValueFromCoords(m, s, !0)).replace(/[^0-9.eE+-]/g, ""));
2383
+ typeof b == "string" && b.charAt(0) === "=" && (d = String(e.getValueFromCoords(u, s, !0)).replace(/[^0-9.eE+-]/g, ""));
2368
2384
  let i = parseFloat(d);
2369
2385
  !isNaN(i) && isFinite(i) && String(d).trim() !== "" && (r++, a += i);
2370
2386
  }
@@ -2379,13 +2395,13 @@ document.addEventListener("mousedown", function(e) {
2379
2395
  }, !0);
2380
2396
  const pt = function(e) {
2381
2397
  let t = k.jss, n = !!e.multiple, r = !!e.formula, a = e.element || o("div", "xl-input xl-pick-field");
2382
- a.classList.add("xl-pick-field"), a.textContent = e.initial || "", a.worksheet = e.instance || S(), a.formula = r, a.addEventListener("keydown", function(s) {
2398
+ a.classList.add("xl-pick-field"), a.textContent = e.initial || "", a.worksheet = e.instance || I(), a.formula = r, a.addEventListener("keydown", function(s) {
2383
2399
  s.key === "Enter" ? s.preventDefault() : s.key === "Escape" && at() === a && s.stopPropagation();
2384
2400
  }), a.addEventListener("blur", function(s) {
2385
2401
  r && s.relatedTarget && !a.contains(s.relatedTarget) && !s.relatedTarget.closest(".jss_container") && a.cancel();
2386
2402
  }), r && a.addEventListener("click", function(s) {
2387
- let m = a.getBoundingClientRect();
2388
- m.width - (s.clientX - m.left) < 24 && a.pick();
2403
+ let u = a.getBoundingClientRect();
2404
+ u.width - (s.clientX - u.left) < 24 && a.pick();
2389
2405
  });
2390
2406
  let l = t.picker(a, r ? { type: "formula", equal: e.equal, worksheetName: !!e.worksheetName } : { worksheetName: !!e.worksheetName, multiple: n, equal: e.equal });
2391
2407
  return a.pick = function() {
@@ -2398,7 +2414,7 @@ const pt = function(e) {
2398
2414
  }, a.onchange = function(s) {
2399
2415
  e.onchange && e.onchange.call(a, s.trim());
2400
2416
  }, r && (a.onupdate = a.onchange), a;
2401
- }, St = function(e) {
2417
+ }, Rt = function(e) {
2402
2418
  let t = k.jss, n = e.element, r = n.parentNode;
2403
2419
  r.classList.add("xl-floating");
2404
2420
  let a = [].slice.call(document.querySelectorAll(".xl-overlay")).filter(function(d) {
@@ -2412,7 +2428,7 @@ const pt = function(e) {
2412
2428
  }, s = function(d) {
2413
2429
  let i = at();
2414
2430
  i && i !== d && n.contains(i) && i.cancel();
2415
- }, m = function(d) {
2431
+ }, u = function(d) {
2416
2432
  if (d.target.closest && d.target.closest(".jss_worksheet")) {
2417
2433
  let i = l().find((p) => p.formula && p.contains(document.activeElement)), g = at();
2418
2434
  i && (!g || g === i && !t.picker.validSelection()) && i.pick();
@@ -2420,10 +2436,10 @@ const pt = function(e) {
2420
2436
  }, b = function(d) {
2421
2437
  d.key === "Escape" && (d.stopImmediatePropagation(), at() && n.contains(at()) ? at().cancel() : e.close());
2422
2438
  };
2423
- return window.addEventListener("keydown", b, !0), document.addEventListener("mousedown", m, !0), n.addEventListener("focusin", function(d) {
2439
+ return window.addEventListener("keydown", b, !0), document.addEventListener("mousedown", u, !0), n.addEventListener("focusin", function(d) {
2424
2440
  s(d.target.closest(".xl-pick-field"));
2425
2441
  }), e.cleanup.push(function() {
2426
- s(), window.removeEventListener("keydown", b, !0), document.removeEventListener("mousedown", m, !0), a.forEach(function(d) {
2442
+ s(), window.removeEventListener("keydown", b, !0), document.removeEventListener("mousedown", u, !0), a.forEach(function(d) {
2427
2443
  d.style.display = "";
2428
2444
  });
2429
2445
  }), e;
@@ -2443,55 +2459,55 @@ const pt = function(e) {
2443
2459
  { label: "OK", primary: !0, onclick: l },
2444
2460
  { label: "Cancel" }
2445
2461
  ]);
2446
- return n.addEventListener("keydown", function(m) {
2447
- m.key === "Enter" && (l(), s.close());
2462
+ return n.addEventListener("keydown", function(u) {
2463
+ u.key === "Enter" && (l(), s.close());
2448
2464
  }), s.onclose = function() {
2449
2465
  a && e.done && e.done(a), e.onfinish && e.onfinish(a);
2450
- }, St(s), (e.multiple || !n.textContent) && n.pick(), s;
2466
+ }, Rt(s), (e.multiple || !n.textContent) && n.pick(), s;
2451
2467
  }, Tr = function() {
2452
2468
  let e = null;
2453
- const t = function(u) {
2454
- return typeof document < "u" && document.dictionary && document.dictionary[u] || u;
2455
- }, n = Date.UTC(1900, 0, 0), r = Date.UTC(1900, 1, 29), a = 864e5, l = function(u) {
2456
- return u = "" + u, u.length === 1 && (u = "0" + u), u;
2457
- }, s = function(u) {
2458
- typeof u == "string" && (u = /* @__PURE__ */ new Date(u + " GMT+0"));
2459
- let D = u.getTime();
2469
+ const t = function(m) {
2470
+ return typeof document < "u" && document.dictionary && document.dictionary[m] || m;
2471
+ }, n = Date.UTC(1900, 0, 0), r = Date.UTC(1900, 1, 29), a = 864e5, l = function(m) {
2472
+ return m = "" + m, m.length === 1 && (m = "0" + m), m;
2473
+ }, s = function(m) {
2474
+ typeof m == "string" && (m = /* @__PURE__ */ new Date(m + " GMT+0"));
2475
+ let D = m.getTime();
2460
2476
  return D >= r && (D += a), D -= n, D / a;
2461
- }, m = function(u) {
2462
- if (u == null || u === "")
2477
+ }, u = function(m) {
2478
+ if (m == null || m === "")
2463
2479
  return "";
2464
- let D = u - Math.floor(u), B = Math.round(D * 86400), H = Math.floor(B / 3600), I = Math.floor(B % 3600 / 60), P = B % 60;
2465
- return l(H) + ":" + l(I) + ":" + l(P);
2466
- }, b = function(u, D, B) {
2467
- let H = document.createElement("div");
2468
- H.className = "jdv-overlay";
2469
- let I = document.createElement("div");
2470
- I.className = "jdv-dialog";
2471
- let P = function() {
2472
- H.remove(), document.removeEventListener("keydown", j, !0);
2473
- }, j = function(ne) {
2474
- ne.key === "Escape" && (ne.stopImmediatePropagation(), P());
2480
+ let D = m - Math.floor(m), V = Math.round(D * 86400), P = Math.floor(V / 3600), S = Math.floor(V % 3600 / 60), B = V % 60;
2481
+ return l(P) + ":" + l(S) + ":" + l(B);
2482
+ }, b = function(m, D, V) {
2483
+ let P = document.createElement("div");
2484
+ P.className = "jdv-overlay";
2485
+ let S = document.createElement("div");
2486
+ S.className = "jdv-dialog";
2487
+ let B = function() {
2488
+ P.remove(), document.removeEventListener("keydown", G, !0);
2489
+ }, G = function(ee) {
2490
+ ee.key === "Escape" && (ee.stopImmediatePropagation(), B());
2475
2491
  };
2476
- document.addEventListener("keydown", j, !0);
2477
- let G = document.createElement("div");
2478
- G.className = "jdv-dialog-header", G.textContent = t("Data Validation");
2492
+ document.addEventListener("keydown", G, !0);
2493
+ let j = document.createElement("div");
2494
+ j.className = "jdv-dialog-header", j.textContent = t("Data Validation");
2479
2495
  let M = document.createElement("div");
2480
- M.className = "jdv-dialog-body", M.textContent = u;
2496
+ M.className = "jdv-dialog-body", M.textContent = m;
2481
2497
  let K = document.createElement("div");
2482
2498
  K.className = "jdv-dialog-footer";
2483
2499
  let W = document.createElement("button");
2484
2500
  if (W.type = "button", W.className = "jdv-btn jdv-btn-primary", W.textContent = t("OK"), W.onclick = function() {
2485
- P(), D && D();
2486
- }, K.appendChild(W), B) {
2487
- let ne = document.createElement("button");
2488
- ne.type = "button", ne.className = "jdv-btn", ne.textContent = t("Cancel"), ne.onclick = P, K.appendChild(ne);
2501
+ B(), D && D();
2502
+ }, K.appendChild(W), V) {
2503
+ let ee = document.createElement("button");
2504
+ ee.type = "button", ee.className = "jdv-btn", ee.textContent = t("Cancel"), ee.onclick = B, K.appendChild(ee);
2489
2505
  }
2490
- I.appendChild(G), I.appendChild(M), I.appendChild(K), H.appendChild(I), document.body.appendChild(H), W.focus();
2491
- }, d = function(u) {
2492
- b(u);
2493
- }, i = function(u, D) {
2494
- b(u, D, !0);
2506
+ S.appendChild(j), S.appendChild(M), S.appendChild(K), P.appendChild(S), document.body.appendChild(P), W.focus();
2507
+ }, d = function(m) {
2508
+ b(m);
2509
+ }, i = function(m, D) {
2510
+ b(m, D, !0);
2495
2511
  }, g = [
2496
2512
  { value: "between", text: t("between") },
2497
2513
  { value: "not between", text: t("not between") },
@@ -2501,8 +2517,8 @@ const pt = function(e) {
2501
2517
  { value: "<", text: t("less than") },
2502
2518
  { value: ">=", text: t("greater than or equal to") },
2503
2519
  { value: "<=", text: t("less than or equal to") }
2504
- ], p = g.filter(function(u) {
2505
- return u.value !== "!=";
2520
+ ], p = g.filter(function(m) {
2521
+ return m.value !== "!=";
2506
2522
  }), f = {
2507
2523
  any: null,
2508
2524
  number: "number",
@@ -2511,11 +2527,11 @@ const pt = function(e) {
2511
2527
  time: "time",
2512
2528
  textLength: "textLength",
2513
2529
  custom: "formula"
2514
- }, c = function(u) {
2515
- return u.type === "formula" ? "custom" : u.type === "number" || u.type === "list" || u.type === "date" || u.type === "time" || u.type === "textLength" ? u.type : null;
2530
+ }, c = function(m) {
2531
+ return m.type === "formula" ? "custom" : m.type === "number" || m.type === "list" || m.type === "date" || m.type === "time" || m.type === "textLength" ? m.type : null;
2516
2532
  }, h = function() {
2517
- let u = this;
2518
- u.allowOptions = [
2533
+ let m = this;
2534
+ m.allowOptions = [
2519
2535
  { value: "any", text: t("Any value") },
2520
2536
  { value: "number", text: t("Number") },
2521
2537
  { value: "list", text: t("List") },
@@ -2523,135 +2539,135 @@ const pt = function(e) {
2523
2539
  { value: "time", text: t("Time") },
2524
2540
  { value: "textLength", text: t("Text length") },
2525
2541
  { value: "custom", text: t("Custom") }
2526
- ], u.criterias = g;
2527
- const D = function(I) {
2528
- let P = [], j = "", G = !1;
2542
+ ], m.criterias = g;
2543
+ const D = function(S) {
2544
+ let B = [], G = "", j = !1;
2529
2545
  const M = function() {
2530
- let K = j.trim();
2531
- K && P.push(K), j = "";
2546
+ let K = G.trim();
2547
+ K && B.push(K), G = "";
2532
2548
  };
2533
- for (let K = 0; K < I.length; K++) {
2534
- let W = I[K];
2535
- W === "'" && (G = !G), !G && W === "," ? M() : j += W;
2536
- }
2537
- return M(), P;
2538
- }, B = function(I, P) {
2539
- let j = e.helpers.verifyWorksheetName(P);
2540
- return D(I).map(function(G) {
2541
- return G.indexOf("!") === -1 ? j + "!" + G : G;
2549
+ for (let K = 0; K < S.length; K++) {
2550
+ let W = S[K];
2551
+ W === "'" && (j = !j), !j && W === "," ? M() : G += W;
2552
+ }
2553
+ return M(), B;
2554
+ }, V = function(S, B) {
2555
+ let G = e.helpers.verifyWorksheetName(B);
2556
+ return D(S).map(function(j) {
2557
+ return j.indexOf("!") === -1 ? G + "!" + j : j;
2542
2558
  }).join(",");
2543
- }, H = function() {
2559
+ }, P = function() {
2544
2560
  pt({
2545
- element: u.sourceField,
2561
+ element: m.sourceField,
2546
2562
  worksheetName: !0,
2547
2563
  equal: !0,
2548
- onchange: function(I) {
2549
- u.source !== I && (u.source = I);
2564
+ onchange: function(S) {
2565
+ m.source !== S && (m.source = S);
2550
2566
  }
2551
2567
  });
2552
2568
  };
2553
- return u.cancelPicker = function() {
2554
- u.sourceField && u.sourceField.cancel();
2555
- }, u.clearAll = function() {
2556
- u.allow = "any", u.criteria = "between", u.start = "", u.end = "", u.startDate = "", u.endDate = "", u.startTime = "", u.endTime = "", u.source = "", u.formula = "", u.ignoreBlank = !0, u.dropdown = !0, u.errorStyle = "stop", u.errorMessage = "", u.update();
2557
- }, u.load = function(I, P, j, G) {
2558
- if (u.index = I, u.removeList = G || [], u.clearAll(), u.range = j || "", u.sourceField && (u.sourceField.worksheet = u.instance), P) {
2559
- let M = Array.isArray(P.value) ? P.value : [];
2560
- u.allow = c(P) || "any", u.criteria = P.criteria || "between", u.allow === "date" ? (u.startDate = M[0] || "", u.endDate = M[1] || "") : u.allow === "time" ? (u.startTime = m(M[0]), u.endTime = m(M[1])) : u.allow === "list" ? (u.source = Array.isArray(M[0]) ? M[0].join(",") : M[0] ? "=" + M[0] : "", u.dropdown = P.dropdown === !0) : u.allow === "custom" ? u.formula = M[0] || "" : (u.start = typeof M[0] > "u" ? "" : M[0], u.end = typeof M[1] > "u" ? "" : M[1]), u.ignoreBlank = P.allowBlank !== !1, u.errorStyle = P.action === "reject" ? "stop" : "warning", u.errorMessage = P.text || "";
2561
- }
2562
- u.update();
2563
- }, u.update = function() {
2564
- if (!u.el)
2569
+ return m.cancelPicker = function() {
2570
+ m.sourceField && m.sourceField.cancel();
2571
+ }, m.clearAll = function() {
2572
+ m.allow = "any", m.criteria = "between", m.start = "", m.end = "", m.startDate = "", m.endDate = "", m.startTime = "", m.endTime = "", m.source = "", m.formula = "", m.ignoreBlank = !0, m.dropdown = !0, m.errorStyle = "stop", m.errorMessage = "", m.update();
2573
+ }, m.load = function(S, B, G, j) {
2574
+ if (m.index = S, m.removeList = j || [], m.clearAll(), m.range = G || "", m.sourceField && (m.sourceField.worksheet = m.instance), B) {
2575
+ let M = Array.isArray(B.value) ? B.value : [];
2576
+ m.allow = c(B) || "any", m.criteria = B.criteria || "between", m.allow === "date" ? (m.startDate = M[0] || "", m.endDate = M[1] || "") : m.allow === "time" ? (m.startTime = u(M[0]), m.endTime = u(M[1])) : m.allow === "list" ? (m.source = Array.isArray(M[0]) ? M[0].join(",") : M[0] ? "=" + M[0] : "", m.dropdown = B.dropdown === !0) : m.allow === "custom" ? m.formula = M[0] || "" : (m.start = typeof M[0] > "u" ? "" : M[0], m.end = typeof M[1] > "u" ? "" : M[1]), m.ignoreBlank = B.allowBlank !== !1, m.errorStyle = B.action === "reject" ? "stop" : "warning", m.errorMessage = B.text || "";
2577
+ }
2578
+ m.update();
2579
+ }, m.update = function() {
2580
+ if (!m.el)
2565
2581
  return;
2566
- let I = u.allow === "date" ? p : g;
2567
- u.criterias !== I && (u.criterias = I), u.el.querySelectorAll("[data-section]").forEach(function(K) {
2568
- let W = K.getAttribute("data-section").split(" ").indexOf(u.allow) !== -1;
2582
+ let S = m.allow === "date" ? p : g;
2583
+ m.criterias !== S && (m.criterias = S), m.el.querySelectorAll("[data-section]").forEach(function(K) {
2584
+ let W = K.getAttribute("data-section").split(" ").indexOf(m.allow) !== -1;
2569
2585
  K.style.display = W ? "" : "none";
2570
2586
  });
2571
- let j = u.criteria === "between" || u.criteria === "not between", G = t(j ? "Minimum" : "Value");
2572
- u.startLabel !== G && (u.startLabel = G), u.el.querySelectorAll("[data-control]").forEach(function(K) {
2573
- let W = K.getAttribute("data-control"), ne;
2574
- W === "criteria" ? ne = u.allow !== "any" && u.allow !== "list" && u.allow !== "custom" : W === "end" ? ne = j : W === "blank" && (ne = u.allow !== "any"), K.setAttribute("data-visible", ne);
2587
+ let G = m.criteria === "between" || m.criteria === "not between", j = t(G ? "Minimum" : "Value");
2588
+ m.startLabel !== j && (m.startLabel = j), m.el.querySelectorAll("[data-control]").forEach(function(K) {
2589
+ let W = K.getAttribute("data-control"), ee;
2590
+ W === "criteria" ? ee = m.allow !== "any" && m.allow !== "list" && m.allow !== "custom" : W === "end" ? ee = G : W === "blank" && (ee = m.allow !== "any"), K.setAttribute("data-visible", ee);
2575
2591
  });
2576
- }, u.onchange = function(I) {
2577
- I === "allow" && (u.start = "", u.end = "", u.criteria = "between"), setTimeout(function() {
2578
- u.update();
2592
+ }, m.onchange = function(S) {
2593
+ S === "allow" && (m.start = "", m.end = "", m.criteria = "between"), setTimeout(function() {
2594
+ m.update();
2579
2595
  });
2580
- }, u.onload = function() {
2581
- H(), u.update();
2582
- }, u.close = function() {
2596
+ }, m.onload = function() {
2597
+ P(), m.update();
2598
+ }, m.close = function() {
2583
2599
  gt.dispatch("dataValidations:close");
2584
- }, u.save = function() {
2585
- if (!u.range) {
2600
+ }, m.save = function() {
2601
+ if (!m.range) {
2586
2602
  d(t("The range is mandatory"));
2587
2603
  return;
2588
2604
  }
2589
- if (u.allow === "any") {
2590
- let G = (u.removeList || []).slice();
2591
- u.index !== null && G.push(u.index), G.length && u.instance.resetValidations(G), u.close();
2605
+ if (m.allow === "any") {
2606
+ let j = (m.removeList || []).slice();
2607
+ m.index !== null && j.push(m.index), j.length && m.instance.resetValidations(j), m.close();
2592
2608
  return;
2593
2609
  }
2594
- let I = u.criteria === "between" || u.criteria === "not between", P = {
2595
- range: B(u.range, u.instance.getWorksheetName()),
2596
- type: f[u.allow],
2597
- action: u.errorStyle === "stop" ? "reject" : "warning",
2598
- text: u.errorMessage,
2599
- allowBlank: !!u.ignoreBlank
2610
+ let S = m.criteria === "between" || m.criteria === "not between", B = {
2611
+ range: V(m.range, m.instance.getWorksheetName()),
2612
+ type: f[m.allow],
2613
+ action: m.errorStyle === "stop" ? "reject" : "warning",
2614
+ text: m.errorMessage,
2615
+ allowBlank: !!m.ignoreBlank
2600
2616
  };
2601
- if (u.allow !== "list" && u.allow !== "custom" && (P.criteria = u.criteria), u.allow === "date") {
2602
- if (!u.startDate || I && !u.endDate) {
2617
+ if (m.allow !== "list" && m.allow !== "custom" && (B.criteria = m.criteria), m.allow === "date") {
2618
+ if (!m.startDate || S && !m.endDate) {
2603
2619
  d(t("The value is mandatory"));
2604
2620
  return;
2605
2621
  }
2606
- P.value = I ? [u.startDate, u.endDate] : [u.startDate];
2607
- } else if (u.allow === "time") {
2608
- if (!u.startTime || I && !u.endTime) {
2622
+ B.value = S ? [m.startDate, m.endDate] : [m.startDate];
2623
+ } else if (m.allow === "time") {
2624
+ if (!m.startTime || S && !m.endTime) {
2609
2625
  d(t("The value is mandatory"));
2610
2626
  return;
2611
2627
  }
2612
- I ? P.value = [s("1899-12-31 " + u.startTime), s("1899-12-31 " + u.endTime)] : P.value = [s("1899-12-31 " + u.startTime)];
2613
- } else if (u.allow === "list") {
2614
- let G = (u.source || "").trim();
2615
- if (!G) {
2628
+ S ? B.value = [s("1899-12-31 " + m.startTime), s("1899-12-31 " + m.endTime)] : B.value = [s("1899-12-31 " + m.startTime)];
2629
+ } else if (m.allow === "list") {
2630
+ let j = (m.source || "").trim();
2631
+ if (!j) {
2616
2632
  d(t("The source is mandatory"));
2617
2633
  return;
2618
2634
  }
2619
- if (G[0] === "=") {
2620
- let M = G.substring(1).trim();
2635
+ if (j[0] === "=") {
2636
+ let M = j.substring(1).trim();
2621
2637
  if (!e.helpers.tokenIdentifier(M)) {
2622
2638
  d(t("The reference is not valid"));
2623
2639
  return;
2624
2640
  }
2625
- P.value = [M];
2641
+ B.value = [M];
2626
2642
  } else
2627
- P.value = [G.split(",")];
2628
- P.dropdown = !!u.dropdown;
2629
- } else if (u.allow === "custom") {
2630
- let G = (u.formula || "").trim();
2631
- if (!G) {
2643
+ B.value = [j.split(",")];
2644
+ B.dropdown = !!m.dropdown;
2645
+ } else if (m.allow === "custom") {
2646
+ let j = (m.formula || "").trim();
2647
+ if (!j) {
2632
2648
  d(t("The formula is mandatory"));
2633
2649
  return;
2634
2650
  }
2635
- G[0] !== "=" && (G = "=" + G), P.value = [G];
2651
+ j[0] !== "=" && (j = "=" + j), B.value = [j];
2636
2652
  } else {
2637
- if (u.start === "" || I && u.end === "") {
2653
+ if (m.start === "" || S && m.end === "") {
2638
2654
  d(t("The value is mandatory"));
2639
2655
  return;
2640
2656
  }
2641
- let G = parseFloat(u.start), M = parseFloat(u.end);
2642
- if (isNaN(G) || I && isNaN(M)) {
2657
+ let j = parseFloat(m.start), M = parseFloat(m.end);
2658
+ if (isNaN(j) || S && isNaN(M)) {
2643
2659
  d(t("The value must be a number"));
2644
2660
  return;
2645
2661
  }
2646
- if (I && M < G) {
2662
+ if (S && M < j) {
2647
2663
  d(t("The maximum must be greater than or equal to the minimum"));
2648
2664
  return;
2649
2665
  }
2650
- P.value = I ? [G, M] : [G];
2666
+ B.value = S ? [j, M] : [j];
2651
2667
  }
2652
- u.removeList && u.removeList.length && (u.instance.resetValidations(u.removeList), u.removeList = []);
2653
- let j = { value: P };
2654
- u.index !== null && (j.index = u.index), u.instance.setValidations(j), u.close();
2668
+ m.removeList && m.removeList.length && (m.instance.resetValidations(m.removeList), m.removeList = []);
2669
+ let G = { value: B };
2670
+ m.index !== null && (G.index = m.index), m.instance.setValidations(G), m.close();
2655
2671
  }, `<div class="jdv">
2656
2672
  <lm-tabs>
2657
2673
  <div title="${t("Settings")}">
@@ -2804,72 +2820,72 @@ const pt = function(e) {
2804
2820
  <button type="button" class="jdv-btn" onclick="self.close">${t("Cancel")}</button>
2805
2821
  </div>
2806
2822
  </div>`;
2807
- }, y = function(u) {
2823
+ }, y = function(m) {
2808
2824
  let D = {};
2809
2825
  gt.set("dataValidations:close", function() {
2810
2826
  D.modal && D.modal.close();
2811
2827
  }), D.closed = function() {
2812
2828
  D.form && D.form.cancelPicker();
2813
- }, D.open = function(I) {
2814
- let P = I.getHighlighted && I.getHighlighted();
2815
- if (!P || !P.length) {
2816
- let v = I.getSelection && I.getSelection();
2829
+ }, D.open = function(S) {
2830
+ let B = S.getHighlighted && S.getHighlighted();
2831
+ if (!B || !B.length) {
2832
+ let v = S.getSelection && S.getSelection();
2817
2833
  if (!v || !v.length)
2818
2834
  return;
2819
- P = [v];
2835
+ B = [v];
2820
2836
  }
2821
- let j = I.parent.config.validations || [], G = /* @__PURE__ */ new Map(), M = /* @__PURE__ */ new Map(), K = 0;
2822
- for (let v = 0; v < P.length; v++) {
2823
- let w = P[v];
2837
+ let G = S.parent.config.validations || [], j = /* @__PURE__ */ new Map(), M = /* @__PURE__ */ new Map(), K = 0;
2838
+ for (let v = 0; v < B.length; v++) {
2839
+ let w = B[v];
2824
2840
  for (let x = w[1]; x <= w[3]; x++)
2825
2841
  for (let R = w[0]; R <= w[2]; R++) {
2826
2842
  K++;
2827
- let _ = I.loadValidations(R, x);
2843
+ let _ = S.loadValidations(R, x);
2828
2844
  if (_)
2829
2845
  for (let L = 0; L < _.length; L++) {
2830
2846
  let A = _[L];
2831
2847
  if (A.action === "warning" || A.action === "reject") {
2832
- let V = j.indexOf(A);
2833
- G.set(V, A), M.set(V, (M.get(V) || 0) + 1);
2848
+ let H = G.indexOf(A);
2849
+ j.set(H, A), M.set(H, (M.get(H) || 0) + 1);
2834
2850
  }
2835
2851
  }
2836
2852
  }
2837
2853
  }
2838
- let W = Array.from(G), ne = ma() || I.getRange();
2854
+ let W = Array.from(j), ee = ma() || S.getRange();
2839
2855
  const ge = function(v, w, x, R) {
2840
- D.form.instance = I, D.form.load(v, w, x, R), D.modal.open();
2856
+ D.form.instance = S, D.form.load(v, w, x, R), D.modal.open();
2841
2857
  };
2842
2858
  if (W.length === 1) {
2843
2859
  let v = W[0][0], w = W[0][1], x = M.get(v) === K;
2844
2860
  x && c(w) ? ge(v, w, w.range, []) : x ? i(t("The existing validation cannot be edited here. Do you want to replace it with a new one?"), function() {
2845
- ge(null, null, ne, [v]);
2861
+ ge(null, null, ee, [v]);
2846
2862
  }) : i(t("The current validation applies to only part of the selection. Do you want to replace it with a new validation for the whole selection?"), function() {
2847
- ge(null, null, ne, [v]);
2863
+ ge(null, null, ee, [v]);
2848
2864
  });
2849
2865
  } else W.length > 1 ? i(t("The selection contains more than one validation. Do you want to replace them with a new one?"), function() {
2850
- ge(null, null, ne, W.map(function(v) {
2866
+ ge(null, null, ee, W.map(function(v) {
2851
2867
  return v[0];
2852
2868
  }));
2853
- }) : ge(null, null, ne, []);
2869
+ }) : ge(null, null, ee, []);
2854
2870
  };
2855
- const B = function() {
2856
- let I = `<lm-modal title="${t("Data Validation")}" draggable="true" closable="true" closed="true" width="460" icon="rule_settings" :ref="self.modal" :onclose="self.closed">
2871
+ const V = function() {
2872
+ let S = `<lm-modal title="${t("Data Validation")}" draggable="true" closable="true" closed="true" width="460" icon="rule_settings" :ref="self.modal" :onclose="self.closed">
2857
2873
  <div class="jss_object lm-p20">
2858
2874
  <Form :ref="self.form" />
2859
2875
  </div>
2860
2876
  </lm-modal>`;
2861
- return gt.element(I, D, { Form: h });
2877
+ return gt.element(S, D, { Form: h });
2862
2878
  };
2863
- let H = document.createElement("div");
2864
- return u.tools.append(H), gt.render(B, H), D;
2879
+ let P = document.createElement("div");
2880
+ return m.tools.append(P), gt.render(V, P), D;
2865
2881
  }, T = function() {
2866
2882
  return !0;
2867
2883
  };
2868
- return T.oninit = function(u, D) {
2869
- u.setPlugins({
2884
+ return T.oninit = function(m, D) {
2885
+ m.setPlugins({
2870
2886
  dataValidations: y
2871
2887
  });
2872
- }, T.license = function(u) {
2888
+ }, T.license = function(m) {
2873
2889
  e === null && (e = this);
2874
2890
  }, T;
2875
2891
  }();
@@ -2934,12 +2950,12 @@ const ya = function(e, t) {
2934
2950
  b.appendChild(he(l.checked ? "check" : l.icon)), s.appendChild(b);
2935
2951
  }
2936
2952
  s.appendChild(o("span", "xl-menu-label", l.label)), l.shortcut && s.appendChild(o("span", "xl-menu-shortcut", l.shortcut));
2937
- let m = l.submenu || l.panel;
2938
- if (m && !l.disabled) {
2953
+ let u = l.submenu || l.panel;
2954
+ if (u && !l.disabled) {
2939
2955
  s.appendChild(o("span", "xl-menu-arrow", "&#9656;"));
2940
2956
  const b = function() {
2941
2957
  Vn(n + 1), s.classList.add("xl-menu-open");
2942
- let d = typeof m == "function" ? m() : m, i;
2958
+ let d = typeof u == "function" ? u() : u, i;
2943
2959
  Array.isArray(d) ? i = va(s, d, n + 1, !0) : (i = o("div", "xl-menu jss_object", d), i.anchor = s, Hn(i, s), We.push(i)), i.owner = s;
2944
2960
  };
2945
2961
  s.addEventListener("mouseenter", b), s.addEventListener("click", b), s.addEventListener("mousedown", (d) => d.preventDefault());
@@ -2956,23 +2972,23 @@ const ya = function(e, t) {
2956
2972
  }, rn = function(e) {
2957
2973
  return typeof document < "u" && document.dictionary && document.dictionary[e] || e;
2958
2974
  }, Gn = ["#FFFFFF", "#000000", "#E7E6E6", "#44546A", "#4472C4", "#ED7D31", "#A5A5A5", "#FFC000", "#5B9BD5", "#70AD47"], Er = ["#C00000", "#FF0000", "#FFC000", "#FFFF00", "#92D050", "#00B050", "#00B0F0", "#0070C0", "#002060", "#7030A0"], wr = function(e, t) {
2959
- let n = parseInt(e.slice(1), 16), r = n >> 16 & 255, a = n >> 8 & 255, l = n & 255, s = function(m) {
2960
- return m = t > 0 ? m + (255 - m) * t : m * (1 + t), Math.max(0, Math.min(255, Math.round(m)));
2975
+ let n = parseInt(e.slice(1), 16), r = n >> 16 & 255, a = n >> 8 & 255, l = n & 255, s = function(u) {
2976
+ return u = t > 0 ? u + (255 - u) * t : u * (1 + t), Math.max(0, Math.min(255, Math.round(u)));
2961
2977
  };
2962
- return "#" + [s(r), s(a), s(l)].map((m) => m.toString(16).padStart(2, "0")).join("").toUpperCase();
2978
+ return "#" + [s(r), s(a), s(l)].map((u) => u.toString(16).padStart(2, "0")).join("").toUpperCase();
2963
2979
  }, $t = function(e, t, n) {
2964
2980
  let r = o("div", "xl-palette");
2965
2981
  r.appendChild(o("div", "xl-palette-title", rn("Theme Colors")));
2966
2982
  let a = o("div", "xl-palette-grid");
2967
- Gn.forEach((m) => a.appendChild(on(m, t))), [0.8, 0.6, 0.4, -0.25, -0.5].forEach((m) => {
2968
- Gn.forEach((b) => a.appendChild(on(wr(b, m), t)));
2983
+ Gn.forEach((u) => a.appendChild(on(u, t))), [0.8, 0.6, 0.4, -0.25, -0.5].forEach((u) => {
2984
+ Gn.forEach((b) => a.appendChild(on(wr(b, u), t)));
2969
2985
  }), r.appendChild(a), r.appendChild(o("div", "xl-palette-title", rn("Standard Colors")));
2970
2986
  let l = o("div", "xl-palette-grid");
2971
- if (Er.forEach((m) => l.appendChild(on(m, t))), r.appendChild(l), n && n.noColor) {
2972
- let m = o("div", "xl-menu-item", '<span class="xl-menu-label">' + n.noColor + "</span>");
2973
- m.onclick = function() {
2987
+ if (Er.forEach((u) => l.appendChild(on(u, t))), r.appendChild(l), n && n.noColor) {
2988
+ let u = o("div", "xl-menu-item", '<span class="xl-menu-label">' + n.noColor + "</span>");
2989
+ u.onclick = function() {
2974
2990
  De(), t("");
2975
- }, r.appendChild(m);
2991
+ }, r.appendChild(u);
2976
2992
  }
2977
2993
  r.appendChild(o("div", "xl-menu-hr"));
2978
2994
  let s = o("div", "xl-menu-item", '<span class="xl-menu-label">' + rn("More Colors...") + "</span>");
@@ -2997,16 +3013,16 @@ const Cr = function(e, t) {
2997
3013
  r.type = "button";
2998
3014
  let a = o("span", "xl-color-field-swatch"), l = o("span", "xl-color-field-label"), s = o("span", "xl-color-field-caret", "&#9662;");
2999
3015
  r.appendChild(a), r.appendChild(l), r.appendChild(s);
3000
- let m = n && n.noColor || "";
3016
+ let u = n && n.noColor || "";
3001
3017
  const b = function(d) {
3002
- r.value = d || "", a.style.backgroundColor = d || "transparent", a.classList.toggle("xl-color-field-empty", !d), l.textContent = d || m, l.classList.toggle("xl-color-field-placeholder", !d);
3018
+ r.value = d || "", a.style.backgroundColor = d || "transparent", a.classList.toggle("xl-color-field-empty", !d), l.textContent = d || u, l.classList.toggle("xl-color-field-placeholder", !d);
3003
3019
  };
3004
3020
  return b(e || ""), r.onclick = function() {
3005
3021
  $t(r, function(d) {
3006
3022
  b(d || ""), t(d || "");
3007
3023
  }, n);
3008
3024
  }, r;
3009
- }, Rr = function() {
3025
+ }, Sr = function() {
3010
3026
  let e = null;
3011
3027
  const t = function(v) {
3012
3028
  return typeof document < "u" && document.dictionary && document.dictionary[v] || v;
@@ -3036,7 +3052,7 @@ const Cr = function(e, t) {
3036
3052
  { value: "<", text: t("less than") },
3037
3053
  { value: ">=", text: t("greater than or equal to") },
3038
3054
  { value: "<=", text: t("less than or equal to") }
3039
- ], m = [
3055
+ ], u = [
3040
3056
  { value: "contains", text: t("containing") },
3041
3057
  { value: "not contains", text: t("not containing") },
3042
3058
  { value: "begins with", text: t("beginning with") },
@@ -3072,8 +3088,8 @@ const Cr = function(e, t) {
3072
3088
  let L = e.helpers.getCoordsFromRange(R[_].toUpperCase());
3073
3089
  if (!L || L.length < 4 || L.some((J) => typeof J != "number" || isNaN(J)))
3074
3090
  return null;
3075
- let A = Math.min(L[0], L[2]), V = Math.min(L[1], L[3]);
3076
- (w === null || A < w) && (w = A), (x === null || V < x) && (x = V);
3091
+ let A = Math.min(L[0], L[2]), H = Math.min(L[1], L[3]);
3092
+ (w === null || A < w) && (w = A), (x === null || H < x) && (x = H);
3077
3093
  }
3078
3094
  return w === null ? null : [w, x];
3079
3095
  }, p = function(v, w, x) {
@@ -3112,23 +3128,23 @@ const Cr = function(e, t) {
3112
3128
  }, T = function(v, w) {
3113
3129
  let x = jn(v, w);
3114
3130
  return x.classList.add("jcf-color"), x;
3115
- }, u = function(v, w, x) {
3131
+ }, m = function(v, w, x) {
3116
3132
  return jn(v, x, { noColor: w });
3117
3133
  }, D = function(v, w, x) {
3118
3134
  let R = o("input");
3119
3135
  return R.type = "checkbox", R.checked = !!w, R.onchange = function() {
3120
3136
  x(R.checked);
3121
3137
  }, o("label", "xl-check", [R, o("span", null, v)]);
3122
- }, B = function(v, w, x, R, _) {
3138
+ }, V = function(v, w, x, R, _) {
3123
3139
  let L = o("input");
3124
3140
  return L.type = "radio", L.name = v, L.value = x, L.checked = R === x, L.onchange = function() {
3125
3141
  L.checked && _(x);
3126
3142
  }, o("label", "xl-check", [L, o("span", null, w)]);
3127
- }, H = function(v) {
3143
+ }, P = function(v) {
3128
3144
  return o("div", "jcf-grid-head", v);
3129
- }, I = function(v) {
3145
+ }, S = function(v) {
3130
3146
  return o("div", "jcf-grid-label", v);
3131
- }, P = function(v, w) {
3147
+ }, B = function(v, w) {
3132
3148
  let x = Object.assign({}, v), R = o("div", null), _;
3133
3149
  const L = function() {
3134
3150
  let F = _.style;
@@ -3142,33 +3158,33 @@ const Cr = function(e, t) {
3142
3158
  x[F] = Y, L(), N();
3143
3159
  };
3144
3160
  };
3145
- let V = o("fieldset", "jcf-fieldset");
3146
- V.appendChild(o("legend", null, t("Font")));
3161
+ let H = o("fieldset", "jcf-fieldset");
3162
+ H.appendChild(o("legend", null, t("Font")));
3147
3163
  let J = o("div", "jcf-grid jcf-grid-format", [
3148
- I(t("Color") + ":"),
3149
- u(x.color, t("Automatic"), A("color")),
3150
- I(t("Fill") + ":"),
3151
- u(x.background, t("No Fill"), A("background"))
3164
+ S(t("Color") + ":"),
3165
+ m(x.color, t("Automatic"), A("color")),
3166
+ S(t("Fill") + ":"),
3167
+ m(x.background, t("No Fill"), A("background"))
3152
3168
  ]);
3153
- V.appendChild(J), V.appendChild(o("div", "jcf-check-row", [
3169
+ H.appendChild(J), H.appendChild(o("div", "jcf-check-row", [
3154
3170
  D(t("Bold"), x.bold, A("bold")),
3155
3171
  D(t("Italic"), x.italic, A("italic")),
3156
3172
  D(t("Underline"), x.underline, A("underline")),
3157
3173
  D(t("Strikethrough"), x.strike, A("strike"))
3158
- ])), R.appendChild(V);
3159
- let ee = o("fieldset", "jcf-fieldset");
3160
- ee.appendChild(o("legend", null, t("Border")));
3174
+ ])), R.appendChild(H);
3175
+ let te = o("fieldset", "jcf-fieldset");
3176
+ te.appendChild(o("legend", null, t("Border")));
3161
3177
  let X = c([
3162
3178
  { value: "none", text: t("None") },
3163
3179
  { value: "solid", text: t("Solid") },
3164
3180
  { value: "dashed", text: t("Dashed") },
3165
3181
  { value: "dotted", text: t("Dotted") }
3166
- ], x.borderStyle, A("borderStyle")), te = o("div", null, T(x.borderColor, A("borderColor")));
3167
- ee.appendChild(o("div", "jcf-grid jcf-grid-format", [
3168
- I(t("Style") + ":"),
3182
+ ], x.borderStyle, A("borderStyle")), ne = o("div", null, T(x.borderColor, A("borderColor")));
3183
+ te.appendChild(o("div", "jcf-grid jcf-grid-format", [
3184
+ S(t("Style") + ":"),
3169
3185
  o("div", null, X),
3170
- I(t("Color") + ":"),
3171
- te
3186
+ S(t("Color") + ":"),
3187
+ ne
3172
3188
  ]));
3173
3189
  let ae = o("div", "jcf-check-row", [
3174
3190
  D(t("Top"), x.borderTop, A("borderTop")),
@@ -3176,10 +3192,10 @@ const Cr = function(e, t) {
3176
3192
  D(t("Bottom"), x.borderBottom, A("borderBottom")),
3177
3193
  D(t("Left"), x.borderLeft, A("borderLeft"))
3178
3194
  ]);
3179
- ee.appendChild(ae), R.appendChild(ee), _ = o("div", "jcf-sample", t("AaBbCc")), R.appendChild(o("label", "xl-label", t("Preview") + ":")), R.appendChild(_);
3195
+ te.appendChild(ae), R.appendChild(te), _ = o("div", "jcf-sample", t("AaBbCc")), R.appendChild(o("label", "xl-label", t("Preview") + ":")), R.appendChild(_);
3180
3196
  const N = function() {
3181
3197
  let F = x.borderStyle === "none";
3182
- [te, ae].forEach(function(Y) {
3198
+ [ne, ae].forEach(function(Y) {
3183
3199
  Y.setAttribute("data-disabled", F), Y.querySelectorAll("input,button").forEach(function($) {
3184
3200
  $.disabled = F;
3185
3201
  });
@@ -3191,29 +3207,29 @@ const Cr = function(e, t) {
3191
3207
  } },
3192
3208
  { label: t("Cancel") }
3193
3209
  ]));
3194
- }, j = function(v, w) {
3210
+ }, G = function(v, w) {
3195
3211
  let x = Object.assign({}, v), R = o("div", null);
3196
3212
  const _ = function(ae) {
3197
3213
  return function(N) {
3198
- x[ae] = N, te();
3214
+ x[ae] = N, ne();
3199
3215
  };
3200
3216
  };
3201
3217
  let L = o("fieldset", "jcf-fieldset");
3202
3218
  L.appendChild(o("legend", null, t("Negative bar fill color")));
3203
3219
  let A = o("div", "jcf-fieldset-color", T(x.negativeColor, _("negativeColor")));
3204
- L.appendChild(B("jcf-negative-fill", t("Fill Color") + ":", "custom", x.negativeFillMode, _("negativeFillMode"))), L.appendChild(A), L.appendChild(B("jcf-negative-fill", t("Apply same fill color as positive bar"), "same", x.negativeFillMode, _("negativeFillMode"))), R.appendChild(L);
3205
- let V = o("fieldset", "jcf-fieldset");
3206
- V.appendChild(o("legend", null, t("Negative bar border color")));
3220
+ L.appendChild(V("jcf-negative-fill", t("Fill Color") + ":", "custom", x.negativeFillMode, _("negativeFillMode"))), L.appendChild(A), L.appendChild(V("jcf-negative-fill", t("Apply same fill color as positive bar"), "same", x.negativeFillMode, _("negativeFillMode"))), R.appendChild(L);
3221
+ let H = o("fieldset", "jcf-fieldset");
3222
+ H.appendChild(o("legend", null, t("Negative bar border color")));
3207
3223
  let J = o("div", "jcf-fieldset-color", T(x.negativeBorderColor, _("negativeBorderColor")));
3208
- V.appendChild(B("jcf-negative-border", t("Border Color") + ":", "custom", x.negativeBorderMode, _("negativeBorderMode"))), V.appendChild(J), V.appendChild(B("jcf-negative-border", t("Apply same border color as positive bar"), "same", x.negativeBorderMode, _("negativeBorderMode"))), V.appendChild(B("jcf-negative-border", t("No border"), "none", x.negativeBorderMode, _("negativeBorderMode"))), R.appendChild(V);
3209
- let ee = o("fieldset", "jcf-fieldset");
3210
- ee.appendChild(o("legend", null, t("Axis settings"))), ee.appendChild(I(t("Select axis position in cell to change the appearance of bars for negative values"))), ee.appendChild(B("jcf-axis", t("Automatic (display at variable position based on negative values)"), "automatic", x.barAxis, _("barAxis"))), ee.appendChild(B("jcf-axis", t("Cell midpoint"), "middle", x.barAxis, _("barAxis"))), ee.appendChild(B("jcf-axis", t("None (show negative value bars in same direction as positive)"), "none", x.barAxis, _("barAxis")));
3224
+ H.appendChild(V("jcf-negative-border", t("Border Color") + ":", "custom", x.negativeBorderMode, _("negativeBorderMode"))), H.appendChild(J), H.appendChild(V("jcf-negative-border", t("Apply same border color as positive bar"), "same", x.negativeBorderMode, _("negativeBorderMode"))), H.appendChild(V("jcf-negative-border", t("No border"), "none", x.negativeBorderMode, _("negativeBorderMode"))), R.appendChild(H);
3225
+ let te = o("fieldset", "jcf-fieldset");
3226
+ te.appendChild(o("legend", null, t("Axis settings"))), te.appendChild(S(t("Select axis position in cell to change the appearance of bars for negative values"))), te.appendChild(V("jcf-axis", t("Automatic (display at variable position based on negative values)"), "automatic", x.barAxis, _("barAxis"))), te.appendChild(V("jcf-axis", t("Cell midpoint"), "middle", x.barAxis, _("barAxis"))), te.appendChild(V("jcf-axis", t("None (show negative value bars in same direction as positive)"), "none", x.barAxis, _("barAxis")));
3211
3227
  let X = o("div", "jcf-fieldset-axis", [
3212
- I(t("Axis color") + ":"),
3228
+ S(t("Axis color") + ":"),
3213
3229
  T(x.axisColor, _("axisColor"))
3214
3230
  ]);
3215
- ee.appendChild(X), R.appendChild(ee);
3216
- const te = function() {
3231
+ te.appendChild(X), R.appendChild(te);
3232
+ const ne = function() {
3217
3233
  [
3218
3234
  [A, x.negativeFillMode !== "custom"],
3219
3235
  [J, x.negativeBorderMode !== "custom"],
@@ -3224,13 +3240,13 @@ const Cr = function(e, t) {
3224
3240
  });
3225
3241
  });
3226
3242
  };
3227
- te(), xt(de(t("Negative Value and Axis Settings"), R, [
3243
+ ne(), xt(de(t("Negative Value and Axis Settings"), R, [
3228
3244
  { label: t("OK"), primary: !0, onclick: function() {
3229
3245
  w(x);
3230
3246
  } },
3231
3247
  { label: t("Cancel") }
3232
3248
  ]));
3233
- }, G = function(v, w, x) {
3249
+ }, j = function(v, w, x) {
3234
3250
  let R = {
3235
3251
  // A config index, or the provisional key the manager gives a
3236
3252
  // rule it has not written yet
@@ -3295,30 +3311,30 @@ const Cr = function(e, t) {
3295
3311
  return R;
3296
3312
  R.range = x.range || R.range, R.stopIfTrue = !!x.stopIfTrue;
3297
3313
  let _ = x.format || {}, L = Array.isArray(x.value) ? x.value : [];
3298
- const A = function(V, J) {
3299
- V && V.type && (R[J + "Type"] = V.type, R[J + "Value"] = typeof V.value > "u" ? "" : V.value);
3314
+ const A = function(H, J) {
3315
+ H && H.type && (R[J + "Type"] = H.type, R[J + "Value"] = typeof H.value > "u" ? "" : H.value);
3300
3316
  };
3301
3317
  if (x.action === "dataBar")
3302
3318
  R.ruleType = "scale", R.scaleStyle = "dataBar", R.barColor = _.color || a.barColor, R.barOnly = _.showValue === !1, R.barFill = _.fill === "gradient" ? "gradient" : "solid", _.borderColor && (R.barBorderStyle = "solid", R.barBorderColor = _.borderColor), _.negativeColor === "same" ? R.negativeFillMode = "same" : _.negativeColor && (R.negativeColor = _.negativeColor), _.negativeBorderColor === "same" ? R.negativeBorderMode = "same" : _.negativeBorderColor ? (R.negativeBorderMode = "custom", R.negativeBorderColor = _.negativeBorderColor) : R.negativeBorderMode = "none", R.barAxis = _.axis || "automatic", R.axisColor = _.axisColor || a.axisColor, R.barDirection = _.direction === "rightToLeft" ? "rightToLeft" : "", A(_.min, "dbMin"), A(_.max, "dbMax");
3303
3319
  else if (x.action === "colorScale") {
3304
3320
  R.ruleType = "scale";
3305
- let V = _.colors || [];
3306
- V.length === 3 ? (R.scaleStyle = "3", R.minColor = V[0], R.midColor = V[1], R.maxColor = V[2]) : (R.scaleStyle = "2", R.minColor = V[0] || a.minColor, R.maxColor = V[1] || a.maxColor), A(_.min, "csMin"), A(_.mid, "csMid"), A(_.max, "csMax");
3321
+ let H = _.colors || [];
3322
+ H.length === 3 ? (R.scaleStyle = "3", R.minColor = H[0], R.midColor = H[1], R.maxColor = H[2]) : (R.scaleStyle = "2", R.minColor = H[0] || a.minColor, R.maxColor = H[1] || a.maxColor), A(_.min, "csMin"), A(_.mid, "csMid"), A(_.max, "csMax");
3307
3323
  } else {
3308
3324
  x.type === "number" ? (R.ruleType = "contains", R.containsWhat = "cellValue", R.criteria = x.criteria || "between", R.start = typeof L[0] > "u" ? "" : L[0], R.end = typeof L[1] > "u" ? "" : L[1]) : x.type === "text" ? (R.ruleType = "contains", R.containsWhat = "specificText", R.textCriteria = x.criteria || "contains", R.text = L[0] || "") : x.type === "empty" || x.type === "notEmpty" ? (R.ruleType = "contains", R.containsWhat = x.type === "empty" ? "blanks" : "noBlanks") : x.type === "top" || x.type === "bottom" ? (R.ruleType = "rank", R.rankType = x.type, R.rankValue = L[0] || 10, R.rankPercent = x.criteria === "percent") : x.type === "aboveAverage" || x.type === "belowAverage" ? (R.ruleType = "average", R.avgType = x.criteria === "equal" ? x.type + "Equal" : x.type) : x.type === "duplicate" || x.type === "unique" ? (R.ruleType = "uniquedup", R.dupType = x.type) : x.type === "formula" && (R.ruleType = "formula", R.formulaExpr = L[0] || "");
3309
- let V = R.format;
3310
- V.color = _.color || "", V.background = _["background-color"] || "", V.bold = !!_["font-weight"], V.italic = !!_["font-style"];
3325
+ let H = R.format;
3326
+ H.color = _.color || "", H.background = _["background-color"] || "", H.bold = !!_["font-weight"], H.italic = !!_["font-style"];
3311
3327
  let J = _["text-decoration"] || "";
3312
- V.underline = J.indexOf("underline") !== -1, V.strike = J.indexOf("line-through") !== -1;
3313
- let ee = ["Top", "Right", "Bottom", "Left"], X = _.border;
3314
- if (X ? ee.forEach(function(te) {
3315
- V["border" + te] = !0;
3316
- }) : ee.forEach(function(te) {
3317
- let ae = _["border-" + te.toLowerCase()];
3318
- V["border" + te] = !!ae, ae && !X && (X = ae);
3328
+ H.underline = J.indexOf("underline") !== -1, H.strike = J.indexOf("line-through") !== -1;
3329
+ let te = ["Top", "Right", "Bottom", "Left"], X = _.border;
3330
+ if (X ? te.forEach(function(ne) {
3331
+ H["border" + ne] = !0;
3332
+ }) : te.forEach(function(ne) {
3333
+ let ae = _["border-" + ne.toLowerCase()];
3334
+ H["border" + ne] = !!ae, ae && !X && (X = ae);
3319
3335
  }), X) {
3320
- let te = String(X).split(" ");
3321
- V.borderStyle = te[1] || "solid", V.borderColor = te[2] || "#000000";
3336
+ let ne = String(X).split(" ");
3337
+ H.borderStyle = ne[1] || "solid", H.borderColor = ne[2] || "#000000";
3322
3338
  }
3323
3339
  }
3324
3340
  return R;
@@ -3336,12 +3352,12 @@ const Cr = function(e, t) {
3336
3352
  let x = { range: i(v.range, w) };
3337
3353
  if (v.ruleType === "scale") {
3338
3354
  x.type = "notEmpty";
3339
- let A = {}, V = v.scaleStyle === "dataBar" ? [["min", "dbMin"], ["max", "dbMax"]] : v.scaleStyle === "3" ? [["min", "csMin"], ["mid", "csMid"], ["max", "csMax"]] : [["min", "csMin"], ["max", "csMax"]];
3340
- for (let J = 0; J < V.length; J++) {
3341
- let ee = M(v, V[J][1]);
3342
- if (ee === !1)
3355
+ let A = {}, H = v.scaleStyle === "dataBar" ? [["min", "dbMin"], ["max", "dbMax"]] : v.scaleStyle === "3" ? [["min", "csMin"], ["mid", "csMid"], ["max", "csMax"]] : [["min", "csMin"], ["max", "csMax"]];
3356
+ for (let J = 0; J < H.length; J++) {
3357
+ let te = M(v, H[J][1]);
3358
+ if (te === !1)
3343
3359
  return n(t("The value is mandatory")), null;
3344
- ee && (A[V[J][0]] = ee);
3360
+ te && (A[H[J][0]] = te);
3345
3361
  }
3346
3362
  if (v.scaleStyle === "dataBar") {
3347
3363
  x.action = "dataBar";
@@ -3358,12 +3374,12 @@ const Cr = function(e, t) {
3358
3374
  let A = v.criteria === "between" || v.criteria === "not between";
3359
3375
  if (v.start === "" || A && v.end === "")
3360
3376
  return n(t("The value is mandatory")), null;
3361
- let V = parseFloat(v.start), J = parseFloat(v.end);
3362
- if (isNaN(V) || A && isNaN(J))
3377
+ let H = parseFloat(v.start), J = parseFloat(v.end);
3378
+ if (isNaN(H) || A && isNaN(J))
3363
3379
  return n(t("The value must be a number")), null;
3364
- if (A && J < V)
3380
+ if (A && J < H)
3365
3381
  return n(t("The maximum must be greater than or equal to the minimum")), null;
3366
- x.type = "number", x.criteria = v.criteria, x.value = A ? [V, J] : [V];
3382
+ x.type = "number", x.criteria = v.criteria, x.value = A ? [H, J] : [H];
3367
3383
  } else if (v.containsWhat === "specificText") {
3368
3384
  if (!String(v.text).trim())
3369
3385
  return n(t("The value is mandatory")), null;
@@ -3386,33 +3402,33 @@ const Cr = function(e, t) {
3386
3402
  R.color && (_.color = R.color), R.background && (_["background-color"] = R.background), R.bold && (_["font-weight"] = "bold"), R.italic && (_["font-style"] = "italic");
3387
3403
  let L = [];
3388
3404
  if (R.underline && L.push("underline"), R.strike && L.push("line-through"), L.length && (_["text-decoration"] = L.join(" ")), R.borderStyle !== "none") {
3389
- let A = "1px " + R.borderStyle + " " + R.borderColor, V = { top: R.borderTop, right: R.borderRight, bottom: R.borderBottom, left: R.borderLeft };
3390
- Object.keys(V).every(function(ee) {
3391
- return V[ee];
3392
- }) ? _.border = A : Object.keys(V).forEach(function(ee) {
3393
- V[ee] && (_["border-" + ee] = A);
3405
+ let A = "1px " + R.borderStyle + " " + R.borderColor, H = { top: R.borderTop, right: R.borderRight, bottom: R.borderBottom, left: R.borderLeft };
3406
+ Object.keys(H).every(function(te) {
3407
+ return H[te];
3408
+ }) ? _.border = A : Object.keys(H).forEach(function(te) {
3409
+ H[te] && (_["border-" + te] = A);
3394
3410
  });
3395
3411
  }
3396
3412
  return x.format = _, v.stopIfTrue && (x.stopIfTrue = !0), x;
3397
3413
  }, W = function(v, w, x, R, _, L) {
3398
- let A = G(ma() || v.getRange(), w, x);
3414
+ let A = j(ma() || v.getRange(), w, x);
3399
3415
  _ && Object.assign(A, _);
3400
- let V = o("div", null), J = {}, ee = {}, X = {}, te = null;
3416
+ let H = o("div", null), J = {}, te = {}, X = {}, ne = null;
3401
3417
  const ae = function(re) {
3402
3418
  return function(ue) {
3403
3419
  A[re] = ue, ft();
3404
3420
  };
3405
3421
  };
3406
- V.appendChild(o("div", "jcf-caption", t("Select a Rule Type") + ":"));
3422
+ H.appendChild(o("div", "jcf-caption", t("Select a Rule Type") + ":"));
3407
3423
  let N = o("div", "jcf-types");
3408
3424
  b.forEach(function(re) {
3409
3425
  let ue = o("div", null, re.text);
3410
3426
  ue.setAttribute("data-value", re.value), ue.onclick = function() {
3411
3427
  A.ruleType = re.value, ft();
3412
3428
  }, N.appendChild(ue);
3413
- }), V.appendChild(N), V.appendChild(o("div", "jcf-caption", t("Edit the Rule Description") + ":"));
3429
+ }), H.appendChild(N), H.appendChild(o("div", "jcf-caption", t("Edit the Rule Description") + ":"));
3414
3430
  let F = o("div", "jcf-desc");
3415
- V.appendChild(F);
3431
+ H.appendChild(F);
3416
3432
  let Y = o("div", null);
3417
3433
  J.scale = Y, Y.appendChild(o("label", "xl-label", t("Format Style") + ":")), Y.appendChild(o("div", "jcf-style-row", c([
3418
3434
  { value: "2", text: t("2-Color Scale") },
@@ -3420,15 +3436,15 @@ const Cr = function(e, t) {
3420
3436
  { value: "dataBar", text: t("Data Bar") }
3421
3437
  ], A.scaleStyle, ae("scaleStyle"))));
3422
3438
  let $ = o("div", "jcf-grid jcf-grid-points");
3423
- ee.scaleGrid = $;
3439
+ te.scaleGrid = $;
3424
3440
  let C = [];
3425
3441
  const E = function(re, ue) {
3426
- $.appendChild(I(re)), ue.forEach(function(Me) {
3442
+ $.appendChild(S(re)), ue.forEach(function(Me) {
3427
3443
  $.appendChild(Me);
3428
3444
  });
3429
3445
  };
3430
- let O = H(t("MidPoint"));
3431
- C.push(O), E("", [H(t("Minimum")), O, H(t("Maximum"))]);
3446
+ let O = P(t("MidPoint"));
3447
+ C.push(O), E("", [P(t("Minimum")), O, P(t("Maximum"))]);
3432
3448
  const U = function(re, ue) {
3433
3449
  return c([{ value: "", text: ue }].concat(l), A[re + "Type"], ae(re + "Type"));
3434
3450
  };
@@ -3455,9 +3471,9 @@ const Cr = function(e, t) {
3455
3471
  o("div", null, T(A.maxColor, ae("maxColor")))
3456
3472
  ]), X.scale = o("div", "jcf-scale-sample"), E(t("Preview"), [o("div", "jcf-grid-span", X.scale)]), Y.appendChild($);
3457
3473
  let be = o("div", null);
3458
- ee.bar = be, be.appendChild(D(t("Show Bar Only"), A.barOnly, ae("barOnly")));
3474
+ te.bar = be, be.appendChild(D(t("Show Bar Only"), A.barOnly, ae("barOnly")));
3459
3475
  let ve = o("div", "jcf-grid jcf-grid-bar");
3460
- ve.appendChild(I("")), ve.appendChild(H(t("Minimum"))), ve.appendChild(H(t("Maximum"))), ve.appendChild(I(t("Type") + ":"));
3476
+ ve.appendChild(S("")), ve.appendChild(P(t("Minimum"))), ve.appendChild(P(t("Maximum"))), ve.appendChild(S(t("Type") + ":"));
3461
3477
  const we = function(re, ue) {
3462
3478
  return c(
3463
3479
  [{ value: "", text: t("Automatic") }, { value: "extent", text: ue }].concat(l),
@@ -3465,14 +3481,14 @@ const Cr = function(e, t) {
3465
3481
  ae(re + "Type")
3466
3482
  );
3467
3483
  };
3468
- ve.appendChild(o("div", null, we("dbMin", t("Lowest Value")))), ve.appendChild(o("div", null, we("dbMax", t("Highest Value")))), ve.appendChild(I(t("Value") + ":"));
3484
+ ve.appendChild(o("div", null, we("dbMin", t("Lowest Value")))), ve.appendChild(o("div", null, we("dbMax", t("Highest Value")))), ve.appendChild(S(t("Value") + ":"));
3469
3485
  let Fe = z("dbMin", "(" + t("Automatic") + ")"), ye = z("dbMax", "(" + t("Automatic") + ")");
3470
3486
  ve.appendChild(o("div", null, Fe)), ve.appendChild(o("div", null, ye)), be.appendChild(ve), be.appendChild(o("div", "jcf-caption", t("Bar Appearance") + ":"));
3471
3487
  let Ce = o("div", "jcf-grid jcf-grid-appearance", [
3472
- H(t("Fill")),
3473
- H(t("Color")),
3474
- H(t("Border")),
3475
- H(t("Color")),
3488
+ P(t("Fill")),
3489
+ P(t("Color")),
3490
+ P(t("Border")),
3491
+ P(t("Color")),
3476
3492
  o("div", null, c([
3477
3493
  { value: "gradient", text: t("Gradient Fill") },
3478
3494
  { value: "solid", text: t("Solid Fill") }
@@ -3487,7 +3503,7 @@ const Cr = function(e, t) {
3487
3503
  be.appendChild(Ce);
3488
3504
  let Le = o("button", "xl-btn", t("Negative value and Axis") + "...");
3489
3505
  Le.type = "button", Le.onclick = function() {
3490
- j(A, function(re) {
3506
+ G(A, function(re) {
3491
3507
  Object.assign(A, re), ft();
3492
3508
  });
3493
3509
  };
@@ -3497,10 +3513,10 @@ const Cr = function(e, t) {
3497
3513
  ], A.barDirection, ae("barDirection"));
3498
3514
  be.appendChild(o("div", "jcf-bar-footer", [
3499
3515
  Le,
3500
- o("div", "jcf-bar-right", [I(t("Bar Direction") + ":"), st])
3516
+ o("div", "jcf-bar-right", [S(t("Bar Direction") + ":"), st])
3501
3517
  ])), X.bar = o("div", null), be.appendChild(o("div", "jcf-bar-footer", [
3502
3518
  o("div", null),
3503
- o("div", "jcf-bar-right", [I(t("Preview")), o("div", "jcf-bar-preview", X.bar)])
3519
+ o("div", "jcf-bar-right", [S(t("Preview")), o("div", "jcf-bar-preview", X.bar)])
3504
3520
  ])), Y.appendChild(be), F.appendChild(Y);
3505
3521
  let lt = o("div", null);
3506
3522
  J.contains = lt, lt.appendChild(o("div", "jcf-caption", t("Format only cells with") + ":"));
@@ -3509,15 +3525,15 @@ const Cr = function(e, t) {
3509
3525
  { value: "specificText", text: t("Specific Text") },
3510
3526
  { value: "blanks", text: t("Blanks") },
3511
3527
  { value: "noBlanks", text: t("No Blanks") }
3512
- ], A.containsWhat, ae("containsWhat")), An = o("div", null, c(s, A.criteria, ae("criteria"))), En = o("div", null, c(m, A.textCriteria, ae("textCriteria"))), wn = o("div", null, h(A.start, ae("start"))), Cn = I(t("and")), Rn = o("div", null, h(A.end, ae("end"))), Sn = o("div", null, y(A.text, ae("text")));
3513
- ee.criteria = An, ee.textCriteria = En, ee.start = wn, ee.and = Cn, ee.end = Rn, ee.text = Sn, lt.appendChild(o("div", "jcf-sentence", [
3528
+ ], A.containsWhat, ae("containsWhat")), An = o("div", null, c(s, A.criteria, ae("criteria"))), En = o("div", null, c(u, A.textCriteria, ae("textCriteria"))), wn = o("div", null, h(A.start, ae("start"))), Cn = S(t("and")), Sn = o("div", null, h(A.end, ae("end"))), Rn = o("div", null, y(A.text, ae("text")));
3529
+ te.criteria = An, te.textCriteria = En, te.start = wn, te.and = Cn, te.end = Sn, te.text = Rn, lt.appendChild(o("div", "jcf-sentence", [
3514
3530
  Na,
3515
3531
  An,
3516
3532
  En,
3517
3533
  wn,
3518
3534
  Cn,
3519
- Rn,
3520
- Sn
3535
+ Sn,
3536
+ Rn
3521
3537
  ])), F.appendChild(lt);
3522
3538
  let It = o("div", null);
3523
3539
  J.rank = It, It.appendChild(o("div", "jcf-caption", t("Format values ranked in the") + ":")), It.appendChild(o("div", "jcf-sentence", [
@@ -3538,17 +3554,17 @@ const Cr = function(e, t) {
3538
3554
  { value: "unique", text: t("unique values") }
3539
3555
  ], A.dupType, ae("dupType")))), F.appendChild(Dt);
3540
3556
  let Nt = o("div", null);
3541
- J.formula = Nt, Nt.appendChild(o("label", "xl-label", t("Format values where this formula is true") + ":")), te = pt({
3557
+ J.formula = Nt, Nt.appendChild(o("label", "xl-label", t("Format values where this formula is true") + ":")), ne = pt({
3542
3558
  element: o("div", "xl-input jcf-formula"),
3543
3559
  instance: v,
3544
3560
  initial: A.formulaExpr,
3545
3561
  formula: !0
3546
- }), Nt.appendChild(te), F.appendChild(Nt);
3562
+ }), Nt.appendChild(ne), F.appendChild(Nt);
3547
3563
  let kt = o("div", "jcf-bar-footer");
3548
- ee.format = kt, X.format = o("div", "jcf-sample", t("AaBbCc"));
3564
+ te.format = kt, X.format = o("div", "jcf-sample", t("AaBbCc"));
3549
3565
  let tn = o("button", "xl-btn", t("Format") + "...");
3550
3566
  tn.type = "button", tn.onclick = function() {
3551
- P(A.format, function(re) {
3567
+ B(A.format, function(re) {
3552
3568
  A.format = re, ft();
3553
3569
  });
3554
3570
  }, kt.appendChild(o("div", "jcf-preview-cell", [
@@ -3556,10 +3572,10 @@ const Cr = function(e, t) {
3556
3572
  X.format
3557
3573
  ])), kt.appendChild(tn), F.appendChild(kt);
3558
3574
  const ft = function() {
3559
- Array.from(N.children).forEach(function(Se) {
3560
- Se.classList.toggle("jcf-selected", Se.getAttribute("data-value") === A.ruleType);
3561
- }), Object.keys(J).forEach(function(Se) {
3562
- J[Se].style.display = Se === A.ruleType ? "" : "none";
3575
+ Array.from(N.children).forEach(function(Re) {
3576
+ Re.classList.toggle("jcf-selected", Re.getAttribute("data-value") === A.ruleType);
3577
+ }), Object.keys(J).forEach(function(Re) {
3578
+ J[Re].style.display = Re === A.ruleType ? "" : "none";
3563
3579
  });
3564
3580
  let re = A.scaleStyle === "dataBar", ue = A.criteria === "between" || A.criteria === "not between", Me = {
3565
3581
  scaleGrid: !re,
@@ -3572,21 +3588,21 @@ const Cr = function(e, t) {
3572
3588
  text: A.containsWhat === "specificText",
3573
3589
  format: A.ruleType !== "scale"
3574
3590
  };
3575
- Object.keys(Me).forEach(function(Se) {
3576
- ee[Se] && (ee[Se].style.display = Me[Se] ? "" : "none");
3591
+ Object.keys(Me).forEach(function(Re) {
3592
+ te[Re] && (te[Re].style.display = Me[Re] ? "" : "none");
3577
3593
  });
3578
3594
  let yt = A.scaleStyle === "3";
3579
- $.setAttribute("data-mid", yt), C.forEach(function(Se) {
3580
- Se.style.display = yt ? "" : "none";
3595
+ $.setAttribute("data-mid", yt), C.forEach(function(Re) {
3596
+ Re.style.display = yt ? "" : "none";
3581
3597
  }), [
3582
3598
  ["csMin", oe],
3583
3599
  ["csMid", ce],
3584
3600
  ["csMax", Ae],
3585
3601
  ["dbMin", Fe],
3586
3602
  ["dbMax", ye]
3587
- ].forEach(function(Se) {
3588
- let In = A[Se[0] + "Type"], nn = !!In && In !== "extent", Mt = Se[1];
3589
- Mt.disabled = !nn, Mt.placeholder = nn ? "" : Mt.getAttribute("data-placeholder") || "", !nn && A[Se[0] + "Value"] !== "" && (A[Se[0] + "Value"] = "", Mt.value = "");
3603
+ ].forEach(function(Re) {
3604
+ let In = A[Re[0] + "Type"], nn = !!In && In !== "extent", Mt = Re[1];
3605
+ Mt.disabled = !nn, Mt.placeholder = nn ? "" : Mt.getAttribute("data-placeholder") || "", !nn && A[Re[0] + "Value"] !== "" && (A[Re[0] + "Value"] = "", Mt.value = "");
3590
3606
  }), ka(), Ma(), Ba();
3591
3607
  }, ka = function() {
3592
3608
  let re = A.scaleStyle === "3" ? [A.minColor, A.midColor, A.maxColor] : [A.minColor, A.maxColor];
@@ -3603,9 +3619,9 @@ const Cr = function(e, t) {
3603
3619
  });
3604
3620
  };
3605
3621
  ft();
3606
- let Fa = xt(de(t(w === null ? "New Formatting Rule" : "Edit Formatting Rule"), V, [
3622
+ let Fa = xt(de(t(w === null ? "New Formatting Rule" : "Edit Formatting Rule"), H, [
3607
3623
  { label: t("OK"), primary: !0, onclick: function() {
3608
- te && (A.formulaExpr = te.textContent);
3624
+ ne && (A.formulaExpr = ne.textContent);
3609
3625
  let re = K(A, v.getWorksheetName());
3610
3626
  if (!re)
3611
3627
  return !1;
@@ -3621,8 +3637,8 @@ const Cr = function(e, t) {
3621
3637
  R && R();
3622
3638
  } }
3623
3639
  ]));
3624
- return St(Fa);
3625
- }, ne = function(v) {
3640
+ return Rt(Fa);
3641
+ }, ee = function(v) {
3626
3642
  const w = {};
3627
3643
  w.scope = "selection";
3628
3644
  const x = function(E) {
@@ -3659,7 +3675,7 @@ const Cr = function(e, t) {
3659
3675
  return E.sort(function(U, q) {
3660
3676
  return O(U) - O(q);
3661
3677
  });
3662
- }, V = function(E, O) {
3678
+ }, H = function(E, O) {
3663
3679
  if (O.action === "dataBar") {
3664
3680
  let U = O.format && O.format.color || a.barColor;
3665
3681
  E.style.backgroundImage = "linear-gradient(to right, " + U + " 60%, transparent 60%)";
@@ -3676,13 +3692,13 @@ const Cr = function(e, t) {
3676
3692
  return;
3677
3693
  let z = w.draft, oe = z.get(E[O].index);
3678
3694
  z.set(E[O].index, z.get(q.index)), z.set(q.index, oe), X();
3679
- }, ee = function() {
3695
+ }, te = function() {
3680
3696
  w.listed = _().map(function(E) {
3681
3697
  return E.index;
3682
3698
  });
3683
3699
  }, X = function() {
3684
- w.list && te(w.list);
3685
- }, te = function(E) {
3700
+ w.list && ne(w.list);
3701
+ }, ne = function(E) {
3686
3702
  E.innerHTML = "";
3687
3703
  let O = [], U = w.listed || [];
3688
3704
  A().forEach(function(q) {
@@ -3694,7 +3710,7 @@ const Cr = function(e, t) {
3694
3710
  w.editRule(q.index, oe);
3695
3711
  }, ce.appendChild(Ae);
3696
3712
  let Ee = o("div", "jcf-preview", t("AaBbCc"));
3697
- V(Ee, oe), ce.appendChild(Ee);
3713
+ H(Ee, oe), ce.appendChild(Ee);
3698
3714
  const Ne = function(ye) {
3699
3715
  let Ce = w.draft && w.draft.get(q.index);
3700
3716
  if (Ce) {
@@ -3787,7 +3803,7 @@ const Cr = function(e, t) {
3787
3803
  { value: "selection", text: t("Current Selection") },
3788
3804
  { value: "worksheet", text: t("This Worksheet") }
3789
3805
  ], w.scope, function(oe) {
3790
- w.scope = oe, ee(), te(U);
3806
+ w.scope = oe, te(), ne(U);
3791
3807
  }),
3792
3808
  q
3793
3809
  ]));
@@ -3801,13 +3817,13 @@ const Cr = function(e, t) {
3801
3817
  ]),
3802
3818
  U
3803
3819
  ]);
3804
- return O.appendChild(z), w.list = U, w.listed || ee(), te(U), w.window = St(de(t("Conditional Formatting Rules Manager"), O, [
3820
+ return O.appendChild(z), w.list = U, w.listed || te(), ne(U), w.window = Rt(de(t("Conditional Formatting Rules Manager"), O, [
3805
3821
  { label: t("OK"), primary: !0, onclick: function() {
3806
3822
  Y();
3807
3823
  } },
3808
3824
  { label: t("Close") },
3809
3825
  { label: t("Apply"), onclick: function() {
3810
- return Y(), ee(), X(), !1;
3826
+ return Y(), te(), X(), !1;
3811
3827
  } }
3812
3828
  ])), w.window.onclose = function() {
3813
3829
  w.list = null, w.window = null, w.draft = null;
@@ -3823,7 +3839,7 @@ const Cr = function(e, t) {
3823
3839
  C(), W(q, E, O, function() {
3824
3840
  $(q);
3825
3841
  }, U, function(z, oe) {
3826
- if (w.draft || (F(), ee()), oe === null || typeof oe > "u") {
3842
+ if (w.draft || (F(), te()), oe === null || typeof oe > "u") {
3827
3843
  let ce = "+" + w.created++;
3828
3844
  w.draft.set(ce, z), w.listed && w.listed.push(ce);
3829
3845
  } else
@@ -3841,12 +3857,12 @@ const Cr = function(e, t) {
3841
3857
  };
3842
3858
  return ge.oninit = function(v) {
3843
3859
  v.setPlugins({
3844
- conditionalFormat: ne
3860
+ conditionalFormat: ee
3845
3861
  });
3846
3862
  }, ge.license = function() {
3847
3863
  e === null && (e = this);
3848
3864
  }, ge;
3849
- }(), Sr = function() {
3865
+ }(), Rr = function() {
3850
3866
  const e = function(f) {
3851
3867
  return typeof document < "u" && document.dictionary && document.dictionary[f] || f;
3852
3868
  }, t = function(f) {
@@ -3859,12 +3875,12 @@ const Cr = function(e, t) {
3859
3875
  return "date";
3860
3876
  if (y === "checkbox" || y === "radio" || y === "dropdown" || y === "autocomplete" || y === "text" || y === "html" || y === "color" || y === "image" || y === "notes")
3861
3877
  return "text";
3862
- let T = 0, u = 0, D = Math.min(f.rows.length, 50);
3863
- for (let B = 0; B < D; B++) {
3864
- let H = f.getValueFromCoords(c, B);
3865
- H === null || typeof H > "u" || H === "" || (typeof H == "number" || typeof H == "string" && H.trim() !== "" && Number.isFinite(Number(H)) ? T++ : u++);
3878
+ let T = 0, m = 0, D = Math.min(f.rows.length, 50);
3879
+ for (let V = 0; V < D; V++) {
3880
+ let P = f.getValueFromCoords(c, V);
3881
+ P === null || typeof P > "u" || P === "" || (typeof P == "number" || typeof P == "string" && P.trim() !== "" && Number.isFinite(Number(P)) ? T++ : m++);
3866
3882
  }
3867
- return T && !u ? "number" : "text";
3883
+ return T && !m ? "number" : "text";
3868
3884
  }, a = {
3869
3885
  text: ["A to Z", "Z to A"],
3870
3886
  number: ["Smallest to Largest", "Largest to Smallest"],
@@ -3872,10 +3888,10 @@ const Cr = function(e, t) {
3872
3888
  }, l = function(f) {
3873
3889
  let c = f.cols.length, h = 0, y = c - 1, T = f.getSelection && f.getSelection();
3874
3890
  T && T.length && T[0] !== T[2] && (h = Math.max(0, Math.min(T[0], T[2])), y = Math.min(c - 1, Math.max(T[0], T[2])));
3875
- let u = [];
3891
+ let m = [];
3876
3892
  for (let D = h; D <= y; D++)
3877
- u.push(D);
3878
- return u;
3893
+ m.push(D);
3894
+ return m;
3879
3895
  }, s = function(f, c) {
3880
3896
  return c.map(function(h) {
3881
3897
  let y = Ct(h), T = f.getHeader(h);
@@ -3884,11 +3900,11 @@ const Cr = function(e, t) {
3884
3900
  text: T && T !== y ? T + " (" + y + ")" : e("Column") + " " + y
3885
3901
  };
3886
3902
  });
3887
- }, m = function(f, c, h) {
3903
+ }, u = function(f, c, h) {
3888
3904
  let y = o("select", "xl-input jcs-select");
3889
3905
  return f.forEach(function(T) {
3890
- let u = o("option", null, T.text);
3891
- u.value = T.value, y.appendChild(u);
3906
+ let m = o("option", null, T.text);
3907
+ m.value = T.value, y.appendChild(m);
3892
3908
  }), y.value = typeof c > "u" || c === null ? "" : c, y.onchange = function() {
3893
3909
  h(y.value);
3894
3910
  }, y;
@@ -3898,34 +3914,34 @@ const Cr = function(e, t) {
3898
3914
  }, d = function(f, c) {
3899
3915
  let h = f.controls && f.controls.sortBy;
3900
3916
  if (Array.isArray(h) && h.length) {
3901
- let u = h.filter(function(D) {
3917
+ let m = h.filter(function(D) {
3902
3918
  return D && c.indexOf(D.column) !== -1;
3903
3919
  }).map(function(D) {
3904
3920
  return { column: D.column, direction: D.direction ? 1 : 0 };
3905
3921
  });
3906
- if (u.length)
3907
- return u;
3922
+ if (m.length)
3923
+ return m;
3908
3924
  }
3909
3925
  let y = c[0], T = f.getSelection && f.getSelection();
3910
3926
  return T && T.length && c.indexOf(Math.min(T[0], T[2])) !== -1 && (y = Math.min(T[0], T[2])), [{ column: y, direction: 0 }];
3911
3927
  }, i = function(f, c) {
3912
- let h = l(f), y = d(f, h), T = 0, u = s(f, h), D = [];
3913
- const B = function(L) {
3928
+ let h = l(f), y = d(f, h), T = 0, m = s(f, h), D = [];
3929
+ const V = function(L) {
3914
3930
  return D[L] || (D[L] = r(f, L)), D[L];
3915
3931
  };
3916
- let H = o("div", "jcs"), I, P, j, G, M, K = o("div", "jcs-toolbar", [
3917
- I = b(e("Add Level"), "add", function() {
3918
- let L = y.map((V) => V.column), A = h.find((V) => L.indexOf(V) === -1);
3932
+ let P = o("div", "jcs"), S, B, G, j, M, K = o("div", "jcs-toolbar", [
3933
+ S = b(e("Add Level"), "add", function() {
3934
+ let L = y.map((H) => H.column), A = h.find((H) => L.indexOf(H) === -1);
3919
3935
  typeof A > "u" || (y.push({ column: A, direction: 0 }), T = y.length - 1, w());
3920
3936
  }),
3921
- P = b(e("Delete Level"), "close", function() {
3937
+ B = b(e("Delete Level"), "close", function() {
3922
3938
  y.length > 1 && (y.splice(T, 1), T = Math.min(T, y.length - 1), w());
3923
3939
  }),
3924
- j = b(e("Copy Level"), "content_copy", function() {
3940
+ G = b(e("Copy Level"), "content_copy", function() {
3925
3941
  let L = y[T];
3926
3942
  y.splice(T + 1, 0, { column: L.column, direction: L.direction }), T = T + 1, w();
3927
3943
  }),
3928
- G = b("", "arrow_upward", function() {
3944
+ j = b("", "arrow_upward", function() {
3929
3945
  if (T > 0) {
3930
3946
  let L = y.splice(T, 1)[0];
3931
3947
  y.splice(T - 1, 0, L), T--, w();
@@ -3938,44 +3954,44 @@ const Cr = function(e, t) {
3938
3954
  }
3939
3955
  })
3940
3956
  ]);
3941
- G.title = e("Move Up"), M.title = e("Move Down"), G.classList.add("jcs-arrow"), M.classList.add("jcs-arrow"), H.appendChild(K);
3957
+ j.title = e("Move Up"), M.title = e("Move Down"), j.classList.add("jcs-arrow"), M.classList.add("jcs-arrow"), P.appendChild(K);
3942
3958
  let W = o("div", "jcs-head", [
3943
3959
  o("span", null, e("Column")),
3944
3960
  o("span", null, e("Order"))
3945
- ]), ne = o("div", "jcs-levels");
3946
- H.appendChild(o("div", "jcs-table", [W, ne]));
3961
+ ]), ee = o("div", "jcs-levels");
3962
+ P.appendChild(o("div", "jcs-table", [W, ee]));
3947
3963
  let ge = f.options.freezeRows ? Math.min(f.options.freezeRows.length, f.rows.length) : 0, v = e(ge === 1 ? "The frozen row stays in place" : "The frozen rows stay in place");
3948
- H.appendChild(o("div", "jcs-note", ge ? v : e("Every row of the worksheet is sorted")));
3964
+ P.appendChild(o("div", "jcs-note", ge ? v : e("Every row of the worksheet is sorted")));
3949
3965
  const w = function() {
3950
- ne.innerHTML = "", y.forEach(function(L, A) {
3951
- let V = o("div", "jcs-level" + (A === T ? " jcs-selected" : ""));
3952
- V.appendChild(o("span", "jcs-label", e(A === 0 ? "Sort by" : "Then by"))), V.appendChild(m(u, L.column, function(ee) {
3953
- L.column = parseInt(ee), w();
3966
+ ee.innerHTML = "", y.forEach(function(L, A) {
3967
+ let H = o("div", "jcs-level" + (A === T ? " jcs-selected" : ""));
3968
+ H.appendChild(o("span", "jcs-label", e(A === 0 ? "Sort by" : "Then by"))), H.appendChild(u(m, L.column, function(te) {
3969
+ L.column = parseInt(te), w();
3954
3970
  }));
3955
- let J = a[B(L.column)];
3956
- V.appendChild(m([
3971
+ let J = a[V(L.column)];
3972
+ H.appendChild(u([
3957
3973
  { value: 0, text: e(J[0]) },
3958
3974
  { value: 1, text: e(J[1]) }
3959
- ], L.direction, function(ee) {
3960
- L.direction = parseInt(ee);
3961
- })), V.addEventListener("mousedown", function() {
3962
- T !== A && (T = A, ne.querySelectorAll(".jcs-level").forEach(function(ee, X) {
3963
- ee.classList.toggle("jcs-selected", X === A);
3975
+ ], L.direction, function(te) {
3976
+ L.direction = parseInt(te);
3977
+ })), H.addEventListener("mousedown", function() {
3978
+ T !== A && (T = A, ee.querySelectorAll(".jcs-level").forEach(function(te, X) {
3979
+ te.classList.toggle("jcs-selected", X === A);
3964
3980
  }), x());
3965
- }), ne.appendChild(V);
3981
+ }), ee.appendChild(H);
3966
3982
  }), x();
3967
3983
  }, x = function() {
3968
- P.disabled = y.length <= 1, I.disabled = y.length >= h.length, j.disabled = y.length >= h.length, G.disabled = T <= 0, M.disabled = T >= y.length - 1;
3984
+ B.disabled = y.length <= 1, S.disabled = y.length >= h.length, G.disabled = y.length >= h.length, j.disabled = T <= 0, M.disabled = T >= y.length - 1;
3969
3985
  };
3970
3986
  w();
3971
- let R = de(e("Sort"), H, [
3987
+ let R = de(e("Sort"), P, [
3972
3988
  { label: e("OK"), primary: !0, onclick: function() {
3973
3989
  let L = [];
3974
3990
  for (let A = 0; A < y.length; A++) {
3975
- let V = y[A].column;
3976
- if (L[V])
3977
- return t(e("Column {0} is being sorted by values more than once. Delete the duplicate sort levels and try again.").replace("{0}", Ct(V))), T = A, w(), !1;
3978
- L[V] = !0;
3991
+ let H = y[A].column;
3992
+ if (L[H])
3993
+ return t(e("Column {0} is being sorted by values more than once. Delete the duplicate sort levels and try again.").replace("{0}", Ct(H))), T = A, w(), !1;
3994
+ L[H] = !0;
3979
3995
  }
3980
3996
  f.orderBy(y.map(function(A) {
3981
3997
  return { column: A.column, direction: A.direction };
@@ -4012,7 +4028,7 @@ const Cr = function(e, t) {
4012
4028
  }, s = function(d, i, g) {
4013
4029
  let p = o("button", "xl-btn" + (i ? " " + i : ""), d);
4014
4030
  return p.type = "button", p.onclick = g, p;
4015
- }, m = function(d) {
4031
+ }, u = function(d) {
4016
4032
  const i = {};
4017
4033
  i.worksheet = null, i.tab = "find", i.results = null, i.resultPosition = 0, i.currentFilter = null, i.currentMatch = null, i.currentPromise = 0, i.isFulfilled = null, i.ignore = !1;
4018
4034
  const g = o("input", "xl-input jfr-input");
@@ -4024,39 +4040,39 @@ const Cr = function(e, t) {
4024
4040
  let E = o("option", null, C[1]);
4025
4041
  E.value = C[0], f.appendChild(E);
4026
4042
  });
4027
- const c = l(t("Match case")), h = l(t("Match entire cell contents")), y = l(t("Look in formulas")), T = l(t("Replace cells hidden by a filter"), "jfr-replace-only"), u = o("div", "jfr-message"), D = s(t("Replace All"), "jfr-replace-only", function() {
4043
+ const c = l(t("Match case")), h = l(t("Match entire cell contents")), y = l(t("Look in formulas")), T = l(t("Replace cells hidden by a filter"), "jfr-replace-only"), m = o("div", "jfr-message"), D = s(t("Replace All"), "jfr-replace-only", function() {
4028
4044
  i.replaceAll();
4029
- }), B = s(t("Replace"), "jfr-replace-only", function() {
4045
+ }), V = s(t("Replace"), "jfr-replace-only", function() {
4030
4046
  i.replace();
4031
- }), H = s(t("Find Previous"), null, function() {
4047
+ }), P = s(t("Find Previous"), null, function() {
4032
4048
  i.findPrevious();
4033
- }), I = s(t("Find Next"), "xl-btn-primary", function() {
4049
+ }), S = s(t("Find Next"), "xl-btn-primary", function() {
4034
4050
  i.findNext();
4035
- }), P = s(t("Close"), null, function() {
4051
+ }), B = s(t("Close"), null, function() {
4036
4052
  i.close();
4037
- }), j = function(C, E) {
4053
+ }), G = function(C, E) {
4038
4054
  let O = o("div", "jfr-tab", E);
4039
4055
  return O.setAttribute("data-tab", C), O.onclick = function() {
4040
4056
  i.setTab(C), g.focus();
4041
4057
  }, O;
4042
- }, G = j("find", t("Find")), M = j("replace", t("Replace")), K = function(C, E, O) {
4058
+ }, j = G("find", t("Find")), M = G("replace", t("Replace")), K = function(C, E, O) {
4043
4059
  return o("div", "jfr-row" + (O ? " " + O : ""), [
4044
4060
  o("label", "jfr-label", C + ":"),
4045
4061
  E
4046
4062
  ]);
4047
- }, W = o("div", "xl-dialog jfr-window jss_object"), ne = o("div", "xl-dialog-header", o("span", null, t("Find and Replace"))), ge = o("span", "xl-dialog-close", "&#10005;");
4063
+ }, W = o("div", "xl-dialog jfr-window jss_object"), ee = o("div", "xl-dialog-header", o("span", null, t("Find and Replace"))), ge = o("span", "xl-dialog-close", "&#10005;");
4048
4064
  ge.onclick = function() {
4049
4065
  i.close();
4050
- }, ne.appendChild(ge), W.appendChild(ne), W.appendChild(o("div", "xl-dialog-body jfr-body", [
4051
- o("div", "jfr-tabs", [G, M]),
4066
+ }, ee.appendChild(ge), W.appendChild(ee), W.appendChild(o("div", "xl-dialog-body jfr-body", [
4067
+ o("div", "jfr-tabs", [j, M]),
4052
4068
  K(t("Find what"), g),
4053
4069
  K(t("Replace with"), p, "jfr-replace-only"),
4054
4070
  o("div", "jfr-options", [
4055
4071
  K(t("Within"), f, "jfr-within"),
4056
4072
  o("div", "jfr-checks", [c.element, h.element, y.element, T.element])
4057
4073
  ]),
4058
- u
4059
- ])), W.appendChild(o("div", "xl-dialog-footer", [D, B, H, I, P])), xt({ element: W }), i.element = W;
4074
+ m
4075
+ ])), W.appendChild(o("div", "xl-dialog-footer", [D, V, P, S, B])), xt({ element: W }), i.element = W;
4060
4076
  const v = function() {
4061
4077
  return {
4062
4078
  findInput: g.value,
@@ -4067,18 +4083,18 @@ const Cr = function(e, t) {
4067
4083
  };
4068
4084
  }, w = function() {
4069
4085
  let C = !g.value;
4070
- H.disabled = C, I.disabled = C, D.disabled = C, B.disabled = i.searchIsCurrent() ? i.currentFilter.disabled : !0;
4086
+ P.disabled = C, S.disabled = C, D.disabled = C, V.disabled = i.searchIsCurrent() ? i.currentFilter.disabled : !0;
4071
4087
  };
4072
4088
  g.addEventListener("input", w), f.addEventListener("change", w), [c, h, y].forEach(function(C) {
4073
4089
  C.input.addEventListener("change", w);
4074
4090
  }), W.addEventListener("keydown", function(C) {
4075
- C.key === "Enter" && (C.target === g || C.target === p) ? (C.preventDefault(), i.findNext()) : C.key === "Tab" && !C.altKey && !C.ctrlKey && (!C.shiftKey && C.target === P ? (C.preventDefault(), g.focus()) : C.shiftKey && C.target === g && (C.preventDefault(), P.focus()));
4091
+ C.key === "Enter" && (C.target === g || C.target === p) ? (C.preventDefault(), i.findNext()) : C.key === "Tab" && !C.altKey && !C.ctrlKey && (!C.shiftKey && C.target === B ? (C.preventDefault(), g.focus()) : C.shiftKey && C.target === g && (C.preventDefault(), B.focus()));
4076
4092
  });
4077
4093
  const x = function(C) {
4078
4094
  C.key === "Escape" && i.close();
4079
4095
  };
4080
4096
  i.setTab = function(C) {
4081
- i.tab = C === "replace" ? "replace" : "find", W.classList.toggle("jfr-mode-replace", i.tab === "replace"), G.classList.toggle("jfr-selected", i.tab === "find"), M.classList.toggle("jfr-selected", i.tab === "replace");
4097
+ i.tab = C === "replace" ? "replace" : "find", W.classList.toggle("jfr-mode-replace", i.tab === "replace"), j.classList.toggle("jfr-selected", i.tab === "find"), M.classList.toggle("jfr-selected", i.tab === "replace");
4082
4098
  }, i.isOpen = function() {
4083
4099
  return W.parentNode === document.body;
4084
4100
  };
@@ -4121,14 +4137,14 @@ const Cr = function(e, t) {
4121
4137
  } else
4122
4138
  return !1;
4123
4139
  return !0;
4124
- }, V = function(C, E) {
4140
+ }, H = function(C, E) {
4125
4141
  C.openWorksheet(), A(C, E) || (C.options.pagination && C.page(Math.trunc(E[0] / C.options.pagination)), C.goto(E[0], E[1])), C.updateSelectionFromCoords(E[1], E[0], E[1], E[0], !1);
4126
4142
  }, J = function(C) {
4127
4143
  const E = function() {
4128
4144
  i.isOpen() && !W.contains(document.activeElement) && g.focus();
4129
4145
  };
4130
- V(C.worksheet, C.coords), E(), setTimeout(E, 0);
4131
- }, ee = function(C, E, O, U) {
4146
+ H(C.worksheet, C.coords), E(), setTimeout(E, 0);
4147
+ }, te = function(C, E, O, U) {
4132
4148
  if (i.currentPromise !== C)
4133
4149
  return !1;
4134
4150
  if (i.currentMatch) {
@@ -4156,7 +4172,7 @@ const Cr = function(e, t) {
4156
4172
  break;
4157
4173
  q = 0, U++;
4158
4174
  }
4159
- if (!ee(ve, O, C, z))
4175
+ if (!te(ve, O, C, z))
4160
4176
  return E();
4161
4177
  if (U < Ne)
4162
4178
  return setTimeout(() => {
@@ -4166,7 +4182,7 @@ const Cr = function(e, t) {
4166
4182
  };
4167
4183
  i.currentPromise++, be(i.currentPromise);
4168
4184
  });
4169
- }, te = async function(C) {
4185
+ }, ne = async function(C) {
4170
4186
  return new Promise((E) => {
4171
4187
  const O = [];
4172
4188
  i.results = O;
@@ -4192,7 +4208,7 @@ const Cr = function(e, t) {
4192
4208
  break;
4193
4209
  U = 0, z++;
4194
4210
  }
4195
- if (!ee(Ne, O, C, oe))
4211
+ if (!te(Ne, O, C, oe))
4196
4212
  return E();
4197
4213
  if (z < Ae.length)
4198
4214
  return setTimeout(() => {
@@ -4204,12 +4220,12 @@ const Cr = function(e, t) {
4204
4220
  });
4205
4221
  };
4206
4222
  i.search = function(C) {
4207
- i.worksheet = R(), i.currentFilter = v(), i.currentFilter.worksheet = i.worksheet, i.currentFilter.disabled = !0, i.isFulfilled = !1, u.textContent = "";
4223
+ i.worksheet = R(), i.currentFilter = v(), i.currentFilter.worksheet = i.worksheet, i.currentFilter.disabled = !0, i.isFulfilled = !1, m.textContent = "";
4208
4224
  const E = C ? void 0 : function(q) {
4209
4225
  J(q), i.currentFilter.disabled = !1, w();
4210
- }, O = i.currentFilter.scope === "all" ? te : X, U = i.currentFilter;
4226
+ }, O = i.currentFilter.scope === "all" ? ne : X, U = i.currentFilter;
4211
4227
  U.result = O(E), U.result.then((q) => {
4212
- q && (i.isFulfilled = !0, q.length || (u.textContent = t("We couldn't find what you were looking for.")), U.disabled = !q.length, w());
4228
+ q && (i.isFulfilled = !0, q.length || (m.textContent = t("We couldn't find what you were looking for.")), U.disabled = !q.length, w());
4213
4229
  });
4214
4230
  }, i.searchIsCurrent = function() {
4215
4231
  let C = i.currentFilter;
@@ -4288,7 +4304,7 @@ const Cr = function(e, t) {
4288
4304
  value: Y(ce, O)
4289
4305
  }))
4290
4306
  );
4291
- }), i.ignore = !1, u.textContent = t("All done. We made {0} replacements.").replace("{0}", U);
4307
+ }), i.ignore = !1, m.textContent = t("All done. We made {0} replacements.").replace("{0}", U);
4292
4308
  }), i.results = [], i.resultPosition = 0;
4293
4309
  }, i.onevent = function(C) {
4294
4310
  (C === "onafterchanges" || C === "onredo" || C === "onundo") && (i.ignore || i.results && i.currentFilter && i.currentFilter.findInput && (i.currentMatch = i.results[i.resultPosition], i.resultPosition = 0, i.search(!0)));
@@ -4306,7 +4322,7 @@ const Cr = function(e, t) {
4306
4322
  };
4307
4323
  return b.oninit = function(d) {
4308
4324
  d.setPlugins({
4309
- findReplace: m
4325
+ findReplace: u
4310
4326
  });
4311
4327
  }, b.license = function() {
4312
4328
  e === null && (e = this);
@@ -4320,7 +4336,7 @@ const Cr = function(e, t) {
4320
4336
  return h.type = "checkbox", h.checked = !!c, { element: o("label", "xl-check", [h, o("span", null, f)]), input: h };
4321
4337
  }, s = function(f, c) {
4322
4338
  return o("div", "jfm-field", [o("label", "xl-label", f), c]);
4323
- }, m = function(f) {
4339
+ }, u = function(f) {
4324
4340
  let c = f.options.formify, h = {
4325
4341
  columns: [],
4326
4342
  instructions: "",
@@ -4352,8 +4368,8 @@ formify(document.getElementById('formify'), {
4352
4368
  if (c.columns.indexOf("" + T) === -1)
4353
4369
  h.push({ type: "hidden" });
4354
4370
  else {
4355
- let u = JSON.parse(JSON.stringify(y[T] || {}));
4356
- u.title = f.getHeader(T), u.type === "record" && (u.type = "text"), h.push(u);
4371
+ let m = JSON.parse(JSON.stringify(y[T] || {}));
4372
+ m.title = f.getHeader(T), m.type === "record" && (m.type = "text"), h.push(m);
4357
4373
  }
4358
4374
  return {
4359
4375
  columns: h,
@@ -4366,42 +4382,42 @@ formify(document.getElementById('formify'), {
4366
4382
  const c = {};
4367
4383
  return c.worksheet = null, c.window = null, c.open = function(h) {
4368
4384
  c.window && c.window.close(), c.worksheet = h;
4369
- let y = m(h), T = [], u = h.options.columns || [];
4370
- for (let X = 0; X < u.length; X++)
4385
+ let y = u(h), T = [], m = h.options.columns || [];
4386
+ for (let X = 0; X < m.length; X++)
4371
4387
  T.push(h.getHeader(X));
4372
- let D = T.map(function(X, te) {
4373
- return l(X, y.columns.indexOf("" + te) !== -1);
4374
- }), B = o("div", "xl-check-grid jfm-columns", D.map((X) => X.element));
4375
- const H = function(X) {
4376
- D.forEach(function(te) {
4377
- te.input.checked = X;
4388
+ let D = T.map(function(X, ne) {
4389
+ return l(X, y.columns.indexOf("" + ne) !== -1);
4390
+ }), V = o("div", "xl-check-grid jfm-columns", D.map((X) => X.element));
4391
+ const P = function(X) {
4392
+ D.forEach(function(ne) {
4393
+ ne.input.checked = X;
4378
4394
  }), K();
4379
4395
  };
4380
- let I = o("a", "jfm-link", t("Select all"));
4381
- I.onclick = function() {
4382
- H(!0);
4396
+ let S = o("a", "jfm-link", t("Select all"));
4397
+ S.onclick = function() {
4398
+ P(!0);
4383
4399
  };
4384
- let P = o("a", "jfm-link", t("Clear"));
4385
- P.onclick = function() {
4386
- H(!1);
4400
+ let B = o("a", "jfm-link", t("Clear"));
4401
+ B.onclick = function() {
4402
+ P(!1);
4387
4403
  };
4388
- let j = o("span", "jfm-count"), G = o("div", "jfm-columns-actions", [j, I, P]), M = o("fieldset", "xl-fieldset", [o("legend", null, t("Visible columns")), G, B]);
4389
- D.length || B.appendChild(o("div", "xl-note", t("This worksheet has no columns")));
4404
+ let G = o("span", "jfm-count"), j = o("div", "jfm-columns-actions", [G, S, B]), M = o("fieldset", "xl-fieldset", [o("legend", null, t("Visible columns")), j, V]);
4405
+ D.length || V.appendChild(o("div", "xl-note", t("This worksheet has no columns")));
4390
4406
  const K = function() {
4391
- let X = D.filter((te) => te.input.checked).length;
4392
- j.textContent = X ? t("{0} of {1} selected").replace("{0}", X).replace("{1}", D.length) : t("No column selected");
4407
+ let X = D.filter((ne) => ne.input.checked).length;
4408
+ G.textContent = X ? t("{0} of {1} selected").replace("{0}", X).replace("{1}", D.length) : t("No column selected");
4393
4409
  };
4394
4410
  D.forEach(function(X) {
4395
4411
  X.input.addEventListener("change", K);
4396
4412
  }), K();
4397
4413
  let W = o("input", "xl-input");
4398
4414
  W.type = "text", W.value = y.instructions, W.placeholder = t(r);
4399
- let ne = o("textarea", "xl-input xl-textarea");
4400
- ne.value = y.completeMessage, ne.placeholder = t(a);
4415
+ let ee = o("textarea", "xl-input xl-textarea");
4416
+ ee.value = y.completeMessage, ee.placeholder = t(a);
4401
4417
  let ge = o("div", "jfm-panel", [
4402
4418
  M,
4403
4419
  s(t("Instructions"), W),
4404
- s(t("Thank you message"), ne)
4420
+ s(t("Thank you message"), ee)
4405
4421
  ]), v = o("div", "jfm-panel jfm-preview"), w = b(h), x = o("div", "jfm-panel");
4406
4422
  if (!w)
4407
4423
  x.appendChild(o("div", "xl-note", t("The form can be shared once the document is saved on a server")));
@@ -4410,8 +4426,8 @@ formify(document.getElementById('formify'), {
4410
4426
  else {
4411
4427
  let X = o("input", "xl-input");
4412
4428
  X.type = "text", X.readOnly = !0, X.value = w;
4413
- let te = o("textarea", "xl-input xl-textarea jfm-code");
4414
- te.readOnly = !0, te.value = d(w), x.appendChild(s(t("Public link"), X)), x.appendChild(s(t("Embeddable code"), te)), [X, te].forEach(function(ae) {
4429
+ let ne = o("textarea", "xl-input xl-textarea jfm-code");
4430
+ ne.readOnly = !0, ne.value = d(w), x.appendChild(s(t("Public link"), X)), x.appendChild(s(t("Embeddable code"), ne)), [X, ne].forEach(function(ae) {
4415
4431
  ae.addEventListener("focus", function() {
4416
4432
  ae.select();
4417
4433
  });
@@ -4419,12 +4435,12 @@ formify(document.getElementById('formify'), {
4419
4435
  }
4420
4436
  const R = function() {
4421
4437
  let X = [];
4422
- return D.forEach(function(te, ae) {
4423
- te.input.checked && X.push("" + ae);
4438
+ return D.forEach(function(ne, ae) {
4439
+ ne.input.checked && X.push("" + ae);
4424
4440
  }), {
4425
4441
  columns: X,
4426
4442
  instructions: W.value.trim() || r,
4427
- completeMessage: ne.value.trim() || a
4443
+ completeMessage: ee.value.trim() || a
4428
4444
  };
4429
4445
  }, _ = function() {
4430
4446
  v.innerHTML = "";
@@ -4435,25 +4451,25 @@ formify(document.getElementById('formify'), {
4435
4451
  $.push(F[Y[C]]);
4436
4452
  return h.insertRow([{ data: $ }]), h.goto(h.rows.length - 1), N.form.reset(), typeof jSuites < "u" && jSuites.notification && jSuites.notification({ message: t("Successfully saved") }), !1;
4437
4453
  };
4438
- let te = o("div", "jss_object");
4439
- v.appendChild(te), e.forms(te, X);
4440
- let ae = te.querySelector(".jss_style_button");
4454
+ let ne = o("div", "jss_object");
4455
+ v.appendChild(ne), e.forms(ne, X);
4456
+ let ae = ne.querySelector(".jss_style_button");
4441
4457
  ae && (ae.value = t("Submit"));
4442
4458
  };
4443
- let L = { config: ge, preview: v, sharing: x }, A = {}, V = o("div", "jfm-tabs");
4459
+ let L = { config: ge, preview: v, sharing: x }, A = {}, H = o("div", "jfm-tabs");
4444
4460
  [["config", t("Config")], ["preview", t("Preview")], ["sharing", t("Sharing")]].forEach(function(X) {
4445
- let te = o("div", "jfm-tab", X[1]);
4446
- te.onclick = function() {
4461
+ let ne = o("div", "jfm-tab", X[1]);
4462
+ ne.onclick = function() {
4447
4463
  J(X[0]);
4448
- }, A[X[0]] = te, V.appendChild(te);
4464
+ }, A[X[0]] = ne, H.appendChild(ne);
4449
4465
  });
4450
4466
  const J = function(X) {
4451
- Object.keys(L).forEach(function(te) {
4452
- A[te].classList.toggle("jfm-selected", te === X), L[te].style.display = te === X ? "" : "none";
4467
+ Object.keys(L).forEach(function(ne) {
4468
+ A[ne].classList.toggle("jfm-selected", ne === X), L[ne].style.display = ne === X ? "" : "none";
4453
4469
  }), X === "preview" && _();
4454
4470
  };
4455
- let ee = o("div", "jfm", [V, ge, v, x]);
4456
- J("config"), c.window = de(t("Forms"), ee, [
4471
+ let te = o("div", "jfm", [H, ge, v, x]);
4472
+ J("config"), c.window = de(t("Forms"), te, [
4457
4473
  { label: t("Save"), primary: !0, onclick: function() {
4458
4474
  c.save(h, R());
4459
4475
  } },
@@ -16685,18 +16701,18 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
16685
16701
  const t = { ")": "(", "}": "{", "]": "[" };
16686
16702
  let n = [], r = "", a = [], l = null;
16687
16703
  for (let s = 0; s < e.length; s++) {
16688
- let m = e.charAt(s);
16704
+ let u = e.charAt(s);
16689
16705
  if (l)
16690
- r += m, m === l && (l = null);
16691
- else if (m === '"' || m === "'")
16692
- l = m, r += m;
16693
- else if (m === "(" || m === "{" || m === "[")
16694
- a.push(m), r += m;
16695
- else if (t[m]) {
16696
- if (a.pop() !== t[m])
16706
+ r += u, u === l && (l = null);
16707
+ else if (u === '"' || u === "'")
16708
+ l = u, r += u;
16709
+ else if (u === "(" || u === "{" || u === "[")
16710
+ a.push(u), r += u;
16711
+ else if (t[u]) {
16712
+ if (a.pop() !== t[u])
16697
16713
  return null;
16698
- r += m;
16699
- } else m === "," && !a.length ? (n.push(r.trim()), r = "") : r += m;
16714
+ r += u;
16715
+ } else u === "," && !a.length ? (n.push(r.trim()), r = "") : r += u;
16700
16716
  }
16701
16717
  return l || a.length ? null : ((r.trim() || n.length) && n.push(r.trim()), n);
16702
16718
  }, Lr = function(e) {
@@ -16724,76 +16740,76 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
16724
16740
  { label: "More Functions...", onclick: () => Jt() }
16725
16741
  ];
16726
16742
  }, hn = function(e, t) {
16727
- let n = { w: S(), a: pe() }, r = [], a = [], l = o("div", "xl-fn-hint", e.description), s = o("div", "xl-fn-result"), m = function() {
16728
- let I = [];
16729
- a.forEach(function(j) {
16730
- j.every((G) => !G.textContent.trim()) && (I = I.concat(j));
16743
+ let n = { w: I(), a: pe() }, r = [], a = [], l = o("div", "xl-fn-hint", e.description), s = o("div", "xl-fn-result"), u = function() {
16744
+ let S = [];
16745
+ a.forEach(function(G) {
16746
+ G.every((j) => !j.textContent.trim()) && (S = S.concat(G));
16731
16747
  });
16732
- let P = r.filter((j) => I.indexOf(j) === -1).map((j) => j.textContent.trim());
16733
- for (; P.length && !P[P.length - 1]; )
16734
- P.pop();
16735
- return e.name + "(" + P.join(",") + ")";
16748
+ let B = r.filter((G) => S.indexOf(G) === -1).map((G) => G.textContent.trim());
16749
+ for (; B.length && !B[B.length - 1]; )
16750
+ B.pop();
16751
+ return e.name + "(" + B.join(",") + ")";
16736
16752
  }, b = e.syntax.indexOf("...") !== -1 && e.params.length > 0, d = [], i = [], g = -1;
16737
- if (e.params.forEach(function(I) {
16738
- let P = Ut(I).split(",").map((j) => j.trim()).filter(Boolean);
16739
- b && P.every((j) => j.charAt(j.length - 1) === "N") ? (P.forEach((j) => d.push({ name: j.slice(0, -1), comment: I.comment })), g === -1 && (g = i.length)) : d.some((j) => P[0].replace(/\d+$/, "") === j.name) || i.push(I);
16753
+ if (e.params.forEach(function(S) {
16754
+ let B = Ut(S).split(",").map((G) => G.trim()).filter(Boolean);
16755
+ b && B.every((G) => G.charAt(G.length - 1) === "N") ? (B.forEach((G) => d.push({ name: G.slice(0, -1), comment: S.comment })), g === -1 && (g = i.length)) : d.some((G) => B[0].replace(/\d+$/, "") === G.name) || i.push(S);
16740
16756
  }), b && !d.length) {
16741
- let I = i[i.length - 1];
16742
- d.push({ name: Ut(I).replace(/\d+$/, ""), comment: I.comment });
16757
+ let S = i[i.length - 1];
16758
+ d.push({ name: Ut(S).replace(/\d+$/, ""), comment: S.comment });
16743
16759
  }
16744
16760
  g === -1 && (g = i.length);
16745
16761
  let p = 1;
16746
- i.forEach(function(I) {
16747
- let P = Ut(I).match(/^(.*?)(\d+)$/);
16748
- P && d.some((j) => j.name === P[1]) && (p = Math.max(p, parseInt(P[2])));
16762
+ i.forEach(function(S) {
16763
+ let B = Ut(S).match(/^(.*?)(\d+)$/);
16764
+ B && d.some((G) => G.name === B[1]) && (p = Math.max(p, parseInt(B[2])));
16749
16765
  });
16750
16766
  let f = g, c = null, h = [], y = function() {
16751
- p++, h = d.map((I) => B(I.name + p, I.comment, !0, !0)), a.push(h);
16767
+ p++, h = d.map((S) => V(S.name + p, S.comment, !0, !0)), a.push(h);
16752
16768
  }, T = function() {
16753
- b && h.length && r.length + d.length <= 255 && h.every((I) => I.textContent.trim()) && y();
16754
- }, u = function() {
16769
+ b && h.length && r.length + d.length <= 255 && h.every((S) => S.textContent.trim()) && y();
16770
+ }, m = function() {
16755
16771
  T();
16756
- let I = n.w, P = "";
16757
- if (I && (!e.params.length || r.some((j) => j.textContent.trim())))
16772
+ let S = n.w, B = "";
16773
+ if (S && (!e.params.length || r.some((G) => G.textContent.trim())))
16758
16774
  try {
16759
- let j = { expression: "=" + m() };
16760
- n.a && (j.x = n.a.x, j.y = n.a.y);
16761
- let G = I.executeFormula(j);
16762
- P = G == null ? "" : String(G);
16775
+ let G = { expression: "=" + u() };
16776
+ n.a && (G.x = n.a.x, G.y = n.a.y);
16777
+ let j = S.executeFormula(G);
16778
+ B = j == null ? "" : String(j);
16763
16779
  } catch {
16764
- P = "";
16780
+ B = "";
16765
16781
  }
16766
- s.innerHTML = "Formula result = <b></b>", s.querySelector("b").textContent = P;
16767
- }, D = o("div", "xl-fn-args"), B = function(I, P, j, G) {
16768
- let M = pt({ instance: n.w, formula: !0, equal: !1, onchange: u });
16769
- ie(M, "input", u), ie(M, "focus", function() {
16770
- l.textContent = I + ": " + P;
16782
+ s.innerHTML = "Formula result = <b></b>", s.querySelector("b").textContent = B;
16783
+ }, D = o("div", "xl-fn-args"), V = function(S, B, G, j) {
16784
+ let M = pt({ instance: n.w, formula: !0, equal: !1, onchange: m });
16785
+ ie(M, "input", m), ie(M, "focus", function() {
16786
+ l.textContent = S + ": " + B;
16771
16787
  });
16772
- let K = o("label", "xl-label" + (j ? " xl-fn-optional" : ""), null);
16773
- K.textContent = I;
16788
+ let K = o("label", "xl-label" + (G ? " xl-fn-optional" : ""), null);
16789
+ K.textContent = S;
16774
16790
  let W = o("div", null, [K, M]);
16775
- return G ? (r.splice(f, 0, M), f++, D.insertBefore(W, c)) : (r.push(M), D.appendChild(W), r.length - 1 === g && (c = W)), M;
16791
+ return j ? (r.splice(f, 0, M), f++, D.insertBefore(W, c)) : (r.push(M), D.appendChild(W), r.length - 1 === g && (c = W)), M;
16776
16792
  };
16777
- if (i.forEach((I) => B(Ut(I), I.comment, _r(e, I))), h = r.slice(Math.max(0, g - d.length), g), t && t.length) {
16793
+ if (i.forEach((S) => V(Ut(S), S.comment, _r(e, S))), h = r.slice(Math.max(0, g - d.length), g), t && t.length) {
16778
16794
  for (; b && h.length && r.length < t.length && r.length + d.length <= 255; )
16779
16795
  y();
16780
- t.forEach(function(I, P) {
16781
- r[P] && (r[P].textContent = I);
16796
+ t.forEach(function(S, B) {
16797
+ r[B] && (r[B].textContent = S);
16782
16798
  });
16783
16799
  }
16784
- let H = o("div", "xl-fn-body", [
16800
+ let P = o("div", "xl-fn-body", [
16785
16801
  o("div", "xl-fn-syntax", "<b></b>"),
16786
16802
  D,
16787
16803
  e.params.length ? null : o("div", "xl-fn-hint", "This function takes no arguments."),
16788
16804
  l,
16789
16805
  s
16790
16806
  ]);
16791
- H.querySelector(".xl-fn-syntax b").textContent = e.syntax, St(de("Function Arguments", H, [
16807
+ P.querySelector(".xl-fn-syntax b").textContent = e.syntax, Rt(de("Function Arguments", P, [
16792
16808
  { label: "OK", primary: !0, onclick: function() {
16793
- n.w && n.a && n.w.setValueFromCoords(n.a.x, n.a.y, "=" + m());
16809
+ n.w && n.a && n.w.setValueFromCoords(n.a.x, n.a.y, "=" + u());
16794
16810
  } },
16795
16811
  { label: "Cancel" }
16796
- ])), u();
16812
+ ])), m();
16797
16813
  }, Jt = function() {
16798
16814
  let e = Lr(pa());
16799
16815
  if (e) {
@@ -16810,7 +16826,7 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
16810
16826
  let f = o("option", null, null);
16811
16827
  f.textContent = p, r.appendChild(f);
16812
16828
  }), r.value = "All";
16813
- let m = function() {
16829
+ let u = function() {
16814
16830
  let p = n.value.trim().toLowerCase(), f = r.value, c = zt;
16815
16831
  if (f !== "All" && (c = c.filter((y) => y.category === f)), !p)
16816
16832
  return c;
@@ -16826,7 +16842,7 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
16826
16842
  }, d = function() {
16827
16843
  l && (s.close(), hn(l));
16828
16844
  }, i = function() {
16829
- let p = m();
16845
+ let p = u();
16830
16846
  t.innerHTML = "", p.forEach(function(f) {
16831
16847
  let c = f.syntax.indexOf("(") !== -1 ? f.syntax.substring(f.syntax.indexOf("(")) : "", h = o("div", "xl-fn-item", "<b></b> <span></span>");
16832
16848
  h.querySelector("b").textContent = f.name, h.querySelector("span").textContent = c, h.fn = f, h.onclick = () => b(f), h.ondblclick = d, t.appendChild(h);
@@ -16858,8 +16874,8 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
16858
16874
  let i = o("option", null, b.title);
16859
16875
  i.value = d, s.appendChild(i);
16860
16876
  });
16861
- let m = [o("label", "xl-label", "Format cells that are " + t + ":"), a];
16862
- (e === "between" || e === "not between") && m.push(o("label", "xl-label", "and"), l), m.push(o("label", "xl-label", "with"), s), de(t.charAt(0).toUpperCase() + t.slice(1) + "...", o("div", null, m), [
16877
+ let u = [o("label", "xl-label", "Format cells that are " + t + ":"), a];
16878
+ (e === "between" || e === "not between") && u.push(o("label", "xl-label", "and"), l), u.push(o("label", "xl-label", "with"), s), de(t.charAt(0).toUpperCase() + t.slice(1) + "...", o("div", null, u), [
16863
16879
  { label: "OK", primary: !0, onclick: function() {
16864
16880
  let b = e === "between" || e === "not between" ? [a.value, l.value] : [a.value];
16865
16881
  Qe.rule({
@@ -16980,14 +16996,14 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
16980
16996
  }), a();
16981
16997
  }, s = o("button", "xl-btn xl-btn-mini", "Select All");
16982
16998
  s.onclick = () => l(!0);
16983
- let m = o("button", "xl-btn xl-btn-mini", "Unselect All");
16984
- m.onclick = () => l(!1);
16999
+ let u = o("button", "xl-btn xl-btn-mini", "Unselect All");
17000
+ u.onclick = () => l(!1);
16985
17001
  let b = o("div", null, [
16986
17002
  o("label", "xl-check", [e, o("span", null, "My data has headers")]),
16987
17003
  // The two buttons act on the list, so they sit on its own header
16988
17004
  o("div", "xl-list-head", [
16989
17005
  o("span", "xl-label", "Columns"),
16990
- o("div", null, [s, m])
17006
+ o("div", null, [s, u])
16991
17007
  ]),
16992
17008
  t
16993
17009
  ]);
@@ -17019,15 +17035,15 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
17019
17035
  let r = e("Treat consecutive delimiters as one"), a = jr.map((c) => ({ value: c.value, box: e(c.label, c.value === " ") })), l = e("Other"), s = function() {
17020
17036
  let c = a.filter((h) => h.box.input.checked).map((h) => h.value);
17021
17037
  return l.input.checked && t.value && c.push(t.value), { delimiters: c, consecutive: r.input.checked, qualifier: n.value };
17022
- }, m = o("div", "xl-split-preview"), b, d = function() {
17038
+ }, u = o("div", "xl-split-preview"), b, d = function() {
17023
17039
  t.disabled = !l.input.checked;
17024
17040
  let c = me.splitRows(s());
17025
- m.innerHTML = "";
17041
+ u.innerHTML = "";
17026
17042
  let h = o("table", "xl-split-table");
17027
17043
  c.forEach((y) => {
17028
17044
  let T = o("tr");
17029
- y.fields.forEach((u) => T.appendChild(o("td", null, document.createTextNode(u)))), h.appendChild(T);
17030
- }), m.appendChild(h), b.disabled = !c.length;
17045
+ y.fields.forEach((m) => T.appendChild(o("td", null, document.createTextNode(m)))), h.appendChild(T);
17046
+ }), u.appendChild(h), b.disabled = !c.length;
17031
17047
  }, i = o("fieldset", "xl-fieldset xl-split-delimiters", [
17032
17048
  o("legend", null, "Delimiters")
17033
17049
  ].concat(a.map((c) => c.box.element), [
@@ -17038,7 +17054,7 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
17038
17054
  ]), p = o("div", "xl-split", [
17039
17055
  o("p", "xl-split-intro", "This screen lets you set the delimiters your data contains. You can see how your text is affected in the preview below."),
17040
17056
  o("div", "xl-split-form", [i, g]),
17041
- o("fieldset", "xl-fieldset", [o("legend", null, "Data preview"), m])
17057
+ o("fieldset", "xl-fieldset", [o("legend", null, "Data preview"), u])
17042
17058
  ]);
17043
17059
  b = de("Split Text to Columns", p, [
17044
17060
  { label: "Apply", primary: !0, onclick: () => me.splitToColumns(s()) }
@@ -17046,14 +17062,14 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
17046
17062
  d(), l.input.checked && t.focus();
17047
17063
  }), ie(t, "input", d), ie(n, "change", d), ie(r.input, "change", d), d();
17048
17064
  }, Aa = function() {
17049
- let e = S();
17065
+ let e = I();
17050
17066
  return e && e.parent.plugins && e.parent.plugins.conditionalFormat;
17051
17067
  }, Wr = function() {
17052
17068
  let e = Aa();
17053
- e && e.open(S());
17069
+ e && e.open(I());
17054
17070
  }, Et = function(e) {
17055
17071
  let t = Aa();
17056
- t && t.newRule(S(), e);
17072
+ t && t.newRule(I(), e);
17057
17073
  }, Wn = function(e, t) {
17058
17074
  let n = o("input", "xl-input");
17059
17075
  n.value = e || "";
@@ -17070,30 +17086,30 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
17070
17086
  a,
17071
17087
  o("label", "xl-label", "Refers to"),
17072
17088
  r
17073
- ]), s = () => r.textContent.trim().replace(/^=/, "").trim(), m = function() {
17089
+ ]), s = () => r.textContent.trim().replace(/^=/, "").trim(), u = function() {
17074
17090
  let p = n.value.trim().toUpperCase();
17075
17091
  return p !== (e || "").toUpperCase() && !!At.getNames()[p];
17076
- }, b = () => !!(n.value.trim() && s()) && !m(), i = St(de(e ? "Edit Name" : "New Name", l, [
17092
+ }, b = () => !!(n.value.trim() && s()) && !u(), i = Rt(de(e ? "Edit Name" : "New Name", l, [
17077
17093
  { label: "OK", primary: !0, disabled: !b(), onclick: function() {
17078
17094
  At.defineName(n.value.trim(), s(), e), t();
17079
17095
  } },
17080
17096
  { label: "Cancel" }
17081
17097
  ])).buttons[0], g = function() {
17082
- a.style.display = m() ? "" : "none", i.disabled = !b();
17098
+ a.style.display = u() ? "" : "none", i.disabled = !b();
17083
17099
  };
17084
17100
  ie(n, "input", g), ie(r, "input", g);
17085
17101
  }, Xr = function() {
17086
17102
  let e = o("div", "xl-fn-list"), t = null, n, r = function() {
17087
17103
  let a = At.getNames(), l = Object.keys(a);
17088
17104
  l.includes(t) || (t = null), e.innerHTML = "", l.length || e.appendChild(o("div", "xl-fn-cat", "No defined names yet")), l.forEach((s) => {
17089
- let m = o(
17105
+ let u = o(
17090
17106
  "div",
17091
17107
  "xl-fn-item" + (s === t ? " xl-selected" : ""),
17092
17108
  "<b>" + s + "</b> <span>=" + a[s] + "</span>"
17093
17109
  );
17094
- m.onclick = function() {
17110
+ u.onclick = function() {
17095
17111
  t = s, r();
17096
- }, e.appendChild(m);
17112
+ }, e.appendChild(u);
17097
17113
  }), n.buttons[1].disabled = !t, n.buttons[2].disabled = !t;
17098
17114
  };
17099
17115
  n = de("Name Manager", e, [
@@ -17169,17 +17185,17 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
17169
17185
  initial: f,
17170
17186
  title: "Cell range",
17171
17187
  done: function(c) {
17172
- (p === null ? _e.addRange(c) : _e.updateRange(p, c)) ? m() : s(p, c);
17188
+ (p === null ? _e.addRange(c) : _e.updateRange(p, c)) ? u() : s(p, c);
17173
17189
  }
17174
17190
  });
17175
- }, m = function() {
17191
+ }, u = function() {
17176
17192
  let p = _e.ranges();
17177
17193
  r.innerHTML = "", p.length || r.appendChild(o("div", "xl-fn-cat", "No unlocked ranges yet")), p.forEach((f, c) => {
17178
17194
  r.appendChild(o("div", "xl-range-row", [
17179
17195
  o("span", "xl-range-label", "<b>" + f + "</b>"),
17180
17196
  l("edit", "Edit range", () => s(c, f)),
17181
17197
  l("delete", "Remove range", function() {
17182
- _e.removeRange(c), m();
17198
+ _e.removeRange(c), u();
17183
17199
  })
17184
17200
  ]));
17185
17201
  });
@@ -17202,12 +17218,12 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
17202
17218
  o("label", "xl-check", [d, o("span", null, "Select locked cells")]),
17203
17219
  o("label", "xl-check", [i, o("span", null, "Select unlocked cells")])
17204
17220
  ]);
17205
- m(), de("Manage Protection", g, []);
17221
+ u(), de("Manage Protection", g, []);
17206
17222
  }, zr = function() {
17207
17223
  let e = Q.current();
17208
17224
  if (!e)
17209
17225
  return;
17210
- let t = S();
17226
+ let t = I();
17211
17227
  const n = function(r) {
17212
17228
  ha({
17213
17229
  instance: t,
@@ -17217,13 +17233,13 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
17217
17233
  done: function(a) {
17218
17234
  let l = Q.resize(a, e);
17219
17235
  if (l) {
17220
- let s = !1, m = de("Resize Table", o("div", null, l), [
17236
+ let s = !1, u = de("Resize Table", o("div", null, l), [
17221
17237
  { label: "OK", primary: !0, onclick: () => {
17222
17238
  s = !0;
17223
17239
  } },
17224
17240
  { label: "Cancel" }
17225
17241
  ]);
17226
- m.onclose = function() {
17242
+ u.onclose = function() {
17227
17243
  s && n(a);
17228
17244
  };
17229
17245
  }
@@ -17232,7 +17248,7 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
17232
17248
  };
17233
17249
  n(e.range);
17234
17250
  }, Yn = function() {
17235
- let e = S(), t = pe();
17251
+ let e = I(), t = pe();
17236
17252
  if (t && e.parent.plugins && e.parent.plugins.comments) {
17237
17253
  e.getCellObject(t.x, t.y);
17238
17254
  let n = e.parent.tools.querySelector(".jss_comments_box");
@@ -17472,11 +17488,11 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
17472
17488
  { label: "Delete Table Rows", disabled: !Q.current() || Lt() || Q.onHeaderRow(), onclick: fe.deleteTableRows },
17473
17489
  { label: "Delete Table Columns", disabled: !Q.current() || Ft(), onclick: fe.deleteTableCols },
17474
17490
  { hr: !0 },
17475
- { label: "Delete Sheet", disabled: S().parent.worksheets.length < 2, onclick: fe.deleteSheet }
17491
+ { label: "Delete Sheet", disabled: I().parent.worksheets.length < 2, onclick: fe.deleteSheet }
17476
17492
  ] }],
17477
17493
  [{ icon: "settings", label: "Format", showLabel: !0, tooltip: "Format Cells", menu: () => [
17478
17494
  { label: "Format Cells...", icon: "tune", onclick: function() {
17479
- let e = S();
17495
+ let e = I();
17480
17496
  e.parent.plugins && e.parent.plugins.format && e.parent.plugins.format.open(e);
17481
17497
  } },
17482
17498
  { hr: !0 },
@@ -17538,7 +17554,7 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
17538
17554
  // A table cannot go on a worksheet with the sheet filter on
17539
17555
  { kind: "big", label: "Table", icon: "table", onclick: () => Q.create(), enabled: () => !Q.filtered() },
17540
17556
  { kind: "big", label: "PivotTable", icon: "pivot_table_chart", onclick: function() {
17541
- let e = S();
17557
+ let e = I();
17542
17558
  e.parent.plugins && e.parent.plugins.pivot && e.parent.plugins.pivot.openCreateModal(e);
17543
17559
  } }
17544
17560
  ]
@@ -17547,7 +17563,7 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
17547
17563
  label: "Forms",
17548
17564
  items: [
17549
17565
  { kind: "big", label: "Form", icon: "post_add", onclick: function() {
17550
- let e = S();
17566
+ let e = I();
17551
17567
  e.parent.plugins && e.parent.plugins.formifier && e.parent.plugins.formifier.open(e);
17552
17568
  } }
17553
17569
  ]
@@ -17669,7 +17685,7 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
17669
17685
  enabled: () => me.canRemoveDuplicates()
17670
17686
  },
17671
17687
  { kind: "big", label: "Data Validation", icon: "rule_settings", onclick: function() {
17672
- let e = S();
17688
+ let e = I();
17673
17689
  e.parent.plugins && e.parent.plugins.dataValidations && e.parent.plugins.dataValidations.open(e);
17674
17690
  } }
17675
17691
  ]
@@ -17863,18 +17879,18 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
17863
17879
  }, no = function(e, t) {
17864
17880
  let n = to(), r = [], a = o("div", "xl-ribbon-tabs"), l = o("div", "xl-ribbon-content"), s = o("div", "xl-ribbon-tab xl-ribbon-file", "File");
17865
17881
  s.onclick = t, a.appendChild(s);
17866
- let m = [];
17882
+ let u = [];
17867
17883
  n.forEach((d, i) => {
17868
17884
  let g = o("div", "xl-ribbon-tab" + (d.contextual ? " xl-contextual" : ""), d.label), p = ao(d, r);
17869
- a.appendChild(g), m.push({ button: g, panel: p });
17885
+ a.appendChild(g), u.push({ button: g, panel: p });
17870
17886
  let f = function() {
17871
- e.classList.remove("xl-collapsed"), m.forEach((c) => {
17887
+ e.classList.remove("xl-collapsed"), u.forEach((c) => {
17872
17888
  c.button.classList.remove("xl-selected"), c.panel.style.display = "none";
17873
17889
  }), g.classList.add("xl-selected"), p.style.display = "flex";
17874
17890
  };
17875
17891
  g.onclick = f, d.visible && (g.style.display = "none", r.push(function() {
17876
17892
  let c = !!d.visible();
17877
- g.style.display = c ? "" : "none", !c && g.classList.contains("xl-selected") && m[0].button.click();
17893
+ g.style.display = c ? "" : "none", !c && g.classList.contains("xl-selected") && u[0].button.click();
17878
17894
  })), g.ondblclick = function() {
17879
17895
  e.classList.toggle("xl-collapsed");
17880
17896
  }, l.appendChild(p), i === 0 && (g.classList.add("xl-selected"), p.style.display = "flex");
@@ -17897,8 +17913,8 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
17897
17913
  return n.style.display = "none", e.groups.forEach((r, a) => {
17898
17914
  a > 0 && n.appendChild(o("div", "xl-group-divider"));
17899
17915
  let l = o("div", "xl-group"), s = o("div", "xl-group-body");
17900
- r.items.forEach((m) => {
17901
- s.appendChild(fn(m, t));
17916
+ r.items.forEach((u) => {
17917
+ s.appendChild(fn(u, t));
17902
17918
  }), l.appendChild(s), l.appendChild(o("div", "xl-group-label", r.label)), n.appendChild(l);
17903
17919
  }), n;
17904
17920
  }, fn = function(e, t) {
@@ -17974,11 +17990,11 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
17974
17990
  let r = he(e.icon), a = o("div", "xl-color-bar");
17975
17991
  a.style.backgroundColor = e.initial || "#FF0000";
17976
17992
  let l = o("div", "xl-color-main", [r, a]), s = o("div", "xl-color-caret", "&#9662;");
17977
- return n.appendChild(l), n.appendChild(s), n.addEventListener("mousedown", (m) => m.preventDefault()), l.onclick = function() {
17993
+ return n.appendChild(l), n.appendChild(s), n.addEventListener("mousedown", (u) => u.preventDefault()), l.onclick = function() {
17978
17994
  e.onpick(a.style.backgroundColor);
17979
17995
  }, s.onclick = function() {
17980
- e.openPalette(s, function(m) {
17981
- m && (a.style.backgroundColor = m), e.onpick(m);
17996
+ e.openPalette(s, function(u) {
17997
+ u && (a.style.backgroundColor = u), e.onpick(u);
17982
17998
  });
17983
17999
  }, n;
17984
18000
  }, xn = function(e, t, n) {
@@ -17992,13 +18008,13 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
17992
18008
  }, co = function(e) {
17993
18009
  let t = o("div", "xl-statusbar"), n = o("div", "xl-status-mode", "Ready"), r = o("div", "xl-status-a11y", "&#x1F3AF; 100% complete with Jspreadsheet v13"), a = o("div", "xl-status-stats"), l = o("div", "xl-zoom-btn", "&minus;"), s = o("input", "xl-zoom-slider");
17994
18010
  s.type = "range", s.min = 25, s.max = 200, s.step = 5, s.value = 100;
17995
- let m = o("div", "xl-zoom-btn", "+"), b = o("div", "xl-zoom-label", "100%");
18011
+ let u = o("div", "xl-zoom-btn", "+"), b = o("div", "xl-zoom-label", "100%");
17996
18012
  b.title = "Zoom to 100%";
17997
- let d = o("div", "xl-status-right", [a, l, s, m, b]);
17998
- return t.appendChild(n), t.appendChild(r), t.appendChild(d), e.appendChild(t), l.onclick = () => xe.zoom(xe.zoomPct() - 10), m.onclick = () => xe.zoom(xe.zoomPct() + 10), ie(s, "input", () => {
18013
+ let d = o("div", "xl-status-right", [a, l, s, u, b]);
18014
+ return t.appendChild(n), t.appendChild(r), t.appendChild(d), e.appendChild(t), l.onclick = () => xe.zoom(xe.zoomPct() - 10), u.onclick = () => xe.zoom(xe.zoomPct() + 10), ie(s, "input", () => {
17999
18015
  let i = parseInt(s.value);
18000
18016
  Math.abs(i - 100) <= 5 && (i = 100, s.value = 100), xe.zoom(i);
18001
- }), b.onclick = () => xe.zoom(100), [l, m, b].forEach((i) => ie(i, "mousedown", (g) => g.preventDefault())), {
18017
+ }), b.onclick = () => xe.zoom(100), [l, u, b].forEach((i) => ie(i, "mousedown", (g) => g.preventDefault())), {
18002
18018
  update: function() {
18003
18019
  let i = xr();
18004
18020
  if (i && i.count > 1) {
@@ -18026,8 +18042,8 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
18026
18042
  if (!a)
18027
18043
  return null;
18028
18044
  a.fillStyle = "#fff", a.fillRect(0, 0, t, n);
18029
- let l = e.options.columns || [], s = e.options.minDimensions || [0, 0], m = Math.max(l.length, s[0] || 0), b = Math.max((e.options.data || []).length, s[1] || 0), d = [0];
18030
- for (let p = 0; p < m && d[d.length - 1] < t; p++) {
18045
+ let l = e.options.columns || [], s = e.options.minDimensions || [0, 0], u = Math.max(l.length, s[0] || 0), b = Math.max((e.options.data || []).length, s[1] || 0), d = [0];
18046
+ for (let p = 0; p < u && d[d.length - 1] < t; p++) {
18031
18047
  let f = Number(e.getWidth(p)) || 100;
18032
18048
  d.push(d[d.length - 1] + f * ln);
18033
18049
  }
@@ -18040,14 +18056,14 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
18040
18056
  a.textBaseline = "middle";
18041
18057
  for (let p = 0; p < i.length - 1; p++)
18042
18058
  for (let f = 0; f < d.length - 1; f++) {
18043
- let c = e.getValueFromCoords(f, p, !0), h = po(e.getStyle(e.helpers.getCellNameFromCoords(f, p))), y = d[f], T = i[p], u = d[f + 1] - y, D = i[p + 1] - T;
18044
- if (h["background-color"] && (a.fillStyle = h["background-color"], a.fillRect(y, T, u, D)), c !== null && typeof c < "u" && c !== "") {
18045
- let B = String(c), H = /bold|[6-9]00/.test(h["font-weight"] || "") ? "bold " : "";
18046
- a.font = H + g + "px sans-serif", a.fillStyle = h.color || "#333";
18047
- let I = typeof c == "number" || /^-?\d+([.,]\d+)?%?$/.test(B);
18048
- a.textAlign = h["text-align"] || (I ? "right" : "left"), a.save(), a.beginPath(), a.rect(y, T, u, D), a.clip();
18049
- let P = 1, j = a.textAlign === "right" ? y + u - P : a.textAlign === "center" ? y + u / 2 : y + P;
18050
- a.fillText(B, j, T + D / 2), a.restore();
18059
+ let c = e.getValueFromCoords(f, p, !0), h = po(e.getStyle(e.helpers.getCellNameFromCoords(f, p))), y = d[f], T = i[p], m = d[f + 1] - y, D = i[p + 1] - T;
18060
+ if (h["background-color"] && (a.fillStyle = h["background-color"], a.fillRect(y, T, m, D)), c !== null && typeof c < "u" && c !== "") {
18061
+ let V = String(c), P = /bold|[6-9]00/.test(h["font-weight"] || "") ? "bold " : "";
18062
+ a.font = P + g + "px sans-serif", a.fillStyle = h.color || "#333";
18063
+ let S = typeof c == "number" || /^-?\d+([.,]\d+)?%?$/.test(V);
18064
+ a.textAlign = h["text-align"] || (S ? "right" : "left"), a.save(), a.beginPath(), a.rect(y, T, m, D), a.clip();
18065
+ let B = 1, G = a.textAlign === "right" ? y + m - B : a.textAlign === "center" ? y + m / 2 : y + B;
18066
+ a.fillText(V, G, T + D / 2), a.restore();
18051
18067
  }
18052
18068
  }
18053
18069
  a.strokeStyle = "#e3e3e3", a.lineWidth = 0.5, a.beginPath(), d.forEach(function(p) {
@@ -18075,7 +18091,7 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
18075
18091
  return window.addEventListener("pagehide", function() {
18076
18092
  r(!0);
18077
18093
  }), { capture: r };
18078
- }, yo = "6.0.1", bo = {
18094
+ }, yo = "6.0.3", bo = {
18079
18095
  version: yo
18080
18096
  }, Qt = function(e, t, n) {
18081
18097
  let r = o(e, t);
@@ -18099,7 +18115,7 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
18099
18115
  document.addEventListener("keydown", a);
18100
18116
  let l = o("div", "xl-backstage-nav"), s = o("div", "xl-backstage-back", he("arrow_back"));
18101
18117
  s.onclick = r, l.appendChild(s);
18102
- let m = o("div", "xl-backstage-content"), b = [
18118
+ let u = o("div", "xl-backstage-content"), b = [
18103
18119
  { label: "Home", render: $n },
18104
18120
  { label: "New", action: wa },
18105
18121
  { label: "Open", action: function() {
@@ -18126,9 +18142,9 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
18126
18142
  }
18127
18143
  let g = o("div", "xl-backstage-item" + (i.disabled ? " xl-disabled" : ""), i.label);
18128
18144
  i.disabled || (g.onclick = function() {
18129
- i.action ? i.action() : i.render && (d.forEach((p) => p.classList.remove("xl-selected")), g.classList.add("xl-selected"), m.innerHTML = "", i.render(m));
18145
+ i.action ? i.action() : i.render && (d.forEach((p) => p.classList.remove("xl-selected")), g.classList.add("xl-selected"), u.innerHTML = "", i.render(u));
18130
18146
  }), d.push(g), l.appendChild(g);
18131
- }), n.appendChild(l), n.appendChild(m), e.appendChild(n), d[0].classList.add("xl-selected"), $n(m);
18147
+ }), n.appendChild(l), n.appendChild(u), e.appendChild(n), d[0].classList.add("xl-selected"), $n(u);
18132
18148
  } };
18133
18149
  }, $n = function(e) {
18134
18150
  e.appendChild(o("h1", null, "Good " + ((/* @__PURE__ */ new Date()).getHours() < 12 ? "morning" : "afternoon")));
@@ -18143,7 +18159,7 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
18143
18159
  }
18144
18160
  n.slice(0, 5).forEach(function(r) {
18145
18161
  let a = o("div", "xl-backstage-recent", [
18146
- Ra(r, !0),
18162
+ Sa(r, !0),
18147
18163
  Qt("span", null, r.name || "Untitled"),
18148
18164
  o("span", "xl-muted", new Date(r.updated || r.created).toLocaleString())
18149
18165
  ]);
@@ -18157,7 +18173,7 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
18157
18173
  }, Ca = function() {
18158
18174
  return (k.thumbnail ? k.thumbnail.capture() : Promise.resolve()).catch(function() {
18159
18175
  }).then(ea);
18160
- }, Ra = function(e, t) {
18176
+ }, Sa = function(e, t) {
18161
18177
  let n = o("div", "xl-home-thumb" + (t ? " xl-home-thumb-sm" : ""));
18162
18178
  if (e.thumbnail) {
18163
18179
  let r = document.createElement("img");
@@ -18173,17 +18189,17 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
18173
18189
  return;
18174
18190
  }
18175
18191
  r.forEach(function(a) {
18176
- let l = a.name || "Untitled", s = a.guid === t, m = o("button", "xl-btn xl-btn-primary" + (s ? " xl-disabled" : ""), "Open"), b = o("button", "xl-btn" + (s ? " xl-disabled" : ""), "Delete"), d = o("div", "xl-backstage-book", [
18192
+ let l = a.name || "Untitled", s = a.guid === t, u = o("button", "xl-btn xl-btn-primary" + (s ? " xl-disabled" : ""), "Open"), b = o("button", "xl-btn" + (s ? " xl-disabled" : ""), "Delete"), d = o("div", "xl-backstage-book", [
18177
18193
  o("div", "xl-home-book", [
18178
- Ra(a),
18194
+ Sa(a),
18179
18195
  o("div", null, [
18180
18196
  Qt("b", null, l + (s ? " (current)" : "")),
18181
18197
  o("div", "xl-muted", "Modified " + new Date(a.updated || a.created).toLocaleString())
18182
18198
  ])
18183
18199
  ]),
18184
- o("div", "xl-backstage-book-actions", [m, b])
18200
+ o("div", "xl-backstage-book-actions", [u, b])
18185
18201
  ]);
18186
- m.onclick = function() {
18202
+ u.onclick = function() {
18187
18203
  ht(a.guid);
18188
18204
  }, b.onclick = function() {
18189
18205
  confirm('Delete "' + l + '"?') && ta(a.guid).then(function(i) {
@@ -18206,7 +18222,7 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
18206
18222
  }, e.appendChild(l);
18207
18223
  };
18208
18224
  t("Microsoft Excel (.xlsx)", "Full workbook with data, styles, formulas, merges and tables.", He.exportXlsx), t("PDF Document (.pdf)", "Printable snapshot of the current worksheet.", He.printPdf), t("CSV (.csv)", "Plain data of the current worksheet.", function() {
18209
- S().downloadCSV();
18225
+ I().downloadCSV();
18210
18226
  });
18211
18227
  }, To = function(e) {
18212
18228
  e.appendChild(o("h1", null, "About")), e.appendChild(o("div", "xl-about-hero", [
@@ -18220,10 +18236,10 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
18220
18236
  )
18221
18237
  ])
18222
18238
  ]));
18223
- let t = function(s, m, b, d) {
18239
+ let t = function(s, u, b, d) {
18224
18240
  return o("div", "xl-about-layer " + s, [
18225
18241
  o("div", "xl-about-layer-head", [
18226
- o("b", null, m),
18242
+ o("b", null, u),
18227
18243
  o("span", "xl-muted", b)
18228
18244
  ]),
18229
18245
  o("div", "xl-about-chips", d.map((i) => o("span", "xl-about-chip", i)))
@@ -18282,9 +18298,9 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
18282
18298
  r.forEach(function(s) {
18283
18299
  a.appendChild(o("tr", null, [Qt("td", "xl-muted", s[0]), Qt("td", null, s[1])]));
18284
18300
  }), e.appendChild(a);
18285
- let l = function(s, m) {
18301
+ let l = function(s, u) {
18286
18302
  let b = o("a", "xl-about-link", s);
18287
- return b.href = m, b.target = "_blank", b.rel = "noopener", b;
18303
+ return b.href = u, b.target = "_blank", b.rel = "noopener", b;
18288
18304
  };
18289
18305
  e.appendChild(o("div", "xl-about-links", [
18290
18306
  l("jspreadsheet.com", "https://jspreadsheet.com"),
@@ -18303,15 +18319,15 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
18303
18319
  a.style.display = "none", l.style.display = "none";
18304
18320
  const s = o("div", "xl-chat-tool", he("edit_square"));
18305
18321
  s.title = "New chat";
18306
- const m = o("div", "xl-chat-tool", he("history"));
18307
- m.title = "Chat history";
18322
+ const u = o("div", "xl-chat-tool", he("history"));
18323
+ u.title = "Chat history";
18308
18324
  const b = o("div", "xl-chat-tool", he("close"));
18309
18325
  b.title = "Close";
18310
18326
  const d = o("div", "xl-chat-header", [
18311
18327
  he("auto_awesome"),
18312
18328
  o("div", "xl-chat-title", "AI Assistant"),
18313
18329
  s,
18314
- m,
18330
+ u,
18315
18331
  b
18316
18332
  ]), i = o("div", "xl-chat-messages"), g = o("div", "xl-chat-welcome", [
18317
18333
  he("auto_awesome"),
@@ -18326,75 +18342,75 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
18326
18342
  h.title = "Attach a file";
18327
18343
  const y = o("input");
18328
18344
  y.type = "file", y.multiple = !0, y.accept = "image/*,.pdf,.csv,.xls,.xlsx", y.style.display = "none";
18329
- const T = o("div", "xl-chat-submit", he("arrow_upward")), u = o("div", "xl-chat-toolbar", [h, y, o("div", "xl-chat-spacer"), T]), D = o("div", "xl-chat-bottom", [f, c, u]);
18345
+ const T = o("div", "xl-chat-submit", he("arrow_upward")), m = o("div", "xl-chat-toolbar", [h, y, o("div", "xl-chat-spacer"), T]), D = o("div", "xl-chat-bottom", [f, c, m]);
18330
18346
  a.appendChild(d), a.appendChild(p), a.appendChild(i), a.appendChild(D);
18331
- const B = function(N) {
18347
+ const V = function(N) {
18332
18348
  let F = o("div", "xl-chat-toast", N);
18333
18349
  a.appendChild(F), setTimeout(function() {
18334
18350
  F.remove();
18335
18351
  }, 2500);
18336
- }, H = function(N) {
18352
+ }, P = function(N) {
18337
18353
  let F = i.scrollHeight - (i.offsetHeight + i.scrollTop);
18338
18354
  (N || F < i.scrollHeight * 5 / 100) && (i.scrollTop = i.scrollHeight);
18339
18355
  };
18340
- let I = [];
18341
- const P = function(N) {
18356
+ let S = [];
18357
+ const B = function(N) {
18342
18358
  return N > 0 ? N < 1024 ? N + " B" : Math.round(N / 1024) + " KB" : "";
18343
- }, j = function(N) {
18359
+ }, G = function(N) {
18344
18360
  let F = o("span", "xl-chat-file-name");
18345
18361
  F.textContent = N.name || "Attachment";
18346
18362
  let Y;
18347
- return N.type && N.type.indexOf("image") === 0 && N.data ? (Y = o("img", "xl-chat-file-thumb"), Y.src = N.data, Y.alt = "") : Y = he("draft"), o("div", "xl-chat-file", [Y, F, o("span", "xl-chat-file-size", P(N.size))]);
18348
- }, G = function() {
18349
- f.innerHTML = "", f.style.display = I.length ? "" : "none", I.forEach(function(N) {
18350
- let F = j(N), Y = o("div", "xl-chat-file-remove", he("close"));
18363
+ return N.type && N.type.indexOf("image") === 0 && N.data ? (Y = o("img", "xl-chat-file-thumb"), Y.src = N.data, Y.alt = "") : Y = he("draft"), o("div", "xl-chat-file", [Y, F, o("span", "xl-chat-file-size", B(N.size))]);
18364
+ }, j = function() {
18365
+ f.innerHTML = "", f.style.display = S.length ? "" : "none", S.forEach(function(N) {
18366
+ let F = G(N), Y = o("div", "xl-chat-file-remove", he("close"));
18351
18367
  Y.title = "Remove", Y.onclick = function() {
18352
- I = I.filter(function($) {
18368
+ S = S.filter(function($) {
18353
18369
  return $ !== N;
18354
- }), G();
18370
+ }), j();
18355
18371
  }, F.appendChild(Y), f.appendChild(F);
18356
18372
  });
18357
18373
  }, M = 25e4, K = ["image/png", "image/jpeg", "image/gif", "image/webp"], W = function(N) {
18358
18374
  Array.from(N || []).forEach(function(F) {
18359
18375
  if (F.size > M) {
18360
- B("The file is too big");
18376
+ V("The file is too big");
18361
18377
  return;
18362
18378
  }
18363
18379
  if (F.type.indexOf("image") === 0 && K.indexOf(F.type) === -1) {
18364
- B("Image format not supported");
18380
+ V("Image format not supported");
18365
18381
  return;
18366
18382
  }
18367
18383
  let Y = new FileReader();
18368
18384
  Y.onload = function() {
18369
18385
  let $ = Y.result;
18370
- typeof $ != "string" || $.indexOf("data:") !== 0 || (I.push({
18386
+ typeof $ != "string" || $.indexOf("data:") !== 0 || (S.push({
18371
18387
  name: F.name,
18372
18388
  data: $,
18373
18389
  date: F.lastModified,
18374
18390
  size: F.size,
18375
18391
  type: F.type,
18376
18392
  extension: $.split(";")[0].split("/")[1]
18377
- }), G());
18393
+ }), j());
18378
18394
  }, Y.readAsDataURL(F);
18379
18395
  });
18380
- }, ne = function(N) {
18396
+ }, ee = function(N) {
18381
18397
  let F = o("div", "xl-chat-options"), Y = o("div", null, he("content_copy"));
18382
18398
  Y.title = "Copy", Y.onclick = function() {
18383
- navigator.clipboard.writeText(N.outerHTML), B("Copied to the clipboard");
18399
+ navigator.clipboard.writeText(N.outerHTML), V("Copied to the clipboard");
18384
18400
  };
18385
18401
  let $ = o("div", null, he("save"));
18386
18402
  $.title = "Insert as a new worksheet", $.onclick = function() {
18387
18403
  let C = k.jss.helpers.createFromTable(N);
18388
- k.active.createWorksheet(C), B("Worksheet created");
18404
+ k.active.createWorksheet(C), V("Worksheet created");
18389
18405
  }, F.appendChild(Y), F.appendChild($), N.insertAdjacentElement("afterend", F);
18390
18406
  }, ge = function(N) {
18391
- N.el.innerHTML = Ao.render(N.message || ""), Array.from(N.el.querySelectorAll("table")).forEach(ne);
18407
+ N.el.innerHTML = Ao.render(N.message || ""), Array.from(N.el.querySelectorAll("table")).forEach(ee);
18392
18408
  }, v = function(N) {
18393
18409
  let F = o("div", "xl-chat-message");
18394
18410
  if (N.mine && (F.dataset.mine = "true"), N.files && N.files.length) {
18395
18411
  let $ = o("div", "xl-chat-files");
18396
18412
  N.files.forEach(function(C) {
18397
- $.appendChild(j(C));
18413
+ $.appendChild(G(C));
18398
18414
  }), F.appendChild($);
18399
18415
  }
18400
18416
  let Y = o("div", "xl-chat-body");
@@ -18403,7 +18419,7 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
18403
18419
  let F = e[e.length - 1];
18404
18420
  F && (F.message = N, ge(F));
18405
18421
  }, x = function(N) {
18406
- e = [], i.innerHTML = "", N.length ? N.forEach(v) : i.appendChild(g), H(!0);
18422
+ e = [], i.innerHTML = "", N.length ? N.forEach(v) : i.appendChild(g), P(!0);
18407
18423
  }, R = function() {
18408
18424
  fetch(Bt() + "/api/" + Vt() + "/prompt?session=" + n, {
18409
18425
  headers: qe()
@@ -18430,13 +18446,13 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
18430
18446
  }).catch(function() {
18431
18447
  });
18432
18448
  }, _ = function() {
18433
- p.style.display = "none", i.style.display = "", D.style.display = "", m.classList.remove("selected");
18449
+ p.style.display = "none", i.style.display = "", D.style.display = "", u.classList.remove("selected");
18434
18450
  }, L = function(N) {
18435
18451
  n = N, _(), x([]), R(), c.focus();
18436
18452
  }, A = function() {
18437
- n = cn(), I = [], G(), _(), x([]), c.focus();
18438
- }, V = function() {
18439
- p.innerHTML = "", p.style.display = "", i.style.display = "none", D.style.display = "none", m.classList.add("selected");
18453
+ n = cn(), S = [], j(), _(), x([]), c.focus();
18454
+ }, H = function() {
18455
+ p.innerHTML = "", p.style.display = "", i.style.display = "none", D.style.display = "none", u.classList.add("selected");
18440
18456
  let N = o("div", "xl-chat-sessions-hint", "Loading...");
18441
18457
  p.appendChild(N), fetch(Bt() + "/api/" + Vt() + "/prompt?list=1", {
18442
18458
  headers: qe()
@@ -18474,7 +18490,7 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
18474
18490
  N.textContent = "Could not load the conversations.";
18475
18491
  });
18476
18492
  }, J = async function(N, F) {
18477
- t = !0, i.classList.add("loader"), r = !0, H(!0);
18493
+ t = !0, i.classList.add("loader"), r = !0, P(!0);
18478
18494
  let Y = "";
18479
18495
  try {
18480
18496
  const $ = await fetch(Bt() + "/api/" + N + "/prompt", {
@@ -18495,30 +18511,30 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
18495
18511
  const { done: O, value: U } = await C.read();
18496
18512
  if (O)
18497
18513
  break;
18498
- Y += E.decode(U, { stream: !0 }), w(Y), r && H();
18514
+ Y += E.decode(U, { stream: !0 }), w(Y), r && P();
18499
18515
  }
18500
18516
  } catch {
18501
18517
  Y || w("Unable to reach the AI service. Make sure the Intrasheets server is running and reload the page.");
18502
18518
  } finally {
18503
- t = !1, i.classList.remove("loader"), H(!0);
18519
+ t = !1, i.classList.remove("loader"), P(!0);
18504
18520
  }
18505
- }, ee = function() {
18521
+ }, te = function() {
18506
18522
  if (t)
18507
18523
  return;
18508
- let N = c.value.trim(), F = I;
18524
+ let N = c.value.trim(), F = S;
18509
18525
  if (!N && F.length && (N = "Please review the attachment"), !N) {
18510
- B("Do not forget your prompt");
18526
+ V("Do not forget your prompt");
18511
18527
  return;
18512
18528
  }
18513
- c.value = "", c.style.height = "", I = [], G(), g.parentNode && g.remove(), v({ message: N, mine: !0, files: F }), v({ message: "" }), H(!0);
18529
+ c.value = "", c.style.height = "", S = [], j(), g.parentNode && g.remove(), v({ message: N, mine: !0, files: F }), v({ message: "" }), P(!0);
18514
18530
  const Y = new FormData();
18515
18531
  Y.append("session", n), Y.append("worksheet", k.active.options.worksheetId), F.length && Y.append("files", JSON.stringify(F)), Y.append("prompt", N), J(Vt(), Y);
18516
18532
  };
18517
18533
  ie(b, "click", function() {
18518
18534
  ae(!1);
18519
- }), ie(s, "click", A), ie(m, "click", function() {
18520
- p.style.display === "none" ? V() : _();
18521
- }), ie(T, "click", ee), ie(h, "click", function() {
18535
+ }), ie(s, "click", A), ie(u, "click", function() {
18536
+ p.style.display === "none" ? H() : _();
18537
+ }), ie(T, "click", te), ie(h, "click", function() {
18522
18538
  y.click();
18523
18539
  }), ie(y, "change", function() {
18524
18540
  W(y.files), y.value = "";
@@ -18536,26 +18552,26 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
18536
18552
  }), ie(a, "drop", function(N) {
18537
18553
  N.preventDefault(), X = 0, D.classList.remove("xl-chat-dropping"), N.dataTransfer && N.dataTransfer.files.length && (W(N.dataTransfer.files), c.focus());
18538
18554
  }), ie(c, "keydown", function(N) {
18539
- N.key === "Enter" && !N.shiftKey && (N.preventDefault(), ee());
18555
+ N.key === "Enter" && !N.shiftKey && (N.preventDefault(), te());
18540
18556
  }), ie(c, "input", function() {
18541
18557
  c.style.height = "", c.style.height = Math.min(180, c.scrollHeight) + "px";
18542
18558
  }), ie(i, "scroll", function() {
18543
18559
  r = i.scrollHeight - (i.offsetHeight + i.scrollTop) < i.scrollHeight * 5 / 100;
18544
18560
  });
18545
- let te = !1;
18561
+ let ne = !1;
18546
18562
  ie(l, "mousedown", function(N) {
18547
- te = !0, document.body.style.cursor = "ew-resize", document.body.style.userSelect = "none", N.preventDefault();
18563
+ ne = !0, document.body.style.cursor = "ew-resize", document.body.style.userSelect = "none", N.preventDefault();
18548
18564
  }), ie(document, "mousemove", function(N) {
18549
- if (!te)
18565
+ if (!ne)
18550
18566
  return;
18551
18567
  let Y = a.parentElement.getBoundingClientRect().right - N.clientX, $ = Math.min(800, window.innerWidth * 0.6);
18552
18568
  Y >= 300 && Y <= $ && (a.style.width = Y + "px", localStorage.setItem("intrasheets-chat-width", Y)), N.preventDefault();
18553
18569
  }), ie(document, "mouseup", function() {
18554
- te && (te = !1, document.body.style.cursor = "", document.body.style.userSelect = "");
18570
+ ne && (ne = !1, document.body.style.cursor = "", document.body.style.userSelect = "");
18555
18571
  });
18556
18572
  const ae = function(N) {
18557
18573
  let F = typeof N == "boolean" ? N : a.style.display === "none";
18558
- return a.style.display = F ? "" : "none", l.style.display = F ? "" : "none", F && (a.style.width = (localStorage.getItem("intrasheets-chat-width") || 380) + "px", c.focus(), H(!0)), k.refresh && k.refresh(), F;
18574
+ return a.style.display = F ? "" : "none", l.style.display = F ? "" : "none", F && (a.style.width = (localStorage.getItem("intrasheets-chat-width") || 380) + "px", c.focus(), P(!0)), k.refresh && k.refresh(), F;
18559
18575
  };
18560
18576
  return x([]), {
18561
18577
  panel: a,
@@ -18574,7 +18590,7 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
18574
18590
  }).catch(function(e) {
18575
18591
  console.error(e);
18576
18592
  });
18577
- }, Ro = function(e) {
18593
+ }, So = function(e) {
18578
18594
  e.className = "xl-app";
18579
18595
  const t = o("div", "xl-titlebar", o("div", "xl-title", "Intrasheets"));
18580
18596
  e.appendChild(t);
@@ -18590,12 +18606,12 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
18590
18606
  const l = o("div", "xl-home-list");
18591
18607
  n.appendChild(l);
18592
18608
  const s = o("p", "xl-muted", "Loading...");
18593
- l.appendChild(s), ea().then(function(m) {
18594
- if (s.remove(), !m.length) {
18609
+ l.appendChild(s), ea().then(function(u) {
18610
+ if (s.remove(), !u.length) {
18595
18611
  l.appendChild(o("p", "xl-muted", "No spreadsheets yet &mdash; start with a blank workbook."));
18596
18612
  return;
18597
18613
  }
18598
- m.forEach(function(b) {
18614
+ u.forEach(function(b) {
18599
18615
  let d = b.name || "Untitled", i = o("button", "xl-btn", "Delete"), g = o("div", "xl-home-thumb");
18600
18616
  if (b.thumbnail) {
18601
18617
  let c = document.createElement("img");
@@ -18622,30 +18638,32 @@ REGEXTEST('Hello', 'hello', 1) returns TRUE`,
18622
18638
  }).catch(function() {
18623
18639
  s.textContent = "Could not load the list from the server.";
18624
18640
  });
18625
- }, { jspreadsheet: wt, jSuites: So, formula: Io, client: Sa, forms: Oo, charts: Do, shapes: No, parser: ko, render: Mo, print: Bo, pivot: Fo, comments: Lo, format: _o, sheets: Ia } = Ht;
18626
- window.jSuites || (window.jSuites = So);
18641
+ }, { jspreadsheet: wt, jSuites: Ro, formula: Io, client: Ra, forms: Oo, charts: Do, shapes: No, parser: ko, render: Mo, print: Bo, pivot: Fo, comments: Lo, format: _o, sheets: Ia } = Ht;
18642
+ window.jSuites || (window.jSuites = Ro);
18627
18643
  const Uo = function(e, t, n) {
18628
- k.guid = t, e.className = "xl-app";
18629
- const r = o("div", "xl-titlebar jss_object"), a = o("div", "xl-quick"), l = o("div", "xl-quick-btn", he("undo"));
18630
- l.title = "Undo (Ctrl+Z)";
18631
- const s = o("div", "xl-quick-btn", he("redo"));
18632
- s.title = "Redo (Ctrl+Y)";
18633
- const m = o("div", "xl-quick-btn", he("save"));
18634
- m.title = "Save (XLSX)", a.appendChild(o("div", "xl-autosave", 'AutoSave <span class="xl-pill">On</span>')), a.appendChild(m), a.appendChild(l), a.appendChild(s);
18635
- const b = o("div", "xl-title", "Book1 &mdash; Intrasheets"), d = o("div", "xl-assistant-btn", [he("auto_awesome"), o("span", null, "AI Assistant")]);
18636
- d.title = "Open the AI Assistant";
18637
- const i = o("div", "xl-avatar", "PH");
18638
- r.appendChild(a), r.appendChild(b), r.appendChild(o("div", "xl-titlebar-right", [d, i])), e.appendChild(r);
18639
- const g = o("div", "xl-ribbon jss_object");
18640
- e.appendChild(g);
18641
- const p = o("div", "xl-main"), f = o("div", "xl-grid"), c = o("div", "xl-grid-host");
18642
- f.appendChild(c);
18643
- const h = Eo();
18644
- p.appendChild(f), p.appendChild(h.resizer), p.appendChild(h.panel), e.appendChild(p), d.onclick = function() {
18645
- d.classList.toggle("selected", h.toggle());
18646
- };
18644
+ k.guid = t;
18645
+ let r = n.focus !== !1;
18646
+ e.className = "xl-app";
18647
+ const a = o("div", "xl-titlebar jss_object"), l = o("div", "xl-quick"), s = o("div", "xl-quick-btn", he("undo"));
18648
+ s.title = "Undo (Ctrl+Z)";
18649
+ const u = o("div", "xl-quick-btn", he("redo"));
18650
+ u.title = "Redo (Ctrl+Y)";
18651
+ const b = o("div", "xl-quick-btn", he("save"));
18652
+ b.title = "Save (XLSX)", l.appendChild(o("div", "xl-autosave", 'AutoSave <span class="xl-pill">On</span>')), l.appendChild(b), l.appendChild(s), l.appendChild(u);
18653
+ const d = o("div", "xl-title", "Book1 &mdash; Intrasheets"), i = o("div", "xl-avatar", "PH"), g = n.agent === !0 ? o("div", "xl-assistant-btn", [he("auto_awesome"), o("span", null, "AI Assistant")]) : null;
18654
+ a.appendChild(l), a.appendChild(d), a.appendChild(o("div", "xl-titlebar-right", g ? [g, i] : [i])), e.appendChild(a);
18655
+ const p = o("div", "xl-ribbon jss_object");
18656
+ e.appendChild(p);
18657
+ const f = o("div", "xl-main"), c = o("div", "xl-grid"), h = o("div", "xl-grid-host");
18658
+ if (c.appendChild(h), f.appendChild(c), g) {
18659
+ const M = Eo();
18660
+ f.appendChild(M.resizer), f.appendChild(M.panel), g.title = "Open the AI Assistant", g.onclick = function() {
18661
+ g.classList.toggle("selected", M.toggle());
18662
+ };
18663
+ }
18664
+ e.appendChild(f);
18647
18665
  const y = o("div", "xl-statusbar-host jss_object");
18648
- e.appendChild(y), k.jss = wt, k.gridHost = f, wt.shortcuts.set({
18666
+ e.appendChild(y), k.jss = wt, k.gridHost = c, wt.shortcuts.set({
18649
18667
  ctrlKey: !0,
18650
18668
  shiftKey: !1,
18651
18669
  key: "s",
@@ -18654,11 +18672,11 @@ const Uo = function(e, t, n) {
18654
18672
  }
18655
18673
  });
18656
18674
  let T = !1;
18657
- const u = function() {
18675
+ const m = function() {
18658
18676
  T || (T = !0, requestAnimationFrame(function() {
18659
- T = !1, ke.track(), B.refresh(), I.update(), H.update(), l.classList.toggle("xl-disabled", !_t.canUndo()), s.classList.toggle("xl-disabled", !_t.canRedo());
18677
+ T = !1, ke.track(), V.refresh(), S.update(), P.update(), s.classList.toggle("xl-disabled", !_t.canUndo()), u.classList.toggle("xl-disabled", !_t.canRedo());
18660
18678
  }));
18661
- }, D = go(e), B = no(g, D.open), H = co(y), I = {
18679
+ }, D = go(e), V = no(p, D.open), P = co(y), S = {
18662
18680
  update: function() {
18663
18681
  },
18664
18682
  insertFunction: function(M) {
@@ -18667,8 +18685,8 @@ const Uo = function(e, t, n) {
18667
18685
  K.focus(), K.textContent = "=" + M + "(", K.dispatchEvent(new Event("input", { bubbles: !0 }));
18668
18686
  let W = document.createRange();
18669
18687
  W.selectNodeContents(K), W.collapse(!1);
18670
- let ne = window.getSelection();
18671
- ne.removeAllRanges(), ne.addRange(W);
18688
+ let ee = window.getSelection();
18689
+ ee.removeAllRanges(), ee.addRange(W);
18672
18690
  } else
18673
18691
  vr("=" + M + "()");
18674
18692
  },
@@ -18677,67 +18695,67 @@ const Uo = function(e, t, n) {
18677
18695
  K && (K.style.display = M ? "" : "none");
18678
18696
  }
18679
18697
  };
18680
- k.formulaBar = I, k.thumbnail = fo({
18681
- getWorksheet: S,
18698
+ k.formulaBar = S, k.thumbnail = fo({
18699
+ getWorksheet: I,
18682
18700
  save: function(M) {
18683
18701
  return Qa(t, M);
18684
18702
  }
18685
18703
  });
18686
- const P = function() {
18687
- let M = S();
18704
+ const B = function() {
18705
+ let M = I();
18688
18706
  if (M && typeof M.setViewport == "function") {
18689
- let K = f.getBoundingClientRect();
18707
+ let K = c.getBoundingClientRect();
18690
18708
  M.setViewport(Math.max(400, Math.floor(K.width)), Math.max(300, Math.floor(K.height)));
18691
18709
  }
18692
18710
  };
18693
- let G = function() {
18694
- let M = f.getBoundingClientRect(), K = {
18711
+ let j = function() {
18712
+ let M = c.getBoundingClientRect(), K = {
18695
18713
  guid: t,
18696
18714
  tabs: !0,
18697
18715
  toolbar: !1,
18698
18716
  tableOverflow: !0,
18699
18717
  tableWidth: Math.max(400, Math.floor(M.width)),
18700
18718
  tableHeight: Math.max(300, Math.floor(M.height)),
18701
- onload: function(ne) {
18702
- ne && ne.config && ne.config.name && (b.innerHTML = ne.config.name + " &mdash; Intrasheets"), P(), u();
18719
+ onload: function(ee) {
18720
+ ee && ee.config && ee.config.name && (d.innerHTML = ee.config.name + " &mdash; Intrasheets"), B(), m();
18703
18721
  },
18704
18722
  // Every route that adds a worksheet (the tab bar plus, the ribbon,
18705
18723
  // the assistant, pivot) gets the shell grid instead of the core
18706
18724
  // default or its own content size
18707
- onbeforecreateworksheet: function(ne) {
18708
- return ra(ne);
18725
+ onbeforecreateworksheet: function(ee) {
18726
+ return ra(ee);
18709
18727
  },
18710
18728
  // The core sorts on its own too (header double click, context
18711
18729
  // menu): a worksheet with a table refuses them like the ribbon
18712
- onbeforesort: function(ne) {
18713
- if (Q.refuseSortFilter("Sort", ne))
18730
+ onbeforesort: function(ee) {
18731
+ if (Q.refuseSortFilter("Sort", ee))
18714
18732
  return !1;
18715
18733
  },
18716
- onselection: function(ne, ge, v, w, x, R) {
18717
- k.active = ne, k.painter !== null && typeof MouseEvent < "u" && R instanceof MouseEvent && (k.painterPending = !0), u();
18734
+ onselection: function(ee, ge, v, w, x, R) {
18735
+ k.active = ee, k.painter !== null && typeof MouseEvent < "u" && R instanceof MouseEvent && (k.painterPending = !0), m();
18718
18736
  },
18719
- onopenworksheet: function(ne) {
18720
- k.active = ne, k.lastRects = null, !ne.getSelection() && typeof ne.updateSelectionFromCoords == "function" && ne.updateSelectionFromCoords(0, 0, 0, 0), u();
18737
+ onopenworksheet: function(ee) {
18738
+ k.active = ee, k.lastRects = null, !ee.getSelection() && typeof ee.updateSelectionFromCoords == "function" && (r ? ee.updateSelectionFromCoords(0, 0, 0, 0) : (ee.updateSelectionFromCoords(0, 0, 0, 0, !1), r = !0)), m();
18721
18739
  },
18722
- onchange: u,
18723
- onafterchanges: u,
18724
- onundo: u,
18725
- onredo: u,
18726
- onmerge: u,
18727
- onresetstyle: u,
18728
- onchangezoom: u,
18740
+ onchange: m,
18741
+ onafterchanges: m,
18742
+ onundo: m,
18743
+ onredo: m,
18744
+ onmerge: m,
18745
+ onresetstyle: m,
18746
+ onchangezoom: m,
18729
18747
  // A note or a comment on the active cell changes what Review offers
18730
- oncomments: u,
18748
+ oncomments: m,
18731
18749
  // A copy made here, by any route, is a copy the paste menu can act on
18732
18750
  oncopy: function() {
18733
- k.internalClipboard = !0, u();
18751
+ k.internalClipboard = !0, m();
18734
18752
  }
18735
18753
  };
18736
18754
  Ho(K, n);
18737
- let W = wt(c, K);
18755
+ let W = wt(h, K);
18738
18756
  return k.sheets = W, W;
18739
18757
  }();
18740
- return new ResizeObserver(P).observe(f), k.refresh = u, window.addEventListener("focus", u), document.addEventListener("mouseup", function() {
18758
+ return new ResizeObserver(B).observe(c), k.refresh = m, window.addEventListener("focus", m), document.addEventListener("mouseup", function() {
18741
18759
  k.painterPending && (k.painterPending = !1, setTimeout(ke.applyPainter, 0));
18742
18760
  }), document.addEventListener("keydown", function(M) {
18743
18761
  if (k.painter === null || k.painterPending)
@@ -18745,13 +18763,13 @@ const Uo = function(e, t, n) {
18745
18763
  let K = M.target;
18746
18764
  if (K && (K.tagName === "INPUT" || K.tagName === "TEXTAREA" || K.isContentEditable))
18747
18765
  return;
18748
- let W = S();
18766
+ let W = I();
18749
18767
  W && W.edition || (M.key === "Escape" ? ke.cancelPainter() : M.key === "Enter" ? (M.preventDefault(), M.stopPropagation(), ke.applyPainter()) : (M.key === "F2" || M.key === "Delete" || M.key === "Backspace" || M.key.length === 1 && !M.ctrlKey && !M.metaKey && !M.altKey) && ke.cancelPainter());
18750
- }, !0), l.onclick = _t.undo, s.onclick = _t.redo, m.onclick = function() {
18768
+ }, !0), s.onclick = _t.undo, u.onclick = _t.redo, b.onclick = function() {
18751
18769
  He.exportXlsx();
18752
- }, [l, s, m].forEach((M) => M.addEventListener("mousedown", (K) => K.preventDefault())), k.openInsertFunction = Jt, document.addEventListener("insertfunction", function() {
18770
+ }, [s, u, b].forEach((M) => M.addEventListener("mousedown", (K) => K.preventDefault())), k.openInsertFunction = Jt, document.addEventListener("insertfunction", function() {
18753
18771
  Jt();
18754
- }), u(), G;
18772
+ }), m(), j;
18755
18773
  }, Po = "https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..24,300..500,0..1,0&display=block", Vo = function() {
18756
18774
  if (!document.querySelector('link[href*="Material+Symbols+Outlined"]')) {
18757
18775
  let e = document.createElement("link");
@@ -18777,7 +18795,7 @@ const Uo = function(e, t, n) {
18777
18795
  };
18778
18796
  let Oa = {};
18779
18797
  const Tn = function(e) {
18780
- return e = e || {}, e.license && wt.setLicense(e.license), wt.setExtensions({ formula: Io, client: Sa, charts: Do, shapes: No, search: Ir, dataValidations: Tr, conditionalFormat: Rr, customSort: Sr, forms: Oo, formifier: Or, parser: ko, render: Mo, print: Bo, formatType: Va, pivot: Fo, comments: Lo, format: _o, importer: ja, sheets: Ia, editionBar: Wa, openai: Ya }), e.client && (Oa = e.client), $a({
18798
+ return e = e || {}, e.license && wt.setLicense(e.license), wt.setExtensions({ formula: Io, client: Ra, charts: Do, shapes: No, search: Ir, dataValidations: Tr, conditionalFormat: Sr, customSort: Rr, forms: Oo, formifier: Or, parser: ko, render: Mo, print: Bo, formatType: Va, pivot: Fo, comments: Lo, format: _o, importer: ja, sheets: Ia, editionBar: Wa, openai: Ya }), e.client && (Oa = e.client), $a({
18781
18799
  url: e.client && (e.client.api || e.client.url),
18782
18800
  token: e.client && e.client.token,
18783
18801
  onopen: e.onopen
@@ -18793,14 +18811,14 @@ Tn.load = async function(e, t) {
18793
18811
  let n = t.guid;
18794
18812
  if (Da(e, t), !n || !await tr(n))
18795
18813
  throw new Error("Document not found: " + n);
18796
- return k.remote = Sa(Object.assign({
18814
+ return k.remote = Ra(Object.assign({
18797
18815
  url: Ze,
18798
18816
  token: Zn() || void 0,
18799
18817
  onbeforeloadimage: Za
18800
18818
  }, Oa)), Uo(e, n, t);
18801
18819
  };
18802
18820
  Tn.list = function(e, t) {
18803
- Da(e, t), Ro(e);
18821
+ Da(e, t), So(e);
18804
18822
  };
18805
18823
  export {
18806
18824
  Tn as default