From 0f9091c8273e8dddbeff921aa38d2298d635493b Mon Sep 17 00:00:00 2001 From: action Date: Wed, 2 Jul 2025 06:09:57 +0000 Subject: [PATCH] Add decoded output file --- output.js | 39314 ++-------------------------------------------------- output.py | Bin 25928 -> 25928 bytes 2 files changed, 912 insertions(+), 38402 deletions(-) diff --git a/output.js b/output.js index 23bcc6a..995036b 100644 --- a/output.js +++ b/output.js @@ -1,38461 +1,971 @@ -//Tue Jul 01 2025 08:30:56 GMT+0000 (Coordinated Universal Time) +//Wed Jul 02 2025 06:09:57 GMT+0000 (Coordinated Universal Time) //Base:https://github.com/echo094/decode-js //Modify:https://github.com/smallfawn/decode_action -!function (a, b) { - if ("object" == typeof exports && "object" == typeof module) { - module.exports = b(); - } else { - if ("function" == typeof define && define.amd) { - define([], b); - } else { - var c = b(); - for (var d in c) ("object" == typeof exports ? exports : a)[d] = c[d]; +function _0x2bc3(_0x5e0aa9, _0x112568) { + const _0x54c96f = _0x55b8(); + _0x2bc3 = function (_0x51deda, _0x28a7e4) { + _0x51deda = _0x51deda - 241; + let _0x2ef69d = _0x54c96f[_0x51deda]; + return _0x2ef69d; + }; + return _0x2bc3(_0x5e0aa9, _0x112568); +} +const _0x30b83a = _0x2bc3; +(function (_0x509800, _0x41965d) { + (function () {})(); + const _0x52c110 = _0x2bc3, + _0x1f2e49 = _0x509800(); + while (true) { + try { + const _0x43dd1d = parseInt(_0x52c110(433)) / 1 * (parseInt(_0x52c110(264)) / 2) + parseInt(_0x52c110(273)) / 3 + parseInt(_0x52c110(405)) / 4 * (-parseInt(_0x52c110(326)) / 5) + -parseInt(_0x52c110(414)) / 6 * (-parseInt(_0x52c110(381)) / 7) + -parseInt(_0x52c110(310)) / 8 + -parseInt(_0x52c110(308)) / 9 + -parseInt(_0x52c110(315)) / 10 * (-parseInt(_0x52c110(396)) / 11); + if (_0x43dd1d === _0x41965d) break;else _0x1f2e49.push(_0x1f2e49.shift()); + } catch (_0x26bb69) { + _0x1f2e49.push(_0x1f2e49.shift()); } } -}(this, function () { - return function (a) { - var b = {}; - function c(d) { - if (b[d]) { - return b[d].exports; - } - b[d] = { - i: d, - l: false, - exports: {} - }; - var f = b[d]; - a[d].call(f.exports, f, f.exports, c); - f.l = true; - return f.exports; - } - c.m = a; - c.c = b; - c.d = function (d, f, g) { - c.o(d, f) || Object.defineProperty(d, f, { - enumerable: true, - get: g - }); - }; - c.r = function (d) { - "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(d, Symbol.toStringTag, { - value: "Module" - }); - Object.defineProperty(d, "__esModule", { - value: true - }); - }; - c.t = function (d, f) { - if (1 & f && (d = c(d)), 8 & f) { - return d; - } - if (4 & f && "object" == typeof d && d && d.__esModule) { - return d; - } - var g = Object.create(null); - if (c.r(g), Object.defineProperty(g, "default", { - enumerable: true, - value: d - }), 2 & f && "string" != typeof d) { - for (var h in d) c.d(g, h, function (j) { - return d[j]; - }.bind(null, h)); - } - return g; - }; - c.n = function (d) { - var f = d && d.__esModule ? function () { - return d.default; - } : function () { - return d; - }; - c.d(f, "a", f); - return f; - }; - c.o = function (d, f) { - return Object.prototype.hasOwnProperty.call(d, f); - }; - c.p = ""; - return c(c.s = 188); - }([function (b, d, g) { - "use strict"; - - g.d(d, "a", function () { - return v; - }); - g.d(d, "c", function () { - return w; - }); - g.d(d, "b", function () { - return x; - }); - var h = g(31); - var j = g.n(h); - var k = g(1); - var m = g.n(k); - var p = g(2); - var q = g.n(p); - var v = function () { - function y(z) { - var A = arguments.length > 1 && undefined !== arguments[1] ? arguments[1] : ""; - m()(this, y); - "string" == typeof z ? (this.el = document.createElement(z), "" !== A && (this.el.className = A)) : this.el = z; - this.data = {}; - } - return q()(y, [{ - key: "data", - value: function (z, A) { - return undefined !== A ? (this.data[z] = A, this) : this.data[z]; - } - }, { - key: "on", - value: function (z, A) { - var B = z.split("."); - var C = j()(B); - var D = C[0]; - var E = C.slice(1); - var F = D; - "mousewheel" === F && /Firefox/i.test(window.navigator.userAgent) && (F = "DOMMouseScroll"); - this.el.addEventListener(F, function (G) { - for (var H = 0; H < E.length; H += 1) { - var I = E[H]; - if ("left" === I && 0 !== G.button) { - return; - } - if ("right" === I && 2 !== G.button) { - return; - } - "stop" === I && G.stopPropagation(); - } - A && A(G); - }, { - passive: false - }); - return this; - } - }, { - key: "offset", - value: function (z) { - var A = this; - if (undefined !== z) { - Object.keys(z).forEach(function (C) { - A.css(C, "".concat(z[C], "px")); - }); - return this; - } - var B = this.el; - return { - top: B.offsetTop, - left: B.offsetLeft, - height: B.offsetHeight, - width: B.offsetWidth - }; - } - }, { - key: "scroll", - value: function (z) { - var A = this.el; - undefined !== z && (undefined !== z.left && (A.scrollLeft = z.left), undefined !== z.top && (A.scrollTop = z.top)); - return { - left: A.scrollLeft, - top: A.scrollTop - }; - } - }, { - key: "box", - value: function () { - return this.el.getBoundingClientRect(); - } - }, { - key: "parent", - value: function () { - return new y(this.el.parentNode); - } - }, { - key: "removeFromParent", - value: function () { - this.el.parentNode && this.el.parentNode.removeChild(this.el); - } - }, { - key: "children", - value: function () { - for (var z = this, A = arguments.length, B = new Array(A), C = 0; C < A; C++) { - B[C] = arguments[C]; - } - return 0 === arguments.length ? this.el.childNodes : (B.forEach(function (D) { - return z.child(D); - }), this); - } - }, { - key: "removeChild", - value: function (z) { - var A = z; - z instanceof y && (A = z.el); - this.el.removeChild(A); - } - }, { - key: "child", - value: function (z) { - var A = z; - "string" == typeof z ? A = document.createTextNode(z) : z instanceof y && (A = z.el); - A && this.el.appendChild(A); - return this; - } - }, { - key: "contains", - value: function (z) { - return this.el.contains(z); - } - }, { - key: "className", - value: function (z) { - return undefined !== z ? (this.el.className = z, this) : this.el.className; - } - }, { - key: "addClass", - value: function (z) { - this.el.classList.add(z); - return this; - } - }, { - key: "hasClass", - value: function (z) { - return this.el.classList.contains(z); - } - }, { - key: "removeClass", - value: function (z) { - this.el && this.el.classList.remove(z); - return this; - } - }, { - key: "toggle", - value: function () { - var z = arguments.length > 0 && undefined !== arguments[0] ? arguments[0] : "active"; - return this.toggleClass(z); - } - }, { - key: "toggleClass", - value: function (z) { - return this.el.classList.toggle(z); - } - }, { - key: "active", - value: function () { - var z = !(arguments.length > 0 && undefined !== arguments[0]) || arguments[0]; - var A = arguments.length > 1 && undefined !== arguments[1] ? arguments[1] : "active"; - z ? this.addClass(A) : this.removeClass(A); - return this; - } - }, { - key: "checked", - value: function () { - var z = !(arguments.length > 0 && undefined !== arguments[0]) || arguments[0]; - this.active(z, "checked"); - return this; - } - }, { - key: "disabled", - value: function () { - var z = !(arguments.length > 0 && undefined !== arguments[0]) || arguments[0]; - z ? this.addClass("disabled") : this.removeClass("disabled"); - return this; - } - }, { - key: "attr", - value: function (z, A) { - var B = this; - if (undefined !== A) { - this.el.setAttribute(z, A); - } else { - if ("string" == typeof z) { - return this.el.getAttribute(z); - } - Object.keys(z).forEach(function (C) { - B.el.setAttribute(C, z[C]); - }); - } - return this; - } - }, { - key: "removeAttr", - value: function (z) { - this.el.removeAttribute(z); - return this; - } - }, { - key: "html", - value: function (z) { - return undefined !== z ? (this.el.innerHTML = z, this) : this.el.innerHTML; - } - }, { - key: "val", - value: function (z) { - return undefined !== z ? (this.el.value = z, this) : this.el.value; - } - }, { - key: "focus", - value: function () { - this.el.focus(); - } - }, { - key: "cssRemoveKeys", - value: function () { - for (var z = this, A = arguments.length, B = new Array(A), C = 0; C < A; C++) { - B[C] = arguments[C]; - } - B.forEach(function (D) { - return z.el.style.removeProperty(D); - }); - return this; - } - }, { - key: "css", - value: function (z, A) { - var B = this; - return undefined === A && "string" != typeof z ? (Object.keys(z).forEach(function (C) { - B.el.style[C] = z[C]; - }), this) : undefined !== A ? (this.el.style[z] = A, this) : this.el.style[z]; - } - }, { - key: "computedStyle", - value: function () { - return window.getComputedStyle(this.el, null); - } - }, { - key: "show", - value: function () { - var z = arguments.length > 0 && undefined !== arguments[0] && arguments[0]; - z ? this.css("display", "flex") : this.css("display", "block"); - return this; - } - }, { - key: "hide", - value: function () { - this.css("display", "none"); - return this; - } - }]); - }(); - var w = function (y) { - var z = arguments.length > 1 && undefined !== arguments[1] ? arguments[1] : ""; - return new v(y, z); - }; - function x(y, z) { - var A = y.getBoundingClientRect(); - return { - x: z.clientX - A.left, - y: z.clientY - A.top - }; - } - }, function (a, b) { - a.exports = function (c, d) { - if (!(c instanceof d)) { - throw new TypeError("Cannot call a class as a function"); - } - }; - a.exports.__esModule = true; - a.exports.default = a.exports; - }, function (a, b, c) { - var d = c(55); - function f(g, h) { - for (var j = 0; j < h.length; j++) { - var k = h[j]; - k.enumerable = k.enumerable || false; - k.configurable = true; - "value" in k && (k.writable = true); - Object.defineProperty(g, d(k.key), k); +})(_0x55b8, 458857); +const CAPTCHA_CONFIG = { + "username": "37VAFj", + "password": "37VAF0Nj", + "typeid": "27", + "softid": _0x30b83a(309), + "apiUrl": "https://api.ttshitu.com/predict", + "reportUrl": _0x30b83a(362) +}; +function initCaptchaAutoSolver() { + const _0x50eea7 = _0x30b83a; + window.isProcessingCaptcha = false; + window.lastCaptchaTime = 0; + window[_0x50eea7(353)] = null; + window[_0x50eea7(366)] = setInterval(detectAndSolveCaptcha, 2000); + console[_0x50eea7(351)](_0x50eea7(357)); +} +function stopCaptchaAutoSolver() { + const _0x9f9e24 = _0x30b83a; + window[_0x9f9e24(366)] && (clearInterval(window[_0x9f9e24(366)]), console[_0x9f9e24(351)](_0x9f9e24(342))); +} +async function detectAndSolveCaptcha() { + const _0x5cb18f = _0x30b83a; + if (window.lastCaptchaTime && Date[_0x5cb18f(276)]() - window.lastCaptchaTime < 3000) return; + if (window.isProcessingCaptcha) return; + window[_0x5cb18f(353)] && (await reportError(window.lastCaptchaId), window.lastCaptchaId = null); + await new Promise(_0x55a8f5 => setTimeout(_0x55a8f5, 1000)); + const _0x30250a = document[_0x5cb18f(354)](_0x5cb18f(403)); + if (_0x30250a) { + const _0x144130 = _0x30250a[_0x5cb18f(409)](_0x5cb18f(244)); + if (_0x144130.length === 9) { + { + console.log(_0x5cb18f(330)); + await solveGridCaptcha(); + return; } } - a.exports = function (g, h, j) { - h && f(g.prototype, h); - j && f(g, j); - Object.defineProperty(g, "prototype", { - writable: false - }); - return g; - }; - a.exports.__esModule = true; - a.exports.default = a.exports; - }, function (a, b) { - function c(d) { - a.exports = c = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (f) { - return f.__proto__ || Object.getPrototypeOf(f); - }; - a.exports.__esModule = true; - a.exports.default = a.exports; - return c(d); - } - a.exports = c; - a.exports.__esModule = true; - a.exports.default = a.exports; - }, function (a, b, c) { - "use strict"; - - c.d(b, "a", function () { - return d; - }); - var d = "satreport"; - window.devicePixelRatio; - }, function (a, b, c) { - var d = c(66); - a.exports = function (f, g) { - if ("function" != typeof g && null !== g) { - throw new TypeError("Super expression must either be null or a function"); - } - f.prototype = Object.create(g && g.prototype, { - constructor: { - value: f, - writable: true, - configurable: true - } - }); - Object.defineProperty(f, "prototype", { - writable: false - }); - g && d(f, g); - }; - a.exports.__esModule = true; - a.exports.default = a.exports; - }, function (a, b, c) { - var d = c(11).default; - var f = c(65); - a.exports = function (g, h) { - if (h && ("object" == d(h) || "function" == typeof h)) { - return h; - } - if (undefined !== h) { - throw new TypeError("Derived constructors may only return object or undefined"); - } - return f(g); - }; - a.exports.__esModule = true; - a.exports.default = a.exports; - }, function (b, c, d) { - var f = d(41); - var g = d(61); - var h = d(34); - var j = d(43); - b.exports = function (k, l) { - return f(k) || g(k, l) || h(k, l) || j(); - }; - b.exports.__esModule = true; - b.exports.default = b.exports; - }, function (b, d, f) { - "use strict"; - - f.d(d, "a", function () { - return v; - }); - f.d(d, "b", function () { - return p; - }); - f.d(d, "c", function () { - return q; - }); - function g(w, x) { - var y = "undefined" != typeof Symbol && w[Symbol.iterator] || w["@@iterator"]; - if (!y) { - if (Array.isArray(w) || (y = function (E, F) { - if (E) { - if ("string" == typeof E) { - return h(E, F); - } - var G = {}.toString.call(E).slice(8, -1); - "Object" === G && E.constructor && (G = E.constructor.name); - return "Map" === G || "Set" === G ? Array.from(E) : "Arguments" === G || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(G) ? h(E, F) : undefined; - } - }(w)) || x && w && "number" == typeof w.length) { - y && (w = y); - var z = 0; - var A = function () {}; - return { - s: A, - n: function () { - return z >= w.length ? { - done: true - } : { - done: false, - value: w[z++] - }; - }, - e: function (E) { - throw E; - }, - f: A - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - var B; - var C = true; - var D = false; - return { - s: function () { - y = y.call(w); - }, - n: function () { - var E = y.next(); - C = E.done; - return E; - }, - e: function (E) { - D = true; - B = E; - }, - f: function () { - try { - C || null == y.return || y.return(); - } finally { - if (D) { - throw B; - } - } - } - }; - } - function h(w, x) { - (null == x || x > w.length) && (x = w.length); - for (var y = 0, z = Array(x); y < x; y++) { - z[y] = w[y]; - } - return z; - } - var j = ["zh"]; - var k = { - zh: { - toolbar: { - undo: "撤销", - redo: "恢复", - print: "打印", - paintformat: "格式刷", - clearformat: "清除格式", - format: "数据格式", - fontName: "字体", - fontSize: "字号", - fontBold: "加粗", - fontItalic: "倾斜", - underline: "下划线", - strike: "删除线", - color: "字体颜色", - bgcolor: "填充颜色", - border: "边框", - merge: "合并单元格", - align: "水平对齐", - valign: "垂直对齐", - textwrap: "自动换行", - freeze: "冻结", - autofilter: "自动筛选", - formula: "函数", - more: "更多", - save: "保存", - calc: "报表计算", - close: "关闭", - db: "数据源" - }, - contextmenu: { - copy: "复制", - cut: "剪切", - paste: "粘贴", - pasteValue: "粘贴数据", - pasteFormat: "粘贴格式", - hide: "隐藏", - insertRow: "插入行", - insertColumn: "插入列", - deleteSheet: "删除", - deleteRow: "删除行", - deleteColumn: "删除列", - deleteCell: "删除", - deleteCellText: "删除数据", - validation: "数据验证", - cellprintable: "可打印", - cellnonprintable: "不可打印", - celleditable: "可编辑", - cellnoneditable: "不可编辑", - code: "语法编辑", - datasource: "数据源" - }, - print: { - size: "纸张大小", - orientation: "方向", - orientations: ["纵向", "横向"], - settings: "打印设置" - }, - design: { - designer: "设计器" - }, - format: { - normal: "正常", - text: "文本", - number: "数值", - percent: "百分比", - rmb: "人民币", - usd: "美元", - eur: "欧元", - date: "短日期", - time: "时间", - datetime: "长日期", - duration: "持续时间", - rmb_uppercase: "中文大写数字" - }, - formula: { - sum: "求和", - average: "求平均值", - max: "求最大值", - min: "求最小值", - concat: "字符拼接", - _if: "条件判断", - and: "和", - or: "或" - }, - validation: { - required: "此值必填", - notMatch: "此值不匹配验证规则", - between: "此值应在 {} 和 {} 之间", - notBetween: "此值不应在 {} 和 {} 之间", - notIn: "此值不在列表中", - equal: "此值应该等于 {}", - notEqual: "此值不应该等于 {}", - lessThan: "此值应该小于 {}", - lessThanEqual: "此值应该小于等于 {}", - greaterThan: "此值应该大于 {}", - greaterThanEqual: "此值应该大于等于 {}" - }, - error: { - pasteForMergedCell: "无法对合并的单元格执行此操作" - }, - calendar: { - weeks: ["日", "一", "二", "三", "四", "五", "六"], - months: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"] - }, - button: { - next: "下一步", - cancel: "取消", - remove: "删除", - save: "保存", - ok: "确认", - apply: "应用", - query: "查询", - reset: "重置" - }, - sort: { - desc: "降序", - asc: "升序" - }, - filter: { - empty: "空白" - }, - dataValidation: { - mode: "模式", - range: "单元区间", - criteria: "条件", - modeType: { - cell: "单元格", - column: "列模式", - row: "行模式" - }, - type: { - list: "列表", - number: "数字", - date: "日期", - phone: "手机号", - email: "电子邮件" - }, - operator: { - be: "在区间", - nbe: "不在区间", - lt: "小于", - lte: "小于等于", - gt: "大于", - gte: "大于等于", - eq: "等于", - neq: "不等于" - } - } - } - }; - function m(w, x) { - if (x) { - var y; - var z = g(j); - try { - for (z.s(); !(y = z.n()).done;) { - var A = y.value; - if (!x[A]) { - break; - } - for (var B = x[A], C = w.match(/(?:\\.|[^.])+/g), D = 0; D < C.length; D += 1) { - var E = B[C[D]]; - if (!E) { - break; - } - if (D === C.length - 1) { - return E; - } - B = E; - } - } - } catch (F) { - z.e(F); - } finally { - z.f(); - } + } + const _0x47d017 = document.querySelector(_0x5cb18f(307)); + if (_0x47d017) { + { + const _0x516458 = _0x47d017[_0x5cb18f(317)] || ""; + if (_0x516458[_0x5cb18f(314)](_0x5cb18f(419)) && _0x516458[_0x5cb18f(314)](_0x5cb18f(337))) { + console.log(_0x5cb18f(296)); + await solveType2Captcha(); + return; } } - function p(w) { - var x = m(w, k); - if (!x && window && window.satreport && window.satreport.$messages && (x = m(w, window.satreport.$messages)), x) { - return x; - } - var y = w.split("."); - return y[y.length - 1]; + } + const _0x26411c = document[_0x5cb18f(354)](_0x5cb18f(248)) || document.querySelector("img[id*=\"captcha\"], img[class*=\"captcha\"]"); + _0x26411c && (console.log(_0x5cb18f(282)), await solveType1Captcha()); +} +async function refreshType1Captcha() { + const _0x380f2c = _0x30b83a; + try { + const _0x5683fc = [_0x380f2c(252), _0x380f2c(258), _0x380f2c(391), _0x380f2c(367)]; + let _0x243fd9; + for (const _0x126904 of _0x5683fc) { + _0x243fd9 = document[_0x380f2c(354)](_0x126904); + if (_0x243fd9) break; } - function q(w) { - return function () { - return p(w); - }; - } - function v(w, x) { - var y = arguments.length > 2 && undefined !== arguments[2] && arguments[2]; - y ? j = [w] : j.unshift(w); - x && (k[w] = x); - } - }, function (b, c, d) { - var f = d(63); - var g = d(44); - var h = d(34); - var j = d(64); - b.exports = function (k) { - return f(k) || g(k) || h(k) || j(); - }; - b.exports.__esModule = true; - b.exports.default = b.exports; - }, function (j, q, z) { - "use strict"; - - z.d(q, "a", function () { - return a0; - }); - z.d(q, "b", function () { - return Q; - }); - z.d(q, "d", function () { - return M; - }); - z.d(q, "c", function () { - return N; - }); - var A = z(9); - var B = z.n(A); - var C = z(7); - var D = z.n(C); - var F = z(1); - var G = z.n(F); - var H = z(2); - var I = z.n(H); - z(19); - function J(a1, a2) { - var a3 = "undefined" != typeof Symbol && a1[Symbol.iterator] || a1["@@iterator"]; - if (!a3) { - if (Array.isArray(a1) || (a3 = function (a9, aa) { - if (a9) { - if ("string" == typeof a9) { - return K(a9, aa); - } - var ab = {}.toString.call(a9).slice(8, -1); - "Object" === ab && a9.constructor && (ab = a9.constructor.name); - return "Map" === ab || "Set" === ab ? Array.from(a9) : "Arguments" === ab || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ab) ? K(a9, aa) : undefined; - } - }(a1)) || a2 && a1 && "number" == typeof a1.length) { - a3 && (a1 = a3); - var a4 = 0; - var a5 = function () {}; - return { - s: a5, - n: function () { - return a4 >= a1.length ? { - done: true - } : { - done: false, - value: a1[a4++] - }; - }, - e: function (a9) { - throw a9; - }, - f: a5 - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - var a6; - var a7 = true; - var a8 = false; - return { - s: function () { - a3 = a3.call(a1); - }, - n: function () { - var a9 = a3.next(); - a7 = a9.done; - return a9; - }, - e: function (a9) { - a8 = true; - a6 = a9; - }, - f: function () { - try { - a7 || null == a3.return || a3.return(); - } finally { - if (a8) { - throw a6; - } - } - } - }; - } - function K(a1, a2) { - (null == a2 || a2 > a1.length) && (a2 = a1.length); - for (var a3 = 0, a4 = Array(a2); a3 < a2; a3++) { - a4[a3] = a1[a3]; - } - return a4; - } - function L() { - return window.devicePixelRatio || 1; - } - function M() { - return L() - 0.5; - } - function N(a1) { - return parseInt(a1 * L(), 10); - } - function P(a1) { - var a2 = N(a1); - return Number((a2 > 0 ? a2 - 0.5 : 0).toFixed(1)); - } - var Q = function () { - return I()(function a1(a2, a3, a4, a5) { - var a6 = arguments.length > 4 && undefined !== arguments[4] ? arguments[4] : 0; - G()(this, a1); - this.x = a2; - this.y = a3; - this.width = a4; - this.height = a5; - a6 instanceof Object ? (this.padding = a6, this.paddingLeft = a6.left, this.paddingRight = a6.right, this.paddingTop = a6.top, this.paddingBottom = a6.bottom) : (this.padding = { - left: a6, - right: a6, - top: a6, - bottom: a6 - }, this.paddingLeft = a6, this.paddingRight = a6, this.paddingTop = a6, this.paddingBottom = a6); - this.bgcolor = null; - this.borderTop = null; - this.borderRight = null; - this.borderBottom = null; - this.borderLeft = null; - }, [{ - key: "setBorders", - value: function (a2) { - var a3 = a2.top; - var a4 = a2.bottom; - var a5 = a2.left; - var a6 = a2.right; - a3 && (this.borderTop = a3); - a6 && (this.borderRight = a6); - a4 && (this.borderBottom = a4); - a5 && (this.borderLeft = a5); - } - }, { - key: "innerWidth", - value: function () { - return this.width - (this.paddingLeft + this.paddingRight) - 2; - } - }, { - key: "innerHeight", - value: function () { - return this.height - (this.paddingTop + this.paddingBottom) - 2; - } - }, { - key: "textx", - value: function (a2) { - var a3 = this.width; - var a4 = this.padding; - var a5 = this.x; - "left" === a2 ? a5 += a4.left : "center" === a2 ? a5 += a3 / 2 : "right" === a2 && (a5 += a3 - a4.right); - return a5; - } - }, { - key: "texty", - value: function (a2, a3) { - var a4 = this.height; - var a5 = this.padding; - var a6 = this.y; - "top" === a2 ? a6 += a5.top : "middle" === a2 ? a6 += a4 / 2 - a3 / 2 : "bottom" === a2 && (a6 += a4 - a5.bottom - a3); - return a6; - } - }, { - key: "topxys", - value: function () { - var a2 = this.x; - var a3 = this.y; - return [[a2, a3], [a2 + this.width, a3]]; - } - }, { - key: "rightxys", - value: function () { - var a2 = this.x; - var a3 = this.y; - var a4 = this.width; - return [[a2 + a4, a3], [a2 + a4, a3 + this.height]]; - } - }, { - key: "bottomxys", - value: function () { - var a2 = this.x; - var a3 = this.y; - var a4 = this.width; - var a5 = this.height; - return [[a2, a3 + a5], [a2 + a4, a3 + a5]]; - } - }, { - key: "leftxys", - value: function () { - var a2 = this.x; - var a3 = this.y; - return [[a2, a3], [a2, a3 + this.height]]; - } - }]); - }(); - function R(a1, a2, a3, a4, a5, a6, a7) { - var a8 = { - x: 0, - y: 0 - }; - "underline" === a1 ? a8.y = "bottom" === a5 ? 0 : "top" === a5 ? -(a6 + 2) : -a6 / 2 : "strike" === a1 && ("bottom" === a5 ? a8.y = a6 / 2 : "top" === a5 && (a8.y = -(a6 / 2 + 2))); - "center" === a4 ? a8.x = a7 / 2 : "right" === a4 && (a8.x = a7); - this.line([a2 - a8.x, a3 - a8.y], [a2 - a8.x + a7, a3 - a8.y]); - } - var T = Math.ceil; - var U = Math.PI; - function V(a1, a2, a3, a4, a5, a6) { - a1.beginPath(); - a1.arc(a2 + a6, a3 + a6, a6, -U, -0.5 * U, false); - a1.arc(a2 + a4 - a6, a3 + a6, a6, -0.5 * U, 0, false); - a1.arc(a2 + a4 - a6, a3 + a5 - a6, a6, 0, 0.5 * U, false); - a1.arc(a2 + a6, a3 + a5 - a6, a6, 0.5 * U, U, false); - a1.closePath(); - } - function W(a1, a2, a3, a4, a5, a6) { - 0 === a6 ? a1.fillRect(a2, a3, a4, a5) : (V(a1, a2, a3, a4, a5, a6), a1.fill()); - } - function X(a1, a2, a3, a4, a5, a6) { - V(a1, a2, a3, a4, a5, a6); - a1.stroke(); - } - function Y(a1, a2, a3, a4, a5) { - var a6 = Math.min(a4, a5) / 2; - a1.beginPath(); - a1.arc(a2 + a6, a3 + a6, a6, 0, 2 * Math.PI); - a1.closePath(); - a1.fill(); - } - function Z(a1, a2, a3, a4, a5) { - var a6 = Math.min(a4, a5) / 2; - a1.beginPath(); - a1.arc(a2 + a6, a3 + a6, a6, 0, 2 * Math.PI); - a1.closePath(); - a1.stroke(); - } - var a0 = function () { - return I()(function a1(a2, a3, a4) { - var a5 = arguments.length > 3 && undefined !== arguments[3] ? arguments[3] : null; - G()(this, a1); - a5 ? this.ctx = a5 : (this.el = a2, this.ctx = this.el.getContext("2d")); - this.resize(a3, a4); - this.process = []; - this.DrawBox = Q; - this.npx = N; - this.dpr = L; - }, [{ - key: "resize", - value: function (a2, a3) { - if (this.el) { - var a4 = L(); - this.el.style.width = "".concat(a2, "px"); - this.el.style.height = "".concat(a3, "px"); - this.el.width = a2 * a4; - this.el.height = a3 * a4; - } - } - }, { - key: "clear", - value: function () { - var a2 = this.el; - var a3 = a2.width; - var a4 = a2.height; - this.ctx.clearRect(0, 0, a3, a4); - return this; - } - }, { - key: "attr", - value: function (a2) { - Object.assign(this.ctx, a2); - return this; - } - }, { - key: "save", - value: function () { - this.ctx.save(); - this.ctx.beginPath(); - return this; - } - }, { - key: "restore", - value: function () { - this.ctx.restore(); - return this; - } - }, { - key: "beginPath", - value: function () { - this.ctx.beginPath(); - return this; - } - }, { - key: "translate", - value: function (a2, a3) { - this.ctx.translate(N(a2), N(a3)); - return this; - } - }, { - key: "scale", - value: function (a2, a3) { - this.ctx.scale(a2, a3); - return this; - } - }, { - key: "clearRect", - value: function (a2, a3, a4, a5) { - this.ctx.clearRect(a2, a3, a4, a5); - return this; - } - }, { - key: "fillRect", - value: function (a2, a3, a4, a5) { - this.ctx.fillRect(N(a2) - 0.5, N(a3) - 0.5, N(a4), N(a5)); - return this; - } - }, { - key: "clearRectN", - value: function (a2, a3, a4, a5) { - this.ctx.clearRect(N(a2) - 0.5, N(a3) - 0.5, N(a4), N(a5)); - return this; - } - }, { - key: "fillText", - value: function (a2, a3, a4) { - this.ctx.fillText(a2, N(a3), N(a4)); - return this; - } - }, { - key: "drawText", - value: function (a2, a3) { - var a4 = a3.x; - var a5 = a3.y; - var a6 = a3.w; - var a7 = a3.h; - var a8 = this.ctx; - var a9 = new Q(a4, a5, a6, a7); - a8.measureText(a2); - var aa = a9.textx("center"); - var ab = a9.texty("middle", 32); - this.fillText(a2, aa, ab); - } - }, { - key: "text", - value: function (a2, a3) { - var a4 = this; - var a5 = arguments.length > 2 && undefined !== arguments[2] ? arguments[2] : {}; - var a6 = !(arguments.length > 3 && undefined !== arguments[3]) || arguments[3]; - var a7 = this.ctx; - var a8 = a5.align; - var a9 = a5.valign; - var aa = a5.font; - var ab = a5.color; - var ac = a5.strike; - var ad = a5.underline; - var ae = a3.textx(a8); - a7.save(); - a7.beginPath(); - var af = {}; - a8 && (af.textAlign = a8); - a9 && (af.textBaseline = a9); - ab && (af.fillStyle = ab, af.strokeStyle = ab); - var ag = 12; - if (aa) { - af.font = "".concat(aa.italic ? "italic" : "", " ").concat(aa.bold ? "bold" : "", " ").concat(N(aa.size), "px ").concat(aa.name); - ag = aa.size; - } else { - var ah; - var ai = a7.font.split(" "); - var aj = J(ai); - try { - for (aj.s(); !(ah = aj.n()).done;) { - var ak = ah.value; - var al = ak.indexOf("px"); - al > 0 && (ag = parseInt(ak.substring(0, al), 10)); - } - } catch (ar) { - aj.e(ar); - } finally { - aj.f(); - } - } - this.attr(af); - var am = "".concat(a2).split("\n"); - var an = a3.innerWidth(); - var ao = []; - am.forEach(function (as) { - var at = a7.measureText(as).width; - if (a6 && at > N(an)) { - for (var au = { - w: 0, - len: 0, - start: 0 - }, av = 0; av < as.length; av += 1) { - au.w >= N(an) && (ao.push(as.substr(au.start, au.len)), au = { - w: 0, - len: 0, - start: av - }); - au.len += 1; - au.w += a7.measureText(as[av]).width + 1; - } - au.len > 0 && ao.push(as.substr(au.start, au.len)); - } else { - ao.push(as); - } - }); - var ap = (ao.length - 1) * (ag + 2); - var aq = a3.texty(a9, ap); - ao.forEach(function (as) { - var at = a7.measureText(as).width; - a4.fillText(as, ae, aq); - ac && R.call(a4, "strike", ae, aq, a8, a9, ag, at); - ad && R.call(a4, "underline", ae, aq, a8, a9, ag, at); - aq += ag + 2; - }); - a7.restore(); - return this; - } - }, { - key: "border", - value: function (a2, a3) { - var a4 = this.ctx; - a4.lineWidth = M(); - a4.strokeStyle = a3; - "medium" === a2 ? a4.lineWidth = N(2) - 0.5 : "thick" === a2 ? a4.lineWidth = N(3) : "dashed" === a2 ? a4.setLineDash([N(3), N(2)]) : "dotted" === a2 ? a4.setLineDash([N(1), N(1)]) : "double" === a2 && a4.setLineDash([N(2), 0]); - return this; - } - }, { - key: "line", - value: function () { - var a2 = this.ctx; - if (arguments.length > 1) { - a2.beginPath(); - var a3 = arguments.length <= 0 ? undefined : arguments[0]; - var a4 = D()(a3, 2); - var a5 = a4[0]; - var a6 = a4[1]; - a2.moveTo(P(a5), P(a6)); - for (var a7 = 1; a7 < arguments.length; a7 += 1) { - var a8 = a7 < 0 || arguments.length <= a7 ? undefined : arguments[a7]; - var a9 = D()(a8, 2); - var aa = a9[0]; - var ab = a9[1]; - a2.lineTo(P(aa), P(ab)); - } - a2.stroke(); - } - return this; - } - }, { - key: "strokeBorders", - value: function (a2) { - var a3 = this.ctx; - a3.save(); - var a4 = a2.borderTop; - var a5 = a2.borderRight; - var a6 = a2.borderBottom; - var a7 = a2.borderLeft; - a4 && (this.border.apply(this, B()(a4)), this.line.apply(this, B()(a2.topxys()))); - a5 && (this.border.apply(this, B()(a5)), this.line.apply(this, B()(a2.rightxys()))); - a6 && (this.border.apply(this, B()(a6)), this.line.apply(this, B()(a2.bottomxys()))); - a7 && (this.border.apply(this, B()(a7)), this.line.apply(this, B()(a2.leftxys()))); - a3.restore(); - } - }, { - key: "dropdown", - value: function (a2) { - var a3 = this.ctx; - var a4 = a2.x; - var a5 = a2.y; - var a6 = a4 + a2.width - 15; - var a7 = a5 + a2.height - 15; - a3.save(); - a3.beginPath(); - a3.moveTo(N(a6), N(a7)); - a3.lineTo(N(a6 + 8), N(a7)); - a3.lineTo(N(a6 + 4), N(a7 + 6)); - a3.closePath(); - a3.fillStyle = "rgba(0, 0, 0, .45)"; - a3.fill(); - a3.restore(); - } - }, { - key: "arrowRight", - value: function (a2) { - var a3 = this.ctx; - var a4 = a2.x; - var a5 = a2.y; - a2.width; - var a6 = a4 + 5 + 8; - var a7 = a5 + a2.height / 2; - a3.save(); - a3.beginPath(); - a3.moveTo(N(a6 - 3), N(a7 - 4)); - a3.lineTo(N(a6 - 3), N(a7 + 4)); - a3.lineTo(N(a6 + 3), N(a7)); - a3.closePath(); - a3.fillStyle = "rgba(0, 0, 0, .45)"; - a3.fill(); - a3.restore(); - } - }, { - key: "arrowDown", - value: function (a2) { - var a3 = this.ctx; - var a4 = a2.x; - var a5 = a2.y; - a2.width; - var a6 = a4 + 4 + 8; - var a7 = a5 + a2.height / 2; - a3.save(); - a3.beginPath(); - a3.moveTo(N(a6 - 4), N(a7 - 3)); - a3.lineTo(N(a6 + 4), N(a7 - 3)); - a3.lineTo(N(a6), N(a7 + 3)); - a3.closePath(); - a3.fillStyle = "rgba(0, 0, 0, .45)"; - a3.fill(); - a3.restore(); - } - }, { - key: "error", - value: function (a2) { - var a3 = this.ctx; - var a4 = a2.x; - var a5 = a2.y; - var a6 = a4 + a2.width - 1; - a3.save(); - a3.beginPath(); - a3.moveTo(N(a6 - 8), N(a5 - 1)); - a3.lineTo(N(a6), N(a5 - 1)); - a3.lineTo(N(a6), N(a5 + 8)); - a3.closePath(); - a3.fillStyle = "rgba(255,0,0,0.65)"; - a3.fill(); - a3.restore(); - } - }, { - key: "drawImage", - value: function (a2, a3, a4, a5, a6, a7) { - var a8 = this.ctx; - undefined === a6 ? a8.drawImage(a3, N(a4), N(a5)) : a8.drawImage(a3, N(a4), N(a5), N(a6), N(a7)); - } - }, { - key: "frozen", - value: function (a2) { - var a3 = this.ctx; - var a4 = a2.x; - var a5 = a2.y; - var a6 = a4 + a2.width - 1; - a3.save(); - a3.beginPath(); - a3.moveTo(N(a6 - 8), N(a5 - 1)); - a3.lineTo(N(a6), N(a5 - 1)); - a3.lineTo(N(a6), N(a5 + 8)); - a3.closePath(); - a3.fillStyle = "rgba(0, 255, 0, .85)"; - a3.fill(); - a3.restore(); - } - }, { - key: "rect", - value: function (a2, a3) { - var a4 = this.ctx; - var a5 = a2.x; - var a6 = a2.y; - var a7 = a2.width; - var a8 = a2.height; - var a9 = a2.bgcolor; - a4.save(); - a9 && (a4.beginPath(), a4.fillStyle = a9 || "#fff", a4.rect(N(a5) - 0.5, N(a6) - 0.5, N(a7) + 1, N(a8) + 1), a4.clip(), a4.fill()); - a4.beginPath(); - a5 < 0 && (a7 += a5, a5 = 0); - a6 < 0 && (a8 += a6, a6 = 0); - a4.rect(P(a5 + 1), P(a6 + 1), N(a7 - 2), N(a8 - 2)); - a4.clip(); - a3(); - a4.restore(); - } - }, { - key: "drawCheckBox", - value: function (a2, a3) { - var a4 = arguments.length > 2 && undefined !== arguments[2] ? arguments[2] : {}; - var a5 = a4.uncheckBgColor; - var a6 = undefined === a5 ? "#FFF" : a5; - var a7 = a4.checkBgColor; - var a8 = undefined === a7 ? "rgb(76, 73, 72)" : a7; - var a9 = a4.borderColor; - var aa = undefined === a9 ? "#000" : a9; - var ab = a4.boxSize; - var ac = undefined === ab ? 12 : ab; - var ad = this.ctx; - var ae = a2.x; - var af = a2.y; - ae = N(ae); - af = N(af); - ac = N(ac); - var ag = "number" == typeof a3 ? a3 > 1 ? 1 : a3 : 1; - ad.save(); - try { - ad.fillStyle = a3 ? a8 : a6; - var ah = Math.ceil(ac); - var ai = Math.ceil(ae); - var aj = Math.ceil(af); - if (W(ad, ai - 1, aj - 1, ah + 1, ah + 1, ac / 5), ad.lineWidth = 1, ad.strokeStyle = aa, X(ad, ai - 0.5, aj - 0.5, ah, ah, ac / 5), a3) { - ad.lineWidth = T(ac / 10); - ad.strokeStyle = a6; - var ak = ac / 4; - var al = ac / 2 * 0.9; - var am = ai + 0.2 * ac; - var an = aj + ac / 2; - ag < 0.5 && (ak *= 2 * ag); - ad.beginPath(); - ad.moveTo(am, an); - ad.lineTo(am + ak, an + ak); - ag > 0.5 && (ag < 1 && (al *= 2 * (ag - 0.5)), ad.lineTo(am + ak + al, an + ak - al)); - ad.stroke(); - } - } finally { - ad.restore(); - } - } - }, { - key: "drawRadioButton", - value: function (a2, a3) { - var a4 = arguments.length > 2 && undefined !== arguments[2] ? arguments[2] : {}; - var a5 = a4.checkColor; - var a6 = undefined === a5 ? "rgb(76, 73, 72)" : a5; - var a7 = a4.borderColor; - var a8 = undefined === a7 ? "#000" : a7; - var a9 = a4.bgColor; - var aa = undefined === a9 ? "#FFF" : a9; - var ab = a4.boxSize; - var ac = undefined === ab ? 13 : ab; - var ad = "number" == typeof a3 ? a3 > 1 ? 1 : a3 : 1; - var ae = this.ctx; - ae.save(); - try { - var af = a2.x; - var ag = a2.y; - ae.fillStyle = aa; - var ah = N(af); - var ai = N(ag); - var aj = N(ac); - if (Y(ae, ah - 1, ai - 1, aj + 1, aj + 1), ae.lineWidth = 1, ae.strokeStyle = a8, Z(ae, ah - 0.5, ai - 0.5, aj, aj), a3) { - var ak = aj * ad / 2; - var al = (aj - ak) / 2; - ae.fillStyle = a6; - Y(ae, T(100 * (ah - 0.5 + al)) / 100, T(100 * (ai - 0.5 + al)) / 100, T(100 * ak) / 100, T(100 * ak) / 100); - } - } finally { - ae.restore(); - } - } - }, { - key: "drawButton", - value: function (a2, a3, a4, a5) { - var a6 = arguments.length > 4 && undefined !== arguments[4] ? arguments[4] : {}; - var a7 = a6.backgroundColor; - var a8 = undefined === a7 ? "#EFEFEF" : a7; - var a9 = a6.bgColor; - var aa = undefined === a9 ? a8 : a9; - var ab = a6.radius; - var ac = undefined === ab ? 4 : ab; - var ad = a6.shadow; - var ae = undefined === ad ? null : ad; - var af = this.ctx; - af.save(); - try { - if (af.fillStyle = aa, ae) { - var ag = ae.color; - var ah = undefined === ag ? "rgba(0, 0, 0, 0.24)" : ag; - var ai = ae.blur; - var aj = undefined === ai ? 1 : ai; - var ak = ae.offsetX; - var al = undefined === ak ? 0 : ak; - var am = ae.offsetY; - var an = undefined === am ? 2 : am; - var ao = ae.offset; - var ap = undefined === ao ? {} : ao; - var aq = ap.x; - var ar = undefined === aq ? al : aq; - var as = ap.y; - var at = undefined === as ? an : as; - af.shadowColor = ah; - af.shadowBlur = aj; - af.shadowOffsetX = ar; - af.shadowOffsetY = at; - } - W(af, T(N(a2)), T(N(a3)), T(N(a4)), T(N(a5)), N(ac)); - } finally { - af.restore(); - } - } - }, { - key: "finish", - value: function (a2) { - return Promise.all(this.process).then(function () { - a2 && a2(true); - }).catch(function () { - a2 && a2(false); - }); - } - }]); - }(); - }, function (a, b) { - function c(d) { - a.exports = c = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (f) { - return typeof f; - } : function (f) { - return f && "function" == typeof Symbol && f.constructor === Symbol && f !== Symbol.prototype ? "symbol" : typeof f; - }; - a.exports.__esModule = true; - a.exports.default = a.exports; - return c(d); - } - a.exports = c; - a.exports.__esModule = true; - a.exports.default = a.exports; - }, function (b, d, g) { - "use strict"; - - function j(A, B) { - var C = "undefined" != typeof Symbol && A[Symbol.iterator] || A["@@iterator"]; - if (!C) { - if (Array.isArray(A) || (C = function (I, J) { - if (I) { - if ("string" == typeof I) { - return k(I, J); - } - var K = {}.toString.call(I).slice(8, -1); - "Object" === K && I.constructor && (K = I.constructor.name); - return "Map" === K || "Set" === K ? Array.from(I) : "Arguments" === K || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K) ? k(I, J) : undefined; - } - }(A)) || B && A && "number" == typeof A.length) { - C && (A = C); - var D = 0; - var E = function () {}; - return { - s: E, - n: function () { - return D >= A.length ? { - done: true - } : { - done: false, - value: A[D++] - }; - }, - e: function (I) { - throw I; - }, - f: E - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - var F; - var G = true; - var H = false; - return { - s: function () { - C = C.call(A); - }, - n: function () { - var I = C.next(); - G = I.done; - return I; - }, - e: function (I) { - H = true; - F = I; - }, - f: function () { - try { - G || null == C.return || C.return(); - } finally { - if (H) { - throw F; - } - } - } - }; - } - function k(A, B) { - (null == B || B > A.length) && (B = A.length); - for (var C = 0, D = Array(B); C < B; C++) { - D[C] = A[C]; - } - return D; - } - function m(A, B, C) { - A.addEventListener(B, C); - } - function p(A, B, C) { - A.removeEventListener(B, C); - } - function q(A) { - A.xclickoutside && (p(window.document.body, "click", A.xclickoutside), delete A.xclickoutside); - } - function v(A, B, C) { - A.xclickoutside = function (D) { - 2 === D.detail || A.contains(D.target) || C && C.contains(D.target) || (B ? B(A) : (A.hide(), q(A))); - }; - m(window.document.body, "click", A.xclickoutside); - } - function w(A, B, C) { - p(A, "mouseup", A.xEvtUp); - p(A, "mousemove", B); - m(A, "mousemove", B); - A.xEvtUp = function (D) { - p(A, "mousemove", B); - p(A, "mouseup", A.xEvtUp); - C(D); - }; - m(A, "mouseup", A.xEvtUp); - } - function x(A, B, C, D) { - Math.abs(A) > Math.abs(B) ? D(A > 0 ? "right" : "left", A, C) : D(B > 0 ? "down" : "up", B, C); - } - function y(A, B) { - var C; - var D = B.move; - B.end; - var E = 0; - var F = 0; - var G = 0; - var H = 0; - var I = 0; - var J = 0; - m(A, "touchstart", function (K) { - clearInterval(C); - I = 0; - J = 0; - var L = K.changedTouches[0]; - var M = L.pageX; - var N = L.pageY; - E = M; - F = N; - G = new Date().getTime(); - }); - m(A, "touchmove", function (K) { - if (D) { - var L = K.changedTouches[0]; - var M = L.pageX; - var N = L.pageY; - if (I = M - E, J = N - F, Math.abs(I) > 10 || Math.abs(J) > 10) { - x(I, J, K, D); - E = M; - F = N; - var O = new Date().getTime(); - H = O - G; - G = O; - } - K.preventDefault(); - } - }); - m(A, "touchend", function (K) { - var L = Math.abs(Math.round(J / H * 10)); - 0 !== L && (C = setInterval(function () { - x(I * L / 30, J * L / 30, K, D); - (L -= 1) <= 0 && clearInterval(C); - }, 25)); - }); - } - function z() { - var A = new Map(); - function B(D, E) { - var F = arguments.length > 2 && undefined !== arguments[2] ? arguments[2] : null; - if (A.has(D)) { - var G = A.get(D); - Array.isArray(G) && G.push({ - fn: E, - obj: F - }); - } else { - A.set(D, [].concat({ - fn: E, - obj: F - })); - } - } - function C(D, E) { - if (A.has(D)) { - if (E) { - var F = A.get(D); - var G = F.indexOf(E); - G && G >= 0 && F.splice(G, 1); - } else { - A.delete(D); - } - } - } - return { - getAllListeners: function () { - return A; - }, - on: B, - once: function (D, E) { - var F = arguments.length > 2 && undefined !== arguments[2] ? arguments[2] : null; - var G = function H() { - for (var I = arguments.length, J = new Array(I), K = 0; K < I; K++) { - J[K] = arguments[K]; - } - E.call.apply(E, [F].concat(J)); - C(D, H); - }; - B(D, G); - }, - fire: function (D) { - if (A.has(D)) { - for (var E = A.get(D), F = arguments.length, G = new Array(F > 1 ? F - 1 : 0), H = 1; H < F; H++) { - G[H - 1] = arguments[H]; - } - var I; - var J = j(E); - try { - for (J.s(); !(I = J.n()).done;) { - var K; - var L = I.value; - if (L.obj) { - (K = L.fn).call.apply(K, [L.obj].concat(G)); - } else { - L.fn.apply(L, G); - } - } - } catch (M) { - J.e(M); - } finally { - J.f(); - } - } - }, - fireAndReturn: function (D, E) { - if (A.has(D)) { - for (var F = A.get(D), G = arguments.length, H = new Array(G > 2 ? G - 2 : 0), I = 2; I < G; I++) { - H[I - 2] = arguments[I]; - } - var J; - var K = j(F); - try { - for (K.s(); !(J = K.n()).done;) { - var L; - var M = J.value; - var N = (L = M.fn).call.apply(L, [M.obj].concat(H)); - if (E && E.call(M.obj, N)) { - return; - } - } - } catch (O) { - K.e(O); - } finally { - K.f(); - } - } - }, - removeListener: C, - removeAllListeners: function () { - A.clear(); - } - }; - } - g.d(d, "a", function () { - return m; - }); - g.d(d, "f", function () { - return p; - }); - g.d(d, "g", function () { - return q; - }); - g.d(d, "b", function () { - return v; - }); - g.d(d, "e", function () { - return w; - }); - g.d(d, "c", function () { - return y; - }); - g.d(d, "d", function () { - return z; - }); - }, function (b, c, d) { - "use strict"; - - d.d(c, "b", function () { - return j; - }); - var f = d(10); - var g = function l() { - for (var m = arguments.length > 0 && undefined !== arguments[0] ? arguments[0] : {}, p = arguments.length, q = new Array(p > 1 ? p - 1 : 0), u = 1; u < p; u++) { - q[u - 1] = arguments[u]; - } - q.forEach(function (v) { - Object.keys(v).forEach(function (w) { - var x = v[w]; - "string" == typeof x || "number" == typeof x || "boolean" == typeof x ? m[w] = x : "function" != typeof x && !Array.isArray(x) && x instanceof Object ? (m[w] = m[w] || {}, l(m[w], x)) : m[w] = x; + if (_0x243fd9) { + { + const _0x50d75d = new MouseEvent(_0x380f2c(293), { + "view": window, + "bubbles": true, + "cancelable": true }); - }); - return m; - }; - function h(m) { - for (var p = "".concat(m), q = 0, u = false, v = 0; v < p.length; v += 1) { - true === u && (q += 1); - "." === p.charAt(v) && (u = true); + _0x243fd9[_0x380f2c(429)](_0x50d75d); + console[_0x380f2c(351)]("[验证码刷新] 已触发点击"); + const _0x4e4ebd = document.querySelector(_0x380f2c(248)); + if (_0x4e4ebd?.["src"]) { + const _0x1f9946 = _0x4e4ebd[_0x380f2c(299)]; + await waitForChange(() => _0x4e4ebd[_0x380f2c(299)] !== _0x1f9946, 2000); + } } - return q; + } else console[_0x380f2c(412)](_0x380f2c(292)); + } catch (_0x139489) { + { + console[_0x380f2c(412)](_0x380f2c(256), _0x139489); + throw _0x139489; } - function j(m, p, q) { - if (Number.isNaN(p) || Number.isNaN(q)) { - return p + m + q; - } - var u = h(p); - var v = h(q); - var w = Number(p); - var x = Number(q); - var y = 0; - if ("-" === m) { - y = w - x; - } else { - if ("+" === m) { - y = w + x; - } else { - if ("*" === m) { - y = w * x; - } else { - if ("/" === m) { - return h(y = w / x) > 5 ? y.toFixed(2) : y; - } - } - } - } - return y.toFixed(Math.max(u, v)); - } - var k = null; - c.a = { - cloneDeep: function (m) { - return JSON.parse(JSON.stringify(m)); - }, - merge: function () { - for (var m = arguments.length, p = new Array(m), q = 0; q < m; q++) { - p[q] = arguments[q]; - } - return g.apply(undefined, [{}].concat(p)); - }, - equals: function m(p, q) { - var u = Object.keys(p); - if (u.length !== Object.keys(q).length) { - return false; - } - for (var v = 0; v < u.length; v += 1) { - var w = u[v]; - var x = p[w]; - var y = q[w]; - if (undefined === y) { - return false; - } - if ("string" == typeof x || "number" == typeof x || "boolean" == typeof x) { - if (x !== y) { - return false; - } - } else { - if (Array.isArray(x)) { - if (x.length !== y.length) { - return false; - } - for (var z = 0; z < x.length; z += 1) { - if (!m(x[z], y[z])) { - return false; - } - } - } else { - if ("function" != typeof x && !Array.isArray(x) && x instanceof Object && !m(x, y)) { - return false; - } - } - } - } - return true; - }, - arrayEquals: function (p, q) { - if (p.length !== q.length) { - return false; - } - for (var u = 0; u < p.length; u += 1) { - if (p[u] !== q[u]) { - return false; - } - } - return true; - }, - sum: function (p) { - var q = arguments.length > 1 && undefined !== arguments[1] ? arguments[1] : function (w) { - return w; - }; - var u = 0; - var v = 0; - Object.keys(p).forEach(function (w) { - u += q(p[w], w); - v += 1; - }); - return [u, v]; - }, - rangeEach: function (p, q, u) { - for (var v = p; v < q; v += 1) { - u(v); - } - }, - rangeSum: function (p, q, u) { - for (var v = 0, w = p; w < q; w += 1) { - v += u(w); - } - return v; - }, - rangeReduceIf: function (p, q, u, v, w, x) { - for (var y = u, z = v, A = p; A < q && !(y > w); A += 1) { - y += z = x(A); - } - return [A, y - z, z, y > w]; - }, - deleteProperty: function (p, q) { - var u = p["".concat(q)]; - delete p["".concat(q)]; - return u; - }, - numberCalc: j, - measureTextHeight: function (p, q, u) { - if (!k) { - var v = document.createElement("canvas"); - k = v.getContext("2d"); - } - k.font = "".concat(q.italic ? "italic" : "", " ").concat(q.bold ? "bold" : "", " ").concat(Object(f.c)(q.size), "px ").concat(q.name); - var w = []; - var x = u; - "".concat(p).split("\n").forEach(function (y) { - if (k.measureText(y).width > x) { - for (var z = { - w: 0, - len: 0, - start: 0 - }, A = 0; A < y.length; A += 1) { - z.w >= x && (w.push(y.substr(z.start, z.len)), z = { - w: 0, - len: 0, - start: A - }); - z.len += 1; - z.w += k.measureText(y[A]).width + 1; - } - z.len > 0 && w.push(y.substr(z.start, z.len)); - } else { - w.push(y); - } - }); - return w.length * (q.size + 2) + 2; - }, - cssCalcExpression: function (p) { - return p = (p = p.replace(/(\d+)%/g, "($1*0.01*width)")).replace(/(\d*\.?\d+)(vh|vw|em|ex|rem|cm|mm|in|pt|pc|px)/g, function (q, u, v) { - switch (v) { - case "vh": - return "(" + u + "*clientHeight/100)"; - case "vw": - return "(" + u + "*clientWidth/100)"; - case "em": - return "(" + u + "*parseFloat(fontSize))"; - case "ex": - return "(" + u + "*parseFloat(fontSize)/2)"; - case "rem": - return "(" + u + "*parseFloat(fontSize))"; - case "cm": - return "(" + u + "*96/2.54)"; - case "mm": - return "(" + u + "*96/25.4)"; - case "in": - return "(" + u + "*96)"; - case "pt": - return "(" + u + "*96/72)"; - case "pc": - return "(" + u + "*96/72*12)"; - case "px": - return "(" + u + ")"; - } - }); - }, - arrStyle: ["visible", "bgcolor", "align", "valign", "color", "fontName", "fontSize", "fontBold", "fontItalic"] - }; - }, function (b, j, k) { - "use strict"; - - k.d(j, "c", function () { - return F; - }); - k.d(j, "a", function () { - return G; - }); - k.d(j, "b", function () { - return H; - }); - var m = k(1); - var q = k.n(m); - var w = k(2); - var x = k.n(w); - var y = k(10); - var z = k(19); - var A = k(28); - var B = k(12); - var C = k(39); - var D = k(29); - var E = {}; - function F(I, J) { - E[I] = J; - } - function G(I) { - var J = E[I]; - if ("function" == typeof J) { - for (var K = arguments.length, L = new Array(K > 1 ? K - 1 : 0), M = 1; M < K; M++) { - L[M - 1] = arguments[M]; - } - return J.apply(null, L); - } - return null; - } - var H = function () { - return x()(function I() { - q()(this, I); - this.text = ""; - this.enabled = true; - this.eventMap = Object(B.d)(); - }, [{ - key: "on", - value: function (J, K, L) { - this.eventMap.on(J, K, L); - return this; - } - }, { - key: "trigger", - value: function (J) { - for (var K = this.eventMap, L = arguments.length, M = new Array(L > 1 ? L - 1 : 0), N = 1; N < L; N++) { - M[N - 1] = arguments[N]; - } - K.fire.apply(K, [J].concat(M)); - } - }, { - key: "removeAllListeners", - value: function () { - this.eventMap.removeAllListeners(); - } - }, { - key: "removeListener", - value: function (J, K) { - this.eventMap.removeListener(J, K); - } - }, { - key: "setInfo", - value: function (J) { - if (this.info = J, J) { - var K = J.cell; - K && K.edit && (this.attrs = K.edit.attrs || {}, "enabled" in this.attrs && (this.enabled = this.attrs.enabled)); - } - } - }, { - key: "offset", - value: function (J) { - var K = J.left; - var L = J.top; - var M = J.width; - var N = J.height; - this.left = K; - this.top = L; - this.width = M; - this.height = N; - } - }, { - key: "setStyle", - value: function (J) { - this.style = J; - } - }, { - key: "setValue", - value: function (J) {} - }, { - key: "setEnabled", - value: function (J) { - this.enabled = J; - } - }, { - key: "render", - value: function (J) { - var K = this.left; - var L = this.top; - var M = this.width; - var N = this.height; - var O = this.style; - var P = this.text; - var Q = new y.b(K, L, M, N, 5); - Q.bgcolor = O.bgcolor; - var R = Object.assign({}, O.font); - R.size = Object(z.c)(R.size); - J.text(P, Q, { - align: O.align, - valign: O.valign, - font: R, - color: O.color, - strike: O.strike, - underline: O.underline - }, O.textwrap); - } - }, { - key: "mousemove", - value: function (J) {} - }, { - key: "mouseenter", - value: function (J) { - this.trigger("cell-mouseenter", this); - } - }, { - key: "mouseleave", - value: function (J) { - this.trigger("cell-mouseleave", this); - } - }, { - key: "mousedown", - value: function (J) {} - }, { - key: "mouseup", - value: function (J) {} - }, { - key: "click", - value: function (J) {} - }, { - key: "pointerInView", - value: function (J) { - var K = this.left; - var L = this.top; - var M = this.width; - var N = this.height; - return J.x >= K && J.x <= K + M && J.y >= L && J.y <= L + N; - } - }, { - key: "invalidate", - value: function () { - var J = arguments.length > 0 && undefined !== arguments[0] && arguments[0]; - this.info && this.info.render && this.info.render(J); - } - }, { - key: "isDrawBg", - value: function () { - return true; - } - }, { - key: "showEditor", - value: function (J) {} - }, { - key: "hideEditor", - value: function () {} - }, { - key: "contains", - value: function (J) { - return false; - } - }, { - key: "keydown", - value: function (J) {} - }, { - key: "attach", - value: function (J, K) {} - }, { - key: "detach", - value: function () {} - }], [{ - key: "drawCell", - value: function (J, K, L, M, N) { - K.rect(N, function () { - var O = L.text || ""; - var P = J.report.getCellValueText(L); - P ? O = P : J.settings.evalPaused || (O = C.a.render(O, D.b, function (S, T) { - return J.getCellTextOrDefault(T, S); - })); - J.report.calc && "" !== O && (M.format && "normal" !== M.format ? O = A.b[M.format].render(O) : L.format && (O = function (S, T) { - var U = S.format; - return T && "" !== T ? U.indexOf("yy") >= 0 || U.indexOf("hh") >= 0 ? new Date(T).format(U) : U.indexOf("0") >= 0 ? Number(T).format(U) : T : T; - }(L, O))); - var Q = Object.assign({}, M.font); - Q.size = Object(z.c)(Q.size); - O && "" !== O && K.text(O, N, { - align: M.align, - valign: M.valign, - font: Q, - color: M.color, - strike: M.strike, - underline: M.underline - }, M.textwrap || true === L.autoheight); - var R = false; - "editable" in L && false === L.editable && (R = true); - R && K.frozen(N); - }); - } - }]); - }(); - }, function (a, b, c) { - var d = c(56); - function f() { - a.exports = f = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (g, h, j) { - var k = d(g, h); - if (k) { - var l = Object.getOwnPropertyDescriptor(k, h); - return l.get ? l.get.call(arguments.length < 3 ? g : j) : l.value; - } - }; - a.exports.__esModule = true; - a.exports.default = a.exports; - return f.apply(null, arguments); - } - a.exports = f; - a.exports.__esModule = true; - a.exports.default = a.exports; - }, function (a, b, c) { - var d = c(46)(); - a.exports = d; - try { - regeneratorRuntime = d; - } catch (f) { - "object" == typeof globalThis ? globalThis.regeneratorRuntime = d : Function("r", "regeneratorRuntime = r")(d); - } - }, function (a, b, c) { - (function (d) { - var f; - a.exports = (f = f || function (j, k) { - var m; - if ("undefined" != typeof window && window.crypto && (m = window.crypto), "undefined" != typeof self && self.crypto && (m = self.crypto), "undefined" != typeof globalThis && globalThis.crypto && (m = globalThis.crypto), !m && "undefined" != typeof window && window.msCrypto && (m = window.msCrypto), !m && undefined !== d && d.crypto && (m = d.crypto), !m) { - try { - m = c(150); - } catch (H) {} - } - var q = function () { - if (m) { - if ("function" == typeof m.getRandomValues) { - try { - return m.getRandomValues(new Uint32Array(1))[0]; - } catch (I) {} - } - if ("function" == typeof m.randomBytes) { - try { - return m.randomBytes(4).readInt32LE(); - } catch (J) {} - } - } - throw new Error("Native crypto module could not be used to get secure random number."); - }; - var w = Object.create || function () { - function I() {} - return function (J) { - var K; - I.prototype = J; - K = new I(); - I.prototype = null; - return K; - }; - }(); - var x = {}; - x.lib = {}; - var y = x.lib; - y.Base = { - extend: function (I) { - var J = w(this); - I && J.mixIn(I); - J.hasOwnProperty("init") && this.init !== J.init || (J.init = function () { - J.$super.init.apply(this, arguments); - }); - J.init.prototype = J; - J.$super = this; - return J; - }, - create: function () { - var I = this.extend(); - I.init.apply(I, arguments); - return I; - }, - init: function () {}, - mixIn: function (I) { - for (var J in I) I.hasOwnProperty(J) && (this[J] = I[J]); - I.hasOwnProperty("toString") && (this.toString = I.toString); - }, - clone: function () { - return this.init.prototype.extend(this); - } - }; - var z = y.Base; - y.WordArray = z.extend({ - init: function (I, J) { - I = this.words = I || []; - this.sigBytes = null != J ? J : 4 * I.length; - }, - toString: function (I) { - return (I || C).stringify(this); - }, - concat: function (I) { - var J = this.words; - var K = I.words; - var L = this.sigBytes; - var M = I.sigBytes; - if (this.clamp(), L % 4) { - for (var N = 0; N < M; N++) { - var O = K[N >>> 2] >>> 24 - N % 4 * 8 & 255; - J[L + N >>> 2] |= O << 24 - (L + N) % 4 * 8; - } - } else { - for (var P = 0; P < M; P += 4) { - J[L + P >>> 2] = K[P >>> 2]; - } - } - this.sigBytes += M; - return this; - }, - clamp: function () { - var I = this.words; - var J = this.sigBytes; - I[J >>> 2] &= 4294967295 << 32 - J % 4 * 8; - I.length = j.ceil(J / 4); - }, - clone: function () { - var I = z.clone.call(this); - I.words = this.words.slice(0); - return I; - }, - random: function (I) { - for (var J = [], K = 0; K < I; K += 4) { - J.push(q()); - } - return new A.init(J, I); - } - }); - var A = y.WordArray; - x.enc = {}; - var B = x.enc; - B.Hex = { - stringify: function (I) { - for (var J = I.words, K = I.sigBytes, L = [], M = 0; M < K; M++) { - var N = J[M >>> 2] >>> 24 - M % 4 * 8 & 255; - L.push((N >>> 4).toString(16)); - L.push((15 & N).toString(16)); - } - return L.join(""); - }, - parse: function (I) { - for (var J = I.length, K = [], L = 0; L < J; L += 2) { - K[L >>> 3] |= parseInt(I.substr(L, 2), 16) << 24 - L % 8 * 4; - } - return new A.init(K, J / 2); - } - }; - var C = B.Hex; - B.Latin1 = { - stringify: function (I) { - for (var J = I.words, K = I.sigBytes, L = [], M = 0; M < K; M++) { - var N = J[M >>> 2] >>> 24 - M % 4 * 8 & 255; - L.push(String.fromCharCode(N)); - } - return L.join(""); - }, - parse: function (I) { - for (var J = I.length, K = [], L = 0; L < J; L++) { - K[L >>> 2] |= (255 & I.charCodeAt(L)) << 24 - L % 4 * 8; - } - return new A.init(K, J); - } - }; - var D = B.Latin1; - B.Utf8 = { - stringify: function (I) { - try { - return decodeURIComponent(escape(D.stringify(I))); - } catch (J) { - throw new Error("Malformed UTF-8 data"); - } - }, - parse: function (I) { - return D.parse(unescape(encodeURIComponent(I))); - } - }; - var E = B.Utf8; - y.BufferedBlockAlgorithm = z.extend({ - reset: function () { - this._data = new A.init(); - this._nDataBytes = 0; - }, - _append: function (I) { - "string" == typeof I && (I = E.parse(I)); - this._data.concat(I); - this._nDataBytes += I.sigBytes; - }, - _process: function (I) { - var J; - var K = this._data; - var L = K.words; - var M = K.sigBytes; - var N = this.blockSize; - var O = M / (4 * N); - var P = (O = I ? j.ceil(O) : j.max((0 | O) - this._minBufferSize, 0)) * N; - var Q = j.min(4 * P, M); - if (P) { - for (var R = 0; R < P; R += N) { - this._doProcessBlock(L, R); - } - J = L.splice(0, P); - K.sigBytes -= Q; - } - return new A.init(J, Q); - }, - clone: function () { - var I = z.clone.call(this); - I._data = this._data.clone(); - return I; - }, - _minBufferSize: 0 - }); - var F = y.BufferedBlockAlgorithm; - y.Hasher = F.extend({ - cfg: z.extend(), - init: function (I) { - this.cfg = this.cfg.extend(I); - this.reset(); - }, - reset: function () { - F.reset.call(this); - this._doReset(); - }, - update: function (I) { - this._append(I); - this._process(); - return this; - }, - finalize: function (I) { - I && this._append(I); - return this._doFinalize(); - }, - blockSize: 16, - _createHelper: function (I) { - return function (J, K) { - return new I.init(K).finalize(J); - }; - }, - _createHmacHelper: function (I) { - return function (J, K) { - return new G.HMAC.init(I, K).finalize(J); - }; - } - }); - x.algo = {}; - var G = x.algo; - return x; - }(Math), f); - }).call(this, c(40)); - }, function (b, d, f) { - "use strict"; - - f.d(d, "c", function () { - return k; - }); - f.d(d, "b", function () { - return p; - }); - f.d(d, "d", function () { - return q; - }); - f.d(d, "a", function () { - return v; - }); - var g = f(7); - var h = f.n(g); - f(45); - var j = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]; - function k(w) { - for (var x = "", y = w; y >= j.length;) { - y /= j.length; - y -= 1; - x += j[parseInt(y, 10) % j.length]; - } - return x += j[w % j.length]; - } - function m(w) { - for (var x = 0, y = 0; y < w.length - 1; y += 1) { - var z = w.charCodeAt(y) - 65; - var A = w.length - 1 - y; - x += Math.pow(j.length, A) + j.length * z; - } - return x += w.charCodeAt(w.length - 1) - 65; - } - function p(w) { - for (var x = "", y = "", z = 0; z < w.length; z += 1) { - w.charAt(z) >= "0" && w.charAt(z) <= "9" ? y += w.charAt(z) : x += w.charAt(z); - } - return [m(x), parseInt(y, 10) - 1]; - } - function q(w, x) { - return "".concat(k(w)).concat(x + 1); - } - function v(w, x, y) { - var z = arguments.length > 3 && undefined !== arguments[3] ? arguments[3] : function () { - return true; - }; - if (0 === x && 0 === y) { - return w; - } - var A = p(w); - var B = h()(A, 2); - var C = B[0]; - var D = B[1]; - return z(C, D) ? q(C + x, D + y) : w; - } - }, function (a, b, c) { - "use strict"; - - c.d(b, "b", function () { - return f; - }); - c.d(b, "a", function () { - return d; - }); - c.d(b, "c", function () { - return g; - }); - c(45); - var d = [{ - key: "宋体", - title: "宋体" - }, { - key: "微软雅黑", - title: "微软雅黑" - }, { - key: "Arial", - title: "Arial" - }, { - key: "Helvetica", - title: "Helvetica" - }, { - key: "Source Sans Pro", - title: "Source Sans Pro" - }, { - key: "Comic Sans MS", - title: "Comic Sans MS" - }, { - key: "Courier New", - title: "Courier New" - }, { - key: "Verdana", - title: "Verdana" - }, { - key: "Lato", - title: "Lato" - }]; - var f = [{ - pt: 7.5, - px: 10 - }, { - pt: 8, - px: 11 - }, { - pt: 9, - px: 12 - }, { - pt: 10, - px: 13 - }, { - pt: 10.5, - px: 14 - }, { - pt: 11, - px: 15 - }, { - pt: 12, - px: 16 - }, { - pt: 14, - px: 18.7 - }, { - pt: 15, - px: 20 - }, { - pt: 16, - px: 21.3 - }, { - pt: 18, - px: 24 - }, { - pt: 22, - px: 29.3 - }, { - pt: 24, - px: 32 - }, { - pt: 26, - px: 34.7 - }, { - pt: 36, - px: 48 - }, { - pt: 42, - px: 56 - }]; - function g(h) { - for (var j = 0; j < f.length; j += 1) { - var k = f[j]; - if (k.pt === h) { - return k.px; - } - } - return h; - } - }, function (b, j, k) { - "use strict"; - - k.d(j, "a", function () { - return H; - }); - var m = k(1); - var q = k.n(m); - var w = k(2); - var x = k.n(w); - var y = k(6); - var z = k.n(y); - var A = k(15); - var B = k.n(A); - var C = k(3); - var D = k.n(C); - var E = k(5); - var F = k.n(E); - function G(I, J, K) { - J = D()(J); - return z()(I, function () { - try { - var L = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (M) {} - return function () { - return !!L; - }(); - }() ? Reflect.construct(J, K || [], D()(I).constructor) : J.apply(I, K)); - } - var H = function (I) { - function J() { - q()(this, J); - return G(this, J, arguments); - } - F()(J, I); - return x()(J, [{ - key: "dropdown", - value: function () {} - }, { - key: "getValue", - value: function (K) { - return K; - } - }, { - key: "element", - value: function () { - var K = this; - var L = this.tag; - this.dd = this.dropdown(); - this.dd.change = function (M) { - return K.change(L, K.getValue(M)); - }; - return B()(D()(J.prototype), "element", this).call(this).child(this.dd); - } - }, { - key: "setState", - value: function (K) { - K && (this.value = K, this.dd.setTitle(K)); - } - }]); - }(k(30).a); - }, function (j, k, q) { - "use strict"; - - q.d(k, "a", function () { - return N; - }); - var w = q(11); - var x = q.n(w); - var z = q(1); - var A = q.n(z); - var B = q(2); - var C = q.n(B); - var D = q(6); - var E = q.n(D); - var F = q(3); - var G = q.n(F); - var H = q(5); - var I = q.n(H); - var J = q(0); - var K = q(12); - var L = q(4); - function M(O, P, Q) { - P = G()(P); - return E()(O, function () { - try { - var R = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (S) {} - return function () { - return !!R; - }(); - }() ? Reflect.construct(P, Q || [], G()(O).constructor) : P.apply(O, Q)); - } - var N = function (O) { - function P(Q, R, S, T) { - var U; - var V; - A()(this, P); - (V = M(this, P, ["div", "".concat(L.a, "-dropdown ").concat(T)])).title = Q; - V.change = function () {}; - V.headerClick = function () {}; - V.title && ("string" == typeof Q ? V.title = Object(J.c)("div", "".concat(L.a, "-dropdown-title")).child(Q) : S && V.title.addClass("arrow-left")); - V.contentEl = Object(J.c)("div", "".concat(L.a, "-dropdown-content")).css("width", R).hide(); - for (var W = arguments.length, X = new Array(W > 4 ? W - 4 : 0), Y = 4; Y < W; Y++) { - X[Y - 4] = arguments[Y]; - } - (U = V).setContentChildren.apply(U, X); - var Z = ""; - Z = "object" === x()(S) ? S : Object(J.c)("div", "".concat(L.a, "-icon arrow-right")).child(Object(J.c)("div", "".concat(L.a, "-icon-img arrow-down"))); - V.headerEl = Object(J.c)("div", "".concat(L.a, "-dropdown-header")); - V.headerEl.on("click", function () { - "block" !== V.contentEl.css("display") ? V.show() : V.hide(); - }).children(V.title, Z); - V.children(V.headerEl, V.contentEl); - return V; - } - I()(P, O); - return C()(P, [{ - key: "setContentChildren", - value: function () { - var Q; - (this.contentEl.html(""), arguments.length > 0) && (Q = this.contentEl).children.apply(Q, arguments); - } - }, { - key: "setTitle", - value: function (Q) { - this.title.html(Q); - this.hide(); - } - }, { - key: "show", - value: function () { - var Q = this; - var R = this.contentEl; - this.parent().active(); - Object(K.b)(this.parent(), function () { - Q.hide(); - }); - this.showFn && this.showFn(); - R.show(); - } - }, { - key: "hide", - value: function () { - this.parent().active(false); - this.contentEl.hide(); - Object(K.g)(this.parent()); - this.hideFn && this.hideFn(); - } - }]); - }(J.a); - }, function (a, b, c) { - "use strict"; - - (function (j) { - c.d(b, "c", function () { - return J; - }); - c.d(b, "d", function () { - return K; - }); - c.d(b, "b", function () { - return L; - }); - c.d(b, "a", function () { - return W; - }); - var q = c(9); - var z = c.n(q); - var A = c(1); - var B = c.n(A); - var C = c(2); - var D = c.n(C); - var F = c(11); - var G = c.n(F); - function H(X, Y) { - var Z = "undefined" != typeof Symbol && X[Symbol.iterator] || X["@@iterator"]; - if (!Z) { - if (Array.isArray(X) || (Z = function (a5, a6) { - if (a5) { - if ("string" == typeof a5) { - return I(a5, a6); - } - var a7 = {}.toString.call(a5).slice(8, -1); - "Object" === a7 && a5.constructor && (a7 = a5.constructor.name); - return "Map" === a7 || "Set" === a7 ? Array.from(a5) : "Arguments" === a7 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a7) ? I(a5, a6) : undefined; - } - }(X)) || Y && X && "number" == typeof X.length) { - Z && (X = Z); - var a0 = 0; - var a1 = function () {}; - return { - s: a1, - n: function () { - return a0 >= X.length ? { - done: true - } : { - done: false, - value: X[a0++] - }; - }, - e: function (a5) { - throw a5; - }, - f: a1 - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - var a2; - var a3 = true; - var a4 = false; - return { - s: function () { - Z = Z.call(X); - }, - n: function () { - var a5 = Z.next(); - a3 = a5.done; - return a5; - }, - e: function (a5) { - a4 = true; - a2 = a5; - }, - f: function () { - try { - a3 || null == Z.return || Z.return(); - } finally { - if (a4) { - throw a2; - } - } - } - }; - } - function I(X, Y) { - (null == Y || Y > X.length) && (Y = X.length); - for (var Z = 0, a0 = Array(Y); Z < Y; Z++) { - a0[Z] = X[Z]; - } - return a0; - } - function J(X, Y) { - if (X && X._cacheData) { - return X._cacheData[Y]; - } - } - function K(X, Y, Z) { - X && (X._cacheData || (X._cacheData = {}), X._cacheData[Y] = Z); - } - function L(X) { - X && X._cacheData && delete X._cacheData; - } - function M(X, Y) { - var Z; - var a0 = H(X.children); - try { - for (a0.s(); !(Z = a0.n()).done;) { - var a1 = Z.value; - var a2 = a1.isLeaf; - var a3 = a1.dataRow; - a2 ? Y(a3) : M(a1, Y); - } - } catch (a4) { - a0.e(a4); - } finally { - a0.f(); - } - } - function N(X, Y, Z) { - if (undefined === Y || 0 === Y.children.length || 0 === X) { - return null; - } - for (var a0 = Y.children[0], a1 = 1; a1 < Y.children.length; a1++) { - var a2 = Y.children[a1]; - if (!(a2.firstRow <= Z)) { - break; - } - a0 = a2; - } - return a0 ? a0.level === X ? a0 : a0 = N(X, a0, Z) : a0; - } - function P(X, Y) { - if (Array.isArray(X)) { - return X; - } - var Z = X[X.defaultDS]; - return Z ? Z.coreData.primaryData : []; - } - function Q(X) { - var Y = X.toString(16); - Y.length % 2 == 1 && (Y = "0".concat(Y)); - return Y; - } - var R = { - if: function (X, Y, Z) { - return X ? Y : Z; - }, - char: function (X) { - return "string" == typeof X ? X.charCodeAt(0) : X; - }, - left: function (X, Y) { - return null == X ? X : "string" == typeof X ? X.substr(0, Y) : (console.error("left() argument is not string"), X); - }, - right: function (X, Y) { - if (null == X) { - return X; - } - var Z = X.length - Y; - Z < 0 && (Z = 0); - return X.substr(Z); - }, - mid: function (X, Y, Z) { - return null == X ? X : "string" == typeof X ? X.substr(Y - 1, Z) : (console.error("mid() argument is not string"), X); - }, - trim: function (X) { - return null == X ? X : "string" == typeof X ? X.trim() : (console.error("trim() argument is not string"), X); - }, - len: function (X) { - return X.length; - }, - long: function (X) { - return Number(X); - }, - mod: function (X, Y) { - return X % Y; - }, - lower: function (X) { - return "string" == typeof X ? X.toLowerCase() : X; - }, - upper: function (X) { - return "string" == typeof X ? X.toUpperCase() : X; - }, - pos: function (X, Y, Z) { - return Z ? X.indexOf(Y, Z - 1) + 1 : X.indexOf(Y) + 1; - }, - getrow: function () { - return this.rowNumber + 1; - }, - currentrow: function (X) { - var Y = X[X.defaultDS]; - return Y && Y.currentRow ? Y.currentRow() : 0; - }, - today: function () { - return new Date(); - }, - now: function () { - return new Date(); - }, - month: function (X) { - return X.getMonth() + 1; - }, - year: function (X) { - return X.getFullYear(); - }, - day: function (X) { - return X.getDate(); - }, - string: function (X, Y) { - return null == X ? "" : "string" == typeof Y ? X.format ? (X instanceof Date && (-1 !== Y.indexOf("yymm") ? Y = Y.replace("yymm", "yyMM") : -1 !== Y.indexOf("yy-mm") && (Y = Y.replace("yy-mm", "yy-MM"))), X.format(Y)) : "".concat(X) : X instanceof Uint8Array ? new TextDecoder().decode(X) : "".concat(X); - }, - integer: function (X) { - return parseInt(X, 10); - }, - page: function () { - return 1; - }, - isrownew: function (X) { - var Y = P(X); - var Z = this.rowNumber; - if (Z >= 0 && Z < Y.length) { - var a0 = Y[Z].status; - return 2 === a0 || 3 === a0; - } - return false; - }, - isrowmodified: function (X) { - var Y = P(X); - var Z = this.rowNumber; - return Z >= 0 && Z < Y.length && 1 === Y[Z].status; - }, - rowcount: function (X) { - return P(X).length; - }, - sum: function (X, Y, Z) { - var a0 = X.type; - var a1 = X.level; - var a2 = X.f; - var a3 = 0; - var a4 = "sum_".concat(a0, "_").concat(a1, "_").concat(a2.formulaStr); - var a5 = P(Y); - if ("all" === a0) { - var a6 = J(Y, a4); - if (undefined !== a6) { - return a6; - } - for (var a7 = 0; a7 < a5.length; ++a7) { - var a8 = a2.evaluate(Y, a7); - null == a8 && (a8 = 0); - a3 += a8; - } - K(Y, a4, a3); - } else { - if ("group" === a0) { - a4 = "".concat(a4, "_").concat(Z); - var a9 = Y.treeNodes; - var aa = J(Y, a4); - if (undefined !== aa) { - return aa; - } - var ab = N(a1, a9, Z); - ab ? M(ab, function (ac) { - var ad = a2.evaluate(Y, ac); - null == ad && (ad = 0); - a3 += ad; - }) : a3 = 0; - a9 && K(Y, a4, a3); - } - } - return a3; - }, - isnull: function (X) { - return null == X; - }, - count: function (X, Y, Z) { - var a0 = X.type; - var a1 = X.level; - X.f; - var a2 = "count_".concat(a0, "_").concat(a1); - var a3 = J(Y, a2); - var a4 = P(Y); - if (a3 = 0, "all" === a0) { - return a4.length; - } - if ("group" === a0) { - var a5 = N(a1, Y.treeNodes, Z); - a5 ? M(a5, function (a6) { - a3 += 1; - }) : a3 = 0; - } - K(Y, a2, a3); - return a3; - }, - lookupdisplay: function (X, Y, Z) { - return X; - }, - hex: function (X) { - var Y = X.toString(16); - Y.length % 2 == 1 && (Y = "0".concat(Y)); - return Y; - }, - pbcolor: function (X) { - var Y = X >> 8 & 255; - var Z = X >> 16 & 255; - return "#".concat(Q(255 & X)).concat(Q(Y)).concat(Q(Z)); - }, - rgb: function (X, Y, Z) { - return "#".concat(Q(X)).concat(Q(Y)).concat(Q(Z)); - } - }; - function S(X, Y) { - var Z = "all"; - var a0 = 0; - var a1 = X.search(/ +for +all$/i); - if (-1 !== a1) { - X = X.substring(0, a1).trim(); - } else { - var a2 = / +for +group +(\d)$/i.exec(X); - if (a2) { - Z = "group"; - X = X.substring(0, a2.index); - return { - type: Z, - level: a0 = parseInt(a2[1]), - f: new W(X, Y) - }; - } - var a3 = / +for +crosstab$/i.exec(X); - if (a3) { - Z = "all"; - X = X.substring(0, a3.index); - return { - type: Z, - level: a0, - f: new W(X, Y) - }; - } - } - return { - type: Z, - level: a0, - f: new W(X, Y) - }; - } - var T = { - sum: { - parseArgs: function (X, Y) { - return S(X, Y); - } - }, - count: { - parseArgs: function (X, Y) { - return S(X, Y); - } - } - }; - function U(X, Y, Z) { - for (var a0 = true; a0;) { - a0 = false; - for (var a1 = 0; a1 < X.length; a1++) { - var a2 = X[a1]; - if (null !== a2 && "object" === G()(a2) && -1 !== Y.indexOf(a2.value)) { - if (0 === a1 || a1 === X.length - 1) { - throw new Error("Wrong operator position!"); - } - var a3 = X[a1 - 1]; - var a4 = X[a1 + 1]; - X[a1 - 1] = Z(a2.value, a3, a4); - X.splice(a1, 2); - a0 = true; - break; - } - } - } - } - function V(X, Y, Z) { - for (var a0 = 0, a1 = null; a0 < X.length;) { - if (null !== (a1 = X[a0]) && "object" === G()(a1) && Y.includes(a1.value)) { - if (0 === a0 || a0 === X.length - 1) { - throw new Error("Wrong operator position!"); - } - a1.left = X[a0 - 1]; - a1.right = X[a0 + 1]; - a1.operator = Z; - X[a0 - 1] = a1; - X.splice(a0, 2); - } else { - a0++; - } - } - return X; - } - var W = function () { - function X(Y) { - var Z = arguments.length > 1 && undefined !== arguments[1] ? arguments[1] : null; - B()(this, X); - this.formulaExpression = null; - this.variables = []; - this.topFormula = null; - this.formulaStr = Y; - this.varFn = Z; - this.oneExpr = false; - this.formulaExpression = this.parse(Y); - return this; - } - return D()(X, [{ - key: "splitFunctionParams", - value: function (Y) { - for (var Z = 0, a0 = "", a1 = [], a2 = 0; a2 < Y.length; a2++) { - if ("," === Y[a2] && 0 === Z) { - a1.push(a0); - a0 = ""; - } else { - if ("(" === Y[a2]) { - Z++; - a0 += Y[a2]; - } else { - if (")" === Y[a2]) { - if (Z--, a0 += Y[a2], Z < 0) { - throw "ERROR: Too many closing parentheses!"; - } - } else { - a0 += Y[a2]; - } - } - } - } - if (0 !== Z) { - throw "ERROR: Too many opening parentheses!"; - } - a0.length > 0 && a1.push(a0); - return a1; - } - }, { - key: "cleanupInputString", - value: function (Y) { - ["PI", "E", "LN2", "LN10", "LOG2E", "LOG10E", "SQRT1_2", "SQRT2"].forEach(function (Z) { - Y = Y.replace(new RegExp("([^A-Za-z0-9_]+|^)" + Z + "([^A-Za-z]+|$)"), "$1" + Math[Z] + "$2"); - }); - return Y; - } - }, { - key: "parse", - value: function (Y) { - function Z(aa, ab, ac) { - var ad = ab.toLowerCase(); - "true" === ad ? ac.push(true) : "false" === ad ? ac.push(false) : aa.isOperator(ad) ? ac.push({ - value: ad, - op: true - }) : (ac.push(aa.createVariableEvaluator(ab)), aa.registerVariable(ab)); - } - for (var a0 = (Y = this.cleanupInputString(Y)).length - 1, a1 = 0, a2 = 0, a3 = [], a4 = "", a5 = "", a6 = null, a7 = 0; a1 <= a0;) { - switch (a2) { - case 0: - if ((a4 = Y.charAt(a1)).match(/[0-9.]/)) { - a2 = "within-nr"; - a5 = ""; - a1--; - } else { - if (this.isOperator(a4)) { - if ("-" === a4 && (0 === a3.length || a3[a3.length - 1] && "string" == typeof a3[a3.length - 1])) { - a2 = "within-nr"; - a5 = "-"; - break; - } - if (a1 === a0 || this.isOperator(a3[a1 - 1])) { - a2 = -1; - break; - } - a1 < a0 ? "<" === a4 && ">" === Y.charAt(a1 + 1) ? (a3.push({ - value: "<>", - op: true - }), ++a1) : "<" === a4 && "=" === Y.charAt(a1 + 1) ? (a3.push({ - value: "<=", - op: true - }), ++a1) : ">" === a4 && "=" === Y.charAt(a1 + 1) ? (a3.push({ - value: ">=", - op: true - }), ++a1) : a3.push({ - value: a4, - op: true - }) : (a3.push({ - value: a4, - op: true - }), a2 = 0); - } else { - if ("(" === a4) { - a2 = "within-parentheses"; - a5 = ""; - a7 = 0; - } else { - if ("[" === a4) { - a2 = "within-named-var"; - a5 = ""; - } else { - if (a4.match(/[a-zA-Z\u4E00-\u9FA5]/)) { - a1 < a0 && Y.charAt(a1 + 1).match(/[a-zA-Z0-9._\u4E00-\u9FA5]/) ? (a5 = a4, a2 = "within-func") : (a3.length > 0 && "number" == typeof a3[a3.length - 1] && a3.push("*"), a3.push(this.createVariableEvaluator(a4)), this.registerVariable(a4), a2 = 0, a5 = ""); - } else { - if ("\"" === a4 || "'" === a4) { - for (var a8 = a4, a9 = ++a1; a1 <= a0; ++a1) { - if (Y[a1] === a8 && "\\" !== Y[a1 - 1]) { - a3.push(Y.substring(a9, a1)); - break; - } - } - } else { - "!" === a4 && a1 < a0 && "=" === Y.charAt(a1 + 1) && (a3.push({ - value: "!=", - op: true - }), ++a1); - } - } - } - } - } - } - break; - case "within-nr": - (a4 = Y.charAt(a1)).match(/[0-9.]/) ? (a5 += a4, a1 === a0 && (a3.push(Number(a5)), a2 = 0)) : ("-" === a5 && (a5 = -1), "%" === a4 && (a5 = Number(a5) / 100), a3.push(Number(a5)), a5 = "", a2 = 0, a1--); - break; - case "within-func": - if ((a4 = Y.charAt(a1)).match(/[a-zA-Z0-9._\u4E00-\u9FA5]/)) { - a5 += a4; - a1 === a0 && (Z(this, a5, a3), a5 = "", a2 = 0); - } else { - for (; " " === a4 && a1 <= a0;) { - ++a1; - a4 = Y.charAt(a1); - } - "(" === a4 && a3.length % 2 == 0 ? (a6 = a5, a5 = "", a7 = 0, a2 = "within-func-parentheses") : (Z(this, a5, a3), a5 = "", a2 = 0, a1--); - } - break; - case "within-named-var": - if ("]" === (a4 = Y.charAt(a1))) { - a3.push(this.createVariableEvaluator(a5)); - this.registerVariable(a5); - a5 = ""; - a2 = 0; - } else { - if (!a4.match(/[a-zA-Z0-9_\u4E00-\u9FA5]/)) { - throw new Error("Character not allowed within named variable: " + a4); - } - a5 += a4; - } - break; - case "within-parentheses": - case "within-func-parentheses": - ")" === (a4 = Y.charAt(a1)) ? a7 <= 0 ? ("within-parentheses" === a2 ? a3.push(new X(a5, this.varFn)) : "within-func-parentheses" === a2 && (a3.push(this.createFunctionEvaluator(a5, a6.toLowerCase())), a6 = null), a2 = 0) : (a7--, a5 += a4) : "(" === a4 ? (a7++, a5 += a4) : a5 += a4; - } - a1++; - } - if (0 !== a2) { - throw new Error("Could not parse formula: Syntax error."); - } - return this.buildExpressionTree(a3); - } - }, { - key: "buildExpressionTree", - value: function (Y) { - var Z = this; - if (Y.length < 1) { - return null; - } - if (1 === Y.length) { - this.oneExpr = true; - return Y[0]; - } - var a0 = z()(Y); - V(a0, ["^"], function (a1, a2, a3, a4) { - var a5 = Number(Z.evaluateItem(a2, a4)); - var a6 = Number(Z.evaluateItem(a3, a4)); - return Math.pow(Number(a5), Number(a6)); - }); - V(a0, ["in"], function (a1, a2, a3, a4) { - var a5 = Z.evaluateItem(a2, a4); - var a6 = Z.evaluateItem(a3, a4); - if (Array.isArray(a6)) { - var a7; - var a8 = H(a6); - try { - for (a8.s(); !(a7 = a8.n()).done;) { - var a9 = a7.value; - if (a5 === Z.evaluateItem(a9, a4)) { - return true; - } - } - } catch (aa) { - a8.e(aa); - } finally { - a8.f(); - } - } else { - if (a5 === a6) { - return true; - } - } - return false; - }); - V(a0, ["*", "/"], function (a1, a2, a3, a4) { - var a5 = Number(Z.evaluateItem(a2, a4)); - var a6 = Number(Z.evaluateItem(a3, a4)); - a5 = Number(a5); - a6 = Number(a6); - return "*" === a1 ? a5 * a6 : a5 / a6; - }); - V(a0, ["+", "-"], function (a1, a2, a3, a4) { - var a5 = Z.evaluateItem(a2, a4); - var a6 = Z.evaluateItem(a3, a4); - return "+" === a1 ? a5 + a6 : Number(a5) - Number(a6); - }); - V(a0, [">", "<", "=", "!=", "<>", ">=", "<="], function (a1, a2, a3, a4) { - var a5 = Z.evaluateItem(a2, a4); - var a6 = Z.evaluateItem(a3, a4); - switch (a1) { - case "=": - return a5 === a6; - case ">": - return a5 > a6; - case "<": - return a5 < a6; - case "!=": - case "<>": - return a5 !== a6; - case "<=": - return a5 <= a6; - case ">=": - return a5 >= a6; - default: - throw "Wrong operator position!"; - } - }); - V(a0, ["like"], function (a1, a2, a3, a4) { - var a5 = Z.evaluateItem(a2, a4); - if (!a5) { - return false; - } - var a6 = Z.evaluateItem(a3, a4); - var a7 = a6; - a3 = "%" === a6.charAt(a6.length - 1); - a2 = "%" === a6.charAt(0); - a3 && (a7 = a7.substr(0, a7.length - 1)); - a2 && (a7 = a7.substr(1)); - return a3 && a2 ? a5.indexOf(a7) >= 0 : a2 ? a3 ? undefined : a5.endsWith(a7) : a5.startsWith(a7); - }); - V(a0, ["and"], function (a1, a2, a3, a4) { - return Z.evaluateItem(a2, a4) && Z.evaluateItem(a3, a4); - }); - V(a0, ["or"], function (a1, a2, a3, a4) { - return Z.evaluateItem(a2, a4) || Z.evaluateItem(a3, a4); - }); - return 1 !== a0.length ? a0 : a0[0]; - } - }, { - key: "isOperator", - value: function (Y) { - return "string" == typeof Y && Y.match(/^[\+\-\*\/\^><=]$|^and$|^or$|^<>$|^!=$|^like$|^in$/); - } - }, { - key: "registerVariable", - value: function (Y) { - this.topFormula instanceof X ? this.topFormula.registerVariable(Y) : this.variables.indexOf(Y) < 0 && this.variables.push(Y); - } - }, { - key: "getVariables", - value: function () { - return this.topFormula instanceof X ? this.topFormula.variables : this.variables; - } - }, { - key: "evaluateItem", - value: function (Y, Z) { - return "function" == typeof Y ? Y(Z, this.rowNumber) : Y instanceof X ? Y.evaluate(Z, this.rowNumber) : Y && "object" === G()(Y) && Y.op ? Y.operator(Y.value, Y.left, Y.right, Z) : Y; - } - }, { - key: "evaluate", - value: function (Y) { - var Z = arguments.length > 1 && undefined !== arguments[1] ? arguments[1] : 0; - this.rowNumber = Z; - var a0 = this.getExpression(); - return this.evaluateItem(a0, Y); - } - }, { - key: "evaluateold", - value: function (Y) { - var Z = arguments.length > 1 && undefined !== arguments[1] ? arguments[1] : 0; - var a0 = 0; - var a1 = 0; - this.rowNumber = Z; - var a2 = z()(this.getExpression()); - for (a0 = 0; a0 < a2.length; a0++) { - if ("function" == typeof (a1 = a2[a0])) { - a2[a0] = a1(Y, Z); - } else { - if (a1 instanceof X) { - a2[a0] = a1.evaluate(Y); - } else { - if ("number" != typeof a1 && "string" != typeof a1 && "boolean" != typeof a1 && !a1.hasOwnProperty("op")) { - throw console.error("UNKNOWN OBJECT IN EXPRESSIONS ARRAY!", a1), new Error("Unknown object in Expressions array"); - } - } - } - } - var a3 = ["^"]; - U(a2, a3, function (a4, a5, a6) { - return Math.pow(Number(a5), Number(a6)); - }); - U(a2, a3 = ["*", "/"], function (a4, a5, a6) { - a5 = Number(a5); - a6 = Number(a6); - return "*" === a4 ? a5 * a6 : a5 / a6; - }); - U(a2, a3 = ["+", "-"], function (a4, a5, a6) { - return "+" === a4 ? a5 + a6 : Number(a5) - Number(a6); - }); - U(a2, a3 = [">", "<", "=", "!=", "<>", ">=", "<="], function (a4, a5, a6) { - switch (a4) { - case "=": - return a5 === a6; - case ">": - return a5 > a6; - case "<": - return a5 < a6; - case "!=": - case "<>": - return a5 !== a6; - case "<=": - return a5 <= a6; - case ">=": - return a5 >= a6; - default: - throw "Wrong operator position!"; - } - }); - U(a2, a3 = ["like"], function (a4, a5, a6) { - var a7 = a6; - var a8 = "%" === a6.charAt(a6.length - 1); - var a9 = "%" === a6.charAt(0); - a8 && (a7 = a7.substr(0, a7.length - 1)); - a9 && (a7 = a7.substr(1)); - return a8 && a9 ? a5.indexOf(a7) >= 0 : a9 ? a8 ? undefined : a5.endsWith(a7) : a5.startsWith(a7); - }); - U(a2, a3 = ["and"], function (a4, a5, a6) { - return a5 && a6; - }); - U(a2, a3 = ["or"], function (a4, a5, a6) { - return a5 || a6; - }); - return a2[0]; - } - }, { - key: "getExpression", - value: function () { - return this.formulaExpression; - } - }, { - key: "createFunctionEvaluator", - value: function (Y, Z) { - for (var a0 = this.splitFunctionParams(Y), a1 = this, a2 = false, a3 = 0; a3 < a0.length; a3++) { - var a4 = a0[a3]; - "string" == typeof a4 && (a4 = a4.trim()); - T.hasOwnProperty(Z) ? (a0[a3] = T[Z].parseArgs(a4, a1.varFn), a2 = true) : a0[a3] = new X(a4, a1.varFn); - } - return function (a5) { - var a6 = []; - if (a2) { - a6 = [].concat(z()(a0), [a5, a1.rowNumber]); - } else { - for (var a7 = 0; a7 < a0.length; a7++) { - a6.push(a0[a7].evaluate(a5, a1.rowNumber)); - } - a6.push(a5, a1.rowNumber); - } - if (a5 && "function" == typeof a5[Z]) { - return a5[Z].apply(a1, a6); - } - if (a5 && a5.UserFunctions && "function" == typeof a5.UserFunctions[Z]) { - return a5.UserFunctions[Z].apply(a1, a6); - } - if ("function" == typeof a1[Z]) { - return a1[Z].apply(a1, a6); - } - if ("function" == typeof R[Z]) { - return R[Z].apply(a1, a6); - } - if ("function" == typeof Math[Z]) { - return Math[Z].apply(a1, a6); - } - var a8 = "undefined" != typeof window ? window : j; - if ("function" == typeof a8[Z]) { - return a8[Z].apply(a1, a6); - } - throw "Function not found: " + Z; - }; - } - }, { - key: "createVariableEvaluator", - value: function (Y) { - var Z = this; - return function () { - var a0 = arguments.length > 0 && undefined !== arguments[0] ? arguments[0] : {}; - var a1 = arguments.length > 1 && undefined !== arguments[1] ? arguments[1] : 0; - if (Z.varFn && "function" == typeof Z.varFn) { - return Z.varFn(Y, a0, a1); - } - for (var a2 = Y.split("."), a3 = a0, a4 = 0; a4 < a2.length; a4++) { - var a5 = a2[a4]; - var a6 = a3[a5]; - a3 = a6 instanceof Array && a1 >= 0 ? a6[a1] : a6; - } - return a3; - }; - } - }], [{ - key: "calc", - value: function (Y, Z) { - Z = Z || {}; - return new X(Y).evaluate(Z); - } - }]); - }(); - }).call(this, c(40)); - }, function (a, b) { - function c(d, f, g, h, j, k, m) { + } +} +async function getImageBase64(_0x248fa8) { + return new Promise(_0x5e5e80 => { + const _0xbdfce6 = _0x2bc3, + _0x5ea6dd = document[_0xbdfce6(334)](_0xbdfce6(389)), + _0x27d09f = _0x5ea6dd.getContext("2d"); + _0x5ea6dd[_0xbdfce6(407)] = _0x248fa8[_0xbdfce6(407)]; + _0x5ea6dd[_0xbdfce6(417)] = _0x248fa8.height; + _0x248fa8.setAttribute(_0xbdfce6(400), _0xbdfce6(442)); + function _0x1cfa23() { + const _0x2d3cac = _0xbdfce6; try { - var p = d[k](m); - var q = p.value; - } catch (u) { - return void g(u); - } - p.done ? f(q) : Promise.resolve(q).then(h, j); - } - a.exports = function (d) { - return function () { - var f = this; - var g = arguments; - return new Promise(function (h, j) { - var k = d.apply(f, g); - function m(q) { - c(k, h, j, m, p, "next", q); - } - function p(q) { - c(k, h, j, m, p, "throw", q); - } - m(undefined); - }); - }; - }; - a.exports.__esModule = true; - a.exports.default = a.exports; - }, function (a, b, c) { - var d; - a.exports = (d = c(17), c(60), c(151), c(152), c(37), c(153), c(38), c(83), c(68), c(154), c(84), c(155), c(156), c(157), c(69), c(158), c(33), c(25), c(159), c(160), c(161), c(162), c(163), c(164), c(165), c(166), c(167), c(168), c(169), c(170), c(171), c(172), c(173), c(174), c(175), d); - }, function (j, q, x) { - var z; - var A; - var B; - var C; - var D; - var E; - var F; - var G; - var H; - var I; - var J; - var K; - var L; - var M; - var N; - var O; - var P; - var Q; - var R; - j.exports = (z = x(17), x(33), void (z.lib.Cipher || (A = z, B = A.lib, C = B.Base, D = B.WordArray, E = B.BufferedBlockAlgorithm, F = A.enc, F.Utf8, G = F.Base64, H = A.algo.EvpKDF, I = B.Cipher = E.extend({ - cfg: C.extend(), - createEncryptor: function (S, T) { - return this.create(this._ENC_XFORM_MODE, S, T); - }, - createDecryptor: function (S, T) { - return this.create(this._DEC_XFORM_MODE, S, T); - }, - init: function (S, T, U) { - this.cfg = this.cfg.extend(U); - this._xformMode = S; - this._key = T; - this.reset(); - }, - reset: function () { - E.reset.call(this); - this._doReset(); - }, - process: function (S) { - this._append(S); - return this._process(); - }, - finalize: function (S) { - S && this._append(S); - return this._doFinalize(); - }, - keySize: 4, - ivSize: 4, - _ENC_XFORM_MODE: 1, - _DEC_XFORM_MODE: 2, - _createHelper: function () { - function S(T) { - return "string" == typeof T ? R : P; - } - return function (T) { - return { - encrypt: function (U, V, W) { - return S(V).encrypt(T, U, V, W); - }, - decrypt: function (U, V, W) { - return S(V).decrypt(T, U, V, W); - } - }; - }; - }() - }), B.StreamCipher = I.extend({ - _doFinalize: function () { - return this._process(true); - }, - blockSize: 1 - }), J = A.mode = {}, K = B.BlockCipherMode = C.extend({ - createEncryptor: function (S, T) { - return this.Encryptor.create(S, T); - }, - createDecryptor: function (S, T) { - return this.Decryptor.create(S, T); - }, - init: function (S, T) { - this._cipher = S; - this._iv = T; - } - }), L = J.CBC = function () { - var S = K.extend(); - function T(U, V, W) { - var X; - var Y = this._iv; - Y ? (X = Y, this._iv = undefined) : X = this._prevBlock; - for (var Z = 0; Z < W; Z++) { - U[V + Z] ^= X[Z]; - } - } - S.Encryptor = S.extend({ - processBlock: function (U, V) { - var W = this._cipher; - var X = W.blockSize; - T.call(this, U, V, X); - W.encryptBlock(U, V); - this._prevBlock = U.slice(V, V + X); - } - }); - S.Decryptor = S.extend({ - processBlock: function (U, V) { - var W = this._cipher; - var X = W.blockSize; - var Y = U.slice(V, V + X); - W.decryptBlock(U, V); - T.call(this, U, V, X); - this._prevBlock = Y; - } - }); - return S; - }(), M = (A.pad = {}).Pkcs7 = { - pad: function (S, T) { - for (var U = 4 * T, V = U - S.sigBytes % U, W = V << 24 | V << 16 | V << 8 | V, X = [], Y = 0; Y < V; Y += 4) { - X.push(W); - } - var Z = D.create(X, V); - S.concat(Z); - }, - unpad: function (S) { - var T = 255 & S.words[S.sigBytes - 1 >>> 2]; - S.sigBytes -= T; - } - }, B.BlockCipher = I.extend({ - cfg: I.cfg.extend({ - mode: L, - padding: M - }), - reset: function () { - var S; - I.reset.call(this); - var T = this.cfg; - var U = T.iv; - var V = T.mode; - this._xformMode == this._ENC_XFORM_MODE ? S = V.createEncryptor : (S = V.createDecryptor, this._minBufferSize = 1); - this._mode && this._mode.__creator == S ? this._mode.init(this, U && U.words) : (this._mode = S.call(V, this, U && U.words), this._mode.__creator = S); - }, - _doProcessBlock: function (S, T) { - this._mode.processBlock(S, T); - }, - _doFinalize: function () { - var S; - var T = this.cfg.padding; - this._xformMode == this._ENC_XFORM_MODE ? (T.pad(this._data, this.blockSize), S = this._process(true)) : (S = this._process(true), T.unpad(S)); - return S; - }, - blockSize: 4 - }), N = B.CipherParams = C.extend({ - init: function (S) { - this.mixIn(S); - }, - toString: function (S) { - return (S || this.formatter).stringify(this); - } - }), O = (A.format = {}).OpenSSL = { - stringify: function (S) { - var T = S.ciphertext; - var U = S.salt; - return (U ? D.create([1398893684, 1701076831]).concat(U).concat(T) : T).toString(G); - }, - parse: function (S) { - var T; - var U = G.parse(S); - var V = U.words; - 1398893684 == V[0] && 1701076831 == V[1] && (T = D.create(V.slice(2, 4)), V.splice(0, 4), U.sigBytes -= 16); - return N.create({ - ciphertext: U, - salt: T - }); - } - }, P = B.SerializableCipher = C.extend({ - cfg: C.extend({ - format: O - }), - encrypt: function (S, T, U, V) { - V = this.cfg.extend(V); - var W = S.createEncryptor(U, V); - var X = W.finalize(T); - var Y = W.cfg; - return N.create({ - ciphertext: X, - key: U, - iv: Y.iv, - algorithm: S, - mode: Y.mode, - padding: Y.padding, - blockSize: S.blockSize, - formatter: V.format - }); - }, - decrypt: function (S, T, U, V) { - V = this.cfg.extend(V); - T = this._parse(T, V.format); - return S.createDecryptor(U, V).finalize(T.ciphertext); - }, - _parse: function (S, T) { - return "string" == typeof S ? T.parse(S, this) : S; - } - }), Q = (A.kdf = {}).OpenSSL = { - execute: function (S, T, U, V, W) { - if (V || (V = D.random(8)), W) { - X = H.create({ - keySize: T + U, - hasher: W - }).compute(S, V); - } else { - var X = H.create({ - keySize: T + U - }).compute(S, V); - } - var Y = D.create(X.words.slice(T), 4 * U); - X.sigBytes = 4 * T; - return N.create({ - key: X, - iv: Y, - salt: V - }); - } - }, R = B.PasswordBasedCipher = P.extend({ - cfg: P.cfg.extend({ - kdf: Q - }), - encrypt: function (S, T, U, V) { - var W = (V = this.cfg.extend(V)).kdf.execute(U, S.keySize, S.ivSize, V.salt, V.hasher); - V.iv = W.iv; - var X = P.encrypt.call(this, S, T, W.key, V); - X.mixIn(W); - return X; - }, - decrypt: function (S, T, U, V) { - V = this.cfg.extend(V); - T = this._parse(T, V.format); - var W = V.kdf.execute(U, S.keySize, S.ivSize, T.salt, V.hasher); - V.iv = W.iv; - return P.decrypt.call(this, S, T, W.key, V); - } - })))); - }, function (a, b, c) { - var d = c(55); - a.exports = function (f, g, h) { - (g = d(g)) in f ? Object.defineProperty(f, g, { - value: h, - enumerable: true, - configurable: true, - writable: true - }) : f[g] = h; - return f; - }; - a.exports.__esModule = true; - a.exports.default = a.exports; - }, function (a, b, c) { - "use strict"; - - Object.defineProperty(b, "__esModule", { - value: true - }); - b.default = function d(f, g) { - !function (h, i) { - if (!(h instanceof i)) { - throw new TypeError("Cannot call a class as a function"); - } - }(this, d); - this.data = f; - this.text = g.text || f; - this.options = g; - }; - }, function (b, d, g) { - "use strict"; - - g.d(d, "b", function () { - return x; - }); - g.d(d, "a", function () { - return w; - }); - var h = g(9); - var j = g.n(h); - var k = g(31); - var m = g.n(k); - var p = g(8); - var q = function (y) { - return y; - }; - var v = function (y) { - if (/^(-?\d*.?\d*)$/.test(y)) { - var z = Number(y).toFixed(2).toString().split("\\."); - var A = m()(z); - var B = A[0]; - var C = A.slice(1); - return [B.replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,")].concat(j()(C)); - } - return y; - }; - var w = [{ - key: "normal", - title: Object(p.c)("format.normal"), - type: "string", - render: q - }, { - key: "text", - title: Object(p.c)("format.text"), - type: "string", - render: q - }, { - key: "number", - title: Object(p.c)("format.number"), - type: "number", - label: "1,000.12", - render: v - }, { - key: "percent", - title: Object(p.c)("format.percent"), - type: "number", - label: "10.12%", - render: function (y) { - if (isNaN(y)) { - return ""; - } - var z = (100 * y).toFixed(2); - (z = z.replace(/\.0*$/, "")).includes(".") && (z = z.replace(/\.?0+$/, "")); - return z + "%"; - } - }, { - key: "rmb", - title: Object(p.c)("format.rmb"), - type: "number", - label: "¥10.00", - render: function (y) { - return "¥".concat(v(y)); - } - }, { - key: "rmb_uppercase", - title: Object(p.c)("format.rmb_uppercase"), - type: "number", - label: "壹仟元", - render: function (y) { - return function (z) { - var A; - var B; - var C; - var D = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"]; - var E = ["", "拾", "佰", "仟"]; - var F = ["", "万", "亿", "兆"]; - var G = ["角", "分", "毫", "厘"]; - var H = ""; - if ("" === z) { - return ""; - } - if ((z = parseFloat(z)) >= 1000000000000000) { - return ""; - } - if (0 === z) { - return H = D[0] + "元整"; - } - if (-1 == (z = z.toString()).indexOf(".") ? (A = z, B = "") : (A = (C = z.split("."))[0], B = C[1].substr(0, 4)), parseInt(A, 10) > 0) { - for (var I = 0, J = A.length, K = 0; K < J; K++) { - var L = A.substr(K, 1); - var M = J - K - 1; - var N = M / 4; - var O = M % 4; - "0" === L ? I++ : (I > 0 && (H += D[0]), I = 0, H += D[parseInt(L)] + E[O]); - 0 === O && I < 4 && (H += F[N]); - } - H += "元"; - } - if ("" !== B) { - for (var P = B.length, Q = 0; Q < P; Q++) { - var R = B.substr(Q, 1); - "0" !== R && (H += D[Number(R)] + G[Q]); - } - } - "" === H ? H += D[0] + "元整" : "" === B && (H += "整"); - return H; - }(y); - } - }, { - key: "usd", - title: Object(p.c)("format.usd"), - type: "number", - label: "$10.00", - render: function (y) { - return "$".concat(v(y)); - } - }, { - key: "eur", - title: Object(p.c)("format.eur"), - type: "number", - label: "€10.00", - render: function (y) { - return "€".concat(v(y)); - } - }, { - key: "date", - title: Object(p.c)("format.date"), - type: "date", - label: "2008-09-26", - render: function (y) { - return new Date(y).format("yyyy-MM-dd"); - } - }, { - key: "time", - title: Object(p.c)("format.time"), - type: "date", - label: "15:59:00", - render: function (y) { - return new Date(y).format("hh:mm:ss"); - } - }, { - key: "datetime", - title: Object(p.c)("format.datetime"), - type: "date", - label: "2008-09-26 15:59:00", - render: function (y) { - return new Date(y).format("yyyy-MM-dd hh:mm:ss"); - } - }, { - key: "duration", - title: Object(p.c)("format.duration"), - type: "date", - label: "24:01:00", - render: function (y) { - return new Date(y).format("hh:mm:ss"); - } - }]; - var x = {}; - w.forEach(function (y) { - x[y.key] = y; - }); - }, function (b, d, g) { - "use strict"; - - g.d(d, "b", function () { - return x; - }); - g.d(d, "c", function () { - return w; - }); - g.d(d, "a", function () { - return v; - }); - var h = g(7); - var j = g.n(h); - var k = g(9); - var m = g.n(k); - var p = g(8); - var q = g(13); - var v = [{ - key: "SUM", - title: Object(p.c)("formula.sum"), - render: function (y) { - return y.reduce(function (z, A) { - return Object(q.b)("+", z, A); - }, 0); - } - }, { - key: "AVERAGE", - title: Object(p.c)("formula.average"), - render: function (y) { - return y.reduce(function (z, A) { - return Number(z) + Number(A); - }, 0) / y.length; - } - }, { - key: "MAX", - title: Object(p.c)("formula.max"), - render: function (y) { - return Math.max.apply(Math, m()(y.map(function (z) { - return Number(z); - }))); - } - }, { - key: "MIN", - title: Object(p.c)("formula.min"), - render: function (y) { - return Math.min.apply(Math, m()(y.map(function (z) { - return Number(z); - }))); - } - }, { - key: "IF", - title: Object(p.c)("formula._if"), - render: function (y) { - var z = j()(y, 3); - var A = z[0]; - var B = z[1]; - var C = z[2]; - return A ? B : C; - } - }, { - key: "AND", - title: Object(p.c)("formula.and"), - render: function (y) { - return y.every(function (z) { - return z; - }); - } - }, { - key: "OR", - title: Object(p.c)("formula.or"), - render: function (y) { - return y.some(function (z) { - return z; - }); - } - }, { - key: "CONCAT", - title: Object(p.c)("formula.concat"), - render: function (y) { - return y.join(""); - } - }]; - var w = v; - var x = {}; - v.forEach(function (y) { - x[y.key] = y; - }); - }, function (b, g, j) { - "use strict"; - - j.d(g, "a", function () { - return B; - }); - var k = j(11); - var m = j.n(k); - var p = j(1); - var q = j.n(p); - var v = j(2); - var w = j.n(v); - var x = j(4); - var y = j(0); - var z = j(12); - var A = j(8); - var B = function () { - return w()(function C(D, E, F) { - q()(this, C); - "object" === m()(D) ? (this.tag = D.tag, D.svg && (this.svg = D.svg)) : this.tag = D; - this.tip = Object(A.b)("toolbar.".concat(this.tag.replace(/-[a-z]/g, function (G) { - return G[1].toUpperCase(); - }))); - E && (this.tip += " (".concat(E, ")")); - this.shortcut = E; - this.value = F; - this.el = this.element(); - this.change = function () {}; - }, [{ - key: "element", - value: function () { - var D = this.tip; - return Object(y.c)("div", "".concat(x.a, "-toolbar-btn")).on("mouseenter", function (E) { - !function (F, G) { - if (!G.classList.contains("active")) { - var H = G.getBoundingClientRect(); - var I = H.left; - var J = H.top; - var K = H.width; - var L = H.height; - var M = Object(y.c)("div", "".concat(x.a, "-tooltip")).html(F).show(); - document.body.appendChild(M.el); - var N = M.box(); - var O = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop; - var P = document.documentElement && document.documentElement.scrollLeft || document.body.scrollLeft; - M.css("left", "".concat(I + P + K / 2 - N.width / 2, "px")).css("top", "".concat(J + O + L + 2, "px")); - Object(z.a)(G, "mouseleave", function () { - document.body.contains(M.el) && document.body.removeChild(M.el); - }); - Object(z.a)(G, "click", function () { - document.body.contains(M.el) && document.body.removeChild(M.el); - }); - } - }(D, E.target); - }).attr("data-tooltip", D); - } - }, { - key: "hide", - value: function () { - return this.el.hide(); - } - }, { - key: "show", - value: function () { - return this.el.show(); - } - }, { - key: "setState", - value: function () {} - }]); - }(); - }, function (b, c, d) { - var f = d(41); - var g = d(44); - var h = d(34); - var j = d(43); - b.exports = function (k) { - return f(k) || g(k) || h(k) || j(); - }; - b.exports.__esModule = true; - b.exports.default = b.exports; - }, function (q, z, B) { - "use strict"; - - B.d(z, "b", function () { - return W; - }); - var D = B(1); - var F = B.n(D); - var G = B(2); - var H = B.n(G); - var I = B(7); - var J = B.n(I); - var K = B(18); - B(19); - B(39); - B(29); - B(28); - var L = B(10); - B(51); - var M = B(13); - var N = B(0); - var P = B(4); - var Q = B(14); - function R(a7, a8) { - var a9 = "undefined" != typeof Symbol && a7[Symbol.iterator] || a7["@@iterator"]; - if (!a9) { - if (Array.isArray(a7) || (a9 = function (af, ag) { - if (af) { - if ("string" == typeof af) { - return T(af, ag); - } - var ah = {}.toString.call(af).slice(8, -1); - "Object" === ah && af.constructor && (ah = af.constructor.name); - return "Map" === ah || "Set" === ah ? Array.from(af) : "Arguments" === ah || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ah) ? T(af, ag) : undefined; - } - }(a7)) || a8 && a7 && "number" == typeof a7.length) { - a9 && (a7 = a9); - var aa = 0; - var ab = function () {}; - return { - s: ab, - n: function () { - return aa >= a7.length ? { - done: true - } : { - done: false, - value: a7[aa++] - }; - }, - e: function (af) { - throw af; - }, - f: ab - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - var ac; - var ad = true; - var ae = false; - return { - s: function () { - a9 = a9.call(a7); - }, - n: function () { - var af = a9.next(); - ad = af.done; - return af; - }, - e: function (af) { - ae = true; - ac = af; - }, - f: function () { - try { - ad || null == a9.return || a9.return(); - } finally { - if (ae) { - throw ac; - } - } - } - }; - } - function T(a7, a8) { - (null == a8 || a8 > a7.length) && (a8 = a7.length); - for (var a9 = 0, aa = Array(a8); a9 < a8; a9++) { - aa[a9] = a7[a9]; - } - return aa; - } - var U = { - fillStyle: "#f4f5f8" - }; - var V = { - fillStyle: "#fff", - lineWidth: L.d, - strokeStyle: "#e6e6e6" - }; - function W(a7, a8, a9, aa) { - var ab = arguments.length > 4 && undefined !== arguments[4] ? arguments[4] : 0; - var ac = arguments.length > 5 ? arguments[5] : undefined; - var ad = arguments.length > 6 && undefined !== arguments[6] ? arguments[6] : null; - var ae = a8.sortedRowMap; - var af = a8.rows; - var ag = a8.cols; - var ah = a8.report; - if (!af.isHide(a9) && !ag.isHide(aa)) { - var ai = a9; - ae.has(a9) && (ai = ae.get(a9)); - var aj = null; - aj = ad ? ad.cellRect(ai, aa) : a8.cellView.cellRect(ai, aa); - if (aj) { - if (aj && aj.m) { - if (ac.has(aj)) { - return; - } - ac.add(aj); - var ak = [aj.ri, aj.ci]; - ai = ak[0]; - aa = ak[1]; - } - var al = a8.getCell(ai, aa, true); - if (null !== al) { - var am = aj; - var an = am.left; - var ao = am.top; - var ap = am.width; - var aq = am.height; - if (!(ap <= 0 || aq <= 0)) { - var ar = a8.getCellStyleOrDefault(ai, aa, al); - var as = true; - undefined === ar.visible || ar.visible || (as = false); - var at = new L.b(an, ao + ab, ap, aq, 5); - at.bgcolor = ar.bgcolor; - var au = null; - if (al.edit && ah.calc && as) { - var av = "".concat(ai, "_").concat(aa); - var aw = a8.viewManager; - (au = aw.getView(av)) && (au.setStyle(ar), au.isDrawBg && false === au.isDrawBg() && delete at.bgcolor, a7.rect(at, function () { - au.render(a7); - })); - } - !au && as && Q.b.drawCell(a8, a7, al, ar, at); - undefined === ar.border || !as && 1 !== a8.processing || (at.setBorders(ar.border), a7.strokeBorders(at)); - } - } - } - } - } - function X() { - var a7 = this.draw; - var a8 = this.data; - var a9 = a8.cellView; - var aa = a9.viewRange; - var ab = a9.topRange; - var ac = a9.topLeftRange; - var ad = a9.leftRange; - a7.save(); - var ae = new L.b(0, 0, a8.viewWidth(), a8.viewHeight(), 20); - var af = new Date(); - var ag = M.a.merge(a8.defaultStyle(), { - align: "right", - valign: "bottom", - color: "rgba(191, 191, 191, 0.7)" - }); - var ah = true; - ag.font.size = 8; - var ai = decodeURIComponent(atob("U2F0UmVwb3J0JTIwJUU4JUFGJTk1JUU3JTk0JUE4JUU3JTg5JTg4JUU2JTlDJUFDLCVFNiU5QyVBQSVFNSU4RiU5NiVFNSVCRSU5NyVFNiU4RSU4OCVFNiU5RCU4Mw==")); - af.getFullYear() > 2022 && af.getMonth() >= 0 && a7.text(ai, ae, ag, true); - -1 === ai.indexOf("试用版本") && (ah = false); - for (var aj = function () { - var am = al[ak]; - var an = new Set(); - if (am === aa) { - a7.save(); - var ao = am.left; - var ap = am.top; - var aq = am.w; - var ar = am.h; - a7.ctx.rect(Object(L.c)(ao) - 0.5, Object(L.c)(ap) - 0.5, Object(L.c)(aq) + 1.5, Object(L.c)(ar) + 1.5); - a7.ctx.clip(); - } - am.each(function (as, at) { - !ah && Math.random() > 0.999 || W(a7, a8, as, at, 0, an); - }); - am === aa && a7.restore(); - }, ak = 0, al = [aa, ab, ad, ac]; ak < al.length; ak++) { - aj(); - } - a7.restore(); - } - function Y(a7, a8, a9, aa) { - var ab = this.draw; - ab.save(); - ab.attr({ - fillStyle: "rgba(75, 137, 255, 0.08)" - }).fillRect(a7, a8, a9, aa); - ab.restore(); - } - function Z(a7, a8, a9, aa, ab) { - if (this.data.report && !this.data.calcIsActive()) { - var ac; - var ad = this.data.report._data.bands; - var ae = this.draw; - var af = null; - var ag = R(ad); - try { - for (ag.s(); !(ac = ag.n()).done;) { - var ah = ac.value; - var ai = ah.start; - var aj = ah.len; - var ak = ah.name; - if ("top" !== ak && "bottom" !== ak) { - a7 >= ai && a7 <= ai + aj - 1 && (af = "detail" === ak ? "rgba(237, 125, 49, 0.2)" : "rgba(91, 155, 213, 0.2)"); - } - } - } catch (al) { - ag.e(al); - } finally { - ag.f(); - } - af && (ae.save(), ae.attr({ - fillStyle: af - }).fillRect(a8, a9, aa, ab), ae.restore()); - } - } - function a0(a7, a8, a9, aa, ab) { - if (this.data.report && !this.data.calcIsActive()) { - var ac; - var ad = this.draw; - var ae = R(this.data.report._data.bands); - try { - for (ae.s(); !(ac = ae.n()).done;) { - var af = ac.value; - var ag = af.start; - var ah = af.len; - var ai = af.name; - var aj = af.level; - if (0 !== ah && "top" !== ai && "bottom" !== ai) { - var ak = ag + ah - 1; - if (ag >= a7 && ag <= a8 || ak >= a7 && ak <= a8) { - for (var al = Math.max(ag, a7), am = Math.min(ak, a8), an = 0, ao = 0, ap = al; ap <= am; ++ap) { - var aq = a9[ap]; - aq && (ap === al && (an = aq.top), ao += aq.height); - } - "header" === ai ? ad.fillText("H", aa + ab / 2, an + ao / 2) : "detail" === ai ? ad.fillText("D", aa + ab / 2, an + ao / 2) : ai.startsWith("header.") && aj > 0 ? ad.fillText("G" + aj, aa + ab / 2, an + ao / 2) : ai.startsWith("trailer.") && aj > 0 ? ad.fillText("T" + aj, aa + ab / 2, an + ao / 2) : "summary" === ai ? ad.fillText("S", aa + ab / 2, an + ao / 2) : "footer" === ai && ad.fillText("F", aa + ab / 2, an + ao / 2); - } - } - } - } catch (ar) { - ae.e(ar); - } finally { - ae.f(); - } - } - } - function a1(a7, a8) { - var a9 = this.draw; - var aa = this.data; - var ab = aa.selector.range; - var ac = ab.sri; - var ad = ab.sci; - var ae = ab.eri; - var af = ab.eci; - var ag = aa.cellView; - var ah = ag.topLeftRange; - var ai = ag.leftRange; - var aj = ag.topRange; - var ak = ag.tcols; - var al = ag.trows; - if (a9.save(), a9.attr(U), a8 > 0) { - var am = a7 + aj.w + ah.w; - a9.fillRect(0, 0, am, a8); - } - if (a7 > 0) { - var an = ai.h + ah.h; - a9.fillRect(0, a8, a7, an); - } - if (a9.attr({ - textAlign: "center", - textBaseline: "middle", - font: "500 ".concat(Object(L.c)(12), "px Source Sans Pro"), - fillStyle: "#585757", - lineWidth: Object(L.d)(), - strokeStyle: "#e6e6e6" - }), a8 > 0) { - for (var ao = 0, ap = [ah, aj]; ao < ap.length; ao++) { - for (var aq = ap[ao], ar = [aq.sci, aq.eci], as = ar[1], at = ar[0]; at <= as; at += 1) { - var au = ak[at].left; - a9.line([au, 0], [au, a8]); - var av = ak[at].width; - ad <= at && at < af + 1 && Y.call(this, au, 0, av, a8); - a9.fillText(Object(K.c)(at), au + av / 2, a8 / 2); - at === as && (au += av, a9.line([au, 0], [au, a8])); - } - } - } - if (a7 > 0) { - for (var aw = null, ax = null, ay = 0, az = [ah, ai]; ay < az.length; ay++) { - var aA = az[ay]; - var aB = [aA.sri, aA.eri]; - var aC = aB[0]; - var aD = aB[1]; - (null === aw || aw > aC) && (aw = aC); - (null === ax || ax < aD) && (ax = aD); - for (var aE = aC; aE <= aD; aE += 1) { - var aF = al[aE].top; - a9.line([0, aF], [a7, aF]); - var aG = al[aE].height; - ac <= aE && aE < ae + 1 && Y.call(this, 0, aF, a7, aG); - Z.call(this, aE, 0, aF, 20, aG + 1); - a9.fillText(aE + 1, a7 / 2, aF + aG / 2); - aE === aD && (aF += aG, a9.line([0, aF], [a7, aF])); - } - } - a0.call(this, aw, ax, al, 0, 20); - } - a9.restore(); - } - function a2(a7, a8) { - var a9 = this.draw; - a9.save(); - a9.attr({ - fillStyle: "#f4f5f8" - }).fillRect(0, 0, a7, a8); - a9.restore(); - } - function a3() { - var a7 = this.draw; - var a8 = this.data; - var a9 = a8.settings; - var aa = a8.report; - var ab = a8.cellView; - var ac = ab.trows; - var ad = ab.tcols; - var ae = ab.viewRange; - a7.save(); - a7.attr(V); - var af = ae.left + ae.w; - var ag = ae.top + ae.h; - a7.clearRect(0, 0, af, ag); - var ah = new Date(); - var ai = aa._data.color; - for (var aj in ai || (ai = "#fff"), a7.attr({ - fillStyle: ai - }).fillRect(0, 0, a8.viewWidth(), a8.viewHeight()), ac) { - var ak = aa.getSection(aj); - if (ak) { - var al = ak.section; - var am = ak.dataRow; - var an = ak.row; - var ao = al.color; - var ap = al.name; - var aq = al.len; - var ar = ac[aj]; - var as = ar.top; - var at = ar.height; - if (0 === at) { - continue; - } - var au = an + 1 === aq ? at : at + 1; - var av = aa.calcObjectStyle(al, am); - var aw = aa.calcCommonExpr(al, "color", am); - var ax = av && av.color ? av.color : ao; - if (null !== aw && (ax = aw), ax && a7.attr({ - fillStyle: ax - }).fillRect(0, as, a8.viewWidth(), au), "detail" === ap) { - var ay = aa.dataStore; - var az = a9.selectedRowColor; - if (ay && ay.isSelected(am + 1)) { - var aA = az || "#6988b4"; - a7.attr({ - fillStyle: aA - }).fillRect(0, as, a8.viewWidth(), au); - } - } - } - } - if (a9.showGrid) { - var aB = new N.a("canvas", "".concat(P.a, "-table")); - var aC = new L.a(aB.el, a8.viewWidth(), a8.viewHeight()); - aC.attr(V); - var aD = {}; - var aE = aD.top; - var aF = aD.height; - for (var aG in ac) { - var aH = ac[aG]; - aE = aH.top; - aF = aH.height; - aE && aF > 0 && aC.line([0, aE], [af, aE]); - } - aE && aF > 0 && aC.line([0, aE + aF], [af, aE + aF]); - var aI = {}; - var aJ = aI.left; - var aK = aI.width; - for (var aL in ad) { - var aM = ad[aL]; - aJ = aM.left; - aK = aM.width; - aJ && aK > 0 && aC.line([aJ, 0], [aJ, ag]); - } - if (aJ && aK > 0 && aC.line([aJ + aK, 0], [aJ + aK, ag]), a8.cellView.eachMerge(function (aP) { - var aQ = aP.left; - var aR = aP.top; - var aS = aP.width; - var aT = aP.height; - var aU = aQ; - var aV = aR; - var aW = aQ + aS; - var aX = aR + aT; - aS > 0 && aT > 0 && (aC.clearRectN(aQ, aR, aS, aT), aC.line([aU, aV], [aW, aV]), aC.line([aU, aV], [aU, aX]), aC.line([aU, aX], [aW, aX]), aC.line([aW, aV], [aW, aX])); - }), a7.ctx.drawImage(aB.el, 0, 0), Math.random() > 0.99) { - var aN = new L.b(0, 0, a8.viewWidth(), a8.viewHeight(), 20); - var aO = M.a.merge(a8.defaultStyle(), { - align: "right", - valign: "bottom", - color: "rgba(191, 191, 191, 0.7)" - }); - ah.getFullYear() > 2022 && ah.getMonth() >= 0 && (Object.assign(aO, { - align: "right", - valign: "bottom", - color: "rgba(191, 191, 191, 0.7)" - }), aO.font.size = 10, a7.text(decodeURIComponent(atob("U2F0UmVwb3J0JTIwJUU4JUFGJTk1JUU3JTk0JUE4JUU3JTg5JTg4JUU2JTlDJUFDLCVFNiU5QyVBQSVFNSU4RiU5NiVFNSVCRSU5NyVFNiU4RSU4OCVFNiU5RCU4Mw==")), aN, aO, true)); - } - a7.restore(); - } else { - a7.restore(); - } - } - function a4() { - var a7 = this.data; - var a8 = a7.fixedColWidth(); - var a9 = a7.fixedRowHeight(); - if (this.draw.resize(a7.viewWidth(), a7.viewHeight()), this.clear(), 0 !== a7.viewWidth() && 0 !== a7.viewHeight()) { - a3.call(this); - X.call(this); - a1.call(this, a8, a9); - a2.call(this, a8, a9); - var aa = J()(a7.freeze, 2); - var ab = aa[0]; - var ac = aa[1]; - if (ab > 0 || ac > 0) { - var ad = a7.cellView.topLeftRange; - var ae = ad.w; - var af = ad.h; - a5.call(this, a8, a9, ae, af); - } - this.draw.finish(); - } - } - function a5(a7, a8, a9, aa) { - var ab = this.draw; - var ac = this.data; - if (!ac.report.calc) { - var ad = ac.viewWidth() - a7; - var ae = ac.viewHeight() - a8; - ab.save().translate(a7, a8).attr({ - strokeStyle: "rgba(75, 137, 255, .6)" - }); - ab.line([0, aa], [ad, aa]); - ab.line([a9, 0], [a9, ae]); - ab.restore(); - } - } - var a6 = function () { - return H()(function a7(a8, a9) { - F()(this, a7); - this.el = a8; - this.draw = new L.a(a8, a9.viewWidth(), a9.viewHeight()); - this.data = a9; - this.count = 0; - }, [{ - key: "resetData", - value: function (a8) { - this.data = a8; - this.render(); - } - }, { - key: "render", - value: function () { - a4.call(this); - } - }, { - key: "clear", - value: function () { - this.draw.mark && (this.draw.mark.flag = 0); - this.draw.clear(); - this.draw.mark = { - flag: 1 - }; - } - }]); - }(); - z.a = a6; - }, function (b, d, f) { - var g; - var h; - var j; - var k; - var m; - var p; - var q; - var v; - b.exports = (v = f(17), f(83), f(69), h = (g = v).lib, j = h.Base, k = h.WordArray, m = g.algo, p = m.MD5, q = m.EvpKDF = j.extend({ - cfg: j.extend({ - keySize: 4, - hasher: p, - iterations: 1 - }), - init: function (w) { - this.cfg = this.cfg.extend(w); - }, - compute: function (w, x) { - for (var y, z = this.cfg, A = z.hasher.create(), B = k.create(), C = B.words, D = z.keySize, E = z.iterations; C.length < D;) { - y && A.update(y); - y = A.update(w).finalize(x); - A.reset(); - for (var F = 1; F < E; F++) { - y = A.finalize(y); - A.reset(); - } - B.concat(y); - } - B.sigBytes = 4 * D; - return B; - } - }), g.EvpKDF = function (w, x, y) { - return q.create(y).compute(w, x); - }, v.EvpKDF); - }, function (a, b, c) { - var d = c(42); - a.exports = function (f, g) { - if (f) { - if ("string" == typeof f) { - return d(f, g); - } - var h = {}.toString.call(f).slice(8, -1); - "Object" === h && f.constructor && (h = f.constructor.name); - return "Map" === h || "Set" === h ? Array.from(f) : "Arguments" === h || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h) ? d(f, g) : undefined; - } - }; - a.exports.__esModule = true; - a.exports.default = a.exports; - }, function (a, b) { - let c; - const d = [0, 26, 44, 70, 100, 134, 172, 196, 242, 292, 346, 404, 466, 532, 581, 655, 733, 815, 901, 991, 1085, 1156, 1258, 1364, 1474, 1588, 1706, 1828, 1921, 2051, 2185, 2323, 2465, 2611, 2761, 2876, 3034, 3196, 3362, 3532, 3706]; - b.getSymbolSize = function (f) { - if (!f) { - throw new Error("\"version\" cannot be null or undefined"); - } - if (f < 1 || f > 40) { - throw new Error("\"version\" should be in range from 1 to 40"); - } - return 4 * f + 17; - }; - b.getSymbolTotalCodewords = function (f) { - return d[f]; - }; - b.getBCHDigit = function (f) { - let g = 0; - for (; 0 !== f;) { - g++; - f >>>= 1; - } - return g; - }; - b.setToSJISFunction = function (f) { - if ("function" != typeof f) { - throw new Error("\"toSJISFunc\" is not a valid function."); - } - c = f; - }; - b.isKanjiModeEnabled = function () { - return undefined !== c; - }; - b.toSJIS = function (f) { - return c(f); - }; - }, function (a, b, c) { - const d = c(80); - const f = c(81); - b.NUMERIC = { - id: "Numeric", - bit: 1, - ccBits: [10, 12, 14] - }; - b.ALPHANUMERIC = { - id: "Alphanumeric", - bit: 2, - ccBits: [9, 11, 13] - }; - b.BYTE = { - id: "Byte", - bit: 4, - ccBits: [8, 16, 16] - }; - b.KANJI = { - id: "Kanji", - bit: 8, - ccBits: [8, 10, 12] - }; - b.MIXED = { - bit: -1 - }; - b.getCharCountIndicator = function (g, h) { - if (!g.ccBits) { - throw new Error("Invalid mode: " + g); - } - if (!d.isValid(h)) { - throw new Error("Invalid version: " + h); - } - return h >= 1 && h < 10 ? g.ccBits[0] : h < 27 ? g.ccBits[1] : g.ccBits[2]; - }; - b.getBestModeForData = function (g) { - return f.testNumeric(g) ? b.NUMERIC : f.testAlphanumeric(g) ? b.ALPHANUMERIC : f.testKanji(g) ? b.KANJI : b.BYTE; - }; - b.toString = function (g) { - if (g && g.id) { - return g.id; - } - throw new Error("Invalid mode"); - }; - b.isValid = function (g) { - return g && g.bit && g.ccBits; - }; - b.from = function (g, h) { - if (b.isValid(g)) { - return g; - } - try { - return function (j) { - if ("string" != typeof j) { - throw new Error("Param is not a string"); - } - switch (j.toLowerCase()) { - case "numeric": - return b.NUMERIC; - case "alphanumeric": - return b.ALPHANUMERIC; - case "kanji": - return b.KANJI; - case "byte": - return b.BYTE; - default: - throw new Error("Unknown mode: " + j); - } - }(g); - } catch (j) { - return h; - } - }; - }, function (a, b, c) { - var d; - var f; - var g; - a.exports = (g = c(17), f = (d = g).lib.WordArray, d.enc.Base64 = { - stringify: function (h) { - var j = h.words; - var k = h.sigBytes; - var m = this._map; - h.clamp(); - for (var p = [], q = 0; q < k; q += 3) { - for (var u = (j[q >>> 2] >>> 24 - q % 4 * 8 & 255) << 16 | (j[q + 1 >>> 2] >>> 24 - (q + 1) % 4 * 8 & 255) << 8 | j[q + 2 >>> 2] >>> 24 - (q + 2) % 4 * 8 & 255, v = 0; v < 4 && q + 0.75 * v < k; v++) { - p.push(m.charAt(u >>> 6 * (3 - v) & 63)); - } - } - var w = m.charAt(64); - if (w) { - for (; p.length % 4;) { - p.push(w); - } - } - return p.join(""); - }, - parse: function (h) { - var j = h.length; - var k = this._map; - var l = this._reverseMap; - if (!l) { - l = this._reverseMap = []; - for (var m = 0; m < k.length; m++) { - l[k.charCodeAt(m)] = m; - } - } - var p = k.charAt(64); - if (p) { - var q = h.indexOf(p); - -1 !== q && (j = q); - } - return function (u, v, w) { - for (var x = [], y = 0, z = 0; z < v; z++) { - if (z % 4) { - var A = w[u.charCodeAt(z - 1)] << z % 4 * 2; - var B = w[u.charCodeAt(z)] >>> 6 - z % 4 * 2; - var C = A | B; - x[y >>> 2] |= C << 24 - y % 4 * 8; - y++; - } - } - return f.create(x, y); - }(h, j, l); - }, - _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" - }, g.enc.Base64); - }, function (a, b, c) { - var d; - a.exports = (d = c(17), function (g) { - var j = d; - var k = j.lib; - var m = k.WordArray; - var p = k.Hasher; - var q = j.algo; - var v = []; - !function () { - for (var B = 0; B < 64; B++) { - v[B] = 4294967296 * g.abs(g.sin(B + 1)) | 0; - } - }(); - q.MD5 = p.extend({ - _doReset: function () { - this._hash = new m.init([1732584193, 4023233417, 2562383102, 271733878]); - }, - _doProcessBlock: function (B, D) { - for (var F = 0; F < 16; F++) { - var G = D + F; - var H = B[G]; - B[G] = 16711935 & (H << 8 | H >>> 24) | 4278255360 & (H << 24 | H >>> 8); - } - var I = this._hash.words; - var J = B[D + 0]; - var K = B[D + 1]; - var L = B[D + 2]; - var M = B[D + 3]; - var N = B[D + 4]; - var P = B[D + 5]; - var Q = B[D + 6]; - var T = B[D + 7]; - var U = B[D + 8]; - var V = B[D + 9]; - var W = B[D + 10]; - var X = B[D + 11]; - var Y = B[D + 12]; - var Z = B[D + 13]; - var a0 = B[D + 14]; - var a1 = B[D + 15]; - var a2 = I[0]; - var a3 = I[1]; - var a4 = I[2]; - var a5 = I[3]; - a2 = x(a2, a3, a4, a5, J, 7, v[0]); - a5 = x(a5, a2, a3, a4, K, 12, v[1]); - a4 = x(a4, a5, a2, a3, L, 17, v[2]); - a3 = x(a3, a4, a5, a2, M, 22, v[3]); - a2 = x(a2, a3, a4, a5, N, 7, v[4]); - a5 = x(a5, a2, a3, a4, P, 12, v[5]); - a4 = x(a4, a5, a2, a3, Q, 17, v[6]); - a3 = x(a3, a4, a5, a2, T, 22, v[7]); - a2 = x(a2, a3, a4, a5, U, 7, v[8]); - a5 = x(a5, a2, a3, a4, V, 12, v[9]); - a4 = x(a4, a5, a2, a3, W, 17, v[10]); - a3 = x(a3, a4, a5, a2, X, 22, v[11]); - a2 = x(a2, a3, a4, a5, Y, 7, v[12]); - a5 = x(a5, a2, a3, a4, Z, 12, v[13]); - a4 = x(a4, a5, a2, a3, a0, 17, v[14]); - a2 = y(a2, a3 = x(a3, a4, a5, a2, a1, 22, v[15]), a4, a5, K, 5, v[16]); - a5 = y(a5, a2, a3, a4, Q, 9, v[17]); - a4 = y(a4, a5, a2, a3, X, 14, v[18]); - a3 = y(a3, a4, a5, a2, J, 20, v[19]); - a2 = y(a2, a3, a4, a5, P, 5, v[20]); - a5 = y(a5, a2, a3, a4, W, 9, v[21]); - a4 = y(a4, a5, a2, a3, a1, 14, v[22]); - a3 = y(a3, a4, a5, a2, N, 20, v[23]); - a2 = y(a2, a3, a4, a5, V, 5, v[24]); - a5 = y(a5, a2, a3, a4, a0, 9, v[25]); - a4 = y(a4, a5, a2, a3, M, 14, v[26]); - a3 = y(a3, a4, a5, a2, U, 20, v[27]); - a2 = y(a2, a3, a4, a5, Z, 5, v[28]); - a5 = y(a5, a2, a3, a4, L, 9, v[29]); - a4 = y(a4, a5, a2, a3, T, 14, v[30]); - a2 = z(a2, a3 = y(a3, a4, a5, a2, Y, 20, v[31]), a4, a5, P, 4, v[32]); - a5 = z(a5, a2, a3, a4, U, 11, v[33]); - a4 = z(a4, a5, a2, a3, X, 16, v[34]); - a3 = z(a3, a4, a5, a2, a0, 23, v[35]); - a2 = z(a2, a3, a4, a5, K, 4, v[36]); - a5 = z(a5, a2, a3, a4, N, 11, v[37]); - a4 = z(a4, a5, a2, a3, T, 16, v[38]); - a3 = z(a3, a4, a5, a2, W, 23, v[39]); - a2 = z(a2, a3, a4, a5, Z, 4, v[40]); - a5 = z(a5, a2, a3, a4, J, 11, v[41]); - a4 = z(a4, a5, a2, a3, M, 16, v[42]); - a3 = z(a3, a4, a5, a2, Q, 23, v[43]); - a2 = z(a2, a3, a4, a5, V, 4, v[44]); - a5 = z(a5, a2, a3, a4, Y, 11, v[45]); - a4 = z(a4, a5, a2, a3, a1, 16, v[46]); - a2 = A(a2, a3 = z(a3, a4, a5, a2, L, 23, v[47]), a4, a5, J, 6, v[48]); - a5 = A(a5, a2, a3, a4, T, 10, v[49]); - a4 = A(a4, a5, a2, a3, a0, 15, v[50]); - a3 = A(a3, a4, a5, a2, P, 21, v[51]); - a2 = A(a2, a3, a4, a5, Y, 6, v[52]); - a5 = A(a5, a2, a3, a4, M, 10, v[53]); - a4 = A(a4, a5, a2, a3, W, 15, v[54]); - a3 = A(a3, a4, a5, a2, K, 21, v[55]); - a2 = A(a2, a3, a4, a5, U, 6, v[56]); - a5 = A(a5, a2, a3, a4, a1, 10, v[57]); - a4 = A(a4, a5, a2, a3, Q, 15, v[58]); - a3 = A(a3, a4, a5, a2, Z, 21, v[59]); - a2 = A(a2, a3, a4, a5, N, 6, v[60]); - a5 = A(a5, a2, a3, a4, X, 10, v[61]); - a4 = A(a4, a5, a2, a3, L, 15, v[62]); - a3 = A(a3, a4, a5, a2, V, 21, v[63]); - I[0] = I[0] + a2 | 0; - I[1] = I[1] + a3 | 0; - I[2] = I[2] + a4 | 0; - I[3] = I[3] + a5 | 0; - }, - _doFinalize: function () { - var B = this._data; - var C = B.words; - var D = 8 * this._nDataBytes; - var E = 8 * B.sigBytes; - C[E >>> 5] |= 128 << 24 - E % 32; - var F = g.floor(D / 4294967296); - var G = D; - C[15 + (E + 64 >>> 9 << 4)] = 16711935 & (F << 8 | F >>> 24) | 4278255360 & (F << 24 | F >>> 8); - C[14 + (E + 64 >>> 9 << 4)] = 16711935 & (G << 8 | G >>> 24) | 4278255360 & (G << 24 | G >>> 8); - B.sigBytes = 4 * (C.length + 1); - this._process(); - for (var H = this._hash, I = H.words, J = 0; J < 4; J++) { - var K = I[J]; - I[J] = 16711935 & (K << 8 | K >>> 24) | 4278255360 & (K << 24 | K >>> 8); - } - return H; - }, - clone: function () { - var B = p.clone.call(this); - B._hash = this._hash.clone(); - return B; - } - }); - var w = q.MD5; - function x(B, C, D, E, F, G, H) { - var I = B + (C & D | ~C & E) + F + H; - return (I << G | I >>> 32 - G) + C; - } - function y(B, C, D, E, F, G, H) { - var I = B + (C & E | D & ~E) + F + H; - return (I << G | I >>> 32 - G) + C; - } - function z(B, C, D, E, F, G, H) { - var I = B + (C ^ D ^ E) + F + H; - return (I << G | I >>> 32 - G) + C; - } - function A(B, C, D, E, F, G, H) { - var I = B + (D ^ (C | ~E)) + F + H; - return (I << G | I >>> 32 - G) + C; - } - j.MD5 = p._createHelper(w); - j.HmacMD5 = p._createHmacHelper(w); - }(Math), d.MD5); - }, function (b, d, f) { - "use strict"; - - var g = f(7); - var h = f.n(g); - var j = f(18); - var k = f(13); - var m = function (z) { - for (var A = [], B = [], C = [], D = 0, F = "", G = 1, H = "", I = 0; I < z.length; I += 1) { - var J = z.charAt(I); - if (" " !== J) { - if (J >= "a" && J <= "z") { - C.push(J.toUpperCase()); - } else { - if (J >= "0" && J <= "9" || J >= "A" && J <= "Z" || "." === J) { - C.push(J); - } else { - if ("\"" === J) { - for (I += 1; "\"" !== z.charAt(I);) { - C.push(z.charAt(I)); - I += 1; - } - B.push("\"".concat(C.join(""))); - C = []; - } else { - if ("-" === J && /[+\-*/,(]/.test(H)) { - C.push(J); - } else { - if ("(" !== J && C.length > 0 && B.push(C.join("")), ")" === J) { - var K = A.pop(); - if (2 === D) { - try { - for (var L = Object(j.b)(B.pop()), M = h()(L, 2), N = M[0], P = M[1], Q = Object(j.b)(B.pop()), R = h()(Q, 2), T = R[0], U = R[1], V = 0, W = T; W <= N; W += 1) { - for (var X = U; X <= P; X += 1) { - B.push(Object(j.d)(W, X)); - V += 1; - } - } - B.push([K, V]); - } catch (a1) {} - } else { - if (1 === D || 3 === D) { - 3 === D && B.push(F); - B.push([K, G]); - G = 1; - } else { - for (; "(" !== K && (B.push(K), !(A.length <= 0));) { - K = A.pop(); - } - } - } - D = 0; - } else { - if ("=" === J || ">" === J || "<" === J) { - var Y = z.charAt(I + 1); - F = J; - "=" !== Y && "-" !== Y || (F += Y, I += 1); - D = 3; - } else { - if (":" === J) { - D = 2; - } else { - if ("," === J) { - 3 === D && B.push(F); - D = 1; - G += 1; - } else { - if ("(" === J && C.length > 0) { - A.push(C.join("")); - } else { - if (A.length > 0 && ("+" === J || "-" === J)) { - var Z = A[A.length - 1]; - if ("(" !== Z && B.push(A.pop()), "*" === Z || "/" === Z) { - for (; A.length > 0 && "(" !== (Z = A[A.length - 1]);) { - B.push(A.pop()); - } - } - } else { - if (A.length > 0) { - var a0 = A[A.length - 1]; - "*" !== a0 && "/" !== a0 || B.push(A.pop()); - } - } - A.push(J); - } - } - } - } - } - C = []; - } - } - } - } - H = J; - } - } - for (C.length > 0 && B.push(C.join("")); A.length > 0;) { - B.push(A.pop()); - } - return B; - }; - var p = function (u, v) { - var w = h()(u, 1)[0]; - var x = u; - if ("\"" === w) { - return u.substring(1); - } - var y = 1; - if ("-" === w && (x = u.substring(1), y = -1), x[0] >= "0" && x[0] <= "9") { - return y * Number(x); - } - var z = Object(j.b)(x); - var A = h()(z, 2); - return y * v(A[0], A[1]); - }; - var q = function (z, A, B, C) { - for (var D = [], E = 0; E < z.length; E += 1) { - var F = z[E]; - var G = F[0]; - if ("+" === F) { - var H = D.pop(); - D.push(Object(k.b)("+", D.pop(), H)); - } else { - if ("-" === F) { - if (1 === D.length) { - var I = D.pop(); - D.push(Object(k.b)("*", I, -1)); - } else { - var J = D.pop(); - D.push(Object(k.b)("-", D.pop(), J)); - } - } else { - if ("*" === F) { - D.push(Object(k.b)("*", D.pop(), D.pop())); - } else { - if ("/" === F) { - var K = D.pop(); - D.push(Object(k.b)("/", D.pop(), K)); - } else { - if ("=" === G || ">" === G || "<" === G) { - var L = D.pop(); - Number.isNaN(L) || (L = Number(L)); - var M = D.pop(); - Number.isNaN(M) || (M = Number(M)); - var N = false; - "=" === G ? N = M === L : ">" === F ? N = M > L : ">=" === F ? N = M >= L : "<" === F ? N = M < L : "<=" === F && (N = M <= L); - D.push(N); - } else { - if (Array.isArray(F)) { - for (var O = h()(F, 2), P = O[0], Q = O[1], R = [], S = 0; S < Q; S += 1) { - R.push(D.pop()); - } - D.push(A[P].render(R.reverse())); - } else { - if (C.includes(F)) { - return 0; - } - (G >= "a" && G <= "z" || G >= "A" && G <= "Z") && C.push(F); - D.push(p(F, B)); - C.pop(); - } - } - } - } - } - } - } - return D[0]; - }; - d.a = { - render: function u(v, w, x) { - var y = arguments.length > 3 && undefined !== arguments[3] ? arguments[3] : []; - if ("=" === v[0]) { - var z = m(v.substring(1)); - return z.length <= 0 ? v : q(z, w, function (A, B) { - return u(x(A, B), w, x, y); - }, y); - } - return v; - } - }; - }, function (a, b) { - var c; - c = function () { - return this; - }(); - try { - c = c || new Function("return this")(); - } catch (d) { - "object" == typeof window && (c = window); - } - a.exports = c; - }, function (a, b) { - a.exports = function (c) { - if (Array.isArray(c)) { - return c; - } - }; - a.exports.__esModule = true; - a.exports.default = a.exports; - }, function (a, b) { - a.exports = function (c, d) { - (null == d || d > c.length) && (d = c.length); - for (var f = 0, g = Array(d); f < d; f++) { - g[f] = c[f]; - } - return g; - }; - a.exports.__esModule = true; - a.exports.default = a.exports; - }, function (a, b) { - a.exports = function () { - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - }; - a.exports.__esModule = true; - a.exports.default = a.exports; - }, function (a, b) { - a.exports = function (c) { - if ("undefined" != typeof Symbol && null != c[Symbol.iterator] || null != c["@@iterator"]) { - return Array.from(c); - } - }; - a.exports.__esModule = true; - a.exports.default = a.exports; - }, function (a, b) {}, function (a, b, c) { - var d = c(11).default; - function f() { - "use strict"; - - a.exports = f = function () { - return z; - }; - a.exports.__esModule = true; - a.exports.default = a.exports; - var q; - var z = { - wrap: N, - isGeneratorFunction: function (ad) { - var ae = "function" == typeof ad && ad.constructor; - return !!ae && (ae === Y || "GeneratorFunction" === (ae.displayName || ae.name)); - }, - mark: function (ad) { - Object.setPrototypeOf ? Object.setPrototypeOf(ad, Z) : (ad.__proto__ = Z, L(ad, K, "GeneratorFunction")); - ad.prototype = Object.create(a3); - return ad; - }, - awrap: function (ad) { - return { - __await: ad - }; - }, - AsyncIterator: a5, - async: function (ad, ae, af, ag, ah) { - undefined === ah && (ah = Promise); - var ai = new a5(N(ad, ae, af, ag), ah); - return z.isGeneratorFunction(ae) ? ai : ai.next().then(function (aj) { - return aj.done ? aj.value : ai.next(); - }); - } - }; - var B = Object.prototype; - var F = B.hasOwnProperty; - var G = Object.defineProperty || function (ac, ad, ae) { - ac[ad] = ae.value; - }; - var H = "function" == typeof Symbol ? Symbol : {}; - var I = H.iterator || "@@iterator"; - var J = H.asyncIterator || "@@asyncIterator"; - var K = H.toStringTag || "@@toStringTag"; - function L(ac, ad, ae) { - Object.defineProperty(ac, ad, { - value: ae, - enumerable: true, - configurable: true, - writable: true - }); - return ac[ad]; - } - try { - L({}, ""); - } catch (ac) { - L = function (ad, ae, af) { - return ad[ae] = af; - }; - } - function N(ad, ae, af, ag) { - var ah = ae && ae.prototype instanceof X ? ae : X; - var ai = Object.create(ah.prototype); - var aj = new aa(ag || []); - G(ai, "_invoke", { - value: a6(ad, af, aj) - }); - return ai; - } - function P(ad, ae, af) { - try { - return { - type: "normal", - arg: ad.call(ae, af) - }; - } catch (ag) { - return { - type: "throw", - arg: ag - }; - } - } - var Q = "suspendedStart"; - var U = "executing"; - var V = "completed"; - var W = {}; - function X() {} - function Y() {} - function Z() {} - var a0 = {}; - L(a0, I, function () { - return this; - }); - var a1 = Object.getPrototypeOf; - var a2 = a1 && a1(a1(ab([]))); - a2 && a2 !== B && F.call(a2, I) && (a0 = a2); - Z.prototype = X.prototype = Object.create(a0); - var a3 = Z.prototype; - function a4(ad) { - ["next", "throw", "return"].forEach(function (ae) { - L(ad, ae, function (af) { - return this._invoke(ae, af); - }); - }); - } - function a5(ad, ae) { - function af(ah, ai, aj, ak) { - var al = P(ad[ah], ad, ai); - if ("throw" !== al.type) { - var am = al.arg; - var an = am.value; - return an && "object" == d(an) && F.call(an, "__await") ? ae.resolve(an.__await).then(function (ao) { - af("next", ao, aj, ak); - }, function (ao) { - af("throw", ao, aj, ak); - }) : ae.resolve(an).then(function (ao) { - am.value = ao; - aj(am); - }, function (ao) { - return af("throw", ao, aj, ak); - }); - } - ak(al.arg); - } - var ag; - G(this, "_invoke", { - value: function (ah, ai) { - function aj() { - return new ae(function (ak, al) { - af(ah, ai, ak, al); - }); - } - return ag = ag ? ag.then(aj, aj) : aj(); - } - }); - } - function a6(ad, ae, af) { - var ag = Q; - return function (ah, ai) { - if (ag === U) { - throw Error("Generator is already running"); - } - if (ag === V) { - if ("throw" === ah) { - throw ai; - } - return { - value: q, - done: true - }; - } - for (af.method = ah, af.arg = ai;;) { - var aj = af.delegate; - if (aj) { - var ak = a7(aj, af); - if (ak) { - if (ak === W) { - continue; - } - return ak; - } - } - if ("next" === af.method) { - af.sent = af._sent = af.arg; - } else { - if ("throw" === af.method) { - if (ag === Q) { - throw ag = V, af.arg; - } - af.dispatchException(af.arg); - } else { - "return" === af.method && af.abrupt("return", af.arg); - } - } - ag = U; - var al = P(ad, ae, af); - if ("normal" === al.type) { - if (ag = af.done ? V : "suspendedYield", al.arg === W) { - continue; - } - return { - value: al.arg, - done: af.done - }; - } - "throw" === al.type && (ag = V, af.method = "throw", af.arg = al.arg); - } - }; - } - function a7(ad, ae) { - var af = ae.method; - var ag = ad.iterator[af]; - if (ag === q) { - ae.delegate = null; - "throw" === af && ad.iterator.return && (ae.method = "return", ae.arg = q, a7(ad, ae), "throw" === ae.method) || "return" !== af && (ae.method = "throw", ae.arg = new TypeError("The iterator does not provide a '" + af + "' method")); - return W; - } - var ah = P(ag, ad.iterator, ae.arg); - if ("throw" === ah.type) { - ae.method = "throw"; - ae.arg = ah.arg; - ae.delegate = null; - return W; - } - var ai = ah.arg; - return ai ? ai.done ? (ae[ad.resultName] = ai.value, ae.next = ad.nextLoc, "return" !== ae.method && (ae.method = "next", ae.arg = q), ae.delegate = null, W) : ai : (ae.method = "throw", ae.arg = new TypeError("iterator result is not an object"), ae.delegate = null, W); - } - function a8(ad) { - var ae = { - tryLoc: ad[0] - }; - 1 in ad && (ae.catchLoc = ad[1]); - 2 in ad && (ae.finallyLoc = ad[2], ae.afterLoc = ad[3]); - this.tryEntries.push(ae); - } - function a9(ad) { - var ae = ad.completion || {}; - ae.type = "normal"; - delete ae.arg; - ad.completion = ae; - } - function aa(ad) { - this.tryEntries = [{ - tryLoc: "root" - }]; - ad.forEach(a8, this); - this.reset(true); - } - function ab(ad) { - if (ad || "" === ad) { - var ae = ad[I]; - if (ae) { - return ae.call(ad); - } - if ("function" == typeof ad.next) { - return ad; - } - if (!isNaN(ad.length)) { - var af = -1; - var ag = function ah() { - for (; ++af < ad.length;) { - if (F.call(ad, af)) { - ah.value = ad[af]; - ah.done = false; - return ah; - } - } - ah.value = q; - ah.done = true; - return ah; - }; - return ag.next = ag; - } - } - throw new TypeError(d(ad) + " is not iterable"); - } - Y.prototype = Z; - G(a3, "constructor", { - value: Z, - configurable: true - }); - G(Z, "constructor", { - value: Y, - configurable: true - }); - Y.displayName = L(Z, K, "GeneratorFunction"); - a4(a5.prototype); - L(a5.prototype, J, function () { - return this; - }); - a4(a3); - L(a3, K, "Generator"); - L(a3, I, function () { - return this; - }); - L(a3, "toString", function () { - return "[object Generator]"; - }); - z.keys = function (ad) { - var ae = Object(ad); - var af = []; - for (var ag in ae) af.push(ag); - af.reverse(); - return function ah() { - for (; af.length;) { - var ai = af.pop(); - if (ai in ae) { - ah.value = ai; - ah.done = false; - return ah; - } - } - ah.done = true; - return ah; - }; - }; - z.values = ab; - aa.prototype = { - constructor: aa, - reset: function (ad) { - if (this.prev = 0, this.next = 0, this.sent = this._sent = q, this.done = false, this.delegate = null, this.method = "next", this.arg = q, this.tryEntries.forEach(a9), !ad) { - for (var ae in this) "t" === ae.charAt(0) && F.call(this, ae) && !isNaN(+ae.slice(1)) && (this[ae] = q); - } - }, - stop: function () { - this.done = true; - var ad = this.tryEntries[0].completion; - if ("throw" === ad.type) { - throw ad.arg; - } - return this.rval; - }, - dispatchException: function (ad) { - if (this.done) { - throw ad; - } - var ae = this; - function af(al, am) { - ai.type = "throw"; - ai.arg = ad; - ae.next = al; - am && (ae.method = "next", ae.arg = q); - return !!am; - } - for (var ag = this.tryEntries.length - 1; ag >= 0; --ag) { - var ah = this.tryEntries[ag]; - var ai = ah.completion; - if ("root" === ah.tryLoc) { - return af("end"); - } - if (ah.tryLoc <= this.prev) { - var aj = F.call(ah, "catchLoc"); - var ak = F.call(ah, "finallyLoc"); - if (aj && ak) { - if (this.prev < ah.catchLoc) { - return af(ah.catchLoc, true); - } - if (this.prev < ah.finallyLoc) { - return af(ah.finallyLoc); - } - } else { - if (aj) { - if (this.prev < ah.catchLoc) { - return af(ah.catchLoc, true); - } - } else { - if (!ak) { - throw Error("try statement without catch or finally"); - } - if (this.prev < ah.finallyLoc) { - return af(ah.finallyLoc); - } - } - } - } - } - }, - abrupt: function (ad, ae) { - for (var af = this.tryEntries.length - 1; af >= 0; --af) { - var ag = this.tryEntries[af]; - if (ag.tryLoc <= this.prev && F.call(ag, "finallyLoc") && this.prev < ag.finallyLoc) { - var ah = ag; - break; - } - } - ah && ("break" === ad || "continue" === ad) && ah.tryLoc <= ae && ae <= ah.finallyLoc && (ah = null); - var ai = ah ? ah.completion : {}; - ai.type = ad; - ai.arg = ae; - return ah ? (this.method = "next", this.next = ah.finallyLoc, W) : this.complete(ai); - }, - complete: function (ad, ae) { - if ("throw" === ad.type) { - throw ad.arg; - } - "break" === ad.type || "continue" === ad.type ? this.next = ad.arg : "return" === ad.type ? (this.rval = this.arg = ad.arg, this.method = "return", this.next = "end") : "normal" === ad.type && ae && (this.next = ae); - return W; - }, - finish: function (ad) { - for (var ae = this.tryEntries.length - 1; ae >= 0; --ae) { - var af = this.tryEntries[ae]; - if (af.finallyLoc === ad) { - this.complete(af.completion, af.afterLoc); - a9(af); - return W; - } - } - }, - catch: function (ad) { - for (var ae = this.tryEntries.length - 1; ae >= 0; --ae) { - var af = this.tryEntries[ae]; - if (af.tryLoc === ad) { - var ag = af.completion; - if ("throw" === ag.type) { - var ah = ag.arg; - a9(af); - } - return ah; - } - } - throw Error("illegal catch attempt"); - }, - delegateYield: function (ad, ae, af) { - this.delegate = { - iterator: ab(ad), - resultName: ae, - nextLoc: af - }; - "next" === this.method && (this.arg = q); - return W; - } - }; - return z; - } - a.exports = f; - a.exports.__esModule = true; - a.exports.default = a.exports; - }, function (b, d, f) { - "use strict"; - - var g; - function h(w, x, y) { - x in w ? Object.defineProperty(w, x, { - value: y, - enumerable: true, - configurable: true, - writable: true - }) : w[x] = y; - return w; - } - Object.defineProperty(d, "__esModule", { - value: true - }); - d.SET_A = 0; - var j = d.SET_A; - d.SET_B = 1; - var k = d.SET_B; - d.SET_C = 2; - var m = d.SET_C; - d.SHIFT = 98; - d.START_A = 103; - var p = d.START_A; - d.START_B = 104; - var q = d.START_B; - d.START_C = 105; - var v = d.START_C; - d.MODULO = 103; - d.STOP = 106; - d.FNC1 = 207; - d.SET_BY_CODE = (h(g = {}, p, j), h(g, q, k), h(g, v, m), g); - d.SWAP = { - 101: j, - 100: k, - 99: m - }; - d.A_START_CHAR = String.fromCharCode(208); - d.B_START_CHAR = String.fromCharCode(209); - d.C_START_CHAR = String.fromCharCode(210); - d.A_CHARS = "[\0-_È-Ï]"; - d.B_CHARS = "[ -È-Ï]"; - d.C_CHARS = "(Ï*[0-9]{2}Ï*)"; - d.BARS = [11011001100, 11001101100, 11001100110, 10010011000, 10010001100, 10001001100, 10011001000, 10011000100, 10001100100, 11001001000, 11001000100, 11000100100, 10110011100, 10011011100, 10011001110, 10111001100, 10011101100, 10011100110, 11001110010, 11001011100, 11001001110, 11011100100, 11001110100, 11101101110, 11101001100, 11100101100, 11100100110, 11101100100, 11100110100, 11100110010, 11011011000, 11011000110, 11000110110, 10100011000, 10001011000, 10001000110, 10110001000, 10001101000, 10001100010, 11010001000, 11000101000, 11000100010, 10110111000, 10110001110, 10001101110, 10111011000, 10111000110, 10001110110, 11101110110, 11010001110, 11000101110, 11011101000, 11011100010, 11011101110, 11101011000, 11101000110, 11100010110, 11101101000, 11101100010, 11100011010, 11101111010, 11001000010, 11110001010, 10100110000, 10100001100, 10010110000, 10010000110, 10000101100, 10000100110, 10110010000, 10110000100, 10011010000, 10011000010, 10000110100, 10000110010, 11000010010, 11001010000, 11110111010, 11000010100, 10001111010, 10100111100, 10010111100, 10010011110, 10111100100, 10011110100, 10011110010, 11110100100, 11110010100, 11110010010, 11011011110, 11011110110, 11110110110, 10101111000, 10100011110, 10001011110, 10111101000, 10111100010, 11110101000, 11110100010, 10111011110, 10111101110, 11101011110, 11110101110, 11010000100, 11010010000, 11010011100, 1100011101011]; - }, function (a, b, c) { - "use strict"; - - Object.defineProperty(b, "__esModule", { - value: true - }); - b.SIDE_BIN = "101"; - b.MIDDLE_BIN = "01010"; - b.BINARIES = { - L: ["0001101", "0011001", "0010011", "0111101", "0100011", "0110001", "0101111", "0111011", "0110111", "0001011"], - G: ["0100111", "0110011", "0011011", "0100001", "0011101", "0111001", "0000101", "0010001", "0001001", "0010111"], - R: ["1110010", "1100110", "1101100", "1000010", "1011100", "1001110", "1010000", "1000100", "1001000", "1110100"], - O: ["0001101", "0011001", "0010011", "0111101", "0100011", "0110001", "0101111", "0111011", "0110111", "0001011"], - E: ["0100111", "0110011", "0011011", "0100001", "0011101", "0111001", "0000101", "0010001", "0001001", "0010111"] - }; - b.EAN2_STRUCTURE = ["LL", "LG", "GL", "GG"]; - b.EAN5_STRUCTURE = ["GGLLL", "GLGLL", "GLLGL", "GLLLG", "LGGLL", "LLGGL", "LLLGG", "LGLGL", "LGLLG", "LLGLG"]; - b.EAN13_STRUCTURE = ["LLLLLL", "LLGLGG", "LLGGLG", "LLGGGL", "LGLLGG", "LGGLLG", "LGGGLL", "LGLGLG", "LGLGGL", "LGGLGL"]; - }, function (a, b, c) { - "use strict"; - - Object.defineProperty(b, "__esModule", { - value: true - }); - var d = c(48); - b.default = function (f, g, h) { - var j = f.split("").map(function (l, m) { - return d.BINARIES[g[m]]; - }).map(function (l, m) { - return l ? l[f[m]] : ""; - }); - if (h) { - var k = f.length - 1; - j = j.map(function (l, m) { - return m < k ? l + h : l; - }); - } - return j.join(""); - }; - }, function (b, c, d) { - "use strict"; - - Object.defineProperty(c, "__esModule", { - value: true - }); - var f; - var g = function () { - function l(m, p) { - for (var q = 0; q < p.length; q++) { - var u = p[q]; - u.enumerable = u.enumerable || false; - u.configurable = true; - "value" in u && (u.writable = true); - Object.defineProperty(m, u.key, u); - } - } - return function (m, p, q) { - p && l(m.prototype, p); - q && l(m, q); - return m; - }; - }(); - var h = d(27); - var j = function (l) { - function m(p, q) { - (function (u, v) { - if (!(u instanceof v)) { - throw new TypeError("Cannot call a class as a function"); - } - })(this, m); - return function (u, v) { - if (!u) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - return !v || "object" != typeof v && "function" != typeof v ? u : v; - }(this, (m.__proto__ || Object.getPrototypeOf(m)).call(this, p, q)); - } - (function (p, q) { - if ("function" != typeof q && null !== q) { - throw new TypeError("Super expression must either be null or a function, not " + typeof q); - } - p.prototype = Object.create(q && q.prototype, { - constructor: { - value: p, - enumerable: false, - writable: true, - configurable: true - } - }); - q && (Object.setPrototypeOf ? Object.setPrototypeOf(p, q) : p.__proto__ = q); - })(m, l); - g(m, [{ - key: "encode", - value: function () { - for (var p = "110", q = 0; q < this.data.length; q++) { - var u = parseInt(this.data[q]).toString(2); - u = k(u, 4 - u.length); - for (var v = 0; v < u.length; v++) { - p += "0" == u[v] ? "100" : "110"; - } - } - return { - data: p += "1001", - text: this.text - }; - } - }, { - key: "valid", - value: function () { - return -1 !== this.data.search(/^[0-9]+$/); - } - }]); - return m; - }(((f = h) && f.__esModule ? f : { - default: f - }).default); - function k(l, m) { - for (var p = 0; p < m; p++) { - l = "0" + l; - } - return l; - } - c.default = j; - }, function (j, q, z) { - "use strict"; - - z.d(q, "a", function () { - return U; - }); - var A = z(1); - var B = z.n(A); - var C = z(2); - var D = z.n(C); - var E = z(6); - var F = z.n(E); - var G = z(3); - var H = z.n(G); - var I = z(5); - var J = z.n(I); - var K = z(20); - var L = z(9); - var M = z.n(L); - var N = z(21); - var O = z(0); - var P = z(19); - var Q = z(4); - function R(V, W, X) { - W = H()(W); - return F()(V, function () { - try { - var Y = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (Z) {} - return function () { - return !!Y; - }(); - }() ? Reflect.construct(W, X || [], H()(V).constructor) : W.apply(V, X)); - } - var S = function (V) { - function W() { - var X; - B()(this, W); - var Y = P.a.map(function (Z) { - return Object(O.c)("div", "".concat(Q.a, "-item")).on("click", function () { - X.setTitle(Z.title); - X.change(Z); - }).child(Z.title); - }); - return X = R(this, W, [P.a[0].title, "160px", true, "bottom-left"].concat(M()(Y))); - } - J()(W, V); - return D()(W); - }(N.a); - function T(V, W, X) { - W = H()(W); - return F()(V, function () { - try { - var Y = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (Z) {} - return function () { - return !!Y; - }(); - }() ? Reflect.construct(W, X || [], H()(V).constructor) : W.apply(V, X)); - } - var U = function (V) { - function W() { - B()(this, W); - return T(this, W, ["font-name"]); - } - J()(W, V); - return D()(W, [{ - key: "getValue", - value: function (X) { - return X.key; - } - }, { - key: "dropdown", - value: function () { - return new S(); - } - }]); - }(K.a); - }, function (a, b, c) { - (function (g) { - var j = /^\s+|\s+$/g; - var k = /^[-+]0x[0-9a-f]+$/i; - var m = /^0b[01]+$/i; - var q = /^0o[0-7]+$/i; - var w = parseInt; - var x = "object" == typeof g && g && g.Object === Object && g; - var y = "object" == typeof self && self && self.Object === Object && self; - var z = x || y || Function("return this")(); - var A = Object.prototype.toString; - var B = Math.max; - var C = Math.min; - var D = function () { - return z.Date.now(); - }; - function E(G) { - var H = typeof G; - return !!G && ("object" == H || "function" == H); - } - function F(G) { - if ("number" == typeof G) { - return G; - } - if (function (J) { - return "symbol" == typeof J || function (K) { - return !!K && "object" == typeof K; - }(J) && "[object Symbol]" == A.call(J); - }(G)) { - return NaN; - } - if (E(G)) { - var H = "function" == typeof G.valueOf ? G.valueOf() : G; - G = E(H) ? H + "" : H; - } - if ("string" != typeof G) { - return 0 === G ? G : +G; - } - G = G.replace(j, ""); - var I = m.test(G); - return I || q.test(G) ? w(G.slice(2), I ? 2 : 8) : k.test(G) ? NaN : +G; - } - a.exports = function (G, H, I) { - var J; - var K; - var L; - var M; - var N; - var O; - var P = 0; - var Q = false; - var R = false; - var S = true; - if ("function" != typeof G) { - throw new TypeError("Expected a function"); - } - function T(Z) { - var a0 = J; - var a1 = K; - J = K = undefined; - P = Z; - return M = G.apply(a1, a0); - } - function U(Z) { - P = Z; - N = setTimeout(W, H); - return Q ? T(Z) : M; - } - function V(Z) { - var a0 = Z - O; - return undefined === O || a0 >= H || a0 < 0 || R && Z - P >= L; - } - function W() { - var Z = D(); - if (V(Z)) { - return X(Z); - } - N = setTimeout(W, function (a0) { - var a1 = H - (a0 - O); - return R ? C(a1, L - (a0 - P)) : a1; - }(Z)); - } - function X(Z) { - N = undefined; - return S && J ? T(Z) : (J = K = undefined, M); - } - function Y() { - var Z = D(); - var a0 = V(Z); - if (J = arguments, K = this, O = Z, a0) { - if (undefined === N) { - return U(O); - } - if (R) { - N = setTimeout(W, H); - return T(O); - } - } - undefined === N && (N = setTimeout(W, H)); - return M; - } - H = F(H) || 0; - E(I) && (Q = !!I.leading, L = (R = "maxWait" in I) ? B(F(I.maxWait) || 0, H) : L, S = "trailing" in I ? !!I.trailing : S); - Y.cancel = function () { - undefined !== N && clearTimeout(N); - P = 0; - J = O = K = N = undefined; - }; - Y.flush = function () { - return undefined === N ? M : X(D()); - }; - return Y; - }; - }).call(this, c(40)); - }, function (a, b, c) { - "undefined" != typeof self && self; - a.exports = function () { - "use strict"; - - var d = { - 3976: function (i, j) { - Object.defineProperty(j, "__esModule", { - value: true - }); - j.default = undefined; - j.default = { - _maxTestPos: 500, - placeholder: "_", - optionalmarker: ["[", "]"], - quantifiermarker: ["{", "}"], - groupmarker: ["(", ")"], - alternatormarker: "|", - escapeChar: "\\", - mask: null, - regex: null, - oncomplete: function () {}, - onincomplete: function () {}, - oncleared: function () {}, - repeat: 0, - greedy: false, - autoUnmask: false, - removeMaskOnSubmit: false, - clearMaskOnLostFocus: true, - insertMode: true, - insertModeVisual: true, - clearIncomplete: false, - alias: null, - onKeyDown: function () {}, - onBeforeMask: null, - onBeforePaste: function (k, l) { - return "function" == typeof l.onBeforeMask ? l.onBeforeMask.call(this, k, l) : k; - }, - onBeforeWrite: null, - onUnMask: null, - showMaskOnFocus: true, - showMaskOnHover: true, - onKeyValidation: function () {}, - skipOptionalPartCharacter: " ", - numericInput: false, - rightAlign: false, - undoOnEscape: true, - radixPoint: "", - _radixDance: false, - groupSeparator: "", - keepStatic: null, - positionCaretOnTab: true, - tabThrough: false, - supportsInputType: ["text", "tel", "url", "password", "search"], - isComplete: null, - preValidation: null, - postValidation: null, - staticDefinitionSymbol: undefined, - jitMasking: false, - nullable: true, - inputEventOnly: false, - noValuePatching: false, - positionCaretOnClick: "lvp", - casing: null, - inputmode: "text", - importDataAttributes: true, - shiftPositions: true, - usePrototypeDefinitions: true, - validationEventTimeOut: 3000, - substitutes: {} - }; - }, - 7392: function (i, j) { - Object.defineProperty(j, "__esModule", { - value: true - }); - j.default = undefined; - j.default = { - 9: { - validator: "[0-90-9]", - definitionSymbol: "*" - }, - a: { - validator: "[A-Za-zА-яЁёÀ-ÿµ]", - definitionSymbol: "*" - }, - "*": { - validator: "[0-90-9A-Za-zА-яЁёÀ-ÿµ]" - } - }; - }, - 253: function (i, j) { - Object.defineProperty(j, "__esModule", { - value: true - }); - j.default = function (k, l, m) { - if (undefined === m) { - return k.__data ? k.__data[l] : null; - } - k.__data = k.__data || {}; - k.__data[l] = m; - }; - }, - 3776: function (j, k, m) { - Object.defineProperty(k, "__esModule", { - value: true - }); - k.Event = undefined; - k.off = function (C, D) { - var E; - var F; - A(this[0]) && C && (E = this[0].eventRegistry, F = this[0], C.split(" ").forEach(function (G) { - var H = w(G.split("."), 2); - (function (I, J) { - var K; - var L; - var M = []; - if (I.length > 0) { - if (undefined === D) { - for (K = 0, L = E[I][J].length; K < L; K++) { - M.push({ - ev: I, - namespace: J && J.length > 0 ? J : "global", - handler: E[I][J][K] - }); - } - } else { - M.push({ - ev: I, - namespace: J && J.length > 0 ? J : "global", - handler: D - }); - } - } else { - if (J.length > 0) { - for (var N in E) for (var O in E[N]) if (O === J) { - if (undefined === D) { - for (K = 0, L = E[N][O].length; K < L; K++) { - M.push({ - ev: N, - namespace: O, - handler: E[N][O][K] - }); - } - } else { - M.push({ - ev: N, - namespace: O, - handler: D - }); - } - } - } - } - return M; - })(H[0], H[1]).forEach(function (I) { - var J = I.ev; - var K = I.handler; - !function (L, M, N) { - if (L in E == 1) { - if (F.removeEventListener ? F.removeEventListener(L, N, false) : F.detachEvent && F.detachEvent("on".concat(L), N), "global" === M) { - for (var O in E[L]) E[L][O].splice(E[L][O].indexOf(N), 1); - } else { - E[L][M].splice(E[L][M].indexOf(N), 1); - } - } - }(J, I.namespace, K); - }); - })); - return this; - }; - k.on = function (C, D) { - if (A(this[0])) { - var E = this[0].eventRegistry; - var F = this[0]; - C.split(" ").forEach(function (G) { - var H = w(G.split("."), 2); - var I = H[0]; - var J = H[1]; - !function (K, L) { - F.addEventListener ? F.addEventListener(K, D, false) : F.attachEvent && F.attachEvent("on".concat(K), D); - E[K] = E[K] || {}; - E[K][L] = E[K][L] || []; - E[K][L].push(D); - }(I, undefined === J ? "global" : J); - }); - } - return this; - }; - k.trigger = function (C) { - var D = arguments; - if (A(this[0])) { - for (var E = this[0].eventRegistry, F = this[0], G = "string" == typeof C ? C.split(" ") : [C.type], H = 0; H < G.length; H++) { - var I = G[H].split("."); - var J = I[0]; - var K = I[1] || "global"; - if (undefined !== z && "global" === K) { - var L; - var M = { - bubbles: true, - cancelable: true, - composed: true, - detail: arguments[1] - }; - if (z.createEvent) { - try { - "input" === J ? (M.inputType = "insertText", L = new InputEvent(J, M)) : L = new CustomEvent(J, M); - } catch (O) { - (L = z.createEvent("CustomEvent")).initCustomEvent(J, M.bubbles, M.cancelable, M.detail); - } - C.type && (0, q.default)(L, C); - F.dispatchEvent(L); - } else { - (L = z.createEventObject()).eventType = J; - L.detail = arguments[1]; - C.type && (0, q.default)(L, C); - F.fireEvent("on" + L.eventType, L); - } - } else { - if (undefined !== E[J]) { - arguments[0] = arguments[0].type ? arguments[0] : v.default.Event(arguments[0]); - arguments[0].detail = arguments.slice(1); - var N = E[J]; - ("global" === K ? Object.values(N).flat() : N[K]).forEach(function (P) { - return P.apply(F, D); - }); - } - } - } - } - return this; - }; - var p = y(m(9380)); - var q = y(m(600)); - var v = y(m(4963)); - function w(C, D) { - return function (E) { - if (Array.isArray(E)) { - return E; - } - }(C) || function (E, F) { - var G = null == E ? null : "undefined" != typeof Symbol && E[Symbol.iterator] || E["@@iterator"]; - if (null != G) { - var H; - var I; - var J; - var K; - var L = []; - var M = true; - var N = false; - try { - if (J = (G = G.call(E)).next, 0 === F) { - if (Object(G) !== G) { - return; - } - M = false; - } else { - for (; !(M = (H = J.call(G)).done) && (L.push(H.value), L.length !== F); M = true) {} - } - } catch (O) { - N = true; - I = O; - } finally { - try { - if (!M && null != G.return && (K = G.return(), Object(K) !== K)) { - return; - } - } finally { - if (N) { - throw I; - } - } - } - return L; - } - }(C, D) || function (E, F) { - if (E) { - if ("string" == typeof E) { - return x(E, F); - } - var G = Object.prototype.toString.call(E).slice(8, -1); - "Object" === G && E.constructor && (G = E.constructor.name); - return "Map" === G || "Set" === G ? Array.from(E) : "Arguments" === G || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(G) ? x(E, F) : undefined; - } - }(C, D) || function () { - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - }(); - } - function x(C, D) { - (null == D || D > C.length) && (D = C.length); - for (var E = 0, F = new Array(D); E < D; E++) { - F[E] = C[E]; - } - return F; - } - function y(C) { - return C && C.__esModule ? C : { - default: C - }; - } - var z = p.default.document; - function A(C) { - return C instanceof Element; - } - k.Event = undefined; - var B = k.Event; - "function" == typeof p.default.CustomEvent ? k.Event = B = p.default.CustomEvent : p.default.Event && z && z.createEvent ? (k.Event = B = function (C, D) { - D = D || { - bubbles: false, - cancelable: false, - composed: true, - detail: undefined - }; - var E = z.createEvent("CustomEvent"); - E.initCustomEvent(C, D.bubbles, D.cancelable, D.detail); - return E; - }, B.prototype = p.default.Event.prototype) : "undefined" != typeof Event && (k.Event = B = Event); - }, - 600: function (i, j) { - function k(l) { - return (k = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (m) { - return typeof m; - } : function (m) { - return m && "function" == typeof Symbol && m.constructor === Symbol && m !== Symbol.prototype ? "symbol" : typeof m; - })(l); - } - Object.defineProperty(j, "__esModule", { - value: true - }); - j.default = function l() { - var m; - var p; - var q; - var v; - var w; - var x; - var y = arguments[0] || {}; - var z = 1; - var A = arguments.length; - var B = false; - for ("boolean" == typeof y && (B = y, y = arguments[z] || {}, z++), "object" !== k(y) && "function" != typeof y && (y = {}); z < A; z++) { - if (null != (m = arguments[z])) { - for (p in m) q = y[p], y !== (v = m[p]) && (B && v && ("[object Object]" === Object.prototype.toString.call(v) || (w = Array.isArray(v))) ? (w ? (w = false, x = q && Array.isArray(q) ? q : []) : x = q && "[object Object]" === Object.prototype.toString.call(q) ? q : {}, y[p] = l(B, x, v)) : undefined !== v && (y[p] = v)); - } - } - return y; - }; - }, - 4963: function (j, k, m) { - Object.defineProperty(k, "__esModule", { - value: true - }); - k.default = undefined; - var p = w(m(9380)); - var q = w(m(253)); - var u = m(3776); - var v = w(m(600)); - function w(z) { - return z && z.__esModule ? z : { - default: z - }; - } - var x = p.default.document; - function y(z) { - return z instanceof y ? z : this instanceof y ? void (null != z && z !== p.default && (this[0] = z.nodeName ? z : undefined !== z[0] && z[0].nodeName ? z[0] : x.querySelector(z), undefined !== this[0] && null !== this[0] && (this[0].eventRegistry = this[0].eventRegistry || {}))) : new y(z); - } - y.prototype = { - on: u.on, - off: u.off, - trigger: u.trigger - }; - y.extend = v.default; - y.data = q.default; - y.Event = u.Event; - k.default = y; - }, - 9845: function (j, k, l) { - Object.defineProperty(k, "__esModule", { - value: true - }); - k.mobile = k.iphone = k.ie = undefined; - var m; - var p = (m = l(9380)) && m.__esModule ? m : { - default: m - }; - var q = p.default.navigator && p.default.navigator.userAgent || ""; - k.ie = q.indexOf("MSIE ") > 0 || q.indexOf("Trident/") > 0; - k.mobile = p.default.navigator && p.default.navigator.userAgentData && p.default.navigator.userAgentData.mobile || p.default.navigator && p.default.navigator.maxTouchPoints || "ontouchstart" in p.default; - k.iphone = /iphone/i.test(q); - }, - 7184: function (i, j) { - Object.defineProperty(j, "__esModule", { - value: true - }); - j.default = function (l) { - return l.replace(k, "\\$1"); - }; - var k = new RegExp("(\\" + ["/", ".", "*", "+", "?", "|", "(", ")", "[", "]", "{", "}", "\\", "$", "^"].join("|\\") + ")", "gim"); - }, - 6030: function (j, k, q) { - function w(N) { - return (w = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (O) { - return typeof O; - } : function (O) { - return O && "function" == typeof Symbol && O.constructor === Symbol && O !== Symbol.prototype ? "symbol" : typeof O; - })(N); - } - Object.defineProperty(k, "__esModule", { - value: true - }); - k.EventHandlers = undefined; - var x; - var z = q(9845); - var A = (x = q(9380)) && x.__esModule ? x : { - default: x - }; - var B = q(7760); - var C = q(2839); - var D = q(8711); - var E = q(7215); - var F = q(4713); - function G() { - G = function () { - return P; - }; - var N; - var P = { - wrap: a0, - isGeneratorFunction: function (am) { - var an = "function" == typeof am && am.constructor; - return !!an && (an === a7 || "GeneratorFunction" === (an.displayName || an.name)); - }, - mark: function (am) { - Object.setPrototypeOf ? Object.setPrototypeOf(am, a8) : (am.__proto__ = a8, Z(am, Y, "GeneratorFunction")); - am.prototype = Object.create(ac); - return am; - }, - awrap: function (am) { - return { - __await: am - }; - }, - AsyncIterator: ae, - async: function (am, an, ao, ap, aq) { - undefined === aq && (aq = Promise); - var ar = new ae(a0(am, an, ao, ap), aq); - return P.isGeneratorFunction(an) ? ar : ar.next().then(function (as) { - return as.done ? as.value : ar.next(); - }); - } - }; - var Q = Object.prototype; - var T = Q.hasOwnProperty; - var U = Object.defineProperty || function (al, am, an) { - al[am] = an.value; - }; - var V = "function" == typeof Symbol ? Symbol : {}; - var W = V.iterator || "@@iterator"; - var X = V.asyncIterator || "@@asyncIterator"; - var Y = V.toStringTag || "@@toStringTag"; - function Z(al, am, an) { - Object.defineProperty(al, am, { - value: an, - enumerable: true, - configurable: true, - writable: true - }); - return al[am]; - } - try { - Z({}, ""); - } catch (al) { - Z = function (am, an, ao) { - return am[an] = ao; - }; - } - function a0(am, an, ao, ap) { - var aq = an && an.prototype instanceof a6 ? an : a6; - var ar = Object.create(aq.prototype); - var as = new aj(ap || []); - U(ar, "_invoke", { - value: af(am, ao, as) - }); - return ar; - } - function a1(am, an, ao) { - try { - return { - type: "normal", - arg: am.call(an, ao) - }; - } catch (ap) { - return { - type: "throw", - arg: ap - }; - } - } - var a2 = "suspendedStart"; - var a3 = "executing"; - var a4 = "completed"; - var a5 = {}; - function a6() {} - function a7() {} - function a8() {} - var a9 = {}; - Z(a9, W, function () { - return this; - }); - var aa = Object.getPrototypeOf; - var ab = aa && aa(aa(ak([]))); - ab && ab !== Q && T.call(ab, W) && (a9 = ab); - a8.prototype = a6.prototype = Object.create(a9); - var ac = a8.prototype; - function ad(am) { - ["next", "throw", "return"].forEach(function (an) { - Z(am, an, function (ao) { - return this._invoke(an, ao); - }); - }); - } - function ae(am, an) { - function ao(aq, ar, as, at) { - var au = a1(am[aq], am, ar); - if ("throw" !== au.type) { - var av = au.arg; - var aw = av.value; - return aw && "object" == w(aw) && T.call(aw, "__await") ? an.resolve(aw.__await).then(function (ax) { - ao("next", ax, as, at); - }, function (ax) { - ao("throw", ax, as, at); - }) : an.resolve(aw).then(function (ax) { - av.value = ax; - as(av); - }, function (ax) { - return ao("throw", ax, as, at); - }); - } - at(au.arg); - } - var ap; - U(this, "_invoke", { - value: function (aq, ar) { - function as() { - return new an(function (at, au) { - ao(aq, ar, at, au); - }); - } - return ap = ap ? ap.then(as, as) : as(); - } - }); - } - function af(am, an, ao) { - var ap = a2; - return function (aq, ar) { - if (ap === a3) { - throw new Error("Generator is already running"); - } - if (ap === a4) { - if ("throw" === aq) { - throw ar; - } - return { - value: N, - done: true - }; - } - for (ao.method = aq, ao.arg = ar;;) { - var as = ao.delegate; - if (as) { - var at = ag(as, ao); - if (at) { - if (at === a5) { - continue; - } - return at; - } - } - if ("next" === ao.method) { - ao.sent = ao._sent = ao.arg; - } else { - if ("throw" === ao.method) { - if (ap === a2) { - throw ap = a4, ao.arg; - } - ao.dispatchException(ao.arg); - } else { - "return" === ao.method && ao.abrupt("return", ao.arg); - } - } - ap = a3; - var au = a1(am, an, ao); - if ("normal" === au.type) { - if (ap = ao.done ? a4 : "suspendedYield", au.arg === a5) { - continue; - } - return { - value: au.arg, - done: ao.done - }; - } - "throw" === au.type && (ap = a4, ao.method = "throw", ao.arg = au.arg); - } - }; - } - function ag(am, an) { - var ao = an.method; - var ap = am.iterator[ao]; - if (ap === N) { - an.delegate = null; - "throw" === ao && am.iterator.return && (an.method = "return", an.arg = N, ag(am, an), "throw" === an.method) || "return" !== ao && (an.method = "throw", an.arg = new TypeError("The iterator does not provide a '" + ao + "' method")); - return a5; - } - var aq = a1(ap, am.iterator, an.arg); - if ("throw" === aq.type) { - an.method = "throw"; - an.arg = aq.arg; - an.delegate = null; - return a5; - } - var ar = aq.arg; - return ar ? ar.done ? (an[am.resultName] = ar.value, an.next = am.nextLoc, "return" !== an.method && (an.method = "next", an.arg = N), an.delegate = null, a5) : ar : (an.method = "throw", an.arg = new TypeError("iterator result is not an object"), an.delegate = null, a5); - } - function ah(am) { - var an = { - tryLoc: am[0] - }; - 1 in am && (an.catchLoc = am[1]); - 2 in am && (an.finallyLoc = am[2], an.afterLoc = am[3]); - this.tryEntries.push(an); - } - function ai(am) { - var an = am.completion || {}; - an.type = "normal"; - delete an.arg; - am.completion = an; - } - function aj(am) { - this.tryEntries = [{ - tryLoc: "root" - }]; - am.forEach(ah, this); - this.reset(true); - } - function ak(am) { - if (am || "" === am) { - var an = am[W]; - if (an) { - return an.call(am); - } - if ("function" == typeof am.next) { - return am; - } - if (!isNaN(am.length)) { - var ao = -1; - var ap = function aq() { - for (; ++ao < am.length;) { - if (T.call(am, ao)) { - aq.value = am[ao]; - aq.done = false; - return aq; - } - } - aq.value = N; - aq.done = true; - return aq; - }; - return ap.next = ap; - } - } - throw new TypeError(w(am) + " is not iterable"); - } - a7.prototype = a8; - U(ac, "constructor", { - value: a8, - configurable: true - }); - U(a8, "constructor", { - value: a7, - configurable: true - }); - a7.displayName = Z(a8, Y, "GeneratorFunction"); - ad(ae.prototype); - Z(ae.prototype, X, function () { - return this; - }); - ad(ac); - Z(ac, Y, "Generator"); - Z(ac, W, function () { - return this; - }); - Z(ac, "toString", function () { - return "[object Generator]"; - }); - P.keys = function (am) { - var an = Object(am); - var ao = []; - for (var ap in an) ao.push(ap); - ao.reverse(); - return function aq() { - for (; ao.length;) { - var ar = ao.pop(); - if (ar in an) { - aq.value = ar; - aq.done = false; - return aq; - } - } - aq.done = true; - return aq; - }; - }; - P.values = ak; - aj.prototype = { - constructor: aj, - reset: function (am) { - if (this.prev = 0, this.next = 0, this.sent = this._sent = N, this.done = false, this.delegate = null, this.method = "next", this.arg = N, this.tryEntries.forEach(ai), !am) { - for (var an in this) "t" === an.charAt(0) && T.call(this, an) && !isNaN(+an.slice(1)) && (this[an] = N); - } - }, - stop: function () { - this.done = true; - var am = this.tryEntries[0].completion; - if ("throw" === am.type) { - throw am.arg; - } - return this.rval; - }, - dispatchException: function (am) { - if (this.done) { - throw am; - } - var an = this; - function ao(au, av) { - ar.type = "throw"; - ar.arg = am; - an.next = au; - av && (an.method = "next", an.arg = N); - return !!av; - } - for (var ap = this.tryEntries.length - 1; ap >= 0; --ap) { - var aq = this.tryEntries[ap]; - var ar = aq.completion; - if ("root" === aq.tryLoc) { - return ao("end"); - } - if (aq.tryLoc <= this.prev) { - var as = T.call(aq, "catchLoc"); - var at = T.call(aq, "finallyLoc"); - if (as && at) { - if (this.prev < aq.catchLoc) { - return ao(aq.catchLoc, true); - } - if (this.prev < aq.finallyLoc) { - return ao(aq.finallyLoc); - } - } else { - if (as) { - if (this.prev < aq.catchLoc) { - return ao(aq.catchLoc, true); - } - } else { - if (!at) { - throw new Error("try statement without catch or finally"); - } - if (this.prev < aq.finallyLoc) { - return ao(aq.finallyLoc); - } - } - } - } - } - }, - abrupt: function (am, an) { - for (var ao = this.tryEntries.length - 1; ao >= 0; --ao) { - var ap = this.tryEntries[ao]; - if (ap.tryLoc <= this.prev && T.call(ap, "finallyLoc") && this.prev < ap.finallyLoc) { - var aq = ap; - break; - } - } - aq && ("break" === am || "continue" === am) && aq.tryLoc <= an && an <= aq.finallyLoc && (aq = null); - var ar = aq ? aq.completion : {}; - ar.type = am; - ar.arg = an; - return aq ? (this.method = "next", this.next = aq.finallyLoc, a5) : this.complete(ar); - }, - complete: function (am, an) { - if ("throw" === am.type) { - throw am.arg; - } - "break" === am.type || "continue" === am.type ? this.next = am.arg : "return" === am.type ? (this.rval = this.arg = am.arg, this.method = "return", this.next = "end") : "normal" === am.type && an && (this.next = an); - return a5; - }, - finish: function (am) { - for (var an = this.tryEntries.length - 1; an >= 0; --an) { - var ao = this.tryEntries[an]; - if (ao.finallyLoc === am) { - this.complete(ao.completion, ao.afterLoc); - ai(ao); - return a5; - } - } - }, - catch: function (am) { - for (var an = this.tryEntries.length - 1; an >= 0; --an) { - var ao = this.tryEntries[an]; - if (ao.tryLoc === am) { - var ap = ao.completion; - if ("throw" === ap.type) { - var aq = ap.arg; - ai(ao); - } - return aq; - } - } - throw new Error("illegal catch attempt"); - }, - delegateYield: function (am, an, ao) { - this.delegate = { - iterator: ak(am), - resultName: an, - nextLoc: ao - }; - "next" === this.method && (this.arg = N); - return a5; - } - }; - return P; - } - function H(N, O) { - var P = "undefined" != typeof Symbol && N[Symbol.iterator] || N["@@iterator"]; - if (!P) { - if (Array.isArray(N) || (P = function (V, W) { - if (V) { - if ("string" == typeof V) { - return I(V, W); - } - var X = Object.prototype.toString.call(V).slice(8, -1); - "Object" === X && V.constructor && (X = V.constructor.name); - return "Map" === X || "Set" === X ? Array.from(V) : "Arguments" === X || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(X) ? I(V, W) : undefined; - } - }(N)) || O && N && "number" == typeof N.length) { - P && (N = P); - var Q = 0; - var R = function () {}; - return { - s: R, - n: function () { - return Q >= N.length ? { - done: true - } : { - done: false, - value: N[Q++] - }; - }, - e: function (V) { - throw V; - }, - f: R - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - var S; - var T = true; - var U = false; - return { - s: function () { - P = P.call(N); - }, - n: function () { - var V = P.next(); - T = V.done; - return V; - }, - e: function (V) { - U = true; - S = V; - }, - f: function () { - try { - T || null == P.return || P.return(); - } finally { - if (U) { - throw S; - } - } - } - }; - } - function I(N, O) { - (null == O || O > N.length) && (O = N.length); - for (var P = 0, Q = new Array(O); P < O; P++) { - Q[P] = N[P]; - } - return Q; - } - function J(N, O, P, Q, R, S, T) { - try { - var U = N[S](T); - var V = U.value; - } catch (W) { - return void P(W); - } - U.done ? O(V) : Promise.resolve(V).then(Q, R); - } - var K; - var L; - k.EventHandlers = { - keyEvent: function (N, O, P, Q, R) { - var S = this.inputmask; - var T = S.opts; - var U = S.dependencyLib; - var V = S.maskset; - var W = this; - var X = U(W); - var Y = N.key; - var Z = D.caret.call(S, W); - var a0 = T.onKeyDown.call(this, N, D.getBuffer.call(S), Z, T); - if (undefined !== a0) { - return a0; - } - if (Y === C.keys.Backspace || Y === C.keys.Delete || z.iphone && Y === C.keys.BACKSPACE_SAFARI || N.ctrlKey && Y === C.keys.x && !("oncut" in W)) { - N.preventDefault(); - E.handleRemove.call(S, W, Y, Z); - (0, B.writeBuffer)(W, D.getBuffer.call(S, true), V.p, N, W.inputmask._valueGet() !== D.getBuffer.call(S).join("")); - } else { - if (Y === C.keys.End || Y === C.keys.PageDown) { - N.preventDefault(); - var a1 = D.seekNext.call(S, D.getLastValidPosition.call(S)); - D.caret.call(S, W, N.shiftKey ? Z.begin : a1, a1, true); - } else { - Y === C.keys.Home && !N.shiftKey || Y === C.keys.PageUp ? (N.preventDefault(), D.caret.call(S, W, 0, N.shiftKey ? Z.begin : 0, true)) : T.undoOnEscape && Y === C.keys.Escape && true !== N.altKey ? ((0, B.checkVal)(W, true, false, S.undoValue.split("")), X.trigger("click")) : Y !== C.keys.Insert || N.shiftKey || N.ctrlKey || undefined !== S.userOptions.insertMode ? true === T.tabThrough && Y === C.keys.Tab ? true === N.shiftKey ? (Z.end = D.seekPrevious.call(S, Z.end, true), true === F.getTest.call(S, Z.end - 1).match.static && Z.end--, Z.begin = D.seekPrevious.call(S, Z.end, true), Z.begin >= 0 && Z.end > 0 && (N.preventDefault(), D.caret.call(S, W, Z.begin, Z.end))) : (Z.begin = D.seekNext.call(S, Z.begin, true), Z.end = D.seekNext.call(S, Z.begin, true), Z.end < V.maskLength && Z.end--, Z.begin <= V.maskLength && (N.preventDefault(), D.caret.call(S, W, Z.begin, Z.end))) : N.shiftKey || (T.insertModeVisual && false === T.insertMode ? Y === C.keys.ArrowRight ? setTimeout(function () { - var a2 = D.caret.call(S, W); - D.caret.call(S, W, a2.begin); - }, 0) : Y === C.keys.ArrowLeft && setTimeout(function () { - var a2 = D.translatePosition.call(S, W.inputmask.caretPos.begin); - D.translatePosition.call(S, W.inputmask.caretPos.end); - S.isRTL ? D.caret.call(S, W, a2 + (a2 === V.maskLength ? 0 : 1)) : D.caret.call(S, W, a2 - (0 === a2 ? 0 : 1)); - }, 0) : undefined === S.keyEventHook || S.keyEventHook(N)) : E.isSelection.call(S, Z) ? T.insertMode = !T.insertMode : (T.insertMode = !T.insertMode, D.caret.call(S, W, Z.begin, Z.begin)); - } - } - S.isComposing = Y == C.keys.Process || Y == C.keys.Unidentified; - S.ignorable = Y.length > 1 && !("textarea" === W.tagName.toLowerCase() && Y == C.keys.Enter); - return M.keypressEvent.call(this, N, O, P, Q, R); - }, - keypressEvent: function (N, O, P, Q, R) { - var S = this.inputmask || this; - var T = S.opts; - var U = S.dependencyLib; - var V = S.maskset; - var W = S.el; - var X = U(W); - var Y = N.key; - if (true === O || N.ctrlKey && N.altKey && !S.ignorable || !(N.ctrlKey || N.metaKey || S.ignorable)) { - if (Y) { - var Z; - var a0 = O ? { - begin: R, - end: R - } : D.caret.call(S, W); - O || (Y = T.substitutes[Y] || Y); - V.writeOutBuffer = true; - var a1 = E.isValid.call(S, a0, Y, Q, undefined, undefined, undefined, O); - if (false !== a1 && (D.resetMaskSet.call(S, true), Z = undefined !== a1.caret ? a1.caret : D.seekNext.call(S, a1.pos.begin ? a1.pos.begin : a1.pos), V.p = Z), Z = T.numericInput && undefined === a1.caret ? D.seekPrevious.call(S, Z) : Z, false !== P && (setTimeout(function () { - T.onKeyValidation.call(W, Y, a1); - }, 0), V.writeOutBuffer && false !== a1)) { - var a2 = D.getBuffer.call(S); - (0, B.writeBuffer)(W, a2, Z, N, true !== O); - } - if (N.preventDefault(), O) { - false !== a1 && (a1.forwardPosition = Z); - return a1; - } - } - } else { - Y === C.keys.Enter && S.undoValue !== S._valueGet(true) && (S.undoValue = S._valueGet(true), setTimeout(function () { - X.trigger("change"); - }, 0)); - } - }, - pasteEvent: (K = G().mark(function N(O) { - var P; - var Q; - var R; - var S; - var T; - var U; - return G().wrap(function (V) { - for (;;) { - switch (V.prev = V.next) { - case 0: - P = function (W, X, Y, Z, a0) { - var a1 = D.caret.call(W, X, undefined, undefined, true); - var a2 = Y.substr(0, a1.begin); - var a3 = Y.substr(a1.end, Y.length); - if (a2 == (W.isRTL ? D.getBufferTemplate.call(W).slice().reverse() : D.getBufferTemplate.call(W)).slice(0, a1.begin).join("") && (a2 = ""), a3 == (W.isRTL ? D.getBufferTemplate.call(W).slice().reverse() : D.getBufferTemplate.call(W)).slice(a1.end).join("") && (a3 = ""), Z = a2 + Z + a3, W.isRTL && true !== S.numericInput) { - Z = Z.split(""); - var a4; - var a5 = H(D.getBufferTemplate.call(W)); - try { - for (a5.s(); !(a4 = a5.n()).done;) { - var a6 = a4.value; - Z[0] === a6 && Z.shift(); - } - } catch (a8) { - a5.e(a8); - } finally { - a5.f(); - } - Z = Z.reverse().join(""); - } - var a7 = Z; - if ("function" == typeof a0) { - if (false === (a7 = a0.call(W, a7, S))) { - return false; - } - a7 || (a7 = Y); - } - (0, B.checkVal)(X, true, false, a7.toString().split(""), O); - }; - Q = this; - R = this.inputmask; - S = R.opts; - T = R._valueGet(true); - R.skipInputEvent = true; - O.clipboardData && O.clipboardData.getData ? U = O.clipboardData.getData("text/plain") : A.default.clipboardData && A.default.clipboardData.getData && (U = A.default.clipboardData.getData("Text")); - P(R, Q, T, U, S.onBeforePaste); - O.preventDefault(); - case 7: - case "end": - return V.stop(); - } - } - }, N, this); - }), L = function () { - var O = this; - var P = arguments; - return new Promise(function (Q, R) { - var S = K.apply(O, P); - function T(V) { - J(S, Q, R, T, U, "next", V); - } - function U(V) { - J(S, Q, R, T, U, "throw", V); - } - T(undefined); - }); - }, function (O) { - return L.apply(this, arguments); - }), - inputFallBackEvent: function (O) { - var P; - var Q = this.inputmask; - var R = Q.opts; - var S = Q.dependencyLib; - var T = this; - var U = T.inputmask._valueGet(true); - var V = (Q.isRTL ? D.getBuffer.call(Q).slice().reverse() : D.getBuffer.call(Q)).join(""); - var W = D.caret.call(Q, T, undefined, undefined, true); - if (V !== U) { - if (P = function (Y, Z, a0) { - for (var a1, a2, a3, a4 = Y.substr(0, a0.begin).split(""), a5 = Y.substr(a0.begin).split(""), a6 = Z.substr(0, a0.begin).split(""), a7 = Z.substr(a0.begin).split(""), a8 = a4.length >= a6.length ? a4.length : a6.length, a9 = a5.length >= a7.length ? a5.length : a7.length, aa = "", ab = [], ac = "~"; a4.length < a8;) { - a4.push(ac); - } - for (; a6.length < a8;) { - a6.push(ac); - } - for (; a5.length < a9;) { - a5.unshift(ac); - } - for (; a7.length < a9;) { - a7.unshift(ac); - } - var ad = a4.concat(a5); - var ae = a6.concat(a7); - for (a2 = 0, a1 = ad.length; a2 < a1; a2++) { - switch (a3 = F.getPlaceholder.call(Q, D.translatePosition.call(Q, a2)), aa) { - case "insertText": - ae[a2 - 1] === ad[a2] && a0.begin == ad.length - 1 && ab.push(ad[a2]); - a2 = a1; - break; - case "insertReplacementText": - case "deleteContentBackward": - ad[a2] === ac ? a0.end++ : a2 = a1; - break; - default: - ad[a2] !== ae[a2] && (ad[a2 + 1] !== ac && ad[a2 + 1] !== a3 && undefined !== ad[a2 + 1] || (ae[a2] !== a3 || ae[a2 + 1] !== ac) && ae[a2] !== ac ? ae[a2 + 1] === ac && ae[a2] === ad[a2 + 1] ? (aa = "insertText", ab.push(ad[a2]), a0.begin--, a0.end--) : ad[a2] !== a3 && ad[a2] !== ac && (ad[a2 + 1] === ac || ae[a2] !== ad[a2] && ae[a2 + 1] === ad[a2 + 1]) ? (aa = "insertReplacementText", ab.push(ad[a2]), a0.begin--) : ad[a2] === ac ? (aa = "deleteContentBackward", (D.isMask.call(Q, D.translatePosition.call(Q, a2), true) || ae[a2] === R.radixPoint) && a0.end++) : a2 = a1 : (aa = "insertText", ab.push(ad[a2]), a0.begin--, a0.end--)); - } - } - return { - action: aa, - data: ab, - caret: a0 - }; - }(U, V, W), (T.inputmask.shadowRoot || T.ownerDocument).activeElement !== T && T.focus(), (0, B.writeBuffer)(T, D.getBuffer.call(Q)), D.caret.call(Q, T, W.begin, W.end, true), !z.mobile && Q.skipNextInsert && "insertText" === O.inputType && "insertText" === P.action && Q.isComposing) { - return false; - } - switch ("insertCompositionText" === O.inputType && "insertText" === P.action && Q.isComposing ? Q.skipNextInsert = true : Q.skipNextInsert = false, P.action) { - case "insertText": - case "insertReplacementText": - P.data.forEach(function (Y, Z) { - var a0 = new S.Event("keypress"); - a0.key = Y; - Q.ignorable = false; - M.keypressEvent.call(T, a0); - }); - setTimeout(function () { - Q.$el.trigger("keyup"); - }, 0); - break; - case "deleteContentBackward": - var X = new S.Event("keydown"); - X.key = C.keys.Backspace; - M.keyEvent.call(T, X); - break; - default: - (0, B.applyInputValue)(T, U); - D.caret.call(Q, T, W.begin, W.end, true); - } - O.preventDefault(); - } - }, - setValueEvent: function (O) { - var P = this.inputmask; - var Q = P.dependencyLib; - var R = this; - var S = O && O.detail ? O.detail[0] : arguments[1]; - undefined === S && (S = R.inputmask._valueGet(true)); - (0, B.applyInputValue)(R, S, new Q.Event("input")); - (O.detail && undefined !== O.detail[1] || undefined !== arguments[2]) && D.caret.call(P, R, O.detail ? O.detail[1] : arguments[2]); - }, - focusEvent: function (O) { - var P = this.inputmask; - var Q = P.opts; - var R = P && P._valueGet(); - Q.showMaskOnFocus && R !== D.getBuffer.call(P).join("") && (0, B.writeBuffer)(this, D.getBuffer.call(P), D.seekNext.call(P, D.getLastValidPosition.call(P))); - true !== Q.positionCaretOnTab || false !== P.mouseEnter || E.isComplete.call(P, D.getBuffer.call(P)) && -1 !== D.getLastValidPosition.call(P) || M.clickEvent.apply(this, [O, true]); - P.undoValue = P && P._valueGet(true); - }, - invalidEvent: function (O) { - this.inputmask.validationEvent = true; - }, - mouseleaveEvent: function () { - var O = this.inputmask; - var P = O.opts; - var Q = this; - O.mouseEnter = false; - P.clearMaskOnLostFocus && (Q.inputmask.shadowRoot || Q.ownerDocument).activeElement !== Q && (0, B.HandleNativePlaceholder)(Q, O.originalPlaceholder); - }, - clickEvent: function (O, P) { - var Q = this.inputmask; - Q.clicked++; - var R = this; - if ((R.inputmask.shadowRoot || R.ownerDocument).activeElement === R) { - var S = D.determineNewCaretPosition.call(Q, D.caret.call(Q, R), P); - undefined !== S && D.caret.call(Q, R, S); - } - }, - cutEvent: function (O) { - var P = this.inputmask; - var Q = P.maskset; - var R = this; - var S = D.caret.call(P, R); - var T = P.isRTL ? D.getBuffer.call(P).slice(S.end, S.begin) : D.getBuffer.call(P).slice(S.begin, S.end); - var U = P.isRTL ? T.reverse().join("") : T.join(""); - A.default.navigator && A.default.navigator.clipboard ? A.default.navigator.clipboard.writeText(U) : A.default.clipboardData && A.default.clipboardData.getData && A.default.clipboardData.setData("Text", U); - E.handleRemove.call(P, R, C.keys.Delete, S); - (0, B.writeBuffer)(R, D.getBuffer.call(P), Q.p, O, P.undoValue !== P._valueGet(true)); - }, - blurEvent: function (O) { - var P = this.inputmask; - var Q = P.opts; - var R = P.dependencyLib; - P.clicked = 0; - var S = R(this); - var T = this; - if (T.inputmask) { - (0, B.HandleNativePlaceholder)(T, P.originalPlaceholder); - var U = T.inputmask._valueGet(); - var V = D.getBuffer.call(P).slice(); - "" !== U && (Q.clearMaskOnLostFocus && (-1 === D.getLastValidPosition.call(P) && U === D.getBufferTemplate.call(P).join("") ? V = [] : B.clearOptionalTail.call(P, V)), false === E.isComplete.call(P, V) && (setTimeout(function () { - S.trigger("incomplete"); - }, 0), Q.clearIncomplete && (D.resetMaskSet.call(P, false), V = Q.clearMaskOnLostFocus ? [] : D.getBufferTemplate.call(P).slice())), (0, B.writeBuffer)(T, V, undefined, O)); - U = P._valueGet(true); - P.undoValue !== U && ("" != U || P.undoValue != D.getBufferTemplate.call(P).join("") || P.undoValue == D.getBufferTemplate.call(P).join("") && P.maskset.validPositions.length > 0) && (P.undoValue = U, S.trigger("change")); - } - }, - mouseenterEvent: function () { - var O = this.inputmask; - var P = O.opts.showMaskOnHover; - var Q = this; - if (O.mouseEnter = true, (Q.inputmask.shadowRoot || Q.ownerDocument).activeElement !== Q) { - var R = (O.isRTL ? D.getBufferTemplate.call(O).slice().reverse() : D.getBufferTemplate.call(O)).join(""); - P && (0, B.HandleNativePlaceholder)(Q, R); - } - }, - submitEvent: function () { - var O = this.inputmask; - var P = O.opts; - O.undoValue !== O._valueGet(true) && O.$el.trigger("change"); - -1 === D.getLastValidPosition.call(O) && O._valueGet && O._valueGet() === D.getBufferTemplate.call(O).join("") && O._valueSet(""); - P.clearIncomplete && false === E.isComplete.call(O, D.getBuffer.call(O)) && O._valueSet(""); - P.removeMaskOnSubmit && (O._valueSet(O.unmaskedvalue(), true), setTimeout(function () { - (0, B.writeBuffer)(O.el, D.getBuffer.call(O)); - }, 0)); - }, - resetEvent: function () { - var O = this.inputmask; - O.refreshValue = true; - setTimeout(function () { - (0, B.applyInputValue)(O.el, O._valueGet(true)); - }, 0); - } - }; - var M = k.EventHandlers; - }, - 9716: function (j, k, l) { - Object.defineProperty(k, "__esModule", { - value: true - }); - k.EventRuler = undefined; - var m; - var p = l(7760); - var q = (m = l(2394)) && m.__esModule ? m : { - default: m - }; - var u = l(2839); - var v = l(8711); - k.EventRuler = { - on: function (w, x, y) { - var z = w.inputmask.dependencyLib; - var A = function (B) { - B.originalEvent && (B = B.originalEvent || B, arguments[0] = B); - var C; - var D = this; - var E = D.inputmask; - var F = E ? E.opts : undefined; - if (undefined === E && "FORM" !== this.nodeName) { - var G = z.data(D, "_inputmask_opts"); - z(D).off(); - G && new q.default(G).mask(D); - } else { - if (["submit", "reset", "setvalue"].includes(B.type) || "FORM" === this.nodeName || !(D.disabled || D.readOnly && !("keydown" === B.type && B.ctrlKey && B.key === u.keys.c || false === F.tabThrough && B.key === u.keys.Tab))) { - switch (B.type) { - case "input": - if (true === E.skipInputEvent) { - E.skipInputEvent = false; - return B.preventDefault(); - } - break; - case "click": - case "focus": - return E.validationEvent ? (E.validationEvent = false, w.blur(), (0, p.HandleNativePlaceholder)(w, (E.isRTL ? v.getBufferTemplate.call(E).slice().reverse() : v.getBufferTemplate.call(E)).join("")), setTimeout(function () { - w.focus(); - }, F.validationEventTimeOut), false) : (C = arguments, void setTimeout(function () { - w.inputmask && y.apply(D, C); - }, 0)); - } - var H = y.apply(D, arguments); - false === H && (B.preventDefault(), B.stopPropagation()); - return H; - } - B.preventDefault(); - } - }; - ["submit", "reset"].includes(x) ? (A = A.bind(w), null !== w.form && z(w.form).on(x, A)) : z(w).on(x, A); - w.inputmask.events[x] = w.inputmask.events[x] || []; - w.inputmask.events[x].push(A); - }, - off: function (w, x) { - if (w.inputmask && w.inputmask.events) { - var y = w.inputmask.dependencyLib; - var z = w.inputmask.events; - for (var A in x && ((z = [])[x] = w.inputmask.events[x]), z) { - for (var B = z[A]; B.length > 0;) { - var C = B.pop(); - ["submit", "reset"].includes(A) ? null !== w.form && y(w.form).off(A, C) : y(w).off(A, C); - } - delete w.inputmask.events[A]; - } - } - } - }; - }, - 219: function (q, z, A) { - var B = L(A(7184)); - var D = L(A(2394)); - var F = A(2839); - var G = A(8711); - var H = A(4713); - function I(a5, a6) { - (null == a6 || a6 > a5.length) && (a6 = a5.length); - for (var a7 = 0, a8 = new Array(a6); a7 < a6; a7++) { - a8[a7] = a5[a7]; - } - return a8; - } - function J(a5) { - return (J = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (a6) { - return typeof a6; - } : function (a6) { - return a6 && "function" == typeof Symbol && a6.constructor === Symbol && a6 !== Symbol.prototype ? "symbol" : typeof a6; - })(a5); - } - function K(a5, a6) { - for (var a7 = 0; a7 < a6.length; a7++) { - var a8 = a6[a7]; - a8.enumerable = a8.enumerable || false; - a8.configurable = true; - "value" in a8 && (a8.writable = true); - Object.defineProperty(a5, (a9 = function (aa, ab) { - if ("object" !== J(aa) || null === aa) { - return aa; - } - var ac = aa[Symbol.toPrimitive]; - if (undefined !== ac) { - var ad = ac.call(aa, ab); - if ("object" !== J(ad)) { - return ad; - } - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return String(aa); - }(a8.key, "string"), "symbol" === J(a9) ? a9 : String(a9)), a8); - } - var a9; - } - function L(a5) { - return a5 && a5.__esModule ? a5 : { - default: a5 - }; - } - A(1313); - var M = D.default.dependencyLib; - var N = function () { - function a5(a8, a9, aa, ab) { - !function (ac, ad) { - if (!(ac instanceof ad)) { - throw new TypeError("Cannot call a class as a function"); - } - }(this, a5); - this.mask = a8; - this.format = a9; - this.opts = aa; - this.inputmask = ab; - this._date = new Date(1, 0, 1); - this.initDateObject(a8, this.opts, this.inputmask); - } - var a6; - var a7; - a6 = a5; - (a7 = [{ - key: "date", - get: function () { - undefined === this._date && (this._date = new Date(1, 0, 1), this.initDateObject(undefined, this.opts, this.inputmask)); - return this._date; - } - }, { - key: "initDateObject", - value: function (a8, a9, aa) { - var ab; - for (Y(a9).lastIndex = 0; ab = Y(a9).exec(this.format);) { - var ac = /\d+$/.exec(ab[0]); - var ad = ac ? ab[0][0] + "x" : ab[0]; - var ae = undefined; - if (undefined !== a8) { - if (ac) { - var af = Y(a9).lastIndex; - var ag = a4.call(aa, ab.index, a9, aa && aa.maskset); - Y(a9).lastIndex = af; - ae = a8.slice(0, a8.indexOf(ag.nextMatch[0])); - } else { - for (var ah = ab[0][0], ai = ab.index; aa && (a9.placeholder[H.getTest.call(aa, ai).match.placeholder] || H.getTest.call(aa, ai).match.placeholder) === ah;) { - ai++; - } - var aj = ai - ab.index; - ae = a8.slice(0, aj || T[ad] && T[ad][4] || ad.length); - } - a8 = a8.slice(ae.length); - } - Object.prototype.hasOwnProperty.call(T, ad) && this.setValue(this, ae, ad, T[ad][2], T[ad][1]); - } - } - }, { - key: "setValue", - value: function (a8, a9, aa, ab, ac) { - if (undefined !== a9) { - switch (ab) { - case "ampm": - a8[ab] = a9; - a8["raw" + ab] = a9.replace(/\s/g, "_"); - break; - case "month": - if ("mmm" === aa || "mmmm" === aa) { - a8[ab] = a1("mmm" === aa ? Q.monthNames.slice(0, 12).findIndex(function (ae) { - return a9.toLowerCase() === ae.toLowerCase(); - }) + 1 : Q.monthNames.slice(12, 24).findIndex(function (ae) { - return a9.toLowerCase() === ae.toLowerCase(); - }) + 1, 2); - a8[ab] = "00" === a8[ab] ? "" : a8[ab].toString(); - a8["raw" + ab] = a8[ab]; - break; - } - default: - a8[ab] = a9.replace(/[^0-9]/g, "0"); - a8["raw" + ab] = a9.replace(/\s/g, "_"); - } - } - if (undefined !== ac) { - var ad = a8[ab]; - ("day" === ab && 29 === parseInt(ad) || "month" === ab && 2 === parseInt(ad)) && (29 !== parseInt(a8.day) || 2 !== parseInt(a8.month) || "" !== a8.year && undefined !== a8.year || a8._date.setFullYear(2012, 1, 29)); - "day" === ab && (R = true, 0 === parseInt(ad) && (ad = 1)); - "month" === ab && (R = true); - "year" === ab && (R = true, ad.length < T[aa][4] && (ad = a1(ad, T[aa][4], true))); - ("" !== ad && !isNaN(ad) || "ampm" === ab) && ac.call(a8._date, ad); - } - } - }, { - key: "reset", - value: function () { - this._date = new Date(1, 0, 1); - } - }, { - key: "reInit", - value: function () { - this._date = undefined; - this.date; - } - }]) && K(a6.prototype, a7); - Object.defineProperty(a6, "prototype", { - writable: false - }); - return a5; - }(); - var P = new Date().getFullYear(); - var Q = D.default.prototype.i18n; - var R = false; - var T = { - d: ["[1-9]|[12][0-9]|3[01]", Date.prototype.setDate, "day", Date.prototype.getDate], - dd: ["0[1-9]|[12][0-9]|3[01]", Date.prototype.setDate, "day", function () { - return a1(Date.prototype.getDate.call(this), 2); - }], - ddd: [""], - dddd: [""], - m: ["[1-9]|1[012]", function (a5) { - var a6 = a5 ? parseInt(a5) : 0; - a6 > 0 && a6--; - return Date.prototype.setMonth.call(this, a6); - }, "month", function () { - return Date.prototype.getMonth.call(this) + 1; - }], - mm: ["0[1-9]|1[012]", function (a5) { - var a6 = a5 ? parseInt(a5) : 0; - a6 > 0 && a6--; - return Date.prototype.setMonth.call(this, a6); - }, "month", function () { - return a1(Date.prototype.getMonth.call(this) + 1, 2); - }], - mmm: [Q.monthNames.slice(0, 12).join("|"), function (a5) { - var a6 = Q.monthNames.slice(0, 12).findIndex(function (a7) { - return a5.toLowerCase() === a7.toLowerCase(); - }); - return -1 !== a6 && Date.prototype.setMonth.call(this, a6); - }, "month", function () { - return Q.monthNames.slice(0, 12)[Date.prototype.getMonth.call(this)]; - }], - mmmm: [Q.monthNames.slice(12, 24).join("|"), function (a5) { - var a6 = Q.monthNames.slice(12, 24).findIndex(function (a7) { - return a5.toLowerCase() === a7.toLowerCase(); - }); - return -1 !== a6 && Date.prototype.setMonth.call(this, a6); - }, "month", function () { - return Q.monthNames.slice(12, 24)[Date.prototype.getMonth.call(this)]; - }], - yy: ["[0-9]{2}", function (a5) { - var a6 = new Date().getFullYear().toString().slice(0, 2); - Date.prototype.setFullYear.call(this, "".concat(a6).concat(a5)); - }, "year", function () { - return a1(Date.prototype.getFullYear.call(this), 2); - }, 2], - yyyy: ["[0-9]{4}", Date.prototype.setFullYear, "year", function () { - return a1(Date.prototype.getFullYear.call(this), 4); - }, 4], - h: ["[1-9]|1[0-2]", Date.prototype.setHours, "hours", Date.prototype.getHours], - hh: ["0[1-9]|1[0-2]", Date.prototype.setHours, "hours", function () { - return a1(Date.prototype.getHours.call(this), 2); - }], - hx: [function (a5) { - return "[0-9]{".concat(a5, "}"); - }, Date.prototype.setHours, "hours", function (a5) { - return Date.prototype.getHours; - }], - H: ["1?[0-9]|2[0-3]", Date.prototype.setHours, "hours", Date.prototype.getHours], - HH: ["0[0-9]|1[0-9]|2[0-3]", Date.prototype.setHours, "hours", function () { - return a1(Date.prototype.getHours.call(this), 2); - }], - Hx: [function (a5) { - return "[0-9]{".concat(a5, "}"); - }, Date.prototype.setHours, "hours", function (a5) { - return function () { - return a1(Date.prototype.getHours.call(this), a5); - }; - }], - M: ["[1-5]?[0-9]", Date.prototype.setMinutes, "minutes", Date.prototype.getMinutes], - MM: ["0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]", Date.prototype.setMinutes, "minutes", function () { - return a1(Date.prototype.getMinutes.call(this), 2); - }], - s: ["[1-5]?[0-9]", Date.prototype.setSeconds, "seconds", Date.prototype.getSeconds], - ss: ["0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]", Date.prototype.setSeconds, "seconds", function () { - return a1(Date.prototype.getSeconds.call(this), 2); - }], - l: ["[0-9]{3}", Date.prototype.setMilliseconds, "milliseconds", function () { - return a1(Date.prototype.getMilliseconds.call(this), 3); - }, 3], - L: ["[0-9]{2}", Date.prototype.setMilliseconds, "milliseconds", function () { - return a1(Date.prototype.getMilliseconds.call(this), 2); - }, 2], - t: ["[ap]", V, "ampm", W, 1], - tt: ["[ap]m", V, "ampm", W, 2], - T: ["[AP]", V, "ampm", W, 1], - TT: ["[AP]M", V, "ampm", W, 2], - Z: [".*", undefined, "Z", function () { - var a5 = this.toString().match(/\((.+)\)/)[1]; - a5.includes(" ") && (a5 = (a5 = a5.replace("-", " ").toUpperCase()).split(" ").map(function (a6) { - return function (a7, a8) { - return function (a9) { - if (Array.isArray(a9)) { - return a9; - } - }(a7) || function (a9, aa) { - var ab = null == a9 ? null : "undefined" != typeof Symbol && a9[Symbol.iterator] || a9["@@iterator"]; - if (null != ab) { - var ac; - var ad; - var ae; - var af; - var ag = []; - var ah = true; - var ai = false; - try { - if (ae = (ab = ab.call(a9)).next, 0 === aa) { - if (Object(ab) !== ab) { - return; - } - ah = false; - } else { - for (; !(ah = (ac = ae.call(ab)).done) && (ag.push(ac.value), ag.length !== aa); ah = true) {} - } - } catch (aj) { - ai = true; - ad = aj; - } finally { - try { - if (!ah && null != ab.return && (af = ab.return(), Object(af) !== af)) { - return; - } - } finally { - if (ai) { - throw ad; - } - } - } - return ag; - } - }(a7, a8) || function (a9, aa) { - if (a9) { - if ("string" == typeof a9) { - return I(a9, aa); - } - var ab = Object.prototype.toString.call(a9).slice(8, -1); - "Object" === ab && a9.constructor && (ab = a9.constructor.name); - return "Map" === ab || "Set" === ab ? Array.from(a9) : "Arguments" === ab || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ab) ? I(a9, aa) : undefined; - } - }(a7, a8) || function () { - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - }(); - }(a6, 1)[0]; - }).join("")); - return a5; - }], - o: [""], - S: [""] - }; - var U = { - isoDate: "yyyy-mm-dd", - isoTime: "HH:MM:ss", - isoDateTime: "yyyy-mm-dd'T'HH:MM:ss", - isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'" - }; - function V(a5) { - var a6 = this.getHours(); - a5.toLowerCase().includes("p") ? this.setHours(a6 + 12) : a5.toLowerCase().includes("a") && a6 >= 12 && this.setHours(a6 - 12); - } - function W() { - var a5 = this.getHours(); - return (a5 = a5 || 12) >= 12 ? "PM" : "AM"; - } - function X(a5) { - var a6 = /\d+$/.exec(a5[0]); - if (a6 && undefined !== a6[0]) { - var a7 = T[a5[0][0] + "x"].slice(""); - a7[0] = a7[0](a6[0]); - a7[3] = a7[3](a6[0]); - return a7; - } - if (T[a5[0]]) { - return T[a5[0]]; - } - } - function Y(a5) { - if (!a5.tokenizer) { - var a6 = []; - var a7 = []; - for (var a8 in T) if (/\.*x$/.test(a8)) { - var a9 = a8[0] + "\\d+"; - -1 === a7.indexOf(a9) && a7.push(a9); - } else { - -1 === a6.indexOf(a8[0]) && a6.push(a8[0]); - } - a5.tokenizer = "(" + (a7.length > 0 ? a7.join("|") + "|" : "") + a6.join("+|") + ")+?|."; - a5.tokenizer = new RegExp(a5.tokenizer, "g"); - } - return a5.tokenizer; - } - function Z(a5, a6, a7) { - if (!R) { - return true; - } - if (undefined === a5.rawday || !isFinite(a5.rawday) && new Date(a5.date.getFullYear(), isFinite(a5.rawmonth) ? a5.month : a5.date.getMonth() + 1, 0).getDate() >= a5.day || "29" == a5.day && (!isFinite(a5.rawyear) || undefined === a5.rawyear || "" === a5.rawyear) || new Date(a5.date.getFullYear(), isFinite(a5.rawmonth) ? a5.month : a5.date.getMonth() + 1, 0).getDate() >= a5.day) { - return a6; - } - if ("29" == a5.day) { - var a8 = a4.call(this, a6.pos, a7, this.maskset); - if (a8.targetMatch && "yyyy" === a8.targetMatch[0] && a6.pos - a8.targetMatchIndex == 2) { - a6.remove = a6.pos + 1; - return a6; - } - } else { - if (2 == a5.date.getMonth() && "30" == a5.day && undefined !== a6.c) { - a5.day = "03"; - a5.date.setDate(3); - a5.date.setMonth(1); - a6.insert = [{ - pos: a6.pos, - c: "0" - }, { - pos: a6.pos + 1, - c: a6.c - }]; - a6.caret = G.seekNext.call(this, a6.pos + 1); - return a6; - } - } - return false; - } - function a0(a5, a6, a7, a8) { - var a9; - var aa; - var ab = ""; - var ac = 0; - var ad = {}; - for (Y(a7).lastIndex = 0; a9 = Y(a7).exec(a5);) { - if (undefined === a6) { - aa = X(a9); - if (aa) { - ab += "(" + aa[0] + ")"; - a7.placeholder && "" !== a7.placeholder ? (ad[ac] = a7.placeholder[a9.index % a7.placeholder.length], ad[a7.placeholder[a9.index % a7.placeholder.length]] = a9[0].charAt(0)) : ad[ac] = a9[0].charAt(0); - } else { - switch (a9[0]) { - case "[": - ab += "("; - break; - case "]": - ab += ")?"; - break; - default: - ab += (0, B.default)(a9[0]); - ad[ac] = a9[0].charAt(0); - } - } - } else { - (aa = X(a9)) ? true !== a8 && aa[3] ? ab += aa[3].call(a6.date) : aa[2] ? ab += a6["raw" + aa[2]] : ab += a9[0] : ab += a9[0]; - } - ac++; - } - undefined === a6 && (a7.placeholder = ad); - return ab; - } - function a1(a5, a6, a7) { - for (a5 = String(a5), a6 = a6 || 2; a5.length < a6;) { - a5 = a7 ? a5 + "0" : "0" + a5; - } - return a5; - } - function a2(a5, a6, a7) { - return "string" == typeof a5 ? new N(a5, a6, a7, this) : a5 && "object" === J(a5) && Object.prototype.hasOwnProperty.call(a5, "date") ? a5 : undefined; - } - function a3(a5, a6) { - return a0(a6.inputFormat, { - date: a5 - }, a6); - } - function a4(a5, a6, a7) { - var a8; - var a9; - var aa = this; - var ab = a7 && a7.tests[a5] ? a6.placeholder[a7.tests[a5][0].match.placeholder] || a7.tests[a5][0].match.placeholder : ""; - var ac = 0; - var ad = 0; - for (Y(a6).lastIndex = 0; a9 = Y(a6).exec(a6.inputFormat);) { - var ae = /\d+$/.exec(a9[0]); - if (ae) { - ad = parseInt(ae[0]); - } else { - for (var af = a9[0][0], ag = ac; aa && (a6.placeholder[H.getTest.call(aa, ag).match.placeholder] || H.getTest.call(aa, ag).match.placeholder) === af;) { - ag++; - } - 0 == (ad = ag - ac) && (ad = a9[0].length); - } - if (ac += ad, -1 != a9[0].indexOf(ab) || ac >= a5 + 1) { - a8 = a9; - a9 = Y(a6).exec(a6.inputFormat); - break; - } - } - return { - targetMatchIndex: ac - ad, - nextMatch: a9, - targetMatch: a8 - }; - } - D.default.extendAliases({ - datetime: { - mask: function (a5) { - a5.numericInput = false; - T.S = Q.ordinalSuffix.join("|"); - a5.inputFormat = U[a5.inputFormat] || a5.inputFormat; - a5.displayFormat = U[a5.displayFormat] || a5.displayFormat || a5.inputFormat; - a5.outputFormat = U[a5.outputFormat] || a5.outputFormat || a5.inputFormat; - a5.regex = a0(a5.inputFormat, undefined, a5); - a5.min = a2(a5.min, a5.inputFormat, a5); - a5.max = a2(a5.max, a5.inputFormat, a5); - return null; - }, - placeholder: "", - inputFormat: "isoDateTime", - displayFormat: null, - outputFormat: null, - min: null, - max: null, - skipOptionalPartCharacter: "", - preValidation: function (a5, a6, a7, a8, a9, aa, ab, ac) { - if (ac) { - return true; - } - if (isNaN(a7) && a5[a6] !== a7) { - var ad = a4.call(this, a6, a9, aa); - if (ad.nextMatch && ad.nextMatch[0] === a7 && ad.targetMatch[0].length > 1) { - var ae = X(ad.targetMatch)[0]; - if (new RegExp(ae).test("0" + a5[a6 - 1])) { - a5[a6] = a5[a6 - 1]; - a5[a6 - 1] = "0"; - return { - fuzzy: true, - buffer: a5, - refreshFromBuffer: { - start: a6 - 1, - end: a6 + 1 - }, - pos: a6 + 1 - }; - } - } - } - return true; - }, - postValidation: function (a5, a6, a7, a8, a9, aa, ab, ac) { - var ad; - var ae; - var af = this; - if (ab) { - return true; - } - if (false === a8 && (((ad = a4.call(af, a6 + 1, a9, aa)).targetMatch && ad.targetMatchIndex === a6 && ad.targetMatch[0].length > 1 && undefined !== T[ad.targetMatch[0]] || (ad = a4.call(af, a6 + 2, a9, aa)).targetMatch && ad.targetMatchIndex === a6 + 1 && ad.targetMatch[0].length > 1 && undefined !== T[ad.targetMatch[0]]) && (ae = X(ad.targetMatch)[0]), undefined !== ae && (undefined !== aa.validPositions[a6 + 1] && new RegExp(ae).test(a7 + "0") ? (a5[a6] = a7, a5[a6 + 1] = "0", a8 = { - pos: a6 + 2, - caret: a6 - }) : new RegExp(ae).test("0" + a7) && (a5[a6] = "0", a5[a6 + 1] = a7, a8 = { - pos: a6 + 2 - })), false === a8)) { - return a8; - } - if (a8.fuzzy && (a5 = a8.buffer, a6 = a8.pos), (ad = a4.call(af, a6, a9, aa)).targetMatch && ad.targetMatch[0] && undefined !== T[ad.targetMatch[0]]) { - var ag = X(ad.targetMatch); - ae = ag[0]; - var ah = a5.slice(ad.targetMatchIndex, ad.targetMatchIndex + ad.targetMatch[0].length); - if (false === new RegExp(ae).test(ah.join("")) && 2 === ad.targetMatch[0].length && aa.validPositions[ad.targetMatchIndex] && aa.validPositions[ad.targetMatchIndex + 1] && (aa.validPositions[ad.targetMatchIndex + 1].input = "0"), "year" == ag[2]) { - for (var ai = H.getMaskTemplate.call(af, false, 1, undefined, true), aj = a6 + 1; aj < a5.length; aj++) { - a5[aj] = ai[aj]; - aa.validPositions.splice(a6 + 1, 1); - } - } - } - var ak = a8; - var al = a2.call(af, a5.join(""), a9.inputFormat, a9); - ak && !isNaN(al.date.getTime()) && (a9.prefillYear && (ak = function (am, an, ao) { - if (am.year !== am.rawyear) { - var ap = P.toString(); - var aq = am.rawyear.replace(/[^0-9]/g, ""); - var ar = ap.slice(0, aq.length); - var as = ap.slice(aq.length); - if (2 === aq.length && aq === ar) { - var at = new Date(P, am.month - 1, am.day); - am.day == at.getDate() && (!ao.max || ao.max.date.getTime() >= at.getTime()) && (am.date.setFullYear(P), am.year = ap, an.insert = [{ - pos: an.pos + 1, - c: as[0] - }, { - pos: an.pos + 2, - c: as[1] - }]); - } - } - return an; - }(al, ak, a9)), ak = function (am, an, ao, ap, aq) { - if (!an) { - return an; - } - if (an && ao.min && !isNaN(ao.min.date.getTime())) { - var ar; - for (am.reset(), Y(ao).lastIndex = 0; ar = Y(ao).exec(ao.inputFormat);) { - var as; - if ((as = X(ar)) && as[3]) { - for (var at = as[1], au = am[as[2]], av = ao.min[as[2]], aw = ao.max ? ao.max[as[2]] : av + 1, ax = [], ay = false, az = 0; az < av.length; az++) { - undefined !== ap.validPositions[az + ar.index] || ay ? (ax[az] = au[az], ay = ay || au[az] > av[az]) : (az + ar.index == 0 && au[az] < av[az] ? (ax[az] = au[az], ay = true) : ax[az] = av[az], "year" === as[2] && au.length - 1 == az && av != aw && (ax = (parseInt(ax.join("")) + 1).toString().split("")), "ampm" === as[2] && av != aw && ao.min.date.getTime() > am.date.getTime() && (ax[az] = aw[az])); - } - at.call(am._date, ax.join("")); - } - } - an = ao.min.date.getTime() <= am.date.getTime(); - am.reInit(); - } - an && ao.max && (isNaN(ao.max.date.getTime()) || (an = ao.max.date.getTime() >= am.date.getTime())); - return an; - }(al, ak = Z.call(af, al, ak, a9), a9, aa)); - return undefined !== a6 && ak && a8.pos !== a6 ? { - buffer: a0(a9.inputFormat, al, a9).split(""), - refreshFromBuffer: { - start: a6, - end: a8.pos - }, - pos: a8.caret || a8.pos - } : ak; - }, - onKeyDown: function (a5, a6, a7, a8) { - a5.ctrlKey && a5.key === F.keys.ArrowRight && (this.inputmask._valueSet(a3(new Date(), a8)), M(this).trigger("setvalue")); - }, - onUnMask: function (a5, a6, a7) { - return a6 ? a0(a7.outputFormat, a2.call(this, a5, a7.inputFormat, a7), a7, true) : a6; - }, - casing: function (a5, a6, a7, a8) { - if (0 == a6.nativeDef.indexOf("[ap]")) { - return a5.toLowerCase(); - } - if (0 == a6.nativeDef.indexOf("[AP]")) { - return a5.toUpperCase(); - } - var a9 = H.getTest.call(this, [a7 - 1]); - return 0 == a9.match.def.indexOf("[AP]") || 0 === a7 || a9 && a9.input === String.fromCharCode(F.keyCode.Space) || a9 && a9.match.def === String.fromCharCode(F.keyCode.Space) ? a5.toUpperCase() : a5.toLowerCase(); - }, - onBeforeMask: function (a5, a6) { - "[object Date]" === Object.prototype.toString.call(a5) && (a5 = a3(a5, a6)); - return a5; - }, - insertMode: false, - insertModeVisual: false, - shiftPositions: false, - keepStatic: false, - inputmode: "numeric", - prefillYear: true - } - }); - }, - 1313: function (j, k, l) { - var m; - var o = (m = l(2394)) && m.__esModule ? m : { - default: m - }; - o.default.dependencyLib.extend(true, o.default.prototype.i18n, { - dayNames: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"], - monthNames: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], - ordinalSuffix: ["st", "nd", "rd", "th"] - }); - }, - 3851: function (j, k, m) { - var p; - var q = (p = m(2394)) && p.__esModule ? p : { - default: p - }; - var u = m(8711); - var v = m(4713); - function w(z, A) { - (null == A || A > z.length) && (A = z.length); - for (var B = 0, C = new Array(A); B < A; B++) { - C[B] = z[B]; - } - return C; - } - q.default.extendDefinitions({ - A: { - validator: "[A-Za-zА-яЁёÀ-ÿµ]", - casing: "upper" - }, - "&": { - validator: "[0-9A-Za-zА-яЁёÀ-ÿµ]", - casing: "upper" - }, - "#": { - validator: "[0-9A-Fa-f]", - casing: "upper" - } - }); - var x = /25[0-5]|2[0-4][0-9]|[01][0-9][0-9]/; - function y(z, A, B, C, D) { - if (B - 1 > -1 && "." !== A.buffer[B - 1] ? (z = A.buffer[B - 1] + z, z = B - 2 > -1 && "." !== A.buffer[B - 2] ? A.buffer[B - 2] + z : "0" + z) : z = "00" + z, D.greedy && parseInt(z) > 255 && x.test("00" + z.charAt(2))) { - var E = [].concat(function (F) { - return function (G) { - if (Array.isArray(G)) { - return w(G); - } - }(F) || function (G) { - if ("undefined" != typeof Symbol && null != G[Symbol.iterator] || null != G["@@iterator"]) { - return Array.from(G); - } - }(F) || function (G, H) { - if (G) { - if ("string" == typeof G) { - return w(G, H); - } - var I = Object.prototype.toString.call(G).slice(8, -1); - "Object" === I && G.constructor && (I = G.constructor.name); - return "Map" === I || "Set" === I ? Array.from(G) : "Arguments" === I || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(I) ? w(G, H) : undefined; - } - }(F) || function () { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - }(); - }(A.buffer.slice(0, B)), [".", z.charAt(2)]); - if (E.join("").match(/\./g).length < 4) { - return { - refreshFromBuffer: true, - buffer: E, - caret: B + 2 - }; - } - } - return x.test(z); - } - q.default.extendAliases({ - cssunit: { - regex: "[+-]?[0-9]+\\.?([0-9]+)?(px|em|rem|ex|%|in|cm|mm|pt|pc)" - }, - url: { - regex: "(https?|ftp)://.*", - autoUnmask: false, - keepStatic: false, - tabThrough: true - }, - ip: { - mask: "i{1,3}.j{1,3}.k{1,3}.l{1,3}", - definitions: { - i: { - validator: y - }, - j: { - validator: y - }, - k: { - validator: y - }, - l: { - validator: y - } - }, - onUnMask: function (z, A, B) { - return z; - }, - inputmode: "decimal", - substitutes: { - ",": "." - } - }, - email: { - mask: function (z) { - var A = z.separator; - var B = z.quantifier; - var C = "*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]"; - var D = C; - if (A) { - for (var E = 0; E < B; E++) { - D += "[".concat(A).concat(C, "]"); - } - } - return D; - }, - greedy: false, - casing: "lower", - separator: null, - quantifier: 5, - skipOptionalPartCharacter: "", - onBeforePaste: function (z, A) { - return (z = z.toLowerCase()).replace("mailto:", ""); - }, - definitions: { - "*": { - validator: "[0-91-9A-Za-zА-яЁёÀ-ÿµ!#$%&'*+/=?^_`{|}~-]" - }, - "-": { - validator: "[0-9A-Za-z-]" - } - }, - onUnMask: function (z, A, B) { - return z; - }, - inputmode: "email" - }, - mac: { - mask: "##:##:##:##:##:##" - }, - vin: { - mask: "V{13}9{4}", - definitions: { - V: { - validator: "[A-HJ-NPR-Za-hj-npr-z\\d]", - casing: "upper" - } - }, - clearIncomplete: true, - autoUnmask: true - }, - ssn: { - mask: "999-99-9999", - postValidation: function (z, A, B, C, D, E, F) { - var G = v.getMaskTemplate.call(this, true, u.getLastValidPosition.call(this), true, true); - return /^(?!219-09-9999|078-05-1120)(?!666|000|9.{2}).{3}-(?!00).{2}-(?!0{4}).{4}$/.test(G.join("")); - } - } - }); - }, - 207: function (j, k, m) { - var p = x(m(7184)); - var q = x(m(2394)); - var v = m(2839); - var w = m(8711); - function x(E) { - return E && E.__esModule ? E : { - default: E - }; - } - var y = q.default.dependencyLib; - function z(E, F) { - for (var G = "", H = 0; H < E.length; H++) { - q.default.prototype.definitions[E.charAt(H)] || F.definitions[E.charAt(H)] || F.optionalmarker[0] === E.charAt(H) || F.optionalmarker[1] === E.charAt(H) || F.quantifiermarker[0] === E.charAt(H) || F.quantifiermarker[1] === E.charAt(H) || F.groupmarker[0] === E.charAt(H) || F.groupmarker[1] === E.charAt(H) || F.alternatormarker === E.charAt(H) ? G += "\\" + E.charAt(H) : G += E.charAt(H); - } - return G; - } - function A(E, F, G, H) { - if (E.length > 0 && F > 0 && (!G.digitsOptional || H)) { - var I = E.indexOf(G.radixPoint); - var J = false; - G.negationSymbol.back === E[E.length - 1] && (J = true, E.length--); - -1 === I && (E.push(G.radixPoint), I = E.length - 1); - for (var K = 1; K <= F; K++) { - isFinite(E[I + K]) || (E[I + K] = "0"); - } - } - J && E.push(G.negationSymbol.back); - return E; - } - function B(E, F) { - var G = 0; - for (var H in "+" === E && (G = w.seekNext.call(this, F.validPositions.length - 1)), F.tests) if ((H = parseInt(H)) >= G) { - for (var I = 0, J = F.tests[H].length; I < J; I++) { - if ((undefined === F.validPositions[H] || "-" === E) && F.tests[H][I].match.def === E) { - return H + (undefined !== F.validPositions[H] && "-" !== E ? 1 : 0); - } - } - } - return G; - } - function C(E, F) { - for (var G = -1, H = 0, I = F.validPositions.length; H < I; H++) { - var J = F.validPositions[H]; - if (J && J.match.def === E) { - G = H; - break; - } - } - return G; - } - function D(E, F, G, H, I) { - var J = F.buffer ? F.buffer.indexOf(I.radixPoint) : -1; - var K = (-1 !== J || H && I.jitMasking) && new RegExp(I.definitions[9].validator).test(E); - return !H && I._radixDance && -1 !== J && K && null == F.validPositions[J] ? { - insert: { - pos: J === G ? J + 1 : J, - c: I.radixPoint - }, - pos: G - } : K; - } - q.default.extendAliases({ - numeric: { - mask: function (E) { - E.repeat = 0; - E.groupSeparator === E.radixPoint && E.digits && "0" !== E.digits && ("." === E.radixPoint ? E.groupSeparator = "," : "," === E.radixPoint ? E.groupSeparator = "." : E.groupSeparator = ""); - " " === E.groupSeparator && (E.skipOptionalPartCharacter = undefined); - E.placeholder.length > 1 && (E.placeholder = E.placeholder.charAt(0)); - "radixFocus" === E.positionCaretOnClick && "" === E.placeholder && (E.positionCaretOnClick = "lvp"); - var F = "0"; - var G = E.radixPoint; - true === E.numericInput && undefined === E.__financeInput ? (F = "1", E.positionCaretOnClick = "radixFocus" === E.positionCaretOnClick ? "lvp" : E.positionCaretOnClick, E.digitsOptional = false, isNaN(E.digits) && (E.digits = 2), E._radixDance = false, G = "," === E.radixPoint ? "?" : "!", "" !== E.radixPoint && undefined === E.definitions[G] && (E.definitions[G] = {}, E.definitions[G].validator = "[" + E.radixPoint + "]", E.definitions[G].placeholder = E.radixPoint, E.definitions[G].static = true, E.definitions[G].generated = true)) : (E.__financeInput = false, E.numericInput = true); - var H; - var I = "[+]"; - if (I += z(E.prefix, E), "" !== E.groupSeparator ? (undefined === E.definitions[E.groupSeparator] && (E.definitions[E.groupSeparator] = {}, E.definitions[E.groupSeparator].validator = "[" + E.groupSeparator + "]", E.definitions[E.groupSeparator].placeholder = E.groupSeparator, E.definitions[E.groupSeparator].static = true, E.definitions[E.groupSeparator].generated = true), I += E._mask(E)) : I += "9{+}", undefined !== E.digits && 0 !== E.digits) { - var J = E.digits.toString().split(","); - isFinite(J[0]) && J[1] && isFinite(J[1]) ? I += G + F + "{" + E.digits + "}" : (isNaN(E.digits) || parseInt(E.digits) > 0) && (E.digitsOptional || E.jitMasking ? (H = I + G + F + "{0," + E.digits + "}", E.keepStatic = true) : I += G + F + "{" + E.digits + "}"); - } else { - E.inputmode = "numeric"; - } - I += z(E.suffix, E); - I += "[-]"; - H && (I = [H + z(E.suffix, E) + "[-]", I]); - E.greedy = false; - (function (K) { - undefined === K.parseMinMaxOptions && (null !== K.min && (K.min = K.min.toString().replace(new RegExp((0, p.default)(K.groupSeparator), "g"), ""), "," === K.radixPoint && (K.min = K.min.replace(K.radixPoint, ".")), K.min = isFinite(K.min) ? parseFloat(K.min) : NaN, isNaN(K.min) && (K.min = Number.MIN_VALUE)), null !== K.max && (K.max = K.max.toString().replace(new RegExp((0, p.default)(K.groupSeparator), "g"), ""), "," === K.radixPoint && (K.max = K.max.replace(K.radixPoint, ".")), K.max = isFinite(K.max) ? parseFloat(K.max) : NaN, isNaN(K.max) && (K.max = Number.MAX_VALUE)), K.parseMinMaxOptions = "done"); - })(E); - "" !== E.radixPoint && E.substituteRadixPoint && (E.substitutes["." == E.radixPoint ? "," : "."] = E.radixPoint); - return I; - }, - _mask: function (E) { - return "(" + E.groupSeparator + "999){+|1}"; - }, - digits: "*", - digitsOptional: true, - enforceDigitsOnBlur: false, - radixPoint: ".", - positionCaretOnClick: "radixFocus", - _radixDance: true, - groupSeparator: "", - allowMinus: true, - negationSymbol: { - front: "-", - back: "" - }, - prefix: "", - suffix: "", - min: null, - max: null, - SetMaxOnOverflow: false, - step: 1, - inputType: "text", - unmaskAsNumber: false, - roundingFN: Math.round, - inputmode: "decimal", - shortcuts: { - k: "1000", - m: "1000000" - }, - placeholder: "0", - greedy: false, - rightAlign: true, - insertMode: true, - autoUnmask: false, - skipOptionalPartCharacter: "", - usePrototypeDefinitions: false, - stripLeadingZeroes: true, - substituteRadixPoint: true, - definitions: { - 0: { - validator: D - }, - 1: { - validator: D, - definitionSymbol: "9" - }, - 9: { - validator: "[0-90-9٠-٩۰-۹]", - definitionSymbol: "*" - }, - "+": { - validator: function (E, F, G, H, I) { - return I.allowMinus && ("-" === E || E === I.negationSymbol.front); - } - }, - "-": { - validator: function (E, F, G, H, I) { - return I.allowMinus && E === I.negationSymbol.back; - } - } - }, - preValidation: function (E, F, G, H, I, J, K, L) { - var M = this; - if (false !== I.__financeInput && G === I.radixPoint) { - return false; - } - var N = E.indexOf(I.radixPoint); - var O = F; - if (F = function (T, U, V, W, X) { - X._radixDance && X.numericInput && U !== X.negationSymbol.back && T <= V && (V > 0 || U == X.radixPoint) && (undefined === W.validPositions[T - 1] || W.validPositions[T - 1].input !== X.negationSymbol.back) && (T -= 1); - return T; - }(F, G, N, J, I), "-" === G || G === I.negationSymbol.front) { - if (true !== I.allowMinus) { - return false; - } - var P = false; - var Q = C("+", J); - var R = C("-", J); - -1 !== Q && (P = [Q], -1 !== R && P.push(R)); - return false !== P ? { - remove: P, - caret: O - I.negationSymbol.back.length - } : { - insert: [{ - pos: B.call(M, "+", J), - c: I.negationSymbol.front, - fromIsValid: true - }, { - pos: B.call(M, "-", J), - c: I.negationSymbol.back, - fromIsValid: undefined - }], - caret: O + I.negationSymbol.back.length - }; - } - if (G === I.groupSeparator) { - return { - caret: O - }; - } - if (L) { - return true; - } - if (-1 !== N && true === I._radixDance && false === H && G === I.radixPoint && undefined !== I.digits && (isNaN(I.digits) || parseInt(I.digits) > 0) && N !== F) { - var S = B.call(M, I.radixPoint, J); - J.validPositions[S] && (J.validPositions[S].generatedInput = J.validPositions[S].generated || false); - return { - caret: I._radixDance && F === N - 1 ? N + 1 : N - }; - } - if (false === I.__financeInput) { - if (H) { - if (I.digitsOptional) { - return { - rewritePosition: K.end - }; - } - if (!I.digitsOptional) { - if (K.begin > N && K.end <= N) { - return G === I.radixPoint ? { - insert: { - pos: N + 1, - c: "0", - fromIsValid: true - }, - rewritePosition: N - } : { - rewritePosition: N + 1 - }; - } - if (K.begin < N) { - return { - rewritePosition: K.begin - 1 - }; - } - } - } else { - if (!I.showMaskOnHover && !I.showMaskOnFocus && !I.digitsOptional && I.digits > 0 && "" === this.__valueGet.call(this.el)) { - return { - rewritePosition: N - }; - } - } - } - return { - rewritePosition: F - }; - }, - postValidation: function (E, F, G, H, I, J, K) { - if (false === H) { - return H; - } - if (K) { - return true; - } - if (null !== I.min || null !== I.max) { - var L = I.onUnMask(E.slice().reverse().join(""), undefined, y.extend({}, I, { - unmaskAsNumber: true - })); - if (null !== I.min && L < I.min && (L.toString().length > I.min.toString().length || L < 0)) { - return false; - } - if (null !== I.max && L > I.max) { - return !!I.SetMaxOnOverflow && { - refreshFromBuffer: true, - buffer: A(I.max.toString().replace(".", I.radixPoint).split(""), I.digits, I).reverse() - }; - } - } - return H; - }, - onUnMask: function (E, F, G) { - if ("" === F && true === G.nullable) { - return F; - } - var H = E.replace(G.prefix, ""); - H = (H = H.replace(G.suffix, "")).replace(new RegExp((0, p.default)(G.groupSeparator), "g"), ""); - "" !== G.placeholder.charAt(0) && (H = H.replace(new RegExp(G.placeholder.charAt(0), "g"), "0")); - return G.unmaskAsNumber ? ("" !== G.radixPoint && -1 !== H.indexOf(G.radixPoint) && (H = H.replace(p.default.call(this, G.radixPoint), ".")), H = (H = H.replace(new RegExp("^" + (0, p.default)(G.negationSymbol.front)), "-")).replace(new RegExp((0, p.default)(G.negationSymbol.back) + "$"), ""), Number(H)) : H; - }, - isComplete: function (E, F) { - var G = (F.numericInput ? E.slice().reverse() : E).join(""); - G = (G = (G = (G = (G = G.replace(new RegExp("^" + (0, p.default)(F.negationSymbol.front)), "-")).replace(new RegExp((0, p.default)(F.negationSymbol.back) + "$"), "")).replace(F.prefix, "")).replace(F.suffix, "")).replace(new RegExp((0, p.default)(F.groupSeparator) + "([0-9]{3})", "g"), "$1"); - "," === F.radixPoint && (G = G.replace((0, p.default)(F.radixPoint), ".")); - return isFinite(G); - }, - onBeforeMask: function (E, F) { - var G; - E = null !== (G = E) && undefined !== G ? G : ""; - var H = F.radixPoint || ","; - isFinite(F.digits) && (F.digits = parseInt(F.digits)); - "number" != typeof E && "number" !== F.inputType || "" === H || (E = E.toString().replace(".", H)); - var I = "-" === E.charAt(0) || E.charAt(0) === F.negationSymbol.front; - var J = E.split(H); - var K = J[0].replace(/[^\-0-9]/g, ""); - var L = J.length > 1 ? J[1].replace(/[^0-9]/g, "") : ""; - var M = J.length > 1; - E = K + ("" !== L ? H + L : L); - var N = 0; - if ("" !== H && (N = F.digitsOptional ? F.digits < L.length ? F.digits : L.length : F.digits, "" !== L || !F.digitsOptional)) { - var O = Math.pow(10, N || 1); - E = E.replace((0, p.default)(H), "."); - isNaN(parseFloat(E)) || (E = (F.roundingFN(parseFloat(E) * O) / O).toFixed(N)); - E = E.toString().replace(".", H); - } - if (0 === F.digits && -1 !== E.indexOf(H) && (E = E.substring(0, E.indexOf(H))), null !== F.min || null !== F.max) { - var P = E.toString().replace(H, "."); - null !== F.min && P < F.min ? E = F.min.toString().replace(".", H) : null !== F.max && P > F.max && (E = F.max.toString().replace(".", H)); - } - I && "-" !== E.charAt(0) && (E = "-" + E); - return A(E.toString().split(""), N, F, M).join(""); - }, - onBeforeWrite: function (E, F, G, H) { - function I(R, S) { - if (false !== H.__financeInput || S) { - var T = R.indexOf(H.radixPoint); - -1 !== T && R.splice(T, 1); - } - if ("" !== H.groupSeparator) { - for (; -1 !== (T = R.indexOf(H.groupSeparator));) { - R.splice(T, 1); - } - } - return R; - } - var J; - var K; - if (H.stripLeadingZeroes && (K = function (R, S) { - var T = new RegExp("(^" + ("" !== S.negationSymbol.front ? (0, p.default)(S.negationSymbol.front) + "?" : "") + (0, p.default)(S.prefix) + ")(.*)(" + (0, p.default)(S.suffix) + ("" != S.negationSymbol.back ? (0, p.default)(S.negationSymbol.back) + "?" : "") + "$)").exec(R.slice().reverse().join("")); - var U = T ? T[2] : ""; - var V = false; - U && (U = U.split(S.radixPoint.charAt(0))[0], V = new RegExp("^[0" + S.groupSeparator + "]*").exec(U)); - return !(!V || !(V[0].length > 1 || V[0].length > 0 && V[0].length < U.length)) && V; - }(F, H))) { - for (var L = F.join("").lastIndexOf(K[0].split("").reverse().join("")) - (K[0] == K.input ? 0 : 1), M = K[0] == K.input ? 1 : 0, N = K[0].length - M; N > 0; N--) { - this.maskset.validPositions.splice(L + N, 1); - delete F[L + N]; - } - } - if (E) { - switch (E.type) { - case "blur": - case "checkval": - if (null !== H.min) { - var O = H.onUnMask(F.slice().reverse().join(""), undefined, y.extend({}, H, { - unmaskAsNumber: true - })); - if (null !== H.min && O < H.min) { - return { - refreshFromBuffer: true, - buffer: A(H.min.toString().replace(".", H.radixPoint).split(""), H.digits, H).reverse() - }; - } - } - if (F[F.length - 1] === H.negationSymbol.front) { - var P = new RegExp("(^" + ("" != H.negationSymbol.front ? (0, p.default)(H.negationSymbol.front) + "?" : "") + (0, p.default)(H.prefix) + ")(.*)(" + (0, p.default)(H.suffix) + ("" != H.negationSymbol.back ? (0, p.default)(H.negationSymbol.back) + "?" : "") + "$)").exec(I(F.slice(), true).reverse().join("")); - 0 == (P ? P[2] : "") && (J = { - refreshFromBuffer: true, - buffer: [0] - }); - } else { - "" !== H.radixPoint && F.indexOf(H.radixPoint) === H.suffix.length && (J && J.buffer ? J.buffer.splice(0, 1 + H.suffix.length) : (F.splice(0, 1 + H.suffix.length), J = { - refreshFromBuffer: true, - buffer: I(F) - })); - } - if (H.enforceDigitsOnBlur) { - var Q = (J = J || {}) && J.buffer || F.slice().reverse(); - J.refreshFromBuffer = true; - J.buffer = A(Q, H.digits, H, true).reverse(); - } - } - } - return J; - }, - onKeyDown: function (E, F, G, H) { - var I; - var J = y(this); - if (3 != E.location) { - var K; - var L = E.key; - if ((K = H.shortcuts && H.shortcuts[L]) && K.length > 1) { - this.inputmask.__valueSet.call(this, parseFloat(this.inputmask.unmaskedvalue()) * parseInt(K)); - J.trigger("setvalue"); - return false; - } - } - if (E.ctrlKey) { - switch (E.key) { - case v.keys.ArrowUp: - this.inputmask.__valueSet.call(this, parseFloat(this.inputmask.unmaskedvalue()) + parseInt(H.step)); - J.trigger("setvalue"); - return false; - case v.keys.ArrowDown: - this.inputmask.__valueSet.call(this, parseFloat(this.inputmask.unmaskedvalue()) - parseInt(H.step)); - J.trigger("setvalue"); - return false; - } - } - if (!E.shiftKey && (E.key === v.keys.Delete || E.key === v.keys.Backspace || E.key === v.keys.BACKSPACE_SAFARI) && G.begin !== F.length) { - if (F[E.key === v.keys.Delete ? G.begin - 1 : G.end] === H.negationSymbol.front) { - I = F.slice().reverse(); - "" !== H.negationSymbol.front && I.shift(); - "" !== H.negationSymbol.back && I.pop(); - J.trigger("setvalue", [I.join(""), G.begin]); - return false; - } - if (true === H._radixDance) { - var M; - var N = F.indexOf(H.radixPoint); - if (H.digitsOptional) { - if (0 === N) { - (I = F.slice().reverse()).pop(); - J.trigger("setvalue", [I.join(""), G.begin >= I.length ? I.length : G.begin]); - return false; - } - } else { - if (-1 !== N && (G.begin < N || G.end < N || E.key === v.keys.Delete && (G.begin === N || G.begin - 1 === N))) { - G.begin === G.end && (E.key === v.keys.Backspace || E.key === v.keys.BACKSPACE_SAFARI ? G.begin++ : E.key === v.keys.Delete && G.begin - 1 === N && (M = y.extend({}, G), G.begin--, G.end--)); - (I = F.slice().reverse()).splice(I.length - G.begin, G.begin - G.end + 1); - I = A(I, H.digits, H).join(""); - M && (G = M); - J.trigger("setvalue", [I, G.begin >= I.length ? N + 1 : G.begin]); - return false; - } - } - } - } - } - }, - currency: { - prefix: "", - groupSeparator: ",", - alias: "numeric", - digits: 2, - digitsOptional: false - }, - decimal: { - alias: "numeric" - }, - integer: { - alias: "numeric", - inputmode: "numeric", - digits: 0 - }, - percentage: { - alias: "numeric", - min: 0, - max: 100, - suffix: " %", - digits: 0, - allowMinus: false - }, - indianns: { - alias: "numeric", - _mask: function (E) { - return "(" + E.groupSeparator + "99){*|1}(" + E.groupSeparator + "999){1|1}"; - }, - groupSeparator: ",", - radixPoint: ".", - placeholder: "0", - digits: 2, - digitsOptional: false - } - }); - }, - 9380: function (i, j) { - Object.defineProperty(j, "__esModule", { - value: true - }); - j.default = undefined; - var k = !("undefined" == typeof window || !window.document || !window.document.createElement); - j.default = k ? window : {}; - }, - 7760: function (j, k, m) { - Object.defineProperty(k, "__esModule", { - value: true - }); - k.HandleNativePlaceholder = function (D, E) { - var F = D ? D.inputmask : this; - if (p.ie) { - if (D.inputmask._valueGet() !== E && (D.placeholder !== E || "" === D.placeholder)) { - var G = w.getBuffer.call(F).slice(); - var H = D.inputmask._valueGet(); - if (H !== E) { - var I = w.getLastValidPosition.call(F); - -1 === I && H === w.getBufferTemplate.call(F).join("") ? G = [] : -1 !== I && A.call(F, G); - C(D, G); - } - } - } else { - D.placeholder !== E && (D.placeholder = E, "" === D.placeholder && D.removeAttribute("placeholder")); - } - }; - k.applyInputValue = z; - k.checkVal = B; - k.clearOptionalTail = A; - k.unmaskedvalue = function (D) { - var E = D ? D.inputmask : this; - var F = E.opts; - var G = E.maskset; - if (D) { - if (undefined === D.inputmask) { - return D.value; - } - D.inputmask && D.inputmask.refreshValue && z(D, D.inputmask._valueGet(true)); - } - for (var H = [], I = G.validPositions, J = 0, K = I.length; J < K; J++) { - I[J] && I[J].match && (1 != I[J].match.static || Array.isArray(G.metadata) && true !== I[J].generatedInput) && H.push(I[J].input); - } - var L = 0 === H.length ? "" : (E.isRTL ? H.reverse() : H).join(""); - if ("function" == typeof F.onUnMask) { - var M = (E.isRTL ? w.getBuffer.call(E).slice().reverse() : w.getBuffer.call(E)).join(""); - L = F.onUnMask.call(E, M, L, F); - } - return L; - }; - k.writeBuffer = C; - var p = m(9845); - var q = m(6030); - var v = m(2839); - var w = m(8711); - var x = m(7215); - var y = m(4713); - function z(D, E, F) { - var G = D ? D.inputmask : this; - var H = G.opts; - D.inputmask.refreshValue = false; - "function" == typeof H.onBeforeMask && (E = H.onBeforeMask.call(G, E, H) || E); - B(D, true, false, E = (E || "").toString().split(""), F); - G.undoValue = G._valueGet(true); - (H.clearMaskOnLostFocus || H.clearIncomplete) && D.inputmask._valueGet() === w.getBufferTemplate.call(G).join("") && -1 === w.getLastValidPosition.call(G) && D.inputmask._valueSet(""); - } - function A(D) { - D.length = 0; - for (var E, F = y.getMaskTemplate.call(this, true, 0, true, undefined, true); undefined !== (E = F.shift());) { - D.push(E); - } - return D; - } - function B(D, F, G, H, I) { - var J; - var K = D ? D.inputmask : this; - var L = K.maskset; - var M = K.opts; - var N = K.dependencyLib; - var P = H.slice(); - var Q = ""; - var R = -1; - var S = M.skipOptionalPartCharacter; - M.skipOptionalPartCharacter = ""; - w.resetMaskSet.call(K, false); - K.clicked = 0; - R = M.radixPoint ? w.determineNewCaretPosition.call(K, { - begin: 0, - end: 0 - }, false, false === M.__financeInput ? "radixFocus" : undefined).begin : 0; - L.p = R; - K.caretPos = { - begin: R - }; - var T = []; - var U = K.caretPos; - if (P.forEach(function (a0, a1) { - if (undefined !== a0) { - var a2 = new N.Event("_checkval"); - a2.key = a0; - Q += a0; - var a3 = w.getLastValidPosition.call(K, undefined, true); - !function (a4, a5) { - for (var a6 = y.getMaskTemplate.call(K, true, 0).slice(a4, w.seekNext.call(K, a4, false, false)).join("").replace(/'/g, ""), a7 = a6.indexOf(a5); a7 > 0 && " " === a6[a7 - 1];) { - a7--; - } - var a8 = 0 === a7 && !w.isMask.call(K, a4) && (y.getTest.call(K, a4).match.nativeDef === a5.charAt(0) || true === y.getTest.call(K, a4).match.static && y.getTest.call(K, a4).match.nativeDef === "'" + a5.charAt(0) || " " === y.getTest.call(K, a4).match.nativeDef && (y.getTest.call(K, a4 + 1).match.nativeDef === a5.charAt(0) || true === y.getTest.call(K, a4 + 1).match.static && y.getTest.call(K, a4 + 1).match.nativeDef === "'" + a5.charAt(0))); - if (!a8 && a7 > 0 && !w.isMask.call(K, a4, false, true)) { - var a9 = w.seekNext.call(K, a4); - K.caretPos.begin < a9 && (K.caretPos = { - begin: a9 - }); - } - return a8; - }(R, Q) ? (J = q.EventHandlers.keypressEvent.call(K, a2, true, false, G, K.caretPos.begin)) && (R = K.caretPos.begin + 1, Q = "") : J = q.EventHandlers.keypressEvent.call(K, a2, true, false, G, a3 + 1); - J ? (undefined !== J.pos && L.validPositions[J.pos] && true === L.validPositions[J.pos].match.static && undefined === L.validPositions[J.pos].alternation && (T.push(J.pos), K.isRTL || (J.forwardPosition = J.pos + 1)), C.call(K, undefined, w.getBuffer.call(K), J.forwardPosition, a2, false), K.caretPos = { - begin: J.forwardPosition, - end: J.forwardPosition - }, U = K.caretPos) : undefined === L.validPositions[a1] && P[a1] === y.getPlaceholder.call(K, a1) && w.isMask.call(K, a1, true) ? K.caretPos.begin++ : K.caretPos = U; - } - }), T.length > 0) { - var V; - var W; - var X = w.seekNext.call(K, -1, undefined, false); - if (!x.isComplete.call(K, w.getBuffer.call(K)) && T.length <= X || x.isComplete.call(K, w.getBuffer.call(K)) && T.length > 0 && T.length !== X && 0 === T[0]) { - for (var Y = X; undefined !== (V = T.shift());) { - if (V < Y) { - var Z = new N.Event("_checkval"); - if ((W = L.validPositions[V]).generatedInput = true, Z.key = W.input, (J = q.EventHandlers.keypressEvent.call(K, Z, true, false, G, Y)) && undefined !== J.pos && J.pos !== V && L.validPositions[J.pos] && true === L.validPositions[J.pos].match.static) { - T.push(J.pos); - } else { - if (!J) { - break; - } - } - Y++; - } - } - } - } - F && C.call(K, D, w.getBuffer.call(K), J ? J.forwardPosition : K.caretPos.begin, I || new N.Event("checkval"), I && ("input" === I.type && K.undoValue !== w.getBuffer.call(K).join("") || "paste" === I.type)); - M.skipOptionalPartCharacter = S; - } - function C(D, E, F, G, H) { - var I = D ? D.inputmask : this; - var J = I.opts; - var K = I.dependencyLib; - if (G && "function" == typeof J.onBeforeWrite) { - var L = J.onBeforeWrite.call(I, G, E, F, J); - if (L) { - if (L.refreshFromBuffer) { - var M = L.refreshFromBuffer; - x.refreshFromBuffer.call(I, true === M ? M : M.start, M.end, L.buffer || E); - E = w.getBuffer.call(I, true); - } - undefined !== F && (F = undefined !== L.caret ? L.caret : F); - } - } - if (undefined !== D && (D.inputmask._valueSet(E.join("")), undefined === F || undefined !== G && "blur" === G.type || w.caret.call(I, D, F, undefined, undefined, undefined !== G && "keydown" === G.type && (G.key === v.keys.Delete || G.key === v.keys.Backspace)), undefined === D.inputmask.writeBufferHook || D.inputmask.writeBufferHook(F), true === H)) { - var N = K(D); - var O = D.inputmask._valueGet(); - D.inputmask.skipInputEvent = true; - N.trigger("input"); - setTimeout(function () { - O === w.getBufferTemplate.call(I).join("") ? N.trigger("cleared") : true === x.isComplete.call(I, E) && N.trigger("complete"); - }, 0); - } - } - }, - 2394: function (j, k, q) { - Object.defineProperty(k, "__esModule", { - value: true - }); - k.default = undefined; - var w = J(q(3976)); - var x = J(q(7392)); - var z = J(q(4963)); - var A = q(9716); - var B = J(q(9380)); - var C = q(7760); - var D = q(157); - var E = q(2391); - var F = q(8711); - var G = q(7215); - var H = q(4713); - function I(O) { - return (I = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (P) { - return typeof P; - } : function (P) { - return P && "function" == typeof Symbol && P.constructor === Symbol && P !== Symbol.prototype ? "symbol" : typeof P; - })(O); - } - function J(O) { - return O && O.__esModule ? O : { - default: O - }; - } - var K = B.default.document; - var L = "_inputmask_opts"; - function M(O, P, Q) { - if (!(this instanceof M)) { - return new M(O, P, Q); - } - this.dependencyLib = z.default; - this.el = undefined; - this.events = {}; - this.maskset = undefined; - true !== Q && ("[object Object]" === Object.prototype.toString.call(O) ? P = O : (P = P || {}, O && (P.alias = O)), this.opts = z.default.extend(true, {}, this.defaults, P), this.noMasksCache = P && undefined !== P.definitions, this.userOptions = P || {}, N(this.opts.alias, P, this.opts)); - this.refreshValue = false; - this.undoValue = undefined; - this.$el = undefined; - this.skipInputEvent = false; - this.validationEvent = false; - this.ignorable = false; - this.maxLength; - this.mouseEnter = false; - this.clicked = 0; - this.originalPlaceholder = undefined; - this.isComposing = false; - this.hasAlternator = false; - } - function N(O, P, Q) { - var R = M.prototype.aliases[O]; - return R ? (R.alias && N(R.alias, undefined, Q), z.default.extend(true, Q, R), z.default.extend(true, Q, P), true) : (null === Q.mask && (Q.mask = O), false); - } - M.prototype = { - dataAttribute: "data-inputmask", - defaults: w.default, - definitions: x.default, - aliases: {}, - masksCache: {}, - i18n: {}, - get isRTL() { - return this.opts.isRTL || this.opts.numericInput; - }, - mask: function (O) { - var P = this; - "string" == typeof O && (O = K.getElementById(O) || K.querySelectorAll(O)); - (O = O.nodeName ? [O] : Array.isArray(O) ? O : [].slice.call(O)).forEach(function (Q, R) { - var S = z.default.extend(true, {}, P.opts); - if (function (U, V, W, X) { - function Y(a4, a5) { - var a6 = "" === X ? a4 : X + "-" + a4; - null !== (a5 = undefined !== a5 ? a5 : U.getAttribute(a6)) && ("string" == typeof a5 && (0 === a4.indexOf("on") ? a5 = B.default[a5] : "false" === a5 ? a5 = false : "true" === a5 && (a5 = true)), W[a4] = a5); - } - if (true === V.importDataAttributes) { - var Z; - var a0; - var a1; - var a2; - var a3 = U.getAttribute(X); - if (a3 && "" !== a3 && (a3 = a3.replace(/'/g, "\""), a0 = JSON.parse("{" + a3 + "}")), a0) { - for (a2 in a1 = undefined, a0) if ("alias" === a2.toLowerCase()) { - a1 = a0[a2]; - break; - } - } - for (Z in Y("alias", a1), W.alias && N(W.alias, W, V), V) { - if (a0) { - for (a2 in a1 = undefined, a0) if (a2.toLowerCase() === Z.toLowerCase()) { - a1 = a0[a2]; - break; - } - } - Y(Z, a1); - } - } - z.default.extend(true, V, W); - ("rtl" === U.dir || V.rightAlign) && (U.style.textAlign = "right"); - ("rtl" === U.dir || V.numericInput) && (U.dir = "ltr", U.removeAttribute("dir"), V.isRTL = true); - return Object.keys(W).length; - }(Q, S, z.default.extend(true, {}, P.userOptions), P.dataAttribute)) { - var T = (0, E.generateMaskSet)(S, P.noMasksCache); - undefined !== T && (undefined !== Q.inputmask && (Q.inputmask.opts.autoUnmask = true, Q.inputmask.remove()), Q.inputmask = new M(undefined, undefined, true), Q.inputmask.opts = S, Q.inputmask.noMasksCache = P.noMasksCache, Q.inputmask.userOptions = z.default.extend(true, {}, P.userOptions), Q.inputmask.el = Q, Q.inputmask.$el = (0, z.default)(Q), Q.inputmask.maskset = T, z.default.data(Q, L, P.userOptions), D.mask.call(Q.inputmask)); - } - }); - return O && O[0] && O[0].inputmask || this; - }, - option: function (O, P) { - return "string" == typeof O ? this.opts[O] : "object" === I(O) ? (z.default.extend(this.userOptions, O), this.el && true !== P && this.mask(this.el), this) : undefined; - }, - unmaskedvalue: function (O) { - if (this.maskset = this.maskset || (0, E.generateMaskSet)(this.opts, this.noMasksCache), undefined === this.el || undefined !== O) { - var P = ("function" == typeof this.opts.onBeforeMask && this.opts.onBeforeMask.call(this, O, this.opts) || O).split(""); - C.checkVal.call(this, undefined, false, false, P); - "function" == typeof this.opts.onBeforeWrite && this.opts.onBeforeWrite.call(this, undefined, F.getBuffer.call(this), 0, this.opts); - } - return C.unmaskedvalue.call(this, this.el); - }, - remove: function () { - if (this.el) { - z.default.data(this.el, L, null); - var O = this.opts.autoUnmask ? (0, C.unmaskedvalue)(this.el) : this._valueGet(this.opts.autoUnmask); - O !== F.getBufferTemplate.call(this).join("") ? this._valueSet(O, this.opts.autoUnmask) : this._valueSet(""); - A.EventRuler.off(this.el); - Object.getOwnPropertyDescriptor && Object.getPrototypeOf ? Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this.el), "value") && this.__valueGet && Object.defineProperty(this.el, "value", { - get: this.__valueGet, - set: this.__valueSet, - configurable: true - }) : K.__lookupGetter__ && this.el.__lookupGetter__("value") && this.__valueGet && (this.el.__defineGetter__("value", this.__valueGet), this.el.__defineSetter__("value", this.__valueSet)); - this.el.inputmask = undefined; - } - return this.el; - }, - getemptymask: function () { - this.maskset = this.maskset || (0, E.generateMaskSet)(this.opts, this.noMasksCache); - return (this.isRTL ? F.getBufferTemplate.call(this).reverse() : F.getBufferTemplate.call(this)).join(""); - }, - hasMaskedValue: function () { - return !this.opts.autoUnmask; - }, - isComplete: function () { - this.maskset = this.maskset || (0, E.generateMaskSet)(this.opts, this.noMasksCache); - return G.isComplete.call(this, F.getBuffer.call(this)); - }, - getmetadata: function () { - if (this.maskset = this.maskset || (0, E.generateMaskSet)(this.opts, this.noMasksCache), Array.isArray(this.maskset.metadata)) { - var O = H.getMaskTemplate.call(this, true, 0, false).join(""); - this.maskset.metadata.forEach(function (P) { - return P.mask !== O || (O = P, false); - }); - return O; - } - return this.maskset.metadata; - }, - isValid: function (O) { - if (this.maskset = this.maskset || (0, E.generateMaskSet)(this.opts, this.noMasksCache), O) { - var P = ("function" == typeof this.opts.onBeforeMask && this.opts.onBeforeMask.call(this, O, this.opts) || O).split(""); - C.checkVal.call(this, undefined, true, false, P); - } else { - O = this.isRTL ? F.getBuffer.call(this).slice().reverse().join("") : F.getBuffer.call(this).join(""); - } - for (var Q = F.getBuffer.call(this), R = F.determineLastRequiredPosition.call(this), S = Q.length - 1; S > R && !F.isMask.call(this, S); S--) {} - Q.splice(R, S + 1 - R); - return G.isComplete.call(this, Q) && O === (this.isRTL ? F.getBuffer.call(this).slice().reverse().join("") : F.getBuffer.call(this).join("")); - }, - format: function (O, P) { - this.maskset = this.maskset || (0, E.generateMaskSet)(this.opts, this.noMasksCache); - var Q = ("function" == typeof this.opts.onBeforeMask && this.opts.onBeforeMask.call(this, O, this.opts) || O).split(""); - C.checkVal.call(this, undefined, true, false, Q); - var R = this.isRTL ? F.getBuffer.call(this).slice().reverse().join("") : F.getBuffer.call(this).join(""); - return P ? { - value: R, - metadata: this.getmetadata() - } : R; - }, - setValue: function (O) { - this.el && (0, z.default)(this.el).trigger("setvalue", [O]); - }, - analyseMask: E.analyseMask - }; - M.extendDefaults = function (O) { - z.default.extend(true, M.prototype.defaults, O); - }; - M.extendDefinitions = function (O) { - z.default.extend(true, M.prototype.definitions, O); - }; - M.extendAliases = function (O) { - z.default.extend(true, M.prototype.aliases, O); - }; - M.format = function (O, P, Q) { - return M(P).format(O, Q); - }; - M.unmask = function (O, P) { - return M(P).unmaskedvalue(O); - }; - M.isValid = function (O, P) { - return M(P).isValid(O); - }; - M.remove = function (O) { - "string" == typeof O && (O = K.getElementById(O) || K.querySelectorAll(O)); - (O = O.nodeName ? [O] : O).forEach(function (P) { - P.inputmask && P.inputmask.remove(); - }); - }; - M.setValue = function (O, P) { - "string" == typeof O && (O = K.getElementById(O) || K.querySelectorAll(O)); - (O = O.nodeName ? [O] : O).forEach(function (Q) { - Q.inputmask ? Q.inputmask.setValue(P) : (0, z.default)(Q).trigger("setvalue", [P]); - }); - }; - M.dependencyLib = z.default; - B.default.Inputmask = M; - k.default = M; - }, - 5296: function (j, k, m) { - function q(I) { - return (q = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (J) { - return typeof J; - } : function (J) { - return J && "function" == typeof Symbol && J.constructor === Symbol && J !== Symbol.prototype ? "symbol" : typeof J; - })(I); - } - var w = F(m(9380)); - var x = F(m(2394)); - function y(I, J) { - for (var K = 0; K < J.length; K++) { - var L = J[K]; - L.enumerable = L.enumerable || false; - L.configurable = true; - "value" in L && (L.writable = true); - Object.defineProperty(I, (M = function (N, O) { - if ("object" !== q(N) || null === N) { - return N; - } - var P = N[Symbol.toPrimitive]; - if (undefined !== P) { - var Q = P.call(N, O); - if ("object" !== q(Q)) { - return Q; - } - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return String(N); - }(L.key, "string"), "symbol" === q(M) ? M : String(M)), L); - } - var M; - } - function z(I) { - var J = C(); - return function () { - var K; - var L = E(I); - if (J) { - var M = E(this).constructor; - K = Reflect.construct(L, arguments, M); - } else { - K = L.apply(this, arguments); - } - return function (N, O) { - if (O && ("object" === q(O) || "function" == typeof O)) { - return O; - } - if (undefined !== O) { - throw new TypeError("Derived constructors may only return object or undefined"); - } - return function (P) { - if (undefined === P) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - return P; - }(N); - }(this, K); - }; - } - function A(I) { - var J = "function" == typeof Map ? new Map() : undefined; - return (A = function (K) { - if (null === K || !function (M) { - try { - return -1 !== Function.toString.call(M).indexOf("[native code]"); - } catch (N) { - return "function" == typeof M; - } - }(K)) { - return K; - } - if ("function" != typeof K) { - throw new TypeError("Super expression must either be null or a function"); - } - if (undefined !== J) { - if (J.has(K)) { - return J.get(K); - } - J.set(K, L); - } - function L() { - return B(K, arguments, E(this).constructor); - } - L.prototype = Object.create(K.prototype, { - constructor: { - value: L, - enumerable: false, - writable: true, - configurable: true - } - }); - return D(L, K); - })(I); - } - function B(I, J, K) { - return (B = C() ? Reflect.construct.bind() : function (L, M, N) { - var O = [null]; - O.push.apply(O, M); - var P = new (Function.bind.apply(L, O))(); - N && D(P, N.prototype); - return P; - }).apply(null, arguments); - } - function C() { - if ("undefined" == typeof Reflect || !Reflect.construct) { - return false; - } - if (Reflect.construct.sham) { - return false; - } - if ("function" == typeof Proxy) { - return true; - } - try { - Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - return true; - } catch (I) { - return false; - } - } - function D(I, J) { - return (D = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (K, L) { - K.__proto__ = L; - return K; - })(I, J); - } - function E(I) { - return (E = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (J) { - return J.__proto__ || Object.getPrototypeOf(J); - })(I); - } - function F(I) { - return I && I.__esModule ? I : { - default: I - }; - } - var G = w.default.document; - if (G && G.head && G.head.attachShadow && w.default.customElements && undefined === w.default.customElements.get("input-mask")) { - var H = function (I) { - !function (N, O) { - if ("function" != typeof O && null !== O) { - throw new TypeError("Super expression must either be null or a function"); - } - N.prototype = Object.create(O && O.prototype, { - constructor: { - value: N, - writable: true, - configurable: true - } - }); - Object.defineProperty(N, "prototype", { - writable: false - }); - O && D(N, O); - }(M, I); - var J; - var K; - var L = z(M); - function M() { - var N; - !function (S, T) { - if (!(S instanceof T)) { - throw new TypeError("Cannot call a class as a function"); - } - }(this, M); - var O = (N = L.call(this)).getAttributeNames(); - var P = N.attachShadow({ - mode: "closed" - }); - for (var Q in N.input = G.createElement("input"), N.input.type = "text", P.appendChild(N.input), O) Object.prototype.hasOwnProperty.call(O, Q) && N.input.setAttribute(O[Q], N.getAttribute(O[Q])); - var R = new x.default(); - R.dataAttribute = ""; - R.mask(N.input); - N.input.inputmask.shadowRoot = P; - return N; - } - J = M; - (K = [{ - key: "attributeChangedCallback", - value: function (N, O, P) { - this.input.setAttribute(N, P); - } - }, { - key: "value", - get: function () { - return this.input.value; - }, - set: function (N) { - this.input.value = N; - } - }]) && y(J.prototype, K); - Object.defineProperty(J, "prototype", { - writable: false - }); - return M; - }(A(HTMLElement)); - w.default.customElements.define("input-mask", H); - } - }, - 2839: function (j, k) { - function m(y) { - return (m = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (z) { - return typeof z; - } : function (z) { - return z && "function" == typeof Symbol && z.constructor === Symbol && z !== Symbol.prototype ? "symbol" : typeof z; - })(y); - } - function p(y, z) { - return function (A) { - if (Array.isArray(A)) { - return A; - } - }(y) || function (A, B) { - var C = null == A ? null : "undefined" != typeof Symbol && A[Symbol.iterator] || A["@@iterator"]; - if (null != C) { - var D; - var E; - var F; - var G; - var H = []; - var I = true; - var J = false; - try { - if (F = (C = C.call(A)).next, 0 === B) { - if (Object(C) !== C) { - return; - } - I = false; - } else { - for (; !(I = (D = F.call(C)).done) && (H.push(D.value), H.length !== B); I = true) {} - } - } catch (K) { - J = true; - E = K; - } finally { - try { - if (!I && null != C.return && (G = C.return(), Object(G) !== G)) { - return; - } - } finally { - if (J) { - throw E; - } - } - } - return H; - } - }(y, z) || function (A, B) { - if (A) { - if ("string" == typeof A) { - return q(A, B); - } - var C = Object.prototype.toString.call(A).slice(8, -1); - "Object" === C && A.constructor && (C = A.constructor.name); - return "Map" === C || "Set" === C ? Array.from(A) : "Arguments" === C || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C) ? q(A, B) : undefined; - } - }(y, z) || function () { - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - }(); - } - function q(y, z) { - (null == z || z > y.length) && (z = y.length); - for (var A = 0, B = new Array(z); A < z; A++) { - B[A] = y[A]; - } - return B; - } - function u(y, z) { - var A = Object.keys(y); - if (Object.getOwnPropertySymbols) { - var B = Object.getOwnPropertySymbols(y); - z && (B = B.filter(function (C) { - return Object.getOwnPropertyDescriptor(y, C).enumerable; - })); - A.push.apply(A, B); - } - return A; - } - function v(y, z, A) { - (z = function (B) { - var C = function (D, E) { - if ("object" !== m(D) || null === D) { - return D; - } - var F = D[Symbol.toPrimitive]; - if (undefined !== F) { - var G = F.call(D, E); - if ("object" !== m(G)) { - return G; - } - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return String(D); - }(B, "string"); - return "symbol" === m(C) ? C : String(C); - }(z)) in y ? Object.defineProperty(y, z, { - value: A, - enumerable: true, - configurable: true, - writable: true - }) : y[z] = A; - return y; - } - Object.defineProperty(k, "__esModule", { - value: true - }); - k.keys = k.keyCode = undefined; - k.toKey = function (y, z) { - return x[y] || (z ? String.fromCharCode(y) : String.fromCharCode(y).toLowerCase()); - }; - k.toKeyCode = function (y) { - return w[y]; - }; - k.keyCode = function (y) { - for (var z = 1; z < arguments.length; z++) { - var A = null != arguments[z] ? arguments[z] : {}; - z % 2 ? u(Object(A), true).forEach(function (B) { - v(y, B, A[B]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(y, Object.getOwnPropertyDescriptors(A)) : u(Object(A)).forEach(function (B) { - Object.defineProperty(y, B, Object.getOwnPropertyDescriptor(A, B)); - }); - } - return y; - }({ - c: 67, - x: 88, - z: 90, - BACKSPACE_SAFARI: 127, - Enter: 13, - Meta_LEFT: 91, - Meta_RIGHT: 92, - Space: 32 - }, { - Alt: 18, - AltGraph: 18, - ArrowDown: 40, - ArrowLeft: 37, - ArrowRight: 39, - ArrowUp: 38, - Backspace: 8, - CapsLock: 20, - Control: 17, - ContextMenu: 93, - Dead: 221, - Delete: 46, - End: 35, - Escape: 27, - F1: 112, - F2: 113, - F3: 114, - F4: 115, - F5: 116, - F6: 117, - F7: 118, - F8: 119, - F9: 120, - F10: 121, - F11: 122, - F12: 123, - Home: 36, - Insert: 45, - NumLock: 144, - PageDown: 34, - PageUp: 33, - Pause: 19, - PrintScreen: 44, - Process: 229, - Shift: 16, - ScrollLock: 145, - Tab: 9, - Unidentified: 229 - }); - var w = k.keyCode; - var x = Object.entries(w).reduce(function (y, z) { - var A = p(z, 2); - var B = A[0]; - var C = A[1]; - y[C] = undefined === y[C] ? B : y[C]; - return y; - }, {}); - k.keys = Object.entries(w).reduce(function (y, z) { - var A = p(z, 2); - var B = A[0]; - A[1]; - y[B] = "Space" === B ? " " : B; - return y; - }, {}); - }, - 2391: function (j, k, m) { - Object.defineProperty(k, "__esModule", { - value: true - }); - k.analyseMask = function (z, B, F) { - var G; - var H; - var I; - var J; - var K; - var L; - var N = /(?:[?*+]|\{[0-9+*]+(?:,[0-9+*]*)?(?:\|[0-9+*]*)?\})|[^.?*+^${[]()|\\]+|./g; - var P = /\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g; - var Q = false; - var U = new v.default(); - var V = []; - var W = []; - var X = false; - function Y(ad, ae, af) { - af = undefined !== af ? af : ad.matches.length; - var ag = ad.matches[af - 1]; - if (B) { - if (0 === ae.indexOf("[") || Q && /\\d|\\s|\\w|\\p/i.test(ae) || "." === ae) { - var ah = F.casing ? "i" : ""; - /\\p\{.*}/i.test(ae) && (ah += "u"); - ad.matches.splice(af++, 0, { - fn: new RegExp(ae, ah), - static: false, - optionality: false, - newBlockMarker: undefined === ag ? "master" : ag.def !== ae, - casing: null, - def: ae, - placeholder: "object" === w(F.placeholder) ? F.placeholder[U.matches.length] : undefined, - nativeDef: ae - }); - } else { - Q && (ae = ae[ae.length - 1]); - ae.split("").forEach(function (aj, ak) { - ag = ad.matches[af - 1]; - ad.matches.splice(af++, 0, { - fn: /[a-z]/i.test(F.staticDefinitionSymbol || aj) ? new RegExp("[" + (F.staticDefinitionSymbol || aj) + "]", F.casing ? "i" : "") : null, - static: true, - optionality: false, - newBlockMarker: undefined === ag ? "master" : ag.def !== aj && true !== ag.static, - casing: null, - def: F.staticDefinitionSymbol || aj, - placeholder: undefined !== F.staticDefinitionSymbol ? aj : "object" === w(F.placeholder) ? F.placeholder[U.matches.length] : undefined, - nativeDef: (Q ? "'" : "") + aj - }); - }); - } - Q = false; - } else { - var ai = F.definitions && F.definitions[ae] || F.usePrototypeDefinitions && u.default.prototype.definitions[ae]; - ai && !Q ? ad.matches.splice(af++, 0, { - fn: ai.validator ? "string" == typeof ai.validator ? new RegExp(ai.validator, F.casing ? "i" : "") : new function () { - this.test = ai.validator; - }() : /./, - static: ai.static || false, - optionality: ai.optional || false, - defOptionality: ai.optional || false, - newBlockMarker: undefined === ag || ai.optional ? "master" : ag.def !== (ai.definitionSymbol || ae), - casing: ai.casing, - def: ai.definitionSymbol || ae, - placeholder: ai.placeholder, - nativeDef: ae, - generated: ai.generated - }) : (ad.matches.splice(af++, 0, { - fn: /[a-z]/i.test(F.staticDefinitionSymbol || ae) ? new RegExp("[" + (F.staticDefinitionSymbol || ae) + "]", F.casing ? "i" : "") : null, - static: true, - optionality: false, - newBlockMarker: undefined === ag ? "master" : ag.def !== ae && true !== ag.static, - casing: null, - def: F.staticDefinitionSymbol || ae, - placeholder: undefined !== F.staticDefinitionSymbol ? ae : undefined, - nativeDef: (Q ? "'" : "") + ae - }), Q = false); - } - } - function Z() { - if (V.length > 0) { - if (Y(J = V[V.length - 1], H), J.isAlternator) { - K = V.pop(); - for (var ad = 0; ad < K.matches.length; ad++) { - K.matches[ad].isGroup && (K.matches[ad].isGroup = false); - } - V.length > 0 ? (J = V[V.length - 1]).matches.push(K) : U.matches.push(K); - } - } else { - Y(U, H); - } - } - function a0(ad) { - var ae = new v.default(true); - ae.openGroup = false; - ae.matches = ad; - return ae; - } - function a1() { - if ((I = V.pop()).openGroup = false, undefined !== I) { - if (V.length > 0) { - if ((J = V[V.length - 1]).matches.push(I), J.isAlternator) { - K = V.pop(); - for (var ad = 0; ad < K.matches.length; ad++) { - K.matches[ad].isGroup = false; - K.matches[ad].alternatorGroup = false; - } - V.length > 0 ? (J = V[V.length - 1]).matches.push(K) : U.matches.push(K); - } - } else { - U.matches.push(I); - } - } else { - Z(); - } - } - function a2(ad) { - var ae = ad.pop(); - ae.isQuantifier && (ae = a0([ad.pop(), ae])); - return ae; - } - for (B && (F.optionalmarker[0] = undefined, F.optionalmarker[1] = undefined); G = B ? P.exec(z) : N.exec(z);) { - if (H = G[0], B) { - switch (H.charAt(0)) { - case "?": - H = "{0,1}"; - break; - case "+": - case "*": - H = "{" + H + "}"; - break; - case "|": - if (0 === V.length) { - var a3 = a0(U.matches); - a3.openGroup = true; - V.push(a3); - U.matches = []; - X = true; - } - } - switch (H) { - case "\\d": - H = "[0-9]"; - break; - case "\\p": - H += P.exec(z)[0]; - H += P.exec(z)[0]; - } - } - if (Q) { - Z(); - } else { - switch (H.charAt(0)) { - case "$": - case "^": - B || Z(); - break; - case F.escapeChar: - Q = true; - B && Z(); - break; - case F.optionalmarker[1]: - case F.groupmarker[1]: - a1(); - break; - case F.optionalmarker[0]: - V.push(new v.default(false, true)); - break; - case F.groupmarker[0]: - V.push(new v.default(true)); - break; - case F.quantifiermarker[0]: - var a4 = new v.default(false, false, true); - var a5 = (H = H.replace(/[{}?]/g, "")).split("|"); - var a6 = a5[0].split(","); - var a7 = isNaN(a6[0]) ? a6[0] : parseInt(a6[0]); - var a8 = 1 === a6.length ? a7 : isNaN(a6[1]) ? a6[1] : parseInt(a6[1]); - var a9 = isNaN(a5[1]) ? a5[1] : parseInt(a5[1]); - "*" !== a7 && "+" !== a7 || (a7 = "*" === a8 ? 0 : 1); - a4.quantifier = { - min: a7, - max: a8, - jit: a9 - }; - var aa = V.length > 0 ? V[V.length - 1].matches : U.matches; - (G = aa.pop()).isGroup || (G = a0([G])); - aa.push(G); - aa.push(a4); - break; - case F.alternatormarker: - if (V.length > 0) { - var ab = (J = V[V.length - 1]).matches[J.matches.length - 1]; - L = J.openGroup && (undefined === ab.matches || false === ab.isGroup && false === ab.isAlternator) ? V.pop() : a2(J.matches); - } else { - L = a2(U.matches); - } - if (L.isAlternator) { - V.push(L); - } else { - if (L.alternatorGroup ? (K = V.pop(), L.alternatorGroup = false) : K = new v.default(false, false, false, true), K.matches.push(L), V.push(K), L.openGroup) { - L.openGroup = false; - var ac = new v.default(true); - ac.alternatorGroup = true; - V.push(ac); - } - } - break; - default: - Z(); - } - } - } - for (X && a1(); V.length > 0;) { - I = V.pop(); - U.matches.push(I); - } - U.matches.length > 0 && (function ad(ae) { - ae && ae.matches && ae.matches.forEach(function (af, ag) { - var ah = ae.matches[ag + 1]; - (undefined === ah || undefined === ah.matches || false === ah.isQuantifier) && af && af.isGroup && (af.isGroup = false, B || (Y(af, F.groupmarker[0], 0), true !== af.openGroup && Y(af, F.groupmarker[1]))); - ad(af); - }); - }(U), W.push(U)); - (F.numericInput || F.isRTL) && function ae(af) { - for (var ag in af.matches = af.matches.reverse(), af.matches) if (Object.prototype.hasOwnProperty.call(af.matches, ag)) { - var ah = parseInt(ag); - if (af.matches[ag].isQuantifier && af.matches[ah + 1] && af.matches[ah + 1].isGroup) { - var ai = af.matches[ag]; - af.matches.splice(ag, 1); - af.matches.splice(ah + 1, 0, ai); - } - undefined !== af.matches[ag].matches ? af.matches[ag] = ae(af.matches[ag]) : af.matches[ag] = ((aj = af.matches[ag]) === F.optionalmarker[0] ? aj = F.optionalmarker[1] : aj === F.optionalmarker[1] ? aj = F.optionalmarker[0] : aj === F.groupmarker[0] ? aj = F.groupmarker[1] : aj === F.groupmarker[1] && (aj = F.groupmarker[0]), aj); - } - var aj; - return af; - }(W[0]); - return W; - }; - k.generateMaskSet = function (z, A) { - var B; - function C(F, G) { - var H = G.repeat; - var I = G.groupmarker; - var J = G.quantifiermarker; - var K = G.keepStatic; - if (H > 0 || "*" === H || "+" === H) { - var L = "*" === H ? 0 : "+" === H ? 1 : H; - if (L != H) { - F = I[0] + F + I[1] + J[0] + L + "," + H + J[1]; - } else { - for (var M = F, N = 1; N < L; N++) { - F += M; - } - } - } - if (true === K) { - var O = F.match(new RegExp("(.)\\[([^\\]]*)\\]", "g")); - O && O.forEach(function (P, Q) { - var R = function (U, V) { - return function (W) { - if (Array.isArray(W)) { - return W; - } - }(U) || function (W, X) { - var Y = null == W ? null : "undefined" != typeof Symbol && W[Symbol.iterator] || W["@@iterator"]; - if (null != Y) { - var Z; - var a0; - var a1; - var a2; - var a3 = []; - var a4 = true; - var a5 = false; - try { - for (a1 = (Y = Y.call(W)).next; !(a4 = (Z = a1.call(Y)).done) && (a3.push(Z.value), 2 !== a3.length); a4 = true) {} - } catch (a6) { - a5 = true; - a0 = a6; - } finally { - try { - if (!a4 && null != Y.return && (a2 = Y.return(), Object(a2) !== a2)) { - return; - } - } finally { - if (a5) { - throw a0; - } - } - } - return a3; - } - }(U) || function (W, X) { - if (W) { - if ("string" == typeof W) { - return x(W, 2); - } - var Y = Object.prototype.toString.call(W).slice(8, -1); - "Object" === Y && W.constructor && (Y = W.constructor.name); - return "Map" === Y || "Set" === Y ? Array.from(W) : "Arguments" === Y || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Y) ? x(W, 2) : undefined; - } - }(U) || function () { - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - }(); - }(P.split("[")); - var S = R[0]; - var T = R[1]; - T = T.replace("]", ""); - F = F.replace(new RegExp("".concat((0, q.default)(S), "\\[").concat((0, q.default)(T), "\\]")), S.charAt(0) === T.charAt(0) ? "(".concat(S, "|").concat(S).concat(T, ")") : "".concat(S, "[").concat(T, "]")); - }); - } - return F; - } - function D(F, G, H) { - var I; - var J; - var K = false; - null !== F && "" !== F || ((K = null !== H.regex) ? F = (F = H.regex).replace(/^(\^)(.*)(\$)$/, "$2") : (K = true, F = ".*")); - 1 === F.length && false === H.greedy && 0 !== H.repeat && (H.placeholder = ""); - F = C(F, H); - J = K ? "regex_" + H.regex : H.numericInput ? F.split("").reverse().join("") : F; - null !== H.keepStatic && (J = "ks_" + H.keepStatic + J); - "object" === w(H.placeholder) && (J = "ph_" + JSON.stringify(H.placeholder) + J); - undefined === u.default.prototype.masksCache[J] || true === A ? (I = { - mask: F, - maskToken: u.default.prototype.analyseMask(F, K, H), - validPositions: [], - _buffer: undefined, - buffer: undefined, - tests: {}, - excludes: {}, - metadata: G, - maskLength: undefined, - jitOffset: {} - }, true !== A && (u.default.prototype.masksCache[J] = I, I = p.default.extend(true, {}, u.default.prototype.masksCache[J]))) : I = p.default.extend(true, {}, u.default.prototype.masksCache[J]); - return I; - } - if ("function" == typeof z.mask && (z.mask = z.mask(z)), Array.isArray(z.mask)) { - if (z.mask.length > 1) { - null === z.keepStatic && (z.keepStatic = true); - var E = z.groupmarker[0]; - (z.isRTL ? z.mask.reverse() : z.mask).forEach(function (F) { - E.length > 1 && (E += z.alternatormarker); - undefined !== F.mask && "function" != typeof F.mask ? E += F.mask : E += F; - }); - return D(E += z.groupmarker[1], z.mask, z); - } - z.mask = z.mask.pop(); - } - B = z.mask && undefined !== z.mask.mask && "function" != typeof z.mask.mask ? D(z.mask.mask, z.mask, z) : D(z.mask, z.mask, z); - null === z.keepStatic && (z.keepStatic = false); - return B; - }; - var p = y(m(4963)); - var q = y(m(7184)); - var u = y(m(2394)); - var v = y(m(9695)); - function w(z) { - return (w = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (A) { - return typeof A; - } : function (A) { - return A && "function" == typeof Symbol && A.constructor === Symbol && A !== Symbol.prototype ? "symbol" : typeof A; - })(z); - } - function x(z, A) { - (null == A || A > z.length) && (A = z.length); - for (var B = 0, C = new Array(A); B < A; B++) { - C[B] = z[B]; - } - return C; - } - function y(z) { - return z && z.__esModule ? z : { - default: z - }; - } - }, - 157: function (j, k, m) { - Object.defineProperty(k, "__esModule", { - value: true - }); - k.mask = function () { - var y = this; - var z = this.opts; - var A = this.el; - var B = this.dependencyLib; - u.EventRuler.off(A); - var C = function (F, G) { - var H = F.getAttribute("type"); - var I = "input" === F.tagName.toLowerCase() && G.supportsInputType.includes(H) || F.isContentEditable || "textarea" === F.tagName.toLowerCase(); - if (!I) { - if ("input" === F.tagName.toLowerCase()) { - var J = document.createElement("input"); - J.setAttribute("type", H); - I = "text" === J.type; - J = null; - } else { - I = "partial"; - } - } - false !== I ? function (K) { - var L; - var M; - function N() { - return this.inputmask ? this.inputmask.opts.autoUnmask ? this.inputmask.unmaskedvalue() : -1 !== w.getLastValidPosition.call(y) || true !== G.nullable ? (this.inputmask.shadowRoot || this.ownerDocument).activeElement === this && G.clearMaskOnLostFocus ? (y.isRTL ? v.clearOptionalTail.call(y, w.getBuffer.call(y).slice()).reverse() : v.clearOptionalTail.call(y, w.getBuffer.call(y).slice())).join("") : L.call(this) : "" : L.call(this); - } - function O(Q) { - M.call(this, Q); - this.inputmask && (0, v.applyInputValue)(this, Q); - } - if (!K.inputmask.__valueGet) { - if (true !== G.noValuePatching) { - if (Object.getOwnPropertyDescriptor) { - var P = Object.getPrototypeOf ? Object.getOwnPropertyDescriptor(Object.getPrototypeOf(K), "value") : undefined; - P && P.get && P.set ? (L = P.get, M = P.set, Object.defineProperty(K, "value", { - get: N, - set: O, - configurable: true - })) : "input" !== K.tagName.toLowerCase() && (L = function () { - return this.textContent; - }, M = function (Q) { - this.textContent = Q; - }, Object.defineProperty(K, "value", { - get: N, - set: O, - configurable: true - })); - } else { - document.__lookupGetter__ && K.__lookupGetter__("value") && (L = K.__lookupGetter__("value"), M = K.__lookupSetter__("value"), K.__defineGetter__("value", N), K.__defineSetter__("value", O)); - } - K.inputmask.__valueGet = L; - K.inputmask.__valueSet = M; - } - K.inputmask._valueGet = function (Q) { - return y.isRTL && true !== Q ? L.call(this.el).split("").reverse().join("") : L.call(this.el); - }; - K.inputmask._valueSet = function (Q, R) { - M.call(this.el, null == Q ? "" : true !== R && y.isRTL ? Q.split("").reverse().join("") : Q); - }; - undefined === L && (L = function () { - return this.value; - }, M = function (Q) { - this.value = Q; - }, function (Q) { - if (B.valHooks && (undefined === B.valHooks[Q] || true !== B.valHooks[Q].inputmaskpatch)) { - var R = B.valHooks[Q] && B.valHooks[Q].get ? B.valHooks[Q].get : function (T) { - return T.value; - }; - var S = B.valHooks[Q] && B.valHooks[Q].set ? B.valHooks[Q].set : function (T, U) { - T.value = U; - return T; - }; - B.valHooks[Q] = { - get: function (T) { - if (T.inputmask) { - if (T.inputmask.opts.autoUnmask) { - return T.inputmask.unmaskedvalue(); - } - var U = R(T); - return -1 !== w.getLastValidPosition.call(y, undefined, undefined, T.inputmask.maskset.validPositions) || true !== G.nullable ? U : ""; - } - return R(T); - }, - set: function (T, U) { - var V = S(T, U); - T.inputmask && (0, v.applyInputValue)(T, U); - return V; - }, - inputmaskpatch: true - }; - } - }(K.type), function (Q) { - u.EventRuler.on(Q, "mouseenter", function () { - var R = this; - var S = R.inputmask._valueGet(true); - S != (R.inputmask.isRTL ? w.getBuffer.call(R.inputmask).slice().reverse() : w.getBuffer.call(R.inputmask)).join("") && (0, v.applyInputValue)(R, S); - }); - }(K)); - } - }(F) : F.inputmask = undefined; - return I; - }(A, z); - if (false !== C) { - y.originalPlaceholder = A.placeholder; - y.maxLength = undefined !== A ? A.maxLength : undefined; - -1 === y.maxLength && (y.maxLength = undefined); - "inputMode" in A && null === A.getAttribute("inputmode") && (A.inputMode = z.inputmode, A.setAttribute("inputmode", z.inputmode)); - true === C && (z.showMaskOnFocus = z.showMaskOnFocus && -1 === ["cc-number", "cc-exp"].indexOf(A.autocomplete), p.iphone && (z.insertModeVisual = false, A.setAttribute("autocorrect", "off")), u.EventRuler.on(A, "submit", q.EventHandlers.submitEvent), u.EventRuler.on(A, "reset", q.EventHandlers.resetEvent), u.EventRuler.on(A, "blur", q.EventHandlers.blurEvent), u.EventRuler.on(A, "focus", q.EventHandlers.focusEvent), u.EventRuler.on(A, "invalid", q.EventHandlers.invalidEvent), u.EventRuler.on(A, "click", q.EventHandlers.clickEvent), u.EventRuler.on(A, "mouseleave", q.EventHandlers.mouseleaveEvent), u.EventRuler.on(A, "mouseenter", q.EventHandlers.mouseenterEvent), u.EventRuler.on(A, "paste", q.EventHandlers.pasteEvent), u.EventRuler.on(A, "cut", q.EventHandlers.cutEvent), u.EventRuler.on(A, "complete", z.oncomplete), u.EventRuler.on(A, "incomplete", z.onincomplete), u.EventRuler.on(A, "cleared", z.oncleared), true !== z.inputEventOnly && u.EventRuler.on(A, "keydown", q.EventHandlers.keyEvent), (p.mobile || z.inputEventOnly) && A.removeAttribute("maxLength"), u.EventRuler.on(A, "input", q.EventHandlers.inputFallBackEvent)); - u.EventRuler.on(A, "setvalue", q.EventHandlers.setValueEvent); - undefined === y.applyMaskHook || y.applyMaskHook(); - w.getBufferTemplate.call(y).join(""); - y.undoValue = y._valueGet(true); - var D = (A.inputmask.shadowRoot || A.ownerDocument).activeElement; - if ("" !== A.inputmask._valueGet(true) || false === z.clearMaskOnLostFocus || D === A) { - (0, v.applyInputValue)(A, A.inputmask._valueGet(true), z); - var E = w.getBuffer.call(y).slice(); - false === x.isComplete.call(y, E) && z.clearIncomplete && w.resetMaskSet.call(y, false); - z.clearMaskOnLostFocus && D !== A && (-1 === w.getLastValidPosition.call(y) ? E = [] : v.clearOptionalTail.call(y, E)); - (false === z.clearMaskOnLostFocus || z.showMaskOnFocus && D === A || "" !== A.inputmask._valueGet(true)) && (0, v.writeBuffer)(A, E); - D === A && w.caret.call(y, A, w.seekNext.call(y, w.getLastValidPosition.call(y))); - } - } - }; - var p = m(9845); - var q = m(6030); - var u = m(9716); - var v = m(7760); - var w = m(8711); - var x = m(7215); - }, - 9695: function (i, j) { - Object.defineProperty(j, "__esModule", { - value: true - }); - j.default = function (k, l, m, o) { - this.matches = []; - this.openGroup = k || false; - this.alternatorGroup = false; - this.isGroup = k || false; - this.isOptional = l || false; - this.isQuantifier = m || false; - this.isAlternator = o || false; - this.quantifier = { - min: 1, - max: 1 - }; - }; - }, - 3194: function () { - Array.prototype.includes || Object.defineProperty(Array.prototype, "includes", { - value: function (j, k) { - if (null == this) { - throw new TypeError("\"this\" is null or not defined"); - } - var l = Object(this); - var m = l.length >>> 0; - if (0 === m) { - return false; - } - for (var p = 0 | k, q = Math.max(p >= 0 ? p : m - Math.abs(p), 0); q < m;) { - if (l[q] === j) { - return true; - } - q++; - } - return false; - } - }); - }, - 9302: function () { - var i = Function.bind.call(Function.call, Array.prototype.reduce); - var j = Function.bind.call(Function.call, Object.prototype.propertyIsEnumerable); - var k = Function.bind.call(Function.call, Array.prototype.concat); - var l = Object.keys; - Object.entries || (Object.entries = function (m) { - return i(l(m), function (o, p) { - return k(o, "string" == typeof p && j(m, p) ? [[p, m[p]]] : []); - }, []); - }); - }, - 7149: function () { - function i(j) { - return (i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (k) { - return typeof k; - } : function (k) { - return k && "function" == typeof Symbol && k.constructor === Symbol && k !== Symbol.prototype ? "symbol" : typeof k; - })(j); - } - "function" != typeof Object.getPrototypeOf && (Object.getPrototypeOf = "object" === i("test".__proto__) ? function (j) { - return j.__proto__; - } : function (j) { - return j.constructor.prototype; - }); - }, - 4013: function () { - String.prototype.includes || (String.prototype.includes = function (i, j) { - "number" != typeof j && (j = 0); - return !(j + i.length > this.length) && -1 !== this.indexOf(i, j); - }); - }, - 8711: function (j, k, m) { - Object.defineProperty(k, "__esModule", { - value: true - }); - k.caret = function (C, D, E, F, G) { - var H; - var I = this; - var J = this.opts; - if (undefined === D) { - "selectionStart" in C && "selectionEnd" in C ? (D = C.selectionStart, E = C.selectionEnd) : q.default.getSelection ? (H = q.default.getSelection().getRangeAt(0)).commonAncestorContainer.parentNode !== C && H.commonAncestorContainer !== C || (D = H.startOffset, E = H.endOffset) : document.selection && document.selection.createRange && (E = (D = 0 - (H = document.selection.createRange()).duplicate().moveStart("character", -C.inputmask._valueGet().length)) + H.text.length); - return { - begin: F ? D : B.call(I, D), - end: F ? E : B.call(I, E) - }; - } - if (Array.isArray(D) && (E = I.isRTL ? D[0] : D[1], D = I.isRTL ? D[1] : D[0]), undefined !== D.begin && (E = I.isRTL ? D.begin : D.end, D = I.isRTL ? D.end : D.begin), "number" == typeof D) { - D = F ? D : B.call(I, D); - E = "number" == typeof (E = F ? E : B.call(I, E)) ? E : D; - var K = parseInt(((C.ownerDocument.defaultView || q.default).getComputedStyle ? (C.ownerDocument.defaultView || q.default).getComputedStyle(C, null) : C.currentStyle).fontSize) * E; - if (C.scrollLeft = K > C.scrollWidth ? K : 0, C.inputmask.caretPos = { - begin: D, - end: E - }, J.insertModeVisual && false === J.insertMode && D === E && (G || E++), C === (C.inputmask.shadowRoot || C.ownerDocument).activeElement) { - if ("setSelectionRange" in C) { - C.setSelectionRange(D, E); - } else { - if (q.default.getSelection) { - if (H = document.createRange(), undefined === C.firstChild || null === C.firstChild) { - var L = document.createTextNode(""); - C.appendChild(L); - } - H.setStart(C.firstChild, D < C.inputmask._valueGet().length ? D : C.inputmask._valueGet().length); - H.setEnd(C.firstChild, E < C.inputmask._valueGet().length ? E : C.inputmask._valueGet().length); - H.collapse(true); - var M = q.default.getSelection(); - M.removeAllRanges(); - M.addRange(H); - } else { - C.createTextRange && ((H = C.createTextRange()).collapse(true), H.moveEnd("character", E), H.moveStart("character", D), H.select()); - } - } - undefined === C.inputmask.caretHook || C.inputmask.caretHook.call(I, { - begin: D, - end: E - }); - } - } - }; - k.determineLastRequiredPosition = function (C) { - var D; - var E; - var F = this; - var G = F.maskset; - var H = F.dependencyLib; - var I = y.call(F); - var J = {}; - var K = G.validPositions[I]; - var L = w.getMaskTemplate.call(F, true, y.call(F), true, true); - var M = L.length; - var N = undefined !== K ? K.locator.slice() : undefined; - for (D = I + 1; D < L.length; D++) { - N = (E = w.getTestTemplate.call(F, D, N, D - 1)).locator.slice(); - J[D] = H.extend(true, {}, E); - } - var O = K && undefined !== K.alternation ? K.locator[K.alternation] : undefined; - for (D = M - 1; D > I && ((E = J[D]).match.optionality || E.match.optionalQuantifier && E.match.newBlockMarker || O && (O !== J[D].locator[K.alternation] && true !== E.match.static || true === E.match.static && E.locator[K.alternation] && v.checkAlternationMatch.call(F, E.locator[K.alternation].toString().split(","), O.toString().split(",")) && "" !== w.getTests.call(F, D)[0].def)) && L[D] === w.getPlaceholder.call(F, D, E.match); D--) { - M--; - } - return C ? { - l: M, - def: J[M] ? J[M].match : undefined - } : M; - }; - k.determineNewCaretPosition = function (C, D, E) { - var F; - var G; - var H; - var I = this; - var J = I.maskset; - var K = I.opts; - if (D && (I.isRTL ? C.end = C.begin : C.begin = C.end), C.begin === C.end) { - switch (E = E || K.positionCaretOnClick) { - case "none": - break; - case "select": - C = { - begin: 0, - end: x.call(I).length - }; - break; - case "ignore": - C.end = C.begin = A.call(I, y.call(I)); - break; - case "radixFocus": - if (I.clicked > 1 && 0 === J.validPositions.length) { - break; - } - if (function (Q) { - if ("" !== K.radixPoint && 0 !== K.digits) { - var R = J.validPositions; - if (undefined === R[Q] || undefined === R[Q].input) { - if (Q < A.call(I, -1)) { - return true; - } - var S = x.call(I).indexOf(K.radixPoint); - if (-1 !== S) { - for (var T = 0, U = R.length; T < U; T++) { - if (R[T] && S < T && R[T].input !== w.getPlaceholder.call(I, T)) { - return false; - } - } - return true; - } - } - } - return false; - }(C.begin)) { - var L = x.call(I).join("").indexOf(K.radixPoint); - C.end = C.begin = K.numericInput ? A.call(I, L) : L; - break; - } - default: - if (F = C.begin, G = y.call(I, F, true), F <= (H = A.call(I, -1 !== G || z.call(I, 0) ? G : -1))) { - C.end = C.begin = z.call(I, F, false, true) ? F : A.call(I, F); - } else { - var M = J.validPositions[G]; - var N = w.getTestTemplate.call(I, H, M ? M.match.locator : undefined, M); - var O = w.getPlaceholder.call(I, H, N.match); - if ("" !== O && x.call(I)[H] !== O && true !== N.match.optionalQuantifier && true !== N.match.newBlockMarker || !z.call(I, H, K.keepStatic, true) && N.match.def === O) { - var P = A.call(I, H); - (F >= P || F === H) && (H = P); - } - C.end = C.begin = H; - } - } - return C; - } - }; - k.getBuffer = x; - k.getBufferTemplate = function () { - var C = this.maskset; - undefined === C._buffer && (C._buffer = w.getMaskTemplate.call(this, false, 1), undefined === C.buffer && (C.buffer = C._buffer.slice())); - return C._buffer; - }; - k.getLastValidPosition = y; - k.isMask = z; - k.resetMaskSet = function (C) { - var D = this.maskset; - D.buffer = undefined; - true !== C && (D.validPositions = [], D.p = 0); - false === C && (D.tests = {}, D.jitOffset = {}); - }; - k.seekNext = A; - k.seekPrevious = function (C, D) { - var E = this; - var F = C - 1; - if (C <= 0) { - return 0; - } - for (; F > 0 && (true === D && (true !== w.getTest.call(E, F).match.newBlockMarker || !z.call(E, F, undefined, true)) || true !== D && !z.call(E, F, undefined, true));) { - F--; - } - return F; - }; - k.translatePosition = B; - var p; - var q = (p = m(9380)) && p.__esModule ? p : { - default: p - }; - var v = m(7215); - var w = m(4713); - function x(C) { - var D = this; - var E = D.maskset; - undefined !== E.buffer && true !== C || (E.buffer = w.getMaskTemplate.call(D, true, y.call(D), true), undefined === E._buffer && (E._buffer = E.buffer.slice())); - return E.buffer; - } - function y(C, D, E) { - var F = this.maskset; - var G = -1; - var H = -1; - var I = E || F.validPositions; - undefined === C && (C = -1); - for (var J = 0, K = I.length; J < K; J++) { - I[J] && (D || true !== I[J].generatedInput) && (J <= C && (G = J), J >= C && (H = J)); - } - return -1 === G || G === C ? H : -1 === H || C - G < H - C ? G : H; - } - function z(C, D, E) { - var F = this; - var G = this.maskset; - var H = w.getTestTemplate.call(F, C).match; - if ("" === H.def && (H = w.getTest.call(F, C).match), true !== H.static) { - return H.fn; - } - if (true === E && undefined !== G.validPositions[C] && true !== G.validPositions[C].generatedInput) { - return true; - } - if (true !== D && C > -1) { - if (E) { - var I = w.getTests.call(F, C); - return I.length > 1 + ("" === I[I.length - 1].match.def ? 1 : 0); - } - var J = w.determineTestTemplate.call(F, C, w.getTests.call(F, C)); - var K = w.getPlaceholder.call(F, C, J.match); - return J.match.def !== K; - } - return false; - } - function A(C, D, E) { - var F = this; - undefined === E && (E = true); - for (var G = C + 1; "" !== w.getTest.call(F, G).match.def && (true === D && (true !== w.getTest.call(F, G).match.newBlockMarker || !z.call(F, G, undefined, true)) || true !== D && !z.call(F, G, undefined, E));) { - G++; - } - return G; - } - function B(C) { - var D = this.opts; - var E = this.el; - !this.isRTL || "number" != typeof C || D.greedy && "" === D.placeholder || !E || (C = this._valueGet().length - C) < 0 && (C = 0); - return C; - } - }, - 4713: function (j, k, m) { - Object.defineProperty(k, "__esModule", { - value: true - }); - k.determineTestTemplate = C; - k.getDecisionTaker = z; - k.getMaskTemplate = function (G, H, I, J, K) { - var L = this; - var M = this.opts; - var N = this.maskset; - var O = M.greedy; - K && M.greedy && (M.greedy = false, L.maskset.tests = {}); - H = H || 0; - var P; - var Q; - var R; - var S; - var T = []; - var U = 0; - do { - if (true === G && N.validPositions[U]) { - Q = (R = K && N.validPositions[U].match.optionality && undefined === N.validPositions[U + 1] && (true === N.validPositions[U].generatedInput || N.validPositions[U].input == M.skipOptionalPartCharacter && U > 0) ? C.call(L, U, F.call(L, U, P, U - 1)) : N.validPositions[U]).match; - P = R.locator.slice(); - T.push(true === I ? R.input : false === I ? Q.nativeDef : A.call(L, U, Q)); - } else { - Q = (R = B.call(L, U, P, U - 1)).match; - P = R.locator.slice(); - var V = true !== J && (false !== M.jitMasking ? M.jitMasking : Q.jit); - (S = (S || N.validPositions[U - 1]) && Q.static && Q.def !== M.groupSeparator && null === Q.fn) || false === V || undefined === V || "number" == typeof V && isFinite(V) && V > U ? T.push(false === I ? Q.nativeDef : A.call(L, T.length, Q)) : S = false; - } - U++; - } while (true !== Q.static || "" !== Q.def || H > U); - "" === T[T.length - 1] && T.pop(); - false === I && undefined !== N.maskLength || (N.maskLength = U - 1); - M.greedy = O; - return T; - }; - k.getPlaceholder = A; - k.getTest = D; - k.getTestTemplate = B; - k.getTests = F; - k.isSubsetOf = E; - var p; - var q = (p = m(2394)) && p.__esModule ? p : { - default: p - }; - var w = m(8711); - function x(G) { - return (x = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (H) { - return typeof H; - } : function (H) { - return H && "function" == typeof Symbol && H.constructor === Symbol && H !== Symbol.prototype ? "symbol" : typeof H; - })(G); - } - function y(G, H) { - var I = (null != G.alternation ? G.mloc[z(G)] : G.locator).join(""); - if ("" !== I) { - for (I = I.split(":")[0]; I.length < H;) { - I += "0"; - } - } - return I; - } - function z(G) { - var H = G.locator[G.alternation]; - "string" == typeof H && H.length > 0 && (H = H.split(",")[0]); - return undefined !== H ? H.toString() : ""; - } - function A(G, H, I) { - var J = this; - var K = this.opts; - var L = this.maskset; - if (undefined !== (H = H || D.call(J, G).match).placeholder || true === I) { - if ("" !== H.placeholder && true === H.static && true !== H.generated) { - var M = w.getLastValidPosition.call(J, G); - var N = w.seekNext.call(J, M); - return (I ? G <= N : G < N) ? K.staticDefinitionSymbol && H.static ? H.nativeDef : H.def : "function" == typeof H.placeholder ? H.placeholder(K) : H.placeholder; - } - return "function" == typeof H.placeholder ? H.placeholder(K) : H.placeholder; - } - if (true === H.static) { - if (G > -1 && undefined === L.validPositions[G]) { - var O; - var P = F.call(J, G); - var Q = []; - if ("string" == typeof K.placeholder && P.length > 1 + ("" === P[P.length - 1].match.def ? 1 : 0)) { - for (var R = 0; R < P.length; R++) { - if ("" !== P[R].match.def && true !== P[R].match.optionality && true !== P[R].match.optionalQuantifier && (true === P[R].match.static || undefined === O || false !== P[R].match.fn.test(O.match.def, L, G, true, K)) && (Q.push(P[R]), true === P[R].match.static && (O = P[R]), Q.length > 1 && /[0-9a-bA-Z]/.test(Q[0].match.def))) { - return K.placeholder.charAt(G % K.placeholder.length); - } - } - } - } - return H.def; - } - return "object" === x(K.placeholder) ? H.def : K.placeholder.charAt(G % K.placeholder.length); - } - function B(G, H, I) { - return this.maskset.validPositions[G] || C.call(this, G, F.call(this, G, H ? H.slice() : H, I)); - } - function C(G, H) { - var I = this.opts; - var J = 0; - var K = function (S, T) { - var U = 0; - var V = false; - T.forEach(function (W) { - W.match.optionality && (0 !== U && U !== W.match.optionality && (V = true), (0 === U || U > W.match.optionality) && (U = W.match.optionality)); - }); - U && (0 == S || 1 == T.length ? U = 0 : V || (U = 0)); - return U; - }(G, H); - G = G > 0 ? G - 1 : 0; - var L; - var M; - var N; - var O = y(D.call(this, G)); - I.greedy && H.length > 1 && "" === H[H.length - 1].match.def && (J = 1); - for (var P = 0; P < H.length - J; P++) { - var Q = H[P]; - L = y(Q, O.length); - var R = Math.abs(L - O); - (true !== Q.unMatchedAlternationStopped || H.filter(function (S) { - return true !== S.unMatchedAlternationStopped; - }).length <= 1) && (undefined === M || "" !== L && R < M || N && !I.greedy && N.match.optionality && N.match.optionality - K > 0 && "master" === N.match.newBlockMarker && (!Q.match.optionality || Q.match.optionality - K < 1 || !Q.match.newBlockMarker) || N && !I.greedy && N.match.optionalQuantifier && !Q.match.optionalQuantifier) && (M = R, N = Q); - } - return N; - } - function D(G, H) { - var I = this.maskset; - return I.validPositions[G] ? I.validPositions[G] : (H || F.call(this, G))[0]; - } - function E(G, H, I) { - function J(K) { - for (var L, M = [], N = -1, O = 0, P = K.length; O < P; O++) { - if ("-" === K.charAt(O)) { - for (L = K.charCodeAt(O + 1); ++N < L;) { - M.push(String.fromCharCode(N)); - } - } else { - N = K.charCodeAt(O); - M.push(K.charAt(O)); - } - } - return M.join(""); - } - return G.match.def === H.match.nativeDef || !(!(I.regex || G.match.fn instanceof RegExp && H.match.fn instanceof RegExp) || true === G.match.static || true === H.match.static) && ("." === H.match.fn.source || -1 !== J(H.match.fn.source.replace(/[[\]/]/g, "")).indexOf(J(G.match.fn.source.replace(/[[\]/]/g, "")))); - } - function F(G, H, I) { - var J; - var K; - var L = this; - var M = this.dependencyLib; - var N = this.maskset; - var P = this.opts; - var Q = this.el; - var R = N.maskToken; - var S = H ? I : 0; - var T = H ? H.slice() : [0]; - var U = []; - var V = false; - var W = H ? H.join("") : ""; - var X = false; - function Y(a3, a4, a5, a6) { - function a7(aa, ab, ac) { - function ad(ai, aj) { - var ak = 0 === aj.matches.indexOf(ai); - ak || aj.matches.every(function (al, am) { - true === al.isQuantifier ? ak = ad(ai, aj.matches[am - 1]) : Object.prototype.hasOwnProperty.call(al, "matches") && (ak = ad(ai, al)); - return !ak; - }); - return ak; - } - function ae(ai, aj, ak) { - var al; - var am; - if ((N.tests[ai] || N.validPositions[ai]) && (N.validPositions[ai] ? [N.validPositions[ai]] : N.tests[ai]).every(function (ap, aq) { - if (ap.mloc[aj]) { - al = ap; - return false; - } - var ar = undefined !== ak ? ak : ap.alternation; - var as = undefined !== ap.locator[ar] ? ap.locator[ar].toString().indexOf(aj) : -1; - (undefined === am || as < am) && -1 !== as && (al = ap, am = as); - return true; - }), al) { - var an = al.locator[al.alternation]; - var ao = al.mloc[aj] || al.mloc[an] || al.locator; - -1 !== ao[ao.length - 1].toString().indexOf(":") && ao.pop(); - return ao.slice((undefined !== ak ? ak : al.alternation) + 1); - } - return undefined !== ak ? ae(ai, aj) : undefined; - } - function af(ai, aj) { - return true === ai.match.static && true !== aj.match.static && aj.match.fn.test(ai.match.def, N, G, false, P, false); - } - function ag(ai, aj) { - var ak = ai.alternation; - var al = undefined === aj || ak <= aj.alternation && -1 === ai.locator[ak].toString().indexOf(aj.locator[ak]); - if (!al && ak > aj.alternation) { - for (var am = 0; am < ak; am++) { - if (ai.locator[am] !== aj.locator[am]) { - ak = am; - al = true; - break; - } - } - } - return !!al && function (an) { - ai.mloc = ai.mloc || {}; - var ao = ai.locator[an]; - if (undefined !== ao) { - if ("string" == typeof ao && (ao = ao.split(",")[0]), undefined === ai.mloc[ao] && (ai.mloc[ao] = ai.locator.slice(), ai.mloc[ao].push(":".concat(ai.alternation))), undefined !== aj) { - for (var ap in aj.mloc) "string" == typeof ap && (ap = parseInt(ap.split(",")[0])), ai.mloc[ap + 0] = aj.mloc[ap]; - ai.locator[an] = Object.keys(ai.mloc).join(","); - } - ai.alternation > an && (ai.alternation = an); - return true; - } - ai.alternation = undefined; - return false; - }(ak); - } - function ah(ai, aj) { - if (ai.locator.length !== aj.locator.length) { - return false; - } - for (var ak = ai.alternation + 1; ak < ai.locator.length; ak++) { - if (ai.locator[ak] !== aj.locator[ak]) { - return false; - } - } - return true; - } - if (S > G + P._maxTestPos) { - throw new Error("Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. ".concat(N.mask)); - } - if (S === G && undefined === aa.matches) { - if (U.push({ - match: aa, - locator: ab.reverse(), - cd: W, - mloc: {} - }), !aa.optionality || undefined !== ac || !(P.definitions && P.definitions[aa.nativeDef] && P.definitions[aa.nativeDef].optional || q.default.prototype.definitions[aa.nativeDef] && q.default.prototype.definitions[aa.nativeDef].optional)) { - return true; - } - V = true; - S = G; - } else { - if (undefined !== aa.matches) { - if (aa.isGroup && ac !== aa) { - return function () { - aa = a7(a3.matches[a3.matches.indexOf(aa) + 1], ab, ac); - if (aa) { - return true; - } - }(); - } - if (aa.isOptional) { - return function () { - var ai = aa; - var aj = U.length; - if (aa = Y(aa, a4, ab, ac), U.length > 0) { - if (U.forEach(function (ak, al) { - al >= aj && (ak.match.optionality = ak.match.optionality ? ak.match.optionality + 1 : 1); - }), J = U[U.length - 1].match, undefined !== ac || !ad(J, ai)) { - return aa; - } - V = true; - S = G; - } - }(); - } - if (aa.isAlternator) { - return function () { - function ai(aE) { - for (var aF, aG = aE.matches[0].matches ? aE.matches[0].matches.length : 1, aH = 0; aH < aE.matches.length && aG === (aF = aE.matches[aH].matches ? aE.matches[aH].matches.length : 1); aH++) {} - return aG !== aF; - } - L.hasAlternator = true; - var aj; - var ak = aa; - var al = []; - var am = U.slice(); - var an = ab.length; - var ao = a4.length > 0 ? a4.shift() : -1; - if (-1 === ao || "string" == typeof ao) { - var ap; - var aq = S; - var ar = a4.slice(); - var as = []; - if ("string" == typeof ao) { - as = ao.split(","); - } else { - for (ap = 0; ap < ak.matches.length; ap++) { - as.push(ap.toString()); - } - } - if (undefined !== N.excludes[G]) { - for (var at = as.slice(), au = 0, av = N.excludes[G].length; au < av; au++) { - var aw = N.excludes[G][au].toString().split(":"); - ab.length == aw[1] && as.splice(as.indexOf(aw[0]), 1); - } - 0 === as.length && (delete N.excludes[G], as = at); - } - (true === P.keepStatic || isFinite(parseInt(P.keepStatic)) && aq >= P.keepStatic) && (as = as.slice(0, 1)); - for (var ax = 0; ax < as.length; ax++) { - ap = parseInt(as[ax]); - U = []; - a4 = "string" == typeof ao && ae(S, ap, an) || ar.slice(); - var ay = ak.matches[ap]; - if (ay && a7(ay, [ap].concat(ab), ac)) { - aa = true; - } else { - if (0 === ax && (X = ai(ak)), ay && ay.matches && ay.matches.length > ak.matches[0].matches.length) { - break; - } - } - aj = U.slice(); - S = aq; - U = []; - for (var az = 0; az < aj.length; az++) { - var aA = aj[az]; - var aB = false; - aA.alternation = aA.alternation || an; - ag(aA); - for (var aC = 0; aC < al.length; aC++) { - var aD = al[aC]; - if ("string" != typeof ao || undefined !== aA.alternation && as.includes(aA.locator[aA.alternation].toString())) { - if (aA.match.nativeDef === aD.match.nativeDef) { - aB = true; - ag(aD, aA); - break; - } - if (E(aA, aD, P)) { - ag(aA, aD) && (aB = true, al.splice(al.indexOf(aD), 0, aA)); - break; - } - if (E(aD, aA, P)) { - ag(aD, aA); - break; - } - if (af(aA, aD)) { - ah(aA, aD) || undefined !== Q.inputmask.userOptions.keepStatic ? ag(aA, aD) && (aB = true, al.splice(al.indexOf(aD), 0, aA)) : P.keepStatic = true; - break; - } - if (af(aD, aA)) { - ag(aD, aA); - break; - } - } - } - aB || al.push(aA); - } - } - U = am.concat(al); - S = G; - V = U.length > 0 && X; - aa = al.length > 0 && !X; - X && V && !aa && U.forEach(function (aE, aF) { - aE.unMatchedAlternationStopped = true; - }); - a4 = ar.slice(); - } else { - aa = a7(ak.matches[ao] || a3.matches[ao], [ao].concat(ab), ac); - } - if (aa) { - return true; - } - }(); - } - if (aa.isQuantifier && ac !== a3.matches[a3.matches.indexOf(aa) - 1]) { - return function () { - for (var ai = aa, aj = false, ak = a4.length > 0 ? a4.shift() : 0; ak < (isNaN(ai.quantifier.max) ? ak + 1 : ai.quantifier.max) && S <= G; ak++) { - var al = a3.matches[a3.matches.indexOf(ai) - 1]; - aa = a7(al, [ak].concat(ab), al); - if (aa) { - if (U.forEach(function (am, an) { - (J = Z(al, am.match) ? am.match : U[U.length - 1].match).optionalQuantifier = ak >= ai.quantifier.min; - J.jit = (ak + 1) * (al.matches.indexOf(J) + 1) > ai.quantifier.jit; - J.optionalQuantifier && ad(J, al) && (V = true, S = G, P.greedy && null == N.validPositions[G - 1] && ak > ai.quantifier.min && -1 != ["*", "+"].indexOf(ai.quantifier.max) && (U.pop(), W = undefined), aj = true, aa = false); - !aj && J.jit && (N.jitOffset[G] = al.matches.length - al.matches.indexOf(J)); - }), aj) { - break; - } - return true; - } - } - }(); - } - aa = Y(aa, a4, ab, ac); - if (aa) { - return true; - } - } else { - S++; - } - } - } - for (var a8 = a4.length > 0 ? a4.shift() : 0; a8 < a3.matches.length; a8++) { - if (true !== a3.matches[a8].isQuantifier) { - var a9 = a7(a3.matches[a8], [a8].concat(a5), a6); - if (a9 && S === G) { - return a9; - } - if (S > G) { - break; - } - } - } - } - function Z(a3, a4) { - var a5 = -1 != a3.matches.indexOf(a4); - a5 || a3.matches.forEach(function (a6, a7) { - undefined === a6.matches || a5 || (a5 = Z(a6, a4)); - }); - return a5; - } - if (G > -1) { - if (undefined === H) { - for (var a0, a1 = G - 1; undefined === (a0 = N.validPositions[a1] || N.tests[a1]) && a1 > -1;) { - a1--; - } - undefined !== a0 && a1 > -1 && (T = function (a3, a4) { - var a5; - var a6 = []; - Array.isArray(a4) || (a4 = [a4]); - a4.length > 0 && (undefined === a4[0].alternation || true === P.keepStatic ? 0 === (a6 = C.call(L, a3, a4.slice()).locator.slice()).length && (a6 = a4[0].locator.slice()) : a4.forEach(function (a7) { - "" !== a7.def && (0 === a6.length ? (a5 = a7.alternation, a6 = a7.locator.slice()) : a7.locator[a5] && -1 === a6[a5].toString().indexOf(a7.locator[a5]) && (a6[a5] += "," + a7.locator[a5])); - })); - return a6; - }(a1, a0), W = T.join(""), S = a1); - } - if (N.tests[G] && N.tests[G][0].cd === W) { - return N.tests[G]; - } - for (var a2 = T.shift(); a2 < R.length && !(Y(R[a2], T, [a2]) && S === G || S > G); a2++) {} - } - (0 === U.length || V) && U.push({ - match: { - fn: null, - static: true, - optionality: false, - casing: null, - def: "", - placeholder: "" - }, - locator: X && 0 === U.filter(function (a3) { - return true !== a3.unMatchedAlternationStopped; - }).length ? [0] : [], - mloc: {}, - cd: W - }); - undefined !== H && N.tests[G] ? K = M.extend(true, [], U) : (N.tests[G] = M.extend(true, [], U), K = N.tests[G]); - U.forEach(function (a3) { - a3.match.optionality = a3.match.defOptionality || false; - }); - return K; - } - }, - 7215: function (j, k, m) { - Object.defineProperty(k, "__esModule", { - value: true - }); - k.alternate = z; - k.checkAlternationMatch = function (I, J, K) { - for (var L, M = this.opts.greedy ? J : J.slice(0, 1), N = false, O = undefined !== K ? K.split(",") : [], P = 0; P < O.length; P++) { - -1 !== (L = I.indexOf(O[P])) && I.splice(L, 1); - } - for (var Q = 0; Q < I.length; Q++) { - if (M.includes(I[Q])) { - N = true; - break; - } - } - return N; - }; - k.handleRemove = function (I, J, K, L, M) { - var N = this; - var O = this.maskset; - var P = this.opts; - if ((P.numericInput || N.isRTL) && (J === w.keys.Backspace ? J = w.keys.Delete : J === w.keys.Delete && (J = w.keys.Backspace), N.isRTL)) { - var Q = K.end; - K.end = K.begin; - K.begin = Q; - } - var R; - var S = x.getLastValidPosition.call(N, undefined, true); - K.end >= x.getBuffer.call(N).length && S >= K.end && (K.end = S + 1); - J === w.keys.Backspace ? K.end - K.begin < 1 && (K.begin = x.seekPrevious.call(N, K.begin)) : J === w.keys.Delete && K.begin === K.end && (K.end = x.isMask.call(N, K.end, true, true) ? K.end + 1 : x.seekNext.call(N, K.end) + 1); - false !== (R = H.call(N, K)) && ((true !== L && false !== P.keepStatic || null !== P.regex && -1 !== y.getTest.call(N, K.begin).match.def.indexOf("|")) && z.call(N, true), true !== L && (O.p = J === w.keys.Delete ? K.begin + R : K.begin, O.p = x.determineNewCaretPosition.call(N, { - begin: O.p, - end: O.p - }, false, false === P.insertMode && J === w.keys.Backspace ? "none" : undefined).begin)); - }; - k.isComplete = B; - k.isSelection = C; - k.isValid = D; - k.refreshFromBuffer = F; - k.revalidateMask = H; - var q = m(6030); - var w = m(2839); - var x = m(8711); - var y = m(4713); - function z(I, J, K, L, N, P) { - var Q = this; - var T = this.dependencyLib; - var U = this.opts; - var V = Q.maskset; - if (!Q.hasAlternator) { - return false; - } - var W; - var X; - var Y; - var Z; - var a0; - var a1; - var a2; - var a3; - var a4; - var a5; - var a6; - var a7 = T.extend(true, [], V.validPositions); - var a8 = T.extend(true, {}, V.tests); - var a9 = false; - var aa = false; - var ab = undefined !== N ? N : x.getLastValidPosition.call(Q); - if (P && (a5 = P.begin, a6 = P.end, P.begin > P.end && (a5 = P.end, a6 = P.begin)), -1 === ab && undefined === N) { - W = 0; - X = (Z = y.getTest.call(Q, W)).alternation; - } else { - for (; ab >= 0; ab--) { - if ((Y = V.validPositions[ab]) && undefined !== Y.alternation) { - if (ab <= (I || 0) && Z && Z.locator[Y.alternation] !== Y.locator[Y.alternation]) { - break; - } - W = ab; - X = V.validPositions[W].alternation; - Z = Y; - } - } - } - if (undefined !== X) { - a2 = parseInt(W); - V.excludes[a2] = V.excludes[a2] || []; - true !== I && V.excludes[a2].push((0, y.getDecisionTaker)(Z) + ":" + Z.alternation); - var ac = []; - var ad = -1; - for (a0 = a2; a2 < x.getLastValidPosition.call(Q, undefined, true) + 1; a0++) { - -1 === ad && I <= a0 && undefined !== J && (ac.push(J), ad = ac.length - 1); - (a1 = V.validPositions[a2]) && true !== a1.generatedInput && (undefined === P || a0 < a5 || a0 >= a6) && ac.push(a1.input); - V.validPositions.splice(a2, 1); - } - for (-1 === ad && undefined !== J && (ac.push(J), ad = ac.length - 1); undefined !== V.excludes[a2] && V.excludes[a2].length < 10;) { - for (V.tests = {}, x.resetMaskSet.call(Q, true), a9 = true, a0 = 0; a0 < ac.length && (a3 = a9.caret || 0 == U.insertMode && null != a3 ? x.seekNext.call(Q, a3) : x.getLastValidPosition.call(Q, undefined, true) + 1, a4 = ac[a0], a9 = D.call(Q, a3, a4, false, L, true)); a0++) { - a0 === ad && (aa = a9); - 1 == I && a9 && (aa = { - caretPos: a0 - }); - } - if (a9) { - break; - } - if (x.resetMaskSet.call(Q), Z = y.getTest.call(Q, a2), V.validPositions = T.extend(true, [], a7), V.tests = T.extend(true, {}, a8), !V.excludes[a2]) { - aa = z.call(Q, I, J, K, L, a2 - 1, P); - break; - } - if (null != Z.alternation) { - var ae = (0, y.getDecisionTaker)(Z); - if (-1 !== V.excludes[a2].indexOf(ae + ":" + Z.alternation)) { - aa = z.call(Q, I, J, K, L, a2 - 1, P); - break; - } - for (V.excludes[a2].push(ae + ":" + Z.alternation), a0 = a2; a0 < x.getLastValidPosition.call(Q, undefined, true) + 1; a0++) { - V.validPositions.splice(a2); - } - } else { - delete V.excludes[a2]; - } - } - } - aa && false === U.keepStatic || delete V.excludes[a2]; - return aa; - } - function A(I, J, K) { - var L = this.opts; - var M = this.maskset; - switch (L.casing || J.casing) { - case "upper": - I = I.toUpperCase(); - break; - case "lower": - I = I.toLowerCase(); - break; - case "title": - var N = M.validPositions[K - 1]; - I = 0 === K || N && N.input === String.fromCharCode(w.keyCode.Space) ? I.toUpperCase() : I.toLowerCase(); - break; - default: - if ("function" == typeof L.casing) { - var O = Array.prototype.slice.call(arguments); - O.push(M.validPositions); - I = L.casing.apply(this, O); - } - } - return I; - } - function B(I) { - var J = this; - var K = this.opts; - var L = this.maskset; - if ("function" == typeof K.isComplete) { - return K.isComplete(I, K); - } - if ("*" !== K.repeat) { - var M = false; - var N = x.determineLastRequiredPosition.call(J, true); - var O = N.l; - if (undefined === N.def || N.def.newBlockMarker || N.def.optionality || N.def.optionalQuantifier) { - M = true; - for (var P = 0; P <= O; P++) { - var Q = y.getTestTemplate.call(J, P).match; - if (true !== Q.static && undefined === L.validPositions[P] && (false === Q.optionality || undefined === Q.optionality || Q.optionality && 0 == Q.newBlockMarker) && (false === Q.optionalQuantifier || undefined === Q.optionalQuantifier) || true === Q.static && "" != Q.def && I[P] !== y.getPlaceholder.call(J, P, Q)) { - M = false; - break; - } - } - } - return M; - } - } - function C(I) { - var J = this.opts.insertMode ? 0 : 1; - return this.isRTL ? I.begin - I.end > J : I.end - I.begin > J; - } - function D(I, J, K, L, N, P, Q) { - var T = this; - var U = this.dependencyLib; - var V = this.opts; - var W = T.maskset; - K = true === K; - var X = I; - function Y(a9) { - if (undefined !== a9) { - if (undefined !== a9.remove && (Array.isArray(a9.remove) || (a9.remove = [a9.remove]), a9.remove.sort(function (ab, ac) { - return T.isRTL ? ab.pos - ac.pos : ac.pos - ab.pos; - }).forEach(function (ab) { - H.call(T, { - begin: ab, - end: ab + 1 - }); - }), a9.remove = undefined), undefined !== a9.insert && (Array.isArray(a9.insert) || (a9.insert = [a9.insert]), a9.insert.sort(function (ab, ac) { - return T.isRTL ? ac.pos - ab.pos : ab.pos - ac.pos; - }).forEach(function (ab) { - "" !== ab.c && D.call(T, ab.pos, ab.c, undefined === ab.strict || ab.strict, undefined !== ab.fromIsValid ? ab.fromIsValid : L); - }), a9.insert = undefined), a9.refreshFromBuffer && a9.buffer) { - var aa = a9.refreshFromBuffer; - F.call(T, true === aa ? aa : aa.start, aa.end, a9.buffer); - a9.refreshFromBuffer = undefined; - } - undefined !== a9.rewritePosition && (X = a9.rewritePosition, a9 = true); - } - return a9; - } - function Z(a9, aa, ab) { - var ac = false; - y.getTests.call(T, a9).every(function (ad, ae) { - var af = ad.match; - if (x.getBuffer.call(T, true), false !== (ac = (!af.jit || undefined !== W.validPositions[x.seekPrevious.call(T, a9)]) && (null != af.fn ? af.fn.test(aa, W, a9, ab, V, C.call(T, I)) : (aa === af.def || aa === V.skipOptionalPartCharacter) && "" !== af.def && { - c: y.getPlaceholder.call(T, a9, af, true) || af.def, - pos: a9 - }))) { - var ag = undefined !== ac.c ? ac.c : aa; - var ah = a9; - ag = ag === V.skipOptionalPartCharacter && true === af.static ? y.getPlaceholder.call(T, a9, af, true) || af.def : ag; - true !== (ac = Y(ac)) && undefined !== ac.pos && ac.pos !== a9 && (ah = ac.pos); - true !== ac && undefined === ac.pos && undefined === ac.c || false === H.call(T, I, U.extend({}, ad, { - input: A.call(T, ag, af, ah) - }), L, ah) && (ac = false); - return false; - } - return true; - }); - return ac; - } - undefined !== I.begin && (X = T.isRTL ? I.end : I.begin); - var a0 = true; - var a1 = U.extend(true, [], W.validPositions); - if (false === V.keepStatic && undefined !== W.excludes[X] && true !== N && true !== L) { - for (var a2 = X; a2 < (T.isRTL ? I.begin : I.end); a2++) { - undefined !== W.excludes[a2] && (W.excludes[a2] = undefined, delete W.tests[a2]); - } - } - if ("function" == typeof V.preValidation && true !== L && true !== P && (a0 = Y(a0 = V.preValidation.call(T, x.getBuffer.call(T), X, J, C.call(T, I), V, W, I, K || N))), true === a0) { - if (a0 = Z(X, J, K), (!K || true === L) && false === a0 && true !== P) { - var a3 = W.validPositions[X]; - if (!a3 || true !== a3.match.static || a3.match.def !== J && J !== V.skipOptionalPartCharacter) { - if (V.insertMode || undefined === W.validPositions[x.seekNext.call(T, X)] || I.end > X) { - var a4 = false; - if (W.jitOffset[X] && undefined === W.validPositions[x.seekNext.call(T, X)] && false !== (a0 = D.call(T, X + W.jitOffset[X], J, true, true)) && (true !== N && (a0.caret = X), a4 = true), I.end > X && (W.validPositions[X] = undefined), !a4 && !x.isMask.call(T, X, V.keepStatic && 0 === X)) { - for (var a5 = X + 1, a6 = x.seekNext.call(T, X, false, 0 !== X); a5 <= a6; a5++) { - if (false !== (a0 = Z(a5, J, K))) { - a0 = G.call(T, X, undefined !== a0.pos ? a0.pos : a5) || a0; - X = a5; - break; - } - } - } - } - } else { - a0 = { - caret: x.seekNext.call(T, X) - }; - } - } - T.hasAlternator && true !== N && !K && (N = true, false === a0 && V.keepStatic && (B.call(T, x.getBuffer.call(T)) || 0 === X) ? a0 = z.call(T, X, J, K, L, undefined, I) : (C.call(T, I) && W.tests[X] && W.tests[X].length > 1 && V.keepStatic || 1 == a0 && true !== V.numericInput && W.tests[X] && W.tests[X].length > 1 && x.getLastValidPosition.call(T, undefined, true) > X) && (a0 = z.call(T, true))); - true === a0 && (a0 = { - pos: X - }); - } - if ("function" == typeof V.postValidation && true !== L && true !== P) { - var a7 = V.postValidation.call(T, x.getBuffer.call(T, true), undefined !== I.begin ? T.isRTL ? I.end : I.begin : I, J, a0, V, W, K, Q); - undefined !== a7 && (a0 = true === a7 ? a0 : a7); - } - a0 && undefined === a0.pos && (a0.pos = X); - false === a0 || true === P ? (x.resetMaskSet.call(T, true), W.validPositions = U.extend(true, [], a1)) : G.call(T, undefined, X, true); - var a8 = Y(a0); - undefined !== T.maxLength && x.getBuffer.call(T).length > T.maxLength && !L && (x.resetMaskSet.call(T, true), W.validPositions = U.extend(true, [], a1), a8 = false); - return a8; - } - function E(I, J, K) { - for (var L = this.maskset, M = false, N = y.getTests.call(this, I), O = 0; O < N.length; O++) { - if (N[O].match && (N[O].match.nativeDef === J.match[K.shiftPositions ? "def" : "nativeDef"] && (!K.shiftPositions || !J.match.static) || N[O].match.nativeDef === J.match.nativeDef || K.regex && !N[O].match.static && N[O].match.fn.test(J.input, L, I, false, K))) { - M = true; - break; - } - if (N[O].match && N[O].match.def === J.match.nativeDef) { - M = undefined; - break; - } - } - false === M && undefined !== L.jitOffset[I] && (M = E.call(this, I + L.jitOffset[I], J, K)); - return M; - } - function F(I, J, K) { - var L; - var M; - var N = this; - var O = this.maskset; - var P = this.opts; - var Q = this.dependencyLib; - var R = P.skipOptionalPartCharacter; - var S = N.isRTL ? K.slice().reverse() : K; - if (P.skipOptionalPartCharacter = "", true === I) { - x.resetMaskSet.call(N, false); - I = 0; - J = K.length; - M = x.determineNewCaretPosition.call(N, { - begin: 0, - end: 0 - }, false).begin; - } else { - for (L = I; L < J; L++) { - O.validPositions.splice(I, 0); - } - M = I; - } - var T = new Q.Event("keypress"); - for (L = I; L < J; L++) { - T.key = S[L].toString(); - N.ignorable = false; - var U = q.EventHandlers.keypressEvent.call(N, T, true, false, false, M); - false !== U && undefined !== U && (M = U.forwardPosition); - } - P.skipOptionalPartCharacter = R; - } - function G(I, J, K) { - var L = this; - var M = this.maskset; - var N = this.dependencyLib; - if (undefined === I) { - for (I = J - 1; I > 0 && !M.validPositions[I]; I--) {} - } - for (var O = I; O < J; O++) { - if (undefined === M.validPositions[O] && !x.isMask.call(L, O, false) && (0 == O ? y.getTest.call(L, O) : M.validPositions[O - 1])) { - var P = y.getTests.call(L, O).slice(); - "" === P[P.length - 1].match.def && P.pop(); - var Q; - var R = y.determineTestTemplate.call(L, O, P); - if (R && (true !== R.match.jit || "master" === R.match.newBlockMarker && (Q = M.validPositions[O + 1]) && true === Q.match.optionalQuantifier) && ((R = N.extend({}, R, { - input: y.getPlaceholder.call(L, O, R.match, true) || R.match.def - })).generatedInput = true, H.call(L, O, R, true), true !== K)) { - var S = M.validPositions[J].input; - M.validPositions[J] = undefined; - return D.call(L, J, S, true, true); - } - } - } - } - function H(I, J, K, L) { - var M = this; - var N = this.maskset; - var P = this.opts; - var Q = this.dependencyLib; - function R(a6, a7, a8) { - var a9 = a7[a6]; - if (undefined !== a9 && true === a9.match.static && true !== a9.match.optionality && (undefined === a7[0] || undefined === a7[0].alternation)) { - var aa = a8.begin <= a6 - 1 ? a7[a6 - 1] && true === a7[a6 - 1].match.static && a7[a6 - 1] : a7[a6 - 1]; - var ab = a8.end > a6 + 1 ? a7[a6 + 1] && true === a7[a6 + 1].match.static && a7[a6 + 1] : a7[a6 + 1]; - return aa && ab; - } - return false; - } - var T = 0; - var U = undefined !== I.begin ? I.begin : I; - var V = undefined !== I.end ? I.end : I; - var W = true; - if (I.begin > I.end && (U = I.end, V = I.begin), L = undefined !== L ? L : U, undefined === K && (U !== V || P.insertMode && undefined !== N.validPositions[L] || undefined === J || J.match.optionalQuantifier || J.match.optionality)) { - var X; - var Y = Q.extend(true, [], N.validPositions); - var Z = x.getLastValidPosition.call(M, undefined, true); - N.p = U; - var a0 = C.call(M, I) ? U : L; - for (X = Z; X >= a0; X--) { - N.validPositions.splice(X, 1); - undefined === J && delete N.tests[X + 1]; - } - var a1; - var a2; - var a3 = L; - var a4 = a3; - for (J && (N.validPositions[L] = Q.extend(true, {}, J), a4++, a3++), null == Y[V] && N.jitOffset[V] && (V += N.jitOffset[V] + 1), X = J ? V : V - 1; X <= Z; X++) { - if (undefined !== (a1 = Y[X]) && true !== a1.generatedInput && (X >= V || X >= U && R(X, Y, { - begin: U, - end: V - }))) { - for (; "" !== y.getTest.call(M, a4).match.def;) { - if (false !== (a2 = E.call(M, a4, a1, P)) || "+" === a1.match.def) { - "+" === a1.match.def && x.getBuffer.call(M, true); - var a5 = D.call(M, a4, a1.input, "+" !== a1.match.def, true); - if (W = false !== a5, a3 = (a5.pos || a4) + 1, !W && a2) { - break; - } - } else { - W = false; - } - if (W) { - undefined === J && a1.match.static && X === I.begin && T++; - break; - } - if (!W && x.getBuffer.call(M), a4 > N.maskLength) { - break; - } - a4++; - } - "" == y.getTest.call(M, a4).match.def && (W = false); - a4 = a3; - } - if (!W) { - break; - } - } - if (!W) { - N.validPositions = Q.extend(true, [], Y); - x.resetMaskSet.call(M, true); - return false; - } - } else { - J && y.getTest.call(M, L).match.cd === J.match.cd && (N.validPositions[L] = Q.extend(true, {}, J)); - } - x.resetMaskSet.call(M, true); - return T; - } - } - }; - var f = {}; - function g(j) { - var k = f[j]; - if (undefined !== k) { - return k.exports; - } - f[j] = { - exports: {} - }; - var l = f[j]; - d[j](l, l.exports, g); - return l.exports; - } - var h = {}; - (function () { - var j = h; - Object.defineProperty(j, "__esModule", { - value: true - }); - j.default = undefined; - g(7149); - g(3194); - g(9302); - g(4013); - g(3851); - g(219); - g(207); - g(5296); - var k; - var l = (k = g(2394)) && k.__esModule ? k : { - default: k - }; - j.default = l.default; - })(); - return h; - }(); - },, function (a, b, c) { - var d = c(11).default; - var f = c(62); - a.exports = function (g) { - var h = f(g, "string"); - return "symbol" == d(h) ? h : h + ""; - }; - a.exports.__esModule = true; - a.exports.default = a.exports; - }, function (a, b, c) { - var d = c(3); - a.exports = function (f, g) { - for (; !{}.hasOwnProperty.call(f, g) && null !== (f = d(f));) {} - return f; - }; - a.exports.__esModule = true; - a.exports.default = a.exports; - }, function (b, c, d) { - "use strict"; - - Object.defineProperty(c, "__esModule", { - value: true - }); - var f; - var g = function () { - function p(q, u) { - for (var v = 0; v < u.length; v++) { - var w = u[v]; - w.enumerable = w.enumerable || false; - w.configurable = true; - "value" in w && (w.writable = true); - Object.defineProperty(q, w.key, w); - } - } - return function (q, u, v) { - u && p(q.prototype, u); - v && p(q, v); - return q; - }; - }(); - var h = d(27); - var j = (f = h) && f.__esModule ? f : { - default: f - }; - var k = d(47); - var m = function (p) { - function q(u, v) { - !function (x, y) { - if (!(x instanceof y)) { - throw new TypeError("Cannot call a class as a function"); - } - }(this, q); - var w = function (x, y) { - if (!x) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - return !y || "object" != typeof y && "function" != typeof y ? x : y; - }(this, (q.__proto__ || Object.getPrototypeOf(q)).call(this, u.substring(1), v)); - w.bytes = u.split("").map(function (x) { - return x.charCodeAt(0); - }); - return w; - } - (function (u, v) { - if ("function" != typeof v && null !== v) { - throw new TypeError("Super expression must either be null or a function, not " + typeof v); - } - u.prototype = Object.create(v && v.prototype, { - constructor: { - value: u, - enumerable: false, - writable: true, - configurable: true - } - }); - v && (Object.setPrototypeOf ? Object.setPrototypeOf(u, v) : u.__proto__ = v); - })(q, p); - g(q, [{ - key: "valid", - value: function () { - return /^[\x00-\x7F\xC8-\xD3]+$/.test(this.data); - } - }, { - key: "encode", - value: function () { - var u = this.bytes; - var v = u.shift() - 105; - var w = k.SET_BY_CODE[v]; - if (undefined === w) { - throw new RangeError("The encoding does not start with a start character."); - } - true === this.shouldEncodeAsEan128() && u.unshift(k.FNC1); - var x = q.next(u, 1, w); - return { - text: this.text === this.data ? this.text.replace(/[^\x20-\x7E]/g, "") : this.text, - data: q.getBar(v) + x.result + q.getBar((x.checksum + v) % k.MODULO) + q.getBar(k.STOP) - }; - } - }, { - key: "shouldEncodeAsEan128", - value: function () { - var u = this.options.ean128 || false; - "string" == typeof u && (u = "true" === u.toLowerCase()); - return u; - } - }], [{ - key: "getBar", - value: function (u) { - return k.BARS[u] ? k.BARS[u].toString() : ""; - } - }, { - key: "correctIndex", - value: function (u, v) { - if (v === k.SET_A) { - var w = u.shift(); - return w < 32 ? w + 64 : w - 32; - } - return v === k.SET_B ? u.shift() - 32 : 10 * (u.shift() - 48) + u.shift() - 48; - } - }, { - key: "next", - value: function (u, v, w) { - if (!u.length) { - return { - result: "", - checksum: 0 - }; - } - var x = undefined; - var y = undefined; - if (u[0] >= 200) { - y = u.shift() - 105; - var z = k.SWAP[y]; - undefined !== z ? x = q.next(u, v + 1, z) : (w !== k.SET_A && w !== k.SET_B || y !== k.SHIFT || (u[0] = w === k.SET_A ? u[0] > 95 ? u[0] - 96 : u[0] : u[0] < 32 ? u[0] + 96 : u[0]), x = q.next(u, v + 1, w)); - } else { - y = q.correctIndex(u, w); - x = q.next(u, v + 1, w); - } - var A = y * v; - return { - result: q.getBar(y) + x.result, - checksum: A + x.checksum - }; - } - }]); - return q; - }(j.default); - c.default = m; - }, function (a, b, c) { - "use strict"; - - Object.defineProperty(b, "__esModule", { - value: true - }); - b.mod10 = function (d) { - for (var f = 0, g = 0; g < d.length; g++) { - var h = parseInt(d[g]); - (g + d.length) % 2 == 0 ? f += h : f += 2 * h % 10 + Math.floor(2 * h / 10); - } - return (10 - f % 10) % 10; - }; - b.mod11 = function (d) { - for (var f = 0, g = [2, 3, 4, 5, 6, 7], h = 0; h < d.length; h++) { - var j = parseInt(d[d.length - 1 - h]); - f += g[h % g.length] * j; - } - return (11 - f % 11) % 11; - }; - }, function (a, b, c) { - "use strict"; - - Object.defineProperty(b, "__esModule", { - value: true - }); - var d = Object.assign || function (f) { - for (var g = 1; g < arguments.length; g++) { - var h = arguments[g]; - for (var i in h) Object.prototype.hasOwnProperty.call(h, i) && (f[i] = h[i]); - } - return f; - }; - b.default = function (f, g) { - return d({}, f, g); - }; - }, function (b, c, d) { - var f; - var g; - var h; - var j; - var k; - var m; - b.exports = (m = d(17), g = (f = m).lib, h = g.Base, j = g.WordArray, (k = f.x64 = {}).Word = h.extend({ - init: function (p, q) { - this.high = p; - this.low = q; - } - }), k.WordArray = h.extend({ - init: function (p, q) { - p = this.words = p || []; - this.sigBytes = null != q ? q : 8 * p.length; - }, - toX32: function () { - for (var p = this.words, q = p.length, u = [], v = 0; v < q; v++) { - var w = p[v]; - u.push(w.high); - u.push(w.low); - } - return j.create(u, this.sigBytes); - }, - clone: function () { - for (var p = h.clone.call(this), q = p.words = this.words.slice(0), u = q.length, v = 0; v < u; v++) { - q[v] = q[v].clone(); - } - return p; - } - }), m); - }, function (a, b) { - a.exports = function (d, f) { - var g = null == d ? null : "undefined" != typeof Symbol && d[Symbol.iterator] || d["@@iterator"]; - if (null != g) { - var h; - var j; - var k; - var m; - var p = []; - var q = true; - var u = false; - try { - if (k = (g = g.call(d)).next, 0 === f) { - if (Object(g) !== g) { - return; - } - q = false; - } else { - for (; !(q = (h = k.call(g)).done) && (p.push(h.value), p.length !== f); q = true) {} - } - } catch (v) { - u = true; - j = v; - } finally { - try { - if (!q && null != g.return && (m = g.return(), Object(m) !== m)) { - return; - } - } finally { - if (u) { - throw j; - } - } - } - return p; - } - }; - a.exports.__esModule = true; - a.exports.default = a.exports; - }, function (a, b, c) { - var d = c(11).default; - a.exports = function (f, g) { - if ("object" != d(f) || !f) { - return f; - } - var h = f[Symbol.toPrimitive]; - if (undefined !== h) { - var j = h.call(f, g || "default"); - if ("object" != d(j)) { - return j; - } - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return ("string" === g ? String : Number)(f); - }; - a.exports.__esModule = true; - a.exports.default = a.exports; - }, function (a, b, c) { - var d = c(42); - a.exports = function (f) { - if (Array.isArray(f)) { - return d(f); - } - }; - a.exports.__esModule = true; - a.exports.default = a.exports; - }, function (a, b) { - a.exports = function () { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - }; - a.exports.__esModule = true; - a.exports.default = a.exports; - }, function (a, b) { - a.exports = function (c) { - if (undefined === c) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - return c; - }; - a.exports.__esModule = true; - a.exports.default = a.exports; - }, function (a, b) { - function c(d, f) { - a.exports = c = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (g, h) { - g.__proto__ = h; - return g; - }; - a.exports.__esModule = true; - a.exports.default = a.exports; - return c(d, f); - } - a.exports = c; - a.exports.__esModule = true; - a.exports.default = a.exports; - }, function (a, b) { - b.L = { - bit: 1 - }; - b.M = { - bit: 0 - }; - b.Q = { - bit: 3 - }; - b.H = { - bit: 2 - }; - b.isValid = function (c) { - return c && undefined !== c.bit && c.bit >= 0 && c.bit < 4; - }; - b.from = function (c, d) { - if (b.isValid(c)) { - return c; - } - try { - return function (f) { - if ("string" != typeof f) { - throw new Error("Param is not a string"); - } - switch (f.toLowerCase()) { - case "l": - case "low": - return b.L; - case "m": - case "medium": - return b.M; - case "q": - case "quartile": - return b.Q; - case "h": - case "high": - return b.H; - default: - throw new Error("Unknown EC Level: " + f); - } - }(c); - } catch (f) { - return d; - } - }; - }, function (a, b, c) { - var d; - a.exports = (d = c(17), function (f) { - var g = d; - var h = g.lib; - var j = h.WordArray; - var k = h.Hasher; - var m = g.algo; - var p = []; - var q = []; - !function () { - function x(B) { - for (var C = f.sqrt(B), D = 2; D <= C; D++) { - if (!(B % D)) { - return false; - } - } - return true; - } - function y(B) { - return 4294967296 * (B - (0 | B)) | 0; - } - for (var z = 2, A = 0; A < 64;) { - x(z) && (A < 8 && (p[A] = y(f.pow(z, 0.5))), q[A] = y(f.pow(z, 0.3333333333333333)), A++); - z++; - } - }(); - var v = []; - m.SHA256 = k.extend({ - _doReset: function () { - this._hash = new j.init(p.slice(0)); - }, - _doProcessBlock: function (x, z) { - for (var A = this._hash.words, B = A[0], C = A[1], D = A[2], E = A[3], F = A[4], G = A[5], H = A[6], I = A[7], J = 0; J < 64; J++) { - if (J < 16) { - v[J] = 0 | x[z + J]; - } else { - var K = v[J - 15]; - var L = (K << 25 | K >>> 7) ^ (K << 14 | K >>> 18) ^ K >>> 3; - var M = v[J - 2]; - var N = (M << 15 | M >>> 17) ^ (M << 13 | M >>> 19) ^ M >>> 10; - v[J] = L + v[J - 7] + N + v[J - 16]; - } - var O = B & C ^ B & D ^ C & D; - var P = (B << 30 | B >>> 2) ^ (B << 19 | B >>> 13) ^ (B << 10 | B >>> 22); - var Q = I + ((F << 26 | F >>> 6) ^ (F << 21 | F >>> 11) ^ (F << 7 | F >>> 25)) + (F & G ^ ~F & H) + q[J] + v[J]; - I = H; - H = G; - G = F; - F = E + Q | 0; - E = D; - D = C; - C = B; - B = Q + (P + O) | 0; - } - A[0] = A[0] + B | 0; - A[1] = A[1] + C | 0; - A[2] = A[2] + D | 0; - A[3] = A[3] + E | 0; - A[4] = A[4] + F | 0; - A[5] = A[5] + G | 0; - A[6] = A[6] + H | 0; - A[7] = A[7] + I | 0; - }, - _doFinalize: function () { - var x = this._data; - var y = x.words; - var z = 8 * this._nDataBytes; - var A = 8 * x.sigBytes; - y[A >>> 5] |= 128 << 24 - A % 32; - y[14 + (A + 64 >>> 9 << 4)] = f.floor(z / 4294967296); - y[15 + (A + 64 >>> 9 << 4)] = z; - x.sigBytes = 4 * y.length; - this._process(); - return this._hash; - }, - clone: function () { - var x = k.clone.call(this); - x._hash = this._hash.clone(); - return x; - } - }); - var w = m.SHA256; - g.SHA256 = k._createHelper(w); - g.HmacSHA256 = k._createHmacHelper(w); - }(Math), d.SHA256); - }, function (b, c, d) { - var f; - var g; - var h; - var j; - b.exports = (f = d(17), h = (g = f).lib.Base, j = g.enc.Utf8, void (g.algo.HMAC = h.extend({ - init: function (k, m) { - k = this._hasher = new k.init(); - "string" == typeof m && (m = j.parse(m)); - var p = k.blockSize; - var q = 4 * p; - m.sigBytes > q && (m = k.finalize(m)); - m.clamp(); - for (var u = this._oKey = m.clone(), v = this._iKey = m.clone(), w = u.words, x = v.words, y = 0; y < p; y++) { - w[y] ^= 1549556828; - x[y] ^= 909522486; - } - u.sigBytes = v.sigBytes = q; - this.reset(); - }, - reset: function () { - var k = this._hasher; - k.reset(); - k.update(this._iKey); - }, - update: function (k) { - this._hasher.update(k); - return this; - }, - finalize: function (k) { - var l = this._hasher; - var m = l.finalize(k); - l.reset(); - return l.finalize(this._oKey.clone().concat(m)); - } - }))); - }, function (a, b, c) { - var d; - var f; - undefined === (f = "function" == typeof (d = function () { - var g; - var h; - var j; - var k; - var m; - var p = {}; - var q = {}; - var u = { - currentLocale: "en", - zeroFormat: null, - nullFormat: null, - defaultFormat: "0,0", - scalePercentBy100: true - }; - var v = { - currentLocale: u.currentLocale, - zeroFormat: u.zeroFormat, - nullFormat: u.nullFormat, - defaultFormat: u.defaultFormat, - scalePercentBy100: u.scalePercentBy100 - }; - function w(x, y) { - this._input = x; - this._value = y; - } - (g = function (x) { - var y; - var z; - var A; - var B; - if (g.isNumeral(x)) { - y = x.value(); - } else { - if (0 === x || undefined === x) { - y = 0; - } else { - if (null === x || h.isNaN(x)) { - y = null; - } else { - if ("string" == typeof x) { - if (u.zeroFormat && x === u.zeroFormat) { - y = 0; - } else { - if (u.nullFormat && x === u.nullFormat || !x.replace(/[^0-9]+/g, "").length) { - y = null; - } else { - for (z in p) if ((B = "function" == typeof p[z].regexps.unformat ? p[z].regexps.unformat() : p[z].regexps.unformat) && x.match(B)) { - A = p[z].unformat; - break; - } - y = (A = A || g._.stringToNumber)(x); - } - } - } else { - y = Number(x) || null; - } - } - } - } - return new w(x, y); - }).version = "2.0.6"; - g.isNumeral = function (x) { - return x instanceof w; - }; - g._ = h = { - numberToFormat: function (x, z, A) { - var B; - var C; - var D; - var E; - var F; - var G; - var H; - var I; - var J = q[g.options.currentLocale]; - var K = false; - var L = false; - var M = ""; - var N = ""; - var O = false; - if (x = x || 0, D = Math.abs(x), g._.includes(z, "(") ? (K = true, z = z.replace(/[\(|\)]/g, "")) : (g._.includes(z, "+") || g._.includes(z, "-")) && (G = g._.includes(z, "+") ? z.indexOf("+") : x < 0 ? z.indexOf("-") : -1, z = z.replace(/[\+|\-]/g, "")), g._.includes(z, "a") && (C = !!(C = z.match(/a(k|m|b|t)?/)) && C[1], g._.includes(z, " a") && (M = " "), z = z.replace(new RegExp(M + "a[kmbt]?"), ""), D >= 1000000000000 && !C || "t" === C ? (M += J.abbreviations.trillion, x /= 1000000000000) : D < 1000000000000 && D >= 1000000000 && !C || "b" === C ? (M += J.abbreviations.billion, x /= 1000000000) : D < 1000000000 && D >= 1000000 && !C || "m" === C ? (M += J.abbreviations.million, x /= 1000000) : (D < 1000000 && D >= 1000 && !C || "k" === C) && (M += J.abbreviations.thousand, x /= 1000)), g._.includes(z, "[.]") && (L = true, z = z.replace("[.]", ".")), E = x.toString().split(".")[0], F = z.split(".")[1], H = z.indexOf(","), B = (z.split(".")[0].split(",")[0].match(/0/g) || []).length, F ? (g._.includes(F, "[") ? (F = (F = F.replace("]", "")).split("["), N = g._.toFixed(x, F[0].length + F[1].length, A, F[1].length)) : N = g._.toFixed(x, F.length, A), E = N.split(".")[0], N = g._.includes(N, ".") ? J.delimiters.decimal + N.split(".")[1] : "", L && 0 === Number(N.slice(1)) && (N = "")) : E = g._.toFixed(x, 0, A), M && !C && Number(E) >= 1000 && M !== J.abbreviations.trillion) { - switch (E = String(Number(E) / 1000), M) { - case J.abbreviations.thousand: - M = J.abbreviations.million; - break; - case J.abbreviations.million: - M = J.abbreviations.billion; - break; - case J.abbreviations.billion: - M = J.abbreviations.trillion; - } - } - if (g._.includes(E, "-") && (E = E.slice(1), O = true), E.length < B) { - for (var P = B - E.length; P > 0; P--) { - E = "0" + E; - } - } - H > -1 && (E = E.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1" + J.delimiters.thousands)); - 0 === z.indexOf(".") && (E = ""); - I = E + N + (M || ""); - K ? I = (K && O ? "(" : "") + I + (K && O ? ")" : "") : G >= 0 ? I = 0 === G ? (O ? "-" : "+") + I : I + (O ? "-" : "+") : O && (I = "-" + I); - return I; - }, - stringToNumber: function (x) { - var y; - var z; - var A; - var B = q[u.currentLocale]; - var C = x; - var D = { - thousand: 3, - million: 6, - billion: 9, - trillion: 12 - }; - if (u.zeroFormat && x === u.zeroFormat) { - z = 0; - } else { - if (u.nullFormat && x === u.nullFormat || !x.replace(/[^0-9]+/g, "").length) { - z = null; - } else { - for (y in z = 1, "." !== B.delimiters.decimal && (x = x.replace(/\./g, "").replace(B.delimiters.decimal, ".")), D) if (A = new RegExp("[^a-zA-Z]" + B.abbreviations[y] + "(?:\\)|(\\" + B.currency.symbol + ")?(?:\\))?)?$"), C.match(A)) { - z *= Math.pow(10, D[y]); - break; - } - z *= (x.split("-").length + Math.min(x.split("(").length - 1, x.split(")").length - 1)) % 2 ? 1 : -1; - x = x.replace(/[^0-9\.]+/g, ""); - z *= Number(x); - } - } - return z; - }, - isNaN: function (x) { - return "number" == typeof x && isNaN(x); - }, - includes: function (x, y) { - return -1 !== x.indexOf(y); - }, - insert: function (x, y, z) { - return x.slice(0, z) + y + x.slice(z); - }, - reduce: function (x, y) { - if (null === this) { - throw new TypeError("Array.prototype.reduce called on null or undefined"); - } - if ("function" != typeof y) { - throw new TypeError(y + " is not a function"); - } - var z; - var A = Object(x); - var B = A.length >>> 0; - var C = 0; - if (3 === arguments.length) { - z = arguments[2]; - } else { - for (; C < B && !(C in A);) { - C++; - } - if (C >= B) { - throw new TypeError("Reduce of empty array with no initial value"); - } - z = A[C++]; - } - for (; C < B; C++) { - C in A && (z = y(z, A[C], C, A)); - } - return z; - }, - multiplier: function (x) { - var y = x.toString().split("."); - return y.length < 2 ? 1 : Math.pow(10, y[1].length); - }, - correctionFactor: function () { - var x = Array.prototype.slice.call(arguments); - return x.reduce(function (y, z) { - var A = h.multiplier(z); - return y > A ? y : A; - }, 1); - }, - toFixed: function (x, y, z, A) { - var B; - var C; - var D; - var E; - var F = x.toString().split("."); - var G = y - (A || 0); - B = 2 === F.length ? Math.min(Math.max(F[1].length, G), y) : G; - D = Math.pow(10, B); - E = (z(x + "e+" + B) / D).toFixed(B); - A > y - B && (C = new RegExp("\\.?0{1," + (A - (y - B)) + "}$"), E = E.replace(C, "")); - return E; - } - }; - g.options = v; - g.formats = p; - g.locales = q; - g.locale = function (x) { - x && (v.currentLocale = x.toLowerCase()); - return u.currentLocale; - }; - g.localeData = function (x) { - if (!x) { - return q[u.currentLocale]; - } - if (x = x.toLowerCase(), !q[x]) { - throw new Error("Unknown locale : " + x); - } - return q[x]; - }; - g.reset = function () { - for (var x in u) v[x] = u[x]; - }; - g.zeroFormat = function (x) { - v.zeroFormat = "string" == typeof x ? x : null; - }; - g.nullFormat = function (x) { - v.nullFormat = "string" == typeof x ? x : null; - }; - g.defaultFormat = function (x) { - v.defaultFormat = "string" == typeof x ? x : "0.0"; - }; - g.register = function (x, y, z) { - if (y = y.toLowerCase(), this[x + "s"][y]) { - throw new TypeError(y + " " + x + " already registered."); - } - this[x + "s"][y] = z; - return z; - }; - g.validate = function (x, y) { - var z; - var A; - var B; - var C; - var D; - var E; - var F; - var G; - if ("string" != typeof x && (x += "", console.warn && console.warn("Numeral.js: Value is not string. It has been co-erced to: ", x)), (x = x.trim()).match(/^\d+$/)) { - return true; - } - if ("" === x) { - return false; - } - try { - F = g.localeData(y); - } catch (H) { - F = g.localeData(g.locale()); - } - B = F.currency.symbol; - D = F.abbreviations; - z = F.delimiters.decimal; - A = "." === F.delimiters.thousands ? "\\." : F.delimiters.thousands; - return !(null !== (G = x.match(/^[^\d]+/)) && (x = x.substr(1), G[0] !== B) || null !== (G = x.match(/[^\d]+$/)) && (x = x.slice(0, -1), G[0] !== D.thousand && G[0] !== D.million && G[0] !== D.billion && G[0] !== D.trillion) || (E = new RegExp(A + "{2}"), x.match(/[^\d.,]/g) || (C = x.split(z)).length > 2 || (C.length < 2 ? !C[0].match(/^\d+.*\d$/) || C[0].match(E) : 1 === C[0].length ? !C[0].match(/^\d+$/) || C[0].match(E) || !C[1].match(/^\d+$/) : !C[0].match(/^\d+.*\d$/) || C[0].match(E) || !C[1].match(/^\d+$/)))); - }; - g.fn = w.prototype = { - clone: function () { - return g(this); - }, - format: function (x, y) { - var z; - var A; - var B; - var C = this._value; - var D = x || u.defaultFormat; - if (y = y || Math.round, 0 === C && null !== u.zeroFormat) { - A = u.zeroFormat; - } else { - if (null === C && null !== u.nullFormat) { - A = u.nullFormat; - } else { - for (z in p) if (D.match(p[z].regexps.format)) { - B = p[z].format; - break; - } - A = (B = B || g._.numberToFormat)(C, D, y); - } - } - return A; - }, - value: function () { - return this._value; - }, - input: function () { - return this._input; - }, - set: function (x) { - this._value = Number(x); - return this; - }, - add: function (x) { - var y = h.correctionFactor.call(null, this._value, x); - this._value = h.reduce([this._value, x], function (z, A, B, C) { - return z + Math.round(y * A); - }, 0) / y; - return this; - }, - subtract: function (x) { - var y = h.correctionFactor.call(null, this._value, x); - this._value = h.reduce([x], function (z, A, B, C) { - return z - Math.round(y * A); - }, Math.round(this._value * y)) / y; - return this; - }, - multiply: function (x) { - this._value = h.reduce([this._value, x], function (y, z, A, B) { - var C = h.correctionFactor(y, z); - return Math.round(y * C) * Math.round(z * C) / Math.round(C * C); - }, 1); - return this; - }, - divide: function (x) { - this._value = h.reduce([this._value, x], function (y, z, A, B) { - var C = h.correctionFactor(y, z); - return Math.round(y * C) / Math.round(z * C); - }); - return this; - }, - difference: function (x) { - return Math.abs(g(this._value).subtract(x).value()); - } - }; - g.register("locale", "en", { - delimiters: { - thousands: ",", - decimal: "." - }, - abbreviations: { - thousand: "k", - million: "m", - billion: "b", - trillion: "t" - }, - ordinal: function (x) { - var y = x % 10; - return 1 == ~~(x % 100 / 10) ? "th" : 1 === y ? "st" : 2 === y ? "nd" : 3 === y ? "rd" : "th"; - }, - currency: { - symbol: "$" - } - }); - g.register("format", "bps", { - regexps: { - format: /(BPS)/, - unformat: /(BPS)/ - }, - format: function (x, y, z) { - var A; - var B = g._.includes(y, " BPS") ? " " : ""; - x *= 10000; - y = y.replace(/\s?BPS/, ""); - A = g._.numberToFormat(x, y, z); - g._.includes(A, ")") ? ((A = A.split("")).splice(-1, 0, B + "BPS"), A = A.join("")) : A = A + B + "BPS"; - return A; - }, - unformat: function (x) { - return +(0.0001 * g._.stringToNumber(x)).toFixed(15); - } - }); - k = { - base: 1024, - suffixes: ["B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"] - }; - m = "(" + (m = (j = { - base: 1000, - suffixes: ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"] - }).suffixes.concat(k.suffixes.filter(function (x) { - return j.suffixes.indexOf(x) < 0; - })).join("|")).replace("B", "B(?!PS)") + ")"; - g.register("format", "bytes", { - regexps: { - format: /([0\s]i?b)/, - unformat: new RegExp(m) - }, - format: function (x, y, z) { - var A; - var B; - var C; - var D = g._.includes(y, "ib") ? k : j; - var E = g._.includes(y, " b") || g._.includes(y, " ib") ? " " : ""; - for (y = y.replace(/\s?i?b/, ""), A = 0; A <= D.suffixes.length; A++) { - if (B = Math.pow(D.base, A), C = Math.pow(D.base, A + 1), null === x || 0 === x || x >= B && x < C) { - E += D.suffixes[A]; - B > 0 && (x /= B); - break; - } - } - return g._.numberToFormat(x, y, z) + E; - }, - unformat: function (x) { - var y; - var z; - var A = g._.stringToNumber(x); - if (A) { - for (y = j.suffixes.length - 1; y >= 0; y--) { - if (g._.includes(x, j.suffixes[y])) { - z = Math.pow(j.base, y); - break; - } - if (g._.includes(x, k.suffixes[y])) { - z = Math.pow(k.base, y); - break; - } - } - A *= z || 1; - } - return A; - } - }); - g.register("format", "currency", { - regexps: { - format: /(\$)/ - }, - format: function (x, y, z) { - var A; - var B; - var C = g.locales[g.options.currentLocale]; - var D = { - before: y.match(/^([\+|\-|\(|\s|\$]*)/)[0], - after: y.match(/([\+|\-|\)|\s|\$]*)$/)[0] - }; - for (y = y.replace(/\s?\$\s?/, ""), A = g._.numberToFormat(x, y, z), x >= 0 ? (D.before = y.match(/^([\+|\-|\(|\s|\$]*)/)[0].replace(/[\-\(]/, ""), D.after = y.match(/([\+|\-|\)|\s|\$]*)$/)[0].replace(/[\-\)]/, "")) : x < 0 && !g._.includes(y.match(/^([\+|\-|\(|\s|\$]*)/)[0], "-") && !g._.includes(y.match(/^([\+|\-|\(|\s|\$]*)/)[0], "(") && (D.before = "-" + y.match(/^([\+|\-|\(|\s|\$]*)/)[0]), B = 0; B < y.match(/^([\+|\-|\(|\s|\$]*)/)[0].length; B++) { - switch (y.match(/^([\+|\-|\(|\s|\$]*)/)[0][B]) { - case "$": - A = g._.insert(A, C.currency.symbol, B); - break; - case " ": - A = g._.insert(A, " ", B + C.currency.symbol.length - 1); - } - } - for (B = y.match(/([\+|\-|\)|\s|\$]*)$/)[0].length - 1; B >= 0; B--) { - switch (y.match(/([\+|\-|\)|\s|\$]*)$/)[0][B]) { - case "$": - A = B === y.match(/([\+|\-|\)|\s|\$]*)$/)[0].length - 1 ? A + C.currency.symbol : g._.insert(A, C.currency.symbol, -(y.match(/([\+|\-|\)|\s|\$]*)$/)[0].length - (1 + B))); - break; - case " ": - A = B === y.match(/([\+|\-|\)|\s|\$]*)$/)[0].length - 1 ? A + " " : g._.insert(A, " ", -(y.match(/([\+|\-|\)|\s|\$]*)$/)[0].length - (1 + B) + C.currency.symbol.length - 1)); - } - } - return A; - } - }); - g.register("format", "exponential", { - regexps: { - format: /(e\+|e-)/, - unformat: /(e\+|e-)/ - }, - format: function (x, y, z) { - var A = ("number" != typeof x || g._.isNaN(x) ? "0e+0" : x.toExponential()).split("e"); - y = y.replace(/e[\+|\-]{1}0/, ""); - return g._.numberToFormat(Number(A[0]), y, z) + "e" + A[1]; - }, - unformat: function (x) { - var y = g._.includes(x, "e+") ? x.split("e+") : x.split("e-"); - var z = Number(y[0]); - var A = Number(y[1]); - A = g._.includes(x, "e-") ? A *= -1 : A; - return g._.reduce([z, Math.pow(10, A)], function (B, C, D, E) { - var F = g._.correctionFactor(B, C); - return B * F * (C * F) / (F * F); - }, 1); - } - }); - g.register("format", "ordinal", { - regexps: { - format: /(o)/ - }, - format: function (x, y, z) { - var A = g.locales[g.options.currentLocale]; - var B = g._.includes(y, " o") ? " " : ""; - y = y.replace(/\s?o/, ""); - B += A.ordinal(x); - return g._.numberToFormat(x, y, z) + B; - } - }); - g.register("format", "percentage", { - regexps: { - format: /(%)/, - unformat: /(%)/ - }, - format: function (x, y, z) { - var A; - var B = g._.includes(y, " %") ? " " : ""; - g.options.scalePercentBy100 && (x *= 100); - y = y.replace(/\s?\%/, ""); - A = g._.numberToFormat(x, y, z); - g._.includes(A, ")") ? ((A = A.split("")).splice(-1, 0, B + "%"), A = A.join("")) : A = A + B + "%"; - return A; - }, - unformat: function (x) { - var y = g._.stringToNumber(x); - return g.options.scalePercentBy100 ? 0.01 * y : y; - } - }); - g.register("format", "time", { - regexps: { - format: /(:)/, - unformat: /(:)/ - }, - format: function (x, y, z) { - var A = Math.floor(x / 60 / 60); - var B = Math.floor((x - 60 * A * 60) / 60); - var C = Math.round(x - 60 * A * 60 - 60 * B); - return A + ":" + (B < 10 ? "0" + B : B) + ":" + (C < 10 ? "0" + C : C); - }, - unformat: function (x) { - var y = x.split(":"); - var z = 0; - 3 === y.length ? (z += 60 * Number(y[0]) * 60, z += 60 * Number(y[1]), z += Number(y[2])) : 2 === y.length && (z += 60 * Number(y[0]), z += Number(y[1])); - return Number(z); - } - }); - return g; - }) ? d.call(b, c, b, a) : d) || (a.exports = f); - }, function (a, b) { - window._iconfont_svg_string_3757618 = ""; - (function (c) { - var d; - var f = (d = (d = document.getElementsByTagName("script"))[d.length - 1]).getAttribute("data-injectcss"); - if (!(d = d.getAttribute("data-disable-injectsvg"))) { - var g; - var h; - var j; - var k; - var m; - if (f && !c.__iconfont__svg__cssinject__) { - c.__iconfont__svg__cssinject__ = true; - try { - document.write(""); - } catch (q) { - console && console.log(q); - } - } - g = function () { - var u; - var v = document.createElement("div"); - v.innerHTML = c._iconfont_svg_string_3757618; - (v = v.getElementsByTagName("svg")[0]) && (v.setAttribute("aria-hidden", "true"), v.style.position = "absolute", v.style.width = 0, v.style.height = 0, v.style.overflow = "hidden", v = v, (u = document.body).firstChild ? function (w, x) { - x.parentNode.insertBefore(w, x); - }(v, u.firstChild) : u.appendChild(v)); - }; - document.addEventListener ? ~["complete", "loaded", "interactive"].indexOf(document.readyState) ? setTimeout(g, 0) : (h = function () { - document.removeEventListener("DOMContentLoaded", h, false); - g(); - }, document.addEventListener("DOMContentLoaded", h, false)) : document.attachEvent && (j = g, k = c.document, m = false, function u() { - try { - k.documentElement.doScroll("left"); - } catch (v) { - return void setTimeout(u, 50); - } - p(); - }(), k.onreadystatechange = function () { - "complete" == k.readyState && (k.onreadystatechange = null, p()); - }); - } - function p() { - m || (m = true, j()); - } - })(window); - }, function (b, c, d) { - "use strict"; - - Object.defineProperty(c, "__esModule", { - value: true - }); - var f = function () { - function l(m, p) { - for (var q = 0; q < p.length; q++) { - var u = p[q]; - u.enumerable = u.enumerable || false; - u.configurable = true; - "value" in u && (u.writable = true); - Object.defineProperty(m, u.key, u); - } - } - return function (m, p, q) { - p && l(m.prototype, p); - q && l(m, q); - return m; - }; - }(); - var g = d(48); - var h = j(d(49)); - function j(l) { - return l && l.__esModule ? l : { - default: l - }; - } - var k = function (l) { - function m(p, q) { - !function (v, w) { - if (!(v instanceof w)) { - throw new TypeError("Cannot call a class as a function"); - } - }(this, m); - var u = function (v, w) { - if (!v) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - return !w || "object" != typeof w && "function" != typeof w ? v : w; - }(this, (m.__proto__ || Object.getPrototypeOf(m)).call(this, p, q)); - u.fontSize = !q.flat && q.fontSize > 10 * q.width ? 10 * q.width : q.fontSize; - u.guardHeight = q.height + u.fontSize / 2 + q.textMargin; - return u; - } - (function (p, q) { - if ("function" != typeof q && null !== q) { - throw new TypeError("Super expression must either be null or a function, not " + typeof q); - } - p.prototype = Object.create(q && q.prototype, { - constructor: { - value: p, - enumerable: false, - writable: true, - configurable: true - } - }); - q && (Object.setPrototypeOf ? Object.setPrototypeOf(p, q) : p.__proto__ = q); - })(m, l); - f(m, [{ - key: "encode", - value: function () { - return this.options.flat ? this.encodeFlat() : this.encodeGuarded(); - } - }, { - key: "leftText", - value: function (p, q) { - return this.text.substr(p, q); - } - }, { - key: "leftEncode", - value: function (p, q) { - return (0, h.default)(p, q); - } - }, { - key: "rightText", - value: function (p, q) { - return this.text.substr(p, q); - } - }, { - key: "rightEncode", - value: function (p, q) { - return (0, h.default)(p, q); - } - }, { - key: "encodeGuarded", - value: function () { - var p = { - fontSize: this.fontSize - }; - var q = { - height: this.guardHeight - }; - return [{ - data: g.SIDE_BIN, - options: q - }, { - data: this.leftEncode(), - text: this.leftText(), - options: p - }, { - data: g.MIDDLE_BIN, - options: q - }, { - data: this.rightEncode(), - text: this.rightText(), - options: p - }, { - data: g.SIDE_BIN, - options: q - }]; - } - }, { - key: "encodeFlat", - value: function () { - return { - data: [g.SIDE_BIN, this.leftEncode(), g.MIDDLE_BIN, this.rightEncode(), g.SIDE_BIN].join(""), - text: this.text - }; - } - }]); - return m; - }(j(d(27)).default); - c.default = k; - }, function (b, c, d) { - "use strict"; - - Object.defineProperty(c, "__esModule", { - value: true - }); - var f = function () { - function l(m, p) { - for (var q = 0; q < p.length; q++) { - var u = p[q]; - u.enumerable = u.enumerable || false; - u.configurable = true; - "value" in u && (u.writable = true); - Object.defineProperty(m, u.key, u); - } - } - return function (m, p, q) { - p && l(m.prototype, p); - q && l(m, q); - return m; - }; - }(); - c.checksum = k; - var g = h(d(49)); - function h(l) { - return l && l.__esModule ? l : { - default: l - }; - } - var j = function (l) { - function m(p, q) { - !function (v, w) { - if (!(v instanceof w)) { - throw new TypeError("Cannot call a class as a function"); - } - }(this, m); - -1 !== p.search(/^[0-9]{11}$/) && (p += k(p)); - var u = function (v, w) { - if (!v) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - return !w || "object" != typeof w && "function" != typeof w ? v : w; - }(this, (m.__proto__ || Object.getPrototypeOf(m)).call(this, p, q)); - u.displayValue = q.displayValue; - q.fontSize > 10 * q.width ? u.fontSize = 10 * q.width : u.fontSize = q.fontSize; - u.guardHeight = q.height + u.fontSize / 2 + q.textMargin; - return u; - } - (function (p, q) { - if ("function" != typeof q && null !== q) { - throw new TypeError("Super expression must either be null or a function, not " + typeof q); - } - p.prototype = Object.create(q && q.prototype, { - constructor: { - value: p, - enumerable: false, - writable: true, - configurable: true - } - }); - q && (Object.setPrototypeOf ? Object.setPrototypeOf(p, q) : p.__proto__ = q); - })(m, l); - f(m, [{ - key: "valid", - value: function () { - return -1 !== this.data.search(/^[0-9]{12}$/) && this.data[11] == k(this.data); - } - }, { - key: "encode", - value: function () { - return this.options.flat ? this.flatEncoding() : this.guardedEncoding(); - } - }, { - key: "flatEncoding", - value: function () { - var p = ""; - p += "101"; - p += (0, g.default)(this.data.substr(0, 6), "LLLLLL"); - p += "01010"; - p += (0, g.default)(this.data.substr(6, 6), "RRRRRR"); - return { - data: p += "101", - text: this.text - }; - } - }, { - key: "guardedEncoding", - value: function () { - var p = []; - this.displayValue && p.push({ - data: "00000000", - text: this.text.substr(0, 1), - options: { - textAlign: "left", - fontSize: this.fontSize - } - }); - p.push({ - data: "101" + (0, g.default)(this.data[0], "L"), - options: { - height: this.guardHeight - } - }); - p.push({ - data: (0, g.default)(this.data.substr(1, 5), "LLLLL"), - text: this.text.substr(1, 5), - options: { - fontSize: this.fontSize - } - }); - p.push({ - data: "01010", - options: { - height: this.guardHeight - } - }); - p.push({ - data: (0, g.default)(this.data.substr(6, 5), "RRRRR"), - text: this.text.substr(6, 5), - options: { - fontSize: this.fontSize - } - }); - p.push({ - data: (0, g.default)(this.data[11], "R") + "101", - options: { - height: this.guardHeight - } - }); - this.displayValue && p.push({ - data: "00000000", - text: this.text.substr(11, 1), - options: { - textAlign: "right", - fontSize: this.fontSize - } - }); - return p; - } - }]); - return m; - }(h(d(27)).default); - function k(l) { - var m; - var p = 0; - for (m = 1; m < 11; m += 2) { - p += parseInt(l[m]); - } - for (m = 0; m < 11; m += 2) { - p += 3 * parseInt(l[m]); - } - return (10 - p % 10) % 10; - } - c.default = j; - }, function (b, d, f) { - "use strict"; - - Object.defineProperty(d, "__esModule", { - value: true - }); - var g; - var h = function () { - function u(v, w) { - for (var x = 0; x < w.length; x++) { - var y = w[x]; - y.enumerable = y.enumerable || false; - y.configurable = true; - "value" in y && (y.writable = true); - Object.defineProperty(v, y.key, y); - } - } - return function (v, w, x) { - w && u(v.prototype, w); - x && u(v, x); - return v; - }; - }(); - var j = f(107); - var k = f(27); - function m(u, v) { - if (!(u instanceof v)) { - throw new TypeError("Cannot call a class as a function"); - } - } - function p(u, v) { - if (!u) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - return !v || "object" != typeof v && "function" != typeof v ? u : v; - } - var q = function (u) { - function v() { - m(this, v); - return p(this, (v.__proto__ || Object.getPrototypeOf(v)).apply(this, arguments)); - } - (function (w, x) { - if ("function" != typeof x && null !== x) { - throw new TypeError("Super expression must either be null or a function, not " + typeof x); - } - w.prototype = Object.create(x && x.prototype, { - constructor: { - value: w, - enumerable: false, - writable: true, - configurable: true - } - }); - x && (Object.setPrototypeOf ? Object.setPrototypeOf(w, x) : w.__proto__ = x); - })(v, u); - h(v, [{ - key: "valid", - value: function () { - return -1 !== this.data.search(/^([0-9]{2})+$/); - } - }, { - key: "encode", - value: function () { - var w = this; - var x = this.data.match(/.{2}/g).map(function (y) { - return w.encodePair(y); - }).join(""); - return { - data: j.START_BIN + x + j.END_BIN, - text: this.text - }; - } - }, { - key: "encodePair", - value: function (w) { - var x = j.BINARIES[w[1]]; - return j.BINARIES[w[0]].split("").map(function (y, z) { - return ("1" === y ? "111" : "1") + ("1" === x[z] ? "000" : "0"); - }).join(""); - } - }]); - return v; - }(((g = k) && g.__esModule ? g : { - default: g - }).default); - d.default = q; - }, function (a, b, c) { - "use strict"; - - Object.defineProperty(b, "__esModule", { - value: true - }); - b.default = function (d) { - var f = ["width", "height", "textMargin", "fontSize", "margin", "marginTop", "marginBottom", "marginLeft", "marginRight"]; - for (var g in f) f.hasOwnProperty(g) && (g = f[g], "string" == typeof d[g] && (d[g] = parseInt(d[g], 10))); - "string" == typeof d.displayValue && (d.displayValue = "false" != d.displayValue); - return d; - }; - }, function (a, b, c) { - "use strict"; - - Object.defineProperty(b, "__esModule", { - value: true - }); - var d = { - width: 2, - height: 100, - format: "auto", - displayValue: true, - fontOptions: "", - font: "monospace", - text: undefined, - textAlign: "center", - textPosition: "bottom", - textMargin: 2, - fontSize: 20, - background: "#ffffff", - lineColor: "#000000", - margin: 10, - marginTop: undefined, - marginBottom: undefined, - marginLeft: undefined, - marginRight: undefined, - valid: function () {} - }; - b.default = d; - }, function (b, c, d) { - "use strict"; - - Object.defineProperty(c, "__esModule", { - value: true - }); - c.getTotalWidthOfEncodings = c.calculateEncodingAttributes = c.getBarcodePadding = c.getEncodingHeight = c.getMaximumHeightOfEncodings = undefined; - var f; - var g = d(59); - var h = (f = g) && f.__esModule ? f : { - default: f - }; - function j(p, q) { - return q.height + (q.displayValue && p.text.length > 0 ? q.fontSize + q.textMargin : 0) + q.marginTop + q.marginBottom; - } - function k(p, q, u) { - if (u.displayValue && q < p) { - if ("center" == u.textAlign) { - return Math.floor((p - q) / 2); - } - if ("left" == u.textAlign) { - return 0; - } - if ("right" == u.textAlign) { - return Math.floor(p - q); - } - } - return 0; - } - function m(p, q, u) { - var v; - if (u) { - v = u; - } else { - if ("undefined" == typeof document) { - return 0; - } - v = document.createElement("canvas").getContext("2d"); - } - v.font = q.fontOptions + " " + q.fontSize + "px " + q.font; - var w = v.measureText(p); - return w ? w.width : 0; - } - c.getMaximumHeightOfEncodings = function (p) { - for (var q = 0, u = 0; u < p.length; u++) { - p[u].height > q && (q = p[u].height); - } - return q; - }; - c.getEncodingHeight = j; - c.getBarcodePadding = k; - c.calculateEncodingAttributes = function (p, q, v) { - for (var w = 0; w < p.length; w++) { - var x; - var y = p[w]; - var z = (0, h.default)(q, y.options); - x = z.displayValue ? m(y.text, z, v) : 0; - var A = y.data.length * z.width; - y.width = Math.ceil(Math.max(x, A)); - y.height = j(y, z); - y.barcodePadding = k(x, A, z); - } - }; - c.getTotalWidthOfEncodings = function (p) { - for (var q = 0, u = 0; u < p.length; u++) { - q += p[u].width; - } - return q; - }; - }, function (b, c, d) { - "use strict"; - - function f(p, q) { - if (!(p instanceof q)) { - throw new TypeError("Cannot call a class as a function"); - } - } - function g(p, q) { - if (!p) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - return !q || "object" != typeof q && "function" != typeof q ? p : q; - } - function h(p, q) { - if ("function" != typeof q && null !== q) { - throw new TypeError("Super expression must either be null or a function, not " + typeof q); - } - p.prototype = Object.create(q && q.prototype, { - constructor: { - value: p, - enumerable: false, - writable: true, - configurable: true - } - }); - q && (Object.setPrototypeOf ? Object.setPrototypeOf(p, q) : p.__proto__ = q); - } - Object.defineProperty(c, "__esModule", { - value: true - }); - var j = function (p) { - function q(u, v) { - f(this, q); - var w = g(this, (q.__proto__ || Object.getPrototypeOf(q)).call(this)); - w.name = "InvalidInputException"; - w.symbology = u; - w.input = v; - w.message = "\"" + w.input + "\" is not a valid input for " + w.symbology; - return w; - } - h(q, Error); - return q; - }(); - var k = function (p) { - function q() { - f(this, q); - var u = g(this, (q.__proto__ || Object.getPrototypeOf(q)).call(this)); - u.name = "InvalidElementException"; - u.message = "Not supported type to render on"; - return u; - } - h(q, Error); - return q; - }(); - var m = function (p) { - function q() { - f(this, q); - var u = g(this, (q.__proto__ || Object.getPrototypeOf(q)).call(this)); - u.name = "NoElementException"; - u.message = "No element to render on."; - return u; - } - h(q, Error); - return q; - }(); - c.InvalidInputException = j; - c.InvalidElementException = k; - c.NoElementException = m; - }, function (a, b, c) { - const d = c(67); - const f = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 4, 1, 2, 4, 4, 2, 4, 4, 4, 2, 4, 6, 5, 2, 4, 6, 6, 2, 5, 8, 8, 4, 5, 8, 8, 4, 5, 8, 11, 4, 8, 10, 11, 4, 9, 12, 16, 4, 9, 16, 16, 6, 10, 12, 18, 6, 10, 17, 16, 6, 11, 16, 19, 6, 13, 18, 21, 7, 14, 21, 25, 8, 16, 20, 25, 8, 17, 23, 25, 9, 17, 23, 34, 9, 18, 25, 30, 10, 20, 27, 32, 12, 21, 29, 35, 12, 23, 34, 37, 12, 25, 34, 40, 13, 26, 35, 42, 14, 28, 38, 45, 15, 29, 40, 48, 16, 31, 43, 51, 17, 33, 45, 54, 18, 35, 48, 57, 19, 37, 51, 60, 19, 38, 53, 63, 20, 40, 56, 66, 21, 43, 59, 70, 22, 45, 62, 74, 24, 47, 65, 77, 25, 49, 68, 81]; - const g = [7, 10, 13, 17, 10, 16, 22, 28, 15, 26, 36, 44, 20, 36, 52, 64, 26, 48, 72, 88, 36, 64, 96, 112, 40, 72, 108, 130, 48, 88, 132, 156, 60, 110, 160, 192, 72, 130, 192, 224, 80, 150, 224, 264, 96, 176, 260, 308, 104, 198, 288, 352, 120, 216, 320, 384, 132, 240, 360, 432, 144, 280, 408, 480, 168, 308, 448, 532, 180, 338, 504, 588, 196, 364, 546, 650, 224, 416, 600, 700, 224, 442, 644, 750, 252, 476, 690, 816, 270, 504, 750, 900, 300, 560, 810, 960, 312, 588, 870, 1050, 336, 644, 952, 1110, 360, 700, 1020, 1200, 390, 728, 1050, 1260, 420, 784, 1140, 1350, 450, 812, 1200, 1440, 480, 868, 1290, 1530, 510, 924, 1350, 1620, 540, 980, 1440, 1710, 570, 1036, 1530, 1800, 570, 1064, 1590, 1890, 600, 1120, 1680, 1980, 630, 1204, 1770, 2100, 660, 1260, 1860, 2220, 720, 1316, 1950, 2310, 750, 1372, 2040, 2430]; - b.getBlocksCount = function (h, j) { - switch (j) { - case d.L: - return f[4 * (h - 1) + 0]; - case d.M: - return f[4 * (h - 1) + 1]; - case d.Q: - return f[4 * (h - 1) + 2]; - case d.H: - return f[4 * (h - 1) + 3]; - default: - return; - } - }; - b.getTotalCodewordsCount = function (h, j) { - switch (j) { - case d.L: - return g[4 * (h - 1) + 0]; - case d.M: - return g[4 * (h - 1) + 1]; - case d.Q: - return g[4 * (h - 1) + 2]; - case d.H: - return g[4 * (h - 1) + 3]; - default: - return; - } - }; - }, function (a, b) { - b.isValid = function (c) { - return !isNaN(c) && c >= 1 && c <= 40; - }; - }, function (b, c) { - let d = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+"; - d = d.replace(/u/g, "\\u"); - const f = "(?:(?![A-Z0-9 $%*+\\-./:]|" + d + ")(?:.|[\r\n]))+"; - c.KANJI = new RegExp(d, "g"); - c.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g"); - c.BYTE = new RegExp(f, "g"); - c.NUMERIC = new RegExp("[0-9]+", "g"); - c.ALPHANUMERIC = new RegExp("[A-Z $%*+\\-./:]+", "g"); - const g = new RegExp("^" + d + "$"); - const h = new RegExp("^[0-9]+$"); - const j = new RegExp("^[A-Z0-9 $%*+\\-./:]+$"); - c.testKanji = function (k) { - return g.test(k); - }; - c.testNumeric = function (k) { - return h.test(k); - }; - c.testAlphanumeric = function (k) { - return j.test(k); - }; - }, function (a, b) { - function c(d) { - if ("number" == typeof d && (d = d.toString()), "string" != typeof d) { - throw new Error("Color should be defined as hex string"); - } - let f = d.slice().replace("#", "").split(""); - if (f.length < 3 || 5 === f.length || f.length > 8) { - throw new Error("Invalid hex color: " + d); - } - 3 !== f.length && 4 !== f.length || (f = Array.prototype.concat.apply([], f.map(function (h) { - return [h, h]; - }))); - 6 === f.length && f.push("F", "F"); - const g = parseInt(f.join(""), 16); - return { - r: g >> 24 & 255, - g: g >> 16 & 255, - b: g >> 8 & 255, - a: 255 & g, - hex: "#" + f.slice(0, 6).join("") - }; - } - b.getOptions = function (d) { - d || (d = {}); - d.color || (d.color = {}); - const f = undefined === d.margin || null === d.margin || d.margin < 0 ? 4 : d.margin; - const g = d.width && d.width >= 21 ? d.width : undefined; - const h = d.scale || 4; - return { - width: g, - scale: g ? 4 : h, - margin: f, - color: { - dark: c(d.color.dark || "#000000ff"), - light: c(d.color.light || "#ffffffff") - }, - type: d.type, - rendererOpts: d.rendererOpts || {} - }; - }; - b.getScale = function (d, f) { - return f.width && f.width >= d + 2 * f.margin ? f.width / (d + 2 * f.margin) : f.scale; - }; - b.getImageWidth = function (d, f) { - const g = b.getScale(d, f); - return Math.floor((d + 2 * f.margin) * g); - }; - b.qrToImageData = function (d, g, h) { - const j = g.modules.size; - const k = g.modules.data; - const m = b.getScale(j, h); - const p = Math.floor((j + 2 * h.margin) * m); - const q = h.margin * m; - const v = [h.color.light, h.color.dark]; - for (let w = 0; w < p; w++) { - for (let x = 0; x < p; x++) { - let y = 4 * (w * p + x); - let z = h.color.light; - w >= q && x >= q && w < p - q && x < p - q && (z = v[k[Math.floor((w - q) / m) * j + Math.floor((x - q) / m)] ? 1 : 0]); - d[y++] = z.r; - d[y++] = z.g; - d[y++] = z.b; - d[y] = z.a; - } - } - }; - }, function (b, d, f) { - var g; - var h; - var j; - var k; - var m; - var p; - var q; - var v; - b.exports = (v = f(17), h = (g = v).lib, j = h.WordArray, k = h.Hasher, m = g.algo, p = [], q = m.SHA1 = k.extend({ - _doReset: function () { - this._hash = new j.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]); - }, - _doProcessBlock: function (w, x) { - for (var y = this._hash.words, z = y[0], A = y[1], B = y[2], C = y[3], D = y[4], E = 0; E < 80; E++) { - if (E < 16) { - p[E] = 0 | w[x + E]; - } else { - var F = p[E - 3] ^ p[E - 8] ^ p[E - 14] ^ p[E - 16]; - p[E] = F << 1 | F >>> 31; - } - var G = (z << 5 | z >>> 27) + D + p[E]; - G += E < 20 ? 1518500249 + (A & B | ~A & C) : E < 40 ? 1859775393 + (A ^ B ^ C) : E < 60 ? (A & B | A & C | B & C) - 1894007588 : (A ^ B ^ C) - 899497514; - D = C; - C = B; - B = A << 30 | A >>> 2; - A = z; - z = G; - } - y[0] = y[0] + z | 0; - y[1] = y[1] + A | 0; - y[2] = y[2] + B | 0; - y[3] = y[3] + C | 0; - y[4] = y[4] + D | 0; - }, - _doFinalize: function () { - var w = this._data; - var x = w.words; - var y = 8 * this._nDataBytes; - var z = 8 * w.sigBytes; - x[z >>> 5] |= 128 << 24 - z % 32; - x[14 + (z + 64 >>> 9 << 4)] = Math.floor(y / 4294967296); - x[15 + (z + 64 >>> 9 << 4)] = y; - w.sigBytes = 4 * x.length; - this._process(); - return this._hash; - }, - clone: function () { - var w = k.clone.call(this); - w._hash = this._hash.clone(); - return w; - } - }), g.SHA1 = k._createHelper(q), g.HmacSHA1 = k._createHmacHelper(q), v.SHA1); - }, function (a, b, c) { - var d; - a.exports = (d = c(17), c(60), function () { - var f = d; - var g = f.lib.Hasher; - var h = f.x64; - var j = h.Word; - var k = h.WordArray; - var m = f.algo; - function p() { - return j.create.apply(j, arguments); - } - var q = [p(1116352408, 3609767458), p(1899447441, 602891725), p(3049323471, 3964484399), p(3921009573, 2173295548), p(961987163, 4081628472), p(1508970993, 3053834265), p(2453635748, 2937671579), p(2870763221, 3664609560), p(3624381080, 2734883394), p(310598401, 1164996542), p(607225278, 1323610764), p(1426881987, 3590304994), p(1925078388, 4068182383), p(2162078206, 991336113), p(2614888103, 633803317), p(3248222580, 3479774868), p(3835390401, 2666613458), p(4022224774, 944711139), p(264347078, 2341262773), p(604807628, 2007800933), p(770255983, 1495990901), p(1249150122, 1856431235), p(1555081692, 3175218132), p(1996064986, 2198950837), p(2554220882, 3999719339), p(2821834349, 766784016), p(2952996808, 2566594879), p(3210313671, 3203337956), p(3336571891, 1034457026), p(3584528711, 2466948901), p(113926993, 3758326383), p(338241895, 168717936), p(666307205, 1188179964), p(773529912, 1546045734), p(1294757372, 1522805485), p(1396182291, 2643833823), p(1695183700, 2343527390), p(1986661051, 1014477480), p(2177026350, 1206759142), p(2456956037, 344077627), p(2730485921, 1290863460), p(2820302411, 3158454273), p(3259730800, 3505952657), p(3345764771, 106217008), p(3516065817, 3606008344), p(3600352804, 1432725776), p(4094571909, 1467031594), p(275423344, 851169720), p(430227734, 3100823752), p(506948616, 1363258195), p(659060556, 3750685593), p(883997877, 3785050280), p(958139571, 3318307427), p(1322822218, 3812723403), p(1537002063, 2003034995), p(1747873779, 3602036899), p(1955562222, 1575990012), p(2024104815, 1125592928), p(2227730452, 2716904306), p(2361852424, 442776044), p(2428436474, 593698344), p(2756734187, 3733110249), p(3204031479, 2999351573), p(3329325298, 3815920427), p(3391569614, 3928383900), p(3515267271, 566280711), p(3940187606, 3454069534), p(4118630271, 4000239992), p(116418474, 1914138554), p(174292421, 2731055270), p(289380356, 3203993006), p(460393269, 320620315), p(685471733, 587496836), p(852142971, 1086792851), p(1017036298, 365543100), p(1126000580, 2618297676), p(1288033470, 3409855158), p(1501505948, 4234509866), p(1607167915, 987167468), p(1816402316, 1246189591)]; - var v = []; - !function () { - for (var x = 0; x < 80; x++) { - v[x] = p(); - } - }(); - m.SHA512 = g.extend({ - _doReset: function () { - this._hash = new k.init([new j.init(1779033703, 4089235720), new j.init(3144134277, 2227873595), new j.init(1013904242, 4271175723), new j.init(2773480762, 1595750129), new j.init(1359893119, 2917565137), new j.init(2600822924, 725511199), new j.init(528734635, 4215389547), new j.init(1541459225, 327033209)]); - }, - _doProcessBlock: function (a0, a1) { - for (var a2 = this._hash.words, a3 = a2[0], a4 = a2[1], a5 = a2[2], a6 = a2[3], a7 = a2[4], a8 = a2[5], a9 = a2[6], aa = a2[7], ab = a3.high, ac = a3.low, ad = a4.high, ae = a4.low, af = a5.high, ag = a5.low, ah = a6.high, ai = a6.low, aj = a7.high, ak = a7.low, al = a8.high, am = a8.low, an = a9.high, ao = a9.low, ap = aa.high, aq = aa.low, ar = ab, as = ac, au = ad, av = ae, aw = af, ax = ag, ay = ah, az = ai, aA = aj, aB = ak, aC = al, aD = am, aE = an, aF = ao, aG = ap, aH = aq, aI = 0; aI < 80; aI++) { - var aJ; - var aK; - var aL = v[aI]; - if (aI < 16) { - aK = aL.high = 0 | a0[a1 + 2 * aI]; - aJ = aL.low = 0 | a0[a1 + 2 * aI + 1]; - } else { - var aM = v[aI - 15]; - var aN = aM.high; - var aO = aM.low; - var aP = (aN >>> 1 | aO << 31) ^ (aN >>> 8 | aO << 24) ^ aN >>> 7; - var aQ = (aO >>> 1 | aN << 31) ^ (aO >>> 8 | aN << 24) ^ (aO >>> 7 | aN << 25); - var aR = v[aI - 2]; - var aS = aR.high; - var aT = aR.low; - var aU = (aS >>> 19 | aT << 13) ^ (aS << 3 | aT >>> 29) ^ aS >>> 6; - var aV = (aT >>> 19 | aS << 13) ^ (aT << 3 | aS >>> 29) ^ (aT >>> 6 | aS << 26); - var aW = v[aI - 7]; - var aX = aW.high; - var aY = aW.low; - var aZ = v[aI - 16]; - var b0 = aZ.high; - var b1 = aZ.low; - aK = (aK = (aK = aP + aX + ((aJ = aQ + aY) >>> 0 < aQ >>> 0 ? 1 : 0)) + aU + ((aJ += aV) >>> 0 < aV >>> 0 ? 1 : 0)) + b0 + ((aJ += b1) >>> 0 < b1 >>> 0 ? 1 : 0); - aL.high = aK; - aL.low = aJ; - } - var b2; - var b3 = aA & aC ^ ~aA & aE; - var b4 = aB & aD ^ ~aB & aF; - var b5 = ar & au ^ ar & aw ^ au & aw; - var b6 = as & av ^ as & ax ^ av & ax; - var b7 = (ar >>> 28 | as << 4) ^ (ar << 30 | as >>> 2) ^ (ar << 25 | as >>> 7); - var b8 = (as >>> 28 | ar << 4) ^ (as << 30 | ar >>> 2) ^ (as << 25 | ar >>> 7); - var b9 = (aA >>> 14 | aB << 18) ^ (aA >>> 18 | aB << 14) ^ (aA << 23 | aB >>> 9); - var ba = (aB >>> 14 | aA << 18) ^ (aB >>> 18 | aA << 14) ^ (aB << 23 | aA >>> 9); - var bb = q[aI]; - var bc = bb.high; - var bd = bb.low; - var be = aG + b9 + ((b2 = aH + ba) >>> 0 < aH >>> 0 ? 1 : 0); - var bf = b8 + b6; - aG = aE; - aH = aF; - aE = aC; - aF = aD; - aC = aA; - aD = aB; - aA = ay + (be = (be = (be = be + b3 + ((b2 += b4) >>> 0 < b4 >>> 0 ? 1 : 0)) + bc + ((b2 += bd) >>> 0 < bd >>> 0 ? 1 : 0)) + aK + ((b2 += aJ) >>> 0 < aJ >>> 0 ? 1 : 0)) + ((aB = az + b2 | 0) >>> 0 < az >>> 0 ? 1 : 0) | 0; - ay = aw; - az = ax; - aw = au; - ax = av; - au = ar; - av = as; - ar = be + (b7 + b5 + (bf >>> 0 < b8 >>> 0 ? 1 : 0)) + ((as = b2 + bf | 0) >>> 0 < b2 >>> 0 ? 1 : 0) | 0; - } - ac = a3.low = ac + as; - a3.high = ab + ar + (ac >>> 0 < as >>> 0 ? 1 : 0); - ae = a4.low = ae + av; - a4.high = ad + au + (ae >>> 0 < av >>> 0 ? 1 : 0); - ag = a5.low = ag + ax; - a5.high = af + aw + (ag >>> 0 < ax >>> 0 ? 1 : 0); - ai = a6.low = ai + az; - a6.high = ah + ay + (ai >>> 0 < az >>> 0 ? 1 : 0); - ak = a7.low = ak + aB; - a7.high = aj + aA + (ak >>> 0 < aB >>> 0 ? 1 : 0); - am = a8.low = am + aD; - a8.high = al + aC + (am >>> 0 < aD >>> 0 ? 1 : 0); - ao = a9.low = ao + aF; - a9.high = an + aE + (ao >>> 0 < aF >>> 0 ? 1 : 0); - aq = aa.low = aq + aH; - aa.high = ap + aG + (aq >>> 0 < aH >>> 0 ? 1 : 0); - }, - _doFinalize: function () { - var x = this._data; - var y = x.words; - var z = 8 * this._nDataBytes; - var A = 8 * x.sigBytes; - y[A >>> 5] |= 128 << 24 - A % 32; - y[30 + (A + 128 >>> 10 << 5)] = Math.floor(z / 4294967296); - y[31 + (A + 128 >>> 10 << 5)] = z; - x.sigBytes = 4 * y.length; - this._process(); - return this._hash.toX32(); - }, - clone: function () { - var x = g.clone.call(this); - x._hash = this._hash.clone(); - return x; - }, - blockSize: 32 - }); - var w = m.SHA512; - f.SHA512 = g._createHelper(w); - f.HmacSHA512 = g._createHmacHelper(w); - }(), d.SHA512); - }, function (a, b, c) { - "use strict"; - - (a.exports = {}).forEach = function (d, f) { - for (var g = 0; g < d.length; g++) { - var h = f(d[g]); - if (h) { - return h; - } - } - }; - }, function (a, b, c) { - "use strict"; - - a.exports = {}; - var d = a.exports; - d.isIE = function (f) { - return (-1 !== (g = navigator.userAgent.toLowerCase()).indexOf("msie") || -1 !== g.indexOf("trident") || -1 !== g.indexOf(" edge/")) && (!f || f === function () { - var h = 3; - var i = document.createElement("div"); - var j = i.getElementsByTagName("i"); - do { - i.innerHTML = ""; - } while (j[0]); - return h > 4 ? h : undefined; - }()); - var g; - }; - d.isLegacyOpera = function () { - return !!window.opera; - }; - }, function (j, k, q) { - "use strict"; - - var w = G(q(92)); - var x = G(q(59)); - var z = G(q(117)); - var A = G(q(118)); - var B = G(q(119)); - var C = G(q(75)); - var D = G(q(125)); - var E = q(78); - var F = G(q(76)); - function G(O) { - return O && O.__esModule ? O : { - default: O - }; - } - var H = function () {}; - var I = function (O, P, Q) { - var R = new H(); - if (undefined === O) { - throw Error("No element to render on was provided."); - } - R._renderProperties = (0, B.default)(O); - R._encodings = []; - R._options = F.default; - R._errorHandler = new D.default(R); - undefined !== P && ((Q = Q || {}).format || (Q.format = M()), R.options(Q)[Q.format](P, Q).render()); - return R; - }; - for (var J in I.getModule = function (O) { - return w.default[O]; - }, w.default) w.default.hasOwnProperty(J) && K(w.default, J); - function K(O, P) { - H.prototype[P] = H.prototype[P.toUpperCase()] = H.prototype[P.toLowerCase()] = function (Q, R) { - var S = this; - return S._errorHandler.wrapBarcodeCall(function () { - R.text = undefined === R.text ? undefined : "" + R.text; - var T = (0, x.default)(S._options, R); - T = (0, C.default)(T); - var U = O[P]; - var V = L(Q, U, T); - S._encodings.push(V); - return S; - }); - }; - } - function L(O, P, Q) { - var R = new P(O = "" + O, Q); - if (!R.valid()) { - throw new E.InvalidInputException(R.constructor.name, O); - } - var S = R.encode(); - S = (0, z.default)(S); - for (var T = 0; T < S.length; T++) { - S[T].options = (0, x.default)(Q, S[T].options); - } - return S; - } - function M() { - return w.default.CODE128 ? "CODE128" : Object.keys(w.default)[0]; - } - function N(O, P, Q) { - P = (0, z.default)(P); - for (var R = 0; R < P.length; R++) { - P[R].options = (0, x.default)(Q, P[R].options); - (0, A.default)(P[R].options); - } - (0, A.default)(Q); - new (0, O.renderer)(O.element, P, Q).render(); - O.afterRender && O.afterRender(); - } - H.prototype.options = function (O) { - this._options = (0, x.default)(this._options, O); - return this; - }; - H.prototype.blank = function (O) { - var P = new Array(O + 1).join("0"); - this._encodings.push({ - data: P - }); - return this; - }; - H.prototype.init = function () { - var O; - if (this._renderProperties) { - for (var P in Array.isArray(this._renderProperties) || (this._renderProperties = [this._renderProperties]), this._renderProperties) { - O = this._renderProperties[P]; - var Q = (0, x.default)(this._options, O.options); - "auto" == Q.format && (Q.format = M()); - this._errorHandler.wrapBarcodeCall(function () { - var R = L(Q.value, w.default[Q.format.toUpperCase()], Q); - N(O, R, Q); - }); - } - } - }; - H.prototype.render = function () { - if (!this._renderProperties) { - throw new E.NoElementException(); - } - if (Array.isArray(this._renderProperties)) { - for (var O = 0; O < this._renderProperties.length; O++) { - N(this._renderProperties[O], this._encodings, this._options); - } - } else { - N(this._renderProperties, this._encodings, this._options); - } - return this; - }; - H.prototype._defaults = F.default; - "undefined" != typeof window && (window.JsBarcode = I); - "undefined" != typeof jQuery && (jQuery.fn.JsBarcode = function (O, P) { - var Q = []; - jQuery(this).each(function () { - Q.push(this); - }); - return I(Q, O, P); - }); - j.exports = I; - }, function (b, c, d) { - const f = d(126); - const g = d(127); - const h = d(145); - const j = d(146); - function k(m, p, q, u, v) { - const w = [].slice.call(arguments, 1); - const x = w.length; - const y = "function" == typeof w[x - 1]; - if (!y && !f()) { - throw new Error("Callback required as last argument"); - } - if (!y) { - if (x < 1) { - throw new Error("Too few arguments provided"); - } - 1 === x ? (q = p, p = u = undefined) : 2 !== x || p.getContext || (u = q, q = p, p = undefined); - return new Promise(function (z, A) { - try { - const B = g.create(q, u); - z(m(B, p, u)); - } catch (C) { - A(C); - } - }); - } - if (x < 2) { - throw new Error("Too few arguments provided"); - } - 2 === x ? (v = q, q = p, p = u = undefined) : 3 === x && (p.getContext && undefined === v ? (v = u, u = undefined) : (v = u, u = q, q = p, p = undefined)); - try { - const z = g.create(q, u); - v(null, m(z, p, u)); - } catch (A) { - v(A); - } - } - c.create = g.create; - c.toCanvas = k.bind(null, h.render); - c.toDataURL = k.bind(null, h.renderToDataURL); - c.toString = k.bind(null, function (l, m, p) { - return j.render(l, p); - }); - }, function (a, b, c) { - var d = c(56); - var f = c(26); - function g(h, j, k, l) { - return (g = "undefined" != typeof Reflect && Reflect.set ? Reflect.set : function (m, p, q, u) { - var v; - var w = d(m, p); - if (w) { - v = Object.getOwnPropertyDescriptor(w, p); - if (v.set) { - v.set.call(u, q); - return true; - } - if (!v.writable) { - return false; - } - } - v = Object.getOwnPropertyDescriptor(u, p); - if (v) { - if (!v.writable) { - return false; - } - v.value = q; - Object.defineProperty(u, p, v); - } else { - f(u, p, q); - } - return true; - })(h, j, k, l); - } - a.exports = function (h, j, k, l, m) { - if (!g(h, j, k, l || h) && m) { - throw new TypeError("failed to set property"); - } - return k; - }; - a.exports.__esModule = true; - a.exports.default = a.exports; - }, function (b, j, k) { - "use strict"; - - var m = k(85).forEach; - var q = k(176); - var w = k(177); - var x = k(178); - var z = k(179); - var A = k(180); - var B = k(86); - var C = k(181); - var D = k(183); - var E = k(184); - var F = k(185); - function G(K) { - return Array.isArray(K) || undefined !== K.length; - } - function H(K) { - if (Array.isArray(K)) { - return K; - } - var L = []; - m(K, function (M) { - L.push(M); - }); - return L; - } - function I(K) { - return K && 1 === K.nodeType; - } - function J(K, L, M) { - var N = K[L]; - return null == N && undefined !== M ? M : N; - } - b.exports = function (K) { - var L; - K = K || {}; - if (K.idHandler) { - L = { - get: function (a0) { - return K.idHandler.get(a0, true); - }, - set: K.idHandler.set - }; - } else { - var M = x(); - var N = z({ - idGenerator: M, - stateHandler: D - }); - L = N; - } - var P = K.reporter; - P || (P = A(false === P)); - var Q = J(K, "batchProcessor", C({ - reporter: P - })); - var R = { - callOnAdd: !!J(K, "callOnAdd", true), - debug: !!J(K, "debug", false) - }; - var T; - var U = w(L); - var V = q({ - stateHandler: D - }); - var W = J(K, "strategy", "object"); - var X = J(K, "important", false); - var Y = { - reporter: P, - batchProcessor: Q, - stateHandler: D, - idHandler: L, - important: X - }; - if ("scroll" === W && (B.isLegacyOpera() ? (P.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."), W = "object") : B.isIE(9) && (P.warn("Scroll strategy is not supported on IE9. Changing to object strategy."), W = "object")), "scroll" === W) { - T = F(Y); - } else { - if ("object" !== W) { - throw new Error("Invalid strategy name: " + W); - } - T = E(Y); - } - var Z = {}; - return { - listenTo: function (a0, a1, a2) { - function a3(a9) { - var aa = U.get(a9); - m(aa, function (ab) { - ab(a9); - }); - } - function a4(a9, aa, ab) { - U.add(aa, ab); - a9 && ab(aa); - } - if (a2 || (a2 = a1, a1 = a0, a0 = {}), !a1) { - throw new Error("At least one element required."); - } - if (!a2) { - throw new Error("Listener required."); - } - if (I(a1)) { - a1 = [a1]; - } else { - if (!G(a1)) { - return P.error("Invalid arguments. Must be a DOM element or a collection of DOM elements."); - } - a1 = H(a1); - } - var a5 = 0; - var a6 = J(a0, "callOnAdd", R.callOnAdd); - var a7 = J(a0, "onReady", function () {}); - var a8 = J(a0, "debug", R.debug); - m(a1, function (a9) { - D.getState(a9) || (D.initState(a9), L.set(a9)); - var aa = L.get(a9); - if (a8 && P.log("Attaching listener to element", aa, a9), !V.isDetectable(a9)) { - a8 && P.log(aa, "Not detectable."); - return V.isBusy(a9) ? (a8 && P.log(aa, "System busy making it detectable"), a4(a6, a9, a2), Z[aa] = Z[aa] || [], void Z[aa].push(function () { - ++a5 === a1.length && a7(); - })) : (a8 && P.log(aa, "Making detectable..."), V.markBusy(a9, true), T.makeDetectable({ - debug: a8, - important: X - }, a9, function (ab) { - if (a8 && P.log(aa, "onElementDetectable"), D.getState(ab)) { - V.markAsDetectable(ab); - V.markBusy(ab, false); - T.addListener(ab, a3); - a4(a6, ab, a2); - var ac = D.getState(ab); - if (ac && ac.startSize) { - var ad = ab.offsetWidth; - var ae = ab.offsetHeight; - ac.startSize.width === ad && ac.startSize.height === ae || a3(ab); - } - Z[aa] && m(Z[aa], function (af) { - af(); - }); - } else { - a8 && P.log(aa, "Element uninstalled before being detectable."); - } - delete Z[aa]; - ++a5 === a1.length && a7(); - })); - } - a8 && P.log(aa, "Already detecable, adding listener."); - a4(a6, a9, a2); - a5++; - }); - a5 === a1.length && a7(); - }, - removeListener: U.removeListener, - removeAllListeners: U.removeAllListeners, - uninstall: function (a0) { - if (!a0) { - return P.error("At least one element is required."); - } - if (I(a0)) { - a0 = [a0]; - } else { - if (!G(a0)) { - return P.error("Invalid arguments. Must be a DOM element or a collection of DOM elements."); - } - a0 = H(a0); - } - m(a0, function (a1) { - U.removeAllListeners(a1); - T.uninstall(a1); - D.cleanState(a1); - }); - }, - initDocument: function (a0) { - T.initDocument && T.initDocument(a0); - } - }; - }; - },, function (b, d, f) { - "use strict"; - - Object.defineProperty(d, "__esModule", { - value: true - }); - var g = f(93); - var h = f(94); - var j = f(100); - var k = f(106); - var m = f(109); - var p = f(114); - var q = f(115); - var v = f(116); - d.default = { - CODE39: g.CODE39, - CODE128: h.CODE128, - CODE128A: h.CODE128A, - CODE128B: h.CODE128B, - CODE128C: h.CODE128C, - EAN13: j.EAN13, - EAN8: j.EAN8, - EAN5: j.EAN5, - EAN2: j.EAN2, - UPC: j.UPC, - UPCE: j.UPCE, - ITF14: k.ITF14, - ITF: k.ITF, - MSI: m.MSI, - MSI10: m.MSI10, - MSI11: m.MSI11, - MSI1010: m.MSI1010, - MSI1110: m.MSI1110, - pharmacode: p.pharmacode, - codabar: q.codabar, - GenericBarcode: v.GenericBarcode - }; - }, function (b, d, f) { - "use strict"; - - Object.defineProperty(d, "__esModule", { - value: true - }); - d.CODE39 = undefined; - var g; - var h = function () { - function w(x, y) { - for (var z = 0; z < y.length; z++) { - var A = y[z]; - A.enumerable = A.enumerable || false; - A.configurable = true; - "value" in A && (A.writable = true); - Object.defineProperty(x, A.key, A); - } - } - return function (x, y, z) { - y && w(x.prototype, y); - z && w(x, z); - return x; - }; - }(); - var j = f(27); - var k = function (w) { - function x(y, z) { - (function (A, B) { - if (!(A instanceof B)) { - throw new TypeError("Cannot call a class as a function"); - } - })(this, x); - y = y.toUpperCase(); - z.mod43 && (y += function (A) { - return m[A]; - }(function (A) { - for (var B = 0, C = 0; C < A.length; C++) { - B += v(A[C]); - } - return B %= 43; - }(y))); - return function (A, B) { - if (!A) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - return !B || "object" != typeof B && "function" != typeof B ? A : B; - }(this, (x.__proto__ || Object.getPrototypeOf(x)).call(this, y, z)); - } - (function (y, z) { - if ("function" != typeof z && null !== z) { - throw new TypeError("Super expression must either be null or a function, not " + typeof z); - } - y.prototype = Object.create(z && z.prototype, { - constructor: { - value: y, - enumerable: false, - writable: true, - configurable: true - } - }); - z && (Object.setPrototypeOf ? Object.setPrototypeOf(y, z) : y.__proto__ = z); - })(x, w); - h(x, [{ - key: "encode", - value: function () { - for (var y = q("*"), z = 0; z < this.data.length; z++) { - y += q(this.data[z]) + "0"; - } - return { - data: y += q("*"), - text: this.text - }; - } - }, { - key: "valid", - value: function () { - return -1 !== this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/); - } - }]); - return x; - }(((g = j) && g.__esModule ? g : { - default: g - }).default); - var m = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "-", ".", " ", "$", "/", "+", "%", "*"]; - var p = [20957, 29783, 23639, 30485, 20951, 29813, 23669, 20855, 29789, 23645, 29975, 23831, 30533, 22295, 30149, 24005, 21623, 29981, 23837, 22301, 30023, 23879, 30545, 22343, 30161, 24017, 21959, 30065, 23921, 22385, 29015, 18263, 29141, 17879, 29045, 18293, 17783, 29021, 18269, 17477, 17489, 17681, 20753, 35770]; - function q(w) { - return function (x) { - return p[x].toString(2); - }(v(w)); - } - function v(w) { - return m.indexOf(w); - } - d.CODE39 = k; - }, function (b, c, d) { - "use strict"; - - Object.defineProperty(c, "__esModule", { - value: true - }); - c.CODE128C = c.CODE128B = c.CODE128A = c.CODE128 = undefined; - var f = k(d(95)); - var g = k(d(97)); - var h = k(d(98)); - var j = k(d(99)); - function k(l) { - return l && l.__esModule ? l : { - default: l - }; - } - c.CODE128 = f.default; - c.CODE128A = g.default; - c.CODE128B = h.default; - c.CODE128C = j.default; - }, function (b, c, d) { - "use strict"; - - Object.defineProperty(c, "__esModule", { - value: true - }); - var f = h(d(57)); - var g = h(d(96)); - function h(l) { - return l && l.__esModule ? l : { - default: l - }; - } - function j(l, m) { - if (!l) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - return !m || "object" != typeof m && "function" != typeof m ? l : m; - } - var k = function (l) { - function m(p, q) { - if (function (v, w) { - if (!(v instanceof w)) { - throw new TypeError("Cannot call a class as a function"); - } - }(this, m), /^[\x00-\x7F\xC8-\xD3]+$/.test(p)) { - var u = j(this, (m.__proto__ || Object.getPrototypeOf(m)).call(this, (0, g.default)(p), q)); - } else { - u = j(this, (m.__proto__ || Object.getPrototypeOf(m)).call(this, p, q)); - } - return j(u); - } - (function (p, q) { - if ("function" != typeof q && null !== q) { - throw new TypeError("Super expression must either be null or a function, not " + typeof q); - } - p.prototype = Object.create(q && q.prototype, { - constructor: { - value: p, - enumerable: false, - writable: true, - configurable: true - } - }); - q && (Object.setPrototypeOf ? Object.setPrototypeOf(p, q) : p.__proto__ = q); - })(m, l); - return m; - }(f.default); - c.default = k; - }, function (b, c, d) { - "use strict"; - - Object.defineProperty(c, "__esModule", { - value: true - }); - var f = d(47); - var g = function (p) { - return p.match(new RegExp("^" + f.A_CHARS + "*"))[0].length; - }; - var h = function (p) { - return p.match(new RegExp("^" + f.B_CHARS + "*"))[0].length; - }; - var j = function (p) { - return p.match(new RegExp("^" + f.C_CHARS + "*"))[0]; - }; - function k(p, q) { - var u = q ? f.A_CHARS : f.B_CHARS; - var v = p.match(new RegExp("^(" + u + "+?)(([0-9]{2}){2,})([^0-9]|$)")); - if (v) { - return v[1] + String.fromCharCode(204) + m(p.substring(v[1].length)); - } - var w = p.match(new RegExp("^" + u + "+"))[0]; - return w.length === p.length ? p : w + String.fromCharCode(q ? 205 : 206) + k(p.substring(w.length), !q); - } - function m(p) { - var q = j(p); - var u = q.length; - if (u === p.length) { - return p; - } - p = p.substring(u); - var v = g(p) >= h(p); - return q + String.fromCharCode(v ? 206 : 205) + k(p, v); - } - c.default = function (p) { - var q = undefined; - if (j(p).length >= 2) { - q = f.C_START_CHAR + m(p); - } else { - var u = g(p) > h(p); - q = (u ? f.A_START_CHAR : f.B_START_CHAR) + k(p, u); - } - return q.replace(/[\xCD\xCE]([^])[\xCD\xCE]/, function (v, w) { - return String.fromCharCode(203) + w; - }); - }; - }, function (b, c, d) { - "use strict"; - - Object.defineProperty(c, "__esModule", { - value: true - }); - var f; - var g = function () { - function p(q, u) { - for (var v = 0; v < u.length; v++) { - var w = u[v]; - w.enumerable = w.enumerable || false; - w.configurable = true; - "value" in w && (w.writable = true); - Object.defineProperty(q, w.key, w); - } - } - return function (q, u, v) { - u && p(q.prototype, u); - v && p(q, v); - return q; - }; - }(); - var h = d(57); - var j = (f = h) && f.__esModule ? f : { - default: f - }; - var k = d(47); - var m = function (p) { - function q(u, v) { - (function (w, x) { - if (!(w instanceof x)) { - throw new TypeError("Cannot call a class as a function"); - } - })(this, q); - return function (w, x) { - if (!w) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - return !x || "object" != typeof x && "function" != typeof x ? w : x; - }(this, (q.__proto__ || Object.getPrototypeOf(q)).call(this, k.A_START_CHAR + u, v)); - } - (function (u, v) { - if ("function" != typeof v && null !== v) { - throw new TypeError("Super expression must either be null or a function, not " + typeof v); - } - u.prototype = Object.create(v && v.prototype, { - constructor: { - value: u, - enumerable: false, - writable: true, - configurable: true - } - }); - v && (Object.setPrototypeOf ? Object.setPrototypeOf(u, v) : u.__proto__ = v); - })(q, p); - g(q, [{ - key: "valid", - value: function () { - return new RegExp("^" + k.A_CHARS + "+$").test(this.data); - } - }]); - return q; - }(j.default); - c.default = m; - }, function (b, c, d) { - "use strict"; - - Object.defineProperty(c, "__esModule", { - value: true - }); - var f; - var g = function () { - function p(q, u) { - for (var v = 0; v < u.length; v++) { - var w = u[v]; - w.enumerable = w.enumerable || false; - w.configurable = true; - "value" in w && (w.writable = true); - Object.defineProperty(q, w.key, w); - } - } - return function (q, u, v) { - u && p(q.prototype, u); - v && p(q, v); - return q; - }; - }(); - var h = d(57); - var j = (f = h) && f.__esModule ? f : { - default: f - }; - var k = d(47); - var m = function (p) { - function q(u, v) { - (function (w, x) { - if (!(w instanceof x)) { - throw new TypeError("Cannot call a class as a function"); - } - })(this, q); - return function (w, x) { - if (!w) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - return !x || "object" != typeof x && "function" != typeof x ? w : x; - }(this, (q.__proto__ || Object.getPrototypeOf(q)).call(this, k.B_START_CHAR + u, v)); - } - (function (u, v) { - if ("function" != typeof v && null !== v) { - throw new TypeError("Super expression must either be null or a function, not " + typeof v); - } - u.prototype = Object.create(v && v.prototype, { - constructor: { - value: u, - enumerable: false, - writable: true, - configurable: true - } - }); - v && (Object.setPrototypeOf ? Object.setPrototypeOf(u, v) : u.__proto__ = v); - })(q, p); - g(q, [{ - key: "valid", - value: function () { - return new RegExp("^" + k.B_CHARS + "+$").test(this.data); - } - }]); - return q; - }(j.default); - c.default = m; - }, function (b, c, d) { - "use strict"; - - Object.defineProperty(c, "__esModule", { - value: true - }); - var f; - var g = function () { - function p(q, u) { - for (var v = 0; v < u.length; v++) { - var w = u[v]; - w.enumerable = w.enumerable || false; - w.configurable = true; - "value" in w && (w.writable = true); - Object.defineProperty(q, w.key, w); - } - } - return function (q, u, v) { - u && p(q.prototype, u); - v && p(q, v); - return q; - }; - }(); - var h = d(57); - var j = (f = h) && f.__esModule ? f : { - default: f - }; - var k = d(47); - var m = function (p) { - function q(u, v) { - (function (w, x) { - if (!(w instanceof x)) { - throw new TypeError("Cannot call a class as a function"); - } - })(this, q); - return function (w, x) { - if (!w) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - return !x || "object" != typeof x && "function" != typeof x ? w : x; - }(this, (q.__proto__ || Object.getPrototypeOf(q)).call(this, k.C_START_CHAR + u, v)); - } - (function (u, v) { - if ("function" != typeof v && null !== v) { - throw new TypeError("Super expression must either be null or a function, not " + typeof v); - } - u.prototype = Object.create(v && v.prototype, { - constructor: { - value: u, - enumerable: false, - writable: true, - configurable: true - } - }); - v && (Object.setPrototypeOf ? Object.setPrototypeOf(u, v) : u.__proto__ = v); - })(q, p); - g(q, [{ - key: "valid", - value: function () { - return new RegExp("^" + k.C_CHARS + "+$").test(this.data); - } - }]); - return q; - }(j.default); - c.default = m; - }, function (b, d, f) { - "use strict"; - - Object.defineProperty(d, "__esModule", { - value: true - }); - d.UPCE = d.UPC = d.EAN2 = d.EAN5 = d.EAN8 = d.EAN13 = undefined; - var g = q(f(101)); - var h = q(f(102)); - var j = q(f(103)); - var k = q(f(104)); - var m = q(f(73)); - var p = q(f(105)); - function q(u) { - return u && u.__esModule ? u : { - default: u - }; - } - d.EAN13 = g.default; - d.EAN8 = h.default; - d.EAN5 = j.default; - d.EAN2 = k.default; - d.UPC = m.default; - d.UPCE = p.default; - }, function (b, d, f) { - "use strict"; - - Object.defineProperty(d, "__esModule", { - value: true - }); - var g; - var h = function () { - function w(x, y) { - for (var z = 0; z < y.length; z++) { - var A = y[z]; - A.enumerable = A.enumerable || false; - A.configurable = true; - "value" in A && (A.writable = true); - Object.defineProperty(x, A.key, A); - } - } - return function (x, y, z) { - y && w(x.prototype, y); - z && w(x, z); - return x; - }; - }(); - var j = function w(x, y, z) { - null === x && (x = Function.prototype); - var A = Object.getOwnPropertyDescriptor(x, y); - if (undefined === A) { - var B = Object.getPrototypeOf(x); - return null === B ? undefined : w(B, y, z); - } - if ("value" in A) { - return A.value; - } - var C = A.get; - return undefined !== C ? C.call(z) : undefined; - }; - var k = f(48); - var m = f(72); - var p = (g = m) && g.__esModule ? g : { - default: g - }; - var q = function (x) { - return (10 - x.substr(0, 12).split("").map(function (y) { - return +y; - }).reduce(function (y, z, A) { - return A % 2 ? y + 3 * z : y + z; - }, 0) % 10) % 10; - }; - var v = function (x) { - function y(z, A) { - !function (C, D) { - if (!(C instanceof D)) { - throw new TypeError("Cannot call a class as a function"); - } - }(this, y); - -1 !== z.search(/^[0-9]{12}$/) && (z += q(z)); - var B = function (C, D) { - if (!C) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - return !D || "object" != typeof D && "function" != typeof D ? C : D; - }(this, (y.__proto__ || Object.getPrototypeOf(y)).call(this, z, A)); - B.lastChar = A.lastChar; - return B; - } - (function (z, A) { - if ("function" != typeof A && null !== A) { - throw new TypeError("Super expression must either be null or a function, not " + typeof A); - } - z.prototype = Object.create(A && A.prototype, { - constructor: { - value: z, - enumerable: false, - writable: true, - configurable: true - } - }); - A && (Object.setPrototypeOf ? Object.setPrototypeOf(z, A) : z.__proto__ = A); - })(y, x); - h(y, [{ - key: "valid", - value: function () { - return -1 !== this.data.search(/^[0-9]{13}$/) && +this.data[12] === q(this.data); - } - }, { - key: "leftText", - value: function () { - return j(y.prototype.__proto__ || Object.getPrototypeOf(y.prototype), "leftText", this).call(this, 1, 6); - } - }, { - key: "leftEncode", - value: function () { - var z = this.data.substr(1, 6); - var A = k.EAN13_STRUCTURE[this.data[0]]; - return j(y.prototype.__proto__ || Object.getPrototypeOf(y.prototype), "leftEncode", this).call(this, z, A); - } - }, { - key: "rightText", - value: function () { - return j(y.prototype.__proto__ || Object.getPrototypeOf(y.prototype), "rightText", this).call(this, 7, 6); - } - }, { - key: "rightEncode", - value: function () { - var z = this.data.substr(7, 6); - return j(y.prototype.__proto__ || Object.getPrototypeOf(y.prototype), "rightEncode", this).call(this, z, "RRRRRR"); - } - }, { - key: "encodeGuarded", - value: function () { - var z = j(y.prototype.__proto__ || Object.getPrototypeOf(y.prototype), "encodeGuarded", this).call(this); - this.options.displayValue && (z.unshift({ - data: "000000000000", - text: this.text.substr(0, 1), - options: { - textAlign: "left", - fontSize: this.fontSize - } - }), this.options.lastChar && (z.push({ - data: "00" - }), z.push({ - data: "00000", - text: this.options.lastChar, - options: { - fontSize: this.fontSize - } - }))); - return z; - } - }]); - return y; - }(p.default); - d.default = v; - }, function (b, d, f) { - "use strict"; - - Object.defineProperty(d, "__esModule", { - value: true - }); - var g; - var h = function () { - function u(v, w) { - for (var x = 0; x < w.length; x++) { - var y = w[x]; - y.enumerable = y.enumerable || false; - y.configurable = true; - "value" in y && (y.writable = true); - Object.defineProperty(v, y.key, y); - } - } - return function (v, w, x) { - w && u(v.prototype, w); - x && u(v, x); - return v; - }; - }(); - var j = function u(v, w, x) { - null === v && (v = Function.prototype); - var y = Object.getOwnPropertyDescriptor(v, w); - if (undefined === y) { - var z = Object.getPrototypeOf(v); - return null === z ? undefined : u(z, w, x); - } - if ("value" in y) { - return y.value; - } - var A = y.get; - return undefined !== A ? A.call(x) : undefined; - }; - var k = f(72); - var m = (g = k) && g.__esModule ? g : { - default: g - }; - var p = function (v) { - return (10 - v.substr(0, 7).split("").map(function (w) { - return +w; - }).reduce(function (w, x, y) { - return y % 2 ? w + x : w + 3 * x; - }, 0) % 10) % 10; - }; - var q = function (v) { - function w(x, y) { - (function (z, A) { - if (!(z instanceof A)) { - throw new TypeError("Cannot call a class as a function"); - } - })(this, w); - -1 !== x.search(/^[0-9]{7}$/) && (x += p(x)); - return function (z, A) { - if (!z) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - return !A || "object" != typeof A && "function" != typeof A ? z : A; - }(this, (w.__proto__ || Object.getPrototypeOf(w)).call(this, x, y)); - } - (function (x, y) { - if ("function" != typeof y && null !== y) { - throw new TypeError("Super expression must either be null or a function, not " + typeof y); - } - x.prototype = Object.create(y && y.prototype, { - constructor: { - value: x, - enumerable: false, - writable: true, - configurable: true - } - }); - y && (Object.setPrototypeOf ? Object.setPrototypeOf(x, y) : x.__proto__ = y); - })(w, v); - h(w, [{ - key: "valid", - value: function () { - return -1 !== this.data.search(/^[0-9]{8}$/) && +this.data[7] === p(this.data); - } - }, { - key: "leftText", - value: function () { - return j(w.prototype.__proto__ || Object.getPrototypeOf(w.prototype), "leftText", this).call(this, 0, 4); - } - }, { - key: "leftEncode", - value: function () { - var x = this.data.substr(0, 4); - return j(w.prototype.__proto__ || Object.getPrototypeOf(w.prototype), "leftEncode", this).call(this, x, "LLLL"); - } - }, { - key: "rightText", - value: function () { - return j(w.prototype.__proto__ || Object.getPrototypeOf(w.prototype), "rightText", this).call(this, 4, 4); - } - }, { - key: "rightEncode", - value: function () { - var x = this.data.substr(4, 4); - return j(w.prototype.__proto__ || Object.getPrototypeOf(w.prototype), "rightEncode", this).call(this, x, "RRRR"); - } - }]); - return w; - }(m.default); - d.default = q; - }, function (b, c, d) { - "use strict"; - - Object.defineProperty(c, "__esModule", { - value: true - }); - var f = function () { - function p(q, u) { - for (var v = 0; v < u.length; v++) { - var w = u[v]; - w.enumerable = w.enumerable || false; - w.configurable = true; - "value" in w && (w.writable = true); - Object.defineProperty(q, w.key, w); - } - } - return function (q, u, v) { - u && p(q.prototype, u); - v && p(q, v); - return q; - }; - }(); - var g = d(48); - var h = k(d(49)); - var j = k(d(27)); - function k(p) { - return p && p.__esModule ? p : { - default: p - }; - } - var m = function (p) { - function q(u, v) { - (function (w, x) { - if (!(w instanceof x)) { - throw new TypeError("Cannot call a class as a function"); - } - })(this, q); - return function (w, x) { - if (!w) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - return !x || "object" != typeof x && "function" != typeof x ? w : x; - }(this, (q.__proto__ || Object.getPrototypeOf(q)).call(this, u, v)); - } - (function (u, v) { - if ("function" != typeof v && null !== v) { - throw new TypeError("Super expression must either be null or a function, not " + typeof v); - } - u.prototype = Object.create(v && v.prototype, { - constructor: { - value: u, - enumerable: false, - writable: true, - configurable: true - } - }); - v && (Object.setPrototypeOf ? Object.setPrototypeOf(u, v) : u.__proto__ = v); - })(q, p); - f(q, [{ - key: "valid", - value: function () { - return -1 !== this.data.search(/^[0-9]{5}$/); - } - }, { - key: "encode", - value: function () { - var u; - var v = g.EAN5_STRUCTURE[u = this.data, u.split("").map(function (w) { - return +w; - }).reduce(function (w, x, y) { - return y % 2 ? w + 9 * x : w + 3 * x; - }, 0) % 10]; - return { - data: "1011" + (0, h.default)(this.data, v, "01"), - text: this.text - }; - } - }]); - return q; - }(j.default); - c.default = m; - }, function (b, c, d) { - "use strict"; - - Object.defineProperty(c, "__esModule", { - value: true - }); - var f = function () { - function l(m, p) { - for (var q = 0; q < p.length; q++) { - var u = p[q]; - u.enumerable = u.enumerable || false; - u.configurable = true; - "value" in u && (u.writable = true); - Object.defineProperty(m, u.key, u); - } - } - return function (m, p, q) { - p && l(m.prototype, p); - q && l(m, q); - return m; - }; - }(); - var g = d(48); - var h = j(d(49)); - function j(l) { - return l && l.__esModule ? l : { - default: l - }; - } - var k = function (l) { - function m(p, q) { - (function (u, v) { - if (!(u instanceof v)) { - throw new TypeError("Cannot call a class as a function"); - } - })(this, m); - return function (u, v) { - if (!u) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - return !v || "object" != typeof v && "function" != typeof v ? u : v; - }(this, (m.__proto__ || Object.getPrototypeOf(m)).call(this, p, q)); - } - (function (p, q) { - if ("function" != typeof q && null !== q) { - throw new TypeError("Super expression must either be null or a function, not " + typeof q); - } - p.prototype = Object.create(q && q.prototype, { - constructor: { - value: p, - enumerable: false, - writable: true, - configurable: true - } - }); - q && (Object.setPrototypeOf ? Object.setPrototypeOf(p, q) : p.__proto__ = q); - })(m, l); - f(m, [{ - key: "valid", - value: function () { - return -1 !== this.data.search(/^[0-9]{2}$/); - } - }, { - key: "encode", - value: function () { - var p = g.EAN2_STRUCTURE[parseInt(this.data) % 4]; - return { - data: "1011" + (0, h.default)(this.data, p, "01"), - text: this.text - }; - } - }]); - return m; - }(j(d(27)).default); - c.default = k; - }, function (b, d, g) { - "use strict"; - - Object.defineProperty(d, "__esModule", { - value: true - }); - var j = function () { - function A(B, C) { - for (var D = 0; D < C.length; D++) { - var E = C[D]; - E.enumerable = E.enumerable || false; - E.configurable = true; - "value" in E && (E.writable = true); - Object.defineProperty(B, E.key, E); - } - } - return function (B, C, D) { - C && A(B.prototype, C); - D && A(B, D); - return B; - }; - }(); - var k = q(g(49)); - var m = q(g(27)); - var p = g(73); - function q(A) { - return A && A.__esModule ? A : { - default: A - }; - } - function v(A, B) { - if (!A) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - return !B || "object" != typeof B && "function" != typeof B ? A : B; - } - var w = ["XX00000XXX", "XX10000XXX", "XX20000XXX", "XXX00000XX", "XXXX00000X", "XXXXX00005", "XXXXX00006", "XXXXX00007", "XXXXX00008", "XXXXX00009"]; - var x = [["EEEOOO", "OOOEEE"], ["EEOEOO", "OOEOEE"], ["EEOOEO", "OOEEOE"], ["EEOOOE", "OOEEEO"], ["EOEEOO", "OEOOEE"], ["EOOEEO", "OEEOOE"], ["EOOOEE", "OEEEOO"], ["EOEOEO", "OEOEOE"], ["EOEOOE", "OEOEEO"], ["EOOEOE", "OEEOEO"]]; - var y = function (A) { - function B(C, D) { - !function (F, G) { - if (!(F instanceof G)) { - throw new TypeError("Cannot call a class as a function"); - } - }(this, B); - var E = v(this, (B.__proto__ || Object.getPrototypeOf(B)).call(this, C, D)); - if (E.isValid = false, -1 !== C.search(/^[0-9]{6}$/)) { - E.middleDigits = C; - E.upcA = z(C, "0"); - E.text = D.text || "" + E.upcA[0] + C + E.upcA[E.upcA.length - 1]; - E.isValid = true; - } else { - if (-1 === C.search(/^[01][0-9]{7}$/)) { - return v(E); - } - if (E.middleDigits = C.substring(1, C.length - 1), E.upcA = z(E.middleDigits, C[0]), E.upcA[E.upcA.length - 1] !== C[C.length - 1]) { - return v(E); - } - E.isValid = true; - } - E.displayValue = D.displayValue; - D.fontSize > 10 * D.width ? E.fontSize = 10 * D.width : E.fontSize = D.fontSize; - E.guardHeight = D.height + E.fontSize / 2 + D.textMargin; - return E; - } - (function (C, D) { - if ("function" != typeof D && null !== D) { - throw new TypeError("Super expression must either be null or a function, not " + typeof D); - } - C.prototype = Object.create(D && D.prototype, { - constructor: { - value: C, - enumerable: false, - writable: true, - configurable: true - } - }); - D && (Object.setPrototypeOf ? Object.setPrototypeOf(C, D) : C.__proto__ = D); - })(B, A); - j(B, [{ - key: "valid", - value: function () { - return this.isValid; - } - }, { - key: "encode", - value: function () { - return this.options.flat ? this.flatEncoding() : this.guardedEncoding(); - } - }, { - key: "flatEncoding", - value: function () { - var C = ""; - C += "101"; - C += this.encodeMiddleDigits(); - return { - data: C += "010101", - text: this.text - }; - } - }, { - key: "guardedEncoding", - value: function () { - var C = []; - this.displayValue && C.push({ - data: "00000000", - text: this.text[0], - options: { - textAlign: "left", - fontSize: this.fontSize - } - }); - C.push({ - data: "101", - options: { - height: this.guardHeight - } - }); - C.push({ - data: this.encodeMiddleDigits(), - text: this.text.substring(1, 7), - options: { - fontSize: this.fontSize - } - }); - C.push({ - data: "010101", - options: { - height: this.guardHeight - } - }); - this.displayValue && C.push({ - data: "00000000", - text: this.text[7], - options: { - textAlign: "right", - fontSize: this.fontSize - } - }); - return C; - } - }, { - key: "encodeMiddleDigits", - value: function () { - var C = this.upcA[0]; - var D = this.upcA[this.upcA.length - 1]; - var E = x[parseInt(D)][parseInt(C)]; - return (0, k.default)(this.middleDigits, E); - } - }]); - return B; - }(m.default); - function z(A, B) { - for (var C = parseInt(A[A.length - 1]), D = w[C], E = "", F = 0, G = 0; G < D.length; G++) { - var H = D[G]; - E += "X" === H ? A[F++] : H; - } - return "" + (E = "" + B + E) + (0, p.checksum)(E); - } - d.default = y; - }, function (a, b, c) { - "use strict"; - - Object.defineProperty(b, "__esModule", { - value: true - }); - b.ITF14 = b.ITF = undefined; - var d = g(c(74)); - var f = g(c(108)); - function g(h) { - return h && h.__esModule ? h : { - default: h - }; - } - b.ITF = d.default; - b.ITF14 = f.default; - }, function (a, b, c) { - "use strict"; - - Object.defineProperty(b, "__esModule", { - value: true - }); - b.START_BIN = "1010"; - b.END_BIN = "11101"; - b.BINARIES = ["00110", "10001", "01001", "11000", "00101", "10100", "01100", "00011", "10010", "01010"]; - }, function (b, c, d) { - "use strict"; - - Object.defineProperty(c, "__esModule", { - value: true - }); - var f; - var g = function () { - function p(q, u) { - for (var v = 0; v < u.length; v++) { - var w = u[v]; - w.enumerable = w.enumerable || false; - w.configurable = true; - "value" in w && (w.writable = true); - Object.defineProperty(q, w.key, w); - } - } - return function (q, u, v) { - u && p(q.prototype, u); - v && p(q, v); - return q; - }; - }(); - var h = d(74); - var j = (f = h) && f.__esModule ? f : { - default: f - }; - var k = function (p) { - var q = p.substr(0, 13).split("").map(function (u) { - return parseInt(u, 10); - }).reduce(function (u, v, w) { - return u + v * (3 - w % 2 * 2); - }, 0); - return 10 * Math.ceil(q / 10) - q; - }; - var m = function (p) { - function q(u, v) { - (function (w, x) { - if (!(w instanceof x)) { - throw new TypeError("Cannot call a class as a function"); - } - })(this, q); - -1 !== u.search(/^[0-9]{13}$/) && (u += k(u)); - return function (w, x) { - if (!w) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - return !x || "object" != typeof x && "function" != typeof x ? w : x; - }(this, (q.__proto__ || Object.getPrototypeOf(q)).call(this, u, v)); - } - (function (u, v) { - if ("function" != typeof v && null !== v) { - throw new TypeError("Super expression must either be null or a function, not " + typeof v); - } - u.prototype = Object.create(v && v.prototype, { - constructor: { - value: u, - enumerable: false, - writable: true, - configurable: true - } - }); - v && (Object.setPrototypeOf ? Object.setPrototypeOf(u, v) : u.__proto__ = v); - })(q, p); - g(q, [{ - key: "valid", - value: function () { - return -1 !== this.data.search(/^[0-9]{14}$/) && +this.data[13] === k(this.data); - } - }]); - return q; - }(j.default); - c.default = m; - }, function (b, c, d) { - "use strict"; - - Object.defineProperty(c, "__esModule", { - value: true - }); - c.MSI1110 = c.MSI1010 = c.MSI11 = c.MSI10 = c.MSI = undefined; - var f = m(d(50)); - var g = m(d(110)); - var h = m(d(111)); - var j = m(d(112)); - var k = m(d(113)); - function m(p) { - return p && p.__esModule ? p : { - default: p - }; - } - c.MSI = f.default; - c.MSI10 = g.default; - c.MSI11 = h.default; - c.MSI1010 = j.default; - c.MSI1110 = k.default; - }, function (b, c, d) { - "use strict"; - - Object.defineProperty(c, "__esModule", { - value: true - }); - var f; - var g = d(50); - var h = (f = g) && f.__esModule ? f : { - default: f - }; - var j = d(58); - var k = function (l) { - function m(p, q) { - (function (u, v) { - if (!(u instanceof v)) { - throw new TypeError("Cannot call a class as a function"); - } - })(this, m); - return function (u, v) { - if (!u) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - return !v || "object" != typeof v && "function" != typeof v ? u : v; - }(this, (m.__proto__ || Object.getPrototypeOf(m)).call(this, p + (0, j.mod10)(p), q)); - } - (function (p, q) { - if ("function" != typeof q && null !== q) { - throw new TypeError("Super expression must either be null or a function, not " + typeof q); - } - p.prototype = Object.create(q && q.prototype, { - constructor: { - value: p, - enumerable: false, - writable: true, - configurable: true - } - }); - q && (Object.setPrototypeOf ? Object.setPrototypeOf(p, q) : p.__proto__ = q); - })(m, l); - return m; - }(h.default); - c.default = k; - }, function (b, c, d) { - "use strict"; - - Object.defineProperty(c, "__esModule", { - value: true - }); - var f; - var g = d(50); - var h = (f = g) && f.__esModule ? f : { - default: f - }; - var j = d(58); - var k = function (l) { - function m(p, q) { - (function (u, v) { - if (!(u instanceof v)) { - throw new TypeError("Cannot call a class as a function"); - } - })(this, m); - return function (u, v) { - if (!u) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - return !v || "object" != typeof v && "function" != typeof v ? u : v; - }(this, (m.__proto__ || Object.getPrototypeOf(m)).call(this, p + (0, j.mod11)(p), q)); - } - (function (p, q) { - if ("function" != typeof q && null !== q) { - throw new TypeError("Super expression must either be null or a function, not " + typeof q); - } - p.prototype = Object.create(q && q.prototype, { - constructor: { - value: p, - enumerable: false, - writable: true, - configurable: true - } - }); - q && (Object.setPrototypeOf ? Object.setPrototypeOf(p, q) : p.__proto__ = q); - })(m, l); - return m; - }(h.default); - c.default = k; - }, function (b, c, d) { - "use strict"; - - Object.defineProperty(c, "__esModule", { - value: true - }); - var f; - var g = d(50); - var h = (f = g) && f.__esModule ? f : { - default: f - }; - var j = d(58); - var k = function (l) { - function m(p, q) { - (function (u, v) { - if (!(u instanceof v)) { - throw new TypeError("Cannot call a class as a function"); - } - })(this, m); - p += (0, j.mod10)(p); - p += (0, j.mod10)(p); - return function (u, v) { - if (!u) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - return !v || "object" != typeof v && "function" != typeof v ? u : v; - }(this, (m.__proto__ || Object.getPrototypeOf(m)).call(this, p, q)); - } - (function (p, q) { - if ("function" != typeof q && null !== q) { - throw new TypeError("Super expression must either be null or a function, not " + typeof q); - } - p.prototype = Object.create(q && q.prototype, { - constructor: { - value: p, - enumerable: false, - writable: true, - configurable: true - } - }); - q && (Object.setPrototypeOf ? Object.setPrototypeOf(p, q) : p.__proto__ = q); - })(m, l); - return m; - }(h.default); - c.default = k; - }, function (b, c, d) { - "use strict"; - - Object.defineProperty(c, "__esModule", { - value: true - }); - var f; - var g = d(50); - var h = (f = g) && f.__esModule ? f : { - default: f - }; - var j = d(58); - var k = function (l) { - function m(p, q) { - (function (u, v) { - if (!(u instanceof v)) { - throw new TypeError("Cannot call a class as a function"); - } - })(this, m); - p += (0, j.mod11)(p); - p += (0, j.mod10)(p); - return function (u, v) { - if (!u) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - return !v || "object" != typeof v && "function" != typeof v ? u : v; - }(this, (m.__proto__ || Object.getPrototypeOf(m)).call(this, p, q)); - } - (function (p, q) { - if ("function" != typeof q && null !== q) { - throw new TypeError("Super expression must either be null or a function, not " + typeof q); - } - p.prototype = Object.create(q && q.prototype, { - constructor: { - value: p, - enumerable: false, - writable: true, - configurable: true - } - }); - q && (Object.setPrototypeOf ? Object.setPrototypeOf(p, q) : p.__proto__ = q); - })(m, l); - return m; - }(h.default); - c.default = k; - }, function (b, c, d) { - "use strict"; - - Object.defineProperty(c, "__esModule", { - value: true - }); - c.pharmacode = undefined; - var f; - var g = function () { - function k(l, m) { - for (var p = 0; p < m.length; p++) { - var q = m[p]; - q.enumerable = q.enumerable || false; - q.configurable = true; - "value" in q && (q.writable = true); - Object.defineProperty(l, q.key, q); - } - } - return function (l, m, p) { - m && k(l.prototype, m); - p && k(l, p); - return l; - }; - }(); - var h = d(27); - var j = function (k) { - function l(m, p) { - !function (s, u) { - if (!(s instanceof u)) { - throw new TypeError("Cannot call a class as a function"); - } - }(this, l); - var q = function (s, u) { - if (!s) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - return !u || "object" != typeof u && "function" != typeof u ? s : u; - }(this, (l.__proto__ || Object.getPrototypeOf(l)).call(this, m, p)); - q.number = parseInt(m, 10); - return q; - } - (function (m, p) { - if ("function" != typeof p && null !== p) { - throw new TypeError("Super expression must either be null or a function, not " + typeof p); - } - m.prototype = Object.create(p && p.prototype, { - constructor: { - value: m, - enumerable: false, - writable: true, - configurable: true - } - }); - p && (Object.setPrototypeOf ? Object.setPrototypeOf(m, p) : m.__proto__ = p); - })(l, k); - g(l, [{ - key: "encode", - value: function () { - for (var m = this.number, p = ""; !isNaN(m) && 0 != m;) { - m % 2 == 0 ? (p = "11100" + p, m = (m - 2) / 2) : (p = "100" + p, m = (m - 1) / 2); - } - return { - data: p = p.slice(0, -2), - text: this.text - }; - } - }, { - key: "valid", - value: function () { - return this.number >= 3 && this.number <= 131070; - } - }]); - return l; - }(((f = h) && f.__esModule ? f : { - default: f - }).default); - c.pharmacode = j; - }, function (b, c, d) { - "use strict"; - - Object.defineProperty(c, "__esModule", { - value: true - }); - c.codabar = undefined; - var f; - var g = function () { - function k(l, m) { - for (var p = 0; p < m.length; p++) { - var q = m[p]; - q.enumerable = q.enumerable || false; - q.configurable = true; - "value" in q && (q.writable = true); - Object.defineProperty(l, q.key, q); - } - } - return function (l, m, p) { - m && k(l.prototype, m); - p && k(l, p); - return l; - }; - }(); - var h = d(27); - var j = function (k) { - function l(m, p) { - !function (s, u) { - if (!(s instanceof u)) { - throw new TypeError("Cannot call a class as a function"); - } - }(this, l); - 0 === m.search(/^[0-9\-\$\:\.\+\/]+$/) && (m = "A" + m + "A"); - var q = function (s, u) { - if (!s) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - return !u || "object" != typeof u && "function" != typeof u ? s : u; - }(this, (l.__proto__ || Object.getPrototypeOf(l)).call(this, m.toUpperCase(), p)); - q.text = q.options.text || q.text.replace(/[A-D]/g, ""); - return q; - } - (function (m, p) { - if ("function" != typeof p && null !== p) { - throw new TypeError("Super expression must either be null or a function, not " + typeof p); - } - m.prototype = Object.create(p && p.prototype, { - constructor: { - value: m, - enumerable: false, - writable: true, - configurable: true - } - }); - p && (Object.setPrototypeOf ? Object.setPrototypeOf(m, p) : m.__proto__ = p); - })(l, k); - g(l, [{ - key: "valid", - value: function () { - return -1 !== this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/); - } - }, { - key: "encode", - value: function () { - for (var m = [], p = this.getEncodings(), q = 0; q < this.data.length; q++) { - m.push(p[this.data.charAt(q)]); - q !== this.data.length - 1 && m.push("0"); - } - return { - text: this.text, - data: m.join("") - }; - } - }, { - key: "getEncodings", - value: function () { - return { - 0: "101010011", - 1: "101011001", - 2: "101001011", - 3: "110010101", - 4: "101101001", - 5: "110101001", - 6: "100101011", - 7: "100101101", - 8: "100110101", - 9: "110100101", - "-": "101001101", - $: "101100101", - ":": "1101011011", - "/": "1101101011", - ".": "1101101101", - "+": "1011011011", - A: "1011001001", - B: "1001001011", - C: "1010010011", - D: "1010011001" - }; - } - }]); - return l; - }(((f = h) && f.__esModule ? f : { - default: f - }).default); - c.codabar = j; - }, function (b, c, d) { - "use strict"; - - Object.defineProperty(c, "__esModule", { - value: true - }); - c.GenericBarcode = undefined; - var f; - var g = function () { - function k(l, m) { - for (var p = 0; p < m.length; p++) { - var q = m[p]; - q.enumerable = q.enumerable || false; - q.configurable = true; - "value" in q && (q.writable = true); - Object.defineProperty(l, q.key, q); - } - } - return function (l, m, p) { - m && k(l.prototype, m); - p && k(l, p); - return l; - }; - }(); - var h = d(27); - var j = function (k) { - function l(m, p) { - (function (q, s) { - if (!(q instanceof s)) { - throw new TypeError("Cannot call a class as a function"); - } - })(this, l); - return function (q, s) { - if (!q) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - return !s || "object" != typeof s && "function" != typeof s ? q : s; - }(this, (l.__proto__ || Object.getPrototypeOf(l)).call(this, m, p)); - } - (function (m, p) { - if ("function" != typeof p && null !== p) { - throw new TypeError("Super expression must either be null or a function, not " + typeof p); - } - m.prototype = Object.create(p && p.prototype, { - constructor: { - value: m, - enumerable: false, - writable: true, - configurable: true - } - }); - p && (Object.setPrototypeOf ? Object.setPrototypeOf(m, p) : m.__proto__ = p); - })(l, k); - g(l, [{ - key: "encode", - value: function () { - return { - data: "10101010101010101010101010101010101010101", - text: this.text - }; - } - }, { - key: "valid", - value: function () { - return true; - } - }]); - return l; - }(((f = h) && f.__esModule ? f : { - default: f - }).default); - c.GenericBarcode = j; - }, function (a, b, c) { - "use strict"; - - Object.defineProperty(b, "__esModule", { - value: true - }); - b.default = function (d) { - var f = []; - (function g(h) { - if (Array.isArray(h)) { - for (var i = 0; i < h.length; i++) { - g(h[i]); - } - } else { - h.text = h.text || ""; - h.data = h.data || ""; - f.push(h); - } - })(d); - return f; - }; - }, function (a, b, c) { - "use strict"; - - Object.defineProperty(b, "__esModule", { - value: true - }); - b.default = function (d) { - d.marginTop = d.marginTop || d.margin; - d.marginBottom = d.marginBottom || d.margin; - d.marginRight = d.marginRight || d.margin; - d.marginLeft = d.marginLeft || d.margin; - return d; - }; - }, function (b, c, d) { - "use strict"; - - Object.defineProperty(c, "__esModule", { - value: true - }); - var f = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (p) { - return typeof p; - } : function (p) { - return p && "function" == typeof Symbol && p.constructor === Symbol && p !== Symbol.prototype ? "symbol" : typeof p; - }; - var g = k(d(120)); - var h = k(d(121)); - var j = d(78); - function k(p) { - return p && p.__esModule ? p : { - default: p - }; - } - function m(p) { - if ("string" == typeof p) { - return function (x) { - var y = document.querySelectorAll(x); - if (0 === y.length) { - return; - } - for (var z = [], A = 0; A < y.length; A++) { - z.push(m(y[A])); - } - return z; - }(p); - } - if (Array.isArray(p)) { - for (var q = [], u = 0; u < p.length; u++) { - q.push(m(p[u])); - } - return q; - } - if ("undefined" != typeof HTMLCanvasElement && p instanceof HTMLImageElement) { - v = p; - return { - element: w = document.createElement("canvas"), - options: (0, g.default)(v), - renderer: h.default.CanvasRenderer, - afterRender: function () { - v.setAttribute("src", w.toDataURL()); - } - }; - } - if (p && p.nodeName && "svg" === p.nodeName.toLowerCase() || "undefined" != typeof SVGElement && p instanceof SVGElement) { - return { - element: p, - options: (0, g.default)(p), - renderer: h.default.SVGRenderer - }; - } - if ("undefined" != typeof HTMLCanvasElement && p instanceof HTMLCanvasElement) { - return { - element: p, - options: (0, g.default)(p), - renderer: h.default.CanvasRenderer - }; - } - if (p && p.getContext) { - return { - element: p, - renderer: h.default.CanvasRenderer - }; - } - if (p && "object" === (undefined === p ? "undefined" : f(p)) && !p.nodeName) { - return { - element: p, - renderer: h.default.ObjectRenderer - }; - } - throw new j.InvalidElementException(); - var v; - var w; - } - c.default = m; - }, function (a, b, c) { - "use strict"; - - Object.defineProperty(b, "__esModule", { - value: true - }); - var d = g(c(75)); - var f = g(c(76)); - function g(h) { - return h && h.__esModule ? h : { - default: h - }; - } - b.default = function (h) { - var j = {}; - for (var k in f.default) f.default.hasOwnProperty(k) && (h.hasAttribute("jsbarcode-" + k.toLowerCase()) && (j[k] = h.getAttribute("jsbarcode-" + k.toLowerCase())), h.hasAttribute("data-" + k.toLowerCase()) && (j[k] = h.getAttribute("data-" + k.toLowerCase()))); - j.value = h.getAttribute("jsbarcode-value") || h.getAttribute("data-value"); - return j = (0, d.default)(j); - }; - }, function (b, c, d) { - "use strict"; - - Object.defineProperty(c, "__esModule", { - value: true - }); - var f = j(d(122)); - var g = j(d(123)); - var h = j(d(124)); - function j(k) { - return k && k.__esModule ? k : { - default: k - }; - } - c.default = { - CanvasRenderer: f.default, - SVGRenderer: g.default, - ObjectRenderer: h.default - }; - }, function (b, c, d) { - "use strict"; - - Object.defineProperty(c, "__esModule", { - value: true - }); - var f; - var g = function () { - function p(q, u) { - for (var v = 0; v < u.length; v++) { - var w = u[v]; - w.enumerable = w.enumerable || false; - w.configurable = true; - "value" in w && (w.writable = true); - Object.defineProperty(q, w.key, w); - } - } - return function (q, u, v) { - u && p(q.prototype, u); - v && p(q, v); - return q; - }; - }(); - var h = d(59); - var j = (f = h) && f.__esModule ? f : { - default: f - }; - var k = d(77); - var m = function () { - function p(q, u, v) { - !function (w, x) { - if (!(w instanceof x)) { - throw new TypeError("Cannot call a class as a function"); - } - }(this, p); - this.canvas = q; - this.encodings = u; - this.options = v; - } - g(p, [{ - key: "render", - value: function () { - if (!this.canvas.getContext) { - throw new Error("The browser does not support canvas."); - } - this.prepareCanvas(); - for (var q = 0; q < this.encodings.length; q++) { - var u = (0, j.default)(this.options, this.encodings[q].options); - this.drawCanvasBarcode(u, this.encodings[q]); - this.drawCanvasText(u, this.encodings[q]); - this.moveCanvasDrawing(this.encodings[q]); - } - this.restoreCanvas(); - } - }, { - key: "prepareCanvas", - value: function () { - var q = this.canvas.getContext("2d"); - q.save(); - (0, k.calculateEncodingAttributes)(this.encodings, this.options, q); - var u = (0, k.getTotalWidthOfEncodings)(this.encodings); - var v = (0, k.getMaximumHeightOfEncodings)(this.encodings); - this.canvas.width = u + this.options.marginLeft + this.options.marginRight; - this.canvas.height = v; - q.clearRect(0, 0, this.canvas.width, this.canvas.height); - this.options.background && (q.fillStyle = this.options.background, q.fillRect(0, 0, this.canvas.width, this.canvas.height)); - q.translate(this.options.marginLeft, 0); - } - }, { - key: "drawCanvasBarcode", - value: function (q, u) { - var v; - var w = this.canvas.getContext("2d"); - var x = u.data; - v = "top" == q.textPosition ? q.marginTop + q.fontSize + q.textMargin : q.marginTop; - w.fillStyle = q.lineColor; - for (var y = 0; y < x.length; y++) { - var z = y * q.width + u.barcodePadding; - "1" === x[y] ? w.fillRect(z, v, q.width, q.height) : x[y] && w.fillRect(z, v, q.width, q.height * x[y]); - } - } - }, { - key: "drawCanvasText", - value: function (q, u) { - var v; - var w; - var x = this.canvas.getContext("2d"); - var y = q.fontOptions + " " + q.fontSize + "px " + q.font; - q.displayValue && (w = "top" == q.textPosition ? q.marginTop + q.fontSize - q.textMargin : q.height + q.textMargin + q.marginTop + q.fontSize, x.font = y, "left" == q.textAlign || u.barcodePadding > 0 ? (v = 0, x.textAlign = "left") : "right" == q.textAlign ? (v = u.width - 1, x.textAlign = "right") : (v = u.width / 2, x.textAlign = "center"), x.fillText(u.text, v, w)); - } - }, { - key: "moveCanvasDrawing", - value: function (q) { - this.canvas.getContext("2d").translate(q.width, 0); - } - }, { - key: "restoreCanvas", - value: function () { - this.canvas.getContext("2d").restore(); - } - }]); - return p; - }(); - c.default = m; - }, function (b, d, f) { - "use strict"; - - Object.defineProperty(d, "__esModule", { - value: true - }); - var g; - var h = function () { - function u(v, w) { - for (var x = 0; x < w.length; x++) { - var y = w[x]; - y.enumerable = y.enumerable || false; - y.configurable = true; - "value" in y && (y.writable = true); - Object.defineProperty(v, y.key, y); - } - } - return function (v, w, x) { - w && u(v.prototype, w); - x && u(v, x); - return v; - }; - }(); - var j = f(59); - var k = (g = j) && g.__esModule ? g : { - default: g - }; - var m = f(77); - var p = "http://www.w3.org/2000/svg"; - var q = function () { - function u(v, w, x) { - !function (y, z) { - if (!(y instanceof z)) { - throw new TypeError("Cannot call a class as a function"); - } - }(this, u); - this.svg = v; - this.encodings = w; - this.options = x; - this.document = x.xmlDocument || document; - } - h(u, [{ - key: "render", - value: function () { - var v = this.options.marginLeft; - this.prepareSVG(); - for (var w = 0; w < this.encodings.length; w++) { - var x = this.encodings[w]; - var y = (0, k.default)(this.options, x.options); - var z = this.createGroup(v, y.marginTop, this.svg); - this.setGroupOptions(z, y); - this.drawSvgBarcode(z, y, x); - this.drawSVGText(z, y, x); - v += x.width; - } - } - }, { - key: "prepareSVG", - value: function () { - for (; this.svg.firstChild;) { - this.svg.removeChild(this.svg.firstChild); - } - (0, m.calculateEncodingAttributes)(this.encodings, this.options); - var v = (0, m.getTotalWidthOfEncodings)(this.encodings); - var w = (0, m.getMaximumHeightOfEncodings)(this.encodings); - var x = v + this.options.marginLeft + this.options.marginRight; - this.setSvgAttributes(x, w); - this.options.background && this.drawRect(0, 0, x, w, this.svg).setAttribute("style", "fill:" + this.options.background + ";"); - } - }, { - key: "drawSvgBarcode", - value: function (v, w, x) { - var y; - var z = x.data; - y = "top" == w.textPosition ? w.fontSize + w.textMargin : 0; - for (var A = 0, B = 0, C = 0; C < z.length; C++) { - B = C * w.width + x.barcodePadding; - "1" === z[C] ? A++ : A > 0 && (this.drawRect(B - w.width * A, y, w.width * A, w.height, v), A = 0); - } - A > 0 && this.drawRect(B - w.width * (A - 1), y, w.width * A, w.height, v); - } - }, { - key: "drawSVGText", - value: function (v, w, x) { - var y; - var z; - var A = this.document.createElementNS(p, "text"); - w.displayValue && (A.setAttribute("style", "font:" + w.fontOptions + " " + w.fontSize + "px " + w.font), z = "top" == w.textPosition ? w.fontSize - w.textMargin : w.height + w.textMargin + w.fontSize, "left" == w.textAlign || x.barcodePadding > 0 ? (y = 0, A.setAttribute("text-anchor", "start")) : "right" == w.textAlign ? (y = x.width - 1, A.setAttribute("text-anchor", "end")) : (y = x.width / 2, A.setAttribute("text-anchor", "middle")), A.setAttribute("x", y), A.setAttribute("y", z), A.appendChild(this.document.createTextNode(x.text)), v.appendChild(A)); - } - }, { - key: "setSvgAttributes", - value: function (v, w) { - var x = this.svg; - x.setAttribute("width", v + "px"); - x.setAttribute("height", w + "px"); - x.setAttribute("x", "0px"); - x.setAttribute("y", "0px"); - x.setAttribute("viewBox", "0 0 " + v + " " + w); - x.setAttribute("xmlns", p); - x.setAttribute("version", "1.1"); - x.setAttribute("style", "transform: translate(0,0)"); - } - }, { - key: "createGroup", - value: function (v, w, x) { - var y = this.document.createElementNS(p, "g"); - y.setAttribute("transform", "translate(" + v + ", " + w + ")"); - x.appendChild(y); - return y; - } - }, { - key: "setGroupOptions", - value: function (v, w) { - v.setAttribute("style", "fill:" + w.lineColor + ";"); - } - }, { - key: "drawRect", - value: function (v, w, x, y, z) { - var A = this.document.createElementNS(p, "rect"); - A.setAttribute("x", v); - A.setAttribute("y", w); - A.setAttribute("width", x); - A.setAttribute("height", y); - z.appendChild(A); - return A; - } - }]); - return u; - }(); - d.default = q; - }, function (a, b, c) { - "use strict"; - - Object.defineProperty(b, "__esModule", { - value: true - }); - var d = function () { - function g(h, j) { - for (var k = 0; k < j.length; k++) { - var l = j[k]; - l.enumerable = l.enumerable || false; - l.configurable = true; - "value" in l && (l.writable = true); - Object.defineProperty(h, l.key, l); - } - } - return function (h, j, k) { - j && g(h.prototype, j); - k && g(h, k); - return h; - }; - }(); - var f = function () { - function g(h, j, k) { - !function (l, m) { - if (!(l instanceof m)) { - throw new TypeError("Cannot call a class as a function"); - } - }(this, g); - this.object = h; - this.encodings = j; - this.options = k; - } - d(g, [{ - key: "render", - value: function () { - this.object.encodings = this.encodings; - } - }]); - return g; - }(); - b.default = f; - }, function (a, b, c) { - "use strict"; - - Object.defineProperty(b, "__esModule", { - value: true - }); - var d = function () { - function g(h, j) { - for (var k = 0; k < j.length; k++) { - var l = j[k]; - l.enumerable = l.enumerable || false; - l.configurable = true; - "value" in l && (l.writable = true); - Object.defineProperty(h, l.key, l); - } - } - return function (h, j, k) { - j && g(h.prototype, j); - k && g(h, k); - return h; - }; - }(); - var f = function () { - function g(h) { - !function (j, k) { - if (!(j instanceof k)) { - throw new TypeError("Cannot call a class as a function"); - } - }(this, g); - this.api = h; - } - d(g, [{ - key: "handleCatch", - value: function (h) { - if ("InvalidInputException" !== h.name) { - throw h; - } - if (this.api._options.valid === this.api._defaults.valid) { - throw h.message; - } - this.api._options.valid(false); - this.api.render = function () {}; - } - }, { - key: "wrapBarcodeCall", - value: function (h) { - try { - var j = h.apply(undefined, arguments); - this.api._options.valid(true); - return j; - } catch (k) { - this.handleCatch(k); - return this.api; - } - } - }]); - return g; - }(); - b.default = f; - }, function (a, b) { - a.exports = function () { - return "function" == typeof Promise && Promise.prototype && Promise.prototype.then; - }; - }, function (b, j, k) { - const q = k(35); - const w = k(67); - const x = k(128); - const z = k(129); - const A = k(130); - const B = k(131); - const C = k(132); - const D = k(79); - const E = k(133); - const F = k(136); - const G = k(137); - const H = k(36); - const I = k(138); - function J(M, N, O) { - const P = M.size; - const Q = G.getEncodedBits(N, O); - let R; - let S; - for (R = 0; R < 15; R++) { - S = 1 == (Q >> R & 1); - R < 6 ? M.set(R, 8, S, true) : R < 8 ? M.set(R + 1, 8, S, true) : M.set(P - 15 + R, 8, S, true); - R < 8 ? M.set(8, P - R - 1, S, true) : R < 9 ? M.set(8, 15 - R - 1 + 1, S, true) : M.set(8, 15 - R - 1, S, true); - } - M.set(P - 8, 8, 1, true); - } - function K(M, N, O) { - const P = new x(); - O.forEach(function (S) { - P.put(S.mode.bit, 4); - P.put(S.getLength(), H.getCharCountIndicator(S.mode, M)); - S.write(P); - }); - const Q = 8 * (q.getSymbolTotalCodewords(M) - D.getTotalCodewordsCount(M, N)); - for (P.getLengthInBits() + 4 <= Q && P.put(0, 4); P.getLengthInBits() % 8 != 0;) { - P.putBit(0); - } - const R = (Q - P.getLengthInBits()) / 8; - for (let S = 0; S < R; S++) { - P.put(S % 2 ? 17 : 236, 8); - } - return function (T, U, V) { - const W = q.getSymbolTotalCodewords(U); - const X = D.getTotalCodewordsCount(U, V); - const Y = W - X; - const Z = D.getBlocksCount(U, V); - const a0 = Z - W % Z; - const a1 = Math.floor(W / Z); - const a2 = Math.floor(Y / Z); - const a3 = a2 + 1; - const a4 = a1 - a2; - const a5 = new E(a4); - let a6 = 0; - const a7 = new Array(Z); - const a8 = new Array(Z); - let a9 = 0; - const aa = new Uint8Array(T.buffer); - for (let af = 0; af < Z; af++) { - const ag = af < a0 ? a2 : a3; - a7[af] = aa.slice(a6, a6 + ag); - a8[af] = a5.encode(a7[af]); - a6 += ag; - a9 = Math.max(a9, ag); - } - const ab = new Uint8Array(W); - let ac; - let ad; - let ae = 0; - for (ac = 0; ac < a9; ac++) { - for (ad = 0; ad < Z; ad++) { - ac < a7[ad].length && (ab[ae++] = a7[ad][ac]); - } - } - for (ac = 0; ac < a4; ac++) { - for (ad = 0; ad < Z; ad++) { - ab[ae++] = a8[ad][ac]; - } - } - return ab; - }(P, M, N); - } - function L(M, N, O, P) { - let Q; - if (Array.isArray(M)) { - Q = I.fromArray(M); - } else { - if ("string" != typeof M) { - throw new Error("Invalid data"); - } { - let V = N; - if (!V) { - const W = I.rawSplit(M); - V = F.getBestVersionForData(W, O); - } - Q = I.fromString(M, V || 40); + _0x27d09f[_0x2d3cac(348)](_0x248fa8, 0, 0, _0x5ea6dd[_0x2d3cac(407)], _0x5ea6dd.height); + const _0x4c0279 = _0x5ea6dd[_0x2d3cac(356)](_0x2d3cac(251)).split(",")[1]; + _0x5e5e80(_0x4c0279); } + } catch (_0x309414) { + console[_0x2d3cac(412)]("获取图片Base64失败:", _0x309414); + _0x5e5e80(null); } - const R = F.getBestVersionForData(Q, O); - if (!R) { - throw new Error("The amount of data is too big to be stored in a QR Code"); - } - if (N) { - if (N < R) { - throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: " + R + ".\n"); - } - } else { - N = R; - } - const S = K(N, O, Q); - const T = q.getSymbolSize(N); - const U = new z(T); - (function (X, Y) { - const Z = X.size; - const a0 = B.getPositions(Y); - for (let a1 = 0; a1 < a0.length; a1++) { - const a2 = a0[a1][0]; - const a3 = a0[a1][1]; - for (let a4 = -1; a4 <= 7; a4++) { - if (!(a2 + a4 <= -1 || Z <= a2 + a4)) { - for (let a5 = -1; a5 <= 7; a5++) { - a3 + a5 <= -1 || Z <= a3 + a5 || (a4 >= 0 && a4 <= 6 && (0 === a5 || 6 === a5) || a5 >= 0 && a5 <= 6 && (0 === a4 || 6 === a4) || a4 >= 2 && a4 <= 4 && a5 >= 2 && a5 <= 4 ? X.set(a2 + a4, a3 + a5, true, true) : X.set(a2 + a4, a3 + a5, false, true)); - } - } - } - } - })(U, N); - (function (X) { - const Y = X.size; - for (let Z = 8; Z < Y - 8; Z++) { - const a0 = Z % 2 == 0; - X.set(Z, 6, a0, true); - X.set(6, Z, a0, true); - } - })(U); - (function (X, Y) { - const Z = A.getPositions(Y); - for (let a0 = 0; a0 < Z.length; a0++) { - const a1 = Z[a0][0]; - const a2 = Z[a0][1]; - for (let a3 = -2; a3 <= 2; a3++) { - for (let a4 = -2; a4 <= 2; a4++) { - -2 === a3 || 2 === a3 || -2 === a4 || 2 === a4 || 0 === a3 && 0 === a4 ? X.set(a1 + a3, a2 + a4, true, true) : X.set(a1 + a3, a2 + a4, false, true); - } - } - } - })(U, N); - J(U, O, 0); - N >= 7 && function (X, Y) { - const Z = X.size; - const a0 = F.getEncodedBits(Y); - let a1; - let a2; - let a3; - for (let a4 = 0; a4 < 18; a4++) { - a1 = Math.floor(a4 / 3); - a2 = a4 % 3 + Z - 8 - 3; - a3 = 1 == (a0 >> a4 & 1); - X.set(a1, a2, a3, true); - X.set(a2, a1, a3, true); - } - }(U, N); - (function (X, Y) { - const Z = X.size; - let a0 = -1; - let a1 = Z - 1; - let a2 = 7; - let a3 = 0; - for (let a4 = Z - 1; a4 > 0; a4 -= 2) { - for (6 === a4 && a4--;;) { - for (let a5 = 0; a5 < 2; a5++) { - if (!X.isReserved(a1, a4 - a5)) { - let a6 = false; - a3 < Y.length && (a6 = 1 == (Y[a3] >>> a2 & 1)); - X.set(a1, a4 - a5, a6); - a2--; - -1 === a2 && (a3++, a2 = 7); - } - } - if (a1 += a0, a1 < 0 || Z <= a1) { - a1 -= a0; - a0 = -a0; - break; - } - } - } - })(U, S); - isNaN(P) && (P = C.getBestMask(U, J.bind(null, U, O))); - C.applyMask(P, U); - J(U, O, P); + } + _0x248fa8[_0xbdfce6(349)] ? _0x1cfa23() : (_0x248fa8[_0xbdfce6(286)] = _0x1cfa23, _0x248fa8[_0xbdfce6(301)] = () => _0x5e5e80(null)); + }); +} +function getElementPosition(_0xdfdfbd) { + const _0x3252b0 = _0x30b83a, + _0x436167 = _0xdfdfbd.getBoundingClientRect(); + return { + "x": _0x436167.left + window[_0x3252b0(413)], + "y": _0x436167[_0x3252b0(399)] + window[_0x3252b0(268)], + "width": _0x436167.width, + "height": _0x436167[_0x3252b0(417)] + }; +} +async function simulateType1Clicks(_0x589751, _0x3f8d82) { + const _0x596837 = _0x30b83a; + console[_0x596837(351)]("[类型1点击] 开始模拟点击流程"); + const _0x12f906 = getElementPosition(_0x589751); + console[_0x596837(351)](_0x596837(247) + _0x12f906.x + _0x596837(418) + _0x12f906.y + _0x596837(355) + _0x12f906[_0x596837(407)] + _0x596837(328) + _0x12f906.height); + const _0x39c853 = _0x3f8d82[_0x596837(280)]("|"), + _0x1e4188 = _0x39c853[_0x596837(250)](_0x19e0b9 => { + const _0x97b0cf = _0x596837, + [_0x202fbd, _0x5c94d6] = _0x19e0b9[_0x97b0cf(280)](",").map(Number); return { - modules: U, - version: N, - errorCorrectionLevel: O, - maskPattern: P, - segments: Q + "x": _0x202fbd, + "y": _0x5c94d6 }; + }); + for (let _0x3ecf6b = 0; _0x3ecf6b < _0x1e4188[_0x596837(368)]; _0x3ecf6b++) { + const _0x5cffa4 = _0x1e4188[_0x3ecf6b], + _0x21cd99 = _0x12f906.x + _0x5cffa4.x, + _0x4bbd58 = _0x12f906.y + _0x5cffa4.y; + console[_0x596837(351)](_0x596837(432) + (_0x3ecf6b + 1) + " 个点: (" + _0x21cd99 + ", " + _0x4bbd58 + ")"); + await simulateClick(_0x21cd99, _0x4bbd58); + await sleep(500); + } + console[_0x596837(351)](_0x596837(255)); +} +async function solveType1Captcha() { + const _0x7f43ad = _0x30b83a; + window[_0x7f43ad(343)] = true; + console[_0x7f43ad(351)](_0x7f43ad(425)); + try { + (await isSpinnerVisible()) && (console.log("[类型1处理] 检测到加载动画,等待加载完成..."), await waitForSpinnerToDisappear()); + await refreshType1Captcha(); + await new Promise(_0x2a9975 => setTimeout(_0x2a9975, 500)); + (await isSpinnerVisible()) && (console.log(_0x7f43ad(398)), await waitForSpinnerToDisappear()); + const _0x385327 = document[_0x7f43ad(354)]("#captchaImg"); + if (!_0x385327) { + console[_0x7f43ad(412)]("[类型1处理] 未找到验证码图片元素"); + return; } - j.create = function (M, N) { - if (undefined === M || "" === M) { - throw new Error("No input text"); - } - let O; - let P; - let Q = w.M; - undefined !== N && (Q = w.from(N.errorCorrectionLevel, w.M), O = F.from(N.version), P = C.from(N.maskPattern), N.toSJISFunc && q.setToSJISFunction(N.toSJISFunc)); - return L(M, O, Q, P); - }; - }, function (a, b) { - function c() { - this.buffer = []; - this.length = 0; - } - c.prototype = { - get: function (d) { - const f = Math.floor(d / 8); - return 1 == (this.buffer[f] >>> 7 - d % 8 & 1); - }, - put: function (d, f) { - for (let g = 0; g < f; g++) { - this.putBit(1 == (d >>> f - g - 1 & 1)); - } - }, - getLengthInBits: function () { - return this.length; - }, - putBit: function (d) { - const f = Math.floor(this.length / 8); - this.buffer.length <= f && this.buffer.push(0); - d && (this.buffer[f] |= 128 >>> this.length % 8); - this.length++; - } - }; - a.exports = c; - }, function (a, b) { - function c(d) { - if (!d || d < 1) { - throw new Error("BitMatrix size must be defined and greater than 0"); - } - this.size = d; - this.data = new Uint8Array(d * d); - this.reservedBit = new Uint8Array(d * d); - } - c.prototype.set = function (d, f, g, h) { - const j = d * this.size + f; - this.data[j] = g; - h && (this.reservedBit[j] = true); - }; - c.prototype.get = function (d, f) { - return this.data[d * this.size + f]; - }; - c.prototype.xor = function (d, f, g) { - this.data[d * this.size + f] ^= g; - }; - c.prototype.isReserved = function (d, f) { - return this.reservedBit[d * this.size + f]; - }; - a.exports = c; - }, function (a, b, c) { - const d = c(35).getSymbolSize; - b.getRowColCoords = function (f) { - if (1 === f) { - return []; - } - const g = Math.floor(f / 7) + 2; - const h = d(f); - const j = 145 === h ? 26 : 2 * Math.ceil((h - 13) / (2 * g - 2)); - const k = [h - 7]; - for (let l = 1; l < g - 1; l++) { - k[l] = k[l - 1] - j; - } - k.push(6); - return k.reverse(); - }; - b.getPositions = function (f) { - const g = []; - const h = b.getRowColCoords(f); - const j = h.length; - for (let k = 0; k < j; k++) { - for (let l = 0; l < j; l++) { - 0 === k && 0 === l || 0 === k && l === j - 1 || k === j - 1 && 0 === l || g.push([h[k], h[l]]); - } - } - return g; - }; - }, function (a, b, c) { - const d = c(35).getSymbolSize; - b.getPositions = function (f) { - const g = d(f); - return [[0, 0], [g - 7, 0], [0, g - 7]]; - }; - }, function (b, c) { - c.Patterns = { - PATTERN000: 0, - PATTERN001: 1, - PATTERN010: 2, - PATTERN011: 3, - PATTERN100: 4, - PATTERN101: 5, - PATTERN110: 6, - PATTERN111: 7 - }; - const d = 3; - const f = 3; - const g = 40; - const h = 10; - function j(k, l, m) { - switch (k) { - case c.Patterns.PATTERN000: - return (l + m) % 2 == 0; - case c.Patterns.PATTERN001: - return l % 2 == 0; - case c.Patterns.PATTERN010: - return m % 3 == 0; - case c.Patterns.PATTERN011: - return (l + m) % 3 == 0; - case c.Patterns.PATTERN100: - return (Math.floor(l / 2) + Math.floor(m / 3)) % 2 == 0; - case c.Patterns.PATTERN101: - return l * m % 2 + l * m % 3 == 0; - case c.Patterns.PATTERN110: - return (l * m % 2 + l * m % 3) % 2 == 0; - case c.Patterns.PATTERN111: - return (l * m % 3 + (l + m) % 2) % 2 == 0; - default: - throw new Error("bad maskPattern:" + k); + await waitForImageLoad(_0x385327); + await new Promise(_0x52a0c6 => setTimeout(_0x52a0c6, 1500)); + const _0x318b84 = document[_0x7f43ad(354)](_0x7f43ad(438)) || document[_0x7f43ad(354)](_0x7f43ad(388)); + if (!_0x318b84) { + { + console[_0x7f43ad(412)](_0x7f43ad(305)); + return; } } - c.isValid = function (k) { - return null != k && "" !== k && !isNaN(k) && k >= 0 && k <= 7; - }; - c.from = function (k) { - return c.isValid(k) ? parseInt(k, 10) : undefined; - }; - c.getPenaltyN1 = function (k) { - const m = k.size; - let p = 0; - let q = 0; - let u = 0; - let v = null; - let w = null; - for (let x = 0; x < m; x++) { - q = u = 0; - v = w = null; - for (let y = 0; y < m; y++) { - let z = k.get(x, y); - z === v ? q++ : (q >= 5 && (p += d + (q - 5)), v = z, q = 1); - z = k.get(y, x); - z === w ? u++ : (u >= 5 && (p += d + (u - 5)), w = z, u = 1); - } - q >= 5 && (p += d + (q - 5)); - u >= 5 && (p += d + (u - 5)); - } - return p; - }; - c.getPenaltyN2 = function (k) { - const l = k.size; - let m = 0; - for (let p = 0; p < l - 1; p++) { - for (let q = 0; q < l - 1; q++) { - const s = k.get(p, q) + k.get(p, q + 1) + k.get(p + 1, q) + k.get(p + 1, q + 1); - 4 !== s && 0 !== s || m++; - } - } - return m * f; - }; - c.getPenaltyN3 = function (k) { - const l = k.size; - let m = 0; - let p = 0; - let q = 0; - for (let s = 0; s < l; s++) { - p = q = 0; - for (let u = 0; u < l; u++) { - p = p << 1 & 2047 | k.get(s, u); - u >= 10 && (1488 === p || 93 === p) && m++; - q = q << 1 & 2047 | k.get(u, s); - u >= 10 && (1488 === q || 93 === q) && m++; - } - } - return m * g; - }; - c.getPenaltyN4 = function (k) { - let l = 0; - const m = k.data.length; - for (let p = 0; p < m; p++) { - l += k.data[p]; - } - return Math.abs(Math.ceil(100 * l / m / 5) - 10) * h; - }; - c.applyMask = function (k, l) { - const m = l.size; - for (let p = 0; p < m; p++) { - for (let q = 0; q < m; q++) { - l.isReserved(q, p) || l.xor(q, p, j(k, q, p)); - } - } - }; - c.getBestMask = function (k, l) { - const m = Object.keys(c.Patterns).length; - let p = 0; - let q = Infinity; - for (let s = 0; s < m; s++) { - l(s); - c.applyMask(s, k); - const u = c.getPenaltyN1(k) + c.getPenaltyN2(k) + c.getPenaltyN3(k) + c.getPenaltyN4(k); - c.applyMask(s, k); - u < q && (q = u, p = s); - } - return p; - }; - }, function (a, b, c) { - const d = c(134); - function f(g) { - this.genPoly = undefined; - this.degree = g; - this.degree && this.initialize(this.degree); + const _0x741aaf = await getImageBase64(_0x385327); + if (!_0x741aaf) { + console[_0x7f43ad(412)](_0x7f43ad(262)); + return; } - f.prototype.initialize = function (g) { - this.degree = g; - this.genPoly = d.generateECPolynomial(this.degree); + const _0x11ec2b = _0x318b84[_0x7f43ad(317)][_0x7f43ad(294)](); + console[_0x7f43ad(351)](_0x7f43ad(431) + _0x11ec2b); + const _0x52400e = await translateText(_0x11ec2b); + console[_0x7f43ad(351)](_0x7f43ad(359) + _0x52400e); + const _0x4cd79a = { + "username": CAPTCHA_CONFIG[_0x7f43ad(420)], + "password": CAPTCHA_CONFIG[_0x7f43ad(320)], + "typeid": CAPTCHA_CONFIG[_0x7f43ad(321)], + "softid": CAPTCHA_CONFIG[_0x7f43ad(318)], + "remark": _0x52400e, + "image": _0x741aaf, + "prompt": _0x11ec2b }; - f.prototype.encode = function (g) { - if (!this.genPoly) { - throw new Error("Encoder not initialized"); - } - const h = new Uint8Array(g.length + this.degree); - h.set(g); - const j = d.mod(h, this.genPoly); - const k = this.degree - j.length; - if (k > 0) { - const l = new Uint8Array(this.degree); - l.set(j, k); - return l; - } - return j; - }; - a.exports = f; - }, function (a, b, c) { - const d = c(135); - b.mul = function (f, g) { - const h = new Uint8Array(f.length + g.length - 1); - for (let j = 0; j < f.length; j++) { - for (let k = 0; k < g.length; k++) { - h[j + k] ^= d.mul(f[j], g[k]); - } - } - return h; - }; - b.mod = function (f, g) { - let h = new Uint8Array(f); - for (; h.length - g.length >= 0;) { - const j = h[0]; - for (let l = 0; l < g.length; l++) { - h[l] ^= d.mul(g[l], j); - } - let k = 0; - for (; k < h.length && 0 === h[k];) { - k++; - } - h = h.slice(k); - } - return h; - }; - b.generateECPolynomial = function (f) { - let g = new Uint8Array([1]); - for (let h = 0; h < f; h++) { - g = b.mul(g, new Uint8Array([1, d.exp(h)])); - } - return g; - }; - }, function (a, b) { - const c = new Uint8Array(512); - const d = new Uint8Array(256); - !function () { - let f = 1; - for (let g = 0; g < 255; g++) { - c[g] = f; - d[f] = g; - f <<= 1; - 256 & f && (f ^= 285); - } - for (let h = 255; h < 512; h++) { - c[h] = c[h - 255]; - } - }(); - b.log = function (f) { - if (f < 1) { - throw new Error("log(" + f + ")"); - } - return d[f]; - }; - b.exp = function (f) { - return c[f]; - }; - b.mul = function (f, g) { - return 0 === f || 0 === g ? 0 : c[d[f] + d[g]]; - }; - }, function (b, d, f) { - const g = f(35); - const h = f(79); - const j = f(67); - const k = f(36); - const m = f(80); - const p = g.getBCHDigit(7973); - function q(w, x) { - return k.getCharCountIndicator(w, x) + 4; - } - function v(w, x) { - let y = 0; - w.forEach(function (z) { - const A = q(z.mode, x); - y += A + z.getBitsLength(); - }); - return y; - } - d.from = function (w, x) { - return m.isValid(w) ? parseInt(w, 10) : x; - }; - d.getCapacity = function (w, x, y) { - if (!m.isValid(w)) { - throw new Error("Invalid QR Code version"); - } - undefined === y && (y = k.BYTE); - const z = 8 * (g.getSymbolTotalCodewords(w) - h.getTotalCodewordsCount(w, x)); - if (y === k.MIXED) { - return z; - } - const A = z - q(y, w); - switch (y) { - case k.NUMERIC: - return Math.floor(A / 10 * 3); - case k.ALPHANUMERIC: - return Math.floor(A / 11 * 2); - case k.KANJI: - return Math.floor(A / 13); - case k.BYTE: - default: - return Math.floor(A / 8); - } - }; - d.getBestVersionForData = function (w, x) { - let y; - const z = j.from(x, j.M); - if (Array.isArray(w)) { - if (w.length > 1) { - return function (A, B) { - for (let C = 1; C <= 40; C++) { - if (v(A, C) <= d.getCapacity(C, B, k.MIXED)) { - return C; - } - } - }(w, z); - } - if (0 === w.length) { - return 1; - } - y = w[0]; - } else { - y = w; - } - return function (A, B, C) { - for (let D = 1; D <= 40; D++) { - if (B <= d.getCapacity(D, C, A)) { - return D; - } - } - }(y.mode, y.getLength(), z); - }; - d.getEncodedBits = function (w) { - if (!m.isValid(w) || w < 7) { - throw new Error("Invalid QR Code version"); - } - let x = w << 12; - for (; g.getBCHDigit(x) - p >= 0;) { - x ^= 7973 << g.getBCHDigit(x) - p; - } - return w << 12 | x; - }; - }, function (a, b, c) { - const d = c(35); - const f = d.getBCHDigit(1335); - b.getEncodedBits = function (g, h) { - const j = g.bit << 3 | h; - let k = j << 10; - for (; d.getBCHDigit(k) - f >= 0;) { - k ^= 1335 << d.getBCHDigit(k) - f; - } - return 21522 ^ (j << 10 | k); - }; - }, function (b, g, j) { - const k = j(36); - const m = j(139); - const q = j(140); - const w = j(141); - const x = j(143); - const y = j(81); - const z = j(35); - const A = j(144); - function B(G) { - return unescape(encodeURIComponent(G)).length; - } - function C(G, H, I) { - const J = []; - let K; - for (; null !== (K = G.exec(I));) { - J.push({ - data: K[0], - index: K.index, - mode: H, - length: K[0].length - }); - } - return J; - } - function D(G) { - const H = C(y.NUMERIC, k.NUMERIC, G); - const I = C(y.ALPHANUMERIC, k.ALPHANUMERIC, G); - let J; - let K; - z.isKanjiModeEnabled() ? (J = C(y.BYTE, k.BYTE, G), K = C(y.KANJI, k.KANJI, G)) : (J = C(y.BYTE_KANJI, k.BYTE, G), K = []); - return H.concat(I, J, K).sort(function (L, M) { - return L.index - M.index; - }).map(function (L) { - return { - data: L.data, - mode: L.mode, - length: L.length - }; - }); - } - function E(G, H) { - switch (H) { - case k.NUMERIC: - return m.getBitsLength(G); - case k.ALPHANUMERIC: - return q.getBitsLength(G); - case k.KANJI: - return x.getBitsLength(G); - case k.BYTE: - return w.getBitsLength(G); - } - } - function F(G, H) { - let I; - const J = k.getBestModeForData(G); - if (I = k.from(H, J), I !== k.BYTE && I.bit < J.bit) { - throw new Error("\"" + G + "\" cannot be encoded with mode " + k.toString(I) + ".\n Suggested mode is: " + k.toString(J)); - } - switch (I !== k.KANJI || z.isKanjiModeEnabled() || (I = k.BYTE), I) { - case k.NUMERIC: - return new m(G); - case k.ALPHANUMERIC: - return new q(G); - case k.KANJI: - return new x(G); - case k.BYTE: - return new w(G); - } - } - g.fromArray = function (G) { - return G.reduce(function (H, I) { - "string" == typeof I ? H.push(F(I, null)) : I.data && H.push(F(I.data, I.mode)); - return H; - }, []); - }; - g.fromString = function (G, H) { - const I = function (L, M) { - const N = {}; - const O = { - start: {} - }; - let P = ["start"]; - for (let Q = 0; Q < L.length; Q++) { - const R = L[Q]; - const S = []; - for (let T = 0; T < R.length; T++) { - const U = R[T]; - const V = "" + Q + T; - S.push(V); - N[V] = { - node: U, - lastCount: 0 - }; - O[V] = {}; - for (let W = 0; W < P.length; W++) { - const X = P[W]; - N[X] && N[X].node.mode === U.mode ? (O[X][V] = E(N[X].lastCount + U.length, U.mode) - E(N[X].lastCount, U.mode), N[X].lastCount += U.length) : (N[X] && (N[X].lastCount = U.length), O[X][V] = E(U.length, U.mode) + 4 + k.getCharCountIndicator(U.mode, M)); - } - } - P = S; - } - for (let Y = 0; Y < P.length; Y++) { - O[P[Y]].end = 0; - } - return { - map: O, - table: N - }; - }(function (L) { - const M = []; - for (let N = 0; N < L.length; N++) { - const O = L[N]; - switch (O.mode) { - case k.NUMERIC: - M.push([O, { - data: O.data, - mode: k.ALPHANUMERIC, - length: O.length - }, { - data: O.data, - mode: k.BYTE, - length: O.length - }]); - break; - case k.ALPHANUMERIC: - M.push([O, { - data: O.data, - mode: k.BYTE, - length: O.length - }]); - break; - case k.KANJI: - M.push([O, { - data: O.data, - mode: k.BYTE, - length: B(O.data) - }]); - break; - case k.BYTE: - M.push([{ - data: O.data, - mode: k.BYTE, - length: B(O.data) - }]); - } - } - return M; - }(D(G, z.isKanjiModeEnabled())), H); - const J = A.find_path(I.map, "start", "end"); - const K = []; - for (let L = 1; L < J.length - 1; L++) { - K.push(I.table[J[L]].node); - } - return g.fromArray(function (M) { - return M.reduce(function (N, O) { - const P = N.length - 1 >= 0 ? N[N.length - 1] : null; - return P && P.mode === O.mode ? (N[N.length - 1].data += O.data, N) : (N.push(O), N); - }, []); - }(K)); - }; - g.rawSplit = function (G) { - return g.fromArray(D(G, z.isKanjiModeEnabled())); - }; - }, function (a, b, c) { - const d = c(36); - function f(g) { - this.mode = d.NUMERIC; - this.data = g.toString(); - } - f.getBitsLength = function (g) { - return 10 * Math.floor(g / 3) + (g % 3 ? g % 3 * 3 + 1 : 0); - }; - f.prototype.getLength = function () { - return this.data.length; - }; - f.prototype.getBitsLength = function () { - return f.getBitsLength(this.data.length); - }; - f.prototype.write = function (g) { - let h; - let j; - let k; - for (h = 0; h + 3 <= this.data.length; h += 3) { - j = this.data.substr(h, 3); - k = parseInt(j, 10); - g.put(k, 10); - } - const l = this.data.length - h; - l > 0 && (j = this.data.substr(h), k = parseInt(j, 10), g.put(k, 3 * l + 1)); - }; - a.exports = f; - }, function (a, b, c) { - const d = c(36); - const f = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", " ", "$", "%", "*", "+", "-", ".", "/", ":"]; - function g(h) { - this.mode = d.ALPHANUMERIC; - this.data = h; - } - g.getBitsLength = function (h) { - return 11 * Math.floor(h / 2) + h % 2 * 6; - }; - g.prototype.getLength = function () { - return this.data.length; - }; - g.prototype.getBitsLength = function () { - return g.getBitsLength(this.data.length); - }; - g.prototype.write = function (h) { - let j; - for (j = 0; j + 2 <= this.data.length; j += 2) { - let k = 45 * f.indexOf(this.data[j]); - k += f.indexOf(this.data[j + 1]); - h.put(k, 11); - } - this.data.length % 2 && h.put(f.indexOf(this.data[j]), 6); - }; - a.exports = g; - }, function (a, b, c) { - const d = c(142); - const f = c(36); - function g(h) { - this.mode = f.BYTE; - "string" == typeof h && (h = d(h)); - this.data = new Uint8Array(h); - } - g.getBitsLength = function (h) { - return 8 * h; - }; - g.prototype.getLength = function () { - return this.data.length; - }; - g.prototype.getBitsLength = function () { - return g.getBitsLength(this.data.length); - }; - g.prototype.write = function (h) { - for (let j = 0, k = this.data.length; j < k; j++) { - h.put(this.data[j], 8); - } - }; - a.exports = g; - }, function (a, b, c) { - "use strict"; - - a.exports = function (d) { - for (var f = [], g = d.length, h = 0; h < g; h++) { - var j = d.charCodeAt(h); - if (j >= 55296 && j <= 56319 && g > h + 1) { - var k = d.charCodeAt(h + 1); - k >= 56320 && k <= 57343 && (j = 1024 * (j - 55296) + k - 56320 + 65536, h += 1); - } - j < 128 ? f.push(j) : j < 2048 ? (f.push(j >> 6 | 192), f.push(63 & j | 128)) : j < 55296 || j >= 57344 && j < 65536 ? (f.push(j >> 12 | 224), f.push(j >> 6 & 63 | 128), f.push(63 & j | 128)) : j >= 65536 && j <= 1114111 ? (f.push(j >> 18 | 240), f.push(j >> 12 & 63 | 128), f.push(j >> 6 & 63 | 128), f.push(63 & j | 128)) : f.push(239, 191, 189); - } - return new Uint8Array(f).buffer; - }; - }, function (a, b, c) { - const d = c(36); - const f = c(35); - function g(h) { - this.mode = d.KANJI; - this.data = h; - } - g.getBitsLength = function (h) { - return 13 * h; - }; - g.prototype.getLength = function () { - return this.data.length; - }; - g.prototype.getBitsLength = function () { - return g.getBitsLength(this.data.length); - }; - g.prototype.write = function (h) { - let j; - for (j = 0; j < this.data.length; j++) { - let k = f.toSJIS(this.data[j]); - if (k >= 33088 && k <= 40956) { - k -= 33088; - } else { - if (!(k >= 57408 && k <= 60351)) { - throw new Error("Invalid SJIS character: " + this.data[j] + "\nMake sure your charset is UTF-8"); - } - k -= 49472; - } - k = 192 * (k >>> 8 & 255) + (255 & k); - h.put(k, 13); - } - }; - a.exports = g; - }, function (a, b, c) { - "use strict"; - - var d = { - single_source_shortest_paths: function (g, j, k) { - var m = {}; - var p = { - j: 0 - }; - var q; - var w; - var x; - var y; - var z; - var A; - var B; - var C = d.PriorityQueue.make(); - for (C.push(j, 0); !C.empty();) { - for (x in w = (q = C.pop()).value, y = q.cost, z = g[w] || {}) z.hasOwnProperty(x) && (A = y + z[x], B = p[x], (undefined === p[x] || B > A) && (p[x] = A, C.push(x, A), m[x] = w)); - } - if (undefined !== k && undefined === p[k]) { - var D = ["Could not find a path from ", j, " to ", k, "."].join(""); - throw new Error(D); - } - return m; - }, - extract_shortest_path_from_predecessor_list: function (f, g) { - for (var h = [], i = g; i;) { - h.push(i); - f[i]; - i = f[i]; - } - h.reverse(); - return h; - }, - find_path: function (f, g, h) { - var j = d.single_source_shortest_paths(f, g, h); - return d.extract_shortest_path_from_predecessor_list(j, h); - }, - PriorityQueue: { - make: function (f) { - var g; - var h = d.PriorityQueue; - var j = {}; - for (g in f = f || {}, h) h.hasOwnProperty(g) && (j[g] = h[g]); - j.queue = []; - j.sorter = f.sorter || h.default_sorter; - return j; + console[_0x7f43ad(351)](_0x7f43ad(270)); + const _0x5b6239 = await fetch(CAPTCHA_CONFIG[_0x7f43ad(311)], { + "method": _0x7f43ad(249), + "headers": { + "Content-Type": _0x7f43ad(289) }, - default_sorter: function (f, g) { - return f.cost - g.cost; - }, - push: function (f, g) { - var h = { - value: f, - cost: g - }; - this.queue.push(h); - this.queue.sort(this.sorter); - }, - pop: function () { - return this.queue.shift(); - }, - empty: function () { - return 0 === this.queue.length; - } - } - }; - a.exports = d; - }, function (a, b, c) { - const d = c(82); - b.render = function (f, g, h) { - let j = h; - let k = g; - undefined !== j || g && g.getContext || (j = g, g = undefined); - g || (k = function () { - try { - return document.createElement("canvas"); - } catch (u) { - throw new Error("You need to specify a canvas element"); - } - }()); - j = d.getOptions(j); - const m = d.getImageWidth(f.modules.size, j); - const p = k.getContext("2d"); - const q = p.createImageData(m, m); - d.qrToImageData(q.data, f, j); - (function (u, v, w) { - u.clearRect(0, 0, v.width, v.height); - v.style || (v.style = {}); - v.height = w; - v.width = w; - v.style.height = w + "px"; - v.style.width = w + "px"; - })(p, k, m); - p.putImageData(q, 0, 0); - return k; - }; - b.renderToDataURL = function (f, g, h) { - let j = h; - undefined !== j || g && g.getContext || (j = g, g = undefined); - j || (j = {}); - const k = b.render(f, g, j); - const l = j.type || "image/png"; - const m = j.rendererOpts || {}; - return k.toDataURL(l, m.quality); - }; - }, function (a, b, c) { - const d = c(82); - function f(h, j) { - const k = h.a / 255; - const l = j + "=\"" + h.hex + "\""; - return k < 1 ? l + " " + j + "-opacity=\"" + k.toFixed(2).slice(1) + "\"" : l; - } - function g(h, j, k) { - let l = h + j; - undefined !== k && (l += " " + k); - return l; - } - b.render = function (j, k, m) { - const p = d.getOptions(k); - const q = j.modules.size; - const v = j.modules.data; - const w = q + 2 * p.margin; - const x = p.color.light.a ? "" : ""; - const y = " 0 && J > 0 && B[I - 1] || (E += G ? g("M", J + D, 0.5 + K + D) : g("m", F, 0), F = 0, G = false), J + 1 < C && B[I + 1] || (E += g("h", H), H = 0)) : F++; - } - return E; - }(v, q, p.margin) + "\"/>"; - const z = "viewBox=\"0 0 " + w + " " + w + "\""; - const A = "" + x + y + "\n"; - "function" == typeof m && m(null, A); - return A; - }; - }, function (a, b, c) {}, function (a, b, c) {}, function (a, b, c) {}, function (a, b) {}, function (a, b, c) { - var d; - a.exports = (d = c(17), function () { - if ("function" == typeof ArrayBuffer) { - var f = d.lib.WordArray; - var g = f.init; - (f.init = function (h) { - if (h instanceof ArrayBuffer && (h = new Uint8Array(h)), (h instanceof Int8Array || "undefined" != typeof Uint8ClampedArray && h instanceof Uint8ClampedArray || h instanceof Int16Array || h instanceof Uint16Array || h instanceof Int32Array || h instanceof Uint32Array || h instanceof Float32Array || h instanceof Float64Array) && (h = new Uint8Array(h.buffer, h.byteOffset, h.byteLength)), h instanceof Uint8Array) { - for (var j = h.byteLength, k = [], l = 0; l < j; l++) { - k[l >>> 2] |= h[l] << 24 - l % 4 * 8; - } - g.call(this, k, j); - } else { - g.apply(this, arguments); - } - }).prototype = f; - } - }(), d.lib.WordArray); - }, function (a, b, c) { - var d; - a.exports = (d = c(17), function () { - var f = d; - var g = f.lib.WordArray; - var h = f.enc; - function j(k) { - return k << 8 & 4278255360 | k >>> 8 & 16711935; - } - h.Utf16 = h.Utf16BE = { - stringify: function (k) { - for (var l = k.words, m = k.sigBytes, p = [], q = 0; q < m; q += 2) { - var s = l[q >>> 2] >>> 16 - q % 4 * 8 & 65535; - p.push(String.fromCharCode(s)); - } - return p.join(""); - }, - parse: function (k) { - for (var l = k.length, m = [], o = 0; o < l; o++) { - m[o >>> 1] |= k.charCodeAt(o) << 16 - o % 2 * 16; - } - return g.create(m, 2 * l); - } - }; - h.Utf16LE = { - stringify: function (k) { - for (var l = k.words, m = k.sigBytes, p = [], q = 0; q < m; q += 2) { - var s = j(l[q >>> 2] >>> 16 - q % 4 * 8 & 65535); - p.push(String.fromCharCode(s)); - } - return p.join(""); - }, - parse: function (k) { - for (var l = k.length, m = [], p = 0; p < l; p++) { - m[p >>> 1] |= j(k.charCodeAt(p) << 16 - p % 2 * 16); - } - return g.create(m, 2 * l); - } - }; - }(), d.enc.Utf16); - }, function (a, b, c) { - var d; - var f; - var g; - a.exports = (g = c(17), f = (d = g).lib.WordArray, d.enc.Base64url = { - stringify: function (h, j) { - undefined === j && (j = true); - var k = h.words; - var m = h.sigBytes; - var p = j ? this._safe_map : this._map; - h.clamp(); - for (var q = [], u = 0; u < m; u += 3) { - for (var v = (k[u >>> 2] >>> 24 - u % 4 * 8 & 255) << 16 | (k[u + 1 >>> 2] >>> 24 - (u + 1) % 4 * 8 & 255) << 8 | k[u + 2 >>> 2] >>> 24 - (u + 2) % 4 * 8 & 255, w = 0; w < 4 && u + 0.75 * w < m; w++) { - q.push(p.charAt(v >>> 6 * (3 - w) & 63)); - } - } - var x = p.charAt(64); - if (x) { - for (; q.length % 4;) { - q.push(x); - } - } - return q.join(""); - }, - parse: function (h, j) { - undefined === j && (j = true); - var k = h.length; - var m = j ? this._safe_map : this._map; - var p = this._reverseMap; - if (!p) { - p = this._reverseMap = []; - for (var q = 0; q < m.length; q++) { - p[m.charCodeAt(q)] = q; - } - } - var u = m.charAt(64); - if (u) { - var v = h.indexOf(u); - -1 !== v && (k = v); - } - return function (w, x, y) { - for (var z = [], A = 0, B = 0; B < x; B++) { - if (B % 4) { - var C = y[w.charCodeAt(B - 1)] << B % 4 * 2; - var D = y[w.charCodeAt(B)] >>> 6 - B % 4 * 2; - var E = C | D; - z[A >>> 2] |= E << 24 - A % 4 * 8; - A++; - } - } - return f.create(z, A); - }(h, k, p); - }, - _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", - _safe_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_" - }, g.enc.Base64url); - }, function (b, c, d) { - var f; - var g; - var h; - var j; - var k; - var m; - b.exports = (m = d(17), d(68), g = (f = m).lib.WordArray, h = f.algo, j = h.SHA256, k = h.SHA224 = j.extend({ - _doReset: function () { - this._hash = new g.init([3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]); - }, - _doFinalize: function () { - var p = j._doFinalize.call(this); - p.sigBytes -= 4; - return p; - } - }), f.SHA224 = j._createHelper(k), f.HmacSHA224 = j._createHmacHelper(k), m.SHA224); - }, function (b, d, f) { - var g; - var h; - var j; - var k; - var m; - var p; - var q; - var v; - b.exports = (v = f(17), f(60), f(84), h = (g = v).x64, j = h.Word, k = h.WordArray, m = g.algo, p = m.SHA512, q = m.SHA384 = p.extend({ - _doReset: function () { - this._hash = new k.init([new j.init(3418070365, 3238371032), new j.init(1654270250, 914150663), new j.init(2438529370, 812702999), new j.init(355462360, 4144912697), new j.init(1731405415, 4290775857), new j.init(2394180231, 1750603025), new j.init(3675008525, 1694076839), new j.init(1203062813, 3204075428)]); - }, - _doFinalize: function () { - var w = p._doFinalize.call(this); - w.sigBytes -= 16; - return w; - } - }), g.SHA384 = p._createHelper(q), g.HmacSHA384 = p._createHmacHelper(q), v.SHA384); - }, function (a, b, c) { - var d; - a.exports = (d = c(17), c(60), function (g) { - var j = d; - var k = j.lib; - var m = k.WordArray; - var p = k.Hasher; - var q = j.x64.Word; - var v = j.algo; - var w = []; - var x = []; - var y = []; - !function () { - for (var B = 1, C = 0, D = 0; D < 24; D++) { - w[B + 5 * C] = (D + 1) * (D + 2) / 2 % 64; - var E = (2 * B + 3 * C) % 5; - B = C % 5; - C = E; - } - for (B = 0; B < 5; B++) { - for (C = 0; C < 5; C++) { - x[B + 5 * C] = C + (2 * B + 3 * C) % 5 * 5; - } - } - for (var F = 1, G = 0; G < 24; G++) { - for (var H = 0, I = 0, J = 0; J < 7; J++) { - if (1 & F) { - var K = (1 << J) - 1; - K < 32 ? I ^= 1 << K : H ^= 1 << K - 32; - } - 128 & F ? F = F << 1 ^ 113 : F <<= 1; - } - y[G] = q.create(H, I); - } - }(); - var z = []; - !function () { - for (var B = 0; B < 25; B++) { - z[B] = q.create(); - } - }(); - v.SHA3 = p.extend({ - cfg: p.cfg.extend({ - outputLength: 512 - }), - _doReset: function () { - for (var B = this._state = [], C = 0; C < 25; C++) { - B[C] = new q.init(); - } - this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32; - }, - _doProcessBlock: function (B, F) { - for (var G = this._state, H = this.blockSize / 2, I = 0; I < H; I++) { - var J = B[F + 2 * I]; - var K = B[F + 2 * I + 1]; - J = 16711935 & (J << 8 | J >>> 24) | 4278255360 & (J << 24 | J >>> 8); - K = 16711935 & (K << 8 | K >>> 24) | 4278255360 & (K << 24 | K >>> 8); - (a6 = G[I]).high ^= K; - a6.low ^= J; - } - for (var L = 0; L < 24; L++) { - for (var N = 0; N < 5; N++) { - for (var P = 0, Q = 0, T = 0; T < 5; T++) { - P ^= (a6 = G[N + 5 * T]).high; - Q ^= a6.low; - } - var U = z[N]; - U.high = P; - U.low = Q; - } - for (N = 0; N < 5; N++) { - var V = z[(N + 4) % 5]; - var W = z[(N + 1) % 5]; - var X = W.high; - var Y = W.low; - for (P = V.high ^ (X << 1 | Y >>> 31), Q = V.low ^ (Y << 1 | X >>> 31), T = 0; T < 5; T++) { - (a6 = G[N + 5 * T]).high ^= P; - a6.low ^= Q; - } - } - for (var Z = 1; Z < 25; Z++) { - var a0 = (a6 = G[Z]).high; - var a1 = a6.low; - var a2 = w[Z]; - a2 < 32 ? (P = a0 << a2 | a1 >>> 32 - a2, Q = a1 << a2 | a0 >>> 32 - a2) : (P = a1 << a2 - 32 | a0 >>> 64 - a2, Q = a0 << a2 - 32 | a1 >>> 64 - a2); - var a3 = z[x[Z]]; - a3.high = P; - a3.low = Q; - } - var a4 = z[0]; - var a5 = G[0]; - for (a4.high = a5.high, a4.low = a5.low, N = 0; N < 5; N++) { - for (T = 0; T < 5; T++) { - var a6 = G[Z = N + 5 * T]; - var a7 = z[Z]; - var a8 = z[(N + 1) % 5 + 5 * T]; - var a9 = z[(N + 2) % 5 + 5 * T]; - a6.high = a7.high ^ ~a8.high & a9.high; - a6.low = a7.low ^ ~a8.low & a9.low; - } - } - a6 = G[0]; - var aa = y[L]; - a6.high ^= aa.high; - a6.low ^= aa.low; - } - }, - _doFinalize: function () { - var B = this._data; - var C = B.words; - this._nDataBytes; - var D = 8 * B.sigBytes; - var E = 32 * this.blockSize; - C[D >>> 5] |= 1 << 24 - D % 32; - C[(g.ceil((D + 1) / E) * E >>> 5) - 1] |= 128; - B.sigBytes = 4 * C.length; - this._process(); - for (var F = this._state, G = this.cfg.outputLength / 8, H = G / 8, I = [], J = 0; J < H; J++) { - var K = F[J]; - var L = K.high; - var M = K.low; - L = 16711935 & (L << 8 | L >>> 24) | 4278255360 & (L << 24 | L >>> 8); - M = 16711935 & (M << 8 | M >>> 24) | 4278255360 & (M << 24 | M >>> 8); - I.push(M); - I.push(L); - } - return new m.init(I, G); - }, - clone: function () { - for (var B = p.clone.call(this), C = B._state = this._state.slice(0), D = 0; D < 25; D++) { - C[D] = C[D].clone(); - } - return B; - } - }); - var A = v.SHA3; - j.SHA3 = p._createHelper(A); - j.HmacSHA3 = p._createHmacHelper(A); - }(Math), d.SHA3); - }, function (a, b, c) { - var d; - a.exports = (d = c(17), function (j) { - var k = d; - var q = k.lib; - var w = q.WordArray; - var x = q.Hasher; - var z = k.algo; - var A = w.create([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]); - var B = w.create([5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]); - var C = w.create([11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]); - var D = w.create([8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]); - var E = w.create([0, 1518500249, 1859775393, 2400959708, 2840853838]); - var F = w.create([1352829926, 1548603684, 1836072691, 2053994217, 0]); - z.RIPEMD160 = x.extend({ - _doReset: function () { - this._hash = w.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]); - }, - _doProcessBlock: function (N, Q) { - for (var U = 0; U < 16; U++) { - var V = Q + U; - var W = N[V]; - N[V] = 16711935 & (W << 8 | W >>> 24) | 4278255360 & (W << 24 | W >>> 8); - } - var X; - var Y; - var Z; - var a0; - var a1; - var a2; - var a3; - var a4; - var a5; - var a6; - var a7; - var a8 = this._hash.words; - var a9 = E.words; - var aa = F.words; - var ab = A.words; - var ac = B.words; - var ad = C.words; - var ae = D.words; - for (a2 = X = a8[0], a3 = Y = a8[1], a4 = Z = a8[2], a5 = a0 = a8[3], a6 = a1 = a8[4], U = 0; U < 80; U += 1) { - a7 = X + N[Q + ab[U]] | 0; - a7 += U < 16 ? H(Y, Z, a0) + a9[0] : U < 32 ? I(Y, Z, a0) + a9[1] : U < 48 ? J(Y, Z, a0) + a9[2] : U < 64 ? K(Y, Z, a0) + a9[3] : L(Y, Z, a0) + a9[4]; - a7 = (a7 = M(a7 |= 0, ad[U])) + a1 | 0; - X = a1; - a1 = a0; - a0 = M(Z, 10); - Z = Y; - Y = a7; - a7 = a2 + N[Q + ac[U]] | 0; - a7 += U < 16 ? L(a3, a4, a5) + aa[0] : U < 32 ? K(a3, a4, a5) + aa[1] : U < 48 ? J(a3, a4, a5) + aa[2] : U < 64 ? I(a3, a4, a5) + aa[3] : H(a3, a4, a5) + aa[4]; - a7 = (a7 = M(a7 |= 0, ae[U])) + a6 | 0; - a2 = a6; - a6 = a5; - a5 = M(a4, 10); - a4 = a3; - a3 = a7; - } - a7 = a8[1] + Z + a5 | 0; - a8[1] = a8[2] + a0 + a6 | 0; - a8[2] = a8[3] + a1 + a2 | 0; - a8[3] = a8[4] + X + a3 | 0; - a8[4] = a8[0] + Y + a4 | 0; - a8[0] = a7; - }, - _doFinalize: function () { - var N = this._data; - var O = N.words; - var P = 8 * this._nDataBytes; - var Q = 8 * N.sigBytes; - O[Q >>> 5] |= 128 << 24 - Q % 32; - O[14 + (Q + 64 >>> 9 << 4)] = 16711935 & (P << 8 | P >>> 24) | 4278255360 & (P << 24 | P >>> 8); - N.sigBytes = 4 * (O.length + 1); - this._process(); - for (var R = this._hash, S = R.words, T = 0; T < 5; T++) { - var U = S[T]; - S[T] = 16711935 & (U << 8 | U >>> 24) | 4278255360 & (U << 24 | U >>> 8); - } - return R; - }, - clone: function () { - var N = x.clone.call(this); - N._hash = this._hash.clone(); - return N; - } - }); - var G = z.RIPEMD160; - function H(N, O, P) { - return N ^ O ^ P; - } - function I(N, O, P) { - return N & O | ~N & P; - } - function J(N, O, P) { - return (N | ~O) ^ P; - } - function K(N, O, P) { - return N & P | O & ~P; - } - function L(N, O, P) { - return N ^ (O | ~P); - } - function M(N, O) { - return N << O | N >>> 32 - O; - } - k.RIPEMD160 = x._createHelper(G); - k.HmacRIPEMD160 = x._createHmacHelper(G); - }(Math), d.RIPEMD160); - }, function (b, d, g) { - var h; - var j; - var k; - var m; - var p; - var q; - var v; - var w; - var x; - b.exports = (x = g(17), g(68), g(69), j = (h = x).lib, k = j.Base, m = j.WordArray, p = h.algo, q = p.SHA256, v = p.HMAC, w = p.PBKDF2 = k.extend({ - cfg: k.extend({ - keySize: 4, - hasher: q, - iterations: 250000 + "body": JSON[_0x7f43ad(319)](_0x4cd79a) }), - init: function (y) { - this.cfg = this.cfg.extend(y); - }, - compute: function (z, A) { - for (var B = this.cfg, C = v.create(B.hasher, z), D = m.create(), E = m.create([1]), F = D.words, G = E.words, H = B.keySize, I = B.iterations; F.length < H;) { - var J = C.update(A).finalize(E); - C.reset(); - for (var K = J.words, L = K.length, M = J, N = 1; N < I; N++) { - M = C.finalize(M); - C.reset(); - for (var O = M.words, P = 0; P < L; P++) { - K[P] ^= O[P]; - } - } - D.concat(J); - G[0]++; - } - D.sigBytes = 4 * H; - return D; + _0x148ac5 = await _0x5b6239[_0x7f43ad(410)](); + _0x148ac5[_0x7f43ad(360)] ? (console[_0x7f43ad(351)](_0x7f43ad(441) + _0x148ac5[_0x7f43ad(369)][_0x7f43ad(435)]), window[_0x7f43ad(353)] = _0x148ac5[_0x7f43ad(369)].id, await simulateType1Clicks(_0x385327, _0x148ac5[_0x7f43ad(369)].result)) : console[_0x7f43ad(412)]("[类型1处理] 识别失败: " + _0x148ac5[_0x7f43ad(377)]); + } catch (_0x13d1b6) { + console.error(_0x7f43ad(316), _0x13d1b6); + } finally { + window[_0x7f43ad(343)] = false; + window[_0x7f43ad(380)] = Date[_0x7f43ad(276)](); + } +} +async function solveType2Captcha() { + const _0x1b2ed8 = _0x30b83a; + window[_0x1b2ed8(343)] = true; + console[_0x1b2ed8(351)]("[类型2处理] 开始处理多图验证码"); + try { + { + (await isSpinnerVisible()) && (console.log(_0x1b2ed8(300)), await waitForSpinnerToDisappear()); + await refreshType2Captcha(); + (await isSpinnerVisible()) && (console[_0x1b2ed8(351)]("[类型2处理] 刷新后检测到加载动画,等待加载完成..."), await waitForSpinnerToDisappear()); + const _0x28008f = document.querySelector(_0x1b2ed8(358)); + if (!_0x28008f) { + console.error(_0x1b2ed8(291)); + return; } - }), h.PBKDF2 = function (y, z, A) { - return w.create(A).compute(y, z); - }, x.PBKDF2); - }, function (a, b, c) { - var d; - a.exports = (d = c(17), c(25), d.mode.CFB = function () { - var f = d.lib.BlockCipherMode.extend(); - function g(h, j, k, l) { - var m; - var p = this._iv; - p ? (m = p.slice(0), this._iv = undefined) : m = this._prevBlock; - l.encryptBlock(m, 0); - for (var q = 0; q < k; q++) { - h[j + q] ^= m[q]; - } + const _0x44178b = Array[_0x1b2ed8(373)](_0x28008f[_0x1b2ed8(409)](_0x1b2ed8(422))); + if (_0x44178b.length < 2) { + console[_0x1b2ed8(412)](_0x1b2ed8(257), _0x44178b[_0x1b2ed8(368)]); + return; } - f.Encryptor = f.extend({ - processBlock: function (h, j) { - var k = this._cipher; - var l = k.blockSize; - g.call(this, h, j, l, k); - this._prevBlock = h.slice(j, j + l); - } - }); - f.Decryptor = f.extend({ - processBlock: function (h, j) { - var k = this._cipher; - var l = k.blockSize; - var m = h.slice(j, j + l); - g.call(this, h, j, l, k); - this._prevBlock = m; - } - }); - return f; - }(), d.mode.CFB); - }, function (a, b, c) { - var d; - var f; - var g; - a.exports = (g = c(17), c(25), g.mode.CTR = (d = g.lib.BlockCipherMode.extend(), f = d.Encryptor = d.extend({ - processBlock: function (h, j) { - var k = this._cipher; - var l = k.blockSize; - var m = this._iv; - var p = this._counter; - m && (p = this._counter = m.slice(0), this._iv = undefined); - var q = p.slice(0); - k.encryptBlock(q, 0); - p[l - 1] = p[l - 1] + 1 | 0; - for (var u = 0; u < l; u++) { - h[j + u] ^= q[u]; - } + for (const _0x1b1009 of _0x44178b) { + await waitForImageLoad(_0x1b1009); } - }), d.Decryptor = f, d), g.mode.CTR); - }, function (a, b, c) { - var d; - a.exports = (d = c(17), c(25), d.mode.CTRGladman = function () { - var f = d.lib.BlockCipherMode.extend(); - function g(i) { - if (255 == (i >> 24 & 255)) { - var j = i >> 16 & 255; - var k = i >> 8 & 255; - var l = 255 & i; - 255 === j ? (j = 0, 255 === k ? (k = 0, 255 === l ? l = 0 : ++l) : ++k) : ++j; - i = 0; - i += j << 16; - i += k << 8; - i += l; - } else { - i += 16777216; - } - return i; + await new Promise(_0x19df62 => setTimeout(_0x19df62, 1500)); + const _0x4d0cec = document[_0x1b2ed8(354)](_0x1b2ed8(430)) || document[_0x1b2ed8(354)]("div._3S0ERvXx.VGrF02Bc"); + if (!_0x4d0cec) { + console[_0x1b2ed8(412)](_0x1b2ed8(379)); + return; } - f.Encryptor = f.extend({ - processBlock: function (j, k) { - var m = this._cipher; - var p = m.blockSize; - var q = this._iv; - var u = this._counter; - q && (u = this._counter = q.slice(0), this._iv = undefined); - (function (x) { - 0 === (x[0] = g(x[0])) && (x[1] = g(x[1])); - })(u); - var v = u.slice(0); - m.encryptBlock(v, 0); - for (var w = 0; w < p; w++) { - j[k + w] ^= v[w]; - } - } - }); - var h = f.Encryptor; - f.Decryptor = h; - return f; - }(), d.mode.CTRGladman); - }, function (a, b, c) { - var d; - var f; - var g; - a.exports = (g = c(17), c(25), g.mode.OFB = (d = g.lib.BlockCipherMode.extend(), f = d.Encryptor = d.extend({ - processBlock: function (h, j) { - var k = this._cipher; - var l = k.blockSize; - var m = this._iv; - var p = this._keystream; - m && (p = this._keystream = m.slice(0), this._iv = undefined); - k.encryptBlock(p, 0); - for (var q = 0; q < l; q++) { - h[j + q] ^= p[q]; - } - } - }), d.Decryptor = f, d), g.mode.OFB); - }, function (a, b, c) { - var d; - var f; - a.exports = (f = c(17), c(25), f.mode.ECB = ((d = f.lib.BlockCipherMode.extend()).Encryptor = d.extend({ - processBlock: function (g, h) { - this._cipher.encryptBlock(g, h); - } - }), d.Decryptor = d.extend({ - processBlock: function (g, h) { - this._cipher.decryptBlock(g, h); - } - }), d), f.mode.ECB); - }, function (a, b, c) { - var d; - a.exports = (d = c(17), c(25), d.pad.AnsiX923 = { - pad: function (f, g) { - var h = f.sigBytes; - var j = 4 * g; - var k = j - h % j; - var l = h + k - 1; - f.clamp(); - f.words[l >>> 2] |= k << 24 - l % 4 * 8; - f.sigBytes += k; - }, - unpad: function (f) { - var g = 255 & f.words[f.sigBytes - 1 >>> 2]; - f.sigBytes -= g; - } - }, d.pad.Ansix923); - }, function (a, b, c) { - var d; - a.exports = (d = c(17), c(25), d.pad.Iso10126 = { - pad: function (f, g) { - var h = 4 * g; - var j = h - f.sigBytes % h; - f.concat(d.lib.WordArray.random(j - 1)).concat(d.lib.WordArray.create([j << 24], 1)); - }, - unpad: function (f) { - var g = 255 & f.words[f.sigBytes - 1 >>> 2]; - f.sigBytes -= g; - } - }, d.pad.Iso10126); - }, function (a, b, c) { - var d; - a.exports = (d = c(17), c(25), d.pad.Iso97971 = { - pad: function (f, g) { - f.concat(d.lib.WordArray.create([2147483648], 1)); - d.pad.ZeroPadding.pad(f, g); - }, - unpad: function (f) { - d.pad.ZeroPadding.unpad(f); - f.sigBytes--; - } - }, d.pad.Iso97971); - }, function (a, b, c) { - var d; - a.exports = (d = c(17), c(25), d.pad.ZeroPadding = { - pad: function (f, g) { - var h = 4 * g; - f.clamp(); - f.sigBytes += h - (f.sigBytes % h || h); - }, - unpad: function (f) { - var g = f.words; - var h = f.sigBytes - 1; - for (h = f.sigBytes - 1; h >= 0; h--) { - if (g[h >>> 2] >>> 24 - h % 4 * 8 & 255) { - f.sigBytes = h + 1; - break; - } - } - } - }, d.pad.ZeroPadding); - }, function (a, b, c) { - var d; - a.exports = (d = c(17), c(25), d.pad.NoPadding = { - pad: function () {}, - unpad: function () {} - }, d.pad.NoPadding); - }, function (b, c, d) { - var f; - var g; - var h; - var j; - b.exports = (j = d(17), d(25), g = (f = j).lib.CipherParams, h = f.enc.Hex, f.format.Hex = { - stringify: function (k) { - return k.ciphertext.toString(h); - }, - parse: function (k) { - var l = h.parse(k); - return g.create({ - ciphertext: l - }); - } - }, j.format.Hex); - }, function (a, b, c) { - var d; - a.exports = (d = c(17), c(37), c(38), c(33), c(25), function () { - var g = d; - var j = g.lib.BlockCipher; - var k = g.algo; - var m = []; - var q = []; - var w = []; - var x = []; - var y = []; - var z = []; - var A = []; - var B = []; - var C = []; - var D = []; - !function () { - for (var G = [], H = 0; H < 256; H++) { - G[H] = H < 128 ? H << 1 : H << 1 ^ 283; - } - var I = 0; - var J = 0; - for (H = 0; H < 256; H++) { - var K = J ^ J << 1 ^ J << 2 ^ J << 3 ^ J << 4; - K = K >>> 8 ^ 255 & K ^ 99; - m[I] = K; - q[K] = I; - var L = G[I]; - var M = G[L]; - var N = G[M]; - var O = 257 * G[K] ^ 16843008 * K; - w[I] = O << 24 | O >>> 8; - x[I] = O << 16 | O >>> 16; - y[I] = O << 8 | O >>> 24; - z[I] = O; - O = 16843009 * N ^ 65537 * M ^ 257 * L ^ 16843008 * I; - A[K] = O << 24 | O >>> 8; - B[K] = O << 16 | O >>> 16; - C[K] = O << 8 | O >>> 24; - D[K] = O; - I ? (I = L ^ G[G[G[N ^ L]]], J ^= G[G[J]]) : I = J = 1; - } - }(); - var E = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54]; - k.AES = j.extend({ - _doReset: function () { - if (!this._nRounds || this._keyPriorReset !== this._key) { - for (var G = this._keyPriorReset = this._key, H = G.words, I = G.sigBytes / 4, J = 4 * ((this._nRounds = I + 6) + 1), K = this._keySchedule = [], L = 0; L < J; L++) { - L < I ? K[L] = H[L] : (O = K[L - 1], L % I ? I > 6 && L % I == 4 && (O = m[O >>> 24] << 24 | m[O >>> 16 & 255] << 16 | m[O >>> 8 & 255] << 8 | m[255 & O]) : (O = m[(O = O << 8 | O >>> 24) >>> 24] << 24 | m[O >>> 16 & 255] << 16 | m[O >>> 8 & 255] << 8 | m[255 & O], O ^= E[L / I | 0] << 24), K[L] = K[L - I] ^ O); - } - for (var M = this._invKeySchedule = [], N = 0; N < J; N++) { - if (L = J - N, N % 4) { - var O = K[L]; - } else { - O = K[L - 4]; - } - M[N] = N < 4 || L <= 4 ? O : A[m[O >>> 24]] ^ B[m[O >>> 16 & 255]] ^ C[m[O >>> 8 & 255]] ^ D[m[255 & O]]; - } - } - }, - encryptBlock: function (G, H) { - this._doCryptBlock(G, H, this._keySchedule, w, x, y, z, m); - }, - decryptBlock: function (G, H) { - var I = G[H + 1]; - G[H + 1] = G[H + 3]; - G[H + 3] = I; - this._doCryptBlock(G, H, this._invKeySchedule, A, B, C, D, q); - I = G[H + 1]; - G[H + 1] = G[H + 3]; - G[H + 3] = I; - }, - _doCryptBlock: function (G, H, I, J, K, L, M, N) { - for (var O = this._nRounds, P = G[H] ^ I[0], Q = G[H + 1] ^ I[1], R = G[H + 2] ^ I[2], S = G[H + 3] ^ I[3], T = 4, U = 1; U < O; U++) { - var V = J[P >>> 24] ^ K[Q >>> 16 & 255] ^ L[R >>> 8 & 255] ^ M[255 & S] ^ I[T++]; - var W = J[Q >>> 24] ^ K[R >>> 16 & 255] ^ L[S >>> 8 & 255] ^ M[255 & P] ^ I[T++]; - var X = J[R >>> 24] ^ K[S >>> 16 & 255] ^ L[P >>> 8 & 255] ^ M[255 & Q] ^ I[T++]; - var Y = J[S >>> 24] ^ K[P >>> 16 & 255] ^ L[Q >>> 8 & 255] ^ M[255 & R] ^ I[T++]; - P = V; - Q = W; - R = X; - S = Y; - } - V = (N[P >>> 24] << 24 | N[Q >>> 16 & 255] << 16 | N[R >>> 8 & 255] << 8 | N[255 & S]) ^ I[T++]; - W = (N[Q >>> 24] << 24 | N[R >>> 16 & 255] << 16 | N[S >>> 8 & 255] << 8 | N[255 & P]) ^ I[T++]; - X = (N[R >>> 24] << 24 | N[S >>> 16 & 255] << 16 | N[P >>> 8 & 255] << 8 | N[255 & Q]) ^ I[T++]; - Y = (N[S >>> 24] << 24 | N[P >>> 16 & 255] << 16 | N[Q >>> 8 & 255] << 8 | N[255 & R]) ^ I[T++]; - G[H] = V; - G[H + 1] = W; - G[H + 2] = X; - G[H + 3] = Y; - }, - keySize: 8 - }); - var F = k.AES; - g.AES = j._createHelper(F); - }(), d.AES); - }, function (a, b, c) { - var d; - a.exports = (d = c(17), c(37), c(38), c(33), c(25), function () { - var g = d; - var j = g.lib; - var k = j.WordArray; - var m = j.BlockCipher; - var p = g.algo; - var q = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4]; - var w = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32]; - var x = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28]; - var y = [{ - 0: 8421888, - 268435456: 32768, - 536870912: 8421378, - 805306368: 2, - 1073741824: 512, - 1342177280: 8421890, - 1610612736: 8389122, - 1879048192: 8388608, - 2147483648: 514, - 2415919104: 8389120, - 2684354560: 33280, - 2952790016: 8421376, - 3221225472: 32770, - 3489660928: 8388610, - 3758096384: 0, - 4026531840: 33282, - 134217728: 0, - 402653184: 8421890, - 671088640: 33282, - 939524096: 32768, - 1207959552: 8421888, - 1476395008: 512, - 1744830464: 8421378, - 2013265920: 2, - 2281701376: 8389120, - 2550136832: 33280, - 2818572288: 8421376, - 3087007744: 8389122, - 3355443200: 8388610, - 3623878656: 32770, - 3892314112: 514, - 4160749568: 8388608, - 1: 32768, - 268435457: 2, - 536870913: 8421888, - 805306369: 8388608, - 1073741825: 8421378, - 1342177281: 33280, - 1610612737: 512, - 1879048193: 8389122, - 2147483649: 8421890, - 2415919105: 8421376, - 2684354561: 8388610, - 2952790017: 33282, - 3221225473: 514, - 3489660929: 8389120, - 3758096385: 32770, - 4026531841: 0, - 134217729: 8421890, - 402653185: 8421376, - 671088641: 8388608, - 939524097: 512, - 1207959553: 32768, - 1476395009: 8388610, - 1744830465: 2, - 2013265921: 33282, - 2281701377: 32770, - 2550136833: 8389122, - 2818572289: 514, - 3087007745: 8421888, - 3355443201: 8389120, - 3623878657: 0, - 3892314113: 33280, - 4160749569: 8421378 - }, { - 0: 1074282512, - 16777216: 16384, - 33554432: 524288, - 50331648: 1074266128, - 67108864: 1073741840, - 83886080: 1074282496, - 100663296: 1073758208, - 117440512: 16, - 134217728: 540672, - 150994944: 1073758224, - 167772160: 1073741824, - 184549376: 540688, - 201326592: 524304, - 218103808: 0, - 234881024: 16400, - 251658240: 1074266112, - 8388608: 1073758208, - 25165824: 540688, - 41943040: 16, - 58720256: 1073758224, - 75497472: 1074282512, - 92274688: 1073741824, - 109051904: 524288, - 125829120: 1074266128, - 142606336: 524304, - 159383552: 0, - 176160768: 16384, - 192937984: 1074266112, - 209715200: 1073741840, - 226492416: 540672, - 243269632: 1074282496, - 260046848: 16400, - 268435456: 0, - 285212672: 1074266128, - 301989888: 1073758224, - 318767104: 1074282496, - 335544320: 1074266112, - 352321536: 16, - 369098752: 540688, - 385875968: 16384, - 402653184: 16400, - 419430400: 524288, - 436207616: 524304, - 452984832: 1073741840, - 469762048: 540672, - 486539264: 1073758208, - 503316480: 1073741824, - 520093696: 1074282512, - 276824064: 540688, - 293601280: 524288, - 310378496: 1074266112, - 327155712: 16384, - 343932928: 1073758208, - 360710144: 1074282512, - 377487360: 16, - 394264576: 1073741824, - 411041792: 1074282496, - 427819008: 1073741840, - 444596224: 1073758224, - 461373440: 524304, - 478150656: 0, - 494927872: 16400, - 511705088: 1074266128, - 528482304: 540672 - }, { - 0: 260, - 1048576: 0, - 2097152: 67109120, - 3145728: 65796, - 4194304: 65540, - 5242880: 67108868, - 6291456: 67174660, - 7340032: 67174400, - 8388608: 67108864, - 9437184: 67174656, - 10485760: 65792, - 11534336: 67174404, - 12582912: 67109124, - 13631488: 65536, - 14680064: 4, - 15728640: 256, - 524288: 67174656, - 1572864: 67174404, - 2621440: 0, - 3670016: 67109120, - 4718592: 67108868, - 5767168: 65536, - 6815744: 65540, - 7864320: 260, - 8912896: 4, - 9961472: 256, - 11010048: 67174400, - 12058624: 65796, - 13107200: 65792, - 14155776: 67109124, - 15204352: 67174660, - 16252928: 67108864, - 16777216: 67174656, - 17825792: 65540, - 18874368: 65536, - 19922944: 67109120, - 20971520: 256, - 22020096: 67174660, - 23068672: 67108868, - 24117248: 0, - 25165824: 67109124, - 26214400: 67108864, - 27262976: 4, - 28311552: 65792, - 29360128: 67174400, - 30408704: 260, - 31457280: 65796, - 32505856: 67174404, - 17301504: 67108864, - 18350080: 260, - 19398656: 67174656, - 20447232: 0, - 21495808: 65540, - 22544384: 67109120, - 23592960: 256, - 24641536: 67174404, - 25690112: 65536, - 26738688: 67174660, - 27787264: 65796, - 28835840: 67108868, - 29884416: 67109124, - 30932992: 67174400, - 31981568: 4, - 33030144: 65792 - }, { - 0: 2151682048, - 65536: 2147487808, - 131072: 4198464, - 196608: 2151677952, - 262144: 0, - 327680: 4198400, - 393216: 2147483712, - 458752: 4194368, - 524288: 2147483648, - 589824: 4194304, - 655360: 64, - 720896: 2147487744, - 786432: 2151678016, - 851968: 4160, - 917504: 4096, - 983040: 2151682112, - 32768: 2147487808, - 98304: 64, - 163840: 2151678016, - 229376: 2147487744, - 294912: 4198400, - 360448: 2151682112, - 425984: 0, - 491520: 2151677952, - 557056: 4096, - 622592: 2151682048, - 688128: 4194304, - 753664: 4160, - 819200: 2147483648, - 884736: 4194368, - 950272: 4198464, - 1015808: 2147483712, - 1048576: 4194368, - 1114112: 4198400, - 1179648: 2147483712, - 1245184: 0, - 1310720: 4160, - 1376256: 2151678016, - 1441792: 2151682048, - 1507328: 2147487808, - 1572864: 2151682112, - 1638400: 2147483648, - 1703936: 2151677952, - 1769472: 4198464, - 1835008: 2147487744, - 1900544: 4194304, - 1966080: 64, - 2031616: 4096, - 1081344: 2151677952, - 1146880: 2151682112, - 1212416: 0, - 1277952: 4198400, - 1343488: 4194368, - 1409024: 2147483648, - 1474560: 2147487808, - 1540096: 64, - 1605632: 2147483712, - 1671168: 4096, - 1736704: 2147487744, - 1802240: 2151678016, - 1867776: 4160, - 1933312: 2151682048, - 1998848: 4194304, - 2064384: 4198464 - }, { - 0: 128, - 4096: 17039360, - 8192: 262144, - 12288: 536870912, - 16384: 537133184, - 20480: 16777344, - 24576: 553648256, - 28672: 262272, - 32768: 16777216, - 36864: 537133056, - 40960: 536871040, - 45056: 553910400, - 49152: 553910272, - 53248: 0, - 57344: 17039488, - 61440: 553648128, - 2048: 17039488, - 6144: 553648256, - 10240: 128, - 14336: 17039360, - 18432: 262144, - 22528: 537133184, - 26624: 553910272, - 30720: 536870912, - 34816: 537133056, - 38912: 0, - 43008: 553910400, - 47104: 16777344, - 51200: 536871040, - 55296: 553648128, - 59392: 16777216, - 63488: 262272, - 65536: 262144, - 69632: 128, - 73728: 536870912, - 77824: 553648256, - 81920: 16777344, - 86016: 553910272, - 90112: 537133184, - 94208: 16777216, - 98304: 553910400, - 102400: 553648128, - 106496: 17039360, - 110592: 537133056, - 114688: 262272, - 118784: 536871040, - 122880: 0, - 126976: 17039488, - 67584: 553648256, - 71680: 16777216, - 75776: 17039360, - 79872: 537133184, - 83968: 536870912, - 88064: 17039488, - 92160: 128, - 96256: 553910272, - 100352: 262272, - 104448: 553910400, - 108544: 0, - 112640: 553648128, - 116736: 16777344, - 120832: 262144, - 124928: 537133056, - 129024: 536871040 - }, { - 0: 268435464, - 256: 8192, - 512: 270532608, - 768: 270540808, - 1024: 268443648, - 1280: 2097152, - 1536: 2097160, - 1792: 268435456, - 2048: 0, - 2304: 268443656, - 2560: 2105344, - 2816: 8, - 3072: 270532616, - 3328: 2105352, - 3584: 8200, - 3840: 270540800, - 128: 270532608, - 384: 270540808, - 640: 8, - 896: 2097152, - 1152: 2105352, - 1408: 268435464, - 1664: 268443648, - 1920: 8200, - 2176: 2097160, - 2432: 8192, - 2688: 268443656, - 2944: 270532616, - 3200: 0, - 3456: 270540800, - 3712: 2105344, - 3968: 268435456, - 4096: 268443648, - 4352: 270532616, - 4608: 270540808, - 4864: 8200, - 5120: 2097152, - 5376: 268435456, - 5632: 268435464, - 5888: 2105344, - 6144: 2105352, - 6400: 0, - 6656: 8, - 6912: 270532608, - 7168: 8192, - 7424: 268443656, - 7680: 270540800, - 7936: 2097160, - 4224: 8, - 4480: 2105344, - 4736: 2097152, - 4992: 268435464, - 5248: 268443648, - 5504: 8200, - 5760: 270540808, - 6016: 270532608, - 6272: 270540800, - 6528: 270532616, - 6784: 8192, - 7040: 2105352, - 7296: 2097160, - 7552: 0, - 7808: 268435456, - 8064: 268443656 - }, { - 0: 1048576, - 16: 33555457, - 32: 1024, - 48: 1049601, - 64: 34604033, - 80: 0, - 96: 1, - 112: 34603009, - 128: 33555456, - 144: 1048577, - 160: 33554433, - 176: 34604032, - 192: 34603008, - 208: 1025, - 224: 1049600, - 240: 33554432, - 8: 34603009, - 24: 0, - 40: 33555457, - 56: 34604032, - 72: 1048576, - 88: 33554433, - 104: 33554432, - 120: 1025, - 136: 1049601, - 152: 33555456, - 168: 34603008, - 184: 1048577, - 200: 1024, - 216: 34604033, - 232: 1, - 248: 1049600, - 256: 33554432, - 272: 1048576, - 288: 33555457, - 304: 34603009, - 320: 1048577, - 336: 33555456, - 352: 34604032, - 368: 1049601, - 384: 1025, - 400: 34604033, - 416: 1049600, - 432: 1, - 448: 0, - 464: 34603008, - 480: 33554433, - 496: 1024, - 264: 1049600, - 280: 33555457, - 296: 34603009, - 312: 1, - 328: 33554432, - 344: 1048576, - 360: 1025, - 376: 34604032, - 392: 33554433, - 408: 34603008, - 424: 0, - 440: 34604033, - 456: 1049601, - 472: 1024, - 488: 33555456, - 504: 1048577 - }, { - 0: 134219808, - 1: 131072, - 2: 134217728, - 3: 32, - 4: 131104, - 5: 134350880, - 6: 134350848, - 7: 2048, - 8: 134348800, - 9: 134219776, - 10: 133120, - 11: 134348832, - 12: 2080, - 13: 0, - 14: 134217760, - 15: 133152, - 2147483648: 2048, - 2147483649: 134350880, - 2147483650: 134219808, - 2147483651: 134217728, - 2147483652: 134348800, - 2147483653: 133120, - 2147483654: 133152, - 2147483655: 32, - 2147483656: 134217760, - 2147483657: 2080, - 2147483658: 131104, - 2147483659: 134350848, - 2147483660: 0, - 2147483661: 134348832, - 2147483662: 134219776, - 2147483663: 131072, - 16: 133152, - 17: 134350848, - 18: 32, - 19: 2048, - 20: 134219776, - 21: 134217760, - 22: 134348832, - 23: 131072, - 24: 0, - 25: 131104, - 26: 134348800, - 27: 134219808, - 28: 134350880, - 29: 133120, - 30: 2080, - 31: 134217728, - 2147483664: 131072, - 2147483665: 2048, - 2147483666: 134348832, - 2147483667: 133152, - 2147483668: 32, - 2147483669: 134348800, - 2147483670: 134217728, - 2147483671: 134219808, - 2147483672: 134350880, - 2147483673: 134217760, - 2147483674: 134219776, - 2147483675: 0, - 2147483676: 133120, - 2147483677: 2080, - 2147483678: 131104, - 2147483679: 134350848 - }]; - var z = [4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679]; - p.DES = m.extend({ - _doReset: function () { - for (var E = this._key.words, F = [], G = 0; G < 56; G++) { - var H = q[G] - 1; - F[G] = E[H >>> 5] >>> 31 - H % 32 & 1; - } - for (var I = this._subKeys = [], J = 0; J < 16; J++) { - I[J] = []; - var K = I[J]; - var L = x[J]; - for (G = 0; G < 24; G++) { - K[G / 6 | 0] |= F[(w[G] - 1 + L) % 28] << 31 - G % 6; - K[4 + (G / 6 | 0)] |= F[28 + (w[G + 24] - 1 + L) % 28] << 31 - G % 6; - } - for (K[0] = K[0] << 1 | K[0] >>> 31, G = 1; G < 7; G++) { - K[G] = K[G] >>> 4 * (G - 1) + 3; - } - K[7] = K[7] << 5 | K[7] >>> 27; - } - this._invSubKeys = []; - var M = this._invSubKeys; - for (G = 0; G < 16; G++) { - M[G] = I[15 - G]; - } - }, - encryptBlock: function (E, F) { - this._doCryptBlock(E, F, this._subKeys); - }, - decryptBlock: function (E, F) { - this._doCryptBlock(E, F, this._invSubKeys); - }, - _doCryptBlock: function (E, F, G) { - this._lBlock = E[F]; - this._rBlock = E[F + 1]; - B.call(this, 4, 252645135); - B.call(this, 16, 65535); - C.call(this, 2, 858993459); - C.call(this, 8, 16711935); - B.call(this, 1, 1431655765); - for (var H = 0; H < 16; H++) { - for (var I = G[H], J = this._lBlock, K = this._rBlock, L = 0, M = 0; M < 8; M++) { - L |= y[M][((K ^ I[M]) & z[M]) >>> 0]; - } - this._lBlock = K; - this._rBlock = J ^ L; - } - var N = this._lBlock; - this._lBlock = this._rBlock; - this._rBlock = N; - B.call(this, 1, 1431655765); - C.call(this, 8, 16711935); - C.call(this, 2, 858993459); - B.call(this, 16, 65535); - B.call(this, 4, 252645135); - E[F] = this._lBlock; - E[F + 1] = this._rBlock; - }, - keySize: 2, - ivSize: 2, - blockSize: 2 - }); - var A = p.DES; - function B(E, F) { - var G = (this._lBlock >>> E ^ this._rBlock) & F; - this._rBlock ^= G; - this._lBlock ^= G << E; - } - function C(E, F) { - var G = (this._rBlock >>> E ^ this._lBlock) & F; - this._lBlock ^= G; - this._rBlock ^= G << E; - } - g.DES = m._createHelper(A); - p.TripleDES = m.extend({ - _doReset: function () { - var E = this._key.words; - if (2 !== E.length && 4 !== E.length && E.length < 6) { - throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192."); - } - var F = E.slice(0, 2); - var G = E.length < 4 ? E.slice(0, 2) : E.slice(2, 4); - var H = E.length < 6 ? E.slice(0, 2) : E.slice(4, 6); - this._des1 = A.createEncryptor(k.create(F)); - this._des2 = A.createEncryptor(k.create(G)); - this._des3 = A.createEncryptor(k.create(H)); - }, - encryptBlock: function (E, F) { - this._des1.encryptBlock(E, F); - this._des2.decryptBlock(E, F); - this._des3.encryptBlock(E, F); - }, - decryptBlock: function (E, F) { - this._des3.decryptBlock(E, F); - this._des2.encryptBlock(E, F); - this._des1.decryptBlock(E, F); - }, - keySize: 6, - ivSize: 2, - blockSize: 2 - }); - var D = p.TripleDES; - g.TripleDES = m._createHelper(D); - }(), d.TripleDES); - }, function (a, b, c) { - var d; - a.exports = (d = c(17), c(37), c(38), c(33), c(25), function () { - var f = d; - var g = f.lib.StreamCipher; - var h = f.algo; - h.RC4 = g.extend({ - _doReset: function () { - for (var m = this._key, p = m.words, q = m.sigBytes, u = this._S = [], v = 0; v < 256; v++) { - u[v] = v; - } - v = 0; - for (var w = 0; v < 256; v++) { - var x = v % q; - var y = p[x >>> 2] >>> 24 - x % 4 * 8 & 255; - w = (w + u[v] + y) % 256; - var z = u[v]; - u[v] = u[w]; - u[w] = z; - } - this._i = this._j = 0; - }, - _doProcessBlock: function (m, p) { - m[p] ^= k.call(this); - }, - keySize: 8, - ivSize: 0 - }); - var j = h.RC4; - function k() { - for (var m = this._S, p = this._i, q = this._j, s = 0, u = 0; u < 4; u++) { - q = (q + m[p = (p + 1) % 256]) % 256; - var v = m[p]; - m[p] = m[q]; - m[q] = v; - s |= m[(m[p] + m[q]) % 256] << 24 - 8 * u; - } - this._i = p; - this._j = q; - return s; - } - f.RC4 = g._createHelper(j); - h.RC4Drop = j.extend({ - cfg: j.cfg.extend({ - drop: 192 - }), - _doReset: function () { - j._doReset.call(this); - for (var m = this.cfg.drop; m > 0; m--) { - k.call(this); - } - } - }); - var l = h.RC4Drop; - f.RC4Drop = g._createHelper(l); - }(), d.RC4); - }, function (a, b, c) { - var d; - a.exports = (d = c(17), c(37), c(38), c(33), c(25), function () { - var f = d; - var g = f.lib.StreamCipher; - var h = f.algo; - var j = []; - var k = []; - var m = []; - h.Rabbit = g.extend({ - _doReset: function () { - for (var v = this._key.words, w = this.cfg.iv, x = 0; x < 4; x++) { - v[x] = 16711935 & (v[x] << 8 | v[x] >>> 24) | 4278255360 & (v[x] << 24 | v[x] >>> 8); - } - this._X = [v[0], v[3] << 16 | v[2] >>> 16, v[1], v[0] << 16 | v[3] >>> 16, v[2], v[1] << 16 | v[0] >>> 16, v[3], v[2] << 16 | v[1] >>> 16]; - var y = this._X; - this._C = [v[2] << 16 | v[2] >>> 16, 4294901760 & v[0] | 65535 & v[1], v[3] << 16 | v[3] >>> 16, 4294901760 & v[1] | 65535 & v[2], v[0] << 16 | v[0] >>> 16, 4294901760 & v[2] | 65535 & v[3], v[1] << 16 | v[1] >>> 16, 4294901760 & v[3] | 65535 & v[0]]; - var z = this._C; - for (this._b = 0, x = 0; x < 4; x++) { - q.call(this); - } - for (x = 0; x < 8; x++) { - z[x] ^= y[x + 4 & 7]; - } - if (w) { - var A = w.words; - var B = A[0]; - var C = A[1]; - var D = 16711935 & (B << 8 | B >>> 24) | 4278255360 & (B << 24 | B >>> 8); - var E = 16711935 & (C << 8 | C >>> 24) | 4278255360 & (C << 24 | C >>> 8); - var F = D >>> 16 | 4294901760 & E; - var G = E << 16 | 65535 & D; - for (z[0] ^= D, z[1] ^= F, z[2] ^= E, z[3] ^= G, z[4] ^= D, z[5] ^= F, z[6] ^= E, z[7] ^= G, x = 0; x < 4; x++) { - q.call(this); - } - } - }, - _doProcessBlock: function (u, v) { - var w = this._X; - q.call(this); - j[0] = w[0] ^ w[5] >>> 16 ^ w[3] << 16; - j[1] = w[2] ^ w[7] >>> 16 ^ w[5] << 16; - j[2] = w[4] ^ w[1] >>> 16 ^ w[7] << 16; - j[3] = w[6] ^ w[3] >>> 16 ^ w[1] << 16; - for (var x = 0; x < 4; x++) { - j[x] = 16711935 & (j[x] << 8 | j[x] >>> 24) | 4278255360 & (j[x] << 24 | j[x] >>> 8); - u[v + x] ^= j[x]; - } - }, - blockSize: 4, - ivSize: 2 - }); - var p = h.Rabbit; - function q() { - for (var u = this._X, v = this._C, w = 0; w < 8; w++) { - k[w] = v[w]; - } - for (v[0] = v[0] + 1295307597 + this._b | 0, v[1] = v[1] + 3545052371 + (v[0] >>> 0 < k[0] >>> 0 ? 1 : 0) | 0, v[2] = v[2] + 886263092 + (v[1] >>> 0 < k[1] >>> 0 ? 1 : 0) | 0, v[3] = v[3] + 1295307597 + (v[2] >>> 0 < k[2] >>> 0 ? 1 : 0) | 0, v[4] = v[4] + 3545052371 + (v[3] >>> 0 < k[3] >>> 0 ? 1 : 0) | 0, v[5] = v[5] + 886263092 + (v[4] >>> 0 < k[4] >>> 0 ? 1 : 0) | 0, v[6] = v[6] + 1295307597 + (v[5] >>> 0 < k[5] >>> 0 ? 1 : 0) | 0, v[7] = v[7] + 3545052371 + (v[6] >>> 0 < k[6] >>> 0 ? 1 : 0) | 0, this._b = v[7] >>> 0 < k[7] >>> 0 ? 1 : 0, w = 0; w < 8; w++) { - var x = u[w] + v[w]; - var y = 65535 & x; - var z = x >>> 16; - var A = ((y * y >>> 17) + y * z >>> 15) + z * z; - var B = ((4294901760 & x) * x | 0) + ((65535 & x) * x | 0); - m[w] = A ^ B; - } - u[0] = m[0] + (m[7] << 16 | m[7] >>> 16) + (m[6] << 16 | m[6] >>> 16) | 0; - u[1] = m[1] + (m[0] << 8 | m[0] >>> 24) + m[7] | 0; - u[2] = m[2] + (m[1] << 16 | m[1] >>> 16) + (m[0] << 16 | m[0] >>> 16) | 0; - u[3] = m[3] + (m[2] << 8 | m[2] >>> 24) + m[1] | 0; - u[4] = m[4] + (m[3] << 16 | m[3] >>> 16) + (m[2] << 16 | m[2] >>> 16) | 0; - u[5] = m[5] + (m[4] << 8 | m[4] >>> 24) + m[3] | 0; - u[6] = m[6] + (m[5] << 16 | m[5] >>> 16) + (m[4] << 16 | m[4] >>> 16) | 0; - u[7] = m[7] + (m[6] << 8 | m[6] >>> 24) + m[5] | 0; - } - f.Rabbit = g._createHelper(p); - }(), d.Rabbit); - }, function (a, b, c) { - var d; - a.exports = (d = c(17), c(37), c(38), c(33), c(25), function () { - var f = d; - var g = f.lib.StreamCipher; - var h = f.algo; - var j = []; - var k = []; - var m = []; - h.RabbitLegacy = g.extend({ - _doReset: function () { - var v = this._key.words; - var w = this.cfg.iv; - this._X = [v[0], v[3] << 16 | v[2] >>> 16, v[1], v[0] << 16 | v[3] >>> 16, v[2], v[1] << 16 | v[0] >>> 16, v[3], v[2] << 16 | v[1] >>> 16]; - var x = this._X; - this._C = [v[2] << 16 | v[2] >>> 16, 4294901760 & v[0] | 65535 & v[1], v[3] << 16 | v[3] >>> 16, 4294901760 & v[1] | 65535 & v[2], v[0] << 16 | v[0] >>> 16, 4294901760 & v[2] | 65535 & v[3], v[1] << 16 | v[1] >>> 16, 4294901760 & v[3] | 65535 & v[0]]; - var y = this._C; - this._b = 0; - for (var z = 0; z < 4; z++) { - q.call(this); - } - for (z = 0; z < 8; z++) { - y[z] ^= x[z + 4 & 7]; - } - if (w) { - var A = w.words; - var B = A[0]; - var C = A[1]; - var D = 16711935 & (B << 8 | B >>> 24) | 4278255360 & (B << 24 | B >>> 8); - var E = 16711935 & (C << 8 | C >>> 24) | 4278255360 & (C << 24 | C >>> 8); - var F = D >>> 16 | 4294901760 & E; - var G = E << 16 | 65535 & D; - for (y[0] ^= D, y[1] ^= F, y[2] ^= E, y[3] ^= G, y[4] ^= D, y[5] ^= F, y[6] ^= E, y[7] ^= G, z = 0; z < 4; z++) { - q.call(this); - } - } - }, - _doProcessBlock: function (u, v) { - var w = this._X; - q.call(this); - j[0] = w[0] ^ w[5] >>> 16 ^ w[3] << 16; - j[1] = w[2] ^ w[7] >>> 16 ^ w[5] << 16; - j[2] = w[4] ^ w[1] >>> 16 ^ w[7] << 16; - j[3] = w[6] ^ w[3] >>> 16 ^ w[1] << 16; - for (var x = 0; x < 4; x++) { - j[x] = 16711935 & (j[x] << 8 | j[x] >>> 24) | 4278255360 & (j[x] << 24 | j[x] >>> 8); - u[v + x] ^= j[x]; - } - }, - blockSize: 4, - ivSize: 2 - }); - var p = h.RabbitLegacy; - function q() { - for (var u = this._X, v = this._C, w = 0; w < 8; w++) { - k[w] = v[w]; - } - for (v[0] = v[0] + 1295307597 + this._b | 0, v[1] = v[1] + 3545052371 + (v[0] >>> 0 < k[0] >>> 0 ? 1 : 0) | 0, v[2] = v[2] + 886263092 + (v[1] >>> 0 < k[1] >>> 0 ? 1 : 0) | 0, v[3] = v[3] + 1295307597 + (v[2] >>> 0 < k[2] >>> 0 ? 1 : 0) | 0, v[4] = v[4] + 3545052371 + (v[3] >>> 0 < k[3] >>> 0 ? 1 : 0) | 0, v[5] = v[5] + 886263092 + (v[4] >>> 0 < k[4] >>> 0 ? 1 : 0) | 0, v[6] = v[6] + 1295307597 + (v[5] >>> 0 < k[5] >>> 0 ? 1 : 0) | 0, v[7] = v[7] + 3545052371 + (v[6] >>> 0 < k[6] >>> 0 ? 1 : 0) | 0, this._b = v[7] >>> 0 < k[7] >>> 0 ? 1 : 0, w = 0; w < 8; w++) { - var x = u[w] + v[w]; - var y = 65535 & x; - var z = x >>> 16; - var A = ((y * y >>> 17) + y * z >>> 15) + z * z; - var B = ((4294901760 & x) * x | 0) + ((65535 & x) * x | 0); - m[w] = A ^ B; - } - u[0] = m[0] + (m[7] << 16 | m[7] >>> 16) + (m[6] << 16 | m[6] >>> 16) | 0; - u[1] = m[1] + (m[0] << 8 | m[0] >>> 24) + m[7] | 0; - u[2] = m[2] + (m[1] << 16 | m[1] >>> 16) + (m[0] << 16 | m[0] >>> 16) | 0; - u[3] = m[3] + (m[2] << 8 | m[2] >>> 24) + m[1] | 0; - u[4] = m[4] + (m[3] << 16 | m[3] >>> 16) + (m[2] << 16 | m[2] >>> 16) | 0; - u[5] = m[5] + (m[4] << 8 | m[4] >>> 24) + m[3] | 0; - u[6] = m[6] + (m[5] << 16 | m[5] >>> 16) + (m[4] << 16 | m[4] >>> 16) | 0; - u[7] = m[7] + (m[6] << 8 | m[6] >>> 24) + m[5] | 0; - } - f.RabbitLegacy = g._createHelper(p); - }(), d.RabbitLegacy); - }, function (a, b, c) { - var d; - a.exports = (d = c(17), c(37), c(38), c(33), c(25), function () { - var f = d; - var g = f.lib.BlockCipher; - var h = f.algo; - const j = 16; - const k = [608135816, 2242054355, 320440878, 57701188, 2752067618, 698298832, 137296536, 3964562569, 1160258022, 953160567, 3193202383, 887688300, 3232508343, 3380367581, 1065670069, 3041331479, 2450970073, 2306472731]; - const m = [[3509652390, 2564797868, 805139163, 3491422135, 3101798381, 1780907670, 3128725573, 4046225305, 614570311, 3012652279, 134345442, 2240740374, 1667834072, 1901547113, 2757295779, 4103290238, 227898511, 1921955416, 1904987480, 2182433518, 2069144605, 3260701109, 2620446009, 720527379, 3318853667, 677414384, 3393288472, 3101374703, 2390351024, 1614419982, 1822297739, 2954791486, 3608508353, 3174124327, 2024746970, 1432378464, 3864339955, 2857741204, 1464375394, 1676153920, 1439316330, 715854006, 3033291828, 289532110, 2706671279, 2087905683, 3018724369, 1668267050, 732546397, 1947742710, 3462151702, 2609353502, 2950085171, 1814351708, 2050118529, 680887927, 999245976, 1800124847, 3300911131, 1713906067, 1641548236, 4213287313, 1216130144, 1575780402, 4018429277, 3917837745, 3693486850, 3949271944, 596196993, 3549867205, 258830323, 2213823033, 772490370, 2760122372, 1774776394, 2652871518, 566650946, 4142492826, 1728879713, 2882767088, 1783734482, 3629395816, 2517608232, 2874225571, 1861159788, 326777828, 3124490320, 2130389656, 2716951837, 967770486, 1724537150, 2185432712, 2364442137, 1164943284, 2105845187, 998989502, 3765401048, 2244026483, 1075463327, 1455516326, 1322494562, 910128902, 469688178, 1117454909, 936433444, 3490320968, 3675253459, 1240580251, 122909385, 2157517691, 634681816, 4142456567, 3825094682, 3061402683, 2540495037, 79693498, 3249098678, 1084186820, 1583128258, 426386531, 1761308591, 1047286709, 322548459, 995290223, 1845252383, 2603652396, 3431023940, 2942221577, 3202600964, 3727903485, 1712269319, 422464435, 3234572375, 1170764815, 3523960633, 3117677531, 1434042557, 442511882, 3600875718, 1076654713, 1738483198, 4213154764, 2393238008, 3677496056, 1014306527, 4251020053, 793779912, 2902807211, 842905082, 4246964064, 1395751752, 1040244610, 2656851899, 3396308128, 445077038, 3742853595, 3577915638, 679411651, 2892444358, 2354009459, 1767581616, 3150600392, 3791627101, 3102740896, 284835224, 4246832056, 1258075500, 768725851, 2589189241, 3069724005, 3532540348, 1274779536, 3789419226, 2764799539, 1660621633, 3471099624, 4011903706, 913787905, 3497959166, 737222580, 2514213453, 2928710040, 3937242737, 1804850592, 3499020752, 2949064160, 2386320175, 2390070455, 2415321851, 4061277028, 2290661394, 2416832540, 1336762016, 1754252060, 3520065937, 3014181293, 791618072, 3188594551, 3933548030, 2332172193, 3852520463, 3043980520, 413987798, 3465142937, 3030929376, 4245938359, 2093235073, 3534596313, 375366246, 2157278981, 2479649556, 555357303, 3870105701, 2008414854, 3344188149, 4221384143, 3956125452, 2067696032, 3594591187, 2921233993, 2428461, 544322398, 577241275, 1471733935, 610547355, 4027169054, 1432588573, 1507829418, 2025931657, 3646575487, 545086370, 48609733, 2200306550, 1653985193, 298326376, 1316178497, 3007786442, 2064951626, 458293330, 2589141269, 3591329599, 3164325604, 727753846, 2179363840, 146436021, 1461446943, 4069977195, 705550613, 3059967265, 3887724982, 4281599278, 3313849956, 1404054877, 2845806497, 146425753, 1854211946], [1266315497, 3048417604, 3681880366, 3289982499, 2909710000, 1235738493, 2632868024, 2414719590, 3970600049, 1771706367, 1449415276, 3266420449, 422970021, 1963543593, 2690192192, 3826793022, 1062508698, 1531092325, 1804592342, 2583117782, 2714934279, 4024971509, 1294809318, 4028980673, 1289560198, 2221992742, 1669523910, 35572830, 157838143, 1052438473, 1016535060, 1802137761, 1753167236, 1386275462, 3080475397, 2857371447, 1040679964, 2145300060, 2390574316, 1461121720, 2956646967, 4031777805, 4028374788, 33600511, 2920084762, 1018524850, 629373528, 3691585981, 3515945977, 2091462646, 2486323059, 586499841, 988145025, 935516892, 3367335476, 2599673255, 2839830854, 265290510, 3972581182, 2759138881, 3795373465, 1005194799, 847297441, 406762289, 1314163512, 1332590856, 1866599683, 4127851711, 750260880, 613907577, 1450815602, 3165620655, 3734664991, 3650291728, 3012275730, 3704569646, 1427272223, 778793252, 1343938022, 2676280711, 2052605720, 1946737175, 3164576444, 3914038668, 3967478842, 3682934266, 1661551462, 3294938066, 4011595847, 840292616, 3712170807, 616741398, 312560963, 711312465, 1351876610, 322626781, 1910503582, 271666773, 2175563734, 1594956187, 70604529, 3617834859, 1007753275, 1495573769, 4069517037, 2549218298, 2663038764, 504708206, 2263041392, 3941167025, 2249088522, 1514023603, 1998579484, 1312622330, 694541497, 2582060303, 2151582166, 1382467621, 776784248, 2618340202, 3323268794, 2497899128, 2784771155, 503983604, 4076293799, 907881277, 423175695, 432175456, 1378068232, 4145222326, 3954048622, 3938656102, 3820766613, 2793130115, 2977904593, 26017576, 3274890735, 3194772133, 1700274565, 1756076034, 4006520079, 3677328699, 720338349, 1533947780, 354530856, 688349552, 3973924725, 1637815568, 332179504, 3949051286, 53804574, 2852348879, 3044236432, 1282449977, 3583942155, 3416972820, 4006381244, 1617046695, 2628476075, 3002303598, 1686838959, 431878346, 2686675385, 1700445008, 1080580658, 1009431731, 832498133, 3223435511, 2605976345, 2271191193, 2516031870, 1648197032, 4164389018, 2548247927, 300782431, 375919233, 238389289, 3353747414, 2531188641, 2019080857, 1475708069, 455242339, 2609103871, 448939670, 3451063019, 1395535956, 2413381860, 1841049896, 1491858159, 885456874, 4264095073, 4001119347, 1565136089, 3898914787, 1108368660, 540939232, 1173283510, 2745871338, 3681308437, 4207628240, 3343053890, 4016749493, 1699691293, 1103962373, 3625875870, 2256883143, 3830138730, 1031889488, 3479347698, 1535977030, 4236805024, 3251091107, 2132092099, 1774941330, 1199868427, 1452454533, 157007616, 2904115357, 342012276, 595725824, 1480756522, 206960106, 497939518, 591360097, 863170706, 2375253569, 3596610801, 1814182875, 2094937945, 3421402208, 1082520231, 3463918190, 2785509508, 435703966, 3908032597, 1641649973, 2842273706, 3305899714, 1510255612, 2148256476, 2655287854, 3276092548, 4258621189, 236887753, 3681803219, 274041037, 1734335097, 3815195456, 3317970021, 1899903192, 1026095262, 4050517792, 356393447, 2410691914, 3873677099, 3682840055], [3913112168, 2491498743, 4132185628, 2489919796, 1091903735, 1979897079, 3170134830, 3567386728, 3557303409, 857797738, 1136121015, 1342202287, 507115054, 2535736646, 337727348, 3213592640, 1301675037, 2528481711, 1895095763, 1721773893, 3216771564, 62756741, 2142006736, 835421444, 2531993523, 1442658625, 3659876326, 2882144922, 676362277, 1392781812, 170690266, 3921047035, 1759253602, 3611846912, 1745797284, 664899054, 1329594018, 3901205900, 3045908486, 2062866102, 2865634940, 3543621612, 3464012697, 1080764994, 553557557, 3656615353, 3996768171, 991055499, 499776247, 1265440854, 648242737, 3940784050, 980351604, 3713745714, 1749149687, 3396870395, 4211799374, 3640570775, 1161844396, 3125318951, 1431517754, 545492359, 4268468663, 3499529547, 1437099964, 2702547544, 3433638243, 2581715763, 2787789398, 1060185593, 1593081372, 2418618748, 4260947970, 69676912, 2159744348, 86519011, 2512459080, 3838209314, 1220612927, 3339683548, 133810670, 1090789135, 1078426020, 1569222167, 845107691, 3583754449, 4072456591, 1091646820, 628848692, 1613405280, 3757631651, 526609435, 236106946, 48312990, 2942717905, 3402727701, 1797494240, 859738849, 992217954, 4005476642, 2243076622, 3870952857, 3732016268, 765654824, 3490871365, 2511836413, 1685915746, 3888969200, 1414112111, 2273134842, 3281911079, 4080962846, 172450625, 2569994100, 980381355, 4109958455, 2819808352, 2716589560, 2568741196, 3681446669, 3329971472, 1835478071, 660984891, 3704678404, 4045999559, 3422617507, 3040415634, 1762651403, 1719377915, 3470491036, 2693910283, 3642056355, 3138596744, 1364962596, 2073328063, 1983633131, 926494387, 3423689081, 2150032023, 4096667949, 1749200295, 3328846651, 309677260, 2016342300, 1779581495, 3079819751, 111262694, 1274766160, 443224088, 298511866, 1025883608, 3806446537, 1145181785, 168956806, 3641502830, 3584813610, 1689216846, 3666258015, 3200248200, 1692713982, 2646376535, 4042768518, 1618508792, 1610833997, 3523052358, 4130873264, 2001055236, 3610705100, 2202168115, 4028541809, 2961195399, 1006657119, 2006996926, 3186142756, 1430667929, 3210227297, 1314452623, 4074634658, 4101304120, 2273951170, 1399257539, 3367210612, 3027628629, 1190975929, 2062231137, 2333990788, 2221543033, 2438960610, 1181637006, 548689776, 2362791313, 3372408396, 3104550113, 3145860560, 296247880, 1970579870, 3078560182, 3769228297, 1714227617, 3291629107, 3898220290, 166772364, 1251581989, 493813264, 448347421, 195405023, 2709975567, 677966185, 3703036547, 1463355134, 2715995803, 1338867538, 1343315457, 2802222074, 2684532164, 233230375, 2599980071, 2000651841, 3277868038, 1638401717, 4028070440, 3237316320, 6314154, 819756386, 300326615, 590932579, 1405279636, 3267499572, 3150704214, 2428286686, 3959192993, 3461946742, 1862657033, 1266418056, 963775037, 2089974820, 2263052895, 1917689273, 448879540, 3550394620, 3981727096, 150775221, 3627908307, 1303187396, 508620638, 2975983352, 2726630617, 1817252668, 1876281319, 1457606340, 908771278, 3720792119, 3617206836, 2455994898, 1729034894, 1080033504], [976866871, 3556439503, 2881648439, 1522871579, 1555064734, 1336096578, 3548522304, 2579274686, 3574697629, 3205460757, 3593280638, 3338716283, 3079412587, 564236357, 2993598910, 1781952180, 1464380207, 3163844217, 3332601554, 1699332808, 1393555694, 1183702653, 3581086237, 1288719814, 691649499, 2847557200, 2895455976, 3193889540, 2717570544, 1781354906, 1676643554, 2592534050, 3230253752, 1126444790, 2770207658, 2633158820, 2210423226, 2615765581, 2414155088, 3127139286, 673620729, 2805611233, 1269405062, 4015350505, 3341807571, 4149409754, 1057255273, 2012875353, 2162469141, 2276492801, 2601117357, 993977747, 3918593370, 2654263191, 753973209, 36408145, 2530585658, 25011837, 3520020182, 2088578344, 530523599, 2918365339, 1524020338, 1518925132, 3760827505, 3759777254, 1202760957, 3985898139, 3906192525, 674977740, 4174734889, 2031300136, 2019492241, 3983892565, 4153806404, 3822280332, 352677332, 2297720250, 60907813, 90501309, 3286998549, 1016092578, 2535922412, 2839152426, 457141659, 509813237, 4120667899, 652014361, 1966332200, 2975202805, 55981186, 2327461051, 676427537, 3255491064, 2882294119, 3433927263, 1307055953, 942726286, 933058658, 2468411793, 3933900994, 4215176142, 1361170020, 2001714738, 2830558078, 3274259782, 1222529897, 1679025792, 2729314320, 3714953764, 1770335741, 151462246, 3013232138, 1682292957, 1483529935, 471910574, 1539241949, 458788160, 3436315007, 1807016891, 3718408830, 978976581, 1043663428, 3165965781, 1927990952, 4200891579, 2372276910, 3208408903, 3533431907, 1412390302, 2931980059, 4132332400, 1947078029, 3881505623, 4168226417, 2941484381, 1077988104, 1320477388, 886195818, 18198404, 3786409000, 2509781533, 112762804, 3463356488, 1866414978, 891333506, 18488651, 661792760, 1628790961, 3885187036, 3141171499, 876946877, 2693282273, 1372485963, 791857591, 2686433993, 3759982718, 3167212022, 3472953795, 2716379847, 445679433, 3561995674, 3504004811, 3574258232, 54117162, 3331405415, 2381918588, 3769707343, 4154350007, 1140177722, 4074052095, 668550556, 3214352940, 367459370, 261225585, 2610173221, 4209349473, 3468074219, 3265815641, 314222801, 3066103646, 3808782860, 282218597, 3406013506, 3773591054, 379116347, 1285071038, 846784868, 2669647154, 3771962079, 3550491691, 2305946142, 453669953, 1268987020, 3317592352, 3279303384, 3744833421, 2610507566, 3859509063, 266596637, 3847019092, 517658769, 3462560207, 3443424879, 370717030, 4247526661, 2224018117, 4143653529, 4112773975, 2788324899, 2477274417, 1456262402, 2901442914, 1517677493, 1846949527, 2295493580, 3734397586, 2176403920, 1280348187, 1908823572, 3871786941, 846861322, 1172426758, 3287448474, 3383383037, 1655181056, 3139813346, 901632758, 1897031941, 2986607138, 3066810236, 3447102507, 1393639104, 373351379, 950779232, 625454576, 3124240540, 4148612726, 2007998917, 544563296, 2244738638, 2330496472, 2058025392, 1291430526, 424198748, 50039436, 29584100, 3605783033, 2429876329, 2791104160, 1057563949, 3255363231, 3075367218, 3463963227, 1469046755, 985887462]]; - var p = { - pbox: [], - sbox: [] - }; - function q(x, y) { - let z = y >> 24 & 255; - let A = y >> 16 & 255; - let B = y >> 8 & 255; - let C = 255 & y; - let D = x.sbox[0][z] + x.sbox[1][A]; - D ^= x.sbox[2][B]; - D += x.sbox[3][C]; - return D; - } - function v(x, y, z) { - let A; - let B = y; - let C = z; - for (let D = 0; D < j; ++D) { - B ^= x.pbox[D]; - C = q(x, B) ^ C; - A = B; - B = C; - C = A; - } - A = B; - B = C; - C = A; - C ^= x.pbox[j]; - B ^= x.pbox[17]; - return { - left: B, - right: C - }; - } - h.Blowfish = g.extend({ - _doReset: function () { - if (this._keyPriorReset !== this._key) { - this._keyPriorReset = this._key; - var x = this._keyPriorReset; - var y = x.words; - var z = x.sigBytes / 4; - !function (A, B, C) { - for (let H = 0; H < 4; H++) { - A.sbox[H] = []; - for (let I = 0; I < 256; I++) { - A.sbox[H][I] = m[H][I]; - } - } - let D = 0; - for (let J = 0; J < 18; J++) { - A.pbox[J] = k[J] ^ B[D]; - D++; - D >= C && (D = 0); - } - let E = 0; - let F = 0; - let G = 0; - for (let K = 0; K < 18; K += 2) { - G = v(A, E, F); - E = G.left; - F = G.right; - A.pbox[K] = E; - A.pbox[K + 1] = F; - } - for (let L = 0; L < 4; L++) { - for (let M = 0; M < 256; M += 2) { - G = v(A, E, F); - E = G.left; - F = G.right; - A.sbox[L][M] = E; - A.sbox[L][M + 1] = F; - } - } - }(p, y, z); - } - }, - encryptBlock: function (x, y) { - var z = v(p, x[y], x[y + 1]); - x[y] = z.left; - x[y + 1] = z.right; - }, - decryptBlock: function (x, y) { - var z = function (A, B, C) { - let D; - let E = B; - let F = C; - for (let G = 17; G > 1; --G) { - E ^= A.pbox[G]; - F = q(A, E) ^ F; - D = E; - E = F; - F = D; - } - D = E; - E = F; - F = D; - F ^= A.pbox[1]; - E ^= A.pbox[0]; - return { - left: E, - right: F - }; - }(p, x[y], x[y + 1]); - x[y] = z.left; - x[y + 1] = z.right; - }, - blockSize: 2, - keySize: 4, - ivSize: 2 - }); - var w = h.Blowfish; - f.Blowfish = g._createHelper(w); - }(), d.Blowfish); - }, function (a, b, c) { - "use strict"; - - a.exports = function (d) { - var f = d.stateHandler.getState; - return { - isDetectable: function (g) { - var h = f(g); - return h && !!h.isDetectable; - }, - markAsDetectable: function (g) { - f(g).isDetectable = true; - }, - isBusy: function (g) { - return !!f(g).busy; - }, - markBusy: function (g, h) { - f(g).busy = !!h; - } - }; - }; - }, function (a, b, c) { - "use strict"; - - a.exports = function (d) { - var f = {}; - function g(h) { - var i = d.get(h); - return undefined === i ? [] : f[i] || []; - } - return { - get: g, - add: function (h, j) { - var k = d.get(h); - f[k] || (f[k] = []); - f[k].push(j); - }, - removeListener: function (h, j) { - for (var k = g(h), l = 0, m = k.length; l < m; ++l) { - if (k[l] === j) { - k.splice(l, 1); - break; - } - } - }, - removeAllListeners: function (h) { - var i = g(h); - i && (i.length = 0); - } - }; - }; - }, function (a, b, c) { - "use strict"; - - a.exports = function () { - var d = 1; - return { - generate: function () { - return d++; - } - }; - }; - }, function (a, b, c) { - "use strict"; - - a.exports = function (d) { - var f = d.idGenerator; - var g = d.stateHandler.getState; - return { - get: function (h) { - var i = g(h); - return i && undefined !== i.id ? i.id : null; - }, - set: function (h) { - var j = g(h); - if (!j) { - throw new Error("setId required the element to have a resize detection state."); - } - var k = f.generate(); - j.id = k; - return k; - } - }; - }; - }, function (a, b, c) { - "use strict"; - - a.exports = function (d) { - function f() {} - var g = { - log: f, - warn: f, - error: f - }; - if (!d && window.console) { - var h = function (i, j) { - i[j] = function () { - var k = console[j]; - if (k.apply) { - k.apply(console, arguments); - } else { - for (var l = 0; l < arguments.length; l++) { - k(arguments[l]); - } - } - }; - }; - h(g, "log"); - h(g, "warn"); - h(g, "error"); - } - return g; - }; - }, function (a, b, c) { - "use strict"; - - var d = c(182); - function f() { - var g = {}; - var h = 0; - var j = 0; - var k = 0; - return { - add: function (l, m) { - m || (m = l, l = 0); - l > j ? j = l : l < k && (k = l); - g[l] || (g[l] = []); - g[l].push(m); - h++; - }, - process: function () { - for (var l = k; l <= j; l++) { - for (var m = g[l], p = 0; p < m.length; p++) { - (0, m[p])(); - } - } - }, - size: function () { - return h; - } - }; - } - a.exports = function (g) { - var h = (g = g || {}).reporter; - var j = d.getOption(g, "async", true); - var k = d.getOption(g, "auto", true); - k && !j && (h && h.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."), j = true); - var m; - var p = f(); - var q = false; - function v() { - for (q = true; p.size();) { - var x = p; - p = f(); - x.process(); - } - q = false; - } - function w() { - var x; - x = v; - m = setTimeout(x, 0); - } - return { - add: function (x, y) { - !q && k && j && 0 === p.size() && w(); - p.add(x, y); - }, - force: function (x) { - q || (undefined === x && (x = j), m && (clearTimeout(m), m = null), x ? w() : v()); - } - }; - }; - }, function (a, b, c) { - "use strict"; - - (a.exports = {}).getOption = function (d, f, g) { - var h = d[f]; - if (null == h && undefined !== g) { - return g; - } - return h; - }; - }, function (a, b, c) { - "use strict"; - - function d(f) { - return f._erd; - } - a.exports = { - initState: function (f) { - f._erd = {}; - return d(f); - }, - getState: d, - cleanState: function (f) { - delete f._erd; - } - }; - }, function (a, b, c) { - "use strict"; - - var d = c(86); - a.exports = function (f) { - var g = (f = f || {}).reporter; - var h = f.batchProcessor; - var j = f.stateHandler.getState; - if (!g) { - throw new Error("Missing required dependency: reporter."); - } - function k(m) { - var p = f.important ? " !important; " : "; "; - return (m.join(p) + p).trim(); - } - function l(m) { - return j(m).object; - } - return { - makeDetectable: function (m, p, q) { - q || (q = p, p = m, m = null); - (m = m || {}).debug; - d.isIE(8) ? q(p) : function (v, w) { - var x = k(["display: block", "position: absolute", "top: 0", "left: 0", "width: 100%", "height: 100%", "border: none", "padding: 0", "margin: 0", "opacity: 0", "z-index: -1000", "pointer-events: none"]); - var y = false; - var z = window.getComputedStyle(v); - var A = v.offsetWidth; - var B = v.offsetHeight; - function C() { - function D() { - if ("static" === z.position) { - v.style.setProperty("position", "relative", m.important ? "important" : ""); - var F = function (G, H, I, J) { - var K = I[J]; - "auto" !== K && "0" !== function (L) { - return L.replace(/[^-\d\.]/g, ""); - }(K) && (G.warn("An element that is positioned static has style." + J + "=" + K + " which is ignored due to the static positioning. The element will need to be positioned relative, so the style." + J + " will be set to 0. Element: ", H), H.style.setProperty(J, "0", m.important ? "important" : "")); - }; - F(g, v, z, "top"); - F(g, v, z, "right"); - F(g, v, z, "bottom"); - F(g, v, z, "left"); - } - } - "" !== z.position && (D(), y = true); - var E = document.createElement("object"); - E.style.cssText = x; - E.tabIndex = -1; - E.type = "text/html"; - E.setAttribute("aria-hidden", "true"); - E.onload = function () { - y || D(); - (function F(G, H) { - if (!G.contentDocument) { - var I = j(G); - I.checkForObjectDocumentTimeoutId && window.clearTimeout(I.checkForObjectDocumentTimeoutId); - return void (I.checkForObjectDocumentTimeoutId = setTimeout(function () { - I.checkForObjectDocumentTimeoutId = 0; - F(G, H); - }, 100)); - } - H(G.contentDocument); - })(this, function (G) { - w(v); - }); - }; - d.isIE() || (E.data = "about:blank"); - j(v) && (v.appendChild(E), j(v).object = E, d.isIE() && (E.data = "about:blank")); - } - j(v).startSize = { - width: A, - height: B - }; - h ? h.add(C) : C(); - }(p, q); - }, - addListener: function (m, p) { - function q() { - p(m); - } - if (d.isIE(8)) { - j(m).object = { - proxy: q - }; - m.attachEvent("onresize", q); - } else { - var s = l(m); - if (!s) { - throw new Error("Element is not detectable by this strategy."); - } - s.contentDocument.defaultView.addEventListener("resize", q); - } - }, - uninstall: function (m) { - if (j(m)) { - var p = l(m); - p && (d.isIE(8) ? m.detachEvent("onresize", p.proxy) : m.removeChild(p), j(m).checkForObjectDocumentTimeoutId && window.clearTimeout(j(m).checkForObjectDocumentTimeoutId), delete j(m).object); - } - } - }; - }; - }, function (a, b, c) { - "use strict"; - - var d = c(85).forEach; - a.exports = function (g) { - var j = (g = g || {}).reporter; - var k = g.batchProcessor; - var m = g.stateHandler.getState; - g.stateHandler.hasState; - var p = g.idHandler; - if (!k) { - throw new Error("Missing required dependency: batchProcessor"); - } - if (!j) { - throw new Error("Missing required dependency: reporter."); - } - var q = function () { - var B = document.createElement("div"); - B.style.cssText = w(["position: absolute", "width: 1000px", "height: 1000px", "visibility: hidden", "margin: 0", "padding: 0"]); - var C = document.createElement("div"); - C.style.cssText = w(["position: absolute", "width: 500px", "height: 500px", "overflow: scroll", "visibility: none", "top: -1500px", "left: -1500px", "visibility: hidden", "margin: 0", "padding: 0"]); - C.appendChild(B); - document.body.insertBefore(C, document.body.firstChild); - var D = 500 - C.clientWidth; - var E = 500 - C.clientHeight; - document.body.removeChild(C); - return { - width: D, - height: E - }; - }(); - function v(B) { - !function (C, D, E) { - if (!C.getElementById(D)) { - var F = E + "_animation"; - var G = E + "_animation_active"; - var H = "/* Created by the element-resize-detector library. */\n"; - H += "." + E + " > div::-webkit-scrollbar { " + w(["display: none"]) + " }\n\n"; - H += "." + G + " { " + w(["-webkit-animation-duration: 0.1s", "animation-duration: 0.1s", "-webkit-animation-name: " + F, "animation-name: " + F]) + " }\n"; - H += "@-webkit-keyframes " + F + " { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n"; - (function (I, J) { - J = J || function (L) { - C.head.appendChild(L); - }; - var K = C.createElement("style"); - K.innerHTML = I; - K.id = D; - J(K); - })(H += "@keyframes " + F + " { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }"); - } - }(B, "erd_scroll_detection_scrollbar_style", "erd_scroll_detection_container"); - } - function w(B) { - var C = g.important ? " !important; " : "; "; - return (B.join(C) + C).trim(); - } - function x(B, C, D) { - if (B.addEventListener) { - B.addEventListener(C, D); - } else { - if (!B.attachEvent) { - return j.error("[scroll] Don't know how to add event listeners."); - } - B.attachEvent("on" + C, D); - } - } - function y(B, C, D) { - if (B.removeEventListener) { - B.removeEventListener(C, D); - } else { - if (!B.detachEvent) { - return j.error("[scroll] Don't know how to remove event listeners."); - } - B.detachEvent("on" + C, D); - } - } - function z(B) { - return m(B).container.childNodes[0].childNodes[0].childNodes[0]; - } - function A(B) { - return m(B).container.childNodes[0].childNodes[0].childNodes[1]; - } - v(window.document); - return { - makeDetectable: function (B, D, F) { - function G() { - if (B.debug) { - var Y = Array.prototype.slice.call(arguments); - if (Y.unshift(p.get(D), "Scroll: "), j.log.apply) { - j.log.apply(null, Y); - } else { - for (var Z = 0; Z < Y.length; Z++) { - j.log(Y[Z]); - } - } - } - } - function H(Y) { - var Z = m(Y).container.childNodes[0]; - var a0 = window.getComputedStyle(Z); - return !a0.width || -1 === a0.width.indexOf("px"); - } - function I() { - var Y = window.getComputedStyle(D); - var Z = { - position: Y.position, - width: D.offsetWidth, - height: D.offsetHeight, - top: Y.top, - right: Y.right, - bottom: Y.bottom, - left: Y.left, - widthCSS: Y.width, - heightCSS: Y.height - }; - return Z; - } - function J() { - if (G("storeStyle invoked."), m(D)) { - var Y = I(); - m(D).style = Y; - } else { - G("Aborting because element has been uninstalled"); - } - } - function K(Y, Z, a0) { - m(Y).lastWidth = Z; - m(Y).lastHeight = a0; - } - function L() { - return 2 * q.width + 1; - } - function M() { - return 2 * q.height + 1; - } - function N(Y) { - return Y + 10 + L(); - } - function P(Y) { - return Y + 10 + M(); - } - function Q(Y, Z, a0) { - var a1 = z(Y); - var a2 = A(Y); - var a3 = N(Z); - var a4 = P(a0); - var a5 = function (a7) { - return 2 * a7 + L(); - }(Z); - var a6 = function (a7) { - return 2 * a7 + M(); - }(a0); - a1.scrollLeft = a3; - a1.scrollTop = a4; - a2.scrollLeft = a5; - a2.scrollTop = a6; - } - function R() { - var Y = m(D).container; - if (!Y) { - (Y = document.createElement("div")).className = "erd_scroll_detection_container"; - Y.style.cssText = w(["visibility: hidden", "display: inline", "width: 0px", "height: 0px", "z-index: -1", "overflow: hidden", "margin: 0", "padding: 0"]); - m(D).container = Y; - (function (a0) { - a0.className += " erd_scroll_detection_container_animation_active"; - })(Y); - D.appendChild(Y); - var Z = function () { - m(D).onRendered && m(D).onRendered(); - }; - x(Y, "animationstart", Z); - m(D).onAnimationStart = Z; - } - return Y; - } - function T() { - if (G("Injecting elements"), m(D)) { - !function () { - var aj = m(D).style; - if ("static" === aj.position) { - D.style.setProperty("position", "relative", B.important ? "important" : ""); - var ak = function (al, am, an, ao) { - var ap = an[ao]; - "auto" !== ap && "0" !== function (aq) { - return aq.replace(/[^-\d\.]/g, ""); - }(ap) && (al.warn("An element that is positioned static has style." + ao + "=" + ap + " which is ignored due to the static positioning. The element will need to be positioned relative, so the style." + ao + " will be set to 0. Element: ", am), am.style[ao] = 0); - }; - ak(j, D, aj, "top"); - ak(j, D, aj, "right"); - ak(j, D, aj, "bottom"); - ak(j, D, aj, "left"); - } - }(); - var Y = m(D).container; - Y || (Y = R()); - var Z; - var a0; - var a1; - var a2; - var a3 = q.width; - var a4 = q.height; - var a5 = w(["position: absolute", "flex: none", "overflow: hidden", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%", "left: 0px", "top: 0px"]); - var a6 = w(["position: absolute", "flex: none", "overflow: hidden", "z-index: -1", "visibility: hidden"].concat(["left: " + (Z = (Z = -(1 + a3)) ? Z + "px" : "0"), "top: " + (a0 = (a0 = -(1 + a4)) ? a0 + "px" : "0"), "right: " + (a2 = (a2 = -a3) ? a2 + "px" : "0"), "bottom: " + (a1 = (a1 = -a4) ? a1 + "px" : "0")])); - var a7 = w(["position: absolute", "flex: none", "overflow: scroll", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%"]); - var a8 = w(["position: absolute", "flex: none", "overflow: scroll", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%"]); - var a9 = w(["position: absolute", "left: 0", "top: 0"]); - var aa = w(["position: absolute", "width: 200%", "height: 200%"]); - var ab = document.createElement("div"); - var ac = document.createElement("div"); - var ad = document.createElement("div"); - var ae = document.createElement("div"); - var af = document.createElement("div"); - var ag = document.createElement("div"); - ab.dir = "ltr"; - ab.style.cssText = a5; - ab.className = "erd_scroll_detection_container"; - ac.className = "erd_scroll_detection_container"; - ac.style.cssText = a6; - ad.style.cssText = a7; - ae.style.cssText = a9; - af.style.cssText = a8; - ag.style.cssText = aa; - ad.appendChild(ae); - af.appendChild(ag); - ac.appendChild(ad); - ac.appendChild(af); - ab.appendChild(ac); - Y.appendChild(ab); - x(ad, "scroll", ah); - x(af, "scroll", ai); - m(D).onExpandScroll = ah; - m(D).onShrinkScroll = ai; - } else { - G("Aborting because element has been uninstalled"); - } - function ah() { - var aj = m(D); - aj && aj.onExpand ? aj.onExpand() : G("Aborting expand scroll handler: element has been uninstalled"); - } - function ai() { - var aj = m(D); - aj && aj.onShrink ? aj.onShrink() : G("Aborting shrink scroll handler: element has been uninstalled"); - } - } - function U() { - function Y(a4, a5, a6) { - var a7 = function (aa) { - return z(aa).childNodes[0]; - }(a4); - var a8 = N(a5); - var a9 = P(a6); - a7.style.setProperty("width", a8 + "px", B.important ? "important" : ""); - a7.style.setProperty("height", a9 + "px", B.important ? "important" : ""); - } - function Z(a4) { - var a5 = D.offsetWidth; - var a6 = D.offsetHeight; - var a7 = a5 !== m(D).lastWidth || a6 !== m(D).lastHeight; - G("Storing current size", a5, a6); - K(D, a5, a6); - k.add(0, function () { - if (a7) { - if (m(D)) { - if (a0()) { - if (B.debug) { - var a8 = D.offsetWidth; - var a9 = D.offsetHeight; - a8 === a5 && a9 === a6 || j.warn(p.get(D), "Scroll: Size changed before updating detector elements."); - } - Y(D, a5, a6); - } else { - G("Aborting because element container has not been initialized"); - } - } else { - G("Aborting because element has been uninstalled"); - } - } - }); - k.add(1, function () { - m(D) ? a0() ? Q(D, a5, a6) : G("Aborting because element container has not been initialized") : G("Aborting because element has been uninstalled"); - }); - a7 && a4 && k.add(2, function () { - m(D) ? a0() ? a4() : G("Aborting because element container has not been initialized") : G("Aborting because element has been uninstalled"); - }); - } - function a0() { - return !!m(D).container; - } - function a1() { - G("notifyListenersIfNeeded invoked"); - var a4 = m(D); - return undefined === m(D).lastNotifiedWidth && a4.lastWidth === a4.startSize.width && a4.lastHeight === a4.startSize.height ? G("Not notifying: Size is the same as the start size, and there has been no notification yet.") : a4.lastWidth === a4.lastNotifiedWidth && a4.lastHeight === a4.lastNotifiedHeight ? G("Not notifying: Size already notified") : (G("Current size not notified, notifying..."), a4.lastNotifiedWidth = a4.lastWidth, a4.lastNotifiedHeight = a4.lastHeight, void d(m(D).listeners, function (a5) { - a5(D); - })); - } - function a2() { - G("Scroll detected."); - H(D) ? G("Scroll event fired while unrendered. Ignoring...") : Z(a1); - } - if (G("registerListenersAndPositionElements invoked."), m(D)) { - m(D).onRendered = function () { - if (G("startanimation triggered."), H(D)) { - G("Ignoring since element is still unrendered..."); - } else { - G("Element rendered."); - var a4 = z(D); - var a5 = A(D); - 0 !== a4.scrollLeft && 0 !== a4.scrollTop && 0 !== a5.scrollLeft && 0 !== a5.scrollTop || (G("Scrollbars out of sync. Updating detector elements..."), Z(a1)); - } - }; - m(D).onExpand = a2; - m(D).onShrink = a2; - var a3 = m(D).style; - Y(D, a3.width, a3.height); - } else { - G("Aborting because element has been uninstalled"); - } - } - function V() { - if (G("finalizeDomMutation invoked."), m(D)) { - var Y = m(D).style; - K(D, Y.width, Y.height); - Q(D, Y.width, Y.height); - } else { - G("Aborting because element has been uninstalled"); - } - } - function W() { - F(D); - } - function X() { - var Y; - G("Installing..."); - m(D).listeners = []; - Y = I(); - m(D).startSize = { - width: Y.width, - height: Y.height - }; - G("Element start size", m(D).startSize); - k.add(0, J); - k.add(1, T); - k.add(2, U); - k.add(3, V); - k.add(4, W); - } - F || (F = D, D = B, B = null); - B = B || {}; - G("Making detectable..."); - !function (Y) { - return !function (Z) { - var a0 = Z.getRootNode && Z.getRootNode().contains(Z); - return Z === Z.ownerDocument.body || Z.ownerDocument.body.contains(Z) || a0; - }(Y) || null === window.getComputedStyle(Y); - }(D) ? X() : (G("Element is detached"), R(), G("Waiting until element is attached..."), m(D).onRendered = function () { - G("Element is now attached"); - X(); - }); - }, - addListener: function (B, C) { - if (!m(B).listeners.push) { - throw new Error("Cannot add listener to an element that is not detectable."); - } - m(B).listeners.push(C); - }, - uninstall: function (B) { - var C = m(B); - C && (C.onExpandScroll && y(z(B), "scroll", C.onExpandScroll), C.onShrinkScroll && y(A(B), "scroll", C.onShrinkScroll), C.onAnimationStart && y(C.container, "animationstart", C.onAnimationStart), C.container && B.removeChild(C.container)); - }, - initDocument: v - }; - }; - },,, function (a0, a1, a2) { - "use strict"; - - a2.r(a1); - a2.d(a1, "spreadsheet", function () { - return k2; - }); - a2.d(a1, "DataWindow", function () { - return jQ; - }); - a2.d(a1, "Formula", function () { - return ay.a; - }); - a2.d(a1, "DWBuffer", function () { - return bQ; - }); - a2.d(a1, "DWItemStatus", function () { - return bO; - }); - a2.d(a1, "DWEvent", function () { - return bR; - }); - a2.d(a1, "DWUpdateWhere", function () { - return bP; - }); - a2.d(a1, "DataStore", function () { - return cg; - }); - a2.d(a1, "Split", function () { - return j7; - }); - a2.d(a1, "ContextMenu", function () { - return fX; - }); - a2.d(a1, "registerUserFunction", function () { - return cf; - }); - a2.d(a1, "formulaCacheClear", function () { - return ay.b; - }); - a2.d(a1, "formulaCacheSet", function () { - return ay.d; - }); - a2.d(a1, "formulaCacheGet", function () { - return ay.c; - }); - var a3 = a2(7); - var a4 = a2.n(a3); - var a5 = a2(1); - var a6 = a2.n(a5); - var a7 = a2(2); - var a8 = a2.n(a7); - var a9 = a2(0); - var ab = a2(9); - var ac = a2.n(ab); - var ad = a2(18); - var af = function () { - function k4(k5, k6, k7, k8) { - var k9 = arguments.length > 4 && undefined !== arguments[4] ? arguments[4] : 0; - var kb = arguments.length > 5 && undefined !== arguments[5] ? arguments[5] : 0; - var kc = arguments.length > 6 && undefined !== arguments[6] ? arguments[6] : 0; - var kd = arguments.length > 7 && undefined !== arguments[7] ? arguments[7] : 0; - a6()(this, k4); - this.sri = k5; - this.sci = k6; - this.eri = k7; - this.eci = k8; - this.w = k9; - this.h = kb; - this.left = kc; - this.top = kd; - } - return a8()(k4, [{ - key: "set", - value: function (k5, k6, k7, k8) { - this.sri = k5; - this.sci = k6; - this.eri = k7; - this.eci = k8; - } - }, { - key: "multiple", - value: function () { - return this.eri - this.sri > 0 || this.eci - this.sci > 0; - } - }, { - key: "includes", - value: function () { - for (var k5 = 0, k6 = 0, k7 = arguments.length, k8 = new Array(k7), k9 = 0; k9 < k7; k9++) { - k8[k9] = arguments[k9]; - } - if (1 === k8.length) { - var kb = Object(ad.b)(k8[0]); - var kc = a4()(kb, 2); - k6 = kc[0]; - k5 = kc[1]; - } else { - 2 === k8.length && (k5 = k8[0], k6 = k8[1]); - } - var kd = this.sri; - var kf = this.sci; - var kg = this.eri; - var kh = this.eci; - return kd <= k5 && k5 <= kg && kf <= k6 && k6 <= kh; - } - }, { - key: "each", - value: function (k5) { - for (var k6 = arguments.length > 1 && undefined !== arguments[1] ? arguments[1] : function () { - return true; - }, k7 = this.sri, k8 = this.sci, k9 = this.eri, kb = this.eci, kc = k7; kc <= k9; kc += 1) { - if (k6(kc)) { - for (var kd = k8; kd <= kb; kd += 1) { - k5(kc, kd); - } - } - } - } - }, { - key: "contains", - value: function (k5) { - return this.sri <= k5.sri && this.sci <= k5.sci && this.eri >= k5.eri && this.eci >= k5.eci; - } - }, { - key: "within", - value: function (k5) { - return this.sri >= k5.sri && this.sci >= k5.sci && this.eri <= k5.eri && this.eci <= k5.eci; - } - }, { - key: "disjoint", - value: function (k5) { - return this.sri > k5.eri || this.sci > k5.eci || k5.sri > this.eri || k5.sci > this.eci; - } - }, { - key: "intersects", - value: function (k5) { - return this.sri <= k5.eri && this.sci <= k5.eci && k5.sri <= this.eri && k5.sci <= this.eci; - } - }, { - key: "union", - value: function (k5) { - var k6 = this.sri; - var k7 = this.sci; - var k8 = this.eri; - var k9 = this.eci; - return new k4(k5.sri < k6 ? k5.sri : k6, k5.sci < k7 ? k5.sci : k7, k5.eri > k8 ? k5.eri : k8, k5.eci > k9 ? k5.eci : k9); - } - }, { - key: "difference", - value: function (k5) { - var k6 = []; - var k7 = function (kj, kk, km, kp) { - k6.push(new k4(kj, kk, km, kp)); - }; - var k8 = this.sri; - var k9 = this.sci; - var kb = this.eri; - var kc = this.eci; - var kd = k5.sri - k8; - var kf = k5.sci - k9; - var kg = kb - k5.eri; - var kh = kc - k5.eci; - kd > 0 ? (k7(k8, k9, k5.sri - 1, kc), kg > 0 ? (k7(k5.eri + 1, k9, kb, kc), kf > 0 && k7(k5.sri, k9, k5.eri, k5.sci - 1), kh > 0 && k7(k5.sri, k5.eci + 1, k5.eri, kc)) : (kf > 0 && k7(k5.sri, k9, kb, k5.sci - 1), kh > 0 && k7(k5.sri, k5.eci + 1, kb, kc))) : kg > 0 && (k7(k5.eri + 1, k9, kb, kc), kf > 0 && k7(k8, k9, k5.eri, k5.sci - 1), kh > 0 && k7(k8, k5.eci + 1, k5.eri, kc)); - kf > 0 ? (k7(k8, k9, kb, k5.sci - 1), kh > 0 ? (k7(k8, k5.eri + 1, kb, kc), kd > 0 && k7(k8, k5.sci, k5.sri - 1, k5.eci), kg > 0 && k7(k5.sri + 1, k5.sci, kb, k5.eci)) : (kd > 0 && k7(k8, k5.sci, k5.sri - 1, kc), kg > 0 && k7(k5.sri + 1, k5.sci, kb, kc))) : kh > 0 && (k7(kb, k5.eci + 1, kb, kc), kd > 0 && k7(k8, k9, k5.sri - 1, k5.eci), kg > 0 && k7(k5.eri + 1, k9, kb, k5.eci)); - return k6; - } - }, { - key: "size", - value: function () { - return [this.eri - this.sri + 1, this.eci - this.sci + 1]; - } - }, { - key: "toString", - value: function () { - var k5 = this.sri; - var k6 = this.sci; - var k7 = this.eri; - var k8 = this.eci; - var k9 = Object(ad.d)(k6, k5); - this.multiple() && (k9 = "".concat(k9, ":").concat(Object(ad.d)(k8, k7))); - return k9; - } - }, { - key: "clone", - value: function () { - return new k4(this.sri, this.sci, this.eri, this.eci, this.w, this.h); - } - }, { - key: "equals", - value: function (k5) { - return this.eri === k5.eri && this.eci === k5.eci && this.sri === k5.sri && this.sci === k5.sci; - } - }], [{ - key: "valueOf", - value: function (k5) { - var k6 = k5.split(":"); - var k7 = Object(ad.b)(k6[0]); - var k8 = a4()(k7, 2); - var k9 = k8[0]; - var kb = k8[1]; - var kc = kb; - var kd = k9; - if (k6.length > 1) { - var kf = Object(ad.b)(k6[1]); - var kg = a4()(kf, 2); - kd = kg[0]; - kc = kg[1]; - } - return new k4(kb, k9, kc, kd); - } - }]); - }(); - var ag = af; - var ah = function () { - return a8()(function k4() { - a6()(this, k4); - this.range = new af(0, 0, 0, 0); - this.ri = 0; - this.ci = 0; - }, [{ - key: "multiple", - value: function () { - return this.range.multiple(); - } - }, { - key: "setIndexes", - value: function (k5, k6) { - this.ri = k5; - this.ci = k6; - } - }, { - key: "size", - value: function () { - return this.range.size(); - } - }]); - }(); - var aj = a8()(function k4() { - a6()(this, k4); - this.x = 0; - this.y = 0; - this.ri = 0; - this.ci = 0; - }); - var ak = function () { - return a8()(function k5() { - a6()(this, k5); - this.undoItems = []; - this.redoItems = []; - }, [{ - key: "add", - value: function (k6) { - this.undoItems.push(JSON.stringify(k6)); - this.redoItems = []; - } - }, { - key: "canUndo", - value: function () { - return this.undoItems.length > 0; - } - }, { - key: "canRedo", - value: function () { - return this.redoItems.length > 0; - } - }, { - key: "undo", - value: function (k6, k7) { - var k8 = this.undoItems; - var k9 = this.redoItems; - this.canUndo() && (k9.push(JSON.stringify(k6)), k7(JSON.parse(k8.pop()))); - } - }, { - key: "redo", - value: function (k6, k7) { - var k8 = this.undoItems; - var k9 = this.redoItems; - this.canRedo() && (k8.push(JSON.stringify(k6)), k7(JSON.parse(k9.pop()))); - } - }]); - }(); - var am = function () { - return a8()(function k5() { - a6()(this, k5); - this.range = null; - this.state = "clear"; - }, [{ - key: "copy", - value: function (k6) { - this.range = k6; - this.state = "copy"; - return this; - } - }, { - key: "cut", - value: function (k6) { - this.range = k6; - this.state = "cut"; - return this; - } - }, { - key: "isCopy", - value: function () { - return "copy" === this.state; - } - }, { - key: "isCut", - value: function () { - return "cut" === this.state; - } - }, { - key: "isClear", - value: function () { - return "clear" === this.state; - } - }, { - key: "clear", - value: function () { - this.range = null; - this.state = "clear"; - } - }]); - }(); - var ap = function () { - return a8()(function k5(k6, k7, k8) { - a6()(this, k5); - this.ci = k6; - this.operator = k7; - this.value = k8; - }, [{ - key: "set", - value: function (k6, k7) { - this.operator = k6; - this.value = k7; - } - }, { - key: "includes", - value: function (k6) { - var k7 = this.operator; - var k8 = this.value; - return "all" === k7 || "in" === k7 && k8.includes(k6); - } - }, { - key: "vlength", - value: function () { - var k6 = this.operator; - var k7 = this.value; - return "in" === k6 ? k7.length : 0; - } - }, { - key: "getData", - value: function () { - return { - ci: this.ci, - operator: this.operator, - value: this.value - }; - } - }]); - }(); - var aq = function () { - return a8()(function k5(k6, k7) { - a6()(this, k5); - this.ci = k6; - this.order = k7; - }, [{ - key: "asc", - value: function () { - return "asc" === this.order; - } - }, { - key: "desc", - value: function () { - return "desc" === this.order; - } - }]); - }(); - var au = function () { - return a8()(function k5() { - a6()(this, k5); - this.ref = null; - this.filters = []; - this.sort = null; - }, [{ - key: "setData", - value: function (k6) { - var k7 = k6.ref; - var k8 = k6.filters; - var k9 = k6.sort; - null != k7 && (this.ref = k7, this.filters = k8.map(function (kb) { - return new ap(kb.ci, kb.operator, kb.value); - }), k9 && (this.sort = new aq(k9.ci, k9.order))); - } - }, { - key: "getData", - value: function () { - if (this.active()) { - var k6 = this.ref; - var k7 = this.filters; - var k8 = this.sort; - return { - ref: k6, - filters: k7.map(function (k9) { - return k9.getData(); - }), - sort: k8 - }; - } - return {}; - } - }, { - key: "addFilter", - value: function (k6, k7, k8) { - var k9 = this.getFilter(k6); - null == k9 ? this.filters.push(new ap(k6, k7, k8)) : k9.set(k7, k8); - } - }, { - key: "setSort", - value: function (k6, k7) { - this.sort = k7 ? new aq(k6, k7) : null; - } - }, { - key: "includes", - value: function (k6, k7) { - return !!this.active() && this.hrange().includes(k6, k7); - } - }, { - key: "getSort", - value: function (k6) { - var k7 = this.sort; - return k7 && k7.ci === k6 ? k7 : null; - } - }, { - key: "getFilter", - value: function (k6) { - for (var k7 = this.filters, k8 = 0; k8 < k7.length; k8 += 1) { - if (k7[k8].ci === k6) { - return k7[k8]; - } - } - return null; - } - }, { - key: "filteredRows", - value: function (k6) { - var k7 = new Set(); - var k8 = new Set(); - if (this.active()) { - for (var k9 = this.range(), kb = k9.sri, kc = k9.eri, kd = this.filters, kf = kb + 1; kf <= kc; kf += 1) { - for (var kg = 0; kg < kd.length; kg += 1) { - var kh = kd[kg]; - var kj = k6(kf, kh.ci); - var kk = kj ? kj.text : ""; - if (!kh.includes(kk)) { - k7.add(kf); - break; - } - k8.add(kf); - } - } - } - return { - rset: k7, - fset: k8 - }; - } - }, { - key: "items", - value: function (k6, k7) { - var k8 = {}; - if (this.active()) { - for (var k9 = this.range(), kb = k9.sri, kc = k9.eri, kd = kb + 1; kd <= kc; kd += 1) { - var kf = k7(kd, k6); - if (null === kf || /^\s*$/.test(kf.text)) { - k8[""] = (k8[""] || 0) + 1; - } else { - var kg = kf.text; - var kh = (k8[kg] || 0) + 1; - k8[kg] = kh; - } - } - } - return k8; - } - }, { - key: "range", - value: function () { - return af.valueOf(this.ref); - } - }, { - key: "hrange", - value: function () { - var k6 = this.range(); - k6.eri = k6.sri; - return k6; - } - }, { - key: "clear", - value: function () { - this.ref = null; - this.filters = []; - this.sort = null; - } - }, { - key: "active", - value: function () { - return null !== this.ref; - } - }]); - }(); - var av = function () { - function k5() { - var k6 = arguments.length > 0 && undefined !== arguments[0] ? arguments[0] : []; - a6()(this, k5); - this._ = k6; - } - return a8()(k5, [{ - key: "forEach", - value: function (k6) { - this._.forEach(k6); - } - }, { - key: "deleteWithin", - value: function (k6) { - this._ = this._.filter(function (k7) { - return !k7.within(k6); - }); - } - }, { - key: "deleteRow", - value: function (k6, k7) { - this._ = this._.filter(function (k8) { - return !(k8.sri >= k6 && k8.sri <= k7); - }); - } - }, { - key: "deleteColumn", - value: function (k6, k7) { - this._ = this._.filter(function (k8) { - return !(k8.sci <= k6 && k8.sci >= k7); - }); - } - }, { - key: "getFirstIncludes", - value: function (k6, k7) { - for (var k8 = 0; k8 < this._.length; k8 += 1) { - var k9 = this._[k8]; - if (k9.includes(k6, k7)) { - return k9; - } - } - return null; - } - }, { - key: "filterIntersects", - value: function (k6) { - return new k5(this._.filter(function (k7) { - return k7.intersects(k6); - })); - } - }, { - key: "intersects", - value: function (k6) { - for (var k7 = 0; k7 < this._.length; k7 += 1) { - if (this._[k7].intersects(k6)) { - return true; - } - } - return false; - } - }, { - key: "union", - value: function (k6) { - var k7 = k6; - this._.forEach(function (k8) { - k8.intersects(k7) && (k7 = k8.union(k7)); - }); - return k7; - } - }, { - key: "add", - value: function (k6) { - this.deleteWithin(k6); - this._.push(k6); - } - }, { - key: "shift", - value: function (k6, k7, k8, k9) { - this._.forEach(function (kb) { - var kc = kb.sri; - var kd = kb.sci; - var kf = kb.eri; - var kg = kb.eci; - var kh = kb; - "row" === k6 ? kc >= k7 ? (kh.sri += k8, kh.eri += k8) : kc < k7 && k7 <= kf && (kh.eri += k8, k9(kc, kd, k8, 0)) : "column" === k6 && (kd >= k7 ? (kh.sci += k8, kh.eci += k8) : kd < k7 && k7 <= kg && (kh.eci += k8, k9(kc, kd, 0, k8))); - }); - this._ = this._.filter(function (kb) { - return !(kb.sri === kb.eri && kb.sci === kb.eci); - }); - } - }, { - key: "move", - value: function (k6, k7, k8) { - this._.forEach(function (k9) { - var kb = k9; - kb.within(k6) && (kb.eri += k7, kb.sri += k7, kb.sci += k8, kb.eci += k8); - }); - } - }, { - key: "repeatColumn", - value: function (k6, k7, k8) { - this.shift("column", k6 + k7, k8 * k7, function (kc) {}); - var k9; - var kb = []; - (this._.forEach(function (kc) { - var kd = kc.sci; - var kf = kc.eci; - if (kd >= k6 && kf < k6 + k7) { - for (var kg = 1; kg < k8 + 1; kg++) { - var kh = kc.clone(); - kh.sci += kg * k7; - kh.eci += kg * k7; - kb.push(kh); - } - } - }), kb.length > 0) && (k9 = this._).push.apply(k9, kb); - } - }, { - key: "setData", - value: function (k6) { - this._ = k6.map(function (k7) { - return af.valueOf(k7); - }); - return this; - } - }, { - key: "getData", - value: function () { - return this._.map(function (k6) { - return k6.toString(); - }); - } - }]); - }(); - var aw = a2(13); - var ax = function () { - return a8()(function k5(k6) { - var k7 = k6.len; - var k8 = k6.height; - var k9 = k6.minHeight; - a6()(this, k5); - this._ = {}; - this.len = k7; - this.height = k8; - this.minHeight = k9; - }, [{ - key: "getHeight", - value: function (k6) { - if (this.isHide(k6)) { - return 0; - } - var k7 = this.get(k6); - return k7 && (k7.height || 0 === k7.height) ? k7.height : this.height; - } - }, { - key: "setHeight", - value: function (k6, k7) { - this.getOrNew(k6).height = k7; - } - }, { - key: "unhide", - value: function (k6) { - for (var k7 = k6; k7 > 0 && (k7 -= 1, this.isHide(k7));) { - this.setHide(k7, false); - } - } - }, { - key: "isHide", - value: function (k6) { - var k7 = this.get(k6); - return k7 && k7.hide; - } - }, { - key: "setHide", - value: function (k6, k7) { - var k8 = this.getOrNew(k6); - true === k7 ? k8.hide = true : delete k8.hide; - } - }, { - key: "setStyle", - value: function (k6, k7) { - this.getOrNew(k6).style = k7; - } - }, { - key: "sumHeight", - value: function (k6, k7, k8) { - var k9 = this; - return aw.a.rangeSum(k6, k7, function (kb) { - return k8 && k8.has(kb) ? 0 : k9.getHeight(kb); - }); - } - }, { - key: "totalHeight", - value: function (k6) { - if (undefined === k6) { - return Math.floor(this.len * eR.virtualHeight); - } - var k7 = this.len - k6.len; - return Math.floor(k7 * eR.virtualHeight) + k6.height; - } - }, { - key: "get", - value: function (k6) { - return this._[k6]; - } - }, { - key: "set", - value: function (k6, k7) { - this._[k6] = k7; - } - }, { - key: "getOrNew", - value: function (k6) { - this._[k6] = this._[k6] || { - cells: {} - }; - return this._[k6]; - } - }, { - key: "getCell", - value: function (k6, k7) { - var k8 = this.get(k6); - return undefined !== k8 && undefined !== k8.cells && undefined !== k8.cells[k7] ? k8.cells[k7] : null; - } - }, { - key: "getCellMerge", - value: function (k6, k7) { - var k8 = this.getCell(k6, k7); - return k8 && k8.merge ? k8.merge : [0, 0]; - } - }, { - key: "getCellOrNew", - value: function (k6, k7) { - var k8 = this.getOrNew(k6); - k8.cells[k7] = k8.cells[k7] || {}; - return k8.cells[k7]; - } - }, { - key: "setCell", - value: function (k6, k7, k8) { - var k9 = arguments.length > 3 && undefined !== arguments[3] ? arguments[3] : "all"; - var kb = this.getOrNew(k6); - "all" === k9 ? kb.cells[k7] = k8 : "text" === k9 ? (kb.cells[k7] = kb.cells[k7] || {}, kb.cells[k7].text = k8.text) : "format" === k9 && (kb.cells[k7] = kb.cells[k7] || {}, kb.cells[k7].style = k8.style, k8.merge && (kb.cells[k7].merge = k8.merge)); - } - }, { - key: "setCellText", - value: function (k6, k7, k8) { - this.getCellOrNew(k6, k7).text = k8; - } - }, { - key: "copyPaste", - value: function (k6, k7, k8) { - var k9 = this; - var kb = arguments.length > 3 && undefined !== arguments[3] && arguments[3]; - var kc = arguments.length > 4 && undefined !== arguments[4] ? arguments[4] : function () {}; - var kd = k6.sri; - var kf = k6.sci; - var kg = k6.eri; - var kh = k6.eci; - var kj = k7.sri; - var kk = k7.sci; - var km = k7.eri; - var kp = k7.eci; - var kq = k6.size(); - var ku = a4()(kq, 2); - var kv = ku[0]; - var kw = ku[1]; - var kx = k7.size(); - var ky = a4()(kx, 2); - var kz = ky[0]; - var kA = ky[1]; - var kB = true; - var kC = 0; - (km < kd || kp < kf) && (kB = false, kC = km < kd ? kz : kA); - for (var kD = kd; kD <= kg; kD += 1) { - if (this._[kD]) { - for (var kE = kf; kE <= kh; kE += 1) { - if (this._[kD].cells && this._[kD].cells[kE]) { - for (var kF = kj; kF <= km; kF += kv) { - for (var kG = function () { - var kI = kF + (kD - kd); - var kJ = kH + (kE - kf); - var kK = aw.a.cloneDeep(k9._[kD].cells[kE]); - if (kb && kK && kK.text && kK.text.length > 0) { - var kL = kK.text; - var kM = kH - kk + (kF - kj) + 2; - if (kB || (kM -= kC + 1), "=" === kL[0]) { - kK.text = kL.replace(/[a-zA-Z]{1,3}\d+/g, function (kP) { - var kQ = 0; - var kR = 0; - kd === kj ? kQ = kM - 1 : kR = kM - 1; - return /^\d+$/.test(kP) ? kP : Object(ad.a)(kP, kQ, kR); - }); - } else { - if (kv <= 1 && kw > 1 && (kj > kg || km < kd) || kw <= 1 && kv > 1 && (kk > kh || kp < kf) || kv <= 1 && kw <= 1) { - var kN = /[\\.\d]+$/.exec(kL); - if (null !== kN) { - var kO = Number(kN[0]) + kM - 1; - kK.text = kL.substring(0, kN.index) + kO; - } - } - } - } - k9.setCell(kI, kJ, kK, k8); - kc(kI, kJ, kK); - }, kH = kk; kH <= kp; kH += kw) { - kG(); - } - } - } - } - } - } - } - }, { - key: "cutPaste", - value: function (k6, k7) { - var k8 = this; - var k9 = {}; - this.each(function (kb) { - k8.eachCells(kb, function (kc) { - var kd = parseInt(kb, 10); - var kf = parseInt(kc, 10); - k6.includes(kb, kc) && (kd = k7.sri + (kd - k6.sri), kf = k7.sci + (kf - k6.sci)); - k9[kd] = k9[kd] || { - cells: {} - }; - k9[kd].cells[kf] = k8._[kb].cells[kc]; - }); - }); - this._ = k9; - } - }, { - key: "paste", - value: function (k6, k7) { - var k8 = this; - if (!(k6.length <= 0)) { - var k9 = k7.sri; - var kb = k7.sci; - k6.forEach(function (kc, kd) { - var kf = k9 + kd; - kc.forEach(function (kg, kh) { - var kj = kb + kh; - k8.setCellText(kf, kj, kg); - }); - }); - } - } - }, { - key: "insert", - value: function (k6) { - var k7 = this; - var k8 = arguments.length > 1 && undefined !== arguments[1] ? arguments[1] : 1; - if (k6 < 0 || k6 >= this.len) { - this.len += k8; - } else { - var k9 = {}; - this.each(function (kb, kc) { - var kd = parseInt(kb, 10); - kd >= k6 && (kd += k8, k7.eachCells(kb, function (kf, kg) { - kg.text && "=" === kg.text[0] && (kg.text = kg.text.replace(/[a-zA-Z]{1,3}\d+/g, function (kh) { - return Object(ad.a)(kh, 0, k8, function (kj, kk) { - return kk >= k6; - }); - })); - })); - k9[kd] = kc; - }); - this._ = k9; - this.len += k8; - } - } - }, { - key: "delete", - value: function (k6, k7) { - var k8 = this; - var k9 = k7 - k6 + 1; - var kb = {}; - this.each(function (kc, kd) { - var kf = parseInt(kc, 10); - kf < k6 ? kb[kf] = kd : kf > k7 && (kb[kf - k9] = kd, k8.eachCells(kc, function (kg, kh) { - kh.text && "=" === kh.text[0] && (kh.text = kh.text.replace(/[a-zA-Z]{1,3}\d+/g, function (kj) { - return Object(ad.a)(kj, 0, -k9, function (kk, km) { - return km > k7; - }); - })); - })); - }); - this._ = kb; - this.len -= k9; - } - }, { - key: "insertColumn", - value: function (k6) { - var k7 = this; - var k8 = arguments.length > 1 && undefined !== arguments[1] ? arguments[1] : 1; - this.each(function (k9, kb) { - var kc = {}; - k7.eachCells(k9, function (kd, kf) { - var kg = parseInt(kd, 10); - kg >= k6 && (kg += k8, kf.text && "=" === kf.text[0] && (kf.text = kf.text.replace(/[a-zA-Z]{1,3}\d+/g, function (kh) { - return Object(ad.a)(kh, k8, 0, function (kj) { - return kj >= k6; - }); - }))); - kc[kg] = kf; - }); - kb.cells = kc; - }); - } - }, { - key: "deleteColumn", - value: function (k6, k7) { - var k8 = this; - var k9 = k7 - k6 + 1; - this.each(function (kb, kc) { - var kd = {}; - k8.eachCells(kb, function (kf, kg) { - var kh = parseInt(kf, 10); - kh < k6 ? kd[kh] = kg : kh > k7 && (kd[kh - k9] = kg, kg.text && "=" === kg.text[0] && (kg.text = kg.text.replace(/[a-zA-Z]{1,3}\d+/g, function (kj) { - return Object(ad.a)(kj, -k9, 0, function (kk) { - return kk > k7; - }); - }))); - }); - kc.cells = kd; - }); - } - }, { - key: "deleteCells", - value: function (k6) { - var k7 = this; - var k8 = arguments.length > 1 && undefined !== arguments[1] ? arguments[1] : "all"; - k6.each(function (k9, kb) { - k7.deleteCell(k9, kb, k8); - }); - } - }, { - key: "deleteCell", - value: function (k6, k7) { - var k8 = arguments.length > 2 && undefined !== arguments[2] ? arguments[2] : "all"; - var k9 = this.get(k6); - if (null !== k9) { - var kb = this.getCell(k6, k7); - null !== kb && ("all" === k8 ? delete k9.cells[k7] : "text" === k8 ? (kb.text && delete kb.text, kb.value && delete kb.value) : "format" === k8 ? (undefined !== kb.style && delete kb.style, kb.merge && delete kb.merge) : "merge" === k8 && kb.merge && delete kb.merge); - } - } - }, { - key: "maxCell", - value: function () { - var k6 = Object.keys(this._); - var k7 = k6[k6.length - 1]; - var k8 = this._[k7]; - if (k8) { - var k9 = k8.cells; - var kb = Object.keys(k9); - var kc = kb[kb.length - 1]; - return [parseInt(k7, 10), parseInt(kc, 10)]; - } - return [0, 0]; - } - }, { - key: "each", - value: function (k6) { - Object.entries(this._).forEach(function (k7) { - var k8 = a4()(k7, 2); - var k9 = k8[0]; - var kb = k8[1]; - k6(k9, kb); - }); - } - }, { - key: "eachCells", - value: function (k6, k7) { - this._[k6] && this._[k6].cells && Object.entries(this._[k6].cells).forEach(function (k8) { - var k9 = a4()(k8, 2); - var kb = k9[0]; - var kc = k9[1]; - k7(kb, kc); - }); - } - }, { - key: "setData", - value: function (k6) { - undefined !== k6.len && (this.len = k6.len); - delete k6.len; - undefined !== k6.height && (this.height = k6.height); - delete k6.height; - undefined !== k6.minHeight && (this.minHeight = k6.minHeight); - delete k6.minHeight; - this._ = k6; - } - }, { - key: "getData", - value: function () { - var k6 = this.len; - var k7 = this.height; - var k8 = this.minHeight; - var k9 = aw.a.cloneDeep(this._); - Object.entries(k9).forEach(function (kb) { - var kc = a4()(kb, 2); - kc[0]; - var kd = kc[1].cells; - kd && Object.entries(kd).forEach(function (kf) { - var kg = a4()(kf, 2); - kg[0]; - delete kg[1].merge; - }); - }); - return Object.assign(k9, { - len: k6, - height: k7, - minHeight: k8 - }); - } - }]); - }(); - var ay = a2(22); - function az(k5, k6) { - switch (k5) { - case "width": - return this.data.viewWidth(); - case "clientHeight": - return document.documentElement.clientHeight; - case "clientWidth": - return document.documentElement.clientWidth; - case "fontSize": - return getComputedStyle(document.body).fontSize; - } - } - var aA = function () { - return a8()(function k5(k6, k7) { - var k8 = k6.len; - var k9 = k6.width; - var kb = k6.indexWidth; - var kc = k6.minWidth; - a6()(this, k5); - this._ = {}; - this.len = k8; - this.width = k9; - this.indexWidth = kb; - this.minWidth = kc; - this.data = k7; - this.colWidthFormula = {}; - }, [{ - key: "setData", - value: function (k6) { - k6.len && (this.len = k6.len, delete k6.len); - this._ = k6; - this.colWidthFormula = {}; - } - }, { - key: "getData", - value: function () { - var k6 = this.len; - return Object.assign({ - len: k6 - }, this._); - } - }, { - key: "getWidth", - value: function (k6) { - var k7 = this; - if (this.isHide(k6)) { - return 0; - } - var k8 = this._[k6]; - var k9 = this.width; - if (k8 && k8.width && (k9 = k8.width), "string" == typeof k9) { - var kb = this.colWidthFormula[k6]; - if (!kb) { - var kc = aw.a.cssCalcExpression(k9); - kb = this.colWidthFormula[k6] = new ay.a(kc, function (kd, kf) { - var kg = arguments.length > 2 && undefined !== arguments[2] ? arguments[2] : 0; - return az.call(k7, kd, kf, kg); - }); - } - k9 = kb.evaluate({}); - } - k9 < 0 && (k9 = 0); - return k9; - } - }, { - key: "getOrNew", - value: function (k6) { - this._[k6] = this._[k6] || {}; - return this._[k6]; - } - }, { - key: "setWidth", - value: function (k6, k7) { - this.getOrNew(k6).width = k7; - } - }, { - key: "unhide", - value: function (k6) { - for (var k7 = k6; k7 > 0 && (k7 -= 1, this.isHide(k7));) { - this.setHide(k7, false); - } - } - }, { - key: "isHide", - value: function (k6) { - var k7 = this._[k6]; - return k7 && k7.hide; - } - }, { - key: "setHide", - value: function (k6, k7) { - var k8 = this.getOrNew(k6); - true === k7 ? k8.hide = true : delete k8.hide; - } - }, { - key: "setStyle", - value: function (k6, k7) { - this.getOrNew(k6).style = k7; - } - }, { - key: "sumWidth", - value: function (k6, k7) { - var k8 = this; - return aw.a.rangeSum(k6, k7, function (k9) { - return k8.getWidth(k9); - }); - } - }, { - key: "totalWidth", - value: function () { - return this.sumWidth(0, this.len); - } - }, { - key: "deleteColumn", - value: function (k6, k7) { - if (!(k6 > this.len)) { - k7 > this.len && (k7 = this.len); - for (var k8 = k7 - k6 + 1, k9 = this.len - 1; k9 >= k6; k9--) { - var kb = this._[k9]; - kb && kb.width && (this._[k9 - k8] = kb, delete this._[k9]); - } - this.len -= k8; - } - } - }, { - key: "insertColumn", - value: function (k6) { - for (var k7 = arguments.length > 1 && undefined !== arguments[1] ? arguments[1] : 1, k8 = this.len, k9 = k8 - 1; k9 >= k6; k9--) { - var kb = this._[k9]; - kb && kb.width && (this._[k9 + k7] = kb, delete this._[k9]); - } - this.len += k7; - } - }, { - key: "repeatColumn", - value: function (k6) { - var k7 = arguments.length > 1 && undefined !== arguments[1] ? arguments[1] : 1; - var k8 = arguments.length > 2 && undefined !== arguments[2] ? arguments[2] : 1; - var k9 = k7 * k8; - this.insertColumn(k6 + k7, k9); - for (var kb = k6; kb < k6 + k7; kb++) { - var kc = this._[kb]; - if (kc && kc.width) { - for (var kd = 1; kd < k8 + 1; kd++) { - this._[kb + kd * k7] = { - width: kc.width - }; - } - } - } - } - }, { - key: "moveColumn", - value: function (k6, k7) { - var k8 = this; - var k9 = this.getMoveColumns(k6, k7); - var kb = {}; - var kc = []; - k9.forEach(function (kh, kj) { - var kk = k8._[kj]; - kk && (kb[kh] = kk); - kc.push(kj); - }); - for (var kd = 0, kf = kc; kd < kf.length; kd++) { - var kg = kf[kd]; - delete this._[kg]; - } - Object.keys(kb).length > 0 && Object.assign(this._, kb); - } - }, { - key: "getMoveColumns", - value: function (k6, k7) { - var k8; - var k9; - if (Array.isArray(k6)) { - var kb = a4()(k6, 2); - k8 = kb[0]; - k9 = kb[1]; - } else { - k8 = k9 = k6; - } - var kc = new Map(); - if (k7 === k9 + 1) { - return kc; - } - var kd = k7; - k9 < k7 && (kd = k7 - (k9 - k8 + 1)); - for (var kf = 0, kg = k8; kg <= k9; kg++) { - var kh = kd + kf; - ++kf; - kc.set(kg, kh); - } - if (k8 > k7) { - for (var kj = k8 - 1; kj >= k7; kj--) { - var kk = kj + kf; - kc.set(kj, kk); - } - } else { - for (var km = k9 + 1; km < k7; km++) { - var kp = km - kf; - kc.set(km, kp); - } - } - return kc; - } - }]); - }(); - var aB = a2(8); - var aC = { - phone: /^[1-9]\d{10}$/, - email: /w+([-+.]w+)*@w+([-.]w+)*.w+([-.]w+)*/ - }; - function aD(k5, k6) { - var k7 = ""; - if (!k5) { - for (var k8 = arguments.length, k9 = new Array(k8 > 2 ? k8 - 2 : 0), kb = 2; kb < k8; kb++) { - k9[kb - 2] = arguments[kb]; - } - k7 = aB.b.apply(undefined, ["validation.".concat(k6)].concat(k9)); - } - return [k5, k7]; - } - var aE = function () { - return a8()(function k5(k6, k7, k8, k9) { - a6()(this, k5); - this.required = k7; - this.value = k8; - this.type = k6; - this.operator = k9; - this.message = ""; - }, [{ - key: "parseValue", - value: function (k6) { - var k7 = this.type; - return "date" === k7 ? new Date(k6) : "number" === k7 ? Number(k6) : k6; - } - }, { - key: "equals", - value: function (k6) { - var k7 = this.type === k6.type && this.required === k6.required && this.operator === k6.operator; - k7 && (k7 = Array.isArray(this.value) ? aw.a.arrayEquals(this.value, k6.value) : this.value === k6.value); - return k7; - } - }, { - key: "values", - value: function () { - return this.value.split(","); - } - }, { - key: "validate", - value: function (k6) { - var k7 = this.required; - var k8 = this.operator; - var k9 = this.value; - var kb = this.type; - if (k7 && /^\s*$/.test(k6)) { - return aD(false, "required"); - } - if (/^\s*$/.test(k6)) { - return [true]; - } - if (aC[kb] && !aC[kb].test(k6)) { - return aD(false, "notMatch"); - } - if ("list" === kb) { - return aD(this.values().includes(k6), "notIn"); - } - if (k8) { - var kc = this.parseValue(k6); - if ("be" === k8) { - var kd = a4()(k9, 2); - var kf = kd[0]; - var kg = kd[1]; - return aD(kc >= this.parseValue(kf) && kc <= this.parseValue(kg), "between", kf, kg); - } - if ("nbe" === k8) { - var kh = a4()(k9, 2); - var kj = kh[0]; - var kk = kh[1]; - return aD(kc < this.parseValue(kj) || kc > this.parseValue(kk), "notBetween", kj, kk); - } - if ("eq" === k8) { - return aD(kc === this.parseValue(k9), "equal", k9); - } - if ("neq" === k8) { - return aD(kc !== this.parseValue(k9), "notEqual", k9); - } - if ("lt" === k8) { - return aD(kc < this.parseValue(k9), "lessThan", k9); - } - if ("lte" === k8) { - return aD(kc <= this.parseValue(k9), "lessThanEqual", k9); - } - if ("gt" === k8) { - return aD(kc > this.parseValue(k9), "greaterThan", k9); - } - if ("gte" === k8) { - return aD(kc >= this.parseValue(k9), "greaterThanEqual", k9); - } - } - return [true]; - } - }]); - }(); - var aF = function () { - function k5(k6, k7, k8) { - a6()(this, k5); - this.refs = k7; - this.mode = k6; - this.validator = k8; - } - return a8()(k5, [{ - key: "includes", - value: function (k6, k7) { - for (var k8 = this.refs, k9 = 0; k9 < k8.length; k9 += 1) { - if (af.valueOf(k8[k9]).includes(k6, k7)) { - return true; - } - } - return false; - } - }, { - key: "addRef", - value: function (k6) { - this.remove(af.valueOf(k6)); - this.refs.push(k6); - } - }, { - key: "remove", - value: function (k6) { - var k7 = []; - this.refs.forEach(function (k8) { - var k9 = af.valueOf(k8); - k9.intersects(k6) ? k9.difference(k6).forEach(function (kb) { - return k7.push(kb.toString()); - }) : k7.push(k8); - }); - this.refs = k7; - } - }, { - key: "getData", - value: function () { - var k6 = this.refs; - var k7 = this.mode; - var k8 = this.validator; - return { - refs: k6, - mode: k7, - type: k8.type, - required: k8.required, - operator: k8.operator, - value: k8.value - }; - } - }], [{ - key: "valueOf", - value: function (k6) { - var k7 = k6.refs; - var k8 = k6.mode; - var k9 = k6.type; - var kb = k6.required; - var kc = k6.operator; - var kd = k6.value; - return new k5(k8, k7, new aE(k9, kb, kd, kc)); - } - }]); - }(); - var aG = function () { - return a8()(function k5() { - a6()(this, k5); - this._ = []; - this.errors = new Map(); - }, [{ - key: "getError", - value: function (k6, k7) { - return this.errors.get("".concat(k6, "_").concat(k7)); - } - }, { - key: "validate", - value: function (k6, k7, k8) { - var k9 = this.get(k6, k7); - var kb = "".concat(k6, "_").concat(k7); - var kc = this.errors; - if (null !== k9) { - var kd = k9.validator.validate(k8); - var kf = a4()(kd, 2); - var kg = kf[0]; - var kh = kf[1]; - kg ? kc.delete(kb) : kc.set(kb, kh); - } else { - kc.delete(kb); - } - return true; - } - }, { - key: "add", - value: function (k6, k7, k8) { - var k9 = k8.type; - var kb = k8.required; - var kc = k8.value; - var kd = k8.operator; - var kf = new aE(k9, kb, kc, kd); - var kg = this.getByValidator(kf); - null !== kg ? kg.addRef(k7) : this._.push(new aF(k6, [k7], kf)); - } - }, { - key: "getByValidator", - value: function (k6) { - for (var k7 = 0; k7 < this._.length; k7 += 1) { - var k8 = this._[k7]; - if (k8.validator.equals(k6)) { - return k8; - } - } - return null; - } - }, { - key: "get", - value: function (k6, k7) { - for (var k8 = 0; k8 < this._.length; k8 += 1) { - var k9 = this._[k8]; - if (k9.includes(k6, k7)) { - return k9; - } - } - return null; - } - }, { - key: "remove", - value: function (k6) { - this.each(function (k7) { - k7.remove(k6); - }); - } - }, { - key: "each", - value: function (k6) { - this._.forEach(function (k7) { - return k6(k7); - }); - } - }, { - key: "getData", - value: function () { - return this._.filter(function (k6) { - return k6.refs.length > 0; - }).map(function (k6) { - return k6.getData(); - }); - } - }, { - key: "setData", - value: function (k6) { - this._ = k6.map(function (k7) { - return aF.valueOf(k7); - }); - } - }]); - }(); - var aH = a2(26); - var aI = a2.n(aH); - var aJ = a2(11); - var aK = a2.n(aJ); - var aL = a2(23); - var aM = a2.n(aL); - var aN = a2(16); - var aO = a2.n(aN); - function aP(k5, k6) { - var k7 = "undefined" != typeof Symbol && k5[Symbol.iterator] || k5["@@iterator"]; - if (!k7) { - if (Array.isArray(k5) || (k7 = function (kf, kg) { - if (kf) { - if ("string" == typeof kf) { - return aQ(kf, kg); - } - var kh = {}.toString.call(kf).slice(8, -1); - "Object" === kh && kf.constructor && (kh = kf.constructor.name); - return "Map" === kh || "Set" === kh ? Array.from(kf) : "Arguments" === kh || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(kh) ? aQ(kf, kg) : undefined; - } - }(k5)) || k6 && k5 && "number" == typeof k5.length) { - k7 && (k5 = k7); - var k8 = 0; - var k9 = function () {}; - return { - s: k9, - n: function () { - return k8 >= k5.length ? { - done: true - } : { - done: false, - value: k5[k8++] - }; - }, - e: function (kf) { - throw kf; - }, - f: k9 - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - var kb; - var kc = true; - var kd = false; - return { - s: function () { - k7 = k7.call(k5); - }, - n: function () { - var kf = k7.next(); - kc = kf.done; - return kf; - }, - e: function (kf) { - kd = true; - kb = kf; - }, - f: function () { - try { - kc || null == k7.return || k7.return(); - } finally { - if (kd) { - throw kb; - } - } - } - }; - } - function aQ(k5, k6) { - (null == k6 || k6 > k5.length) && (k6 = k5.length); - for (var k7 = 0, k8 = Array(k6); k7 < k6; k7++) { - k8[k7] = k5[k7]; - } - return k8; - } - function aR(k5) { - var k6 = k5; - var k7 = k6[0]; - k6.sort(function (km, kp) { - return km.y1 === kp.y1 ? km.x1 - kp.x1 : km.y1 - kp.y1; - }); - for (var k8 = 1; k8 < k6.length; ++k8) { - var k9 = k6[k8]; - var kb = k7.border ? k7.border : {}; - var kc = k9.border ? k9.border : {}; - k7.y1 === k9.y1 && k7.y2 === k9.y2 ? kb.right || kc.left || kb.top !== kc.top || kb.bottom !== kc.bottom ? k7 = k9 : (k7.x2 = k9.x2, kb.right = kc.right, k9.hide = true) : k7 = k9; - } - (k6 = k6.filter(function (km) { - return !km.hide; - })).sort(function (km, kp) { - return km.x1 === kp.x1 ? km.y1 - kp.y1 : km.x1 - kp.x1; - }); - for (var kd = 0; kd < k6.length - 1; ++kd) { - var kf = k6[kd]; - var kg = kf.border; - if (!kf.hide) { - for (var kh = kd + 1; kh < k6.length; ++kh) { - var kj = k6[kh]; - if (!kj.hide) { - var kk = kj.border ? kj.border : {}; - if (kf.x1 !== kj.x1) { - break; - } - kf.y2 === kj.y1 && kf.x2 === kj.x2 && (kg.bottom || kk.top || kg.left !== kk.left || kg.right !== kk.right || (kf.y2 = kj.y2, kg.bottom = kk.bottom, kj.hide = true)); - } - } - } - } - return k6 = k6.filter(function (km) { - return !km.hide; - }); - } - function aS(k5, k6) { - var k7 = k5.x1; - var k8 = k5.x2; - var k9 = k5.y1; - var kb = k5.y2; - var kc = k6.x1; - var kd = k6.x2; - var kf = k6.y1; - var kg = k6.y2; - return (kf >= k9 && kf < kb || kg > k9 && kg <= kb) && kc >= k7 && kc < k8 && kd > k7 && kd <= k8; - } - function aT(k5, k6) { - var k7 = k5.x1; - var k8 = k5.x2; - var k9 = k5.y1; - var kb = k5.y2; - var kc = k6.x1; - var kd = k6.x2; - var kf = k6.y1; - var kg = k6.y2; - return (kf >= k9 && kf < kb || k9 >= kf && k9 < kg) && (kc >= k7 && kc < k8 || k7 >= kc && k7 < kd); - } - function aU(k5, k6) { - if (!aT(k5, k6)) { - return [k5]; - } - var k7 = [k5.x1, k5.x2, k6.x1, k6.x2]; - var k8 = [k5.y1, k5.y2, k6.y1, k6.y2]; - k7.sort(function (kc, kd) { - return kc - kd; - }); - k8.sort(function (kc, kd) { - return kc - kd; - }); - var kb = Array(4); - k5.y1 < k8[1] && (kb[0] = { - x1: k5.x1, - x2: k5.x2, - y1: k5.y1, - y2: k8[1] - }); - k5.y2 > k8[2] && (kb[1] = { - x1: k5.x1, - x2: k5.x2, - y1: k8[2], - y2: k5.y2 - }); - k5.x1 < k7[1] && (kb[2] = { - x1: k5.x1, - x2: k7[1], - y1: k8[1], - y2: k8[2] - }); - k5.x2 > k7[2] && (kb[3] = { - x1: k7[2], - x2: k5.x2, - y1: k8[1], - y2: k8[2] - }); - return kb = kb.filter(function (kc) { - return !!kc; - }); - } - var aV = { - uintTest: function () { - console.log(aS({ - x1: 45, - y1: 0, - x2: 112, - y2: 21 - }, { - x1: 45, - x2: 75, - y1: 0, - y2: 21 - })); - }, - containRect: aS, - intersect: aT, - rectSub: aU, - rectSubAll: function (k5, k6) { - var k7; - var k8 = [k5]; - var k9 = aP(k6); - try { - for (k9.s(); !(k7 = k9.n()).done;) { - var kb; - var kc = k7.value; - var kd = []; - var kf = aP(k8); - try { - for (kf.s(); !(kb = kf.n()).done;) { - var kg = aU(kb.value, kc); - kd = kd.concat(kg); - } - } catch (kh) { - kf.e(kh); - } finally { - kf.f(); - } - k8 = kd; - } - } catch (kj) { - k9.e(kj); - } finally { - k9.f(); - } - return k8; - }, - joinRect: aR, - rectFromLines: function (k5, k6) { - var k7; - var k8 = []; - var k9 = []; - var kb = aP(k5); - try { - for (kb.s(); !(k7 = kb.n()).done;) { - var kc = k7.value; - var kd = kc.x; - var kf = kc.y; - k8.push(kd); - k9.push(kf.y1); - k9.push(kf.y2); - } - } catch (kw) { - kb.e(kw); - } finally { - kb.f(); - } - var kg; - var kh = aP(k6); - try { - for (kh.s(); !(kg = kh.n()).done;) { - var kj = kg.value; - var kk = kj.x; - var km = kj.y; - k8.push(kk.x1); - k8.push(kk.x2); - k9.push(km); - } - } catch (kx) { - kh.e(kx); - } finally { - kh.f(); - } - k8 = Array.from(new Set(k8)); - k9 = Array.from(new Set(k9)); - k8.sort(function (ky, kz) { - return ky - kz; - }); - k9.sort(function (ky, kz) { - return ky - kz; - }); - var kp = []; - var kq = 0; - var ku = 0; - var kv = function () { - var ky = k9[kq]; - var kz = k9[kq + 1]; - var kA = function () { - var kB = k8[ku]; - var kC = k8[ku + 1]; - var kD = k6.some(function (kH) { - return ky === kH.y && kB >= kH.x.x1 && kC <= kH.x.x2; - }); - var kE = k6.some(function (kH) { - return kz === kH.y && kB >= kH.x.x1 && kC <= kH.x.x2; - }); - var kF = k5.some(function (kH) { - return kB === kH.x && ky >= kH.y.y1 && kz <= kH.y.y2; - }); - var kG = k5.some(function (kH) { - return kC === kH.x && ky >= kH.y.y1 && kz <= kH.y.y2; - }); - kp.push({ - x1: kB, - y1: ky, - x2: kC, - y2: kz, - border: { - top: kD, - bottom: kE, - left: kF, - right: kG - }, - hide: false - }); - }; - for (ku = 0; ku < k8.length - 1; ++ku) { - kA(); - } - }; - for (kq = 0; kq < k9.length - 1; ++kq) { - kv(); - } - return aR(kp); - }, - removeSegments: function (k5, k6) { - var k7 = []; - var k8 = k5.y1; - k6.sort(function (kd, kf) { - return kd.y1 - kf.y1; - }); - var k9; - var kb = aP(k6); - try { - for (kb.s(); !(k9 = kb.n()).done;) { - var kc = k9.value; - kc.y1 > k8 && k7.push({ - y1: k8, - y2: kc.y1 - }); - k8 = Math.max(k8, kc.y2); - } - } catch (kd) { - kb.e(kd); - } finally { - kb.f(); - } - k8 < k5.y2 && k7.push({ - y1: k8, - y2: k5.y2 - }); - return k7; - }, - equals: function k5(k6, k7) { - var k8 = Object.keys(k6); - if (k8.length !== Object.keys(k7).length) { - return false; - } - for (var k9 = 0; k9 < k8.length; k9 += 1) { - var kb = k8[k9]; - var kc = k6[kb]; - var kd = k7[kb]; - if (undefined === kd) { - return false; - } - if ("string" == typeof kc || "number" == typeof kc || "boolean" == typeof kc) { - if (kc !== kd) { - return false; - } - } else { - if (Array.isArray(kc)) { - if (kc.length !== kd.length) { - return false; - } - for (var kf = 0; kf < kc.length; kf += 1) { - if (!k5(kc[kf], kd[kf])) { - return false; - } - } - } else { - if ("function" != typeof kc && !Array.isArray(kc) && kc instanceof Object && !k5(kc, kd)) { - return false; - } - } - } - } - return true; - } - }; - function aW(k6, k7) { - var k8 = "undefined" != typeof Symbol && k6[Symbol.iterator] || k6["@@iterator"]; - if (!k8) { - if (Array.isArray(k6) || (k8 = function (kg, kh) { - if (kg) { - if ("string" == typeof kg) { - return aX(kg, kh); - } - var kj = {}.toString.call(kg).slice(8, -1); - "Object" === kj && kg.constructor && (kj = kg.constructor.name); - return "Map" === kj || "Set" === kj ? Array.from(kg) : "Arguments" === kj || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(kj) ? aX(kg, kh) : undefined; - } - }(k6)) || k7 && k6 && "number" == typeof k6.length) { - k8 && (k6 = k8); - var k9 = 0; - var kb = function () {}; - return { - s: kb, - n: function () { - return k9 >= k6.length ? { - done: true - } : { - done: false, - value: k6[k9++] - }; - }, - e: function (kg) { - throw kg; - }, - f: kb - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - var kc; - var kd = true; - var kf = false; - return { - s: function () { - k8 = k8.call(k6); - }, - n: function () { - var kg = k8.next(); - kd = kg.done; - return kg; - }, - e: function (kg) { - kf = true; - kc = kg; - }, - f: function () { - try { - kd || null == k8.return || k8.return(); - } finally { - if (kf) { - throw kc; - } - } - } - }; - } - function aX(k6, k7) { - (null == k7 || k7 > k6.length) && (k7 = k6.length); - for (var k8 = 0, k9 = Array(k7); k8 < k7; k8++) { - k9[k8] = k6[k8]; - } - return k9; - } - var aY = 1; - var aZ = 4; - var b0 = 1; - var b1 = 2; - var b2 = 1; - var b3 = 2; - var b4 = 3; - var b5 = 4; - var b6 = 5; - var b7 = 6; - var b8 = "#FFFFFFFF"; - function b9(k6, k7) { - switch (k6) { - case "alignment": - return function (k8) { - switch (k8 = bb(k8)) { - case b0: - return "right"; - case b1: - return "center"; - } - return "left"; - }(k7); - case "visible": - return function (k8) { - if ("string" == typeof k8 && "" !== (k8 = bd(k8))) { - var k9 = k8.split("\t"); - if (k9.length > 1) { - return "#{".concat(k9[1], "}"); - } - } - return bb(k8); - }(k7); - case "id": - case "font.weight": - case "font.italic": - case "font.underline": - case "font.strikethrough": - case "processing": - case "border": - case "tabsequence": - case "units": - case "level": - case "edit.limit": - return bb(k7); - case "font.height": - return Math.abs(bb(k7)); - case "x": - case "width": - case "x1": - case "x2": - return bh(k7, true, this.units); - case "y": - case "height": - case "y1": - case "y2": - return bh(k7, false, this.units); - case "color": - return bc(k7); - case "background.color": - return 0 === (k7 = bb(k7)) ? b8 : bc(k7); - case "retrieve": - return bd(k7); - case "values": - return function (k8) { - var k9 = bd(k8); - "/" === k9[k9.length - 1] && (k9 = k9.substring(0, k9.length - 1)); - return k9.split("/").map(function (kb) { - var kc = kb.split("\t"); - return { - key: kc[0], - value: kc[1] - }; - }); - }(k7); - default: - return bd(k7); - } - } - function bb(k6) { - return "string" == typeof k6 ? k6.length > 0 ? ("\"" === k6.charAt(0) && (k6 = "\"" !== k6.charAt(k6.length - 1) ? k6.substring(1) : k6.substring(1, k6.length - 1)), parseInt(k6)) : 0 : k6; - } - function bc(k6) { - if ("" !== (k6 = bd(k6))) { - var k7 = k6.split("\t"); - if (k7.length > 1) { - return "#{".concat(k7[1], "}"); - } - } - return bg(k6); - } - function bd(k6) { - var k7 = arguments.length > 1 && undefined !== arguments[1] ? arguments[1] : "\""; - if ("string" == typeof k6) { - if (k6.length > 0 && k6.charAt(0) === k7) { - for (var k8 = false, k9 = [], kb = 1; kb < k6.length - 1; kb++) { - var kc = k6.charAt(kb); - if ("~" !== kc || false !== k8) { - if (k8) { - switch (kc) { - case "r": - k9.push("\r"); - break; - case "n": - k9.push("\n"); - break; - case "t": - k9.push("\t"); - break; - case "~": - k9.push("~"); - break; - case k7: - k9.push(k7); - break; - default: - k9.push(" "); - } - } else { - k9.push(kc); - } - k8 = false; - } else { - k8 = true; - } - } - return k9.join(""); - } - return k6; - } - return "" + k6; - } - var bf = [{ - value: 16777215, - color: b8 - }, { - value: 536870912, - color: b8 - }, { - value: 553648127, - color: b8 - }, { - value: 1073741824, - color: "#FFFFFF" - }, { - value: 33554432, - color: "#BFBFBFB2" - }, { - value: 268435456, - color: "#ABABAB" - }, { - value: 67108864, - color: "#F0F0F0" - }, { - value: 134217728, - color: "#C8C8C8" - }, { - value: 134217729, - color: "#000000" - }, { - value: 134217730, - color: "#99B4D1" - }, { - value: 134217731, - color: "#99B4D1" - }, { - value: 134217732, - color: "#F0F0F0" - }, { - value: 134217734, - color: "#646464" - }, { - value: 134217735, - color: "#000000" - }, { - value: 134217737, - color: "#BFBFBFB2" - }, { - value: 134217738, - color: "#B4B4B4" - }, { - value: 134217739, - color: "#F4F7FC" - }, { - value: 134217741, - color: "#0078D7" - }, { - value: 134217742, - color: "#FFFFFF" - }, { - value: 134217744, - color: "#A0A0A0" - }, { - value: 134217745, - color: "#6D6D6D" - }, { - value: 134217746, - color: "#BFBFBFB2" - }, { - value: 134217747, - color: "#BFBFBFB2" - }, { - value: 134217748, - color: "#FFFFFF" - }, { - value: 134217749, - color: "#696969" - }, { - value: 134217750, - color: "#E3E3E3" - }, { - value: 134217751, - color: "#000000" - }, { - value: 134217752, - color: "#FFFFE1" - }, { - value: 134217856, - color: "#0000FF" - }, { - value: 134217857, - color: "#FF0000" - }, { - value: 134217858, - color: "#800080" - }, { - value: 134217859, - color: "#800080" - }]; - function bg(k6) { - k6 = bb(k6); - var k7; - var k8 = aW(bf); - try { - for (k8.s(); !(k7 = k8.n()).done;) { - var k9 = k7.value; - if (k9.value === k6) { - return k9.color; - } - } - } catch (kf) { - k8.e(kf); - } finally { - k8.f(); - } - var kb = k6 >> 8 & 255; - var kc = k6 >> 16 & 255; - var kd = function (kg) { - var kh = kg.toString(16); - kh.length < 2 && (kh = "0".concat(kh)); - return kh; - }; - return "#".concat(kd(255 & k6)).concat(kd(kb)).concat(kd(kc)); - } - function bh(k6, k7, k8) { - switch (k6 = bb(k6), k8 || (k8 = 0), k8) { - case 0: - return k7 ? Math.round(0.21875 * k6) : Math.round(0.25 * k6); - case 1: - case 2: - case 3: - default: - return k6; - } - } - function bj(k6) { - var k7 = {}; - var k8 = {}; - var k9 = { - header: k7, - trailer: k8 - }; - for (var kb in k6) if (kb.startsWith("header.")) { - var kc = kb.substring(7); - k7[kc] = b9.call(this, kc, k6[kb]); - } else { - if (kb.startsWith("trailer.")) { - var kd = kb.substring(8); - k8[kd] = b9.call(this, kd, k6[kb]); - } else { - k9[kb] = k6[kb]; - } - } - return k9; - } - function bk(k6) { - for (var k7 = / ?\("([a-zA-Z_0-9]+)", ?([a-zA-Z_]+)\)/g, k8 = [];;) { - var k9 = k7.exec(k6); - if (!k9) { - break; - } - var kb = k9[1]; - var kc = k9[2]; - k8.push({ - arg: kb, - type: kc - }); - } - return k8; - } - function bm(k6) { - var k7 = k6.indexOf(";"); - return k7 > 0 ? k6.substring(0, k7) : k6; - } - function bp(k6) { - for (var k7 = / ?\("([\w\u4e00-\u9fff]+)", ?column=\("([\w\u4e00-\u9fff]+)", ?(\w+), ?(\w+)\)\)/g, k8 = [];;) { - var k9 = k7.exec(k6); - if (!k9) { - break; - } - var kb = k9[1]; - var kc = k9[2]; - var kd = "orig" === k9[3]; - var kf = k9[4]; - kc = bm(kc); - k8.push({ - arg: kb, - column: { - name: kc, - orig: kd, - ref: kf - } - }); - } - return k8; - } - function bq(k6) { - return new bu(k6).dataObject; - } - var bu = a8()(function k6(k7) { - a6()(this, k6); - this.ob = {}; - this.units = 0; - for (var k8 = /([a-z|A-Z]+)(\[\d+\])? ?(\()/, k9 = 0;;) { - var kb = k8.exec(k7); - if (!kb) { - break; - } - var kc = kb.index + kb[0].length; - var kd = bw(k7, kc, "(", ")"); - var kf = k7.substring(kc, kd); - var kg = kb[1]; - var kh = -1; - if (kb[2]) { - var kj = kb[2].substring(1, kb[2].length - 1); - kh = Number(kj); - } - var kk = bv.call(this, kf, kg).attrs; - switch (k7 = k7.substring(kd + 1), kg) { - case "column": - case "text": - case "compute": - case "line": - case "rectangle": - case "group": - case "button": - case "bitmap": - kk.key = kg; - "foreground" === kk.band ? kk.index = 10000 + ++k9 : "background" === kk.band ? kk.index = ++k9 - 10000 : kk.index = ++k9; - this.ob.hasOwnProperty(kg) ? this.ob[kg].push(kk) : this.ob[kg] = [kk]; - break; - case "header": - this.ob[kg] = kk; - kh >= 0 && (this.ob._maxHeaderIndex = kh); - break; - default: - this.ob[kg] = kk; - "datawindow" === kg && (this.units = kk.units); - } - } - var km = this.ob.datawindow.processing; - var kp = this.ob; - var kq = kp.table; - var ku = kp.group; - kp.crosstab; - var kv = kq.retrieve; - if (kv && (kv = function (kQ) { - if (!kQ) { - return ""; - } - var kR = (kQ = bd(kQ)).indexOf("PBSELECT("); - if (0 !== kR) { - return kQ; - } - for (var kS = bw(kQ, kR += 9, "(", ")"), kT = kQ.substring(kR, kS), kU = /([a-z|A-Z]+) ?(\()/g, kV = [], kW = [], kX = [], kY = [], kZ = [], l0 = [], l1 = [], l2 = [], l3 = [];;) { - var l4 = kU.exec(kT); - if (!l4) { - break; - } - kS = bw(kT, kR = l4.index + l4[0].length, "(", ")"); - var l5 = kT.substring(kR, kS); - var l6 = l4[1]; - var l7 = bv.call(this, l5).attrs; - if (l7) { - switch (l6) { - case "COLUMN": - kV.push(l7.NAME); - break; - case "TABLE": - kW.push(l7.NAME); - break; - case "GROUP": - kZ.push(l7.NAME); - break; - case "WHERE": - l5 = "(".concat(l7.EXP1, " ").concat(l7.OP, " ").concat(l7.EXP2, ")"); - l7.LOGIC && (l5 = "".concat(l5, " ").concat(l7.LOGIC)); - kX.push(l5); - break; - case "HAVING": - l5 = "(".concat(l7.EXP1, " ").concat(l7.OP, " ").concat(l7.EXP2, ")"); - l7.LOGIC && (l5 = "".concat(l5, " ").concat(l7.LOGIC)); - kY.push(l5); - break; - case "JOIN": - if (l7.OUTER1 || l7.OUTER2) { - var l8 = l7.LEFT.split("."); - l2.push(l8[0]); - l8 = l7.RIGHT.split("."); - l2.push(l8[0]); - l5 = l7.OUTER1 ? "".concat(l7.LEFT, " LEFT JOIN ").concat(l7.RIGHT, " ") : "".concat(l7.LEFT, " RIGHT JOIN ").concat(l7.RIGHT, " "); - l5 += "on ".concat(l7.LEFT, " ").concat(l7.OP, " ").concat(l7.RIGHT); - l3.push(l5); - } else { - l5 = "(".concat(l7.LEFT, " ").concat(l7.OP, " ").concat(l7.RIGHT, ")"); - l1.push(l5); - } - break; - case "ORDER": - "yes" !== l7.ASC ? l0.push("".concat(l7.NAME, " desc")) : l0.push(l7.NAME); - } - } - } - l2.length > 0 && (kW = kW.filter(function (lc) { - return !l2.some(function (ld) { - return ld === lc; - }); - }), kW = [].concat(l3, ac()(kW))); - var l9 = "select ".concat(kV.join(" , "), " from ").concat(kW.join(" , "), " "); - if (kX.length > 0 || l1.length > 0) { - if (l9 += "where ", l1.length > 0) { - var lb = kX.length > 0 ? "and" : ""; - l9 += " (".concat(l1.join(" "), ") ").concat(lb, " "); - } - kX.length > 0 && (l9 += " (".concat(kX.join(" "), ") ")); - } - kZ.length > 0 && (l9 += "group by ".concat(kZ.join(" , "), " ")); - kY.length > 0 && (l9 += "having ".concat(kY.join(" "), " ")); - l0.length > 0 && (l9 += "order by ".concat(l0.join(" , "), " ")); - return l9; - }(kv)), ku) { - var kw; - var kx = []; - var ky = aW(ku); - try { - for (ky.s(); !(kw = ky.n()).done;) { - var kz = kw.value; - kx.push(bj.call(this, kz)); - } - } catch (kQ) { - ky.e(kQ); - } finally { - ky.f(); - } - this.ob.group = kx.sort(function (kR, kS) { - return kR.level - kS.level; - }); - } - var kA = this.ob.table.arguments; - var kB = bx.apply(this); - var kC = bG.call(this, kB, km); - var kD = { - processing: km, - table: { - retrieve: kv, - columns: kB, - update: bd(this.ob.table.update), - updatewhere: bb(this.ob.table.updatewhere), - updatekeyinplace: "yes" === this.ob.table.updatekeyinplace, - arguments: kA, - props: {} - }, - reportData: kC - }; - if (kq["update.method"] && (kD.table.props.update = { - method: { - type: kq["update.method.type"], - name: bm(kq["update.method"]), - arguments: kq["update.method.arguments"] - } - }), kq["delete.method"] && (kD.table.props.delete = { - method: { - type: kq["delete.method.type"], - name: bm(kq["delete.method"]), - arguments: kq["delete.method.arguments"] - } - }), kq["insert.method"] && (kD.table.props.insert = { - method: { - type: kq["insert.method.type"], - name: bm(kq["insert.method"]), - arguments: kq["insert.method.arguments"] - } - }), kq.procedure && (kD.table.procedure = function (kR) { - var kS = kR.replaceAll("1 ", " "); - return kS = kS.replace(";", " "); - }(kq.procedure)), kq.sort && (kD.table.sort = function (kR) { - for (var kS = kR.trim().split(" "), kT = [], kU = 0; kU < kS.length; kU += 2) { - var kV = kS[kU] + " " + kS[kU + 1]; - kT.push(kV); - } - return kT.join(", "); - }(kq.sort)), this.ob.group) { - var kE; - kD.reportData.report.group = []; - var kF = kD.reportData.report.group; - var kG = aW(this.ob.group); - try { - for (kG.s(); !(kE = kG.n()).done;) { - var kH = kE.value; - var kI = kH.level; - var kJ = kH.by; - kF.push({ - level: kI, - by: kJ - }); - } - } catch (kR) { - kG.e(kR); - } finally { - kG.f(); - } - } - if (this.ob.crosstab) { - var kK = function (kS) { - var kT = {}; - kS.columns && (kT.columns = kS.columns.split(",").map(function (kU) { - return kU.trim(); - })); - kS.rows && (kT.rows = kS.rows.split(",").map(function (kU) { - return kU.trim(); - })); - kS.sourcenames && (kT.sourcenames = kS.sourcenames.split(",").map(function (kU) { - return kU.trim(); - })); - kS.values && (kT.values = kS.values.split(",").map(function (kU) { - return function (kV) { - var kW = kV.match(/sum\s*\(\s*(\w+)\s*for\s+crosstab\s*\)/); - if (kW) { - return { - value: kV, - col: kW[1] - }; - } - }(kU.trim()); - })); - return kT; - }(this.ob.crosstab); - kD.reportData.report.crosstab = kK; - var kL = kD.reportData.report.bands.find(function (kS) { - return "detail" === kS.name; - }); - if (!kL) { + const _0x5b8e4a = _0x4d0cec.textContent.trim(); + console[_0x1b2ed8(351)](_0x1b2ed8(340) + _0x5b8e4a); + const _0x3c55b0 = await translateText(_0x5b8e4a); + console[_0x1b2ed8(351)](_0x1b2ed8(283) + _0x3c55b0); + const _0x2b9bd6 = await mergeType2CaptchaImages(_0x44178b); + if (!_0x2b9bd6) { + { + console.error(_0x1b2ed8(361)); return; } - var kM = kL.start; - var kN = kD.reportData.rows; - var kO = kK.values[0].col; - var kP = /#\{\s*crosstabsum\(\s*(\d+)\s*\)\s*\}/; - Object.entries(kN).forEach(function (kS) { - var kT = a4()(kS, 2); - var kU = kT[0]; - var kV = kT[1]; - kU = parseInt(kU, 10); - var kW = kV.cells; - for (var kX in kW) { - var kY = kW[kX]; - kY.text && (kU === kM && kY.text === "#{".concat(kO, "}") && (kK.start = Number(kX), kK.len = 1), kP.test(kY.text) && (kY.text = kY.text.replace(kP, "#{crosstabsum('".concat(kO, "')}")))); - } - }); } - this.dataObject = kD; - }); - function bv(k7, k8) { - for (var k9 = /([a-z|A-Z|.|_|0-9]+) ?= ?([^\s]+)/g, kb = {};;) { - var kc = k9.exec(k7); - if (!kc) { - return { - attrs: kb - }; - } - var kd = kc[1]; - var kf = kc[2]; - switch (kd) { - case "column": - var kg = k7.indexOf(kc[2], kc.index) + 1; - var kh = bw(k7, kg, "(", ")"); - var kj = k7.substring(kg, kh); - var kk = bv.call(this, kj); - kb[kd] ? kb[kd].push(kk.attrs) : kb[kd] = [kk.attrs]; - k9.lastIndex = kh; - break; - case "arguments": - var km = k7.indexOf(kc[2], kc.index) + 1; - var kp = bw(k7, km, "(", ")"); - var kq = k7.substring(km, kp); - kb[kd] = bk(kq); - break; - case "by": - var ku = k7.indexOf(kc[2], kc.index) + 1; - var kv = bw(k7, ku, "(", ")"); - var kw = k7.substring(ku, kv).trim().split(","); - kw = kw.map(function (kC) { - return (kC = kC.trim()).substring(1, kC.length - 1); - }); - kb[kd] = kw; - break; - case "update.method.arguments": - case "insert.method.arguments": - case "delete.method.arguments": - var kx = k7.indexOf(kc[2], kc.index) + 1; - var ky = bw(k7, kx, "(", ")"); - var kz = k7.substring(kx, ky); - kb[kd] = bp(kz); - k9.lastIndex = ky; - break; - case "retrieve": - case "procedure": - case "expression": - case "OP": - case "text": - case "EXP1": - case "EXP2": - case "values": - case "tag": - case "format": - case "visible": - case "color": - case "sort": - case "columns": - case "rows": - case "sourcenames": - if (kc[2].startsWith("\"")) { - var kA = k7.indexOf(kc[2], kc.index) + 1; - var kB = bw(k7, kA, "\"", "\""); - kf = k7.substring(kA - 1, kB + 1); - k9.lastIndex = kB; - } - kb[kd] = "crosstab" === k8 && "values" === kd ? bd(kf) : b9.call(this, kd, kf); - break; - default: - kb[kd] = b9.call(this, kd, kf); - } - } - return { - attrs: kb + const _0x163a03 = { + "username": CAPTCHA_CONFIG[_0x1b2ed8(420)], + "password": CAPTCHA_CONFIG.password, + "typeid": CAPTCHA_CONFIG[_0x1b2ed8(321)], + "softid": CAPTCHA_CONFIG[_0x1b2ed8(318)], + "remark": _0x3c55b0, + "image": _0x2b9bd6[_0x1b2ed8(242)], + "prompt": _0x5b8e4a }; - } - function bw(k7, k8, k9, kb) { - for (var kc = 1, kd = k7.length, kf = kd, kg = 0, kh = k8; kh < kd; ++kh) { - var kj = k7.charAt(kh); - if ("\"" === kj) { - for (var kk = kh - 1, km = 0; kk >= k8 && "~" === k7.charAt(kk);) { - ++km; - --kk; - } - 1 === km && (kg = 0 === kg ? 1 : 0); + console.log(_0x1b2ed8(390)); + const _0x3cc6ee = await fetch(CAPTCHA_CONFIG[_0x1b2ed8(311)], { + "method": _0x1b2ed8(249), + "headers": { + "Content-Type": _0x1b2ed8(289) + }, + "body": JSON[_0x1b2ed8(319)](_0x163a03) + }), + _0x24533c = await _0x3cc6ee[_0x1b2ed8(410)](); + if (_0x24533c[_0x1b2ed8(360)]) { + { + console[_0x1b2ed8(351)]("[类型2处理] 识别成功: " + _0x24533c[_0x1b2ed8(369)][_0x1b2ed8(435)]); + window[_0x1b2ed8(353)] = _0x24533c[_0x1b2ed8(369)].id; + const _0x533318 = getElementPosition(_0x28008f); + await simulateType2Clicks(_0x533318, _0x2b9bd6, _0x24533c[_0x1b2ed8(369)].result); + (await isSpinnerVisible()) && (console[_0x1b2ed8(351)](_0x1b2ed8(426)), await waitForSpinnerToDisappear()); + await clickConfirmButton(); + (await isSpinnerVisible()) && (console[_0x1b2ed8(351)](_0x1b2ed8(347)), await waitForSpinnerToDisappear()); } - if (1 !== kg) { - if (kj === k9) { - if (++kc, k9 === kb) { - kf = kh; - break; - } - } else { - if (kj === kb && 0 === --kc) { - kf = kh; - break; - } - } - } else { - kg = 0; - } - } - return kf; + } else console[_0x1b2ed8(412)](_0x1b2ed8(303) + _0x24533c[_0x1b2ed8(377)]); } - function bx() { - var k7; - var k8 = []; - var k9 = aW(this.ob.table.column); - try { - for (k9.s(); !(k7 = k9.n()).done;) { - var kb = k7.value; - var kc = kb.type; - var kd = kb.values; - switch (kc.substring(0, 4)) { - case "char": - kc = "string"; - break; - case "deci": - kc = "number"; - } - var kf = { - name: kb.name, - dbname: bd(kb.dbname), - type: kc, - update: "yes" === kb.update - }; - kb.key && "yes" === kb.key && (kf.key = true); - kb.initial && (kf.initvalue = kb.initial); - kd && ("long" === kc && kd.forEach(function (kg) { - kg.value = parseInt(kg.value, 10); - }), kf.values = kd); - k8.push(kf); - } - } catch (kg) { - k9.e(kg); - } finally { - k9.f(); - } - return k8; - } - function by(k7) { - var k8 = null; - var k9 = k7["checkbox.text"]; - if (undefined !== k9) { - var kb = k7["checkbox.on"]; - var kc = k7["checkbox.off"]; - k7.column && "long" === k7.column.type && (kb = parseInt(kb, 10), kc = parseInt(kc, 10)); - return k8 = { - style: "checkbox", - attrs: { - text: k9, - on: kb, - off: kc - } - }; - } - var kd = k7["radiobuttons.columns"]; - if (kd) { - return k8 = { - style: "radiobuttons", - attrs: { - columns: parseInt(kd, 10) - } - }; - } - var kf = k7["dddw.name"]; - if (kf) { - return k8 = { - style: "dropdowndw", - attrs: { - name: kf, - displayColumn: k7["dddw.displaycolumn"], - dataColumn: k7["dddw.datacolumn"], - percentWidth: parseInt(k7["dddw.percentwidth"], 10), - lines: parseInt(k7["dddw.lines"], 10), - autoRetrieve: "no" !== k7["dddw.autoretrieve"] - } - }; - } - var kg = k7["ddlb.allowedit"]; - return undefined !== kg ? k8 = { - style: "dropdownlistbox", - attrs: { - allowedit: "yes" === kg - } - } : k8; - } - function bz(k7) { - var k8 = {}; - var k9 = {}; - var kb = k7["font.face"]; - kb && "@" === kb.substring(0, 1) && (kb = kb.substring(1)); - kb && "System" !== kb && (k9.name = kb); - k7["font.height"] && 10 !== k7["font.height"] && (k9.size = k7["font.height"]); - var kc = k7["font.weight"]; - kc && kc >= 700 && (k9.bold = true); - 1 === k7["font.italic"] && (k9.italic = true); - 1 === k7["font.underline"] && (k8.underline = true); - 1 === k7["font.strikethrough"] && (k8.strike = true); - k7.alignment && "left" !== k7.alignment && (k8.align = k7.alignment); - k7.position.valign && (k8.valign = k7.position.valign); - k7.position.border && (k8.border = k7.position.border); - k7.color && "#BFBFBFB2" !== k7.color && ("string" == typeof k7.color && k7.color.startsWith("#{") || (k8.color = k7.color)); - var kd = k7["background.color"]; - kd && kd !== b8 && ("string" == typeof kd && kd.startsWith("#{") || (k8.bgcolor = kd)); - Object.keys(k9).length > 0 && (k8.font = k9); - return Object.keys(k8).length > 0 ? k8 : null; - } - function bA(k7, k8) { - if (!k8) { - return -1; - } - var k9 = k7.findIndex(function (kb) { - return aV.equals(kb, k8); + } catch (_0x39dcff) { + console[_0x1b2ed8(412)](_0x1b2ed8(416), _0x39dcff); + } finally { + window[_0x1b2ed8(343)] = false; + window[_0x1b2ed8(380)] = Date[_0x1b2ed8(276)](); + } +} +async function mergeType2CaptchaImages(_0x215b8b) { + return new Promise(_0x37a7d3 => { + const _0x3407ed = _0x2bc3; + try { + const _0x2ca2c2 = document[_0x3407ed(334)](_0x3407ed(389)), + _0x1fcc3e = _0x2ca2c2.getContext("2d"), + _0x2d1661 = _0x215b8b[0][_0x3407ed(407)] + 13 + _0x215b8b[1][_0x3407ed(407)], + _0x1865be = Math.max(_0x215b8b[0][_0x3407ed(417)], _0x215b8b[1][_0x3407ed(417)]); + _0x2ca2c2.width = _0x2d1661; + _0x2ca2c2[_0x3407ed(417)] = _0x1865be; + _0x1fcc3e.drawImage(_0x215b8b[0], 0, 0, _0x215b8b[0][_0x3407ed(407)], _0x215b8b[0][_0x3407ed(417)]); + _0x1fcc3e.drawImage(_0x215b8b[1], _0x215b8b[0][_0x3407ed(407)] + 13, 0, _0x215b8b[1][_0x3407ed(407)], _0x215b8b[1][_0x3407ed(417)]); + const _0x153130 = _0x2ca2c2[_0x3407ed(356)](_0x3407ed(251))[_0x3407ed(280)](",")[1]; + _0x37a7d3({ + "base64": _0x153130, + "width": _0x2d1661, + "height": _0x1865be, + "image1Width": _0x215b8b[0][_0x3407ed(407)], + "image1Height": _0x215b8b[0][_0x3407ed(417)], + "image2Width": _0x215b8b[1][_0x3407ed(407)], + "image2Height": _0x215b8b[1][_0x3407ed(417)] }); - -1 === k9 && (k7.push(k8), k9 = k7.length - 1); - return k9; + } catch (_0x81f56b) { + console[_0x3407ed(412)]("[图片合并] 合并图片时出错:", _0x81f56b); + _0x37a7d3(null); } - function bB(k7) { - for (var k8 = 0, k9 = 0; k9 < k7.length - 1; k9 += 1) { - var kb = k7.charCodeAt(k9) - 65; - var kc = k7.length - 1 - k9; - k8 += Math.pow(26, kc) + 26 * kb; - } - return k8 += k7.charCodeAt(k7.length - 1) - 65; - } - function bC(k7) { - for (var k8 = "", k9 = "", kb = 0; kb < k7.length; kb += 1) { - k7.charAt(kb) >= "0" && k7.charAt(kb) <= "9" ? k9 += k7.charAt(kb) : k8 += k7.charAt(kb); - } - return [bB(k8), parseInt(k9, 10) - 1]; - } - function bD(k7, k8) { - return "".concat(function (k9) { - for (var kb = "", kc = k9; kc >= 26;) { - kc /= 26; - kc -= 1; - kb += String.fromCharCode(parseInt(kc, 10) % 26 + 65); - } - var kd = k9 % 26; - return kb += String.fromCharCode(kd + 65); - }(k7)).concat(k8 + 1); - } - function bE(k7) { - var k8 = k7.split(":"); - var k9 = bC(k8[0]); - var kb = a4()(k9, 2); - var kc = kb[0]; - var kd = kb[1]; - var kf = kd; - var kg = kc; - if (k8.length > 1) { - var kh = bC(k8[1]); - var kj = a4()(kh, 2); - kg = kj[0]; - kf = kj[1]; - } + }); +} +function _0x55b8() { + const _0x36354c = ["[类型1处理] 刷新后检测到加载动画,等待加载完成...", "top", "crossOrigin", "#verification > div > div > div > div.btnWrap-1LOpd > div.text-gSdWn.textBtn-2BG0E", ") 原始坐标: (", "._3Gh2KHBV", "[类型2点击] 合并图片尺寸: width=", "69292sCupGw", "display", "width", "[九宫格处理] 图片", "querySelectorAll", "json", "[九宫格处理] 验证码加载超时", "error", "pageXOffset", "18nvlabc", "text", "[类型2处理] 处理验证码时出错:", "height", ", y=", "Figure 1", "username", "readyState", "._2BsY-ufz", "style", "[九宫格处理] 刷新后验证码加载超时", "[类型1处理] 开始处理单图验证码", "[类型2处理] 点击后检测到加载动画,等待完成...", "[九宫格处理] 翻译结果: ", "type", "dispatchEvent", "div.subTitle-3S0ER.subTitle-VGrF0", "[类型1处理] 验证码提示: ", "[类型1点击] 准备点击第 ", "1iFbDis", "个点: (", "result", "加载失败,尺寸无效", "图片尺寸:", "#Picture > div._37VAF0Np > div._2Alt0zsN", "none", "[九宫格处理] 未找到提示词元素", "[类型1处理] 识别成功: ", "anonymous", "[九宫格确认] 点击确认按钮 (", "base64", "[九宫格确认] 未找到确认按钮", "img.lazy-image", "", "[九宫格刷新] 等待加载完成...", "[类型1点击] 图片位置: x=", "#captchaImg", "POST", "map", "image/png", "._2zehNgas", "?inputtext=", "[九宫格处理] 处理验证码时出错:", "[类型1点击] 模拟点击流程完成", "[验证码刷新] 出错:", "[类型2处理] 未找到足够的验证码图片元素,当前找到:", ".ZVIQM964 svg", ") 的元素", "mousemove", "[九宫格处理] 识别失败: ", "[类型1处理] 验证码图片的Base64数据为空", "[类型2点击] 准备点击第 ", "980890yJsISk", "add", "options", "[九宫格处理] 未找到完整的九宫格图片元素,当前找到:", "pageYOffset", "[九宫格处理] 识别成功: ", "[类型1处理] 正在调用打码平台API...", "网络请求异常", "getBoundingClientRect", "1060710CYeYwg", "[九宫格合并] 需要9张图片", "round", "now", "remove", "mouseover", "[九宫格处理] 验证图片加载状态...", "split", "
    ", "[检测模块] 检测到单图验证码", "[类型2处理] 翻译结果: ", "mouseout", "[九宫格处理] 未找到验证码图片容器", "onload", "mousedown", "._2tSNOCuL", "application/json", "[类型2点击] 开始模拟点击流程 (基于合并后大图)", "[类型2处理] 未找到验证码图片容器", "[验证码刷新] 错误:未找到刷新按钮", "click", "trim", "._3Kspx2NT._3rODZQlY._1-CtAMMT._142Hsqej._3_x4R_c5", "[检测模块] 检测到双图验证码", "[九宫格点击] 点击第", "[类型2点击] 无效的坐标字符串", "src", "[类型2处理] 检测到加载动画,等待加载完成...", "onerror", "无法找到位于 (", "[类型2处理] 识别失败: ", ".picture-img-2BsY-", "[类型1处理] 未找到提示词元素", "[九宫格处理] 等待验证码完全加载...", "div[role=\"dialog\"]", "1801818CzTSNn", "ef8afb78e402495484642ea5deb8d443", "4003304CThNhd", "apiUrl", "active", "[九宫格刷新] 触发刷新...", "includes", "3210dDHUxN", "[类型1处理] 处理验证码时出错:", "textContent", "softid", "stringify", "password", "typeid", "[报错功能] 报错成功", "scrollX", "visibility", " 个点: (", "145reVQTI", "[类型2点击] 准备点击确认按钮,位置: (", ", height=", "._3Gh2KHBV img.lazy-image", "[检测模块] 检测到九宫格验证码", "[类型2点击] 确认按钮点击完成", "[类型2点击] 未找到确认按钮", "div._3S0ERvXx._24_syvQ2", "createElement", "getComputedStyle", "GET", "Figure 2", ".picWrap-1DemK", "[类型2处理] 已触发验证码刷新", "[类型2处理] 验证码提示: ", ".btn-3Kspx.primary-3rODZ.loose-1-CtA.xl-142Hs.btn-1je6A", "[系统初始化] 验证码自动识别系统已停止", "isProcessingCaptcha", "naturalWidth", "hidden", "filter", "[类型2处理] 确认后检测到加载动画,等待完成...", "drawImage", "complete", "[九宫格点击] 开始模拟点击 (容器位置:", "log", "[类型2处理] 刷新验证码时出错:", "lastCaptchaId", "querySelector", ", width=", "toDataURL", "[系统初始化] 验证码自动识别系统已启动", "._1DemKYKR", "[类型1处理] 翻译结果: ", "success", "[类型2处理] 合并验证码图片失败", "https://api.ttshitu.com/reporterror.json", "[九宫格刷新] 加载超时", "random", "[九宫格处理] 确认后加载超时", "captchaDetectionInterval", ".refresh-27d6x .icon-ZVIQM svg", "length", "data", "[九宫格处理] 验证码提示: ", "[九宫格处理] 合并验证码图片失败", "[九宫格点击] 无效坐标: ", "from", "classList", "个点击点", "warn", "message", "[类型2点击] 点击确认按钮时出错:", "[类型2处理] 未找到提示词元素", "lastCaptchaTime", "1568959CuzgLS", "elementFromPoint", "[九宫格刷新] 刷新出错:", "mouseup", "[九宫格点击] 无效坐标", ".gSdWn7Dw._1FtpsoBN", "load", ".picture-text-2Alt0", "canvas", "[类型2处理] 正在调用打码平台API...", ".refreshSvg-2zehN", "left", "text/html", "[类型2点击] 模拟点击流程完成", "substring", "4983hhiATw", "._3Kspx2NT._3rODZQlY._1-CtAMMT._142Hsqej._1je6AsL4"]; + _0x55b8 = function () { + return _0x36354c; + }; + return _0x55b8(); +} +async function simulateType2Clicks(_0x1b6db4, _0x3a9f8d, _0x10afc0) { + const _0x2afe79 = _0x30b83a; + console.log(_0x2afe79(290)); + console.log("[类型2点击] 容器位置: x=" + _0x1b6db4.x + _0x2afe79(418) + _0x1b6db4.y); + console[_0x2afe79(351)](_0x2afe79(404) + _0x3a9f8d.width + _0x2afe79(328) + _0x3a9f8d[_0x2afe79(417)]); + const _0x1ffe71 = _0x10afc0[_0x2afe79(280)]("|")[_0x2afe79(346)](Boolean); + if (_0x1ffe71[_0x2afe79(368)] === 0) { + console.error(_0x2afe79(298)); + return; + } + const _0x1aed22 = _0x1ffe71.map(_0x26f73c => { + { + const [_0x307174, _0x33b3e0] = _0x26f73c.split(",").map(Number); return { - sri: kd, - sci: kc, - eri: kf, - eci: kg + "x": _0x307174, + "y": _0x33b3e0 }; } - var bF = function () { - return a8()(function k7(k8, k9, kb) { - a6()(this, k7); - this.report = k9; - kb || (kb = k9[k8]); - var kc = { - name: k8, - height: kb ? kb.height : 0, - color: kb ? kb.color : b8, - controls: [] - }; - kb && "yes" === kb["height.autosize"] && (kc.autoheight = true); - Object.assign(this, kc); - this.rowArray = [0, kc.height]; - var kd = this.report.datawindow.processing; - this.isGrid = kd === aY || kd === aZ; - this.child = {}; - }, [{ - key: "setX", - value: function (k8, k9, kb, kc) { - var kd = kb[kc]; - var kf = k8.find(function (kh) { - return Math.abs(kd - kh) < 6; - }); - if (undefined !== kf) { - kb[kc] = kf; - return kf; - } - if (k9) { - k8.push(kd); - } else { - var kg = k8.findIndex(function (kh) { - return kd < kh; - }); - kg < 0 ? kg = k8.length - 1 : kg > 0 && (kg -= 1); - kd = k8[kg]; - kb[kc] = kd; - } - return kd; - } - }, { - key: "setY", - value: function (k8, k9, kb) { - var kc = k9[kb]; - kc > this.height && (kc = this.height); - var kd = k8.find(function (kf) { - return Math.abs(kf - kc) < 6; - }); - undefined !== kd ? (kc = kd, k9[kb] = kd) : k8.push(kc); - return kc; - } - }, { - key: "adjustPosition", - value: function () { - var k8 = this.controls; - this.height; - var k9 = this.name; - k8.sort(function (kj, kk) { - return kk.index - kj.index; - }); - this.colArray = this.report.colArray; - var kb = this.colArray; - var kc = true; - this.isGrid && "detail" !== k9 && (kc = false); - for (var kd = this.rowArray, kf = 0; kf < k8.length; kf++) { - var kg = k8[kf]; - kg.position || (kg.position = { - x1: kg.x, - x2: kg.x + kg.width, - y1: kg.y, - y2: kg.y + kg.height, - border: {} - }); - kg.position.backControls || (kg.position.backControls = []); - kg.position.foreControls || (kg.position.foreControls = []); - var kh = kg.position; - this.setX(kb, kc, kh, "x1"); - this.setX(kb, kc, kh, "x2"); - this.setY(kd, kh, "y1"); - this.setY(kd, kh, "y2"); - } - kb.sort(function (kj, kk) { - return kj - kk; - }); - kd.sort(function (kj, kk) { - return kj - kk; - }); - } - }, { - key: "avoidLapped", - value: function () { - for (var k8 = this.controls, k9 = (this.name, 0); k9 < k8.length; k9++) { - var kb = k8[k9]; - var kc = kb.position; - var kd = kc.x1; - var kf = kc.x2; - var kg = kc.y1; - var kh = kc.y2; - if (0 !== kb.position.visible) { - for (var kj = k9 + 1; kj < k8.length; kj++) { - var kk = k8[kj]; - var km = kk.position.x1; - var kp = kk.position.x2; - var kq = kk.position.y1; - var ku = kk.position.y2; - (kq >= kg && kq < kh || kg >= kq && kg < ku) && (km >= kd && km < kf || kd >= km && kd < kp) && (kb.position.backControls.push(kk), kk.position.foreControls.push(kb), kk.position.visible = 0, kk.position.hasForeControl = true); - } - } - } - for (var kv = this.lineRects, kw = function () { - var ky = kv[kx]; - var kz = ky.border; - if (kz.left && kz.right && (kz.bottom || kz.top)) { - var kA = k8.filter(function (kI) { - return aV.containRect(ky, kI.position); - }); - var kB = ky.x1; - var kC = ky.x2; - var kD = ky.y1; - var kE = ky.y2; - if (1 === kA.length) { - var kF = kA[0].position; - Object.assign(kF, { - x1: kB, - x2: kC, - y1: kD, - y2: kE - }); - } else { - if (0 === kA.length) { - var kG = { - position: { - x1: kB, - y1: kD, - x2: kC, - y2: kE, - border: {} - }, - key: "addrect" - }; - kA.push(kG); - } else { - var kH = kA.map(function (kI) { - return kI.position; - }); - aV.rectSubAll(ky, kH).forEach(function (kI) { - var kJ = { - position: kI, - key: "addrect" - }; - kJ.position.border = {}; - kA.push(kJ); - }); - } - } - kA.forEach(function (kI) { - (function (kJ, kK) { - var kL = kJ.x1; - var kM = kJ.x2; - var kN = kJ.y1; - var kO = kJ.y2; - var kP = kJ.border; - var kQ = kK.position; - var kR = 0; - kQ.x1 >= kL && kQ.x2 <= kM && (kP.top && (kN === kQ.y1 ? (Object.assign(kQ.border, { - top: ["thin", "#bfbfbf"] - }), ++kR) : kN === kQ.y2 && (Object.assign(kQ.border, { - bottom: ["thin", "#bfbfbf"] - }), ++kR)), kP.bottom && (kO === kQ.y1 ? (Object.assign(kQ.border, { - top: ["thin", "#bfbfbf"] - }), ++kR) : kO === kQ.y2 && (Object.assign(kQ.border, { - bottom: ["thin", "#bfbfbf"] - }), ++kR))); - kQ.y1 >= kN && kQ.y2 <= kO && (kP.left && (kL === kQ.x1 ? (Object.assign(kQ.border, { - left: ["thin", "#bfbfbf"] - }), ++kR) : kL === kQ.x2 && (Object.assign(kQ.border, { - right: ["thin", "#bfbfbf"] - }), ++kR)), kP.right && (kM === kQ.x1 ? (Object.assign(kQ.border, { - left: ["thin", "#bfbfbf"] - }), ++kR) : kM === kQ.x2 && (Object.assign(kQ.border, { - right: ["thin", "#bfbfbf"] - }), ++kR))); - return kR; - })(ky, kI) > 0 && "addrect" === kI.key && k8.push(kI); - }); - } - }, kx = 0; kx < kv.length; ++kx) { - kw(); - } - } - }, { - key: "lineSet", - value: function (k8) { - for (var k9 = this.controls, kb = this.height, kc = this.colArray = this.report.colArray, kd = this.rowArray, kf = this.vLines = [], kg = this.hLines = [], kh = 0; kh < k9.length; kh++) { - var kj = k9[kh]; - kj.position || ("line" === kj.key ? kj.position = { - x1: kj.x1, - x2: kj.x2, - y1: kj.y1, - y2: kj.y2, - border: {} - } : kj.position = { - x1: kj.x, - x2: kj.x + kj.width, - y1: kj.y, - y2: kj.y + kj.height, - border: {} - }); - var kk = kj.position; - var km = kk.x1; - var kp = kk.x2; - var kq = kk.y1; - var ku = kk.y2; - if ("line" === kj.key) { - kq = this.setY(kd, kk, "y1"); - ku = this.setY(kd, kk, "y2"); - km = this.setX(kc, true, kk, "x1"); - kp = this.setX(kc, true, kk, "x2"); - Math.abs(km - kp) > 6 ? kg.push({ - y: kq, - x: { - x1: km, - x2: kp - } - }) : Math.abs(kq - ku) > 6 && kf.push({ - y: { - y1: kq, - y2: ku - }, - x: km - }); - } else { - if ("rectangle" === kj.key || kj.border === b3 || kj.border === b6 || kj.border === b2 || kj.border === b7 || kj.border === b4) { - if (kq = this.setY(kd, kk, "y1"), ku = this.setY(kd, kk, "y2"), km = this.setX(kc, true, kk, "x1"), kp = this.setX(kc, true, kk, "x2"), "text" === kj.key && "" === kj.text || "rectangle" === kj.key) { - if (Math.abs(km - kp) > 6) { - var kv = { - y: kq, - x: { - x1: km, - x2: kp - } - }; - kg.push(kv); - Math.abs(kq - ku) > 6 && kg.push({ - y: ku, - x: { - x1: km, - x2: kp - } - }); - } - if (Math.abs(kq - ku) > 6) { - var kw = { - y: { - y1: kq, - y2: ku - }, - x: km - }; - kf.push(kw); - Math.abs(km - kp) > 6 && kf.push({ - y: { - y1: kq, - y2: ku - }, - x: kp - }); - } - } else { - kj.position.border = { - bottom: ["thin", "#bfbfbf"], - top: ["thin", "#bfbfbf"], - left: ["thin", "#bfbfbf"], - right: ["thin", "#bfbfbf"] - }; - } - } else { - if (kj.border === b5) { - kq = this.setY(kd, kk, "y1"); - ku = this.setY(kd, kk, "y2"); - km = this.setX(kc, true, kk, "x1"); - kp = this.setX(kc, true, kk, "x2"); - var kx = true; - "text" === kj.key && "" === kj.text || (kj.position.border = { - bottom: ["thin", "#bfbfbf"] - }, kx = false); - Math.abs(km - kp) > 6 && kx && kg.push({ - y: ku, - x: { - x1: km, - x2: kp - } - }); - } - } - } - } - if (this.controls = this.controls.filter(function (kC) { - return "line" !== kC.key && "rectangle" !== kC.key; - }), kc.sort(function (kC, kD) { - return kC - kD; - }), kd.sort(function (kC, kD) { - return kC - kD; - }), k8 === aY || k8 === aZ) { - var ky = kb; - var kz = kc[kc.length - 1]; - kg.push({ - y: 0, - x: { - x1: 0, - x2: kz - } - }); - kg.push({ - y: ky, - x: { - x1: 0, - x2: kz - } - }); - for (var kA = 0; kA < kc.length; kA++) { - var kB = kc[kA]; - kf.push({ - y: { - y1: 0, - y2: ky - }, - x: kB - }); - } - } - this.lineRects = aV.rectFromLines(kf, kg); - } - }, { - key: "setBorder", - value: function () { - var k8; - var k9 = this.controls; - var kb = this.height; - this.vLines; - var kc = aW(this.hLines); - try { - var kd = function () { - var kh = k8.value; - var kj = kh.y; - var kk = kh.x; - k9.forEach(function (km) { - var kp = km.position; - var kq = kp.x1; - var ku = kp.x2; - var kv = kp.y1; - var kw = kp.y2; - kq >= kk.x1 && ku <= kk.x2 && (Math.abs(kj - kv) <= 3 ? Object.assign(km.position.border, { - top: ["thin", "#bfbfbf"] - }) : Math.abs(kj - kw) <= 3 && Object.assign(km.position.border, { - bottom: ["thin", "#bfbfbf"] - })); - }); - }; - for (kc.s(); !(k8 = kc.n()).done;) { - kd(); - } - } catch (kh) { - kc.e(kh); - } finally { - kc.f(); - } - if (this.isGrid) { - for (var kf = function () { - var kj = k9[kg]; - var kk = kj.position; - var km = kk.x1; - var kp = kk.x2; - var kq = kk.y1; - kk.y2; - var ku = kk.backControls; - var kv = kk.border; - Object.assign(kv, { - left: ["thin", "#bfbfbf"], - right: ["thin", "#bfbfbf"] - }); - ku && ku.forEach(function (kB) { - if (!function (kD) { - return kD["background.color"] && kD["background.color"] === b8; - }(kB)) { - var kC = kB.position; - km > kC.x1 && km < kC.x2 && delete kv.left; - kp > kC.x1 && kp < kC.x2 && delete kv.right; - } - }); - for (var kw = kg + 1; kw < k9.length; kw++) { - var kx = k9[kw]; - var ky = kx.position.x1; - var kz = kx.position.x2; - var kA = kx.position.y1; - kx.position.y2; - (ky >= km && ky < kp || km >= ky && km < kz) && (kA < kq ? (kj.position.topControl = kx, kx.position.bottomControl = kj) : (kj.position.bottomControl = kx, kx.position.topControl = kj)); - } - kj.position.topControl || (kj.position.y1 = 0, kj.position.border.top = ["thin", "#bfbfbf"]); - kj.position.bottomControl || (kj.position.y2 = kb, kj.position.border.bottom = ["thin", "#bfbfbf"]); - Math.abs(kq - kj.position.y1) > 30 && (kj.position.valign = "center"); - }, kg = 0; kg < k9.length; kg++) { - kf(); - } - } - } - }, { - key: "removeOverlap", - value: function (k8, k9) { - for (var kb = [], kc = 0; kc < k8.length; kc++) { - for (var kd = k8[kc], kf = kd.position, kg = kf.x1, kh = kf.x2, kj = kf.y1, kk = (kf.y2, kc + 1); kk < k8.length; kk++) { - var km = k8[kk]; - var kp = km.position.x1; - var kq = km.position.x2; - var ku = km.position.y1; - km.position.y2; - (kp >= kg && kp < kh || kg >= kp && kg < kq) && (ku < kj ? (kd.position.topControl = km, km.position.bottomControl = kd) : (kd.position.bottomControl = km, km.position.topControl = kd)); - } - "top" === k9 ? kd.position.topControl || kb.push(kd) : "bottom" === k9 && (kd.position.bottomControl || kb.push(kd)); - } - this.sortX(kb); - return kb; - } - }, { - key: "splitLine", - value: function (k8, k9) { - for (var kb = k8.y, kc = k8.x, kd = [], kf = null, kg = 0; kg < k9.length; kg++) { - var kh = k9[kg]; - var kj = kh.position; - var kk = kj.x1; - kj.x2; - kj.y1; - kj.y2; - 0 === kg ? (kk > kc.x1 && kd.push({ - y: kb, - x: { - x1: kc.x1, - x2: kk - } - }), kf = kh) : kf.x2 < kk && kd.push({ - y: kb, - x: { - x1: kf.x2, - x2: kk - } - }); - } - return kd; - } - }, { - key: "sortY", - value: function (k8) { - k8.sort(function (k9, kb) { - return k9.y === kb.y ? k9.x - kb.x : k9.y - kb.y; - }); - } - }, { - key: "sortX", - value: function (k8) { - k8.sort(function (k9, kb) { - return k9.x === kb.x ? k9.y - kb.y : k9.x - kb.x; - }); - } - }, { - key: "refreshRowCol", - value: function () { - var k8 = this.height; - var k9 = this.controls; - this.rowArray = this.rowArray.filter(function (kh) { - return 0 === kh || kh === k8 || k9.some(function (kj) { - return Math.abs(kj.position.y1 - kh) < 6 || Math.abs(kj.position.y2 - kh) < 6; - }); - }); - var kb; - this.colArray = this.report.colArray; - var kc = this.colArray; - var kd = this.rowArray; - var kf = aW(k9); - try { - var kg = function () { - var kh = kb.value; - var kj = kh.position; - var kk = kj.x1; - var km = kj.x2; - var kp = kj.y1; - var kq = kj.y2; - if (kk === km || kp === kq) { - kh.position.visible = 0; - return 1; - } - var ku = kd.findIndex(function (ky) { - return Math.abs(ky - kp) < 6; - }); - var kv = kd.findIndex(function (ky) { - return Math.abs(ky - kq) < 6; - }) - 1; - var kw = kc.findIndex(function (ky) { - return Math.abs(kk - ky) < 6; - }); - var kx = kc.findIndex(function (ky) { - return Math.abs(km - ky) < 6; - }) - 1; - Object.assign(kj, { - startRow: ku, - endRow: kv, - startCol: kw, - endCol: kx - }); - }; - for (kf.s(); !(kb = kf.n()).done;) { - kg(); - } - } catch (kh) { - kf.e(kh); - } finally { - kf.f(); - } - } - }, { - key: "getRows", - value: function (k8) { - var k9 = this.controls; - var kb = this.height; - var kc = this.report.styles; - var kd = this.rowArray; - var kf = {}; - if (0 === kb) { - return kf; - } - for (var kg = 1; kg < kd.length; kg++) { - var kh = k8 + kg - 1; - var kj = kd[kg] - kd[kg - 1]; - kf["".concat(kh)] = { - height: kj, - cells: {} - }; - } - var kk; - var km = aW(k9); - try { - for (km.s(); !(kk = km.n()).done;) { - var kp = kk.value; - if (0 !== kp.position.visible) { - var kq = kp.position; - var ku = kq.startRow; - var kv = kq.endRow; - var kw = kq.startCol; - var kx = kq.endCol; - var ky = {}; - kp.tag && "" !== kp.tag && (ky.tag = kp.tag); - kp.name && "" !== kp.name && (ky.name = kp.name); - kp.format && "[general]" !== kp.format.toLowerCase() && (ky.format = kp.format); - var kz = kp["background.color"]; - "string" == typeof kz && kz.startsWith("#{") && (ky.bgcolor = kz); - "string" == typeof kp.color && kp.color.startsWith("#{") && (ky.color = kp.color); - 0 === kp.visible && (ky.visible = false); - "string" == typeof kp.visible && kp.visible.startsWith("#{") && (ky.visible = kp.visible); - var kA = null; - switch (kp.key) { - case "text": - ky.text = kp.text; - kA = bz(kp); - break; - case "column": - kp.column && (ky.text = "#{".concat(kp.column.name, "}")); - kA = bz(kp); - ky.tabsequence = kp.tabsequence || 0; - var kB = by(kp); - if (kB && (ky.edit = kB, "dropdowndw" === kB.style)) { - var kC = kB.attrs.name; - var kD = kB.attrs.autoRetrieve; - this.child[kC] = { - name: kC, - autoRetrieve: kD - }; - } - "yes" === kp["edit.displayonly"] && (ky.editable = false); - "yes" === kp["height.autosize"] && (ky.autoheight = true); - var kE = kp["edit.limit"]; - kE && kE > 0 && (ky.limit = kE); - break; - case "compute": - ky.text = "#{".concat(kp.expression, "}"); - ky.tabsequence = 0; - kA = bz(kp); - break; - case "button": - ky.text = kp.text; - kA = bz(kp); - ky.edit = { - style: "button", - attrs: { - enabled: "no" !== kp.enabled, - name: kp.name - } - }; - break; - case "bitmap": - ky.text = kp.filename; - kA = bz(kp); - ky.edit = { - style: "image", - attrs: { - from: "url" - } - }; - break; - default: - ky.text = ""; - kA = bz(kp); - } - var kF = bA(kc, kA); - if (kF >= 0 && (ky.style = kF), kv - ku > 0 || kx - kw > 0) { - this.report.merges.push("".concat(bD(kw, k8 + ku), ":").concat(bD(kx, k8 + kv))); - } - if (Object.keys(ky).length > 0) { - var kG = k8 + ku; - if (kf["".concat(kG)]) { - var kH = kf["".concat(kG)].cells; - kH || (kH = kf["".concat(kG)].cells = {}); - kH["".concat(kw)] = ky; - } - } - } - } - } catch (kI) { - km.e(kI); - } finally { - km.f(); - } - return kf; - } - }]); - }(); - function bG(k7, k8) { - var k9 = { - header: new bF("header", this.ob), - detail: new bF("detail", this.ob) - }; - this.ob.colArray = [0]; - k9.header.type = "header"; - k9.detail.type = "detail"; - k9.summary = new bF("summary", this.ob); - k9.summary.type = "summary"; - k9.footer = new bF("footer", this.ob); - k9.footer.type = "footer"; - var kb = []; - var kc = []; - if (this.ob.group) { - var kd; - var kf = aW(this.ob.group); - try { - for (kf.s(); !(kd = kf.n()).done;) { - var kg = kd.value; - var kh = kg.header; - var kj = kg.trailer; - var kk = kg.level; - if (kh) { - var km = "header.".concat(kk); - var kp = new bF(km, this.ob, kh); - k9[km] = kp; - kp.type = "group"; - kp.level = kk; - kb.push(kp); - } - if (kj) { - var kq = "trailer.".concat(kk); - var ku = new bF(kq, this.ob, kj); - k9[kq] = ku; - ku.type = "group"; - ku.level = kk; - kc.unshift(ku); - } - } - } catch (l9) { - kf.e(l9); - } finally { - kf.f(); - } - } - var kv = [k9.header].concat(kb, [k9.detail], kc); - k9.summary.height > 0 && kv.push(k9.summary); - k9.footer.height > 0 && kv.push(k9.footer); - for (var kw = 0, kx = [this.ob.column, this.ob.compute, this.ob.text, this.ob.button, this.ob.line, this.ob.rectangle, this.ob.bitmap]; kw < kx.length; kw++) { - var ky = kx[kw]; - if (ky) { - var kz; - var kA = aW(ky); - try { - for (kA.s(); !(kz = kA.n()).done;) { - var kB = kz.value; - switch ("column" === kB.key && (kB.column = k7[kB.id - 1]), kB.band) { - case "header": - case "foreground": - case "background": - k9.header.controls.push(kB); - break; - case "detail": - k9.detail.controls.push(kB); - break; - default: - var kC = kB.band; - if (kC.startsWith("header[")) { - var kD = kC.substring(7, kC.length - 1); - Number(kD) === this.ob._maxHeaderIndex && (kC = "header"); - } - var kE = k9[kC]; - kE && kE.controls.push(kB); - } - } - } catch (lb) { - kA.e(lb); - } finally { - kA.f(); - } - } - } - k8 !== aY && k8 !== aZ || k9.detail.adjustPosition(); - var kF = []; - for (var kG in k9) { - var kH = k9[kG]; - kH.lineSet(k8); - kH.adjustPosition(); - kH.avoidLapped(); - kH.setBorder(); - kF = kF.concat(kH.controls); - } - for (var kI in this.ob.colArray = this.ob.colArray.filter(function (lc) { - return 0 === lc || kF.some(function (ld) { - return Math.abs(ld.position.x1 - lc) < 6 || Math.abs(ld.position.x2 - lc) < 6; - }); - }), k9) { - k9[kI].refreshRowCol(); - } - for (var kJ = this.ob.colArray, kK = { - len: kJ.length - 1 - }, kL = 0; kL < kJ.length - 1; kL++) { - var kM = kJ[kL + 1] - kJ[kL]; - kK["".concat(kL)] = { - width: kM - }; - } - var kN; - var kO = {}; - this.ob.styles = []; - var kP = this.ob.styles; - this.ob.merges = []; - var kQ = this.ob.merges; - var kR = []; - var kS = {}; - var kT = 0; - var kU = null; - var kV = null; - var kW = aW(kv); - try { - for (kW.s(); !(kN = kW.n()).done;) { - var kX = kN.value; - var kY = kX.getRows(kT); - kX.len = Object.keys(kY).length; - var kZ = kX.name; - var l0 = kX.len; - var l1 = kX.color; - var l2 = kX.type; - var l3 = kX.level; - var l4 = kX.autoheight; - var l5 = { - name: kZ, - len: l0, - color: l1 === b8 ? null : l1, - start: kT, - type: l2, - level: l3 - }; - l4 && (l5.autoheight = l4); - "header" === l2 ? kU = l5 : "detail" === l2 && (kV = l5); - kR.push(l5); - kT += kX.len; - Object.assign(kO, kY); - kS = Object.assign(kS, kX.child); - } - } catch (lc) { - kW.e(lc); - } finally { - kW.f(); - } - kO.len = kT; - var l6 = k9.header.len; - var l7 = []; - kQ.forEach(function (ld) { - l7.findIndex(function (lf) { - return function (lg, lh) { - var lj = bE(lg); - var lk = bE(lh); - return lj.sri <= lk.eri && lj.sci <= lk.eci && lk.sri <= lj.eri && lk.sci <= lj.eci; - }(ld, lf); - }) < 0 && l7.push(ld); + }); + console.log("[类型2点击] 解析到" + _0x1aed22[_0x2afe79(368)] + _0x2afe79(375)); + for (let _0x57d0f2 = 0; _0x57d0f2 < _0x1aed22.length; _0x57d0f2++) { + const _0x51f497 = _0x1aed22[_0x57d0f2], + _0xf8eb01 = _0x1b6db4.x + _0x51f497.x, + _0x3b33b2 = _0x1b6db4.y + _0x51f497.y; + console.log(_0x2afe79(263) + (_0x57d0f2 + 1) + _0x2afe79(325) + _0xf8eb01 + ", " + _0x3b33b2 + ") - 原始坐标: (" + _0x51f497.x + ", " + _0x51f497.y + ")"); + await simulateClick(_0xf8eb01, _0x3b33b2); + await sleep(500 + Math.random() * 300); + } + console.log(_0x2afe79(394)); +} +async function refreshType2Captcha() { + const _0x25d5a1 = _0x30b83a; + try { + const _0x4312ae = document[_0x25d5a1(354)](_0x25d5a1(401)); + if (_0x4312ae) { + const _0x3d28dd = new MouseEvent(_0x25d5a1(293), { + "view": window, + "bubbles": true, + "cancelable": true }); - kQ = l7; - var l8 = this.ob.datawindow.color; - l8 = l8 === b8 ? null : l8; + _0x4312ae[_0x25d5a1(429)](_0x3d28dd); + console.log(_0x25d5a1(339)); + await waitForChange(() => { + const _0x433728 = _0x25d5a1, + _0x9c2289 = document[_0x433728(354)](_0x433728(338)); + if (!_0x9c2289) return false; + const _0x32ade0 = _0x9c2289[_0x433728(409)](_0x433728(304)); + return _0x32ade0 && _0x32ade0[_0x433728(368)] >= 2; + }, 3000); + } + } catch (_0x15a840) { + { + console[_0x25d5a1(412)](_0x25d5a1(352), _0x15a840); + throw _0x15a840; + } + } +} +async function clickConfirmButton() { + const _0x249f03 = _0x30b83a; + try { + { + const _0x174eb5 = document[_0x249f03(354)](_0x249f03(397)) || document.querySelector(_0x249f03(341)); + if (!_0x174eb5) { + console[_0x249f03(412)](_0x249f03(332)); + return; + } + const _0x13991b = _0x174eb5[_0x249f03(272)](), + _0x1a1101 = _0x13991b[_0x249f03(392)] + _0x13991b[_0x249f03(407)] / 2, + _0x3a2762 = _0x13991b.top + _0x13991b[_0x249f03(417)] / 2; + console[_0x249f03(351)](_0x249f03(327) + _0x1a1101 + ", " + _0x3a2762 + ")"); + const _0xc62168 = new MouseEvent(_0x249f03(278), { + "view": window, + "bubbles": true, + "cancelable": true, + "clientX": _0x1a1101, + "clientY": _0x3a2762 + }); + _0x174eb5[_0x249f03(429)](_0xc62168); + await sleep(50 + Math[_0x249f03(364)]() * 100); + const _0x16e315 = new MouseEvent(_0x249f03(287), { + "view": window, + "bubbles": true, + "cancelable": true, + "clientX": _0x1a1101, + "clientY": _0x3a2762, + "button": 0 + }); + _0x174eb5[_0x249f03(429)](_0x16e315); + _0x174eb5[_0x249f03(374)][_0x249f03(265)](_0x249f03(312)); + await sleep(100 + Math[_0x249f03(364)]() * 100); + const _0x3ddf7a = new MouseEvent(_0x249f03(384), { + "view": window, + "bubbles": true, + "cancelable": true, + "clientX": _0x1a1101, + "clientY": _0x3a2762, + "button": 0 + }); + _0x174eb5[_0x249f03(429)](_0x3ddf7a); + const _0x4348bd = new MouseEvent("click", { + "view": window, + "bubbles": true, + "cancelable": true, + "clientX": _0x1a1101, + "clientY": _0x3a2762, + "button": 0 + }); + _0x174eb5[_0x249f03(429)](_0x4348bd); + _0x174eb5[_0x249f03(374)][_0x249f03(277)]("active"); + await sleep(50 + Math.random() * 100); + const _0x155c9e = new MouseEvent(_0x249f03(284), { + "view": window, + "bubbles": true, + "cancelable": true, + "clientX": _0x1a1101 + 10, + "clientY": _0x3a2762 + 10 + }); + _0x174eb5[_0x249f03(429)](_0x155c9e); + console[_0x249f03(351)](_0x249f03(331)); + } + } catch (_0x5ba727) { + console.error(_0x249f03(378), _0x5ba727); + } +} +async function solveGridCaptcha() { + const _0x2aacf6 = _0x30b83a; + window.isProcessingCaptcha = true; + console[_0x2aacf6(351)]("[九宫格处理] 开始处理九宫格验证码"); + try { + console[_0x2aacf6(351)](_0x2aacf6(306)); + if (!(await waitForCaptchaReady())) { + console[_0x2aacf6(412)](_0x2aacf6(411)); + return; + } + await refreshGridCaptcha(); + console.log("[九宫格处理] 等待刷新后验证码加载..."); + if (!(await waitForCaptchaReady())) { + console.error(_0x2aacf6(424)); + return; + } + const _0x2e296b = document[_0x2aacf6(354)](_0x2aacf6(403)); + if (!_0x2e296b) { + console[_0x2aacf6(412)](_0x2aacf6(285)); + return; + } + const _0x1c6278 = Array.from(_0x2e296b.querySelectorAll(_0x2aacf6(244))); + if (_0x1c6278[_0x2aacf6(368)] !== 9) { + console.error(_0x2aacf6(267), _0x1c6278[_0x2aacf6(368)]); + return; + } + console[_0x2aacf6(351)](_0x2aacf6(279)); + for (let _0x1975b8 = 0; _0x1975b8 < _0x1c6278[_0x2aacf6(368)]; _0x1975b8++) { + const _0x42f726 = _0x1c6278[_0x1975b8]; + await waitForImageLoad(_0x42f726); + if (_0x42f726[_0x2aacf6(407)] === 0 || _0x42f726[_0x2aacf6(417)] === 0) { + console.error(_0x2aacf6(408) + (_0x1975b8 + 1) + _0x2aacf6(436)); + return; + } + } + const _0x7c071f = document[_0x2aacf6(354)](_0x2aacf6(333)); + if (!_0x7c071f) { + { + console[_0x2aacf6(412)](_0x2aacf6(440)); + return; + } + } + const _0x4c16ac = _0x7c071f[_0x2aacf6(317)][_0x2aacf6(294)](); + console.log(_0x2aacf6(370) + _0x4c16ac); + const _0x3fd2e9 = await translateText(_0x4c16ac); + console.log(_0x2aacf6(427) + _0x3fd2e9); + const _0x1be7fd = await mergeGridCaptchaImages(_0x1c6278); + if (!_0x1be7fd) { + console[_0x2aacf6(412)](_0x2aacf6(371)); + return; + } + const _0x37cf78 = { + "username": CAPTCHA_CONFIG[_0x2aacf6(420)], + "password": CAPTCHA_CONFIG.password, + "typeid": CAPTCHA_CONFIG.typeid, + "softid": CAPTCHA_CONFIG[_0x2aacf6(318)], + "remark": _0x3fd2e9, + "image": _0x1be7fd.base64, + "prompt": _0x4c16ac + }; + console[_0x2aacf6(351)]("[九宫格处理] 正在调用打码平台API..."); + const _0xee3e54 = await fetch(CAPTCHA_CONFIG.apiUrl, { + "method": _0x2aacf6(249), + "headers": { + "Content-Type": "application/json" + }, + "body": JSON.stringify(_0x37cf78) + }), + _0x41e1a6 = await _0xee3e54.json(); + if (_0x41e1a6.success) { + { + console[_0x2aacf6(351)](_0x2aacf6(269) + _0x41e1a6.data[_0x2aacf6(435)]); + window.lastCaptchaId = _0x41e1a6.data.id; + const _0x3fd7bd = getElementPosition(_0x2e296b); + await simulateGridClicks(_0x3fd7bd, _0x1be7fd, _0x41e1a6[_0x2aacf6(369)].result); + if (!(await waitForCaptchaReady())) { + console[_0x2aacf6(412)]("[九宫格处理] 点击后加载超时"); + return; + } + await clickGridConfirmButton(); + !(await waitForCaptchaReady()) && console[_0x2aacf6(412)](_0x2aacf6(365)); + } + } else console[_0x2aacf6(412)](_0x2aacf6(261) + _0x41e1a6.message); + } catch (_0x572e67) { + console[_0x2aacf6(412)](_0x2aacf6(254), _0x572e67); + } finally { + window[_0x2aacf6(343)] = false; + window[_0x2aacf6(380)] = Date[_0x2aacf6(276)](); + } +} +async function mergeGridCaptchaImages(_0xa33c2f) { + return new Promise(_0xc0316b => { + const _0x498ecb = _0x2bc3; + try { + if (_0xa33c2f[_0x498ecb(368)] !== 9) return console[_0x498ecb(412)](_0x498ecb(274)), _0xc0316b(null); + const _0x598a0c = document[_0x498ecb(334)](_0x498ecb(389)), + _0x186261 = _0x598a0c.getContext("2d"), + _0x23913d = _0xa33c2f[0][_0x498ecb(407)], + _0x5ed029 = _0xa33c2f[0].height, + _0x1d7ddf = 7, + _0x290619 = _0x23913d * 3 + _0x1d7ddf * 2, + _0x5e79a6 = _0x5ed029 * 3 + _0x1d7ddf * 2; + _0x598a0c.width = _0x290619; + _0x598a0c[_0x498ecb(417)] = _0x5e79a6; + for (let _0x34ef77 = 0; _0x34ef77 < 3; _0x34ef77++) { + for (let _0x44399c = 0; _0x44399c < 3; _0x44399c++) { + const _0x1f9bdb = _0x34ef77 * 3 + _0x44399c; + _0x186261.drawImage(_0xa33c2f[_0x1f9bdb], _0x44399c * (_0x23913d + _0x1d7ddf), _0x34ef77 * (_0x5ed029 + _0x1d7ddf), _0x23913d, _0x5ed029); + } + } + _0xc0316b({ + "base64": _0x598a0c.toDataURL(_0x498ecb(251))[_0x498ecb(280)](",")[1], + "width": _0x290619, + "height": _0x5e79a6, + "imgWidth": _0x23913d, + "imgHeight": _0x5ed029, + "spacing": _0x1d7ddf + }); + } catch (_0x1b51ca) { + console[_0x498ecb(412)]("[九宫格合并] 合并图片时出错:", _0x1b51ca); + _0xc0316b(null); + } + }); +} +async function simulateGridClicks(_0x2fe73f, _0x4838e5, _0x25d16f) { + const _0x3a675e = _0x30b83a; + console[_0x3a675e(351)](_0x3a675e(350), _0x2fe73f, _0x3a675e(437), _0x4838e5[_0x3a675e(407)], "x", _0x4838e5[_0x3a675e(417)] + ")"); + const _0x55c53a = _0x25d16f.split("|")[_0x3a675e(346)](Boolean); + if (_0x55c53a[_0x3a675e(368)] === 0) { + { + console[_0x3a675e(412)](_0x3a675e(385)); + return; + } + } + const _0x150df4 = _0x55c53a[_0x3a675e(250)](_0x42c8bc => { + { + const _0xb96299 = _0x3a675e, + [_0x2ba0b5, _0x54a30b] = _0x42c8bc[_0xb96299(280)](",")[_0xb96299(250)](Number); + if (isNaN(_0x2ba0b5) || isNaN(_0x54a30b)) return console.error(_0xb96299(372) + _0x42c8bc), null; return { - processing: k8, - freeze: bD(0, l6), - styles: kP, - merges: kQ, - rows: kO, - cols: kK, - child: kS, - report: { - calc: true, - color: l8, - bands: kR, - header: kU, - detail: kV - } + "x": _0x2ba0b5, + "y": _0x54a30b }; } - var bH = a2(12); - var bI = a2(70); - var bJ = a2.n(bI); - function bK(k7, k8) { - var k9 = Object.keys(k7); - if (Object.getOwnPropertySymbols) { - var kb = Object.getOwnPropertySymbols(k7); - k8 && (kb = kb.filter(function (kc) { - return Object.getOwnPropertyDescriptor(k7, kc).enumerable; - })); - k9.push.apply(k9, kb); - } - return k9; + }).filter(Boolean); + if (_0x150df4[_0x3a675e(368)] === 0) return; + for (let _0x5971b7 = 0; _0x5971b7 < _0x150df4.length; _0x5971b7++) { + { + const { + x: _0x2c5ea5, + y: _0x365275 + } = _0x150df4[_0x5971b7], + _0x4d03c9 = Math[_0x3a675e(275)](_0x2fe73f.x + _0x2c5ea5 + 1), + _0x48ffb5 = Math[_0x3a675e(275)](_0x2fe73f.y + _0x365275 + 1); + console[_0x3a675e(351)](_0x3a675e(297) + (_0x5971b7 + 1) + _0x3a675e(434) + _0x4d03c9 + "," + _0x48ffb5 + _0x3a675e(402) + _0x2c5ea5 + "," + _0x365275 + ")"); + await simulateClick(_0x4d03c9, _0x48ffb5); + await sleep(600 + Math[_0x3a675e(364)]() * 400); } - function bL(k7) { - for (var k8 = 1; k8 < arguments.length; k8++) { - var k9 = null != arguments[k8] ? arguments[k8] : {}; - k8 % 2 ? bK(Object(k9), true).forEach(function (kb) { - aI()(k7, kb, k9[kb]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(k7, Object.getOwnPropertyDescriptors(k9)) : bK(Object(k9)).forEach(function (kb) { - Object.defineProperty(k7, kb, Object.getOwnPropertyDescriptor(k9, kb)); - }); - } - return k7; - } - function bM(k7, k8) { - var k9 = "undefined" != typeof Symbol && k7[Symbol.iterator] || k7["@@iterator"]; - if (!k9) { - if (Array.isArray(k7) || (k9 = function (kh, kj) { - if (kh) { - if ("string" == typeof kh) { - return bN(kh, kj); - } - var kk = {}.toString.call(kh).slice(8, -1); - "Object" === kk && kh.constructor && (kk = kh.constructor.name); - return "Map" === kk || "Set" === kk ? Array.from(kh) : "Arguments" === kk || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(kk) ? bN(kh, kj) : undefined; - } - }(k7)) || k8 && k7 && "number" == typeof k7.length) { - k9 && (k7 = k9); - var kb = 0; - var kc = function () {}; - return { - s: kc, - n: function () { - return kb >= k7.length ? { - done: true - } : { - done: false, - value: k7[kb++] - }; - }, - e: function (kh) { - throw kh; - }, - f: kc - }; + } +} +async function refreshGridCaptcha() { + const _0x3fa2ce = _0x30b83a; + try { + { + const _0x352ba8 = document.querySelector(_0x3fa2ce(386)); + if (!_0x352ba8) { + { + console.error("[九宫格刷新] 未找到刷新按钮"); + return; } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } - var kd; - var kf = true; - var kg = false; - return { - s: function () { - k9 = k9.call(k7); + console[_0x3fa2ce(351)](_0x3fa2ce(313)); + _0x352ba8.click(); + let _0x1a8dbc = false; + for (let _0x4d361d = 0; _0x4d361d < 5; _0x4d361d++) { + if (await isSpinnerVisible()) { + { + _0x1a8dbc = true; + break; + } + } + await sleep(300); + } + if (_0x1a8dbc) { + console[_0x3fa2ce(351)](_0x3fa2ce(246)); + if (!(await waitForSpinnerToDisappear(5000))) { + console[_0x3fa2ce(412)](_0x3fa2ce(363)); + return; + } + } + await sleep(800); + console[_0x3fa2ce(351)]("[九宫格刷新] 刷新完成"); + } + } catch (_0x4f8045) { + { + console.error(_0x3fa2ce(383), _0x4f8045); + throw _0x4f8045; + } + } +} +async function waitForCaptchaReady(_0x48cf0c = 8000) { + const _0x11616c = _0x30b83a, + _0x3ff722 = Date[_0x11616c(276)](); + while (Date.now() - _0x3ff722 < _0x48cf0c) { + const _0x1e04ad = document[_0x11616c(354)]("._2tSNOCuL"); + if (!_0x1e04ad || _0x1e04ad[_0x11616c(423)].display === _0x11616c(439)) { + const _0x3b320e = document[_0x11616c(409)](_0x11616c(329)); + if (_0x3b320e[_0x11616c(368)] >= 9) { + let _0xfc30cb = true; + for (const _0x4b44a9 of _0x3b320e) { + if (!_0x4b44a9[_0x11616c(349)] || _0x4b44a9[_0x11616c(344)] === 0) { + _0xfc30cb = false; + break; + } + } + if (_0xfc30cb) return true; + } + } + await sleep(200); + } + return false; +} +async function clickGridConfirmButton() { + const _0x29b09b = _0x30b83a, + _0x23f8c7 = document[_0x29b09b(354)](_0x29b09b(295)); + if (!_0x23f8c7) { + { + console[_0x29b09b(412)](_0x29b09b(243)); + return; + } + } + const _0x2e0116 = _0x23f8c7[_0x29b09b(272)](), + _0x281bd9 = _0x2e0116.left + _0x2e0116[_0x29b09b(407)] / 2, + _0x1415eb = _0x2e0116[_0x29b09b(399)] + _0x2e0116[_0x29b09b(417)] / 2; + console[_0x29b09b(351)](_0x29b09b(241) + Math[_0x29b09b(275)](_0x281bd9) + "," + Math[_0x29b09b(275)](_0x1415eb) + ")"); + const _0x31e31d = [{ + "type": _0x29b09b(278), + "x": _0x281bd9, + "y": _0x1415eb, + "delay": 50 + }, { + "type": _0x29b09b(287), + "x": _0x281bd9, + "y": _0x1415eb, + "delay": 100 + }, { + "type": "mouseup", + "x": _0x281bd9, + "y": _0x1415eb, + "delay": 100 + }, { + "type": "click", + "x": _0x281bd9, + "y": _0x1415eb, + "delay": 50 + }, { + "type": _0x29b09b(284), + "x": _0x281bd9 + 5, + "y": _0x1415eb + 5, + "delay": 50 + }]; + for (const { + type: _0x12d687, + x: _0x3c38a1, + y: _0x1b3fa8, + delay: _0x6b050d + } of _0x31e31d) { + _0x23f8c7[_0x29b09b(429)](new MouseEvent(_0x12d687, { + "bubbles": true, + "cancelable": true, + "view": window, + "clientX": _0x3c38a1, + "clientY": _0x1b3fa8 + })); + await sleep(_0x6b050d + Math[_0x29b09b(364)]() * 50); + } +} +async function isSpinnerVisible() { + const _0x1dcdda = _0x30b83a, + _0x8d7f08 = document.querySelector("._2tSNOCuL"); + return _0x8d7f08 && _0x8d7f08[_0x1dcdda(423)][_0x1dcdda(406)] !== _0x1dcdda(439); +} +async function waitForSpinnerToDisappear(_0x5cb161 = 5000) { + const _0x9b818d = _0x30b83a, + _0xa937c1 = Date.now(); + while (Date[_0x9b818d(276)]() - _0xa937c1 < _0x5cb161) { + const _0x4e3fbe = document[_0x9b818d(354)](_0x9b818d(288)); + if (!_0x4e3fbe || _0x4e3fbe[_0x9b818d(423)].display === "none") return true; + await sleep(200); + } + return false; +} +async function waitForImageLoad(_0x4aca20) { + return new Promise(_0x17df03 => { + { + const _0x5aa851 = _0x2bc3; + _0x4aca20[_0x5aa851(349)] ? _0x17df03() : (_0x4aca20[_0x5aa851(286)] = _0x17df03, _0x4aca20[_0x5aa851(301)] = _0x17df03); + } + }); +} +function getElementPosition(_0x254b07) { + const _0x1ef0cb = _0x30b83a, + _0x17eea7 = _0x254b07[_0x1ef0cb(272)](); + return { + "x": _0x17eea7.left + window[_0x1ef0cb(323)], + "y": _0x17eea7[_0x1ef0cb(399)] + window.scrollY, + "width": _0x17eea7[_0x1ef0cb(407)], + "height": _0x17eea7[_0x1ef0cb(417)] + }; +} +async function simulateClick(_0x3e7474, _0x52c5c0) { + const _0x2057c9 = _0x30b83a, + _0x16e7ab = document.elementFromPoint(_0x3e7474, _0x52c5c0); + if (!_0x16e7ab) return; + const _0x50379d = [new MouseEvent(_0x2057c9(287), { + "bubbles": true, + "clientX": _0x3e7474, + "clientY": _0x52c5c0 + }), new MouseEvent(_0x2057c9(384), { + "bubbles": true, + "clientX": _0x3e7474, + "clientY": _0x52c5c0 + }), new MouseEvent(_0x2057c9(293), { + "bubbles": true, + "clientX": _0x3e7474, + "clientY": _0x52c5c0 + })]; + for (const _0x587295 of _0x50379d) { + _0x16e7ab[_0x2057c9(429)](_0x587295); + await sleep(50 + Math[_0x2057c9(364)]() * 50); + } +} +function sleep(_0x4d88eb) { + return new Promise(_0x12cb84 => setTimeout(_0x12cb84, _0x4d88eb)); +} +async function waitForChange(_0x5d426b, _0x271345 = 3000) { + const _0x423304 = _0x30b83a, + _0x2283ba = Date[_0x423304(276)](); + while (Date[_0x423304(276)]() - _0x2283ba < _0x271345) { + { + if (_0x5d426b()) return true; + await sleep(200); + } + } + return false; +} +async function translateText(_0x13d59b) { + const _0x27f421 = _0x30b83a, + _0x2d5aee = "https://www.1618.wang/api/translate", + _0x2e71aa = encodeURIComponent(_0x13d59b); + try { + const _0xec0fcd = await fetch(_0x2d5aee + _0x27f421(253) + _0x2e71aa, { + "method": _0x27f421(336), + "headers": { + "Accept": _0x27f421(393) + } + }), + _0x1d8981 = await _0xec0fcd[_0x27f421(415)](), + _0xa3e83d = extractTranslatedText(_0x1d8981); + return _0xa3e83d || _0x13d59b; + } catch (_0x3bda91) { + console.error("[翻译功能] 翻译出错:", _0x3bda91); + return _0x13d59b; + } +} +function extractTranslatedText(_0x4877b3) { + const _0x2e5977 = _0x30b83a, + _0x28b388 = _0x2e5977(281), + _0x2d5855 = _0x2e5977(245), + _0x307cbc = _0x4877b3.indexOf(_0x28b388); + if (_0x307cbc === -1) return null; + const _0x1630e5 = _0x4877b3.indexOf("
  • ", _0x307cbc) + 4, + _0x5217bf = _0x4877b3.indexOf(_0x2d5855, _0x1630e5); + return _0x4877b3[_0x2e5977(395)](_0x1630e5, _0x5217bf)[_0x2e5977(294)](); +} +async function reportError(_0x116dfa) { + const _0xfbdf49 = _0x30b83a, + _0x5e3c94 = CAPTCHA_CONFIG.reportUrl; + try { + console[_0xfbdf49(351)]("[报错功能] 正在报错ID: " + _0x116dfa); + const _0x1104f8 = await fetch(_0x5e3c94, { + "method": "POST", + "headers": { + "Content-Type": _0xfbdf49(289) }, - n: function () { - var kh = k9.next(); - kf = kh.done; - return kh; - }, - e: function (kh) { - kg = true; - kd = kh; - }, - f: function () { - try { - kf || null == k9.return || k9.return(); - } finally { - if (kg) { - throw kd; - } - } - } - }; - } - function bN(k7, k8) { - (null == k8 || k8 > k7.length) && (k8 = k7.length); - for (var k9 = 0, kb = Array(k8); k9 < k8; k9++) { - kb[k9] = k7[k9]; - } - return kb; - } - var bO = { - NotModified: 0, - DataModified: 1, - New: 2, - NewModified: 3 - }; - var bP = { - KeyColumns: 0, - KeyAndUpdateColumns: 1, - KeyAndModifiedColumns: 2 - }; - var bQ = { - Primary: 0, - Delete: 1, - Filter: 2 - }; - var bR = { - ItemChanged: "ItemChanged", - EditChanged: "EditChanged", - ItemFocusChanged: "ItemFocusChanged", - RowFocusChanged: "RowFocusChanged", - ButtonClicked: "ButtonClicked", - CellRender: "CellRender", - Clicked: "Clicked", - DoubleClicked: "DoubleClicked", - DropDownSelected: "DropDownSelected", - ToolbarChanged: "ToolbarChanged", - LayoutViews: "LayoutViews", - CellLayout: "CellLayout", - RightButtonClicked: "RightButtonClicked", - DataObjectChanged: "DataObjectChanged", - Enter: "Enter", - KeyDown: "KeyDown", - LoseFocus: "LoseFocus", - Focus: "Focus", - RowResized: "RowResized", - ColResized: "ColResized" - }; - function bS(k7, k8, k9) { - return "string" == typeof k8 ? k9 && k9.has(k8) ? k8 : "" : k8 > k7.length || k8 <= 0 ? "" : k7[k8 - 1].name; - } - function bT(k7, k8) { - var k9; - if ((k8 = function (kb) { - if ("string" == typeof kb) { - switch (kb.toLowerCase()) { - case "filter!": - return bQ.Filter; - case "delete!": - return bQ.Delete; - case "primary!": - return bQ.Primary; - } - } - return kb; - }(k8)) === bQ.Filter) { - k9 = k7.coreData.filterData; - } else { - if (k8 === bQ.Primary) { - k9 = k7.coreData.primaryData; - } else { - if (k8 !== bQ.Delete) { - return null; - } - k9 = k7.coreData.deleteData; - } - } - return k9; - } - function bU(k7, k8) { - return null == k8 ? "null" : "string" === k7.type || "datetime" === k7.type ? "'".concat(function (k9) { - return k9.replaceAll("'", "''"); - }(k8), "'") : "".concat(k8); - } - function bV(k7, k8) { - if (null == k8) { - return "".concat(k7.dbname, " is null"); - } - var k9 = bU(k7, k8); - return "".concat(k7.dbname, " = ").concat(k9); - } - function bW(k7) { - if (this !== k7) { - var k8 = this._table.columns.length; - if (k7._table.columns.length !== k8) { - return false; - } - for (var k9 = 0; k9 < k8; ++k9) { - var kb = this._table.columns[k9]; - var kc = k7._table.columns[k9]; - if (kb.name !== kc.name || kb.type !== kc.type) { - return false; - } - } - } - return true; - } - function bX(k7, k8, k9) { - var kb = k8.type; - var kc = k8.name; - if ("SP" !== kb) { - return null; - } - var kd; - var kf = []; - var kg = bM(k8.arguments); - try { - for (kg.s(); !(kd = kg.n()).done;) { - var kh = kd.value; - var kj = kh.column.name; - var kk = null; - kk = kh.column.orig && k7.modifiedcols && k7.modifiedcols.hasOwnProperty(kj) ? k7.modifiedcols[kj] : k7.data[kj]; - kk = bU(k9.get(kj), kk); - kf.push("@".concat(kh.arg, " = ").concat(kk)); - } - } catch (kp) { - kg.e(kp); - } finally { - kg.f(); - } - var km = kf.join(", "); - return "execute ".concat(kc, " ").concat(km); - } - function bY() { - var k7 = this.getReport(); - if (k7) { - var k8 = k7._data.group; - if (!k8 || 0 === k8.length) { - return null; - } - var k9; - var kb = []; - var kc = bM(k8); - try { - for (kc.s(); !(k9 = kc.n()).done;) { - var kd; - var kf = bM(k9.value.by); - try { - for (kf.s(); !(kd = kf.n()).done;) { - var kg = kd.value; - kb.push(kg); - } - } catch (kj) { - kf.e(kj); - } finally { - kf.f(); - } - } - } catch (kk) { - kc.e(kk); - } finally { - kc.f(); - } - if (kb.length > 0) { - var kh = kb.join(","); - this.setSort(kh); - this.sort(false); - } - } - } - function bZ() { - return c0.apply(this, arguments); - } - function c0() { - return (c0 = aM()(aO.a.mark(function k7() { - var k8; - var k9; - var kb; - var kc; - var kd; - var kf; - var kg; - var kh = this; - return aO.a.wrap(function (kj) { - for (;;) { - switch (kj.prev = kj.next) { - case 0: - if (k8 = this.childDW, this._dataObject) { - kj.next = 3; - break; - } - return kj.abrupt("return", k8); - case 3: - if (k9 = this._dataObject.reportData) { - kj.next = 6; - break; - } - return kj.abrupt("return", k8); - case 6: - if (kb = k9.child) { - kj.next = 9; - break; - } - return kj.abrupt("return", k8); - case 9: - kc = []; - kd = aO.a.mark(function kk(km) { - var kp; - return aO.a.wrap(function (kq) { - for (;;) { - switch (kq.prev = kq.next) { - case 0: - if (k8.has(km)) { - kq.next = 18; - break; - } - if (kp = null, "function" != typeof kh.dwGetDataObject) { - kq.next = 6; - break; - } - kp = kh.dwGetDataObject(km); - kq.next = 16; - break; - case 6: - if ("function" != typeof cc.dwGetDataObject) { - kq.next = 10; - break; - } - kp = cc.dwGetDataObject.call(kh, km); - kq.next = 16; - break; - case 10: - if ("function" != typeof dwGetDataObject) { - kq.next = 14; - break; - } - kp = dwGetDataObject.call(kh, km); - kq.next = 16; - break; - case 14: - console.error("please provide dwGetDataObject function"); - return kq.abrupt("return", { - v: k8 - }); - case 16: - kc.push(kp); - kp.then(function (ku) { - var kv = kh.createNew(); - kv.getDW = kh.getDW; - kv.dataObject = ku; - k8.set(km, kv); - }, function (ku) { - console.error("childDWGetDataObject:" + km + " not exists"); - }); - case 18: - case "end": - return kq.stop(); - } - } - }, kk); - }); - kj.t0 = aO.a.keys(kb); - case 12: - if ((kj.t1 = kj.t0()).done) { - kj.next = 20; - break; - } - kg = kj.t1.value; - return kj.delegateYield(kd(kg), "t2", 15); - case 15: - if (!(kf = kj.t2)) { - kj.next = 18; - break; - } - return kj.abrupt("return", kf.v); - case 18: - kj.next = 12; - break; - case 20: - kj.prev = 20; - kj.next = 23; - return Promise.all(kc); - case 23: - kj.next = 28; - break; - case 25: - kj.prev = 25; - kj.t3 = kj.catch(20); - console.error(kj.t3); - case 28: - return kj.abrupt("return", k8); - case 29: - case "end": - return kj.stop(); - } - } - }, k7, this, [[20, 25]]); - }))).apply(this, arguments); - } - function c1() { - return c2.apply(this, arguments); - } - function c2() { - return (c2 = aM()(aO.a.mark(function k7() { - var k8; - var k9; - var kb; - var kc; - var kd = this; - return aO.a.wrap(function (kf) { - for (;;) { - switch (kf.prev = kf.next) { - case 0: - if (k8 = this.childDW, this._dataObject) { - kf.next = 3; - break; - } - return kf.abrupt("return", k8); - case 3: - if (k9 = this._dataObject.reportData) { - kf.next = 6; - break; - } - return kf.abrupt("return"); - case 6: - if (kb = k9.child) { - kf.next = 9; - break; - } - return kf.abrupt("return"); - case 9: - if (!this._childRetrieved) { - kf.next = 11; - break; - } - return kf.abrupt("return"); - case 11: - if (!this._pchilddw) { - kf.next = 14; - break; - } - kf.next = 14; - return this._pchilddw; - case 14: - this._childRetrieved = true; - kc = []; - k8.forEach(function (kg, kh) { - var kj = kb[kh]; - var kk = true; - "object" === aK()(kj) && (kk = kj.autoRetrieve); - kk && (kg.setTransObject(kd._db), kc.push(kg.retrieve())); - }); - return kf.abrupt("return", Promise.all(kc)); - case 18: - case "end": - return kf.stop(); - } - } - }, k7, this); - }))).apply(this, arguments); - } - function c3(k7) { - if (!k7 && "object" !== aK()(k7)) { - return k7; - } - var k8 = k7.constructor === Array ? [] : {}; - Object.keys(k7).forEach(function (k9) { - k7[k9] && "object" === aK()(k7[k9]) ? k8[k9] = c3(k7[k9]) : k8[k9] = k7[k9]; - }); - return k8; - } - function c4() { - return c5.apply(this, arguments); - } - function c5() { - return (c5 = aM()(aO.a.mark(function k7() { - var k8; - var k9; - var kb; - var kc = arguments; - return aO.a.wrap(function (kd) { - for (;;) { - switch (kd.prev = kd.next) { - case 0: - if (!(kc.length > 0 && undefined !== kc[0]) || kc[0], !(kc.length > 1 && undefined !== kc[1]) || kc[1], (k8 = this._table.update) && this._db) { - kd.next = 5; - break; - } - return kd.abrupt("return", -1); - case 5: - if ("function" != typeof this._db.updateDW) { - kd.next = 21; - break; - } - if (k9 = {}, !(this.getChanges(k9) > 0)) { - kd.next = 20; - break; - } - kd.prev = 9; - kd.next = 12; - return this._db.updateDW(k8, k9); - case 12: - 1 === (kb = kd.sent) && this.resetUpdate(); - return kd.abrupt("return", kb); - case 17: - kd.prev = 17; - kd.t0 = kd.catch(9); - return kd.abrupt("return", -1); - case 20: - return kd.abrupt("return", 1); - case 21: - return kd.abrupt("return", -1); - case 22: - case "end": - return kd.stop(); - } - } - }, k7, this, [[9, 17]]); - }))).apply(this, arguments); - } - function c6() { - return c7.apply(this, arguments); - } - function c7() { - return (c7 = aM()(aO.a.mark(function k7() { - var k8; - var k9; - var kb; - var kc; - var kd; - var kf; - var kg = arguments; - return aO.a.wrap(function (kh) { - for (;;) { - switch (kh.prev = kh.next) { - case 0: - if (this._db) { - kh.next = 2; - break; - } - return kh.abrupt("return", -1); - case 2: - kh.prev = 2; - kh.next = 5; - return c1.call(this); - case 5: - kh.next = 10; - break; - case 7: - kh.prev = 7; - kh.t0 = kh.catch(2); - console.error(kh.t0.stack); - case 10: - if (k8 = -1, "function" != typeof this._db.retrieveDW) { - kh.next = 25; - break; - } - for (kh.prev = 12, kb = kg.length, kc = new Array(kb), kd = 0; kd < kb; kd++) { - kc[kd] = kg[kd]; - } - kh.next = 16; - return (k9 = this._db).retrieveDW.apply(k9, [this._table.retrieve].concat(kc)); - case 16: - kf = kh.sent; - this.data = kf; - k8 = this._data.length; - kh.next = 25; - break; - case 21: - kh.prev = 21; - kh.t1 = kh.catch(12); - console.log(kh.t1.stack); - this.data = []; - case 25: - return kh.abrupt("return", k8); - case 26: - case "end": - return kh.stop(); - } - } - }, k7, this, [[2, 7], [12, 21]]); - }))).apply(this, arguments); - } - function c8(k7) { - var k8 = k7._dataObject.reportData; - return k8 ? k8.child : null; - } - function c9(k7, k8) { - return new Proxy(k7, { - get: function (k9, kb) { - kb = kb.toLowerCase(); - var kc = k9._dwObjects[k8]; - var kd = kc.cell; - var kf = kc.ri; - var kg = kc.ci; - if ("text" === kb || "tabsequence" === kb) { - return kd[kb]; - } - if ("visible" === kb) { - var kh = kd.visible; - undefined === kh && (kh = true); - return kh; - } - if ("protect" === kb) { - var kj = kd.protect; - undefined === kj && (kj = 0); - return kj; - } - if ("width" === kb) { - return k9._dataObject.reportData.cols[kg].width; - } - if ("x" === kb) { - for (var kk = k9._dataObject.reportData.cols, km = 0, kp = 0; kp <= kg; kp++) { - var kq = kk[kp]; - kq && kq.width ? km += kq.width : km += kk.width; - } - return km; - } - if ("height" === kb) { - return k9._dataObject.reportData.rows[kf].height; - } - if ("dddw" === kb) { - var ku = kd; - ku.edit || (ku.edit = { - style: "dropdowndw", - attrs: { - name: undefined, - displayColumn: undefined, - dataColumn: undefined, - autoRetrieve: true - } - }); - return ku.edit && "dropdowndw" === ku.edit.style ? function (kv, kw, kx) { - return new Proxy(kv, { - get: function (ky, kz) { - return "name" === (kz = kz.toLowerCase()) ? kx.name : "displaycolumn" === kz ? kx.displayColumn : "datacolumn" === kz ? kx.dataColumn : "filtercolumns" === kz ? kx.filterColumns : "allowedit" === kz ? kx.allowEdit : "nilisnull" === kz ? kx.nilIsnull : "percentwidth" === kz ? kx.percentWidth : "lines" === kz ? kx.lines : "hscrollbar" === kz ? kx.hscrollbar : "vscrollbar" === kz ? kx.vscrollbar : "case" === kz ? kx.case : "autoretrieve" === kz ? kx.autoRetrieve : undefined; - }, - set: function (ky, kz, kA) { - var kB = false; - if ("name" === (kz = kz.toLowerCase()) && kA) { - if (!kv.childDW.has(kA)) { - var kC = c8(kv); - if (!kC) { - return false; - } - kC[kA] || (kC[kA] = { - name: kA, - autoRetrieve: kx.autoRetrieve - }); - kv.getChildDW(); - } - kx.name = kA; - kB = kA; - } else { - if ("displaycolumn" === kz) { - kx.displayColumn = kA; - kB = true; - } else { - if ("datacolumn" === kz) { - kx.dataColumn = kA; - kB = true; - } else { - if ("filtercolumns" === kz) { - kx.filterColumns = kA; - kB = kA; - } else { - if ("allowedit" === kz) { - kx.allowEdit = kA; - kB = true; - } else { - if ("percentwidth" === kz) { - kx.percentWidth = kA; - kB = true; - } else { - if ("nilisnull" === kz) { - kx.nilIsnull = kA; - kB = true; - } else { - if ("lines" === kz) { - kx.lines = kA; - kB = true; - } else { - if ("hscrollbar" === kz) { - kx.hscrollbar = kA; - kB = true; - } else { - if ("vscrollbar" === kz) { - kx.vscrollbar = kA; - kB = true; - } else { - if ("case" === kz) { - kx.case = kA; - kB = true; - } else { - if ("autoretrieve" !== kz) { - console.warn("dddw 未实现" + kz); - return true; - } - var kD = kx.name; - if (kD) { - var kE = c8(kv); - if (!kE) { - return false; - } - var kF = kE[kD]; - kF ? kF.autoRetrieve = kA : kE[kD] = { - name: kD, - autoRetrieve: kA - }; - } - kx.autoRetrieve = kA; - kB = true; - } - } - } - } - } - } - } - } - } - } - } - kB && ky.setRedraw && ky.setRedraw(true); - return kB; - } - }); - }(k7, 0, ku.edit.attrs) : undefined; - } - return "background" === kb ? function (kv, kw) { - return new Proxy(kw, { - get: function (kx, ky) { - if ("color" === (ky = ky.toLowerCase())) { - if (undefined !== kw.bgcolor) { - return kw.bgcolor; - } - if (kw.style) { - return kv.getSpread().sheet.data.styles[kw.style].bgcolor; - } - } - }, - set: function (kx, ky, kz) { - var kA = false; - "color" === (ky = ky.toLowerCase()) && (kw.bgcolor = kz, kA = true); - kA && kv.setRedraw && kv.setRedraw(true); - return kA; - } - }); - }(k7, kd) : undefined; - }, - set: function (k9, kb, kc) { - kb = kb.toLowerCase(); - var kd = k9._dwObjects[k8]; - var kf = kd.cell; - var kg = kd.ri; - var kh = kd.ci; - var kj = false; - if ("text" === kb || "visible" === kb || "tabsequence" === kb || "protect" === kb) { - kf[kb] = kc; - kj = true; - } else { - if ("width" === kb) { - var kk = k9._dataObject.reportData.cols; - kk[kh] ? kk[kh].width = kc : kk[kh] = { - width: kc - }; - kj = true; - } else { - "height" === kb && (k9._dataObject.reportData.rows[kg].height = kc, kj = true); - } - } - return !!kj && (k9.setRedraw && k9.setRedraw(true), true); - } - }); - } - function cb(k7, k8) { - if (k7._dwProxyObjects.has(k8)) { - return k7._dwProxyObjects.get(k8); - } - var k9; - var kb; - var kc; - var kd = null; - "datawindow" === k8 ? (k9 = k7, kb = new Proxy(k9, { - get: function (kf, kg) { - if ("count" === (kg = kg.toLowerCase())) { - return kf._table.columns.length; - } - } - }), kc = new Proxy(k9, { - get: function (kf, kg) { - if ("select" === (kg = kg.toLowerCase())) { - return kf._table.retrieve; - } - } - }), kd = new Proxy(k9, { - get: function (kf, kg) { - return "column" === (kg = kg.toLowerCase()) ? kb : "readonly" === kg ? "read" === k9._.sheet.data.settings.mode : "color" === kg ? k9._.sheet.data.report._data.color : "table" === kg ? kc : undefined; - }, - set: function (kf, kg, kh) { - "readonly" === (kg = kg.toLowerCase()) ? "yes" === kh || "true" === kh ? kf.setOption({ - mode: "read" - }) : kf.setOption({ - mode: "edit" - }) : "color" === kg && (k9._.sheet.data.report._data.color = kh, k9.getSpread().reload()); - return true; - } - })) : k7._dwObjects[k8] && (kd = c9(k7, k8)); - k7._dwProxyObjects.set(k8, kd); - return kd; - } - var cc = function () { - function k7() { - a6()(this, k7); - aI()(this, "_db", undefined); - aI()(this, "_data", undefined); - aI()(this, "_dataObject", undefined); - aI()(this, "_table", undefined); - aI()(this, "_columns", undefined); - aI()(this, "coreData", { - primaryData: [], - deleteData: [], - filterData: [] - }); - aI()(this, "_sharedDs", null); - aI()(this, "_isShared", false); - aI()(this, "_currentRow", 0); - aI()(this, "_sortRules", []); - aI()(this, "_filterFomula", undefined); - aI()(this, "_selectedRows", new Map()); - this.eventMap = Object(bH.d)(); - this.update = c4; - this.retrieve = c6; - this.getDW = null; - this.childDW = new Map(); - } - return a8()(k7, [{ - key: "createNew", - value: function () { - return new k7(); - } - }, { - key: "create", - value: function (kb) { - var kc = kb; - "string" == typeof kb && (kc = bq(kb)); - return "object" === aK()(kc) ? (this.setDataObject(kc), 1) : -1; - } - }, { - key: "setTransObject", - value: function (kb) { - this._db = kb; - } - }, { - key: "getReport", - value: function () { - return null; - } - }, { - key: "groupCalc", - value: function () { - bY.call(this); - } - }, { - key: "data", - get: function () { - return this._data; - }, - set: function (kb) { - Array.isArray(kb) ? this._data = kb : this._data = []; - this.coreData.deleteData = []; - this.coreData.filterData = []; - this.coreData.primaryData = []; - this.coreData.primaryData = this._data.map(function (kc) { - return { - status: bO.NotModified, - data: kc - }; - }); - this._table && this._table.sort && (this.setSort(this._table.sort), this.sort()); - this._dataChanged && this._dataChanged(); - this.groupCalc(); - this._rowCountChanged(); - } - }, { - key: "dataObject", - get: function () { - return this._dataObject; - }, - set: function (kb) { - this.setDataObject(kb); - } - }, { - key: "setDataObject", - value: (k9 = aM()(aO.a.mark(function kb(kc) { - var kd; - var kf; - var kg; - var kh; - var kj; - var kk; - var km; - var kp; - var kq; - var ku = this; - return aO.a.wrap(function (kv) { - for (;;) { - switch (kv.prev = kv.next) { - case 0: - if ("string" != typeof kc) { - kv.next = 21; - break; - } - if ("function" != typeof this.dwGetDataObject) { - kv.next = 8; - break; - } - kv.next = 5; - return this.dwGetDataObject(kc); - case 5: - kc = kv.sent; - kv.next = 21; - break; - case 8: - if ("function" != typeof k7.dwGetDataObject) { - kv.next = 14; - break; - } - kv.next = 11; - return k7.dwGetDataObject.call(this, kc); - case 11: - kc = kv.sent; - kv.next = 21; - break; - case 14: - if ("function" != typeof dwGetDataObject) { - kv.next = 20; - break; - } - kv.next = 17; - return dwGetDataObject.call(this, kc); - case 17: - kc = kv.sent; - kv.next = 21; - break; - case 20: - console.error("ds : ".concat(kc, " can't get")); - case 21: - kv.next = 24; - break; - case 23: - "string" == typeof kc && ("function" == typeof this.dwGetDataObject ? kc = this.dwGetDataObject(kc) : "function" == typeof k7.dwGetDataObject ? kc = k7.dwGetDataObject.call(this, kc) : "function" == typeof dwGetDataObject ? kc = dwGetDataObject.call(this, kc) : console.error("ds : ".concat(kc, " can't get"))); - case 24: - if (this._dataObject = null, kd = kc ? c3(kc) : null, this._table = kd ? kd.table : null, this._columns = new Map(), this._initValues = {}, this._colProxys = new Map(), this._dwProxyObjects = new Map(), this._childRetrieved = false, this._objects = new Proxy(this, { - get: function (kw, kx) { - kx = kx.toLowerCase(); - return kw._colProxys.has(kx) ? kw._colProxys.get(kx) : cb(kw, kx); - } - }), !this._table) { - kv.next = 50; - break; - } - kf = bM(this._table.columns); - kv.prev = 35; - kh = aO.a.mark(function kw() { - var kx; - var ky; - return aO.a.wrap(function (kz) { - for (;;) { - switch (kz.prev = kz.next) { - case 0: - kx = kg.value; - ku._columns.set(kx.name, kx); - undefined !== kx.initvalue && "string" == typeof kx.initvalue && ("long" === kx.type ? kx.initvalue = parseInt(kx.initvalue) : "number" === kx.type && (kx.initvalue = Number(kx.initvalue))); - undefined !== kx.initvalue && (ku._initValues[kx.name] = kx.initvalue); - ky = new Proxy(ku, { - get: function (kA, kB) { - var kC = parseInt(kB); - if (isNaN(kC)) { - if ("coltype" === (kB = kB.toLowerCase())) { - return kx.type; - } - var kD = cb(kA, kx.name); - return kD ? kD[kB] : undefined; - } - var kE = kC + 1; - return kA.getItem(kE, kx.name); - }, - set: function (kA, kB, kC) { - var kD = parseInt(kB); - if (isNaN(kD)) { - if ("coltype" === (kB = kB.toLowerCase())) { - kx.type = kC; - return true; - } - var kE = cb(kA, kx.name); - return !!kE && (kE[kB] = kC, true); - } - var kF = parseInt(kB) + 1; - return kA.setItem(kF, kx.name, kC); - } - }); - ku._colProxys.set(kx.name, ky); - case 6: - case "end": - return kz.stop(); - } - } - }, kw); - }); - kf.s(); - case 38: - if ((kg = kf.n()).done) { - kv.next = 42; - break; - } - return kv.delegateYield(kh(), "t0", 40); - case 40: - kv.next = 38; - break; - case 42: - kv.next = 47; - break; - case 44: - kv.prev = 44; - kv.t1 = kv.catch(35); - kf.e(kv.t1); - case 47: - kv.prev = 47; - kf.f(); - return kv.finish(47); - case 50: - if (this._dataObject = kd, this._sortRules = [], this.data = [], this._pchilddw = null, this.childDW.clear(), this._dwObjects = {}, !kd || !kd.reportData) { - kv.next = 67; - break; - } - kj = kd.reportData.rows; - kv.t2 = aO.a.keys(kj); - case 59: - if ((kv.t3 = kv.t2()).done) { - kv.next = 67; - break; - } - if (kk = kv.t3.value, km = kj[kk].cells) { - kv.next = 64; - break; - } - return kv.abrupt("continue", 59); - case 64: - for (kp in km) (kq = km[kp]).name && (this._dwObjects[kq.name] = { - cell: kq, - ri: parseInt(kk), - ci: parseInt(kp) - }); - kv.next = 59; - break; - case 67: - this._pchilddw = this.getChildDW(); - kv.next = 71; - return this._pchilddw; - case 71: - case "end": - return kv.stop(); - } - } - }, kb, this, [[35, 44, 47, 50]]); - })), function (kc) { - return k9.apply(this, arguments); + "body": JSON.stringify({ + "id": _0x116dfa }) - }, { - key: "object", - get: function () { - return this._objects; - } - }, { - key: "getChildDW", - value: (k8 = aM()(aO.a.mark(function kc() { - return aO.a.wrap(function (kd) { - for (;;) { - switch (kd.prev = kd.next) { - case 0: - kd.next = 2; - return bZ.call(this); - case 2: - return kd.abrupt("return", kd.sent); - case 3: - case "end": - return kd.stop(); - } - } - }, kc, this); - })), function () { - return k8.apply(this, arguments); - }) - }, { - key: "setChild", - value: function (kd, kf) { - this.childDW.set(kd, kf); - } - }, { - key: "getChild", - value: function (kd) { - var kf = this.childDW; - var kg = this._dwObjects[kd].cell; - if (kg && kg.edit && "dropdowndw" === kg.edit.style) { - var kh = kg.edit.attrs.name; - return kf.get(kh); - } - } - }, { - key: "rowCount", - value: function () { - return this.coreData.primaryData.length; - } - }, { - key: "setItem", - value: function (kd, kf, kg) { - if ((kd -= 1) >= this.coreData.primaryData.length || kd < 0) { - return -1; - } - if ("object" === aK()(kf)) { - for (var kh = 0, kj = Object.keys(kf); kh < kj.length; kh++) { - var kk = kj[kh]; - this.setItem(kd + 1, kk, kf[kk]); - } - return 1; - } - var km = this.coreData.primaryData[kd]; - var kp = bS(this._table.columns, kf, this._columns); - if ("" == kp) { - return -1; - } - undefined === kg && (kg = null); - var kq = this._columns.get(kp); - if ("string" !== kq.type && null !== kg) { - if ("" === kg) { - kg = null; - } else { - if ("datetime" === kq.type) { - var ku = new Date(kg); - if (isNaN(ku.getTime())) { - return -1; - } - } else { - var kv = Number(kg); - if (isNaN(kv)) { - return -1; - } - } - } - } - var kw = false; - var kx = kg; - if ("string" === kq.type || "datetime" === kq.type) { - km.data[kp] !== kg && (kw = true); - } else { - var ky = null === kg ? null : Number(kg); - ky = isNaN(ky) ? null : ky; - km.data[kp] !== ky && (kx = ky, kw = true); - } - if (kw) { - var kz = undefined === km.data[kp] ? null : km.data[kp]; - km.modifiedcols ? km.modifiedcols.hasOwnProperty(kp) || (km.modifiedcols[kp] = kz) : (km.modifiedcols = {}, km.modifiedcols[kp] = kz); - km.status === bO.NotModified ? km.status = bO.DataModified : km.status === bO.New && (km.status = bO.NewModified); - km.data[kp] = kx; - this._dataChanged && this._dataChanged(kd, kp); - } - return 1; - } - }, { - key: "getItem", - value: function (kd) { - var kf = arguments.length > 1 && undefined !== arguments[1] ? arguments[1] : null; - if ((kd -= 1) >= this.coreData.primaryData.length || kd < 0) { - return ""; - } - var kg = this.coreData.primaryData[kd]; - if (!kf) { - return kg.data; - } - var kh = bS(this._table.columns, kf, this._columns); - return "" == kh ? "" : kg.data[kh]; - } - }, { - key: "setItemStatus", - value: function (kd, kf, kg, kh) { - var kj = bT(this, kg); - if (!kj) { - return -1; - } - if (kd < 0 || kd > kj.length) { - return -1; - } - var kk = kj[kd - 1]; - if (0 === kf) { - if (kk.status === kh) { - return 1; - } - if (kk.status === bO.New) { - if (kh === bO.NotModified) { - return -1; - } - kk.status = kh; - } else { - if (kk.status === bO.NewModified) { - if (kh === bO.New) { - return -1; - } - if (kh !== bO.NotModified) { - kk.status = kh; - return 1; - } - kk.status = bO.New; - } else { - if (kk.status === bO.DataModified) { - if (kh === bO.New) { - kk.status = bO.NewModified; - return 1; - } - kk.status = kh; - } else { - kk.status === bO.NotModified && (kk.status = kh); - } - } - } - kk.modifiedcols && delete kk.modifiedcols; - return 1; - } - var km = bS(this._table.columns, kf, this._columns); - return "" === km ? -1 : (kh === bO.NotModified ? kk.modifiedcols && (delete kk.modifiedcols[km], 0 === Object.keys(kk.modifiedols).length && (delete kk.modifiedcols, kk.status === bO.NewModified ? kk.status = bO.New : kk.status === bO.DataModified && (kk.status = bO.NotModified))) : kh === bO.DataModified && (kk.modifiedcols || (kk.modifiedcols = {}), kk.modifiedcols.hasOwnProperty(km) || (kk.modifiedcols[km] = kk.data[km]), kk.status === bO.New ? kk.status = bO.NewModified : kk.status === bO.NotModified && (kk.status = bO.DataModified)), 1); - } - }, { - key: "getItemStatus", - value: function (kd, kf, kg) { - var kh = bT(this, kg); - if (!kh) { - return null; - } - if (kd < 0 || kd > kh.length) { - return null; - } - var kj = kh[kd - 1]; - if (0 === kf) { - return kj.status; - } - var kk = bS(this._table.columns, kf, this._columns); - return "" === kk ? null : kj.modifiedcols && kj.modifiedcols.hasOwnProperty(kk) ? bO.DataModified : bO.NotModified; - } - }, { - key: "insertRow", - value: function (kd) { - var kf = 0; - if (!this._dataObject) { - return -1; - } - 0 === this.coreData.primaryData.length && c1.call(this); - kf = kd <= 0 ? kd = this.coreData.primaryData.length + 1 : kd <= this.coreData.primaryData.length ? kd <= 1 ? 1 : kd : this.coreData.primaryData.length + 1; - --kd; - var kg = c3(this._initValues); - this.coreData.primaryData.splice(kd, 0, { - status: bO.New, - data: kg - }); - this._rowCountChanged(); - return kf; - } - }, { - key: "deleteRow", - value: function (kd) { - if (0 == kd && (kd = this._currentRow), --kd, this.coreData.primaryData.length <= kd) { - return -1; - } - var kf = this.coreData.primaryData.splice(kd, 1); - this.coreData.deleteData.push(kf[0]); - this._rowCountChanged(); - return 1; - } - }, { - key: "retrieve", - value: function () { - for (var kd = arguments.length, kf = new Array(kd), kg = 0; kg < kd; kg++) { - kf[kg] = arguments[kg]; - } - return this.retrieveToContext.apply(this, [0].concat(kf)); - } - }, { - key: "retrieveToContext", - value: function (kd) { - if (!this._db) { - return -1; - } - var kf = this._table; - var kg = kf.retrieve; - var kh = kf.procedure; - var kj = ""; - kg ? kj = kg : kh && (kj = kh); - var kk = this._table.arguments; - if (kk) { - if (kk.length > (arguments.length <= 1 ? 0 : arguments.length - 1)) { - this._db.sqlErrText = "arguments size error"; - return -1; - } - if (!this._table.vars) { - var km = cd.parseSQLVars(kj); - this._table.vars = km; - } - for (var kp = {}, kq = 0; kq < kk.length; kq++) { - if (kq < (arguments.length <= 1 ? 0 : arguments.length - 1)) { - var ku = kk[kq]; - var kv = ku.arg; - var kw = ku.type; - var kx = kq + 1 < 1 || arguments.length <= kq + 1 ? undefined : arguments[kq + 1]; - kp[kv] = { - type: kw, - value: kx - }; - } - } - kj = cd.repaceSQLVar(kj, this._table.vars, kp); - } - var ky = ""; - this._db.info && this._db.info.DBMS && (ky = this._db.info.DBMS.toUpperCase()); - var kz; - var kA = this._db.query(kj); - var kB = this._table.columns; - var kC = {}; - var kD = false; - var kE = bM(kB); - try { - for (kE.s(); !(kz = kE.n()).done;) { - var kF = kz.value; - if (kF.dbname) { - var kG = null; - if ("ORACLE" === ky) { - kG = kF.name.toUpperCase(); - } else { - var kH = (kG = kF.dbname).indexOf("."); - kH > 0 && (kG = kG.substring(kH + 1)); - } - kG !== kF.name && (kC[kG] = kF.name, kD = true); - } - } - } catch (kJ) { - kE.e(kJ); - } finally { - kE.f(); - } - kD || (kC = null); - var kI = 0; - kd ? kI = kA.toJson(kd, 0, 0, kC) : (this.data = kA.toJson(0, 0, kC).data, kI = this._data.length); - kA.close(); - return kI; - } - }, { - key: "update", - value: function () { - var kd = !(arguments.length > 1 && undefined !== arguments[1]) || arguments[1]; - var kf = this._table.update; - if (!kf || !this._db) { - return -1; - } - var kg; - var kh = this._table.columns.filter(function (l3) { - var l4 = !!l3.key && l3.key; - var l5 = l3.dbname || ""; - return l4 && "" !== l5; - }); - var kj = bM(this.coreData.deleteData); - try { - for (kj.s(); !(kg = kj.n()).done;) { - var kk = kg.value; - if (kk.status !== bO.New && kk.status !== bO.NewModified) { - var km = "delete from ".concat(kf); - var kp = this._table.props; - if (kp && kp.delete) { - km = bX(kk, kp.delete.method, this._columns); - } else { - var kq; - var ku = []; - var kv = bM(kh); - try { - for (kv.s(); !(kq = kv.n()).done;) { - var kw = kq.value; - var kx = kw.name; - kk.modifiedcols && kk.modifiedcols.hasOwnProperty(kx) ? ku.push(bV(kw, kk.modifiedcols[kx])) : ku.push(bV(kw, kk.data[kx])); - } - } catch (l3) { - kv.e(l3); - } finally { - kv.f(); - } - ku.length > 0 && (km += " where " + ku.join(" and ")); - } - try { - this._db.execute(km); - } catch (l4) { - return -1; - } - } - } - } catch (l5) { - kj.e(l5); - } finally { - kj.f(); - } - var ky; - var kz = bM(this.coreData.primaryData); - try { - for (kz.s(); !(ky = kz.n()).done;) { - var kA = ky.value; - if (kA.status === bO.DataModified) { - if (!kA.modifiedcols) { - continue; - } - var kB = null; - var kC = this._table.props; - if (kC && kC.update) { - kB = bX(kA, kC.update.method, this._columns); - } else { - var kD; - var kE = []; - var kF = []; - var kG = bM(kh); - try { - for (kG.s(); !(kD = kG.n()).done;) { - var kH = kD.value; - var kI = kH.name; - kA.modifiedcols.hasOwnProperty(kI) ? kF.push(bV(kH, kA.modifiedcols[kI])) : kF.push(bV(kH, kA.data[kI])); - } - } catch (l6) { - kG.e(l6); - } finally { - kG.f(); - } - var kJ; - var kK = bM(this._table.columns); - try { - for (kK.s(); !(kJ = kK.n()).done;) { - var kL = kJ.value; - if (kL.update) { - var kM = kL.name; - var kN = kA.modifiedcols.hasOwnProperty(kM); - kN && kE.push(bV(kL, kA.data[kM])); - kL.key || (kN && this._table.updatewhere === bP.KeyAndModifiedColumns ? kF.push(bV(kL, kA.modifiedcols[kM])) : this._table.updatewhere === bP.KeyAndUpdateColumns && kF.push(bV(kL, kN ? kA.modifiedcols[kM] : kA.data[kM]))); - } - } - } catch (l7) { - kK.e(l7); - } finally { - kK.f(); - } - if (0 === kE.length) { - continue; - } - var kO = kE.join(" , "); - var kP = kF.join(" and "); - kB = "update ".concat(kf, " set ").concat(kO, " where ").concat(kP); - } - try { - this._db.execute(kB); - } catch (l8) { - this.sqlErrText = l8.message; - return -1; - } - } - } - } catch (l9) { - kz.e(l9); - } finally { - kz.f(); - } - var kQ; - var kR = bM(this.coreData.primaryData); - try { - for (kR.s(); !(kQ = kR.n()).done;) { - var kS = kQ.value; - if (kS.status === bO.NewModified) { - var kT = null; - var kU = this._table.props; - if (kU && kU.insert) { - kT = bX(kS, kU.insert.method, this._columns); - } else { - var kV; - var kW = []; - var kX = []; - var kY = bM(this._table.columns); - try { - for (kY.s(); !(kV = kY.n()).done;) { - var kZ = kV.value; - if (kZ.update) { - var l0 = kZ.name; - kS.data.hasOwnProperty(l0) && (kW.push(kZ.dbname), kX.push(bU(kZ, kS.data[l0]))); - } - } - } catch (lb) { - kY.e(lb); - } finally { - kY.f(); - } - var l1 = kW.join(","); - var l2 = kX.join(","); - kT = "insert into ".concat(kf, "(").concat(l1, ") values(").concat(l2, ")"); - } - try { - this._db.execute(kT); - } catch (lc) { - this.sqlErrText = lc.message; - return -1; - } - } - } - } catch (ld) { - kR.e(ld); - } finally { - kR.f(); - } - kd && this.resetUpdate(); - return 1; - } - }, { - key: "resetUpdate", - value: function () { - this.coreData.deleteData = []; - var kd; - var kf = bM(this.coreData.primaryData); - try { - for (kf.s(); !(kd = kf.n()).done;) { - var kg = kd.value; - kg.status = bO.NotModified; - kg.modifiedcols && delete kg.modifiedcols; - } - } catch (km) { - kf.e(km); - } finally { - kf.f(); - } - var kh; - var kj = bM(this.coreData.filterData); - try { - for (kj.s(); !(kh = kj.n()).done;) { - var kk = kh.value; - kk.status = bO.NotModified; - kk.modifiedcols && delete kk.modifiedcols; - } - } catch (kp) { - kj.e(kp); - } finally { - kj.f(); - } - } - }, { - key: "reset", - value: function () { - var kd = this.rowCount(); - this.coreData.primaryData = []; - this.coreData.deleteData = []; - this.coreData.filterData = []; - kd != this.rowCount() && this._rowCountChanged(); - } - }, { - key: "setRow", - value: function (kd) { - return kd < 1 || kd > this.coreData.primaryData.length ? -1 : (this._currentRow = kd, kd); - } - }, { - key: "scrollToRow", - value: function (kd) { - return this.setRow(kd); - } - }, { - key: "scrollPriorRow", - value: function () { - return this.scrollToRow(this._currentRow - 1); - } - }, { - key: "scrollNextRow", - value: function () { - return this.scrollToRow(this._currentRow + 1); - } - }, { - key: "getRow", - value: function () { - return this._currentRow; - } - }, { - key: "currentRow", - value: function () { - return this._currentRow; - } - }, { - key: "selectRow", - value: function (kd, kf) { - if (0 === kd) { - if (kf) { - for (var kg = 0; kg < this.coreData.primaryData.length; kg++) { - this._selectedRows.set(kg, true); - } - } else { - this._selectedRows.clear(); - } - return 1; - } - if (kd < 1 || kd > this.coreData.primaryData.length) { - return -1; - } - var kh = kd - 1; - kf ? this._selectedRows.set(kh, kf) : this._selectedRows.delete(kh); - return 1; - } - }, { - key: "isSelected", - value: function (kd) { - var kf = kd - 1; - return this._selectedRows.has(kf); - } - }, { - key: "getSelectedRows", - value: function () { - return this._selectedRows; - } - }, { - key: "shareData", - value: function (kd) { - kd.coreData = this.coreData; - this._sharedDs = kd; - kd._isShared = true; - kd.groupCalc(); - kd._rowCountChanged(); - return 1; - } - }, { - key: "shareDataOff", - value: function () { - this._sharedDs ? this._sharedDs.shareDataOff() : this._isShared && (this.coreData = { - primaryData: [], - deleteData: [], - filterData: [] - }, this.groupCalc(), this._rowCountChanged()); - } - }, { - key: "rowsMove", - value: function (kd, kf, kg, kh, kj, kk) { - if (!bW.call(this, kh)) { - return -1; - } - var km = bT(this, kg); - if (!km) { - return -1; - } - var kp = bT(kh, kk); - if (!kp) { - return -1; - } - if (kf < kd) { - var kq = [kf, kd]; - kd = kq[0]; - kf = kq[1]; - } - if (kd > km.length) { - return 1; - } - var ku = kf - kd + 1; - if (kh === this && kg === kk) { - if (kj >= kd && kj <= kf) { - return 1; - } - kj > kf && (kj -= ku); - } - var kv = km.splice(kd - 1, ku); - if (kh !== this) { - var kw; - var kx = bM(kv); - try { - for (kx.s(); !(kw = kx.n()).done;) { - kw.value.status = bO.NewModified; - } - } catch (ky) { - kx.e(ky); - } finally { - kx.f(); - } - } - kp.splice.apply(kp, [kj - 1, 0].concat(ac()(kv))); - this._rowCountChanged(); - return 1; - } - }, { - key: "rowsCopy", - value: function (kd, kf, kg, kh, kj, kk) { - if (!bW.call(this, kh)) { - return -1; - } - var km = bT(this, kg); - if (!km) { - return -1; - } - var kp = bT(kh, kk); - if (!kp) { - return -1; - } - if (kf < kd) { - var kq = [kf, kd]; - kd = kq[0]; - kf = kq[1]; - } - if (kd > km.length) { - return 1; - } - var ku; - var kv = km.slice(kd - 1, kf); - var kw = bM(kv); - try { - for (kw.s(); !(ku = kw.n()).done;) { - var kx = ku.value; - kx.modifiedcols && (kx.modifiedcols = undefined); - kx.status = bO.NewModified; - kx.data = bL({}, kx.data); - } - } catch (ky) { - kw.e(ky); - } finally { - kw.f(); - } - kp.splice.apply(kp, [kj - 1, 0].concat(ac()(kv))); - this._rowCountChanged(); - return 1; - } - }, { - key: "rowsDiscard", - value: function (kd, kf) { - var kg = arguments.length > 2 && undefined !== arguments[2] ? arguments[2] : bQ.Primary; - var kh = bT(this, kg); - if (!kh) { - return -1; - } - if (kf < kd) { - var kj = [kf, kd]; - kd = kj[0]; - kf = kj[1]; - } - if (kd > kh.length) { - return 1; - } - var kk = kf - kd + 1; - kh.splice(kd - 1, kk); - this._rowCountChanged(); - return 1; - } - }, { - key: "setSort", - value: function (kd) { - if ("" === kd.trim()) { - this._sortRules = []; - return 1; - } - for (var kf = /(\w+\b)\s*(\w+\b)?\s*,?/g, kg = [];;) { - var kh = kf.exec(kd); - if (null === kh) { - break; - } - var kj = kh[1]; - if ("#" === kj.charAt(0)) { - var kk = Number(kj.substr(1)); - if (!(kk > 0 && kk <= this._table.columns.length)) { - return -1; - } - kj = this._table.columns[kk - 1]; - } else { - if (!this._columns.has(kj)) { - return -1; - } - } - var km = { - key: kj, - asc: true - }; - if (undefined === kh[2]) { - km.asc = true; - } else { - var kp = kh[2].toLowerCase(); - "d" !== kp && "ds" !== kp && "desc" !== kp || (km.asc = false); - } - kg.push(km); - } - this._sortRules = kg; - return 1; - } - }, { - key: "sort", - value: function () { - var kd = this; - if (0 === this._sortRules.length) { - return 1; - } - this.coreData.primaryData = this.coreData.primaryData.sort(function (kf, kg) { - for (var kh = 0; kh < kd._sortRules.length; ++kh) { - var kj = kd._sortRules[kh]; - var kk = [kf.data[kj.key], kg.data[kj.key]]; - var km = kk[0]; - var kp = kk[1]; - var kq = kj.asc ? 1 : -1; - var ku = kj.asc ? -1 : 1; - if (kh === kd._sortRules.length - 1) { - return km === kp ? 0 : km > kp ? kq : ku; - } - if (km !== kp) { - return km > kp ? kq : ku; - } - } - }); - } - }, { - key: "setFilter", - value: function (kd) { - var kf = arguments.length > 1 && undefined !== arguments[1] && arguments[1]; - if (!this._dataObject) { - return -1; - } - if (!kd || "" === kd.trim()) { - this._filterFomula = null; - kf || (this.userFilter = undefined); - return 1; - } - var kg = this._table.columns; - kd = kd.replace(/#(\d+)/g, function (kh, kj) { - return kj > 0 && kj <= kg.length ? kg[kj - 1].name : kh; - }); - try { - this._filterFomula = new ay.a(kd); - kf || (this.userFilter = kd); - } catch (kh) { - return -1; - } - return 1; - } - }, { - key: "filter", - value: function () { - var kd = this; - if (this.coreData.filterData.length > 0 && (this.coreData.primaryData = [].concat(ac()(this.coreData.primaryData), ac()(this.coreData.filterData)), this.coreData.filterData = []), !this._filterFomula) { - this._rowCountChanged(); - return 1; - } - var kf = []; - try { - var kg = this.coreData.primaryData.filter(function (kh, kj, kk) { - var km = kd._filterFomula.evaluate(kh.data); - km || kf.push(kh); - return km; - }); - this.coreData.filterData = kf; - this.coreData.primaryData = kg; - this.groupCalc(); - this._rowCountChanged(); - return 1; - } catch (kh) { - console.error("filter error", kh); - return -1; - } - } - }, { - key: "filterAll", - value: function (kd) { - if (undefined === kd || "" === kd) { - this.setFilter(""); - return this.filter(); - } - if (!this._dataObject) { - return -1; - } - var kf = this._table.columns; - var kg = []; - kf.forEach(function (kj) { - var kk = kj.name; - var km = ""; - switch (kj.type) { - case "string": - case "datetime": - km = " ".concat(kk, " like '%").concat(kd, "%' "); - break; - case "long": - case "number": - km = " ".concat(kk, " = ").concat(kd, " "); - break; - default: - km = " ".concat(kk, " = ").concat(kd, " "); - } - kg.push(km); - }); - var kh = kg.join(" or "); - this.setFilter(kh); - this.filter(); - } - }, { - key: "find", - value: function (kd, kf, kg) { - if (kf > kg) { - var kh = [kg, kf]; - kf = kh[0]; - kg = kh[1]; - } - (undefined === kf || kf < 1) && (kf = 1); - (undefined === kg || kg > this.coreData.primaryData.length) && (kg = this.coreData.primaryData.length); - var kj = this._table.columns; - kd = kd.replace(/#(\d+)/g, function (kq, ku) { - return ku > 0 && ku <= kj.length ? kj[ku - 1].name : kq; - }); - try { - for (var kk = new ay.a(kd), km = kf - 1; km < kg; ++km) { - var kp = this.coreData.primaryData[km]; - if (kk.evaluate(kp.data)) { - return km + 1; - } - } - } catch (kq) { - console.log(kq); - return -1; - } - return 0; - } - }, { - key: "evaluate", - value: function (kd, kf) { - var kg = this._table.columns; - kd = kd.replace(/#(\d+)/g, function (kk, km) { - return km > 0 && km <= kg.length ? kg[km - 1].name : kk; - }); - var kh = new ay.a(kd); - var kj = {}; - kf > 0 && kf <= this.coreData.primaryData.length && (kj = this.coreData.primaryData[kf - 1].data); - return kh.evaluate(kj); - } - }, { - key: "deletedCount", - value: function () { - return this.coreData.deleteData.length; - } - }, { - key: "filteredCount", - value: function () { - return this.coreData.filterData.length; - } - }, { - key: "modifiedCount", - value: function () { - return this.coreData.primaryData.reduce(function (kd, kf, kg, kh) { - if (kf.status === bO.DataModified || kf.status === bO.NewModified) { - return kd + 1; - } - }, 0); - } - }, { - key: "getChanges", - value: function (kd) { - var kf = this.coreData.deleteData.filter(function (kh, kj) { - return kh.status !== bO.New && kh.status !== bO.NewModified; - }); - var kg = this.coreData.primaryData.filter(function (kh, kj) { - return kh.status !== bO.NotModified; - }); - Object.assign(kd, { - primaryData: kg, - deleteData: kf - }); - return kg.length + kf.length; - } - }, { - key: "setChanges", - value: function (kd) { - var kf = this.rowCount(); - this.coreData.primaryData = kd.primaryData; - this.coreData.deleteData = kd.deleteData; - this.coreData.filterData = []; - kf != this.rowCount() && this._rowCountChanged(); - } - }, { - key: "on", - value: function (kd, kf) { - this.eventMap.on(kd, kf); - return this; - } - }, { - key: "fire", - value: function (kd) { - for (var kf, kg = arguments.length, kh = new Array(kg > 1 ? kg - 1 : 0), kj = 1; kj < kg; kj++) { - kh[kj - 1] = arguments[kj]; - } - (kf = this.eventMap).fire.apply(kf, [kd].concat(kh)); - } - }, { - key: "off", - value: function (kd) { - var kf = arguments.length > 1 && undefined !== arguments[1] ? arguments[1] : null; - this.eventMap.removeListener(kd, kf); - return this; - } - }, { - key: "_rowCountChanged", - value: function () { - this.coreData.primaryData.length > 0 ? (this._currentRow > this.coreData.primaryData.length || this._currentRow < 1) && (this._currentRow = 1) : this._currentRow = 0; - this.eventMap.fire("rowCountChanged", this.rowCount()); - } - }, { - key: "describe", - value: function (kd) { - var kf; - var kg = []; - var kh = bM(kd.split(" ")); - try { - for (kh.s(); !(kf = kh.n()).done;) { - var kj = kf.value; - if ("" !== kj.trim()) { - var kk; - var km = kj.split("."); - var kp = this.object; - var kq = bM(km); - try { - for (kq.s(); !(kk = kq.n()).done;) { - if (undefined === (kp = kp[kk.value])) { - kp = "!"; - break; - } - } - } catch (ku) { - kq.e(ku); - } finally { - kq.f(); - } - kg.push(kp); - } - } - } catch (kv) { - kh.e(kv); - } finally { - kh.f(); - } - return kg.join("\n"); - } - }, { - key: "modify", - value: function (kd) { - var kf = kd.indexOf("="); - if (-1 !== kf) { - var kg = kd.substring(0, kf).trim(); - var kh = kd.substring(kf + 1).trim(); - var kj = kh.charAt(0); - "'" !== kj && "\"" !== kj || (kh = bd(kh, kj)); - for (var kk = kg.split("."), km = this.object, kp = 0; kp < kk.length; ++kp) { - var kq = kk[kp]; - if (kp === kk.length - 1) { - km[kq] = kh; - } else { - if (undefined === (km = km[kq])) { - return "".concat(kg, " property ").concat(kq, " is error"); - } - } - } - return ""; - } - } - }]); - var k8; - var k9; - }(); - var cd = function () { - return a8()(function k7() { - a6()(this, k7); - }, null, [{ - key: "parseSQLVars", - value: function (k8) { - for (var k9 = false, kb = -1, kc = -1, kd = [], kf = 0; kf < k8.length; kf++) { - var kg = k8.charAt(kf); - if ("'" !== kg) { - if (!k9) { - if (":" === kg) { - for (kb = kf; " " === k8.charAt(kf + 1);) { - ++kf; - } - } else { - if (kb >= 0 && kg.match(/[a-zA-Z0-9_.]/)) { - kc = kf; - kf === k8.length - 1 && kd.push({ - start: kb, - end: kc, - name: k8.substring(kb + 1).trim() - }); - } else { - if (kb >= 0 && "[" === kg) { - for (kf += 1; kf < k8.length && "]" !== k8[kf]; ++kf) {} - kc = kf; - kf === k8.length - 1 && kd.push({ - start: kb, - end: kc, - name: k8.substring(kb + 1).trim() - }); - } else { - kb >= 0 && (kc += 1, kd.push({ - start: kb, - end: kc, - name: k8.substring(kb + 1, kc).trim() - }), kb = -1, kc = -1); - } - } - } - } - } else { - if (kf !== k8.length - 1 && "'" === k8.charAt(kf + 1)) { - kf++; - continue; - } - k9 = !k9; - } - } - return kd; - } - }, { - key: "repaceSQLVar", - value: function (k8, k9, kb) { - for (var kc = 0, kd = [], kf = 0; kf < k9.length; kf++) { - var kg = k9[kf]; - var kh = kg.name; - var kj = kg.start; - var kk = kg.end; - var km = kb[kh.toLowerCase()]; - var kp = km.value; - var kq = km.type; - "string" !== kq && "datetime" !== kq || (kp = "'".concat(kp, "'")); - kd.push(k8.substring(kc, kj)); - kd.push(kp); - kc = kk; - } - kc < k8.length - 1 && kd.push(k8.substring(kc)); - return kd.join(""); - } - }]); - }(); - function cf(k7, k8) { - cc.UserFunctions[k7] = k8; - } - cc.UserFunctions = {}; - var cg = cc; - Date.prototype.format = function (k7) { - k7.indexOf("yy-mm") && (k7 = k7.replace("yy-mm", "yy-MM")); - var k8 = { - "M+": this.getMonth() + 1, - "d+": this.getDate(), - "h+": this.getHours(), - "m+": this.getMinutes(), - "s+": this.getSeconds(), - "q+": Math.floor((this.getMonth() + 3) / 3), - S: this.getMilliseconds() - }; - for (var k9 in /(y+)/.test(k7) && (k7 = k7.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length))), k8) new RegExp("(" + k9 + ")").test(k7) && (k7 = k7.replace(RegExp.$1, 1 == RegExp.$1.length ? k8[k9] : ("00" + k8[k9]).substr(("" + k8[k9]).length))); - return k7; + }), + _0x23d670 = await _0x1104f8.json(); + return _0x23d670[_0xfbdf49(360)] ? (console[_0xfbdf49(351)](_0xfbdf49(322)), _0x23d670) : (console[_0xfbdf49(412)]("[报错功能] 报错失败:", _0x23d670.message), _0x23d670); + } catch (_0x22f74d) { + console[_0xfbdf49(412)]("[报错功能] 请求出错:", _0x22f74d); + return { + "success": false, + "message": _0xfbdf49(271) }; - Date.prototype.toString = function () { - return this.format("yyyy-MM-dd hh:mm:ss"); - }; - Number.prototype.format = function (k7) { - return bJ()(this).format(k7); - }; - var ch = a2(6); - var cj = a2.n(ch); - var ck = a2(3); - var cm = a2.n(ck); - var cp = a2(5); - var cq = a2.n(cp); - var cu = a2(15); - var cv = a2.n(cu); - var cw = a2(30); - var cx = a2(4); - function cy(k7, k8, k9) { - k8 = cm()(k8); - return cj()(k7, function () { - try { - var kb = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kc) {} - return function () { - return !!kb; - }(); - }() ? Reflect.construct(k8, k9 || [], cm()(k7).constructor) : k8.apply(k7, k9)); + } +} +async function simulateClick(_0x502e1a, _0x269637) { + const _0x5734bc = _0x30b83a, + _0x5e5534 = document[_0x5734bc(382)](_0x502e1a - window[_0x5734bc(413)], _0x269637 - window[_0x5734bc(268)]); + if (!_0x5e5534) { + { + console.error(_0x5734bc(302) + _0x502e1a + ", " + _0x269637 + _0x5734bc(259)); + return; } - var cz = function (k7) { - function k8(k9) { - var kb; - a6()(this, k8); - (kb = cy(this, k8, ["div", "".concat(cx.a, "-icon")])).iconNameEl = Object(a9.c)("div", "".concat(cx.a, "-icon-img ").concat(k9)); - kb.child(kb.iconNameEl); - return kb; - } - cq()(k8, k7); - return a8()(k8, [{ - key: "setName", - value: function (k9) { - this.iconNameEl.className("".concat(cx.a, "-icon-img ").concat(k9)); - } - }]); - }(a9.a); - a2(71); - function cA(k7, k8, k9) { - k8 = cm()(k8); - return cj()(k7, function () { - try { - var kb = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kc) {} - return function () { - return !!kb; - }(); - }() ? Reflect.construct(k8, k9 || [], cm()(k7).constructor) : k8.apply(k7, k9)); + } + const _0x198692 = [{ + "type": _0x5734bc(260), + "options": { + "clientX": _0x502e1a, + "clientY": _0x269637 } - var cB = function (k7) { - function k8(k9) { - var kb; - a6()(this, k8); - (kb = cA(this, k8, ["div", "".concat(cx.a, "-icon")])).html("\n \n ")); - return kb; - } - cq()(k8, k7); - return a8()(k8, [{ - key: "setName", - value: function (k9) { - this.html("\n \n ")); - } - }]); - }(a9.a); - function cC(k7, k8, k9) { - k8 = cm()(k8); - return cj()(k7, function () { - try { - var kb = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kc) {} - return function () { - return !!kb; - }(); - }() ? Reflect.construct(k8, k9 || [], cm()(k7).constructor) : k8.apply(k7, k9)); + }, { + "type": "mouseover", + "options": { + "clientX": _0x502e1a, + "clientY": _0x269637 } - var cD = function (k7) { - function k8() { - a6()(this, k8); - return cC(this, k8, arguments); - } - cq()(k8, k7); - return a8()(k8, [{ - key: "element", - value: function () { - var k9 = this; - var kb = this.tag; - var kc = this.svg; - this.icon = kc ? new cB(kb) : new cz(kb); - return cv()(cm()(k8.prototype), "element", this).call(this).child(this.icon).on("click", function () { - return k9.click(); - }); - } - }, { - key: "click", - value: function () { - this.change(this.tag, this.toggle()); - } - }, { - key: "setState", - value: function (k9) { - this.el.active(k9); - } - }, { - key: "toggle", - value: function () { - return this.el.toggle(); - } - }, { - key: "active", - value: function () { - return this.el.hasClass("active"); - } - }]); - }(cw.a); - function cE(k7, k8, k9) { - k8 = cm()(k8); - return cj()(k7, function () { - try { - var kb = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kc) {} - return function () { - return !!kb; - }(); - }() ? Reflect.construct(k8, k9 || [], cm()(k7).constructor) : k8.apply(k7, k9)); + }, { + "type": _0x5734bc(287), + "options": { + "clientX": _0x502e1a, + "clientY": _0x269637, + "button": 0 } - var cF = function (k7) { - function k8() { - a6()(this, k8); - return cE(this, k8, ["merge"]); - } - cq()(k8, k7); - return a8()(k8, [{ - key: "setState", - value: function (k9, kb) { - this.el.active(k9).disabled(kb); - } - }]); - }(cD); - var cG = a2(19); - function cH(k7, k8) { - var k9 = "undefined" != typeof Symbol && k7[Symbol.iterator] || k7["@@iterator"]; - if (!k9) { - if (Array.isArray(k7) || (k9 = function (kh, kj) { - if (kh) { - if ("string" == typeof kh) { - return cI(kh, kj); - } - var kk = {}.toString.call(kh).slice(8, -1); - "Object" === kk && kh.constructor && (kk = kh.constructor.name); - return "Map" === kk || "Set" === kk ? Array.from(kh) : "Arguments" === kk || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(kk) ? cI(kh, kj) : undefined; - } - }(k7)) || k8 && k7 && "number" == typeof k7.length) { - k9 && (k7 = k9); - var kb = 0; - var kc = function () {}; - return { - s: kc, - n: function () { - return kb >= k7.length ? { - done: true - } : { - done: false, - value: k7[kb++] - }; - }, - e: function (kh) { - throw kh; - }, - f: kc - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - var kd; - var kf = true; - var kg = false; - return { - s: function () { - k9 = k9.call(k7); - }, - n: function () { - var kh = k9.next(); - kf = kh.done; - return kh; - }, - e: function (kh) { - kg = true; - kd = kh; - }, - f: function () { - try { - kf || null == k9.return || k9.return(); - } finally { - if (kg) { - throw kd; - } - } - } - }; + }, { + "type": _0x5734bc(384), + "options": { + "clientX": _0x502e1a, + "clientY": _0x269637, + "button": 0 } - function cI(k7, k8) { - (null == k8 || k8 > k7.length) && (k8 = k7.length); - for (var k9 = 0, kb = Array(k8); k9 < k8; k9++) { - kb[k9] = k7[k9]; - } - return kb; + }, { + "type": "click", + "options": { + "clientX": _0x502e1a, + "clientY": _0x269637, + "button": 0 } - function cJ(k7, k8, k9) { - try { - var kb = k7.formula.evaluate(k8, k9); - undefined === kb ? delete k7.text : k7.text = "".concat(kb); - } catch (kc) { - k7.text = null; - } - return k7.text; - } - var cK = function () { - return a8()(function k7(k8) { - a6()(this, k7); - this.cells = []; - this.merges = new av([]); - this.startRow = 0; - this.report = k8; - }, [{ - key: "calc", - value: function () { - this.cells = []; - var k8; - var k9 = cH(this.report._data.bands); - try { - for (k9.s(); !(k8 = k9.n()).done;) { - var kb = k8.value; - var kc = kb.len; - var kd = kb.start; - if (this.startRow = kd, kc > 0) { - var kf = kb.rows.get(0); - if (!kf) { - continue; - } - for (var kg in kf.cells) { - var kh = kf.cells[kg]; - if (kh && kh.rowMerge && kh.column) { - var kj = parseInt(kg, 10); - var kk = kb.merges.getFirstIncludes(0, kj); - kc > 1 ? 0 === kk.sri && kk.eri === kc - 1 && this.cells.push({ - col: kj, - cell: kh, - len: kc - }) : this.cells.push({ - col: kj, - cell: kh, - len: kc - }); - } - } - } - } - } catch (km) { - k9.e(km); - } finally { - k9.f(); - } - } - }, { - key: "calcData", - value: function () { - var k8 = this.report._data.group; - k8 && 0 !== k8.length ? this.calcTreeData() : this.calcRowData(); - } - }, { - key: "calcRowData", - value: function () { - var k8 = this; - var k9 = this.report; - var kb = k9.dataStore; - var kc = k9.evalData; - var kd = kb ? kb.rowCount() : 0; - var kf = this.cells; - kf.length < 0 || (this.merges = new av([]), kf.forEach(function (kg) { - for (var kh = kg.col, kj = kg.cell, kk = kg.len, km = null, kp = 0, kq = 0; kq < kd; ++kq) { - var ku = cJ(kj, kc, kq); - if (0 !== kq) { - if (km !== ku) { - if (kq - kp > 1) { - var kv = k8.startRow + kk * kq - 1; - var kw = 0 === kp ? k8.startRow : k8.startRow + kp * kk; - var kx = new ag(kw, kh, kv, kh); - k8.merges.add(kx); - } - kp = kq; - km = ku; - } else { - if (kq === kd - 1 && kq - kp > 0) { - var ky = k8.startRow + (kq + 1) * kk - 1; - var kz = 0 === kp ? k8.startRow : k8.startRow + kp * kk; - var kA = new ag(kz, kh, ky, kh); - k8.merges.add(kA); - } - } - } else { - kp = 0; - km = ku; - } - } - })); - } - }, { - key: "calcTreeData", - value: function () { - var k8 = this; - var k9 = this.report; - var kb = k9.treeData; - var kc = k9.evalData; - this.report._data.detail; - var kd = this.cells; - if (!(kd.length < 0)) { - var kf = kb.length; - this.merges = new av([]); - kd.forEach(function (kg) { - var kh = kg.col; - var kj = kg.cell; - kg.len; - var kk = null; - var km = 0; - var kp = 0; - var kq = 0; - var ku = kj.rowMergeBands; - ku || (ku = ["detail"]); - for (var kv = 0; kv < kf; ++kv) { - var kw = kb[kv]; - var kx = kw.band; - var ky = kw.dataRow; - if (ku.indexOf(kx.name) < 0) { - if (kq > 1) { - var kz = new ag(km, kh, kp, kh); - k8.merges.add(kz); - } - kq = 0; - km = kv; - } else { - var kA = cJ(kj, kc, ky); - if (0 === kq) { - kk = kA; - km = kv; - kq = 1; - } else { - if (kk === kA) { - kq += 1; - kp = kv; - } else { - if (kk !== kA) { - if (kq > 1) { - var kB = new ag(km, kh, kp, kh); - k8.merges.add(kB); - } - kk = kA; - kq = 1; - km = kv; - } - } - } - } - } - if (kq > 1) { - var kC = new ag(km, kh, kp = kf - 1, kh); - k8.merges.add(kC); - } - }); - } - } - }, { - key: "getFirstIncludes", - value: function (k8, k9) { - return this.merges.getFirstIncludes(k8, k9); - } - }, { - key: "cellsTextChanged", - value: function (k8) { - var k9 = k8.cell; - k8.text; - k8.ri; - k8.ci; - k9 && k9.rowMerge && this.calcData(); - } - }]); - }(); - function cL(k7, k8) { - var k9 = "undefined" != typeof Symbol && k7[Symbol.iterator] || k7["@@iterator"]; - if (!k9) { - if (Array.isArray(k7) || (k9 = function (kh, kj) { - if (kh) { - if ("string" == typeof kh) { - return cM(kh, kj); - } - var kk = {}.toString.call(kh).slice(8, -1); - "Object" === kk && kh.constructor && (kk = kh.constructor.name); - return "Map" === kk || "Set" === kk ? Array.from(kh) : "Arguments" === kk || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(kk) ? cM(kh, kj) : undefined; - } - }(k7)) || k8 && k7 && "number" == typeof k7.length) { - k9 && (k7 = k9); - var kb = 0; - var kc = function () {}; - return { - s: kc, - n: function () { - return kb >= k7.length ? { - done: true - } : { - done: false, - value: k7[kb++] - }; - }, - e: function (kh) { - throw kh; - }, - f: kc - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - var kd; - var kf = true; - var kg = false; - return { - s: function () { - k9 = k9.call(k7); - }, - n: function () { - var kh = k9.next(); - kf = kh.done; - return kh; - }, - e: function (kh) { - kg = true; - kd = kh; - }, - f: function () { - try { - kf || null == k9.return || k9.return(); - } finally { - if (kg) { - throw kd; - } - } - } - }; - } - function cM(k7, k8) { - (null == k8 || k8 > k7.length) && (k8 = k7.length); - for (var k9 = 0, kb = Array(k8); k9 < k8; k9++) { - kb[k9] = k7[k9]; - } - return kb; - } - var cN = function () { - return a8()(function k7(k8) { - a6()(this, k7); - this.report = k8; - }, [{ - key: "isValid", - value: function () { - var k8 = this.report._data.group; - return k8 && k8.length > 0; - } - }, { - key: "getViewData", - value: function (k8) { - var k9 = this.report._data; - if (!this.isValid()) { - return null; - } - function kb(l3, l4) { - for (var l5 = 0; l5 < kh.length; ++l5) { - var l6; - var l7 = kh[l5]; - var l8 = l7.by; - var l9 = l7.level; - var lb = cL(l8); - try { - for (lb.s(); !(l6 = lb.n()).done;) { - var lc = l6.value; - if (l3[lc] !== l4[lc]) { - return l9; - } - } - } catch (ld) { - lb.e(ld); - } finally { - lb.f(); - } - } - return 0; - } - var kc = []; - var kd = k9; - var kf = { - parent: null, - children: [], - firstRow: 0 - }; - if (this.report.treeNodes = kf, !kd || !kd.bands || !this.report.calc) { - return kc; - } - var kg; - var kh = kd.group; - var kj = kd.header; - var kk = kd.detail; - var km = kd.summary; - var kp = kd.footer; - var kq = kd.topBand; - var ku = kd.bottomBand; - var kv = []; - var kw = []; - var kx = cL(kd.bands); - try { - for (kx.s(); !(kg = kx.n()).done;) { - var ky = kg.value; - var kz = ky.name; - var kA = ky.level; - kz.startsWith("header.") && kA > 0 ? kv[kA] = ky : kz.startsWith("trailer.") && kA > 0 && (kw[kA] = ky); - } - } catch (l3) { - kx.e(l3); - } finally { - kx.f(); - } - if (kq) { - for (var kB = 0; kB < kq.len; ++kB) { - kc.push({ - band: kq, - index: kB - }); - } - } - for (var kC = 0; kC < kj.len; ++kC) { - kc.push({ - band: kj, - index: kC - }); - } - k8 || (k8 = this.report.dataStore ? this.report.dataStore.coreData.primaryData : null); - var kD = null; - if (k8 && k8.length > 0) { - for (var kE = new Array(kh.length + 1).fill(kf), kF = 1, kG = 0; kG < k8.length; ++kG) { - var kH = kG > 0 ? k8[kG - 1].data ? k8[kG - 1].data : k8[kG - 1] : null; - var kI = k8[kG].data ? k8[kG].data : k8[kG]; - if ((kF = 0 === kG ? 1 : kb(kH, kI)) > 0) { - if (kG > 0) { - for (var kJ = kw.length - 1; kJ >= kF; --kJ) { - var kK = kw[kJ]; - if (kK && kK.len) { - for (var kL = 0; kL < kK.len; ++kL) { - var kM = { - band: kK, - index: kL, - dataRow: kE[kJ].firstRow, - node: kE[kJ], - level: kJ - }; - kD && kJ >= kD.level ? kD.collapseData.push(kM) : kc.push(kM); - } - } - } - } - var kN = k8[kG].groupexpanded; - kD = null; - for (var kO = kF; kO < kv.length; ++kO) { - var kP = kv[kO]; - var kQ = { - band: kP, - level: kO, - parent: kE[kO - 1], - children: [], - firstRow: kG - }; - if (kQ.parent.children.push(kQ), null === kD && kN && false === kN[kO] && (kQ.expanded = false, (kD = kQ).collapseData = []), kE[kO] = kQ, kP && kP.len) { - for (var kR = 0; kR < kP.len; ++kR) { - var kS = { - band: kP, - index: kR, - dataRow: kG, - node: kQ, - level: kO - }; - null === kD || kQ === kD ? kc.push(kS) : kD.collapseData.push(kS); - } - } - } - } - for (var kT = 0; kT < kk.len; ++kT) { - var kU = kE[kh.length]; - var kV = { - level: kU.level + 1, - index: kT, - dataRow: kG, - row: kG, - band: kk, - parent: kU, - isLeaf: true - }; - kU.children.push(kV); - kD ? kD.collapseData.push(kV) : kc.push(kV); - } - } - for (var kW = kw.length - 1; kW > 0; --kW) { - var kX = kw[kW]; - if (kX && kX.len) { - for (var kY = 0; kY < kX.len; ++kY) { - var kZ = { - band: kX, - index: kY, - dataRow: kE[kW].firstRow, - node: kE[kW], - level: kW - }; - kD && kW >= kD.level ? kD.collapseData.push(kZ) : kc.push(kZ); - } - } - } - } - if (km) { - for (var l0 = 0; l0 < km.len; ++l0) { - kc.push({ - band: km, - index: l0 - }); - } - } - if (kp) { - for (var l1 = 0; l1 < kp.len; ++l1) { - kc.push({ - band: kp, - index: l1 - }); - } - } - if (ku) { - for (var l2 = 0; l2 < ku.len; ++l2) { - kc.push({ - band: ku, - index: l2 - }); - } - } - return kc; - } - }]); - }(); - var cO = function () { - return a8()(function k7(k8) { - a6()(this, k7); - this.report = k8; - }, [{ - key: "isValid", - value: function () { - return !!this.report._data.tree; - } - }, { - key: "getViewData", - value: function () { - var k8 = this.report._data; - if (!this.isValid()) { - return null; - } - var k9 = []; - var kb = k8; - if (!kb || !kb.bands || !this.report.calc) { - return k9; - } - var kc = kb.header; - var kd = kb.detail; - var kf = kb.summary; - var kg = kb.footer; - var kh = kb.topBand; - var kj = kb.bottomBand; - if (kh) { - for (var kk = 0; kk < kh.len; ++kk) { - k9.push({ - band: kh, - index: kk - }); - } - } - for (var km = 0; km < kc.len; ++km) { - k9.push({ - band: kc, - index: km - }); - } - var kp = function (kw, kx, ky) { - var kz = kx.parentId; - var kA = kx.id; - var kB = {}; - var kC = []; - if (!kw) { - return kC; - } - for (var kD = 0; kD < kw.length; kD++) { - var kE = { - band: ky, - level: 0, - parent: null, - children: [], - firstRow: kD - }; - kB[kw[kD].data[kA]] = kE; - } - for (var kF = 0; kF < kw.length; kF++) { - var kG = kw[kF].data; - var kH = kG[kA]; - var kI = kB[kG[kz]]; - var kJ = kB[kH]; - kI ? (kJ.parent = kI, kI.children.push(kJ)) : kC.push(kJ); - } - return kC; - }(this.report.dataStore ? this.report.dataStore.coreData.primaryData : null, kb.tree, kd); - if (this.report.treeNodes = kp, function kw(kx, ky, kz, kA) { - ky.forEach(function (kB) { - kB.level = kz; - for (var kC = kB.firstRow, kD = 0; kD < kA.len; kD++) { - var kE = { - level: kz, - index: kD, - dataRow: kC, - band: kA, - node: kB - }; - kx.push(kE); - } - kB.children.length > 0 ? (kw(kx, kB.children, kz + 1, kA), delete kB.isLeaf) : kB.isLeaf = true; - }); - }(k9, kp, 1, kd), kf) { - for (var kq = 0; kq < kf.len; ++kq) { - k9.push({ - band: kf, - index: kq - }); - } - } - if (kg) { - for (var ku = 0; ku < kg.len; ++ku) { - k9.push({ - band: kg, - index: ku - }); - } - } - if (kj) { - for (var kv = 0; kv < kj.len; ++kv) { - k9.push({ - band: kj, - index: kv - }); - } - } - return k9; - } - }]); - }(); - function cP(k7, k8) { - var k9 = "undefined" != typeof Symbol && k7[Symbol.iterator] || k7["@@iterator"]; - if (!k9) { - if (Array.isArray(k7) || (k9 = function (kh, kj) { - if (kh) { - if ("string" == typeof kh) { - return cQ(kh, kj); - } - var kk = {}.toString.call(kh).slice(8, -1); - "Object" === kk && kh.constructor && (kk = kh.constructor.name); - return "Map" === kk || "Set" === kk ? Array.from(kh) : "Arguments" === kk || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(kk) ? cQ(kh, kj) : undefined; - } - }(k7)) || k8 && k7 && "number" == typeof k7.length) { - k9 && (k7 = k9); - var kb = 0; - var kc = function () {}; - return { - s: kc, - n: function () { - return kb >= k7.length ? { - done: true - } : { - done: false, - value: k7[kb++] - }; - }, - e: function (kh) { - throw kh; - }, - f: kc - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - var kd; - var kf = true; - var kg = false; - return { - s: function () { - k9 = k9.call(k7); - }, - n: function () { - var kh = k9.next(); - kf = kh.done; - return kh; - }, - e: function (kh) { - kg = true; - kd = kh; - }, - f: function () { - try { - kf || null == k9.return || k9.return(); - } finally { - if (kg) { - throw kd; - } - } - } - }; - } - function cQ(k7, k8) { - (null == k8 || k8 > k7.length) && (k8 = k7.length); - for (var k9 = 0, kb = Array(k8); k9 < k8; k9++) { - kb[k9] = k7[k9]; - } - return kb; - } - function cR(k7, k8) { - var k9 = arguments.length > 2 && undefined !== arguments[2] ? arguments[2] : 0; - var kb = k8[k9]; - return kb[k7]; - } - cf("crossvalue", function (k7, k8) { - return k7 instanceof Object ? k7[k8] : k7; - }); - cf("crosstabsum", function (k7, k8, k9) { - var kb = k8[k8.defaultDS]._.sheet.data.report.crossTab.viewData; - if (!kb) { - return null; - } - var kc = kb[k9][k7]; - var kd = 0; - Object.entries(kc).forEach(function (kf) { - var kg = a4()(kf, 2); - kg[0]; - var kh = kg[1]; - kd += kh; + }]; + for (const _0x3be7c8 of _0x198692) { + { + const _0x230cf4 = new MouseEvent(_0x3be7c8[_0x5734bc(428)], { + "bubbles": true, + "cancelable": true, + "view": window, + ..._0x3be7c8[_0x5734bc(266)] }); - return kd; - }); - cf("crosstabcount", function (k7, k8, k9) { - return k8[k8.defaultDS]._.sheet.data.report.crossTab.columns.length; - }); - cf("crosstabavg", function (k7, k8, k9) { - var kb = k8[k8.defaultDS]; - return kb.evaluate("crosstabsum('".concat(k7, "')"), k9) / kb.evaluate("crosstabcount('".concat(k7, "')"), k9); - }); - cf("crosstabmax", function (k7, k8, k9) { - var kb = k8[k8.defaultDS]._.sheet.data.report.crossTab.viewData; - if (!kb) { - return null; - } - var kc = kb[k9][k7]; - var kd = 0; - Object.entries(kc).forEach(function (kf) { - var kg = a4()(kf, 2); - kg[0]; - var kh = kg[1]; - kh > kd && (kd = kh); - }); - return kd; - }); - cf("crosstabmin", function (k7, k8, k9) { - var kb = k8[k8.defaultDS]._.sheet.data.report.crossTab.viewData; - if (!kb) { - return null; - } - var kc = kb[k9][k7]; - var kd = 0; - Object.entries(kc).forEach(function (kf) { - var kg = a4()(kf, 2); - kg[0]; - var kh = kg[1]; - kh < kd && (kd = kh); - }); - return kd; - }); - var cS = function () { - return a8()(function k7(k8) { - a6()(this, k7); - this.report = k8; - this.groupTree = new cN(k8); - }, [{ - key: "isValid", - value: function () { - var k8 = this.report.processing; - return k8 && 4 === k8; - } - }, { - key: "extendRows", - value: function (k8) { - var k9 = this.report._data.crosstab; - k9.rows; - k9.values; - k9.columns; - k9.start; - k9.len; - Object.entries(k8).forEach(function (kb) { - var kc = a4()(kb, 2); - kc[0]; - kc[1]; - }); - k8.forEach(function (kb) { - kb.cells; - }); - } - }, { - key: "getCell", - value: function (k8, k9, kb, kc) { - var kd; - var kf = cP(k9); - try { - for (kf.s(); !(kd = kf.n()).done;) { - var kg = kd.value; - if (k8.text === "@".concat(kg)) { - var kh = c3(k8); - kh.text = this.columns[kc]; - return kh; - } - if (!k8.text) { - return k8; - } - if (!k8.text.startsWith("#{")) { - return k8; - } - var kj = new RegExp("(\\s*)@\\b".concat(kg, "\\b(\\s*)"), "g"); - if (kj.test(k8.text)) { - var kk = this.columns[kc]; - var km = c3(k8); - km.text = k8.text.replace(kj, "$1'".concat(kk, "')$2")); - return km; - } - } - } catch (kz) { - kf.e(kz); - } finally { - kf.f(); - } - var kp; - var kq = cP(kb); - try { - for (kq.s(); !(kp = kq.n()).done;) { - var ku = kp.value; - var kv = "object" === aK()(ku) ? ku.col : ku; - var kw = new RegExp("(\\s*)\\b".concat(kv, "\\b(\\s*)"), "g"); - if (kw.test(k8.text)) { - var kx = this.columns[kc]; - var ky = c3(k8); - ky.text = k8.text.replace(kw, "$1crossvalue(".concat(kv, ",'").concat(kx, "')$2")); - return ky; - } - } - } catch (kA) { - kq.e(kA); - } finally { - kq.f(); - } - return k8; - } - }, { - key: "getViewDataPre", - value: function () { - var k8 = this.report._data; - var k9 = k8.crosstab; - var kb = k8.group; - var kc = k9.rows; - var kd = k9.values; - var kf = k9.columns; - var kg = k9.start; - var kh = k9.len; - this.start = kg; - this.len = kh; - var kj = this.report.dataStore; - if (!kj) { - return []; - } - var kk = []; - if (kb) { - var km; - var kp = cP(kb); - try { - for (kp.s(); !(km = kp.n()).done;) { - var kq; - var ku = cP(km.value.by); - try { - for (ku.s(); !(kq = ku.n()).done;) { - var kv = kq.value; - kk.push(kv); - } - } catch (kQ) { - ku.e(kQ); - } finally { - ku.f(); - } - } - } catch (kR) { - kp.e(kR); - } finally { - kp.f(); - } - } else { - kk.push.apply(kk, ac()(kc)); - } - if (kk.push.apply(kk, ac()(kf)), kk.length > 0) { - var kw = kk.join(","); - kj.setSort(kw); - kj.sort(false); - } - var kx = kj.coreData ? kj.coreData.primaryData : null; - if (!kx) { - return []; - } - for (var ky, kz = new Set(), kA = [], kB = {}, kC = (new Array(kd.length), []), kD = function (kS) { - var kT; - var kU = []; - var kV = cP(kS); - try { - for (kV.s(); !(kT = kV.n()).done;) { - var kW = kT.value; - if ("string" == typeof kW) { - var kX = new Formula("sum(".concat(kW, " for crosstab)"), cR); - kU.push(kX); - } else { - var kY = new Formula(kW.value, cR); - kU.push(kY); - } - } - } catch (kZ) { - kV.e(kZ); - } finally { - kV.f(); - } - return kU; - }(kd), kE = 0; kE < kx.length; kE++) { - var kF = kx[kE].data; - var kG = kF[kf[0]]; - kG && kz.add(kG); - for (var kH = false, kI = false, kJ = {}, kK = 0; kK < kc.length; kK++) { - var kL = kc[kK]; - var kM = kF[kL]; - kJ[kL] = kM; - kB[kL] !== kM && (kH = true); - } - if (0 === kE && (kB = kJ, kH = false), ky !== kG && (kI = true), kE === kx.length - 1 && (kH = true, kC.push(kF)), (kH || kI) && 0 !== kE) { - null; - for (var kN = 0; kN < kD.length; kN++) { - var kO = kD[kN].evaluate(kC); - var kP = "object" === aK()(kd[kN]) ? kd[kN].col : kd[kN]; - kB[kP] || (kB[kP] = {}); - kB[kP][ky] = kO; - } - kC = []; - } - kH && (kA.push(kB), kB = kJ); - ky = kG; - kC.push(kF); - } - this.columns = ac()(kz); - this.columns.sort(function (kS, kT) { - return kS === kT ? 0 : kS > kT ? 1 : -1; - }); - this.viewData = kA; - return kA; - } - }, { - key: "getViewData", - value: function () { - var k8 = this.viewData; - k8 || (k8 = this.getViewDataPre()); - return this.groupTree.getViewData(k8); - } - }, { - key: "changeColumns", - value: function () { - var k8 = this; - this.getViewDataPre(); - var k9 = this.report._dproxy; - var kb = k9.rows; - var kc = k9.cols; - var kd = k9.merges; - var kf = this.report._data.crosstab; - if (this.columns) { - if (kb.setData(c3(this.report._cloneRows)), kc.setData(c3(this.report._cloneCols)), kd.setData(this.report._merges), 0 === this.columns.length) { - var kg = this.start; - var kh = this.start + this.len - 1; - var kj = this.len; - kd.deleteColumn(kg, kh); - kb.deleteColumn(kg, kh); - kc.deleteColumn(kg, kh); - kd.shift("column", kh, -kj, function () {}); - } else { - var kk = this.columns.length; - var km = this.start; - var kp = this.len; - kc.repeatColumn(km, this.len, kk - 1); - kf.columns[0]; - var kq = kf.values[0]; - "object" === aK()(kq) && kq.col; - kb.each(function (ku, kv) { - var kw = {}; - kb.eachCells(ku, function (kx, ky) { - var kz = parseInt(kx, 10); - if (kz >= km && kz < km + kp) { - for (var kA = 0; kA < kk; kA++) { - var kB = k8.getCell(ky, kf.columns, kf.values, kA); - kw[kz + kA * kp] = kB; - } - } else { - if (kz >= km + kp) { - if (kz += (kk - 1) * kp, ky.text && "=" === ky.text[0]) { - var kC = c3(ky); - kC.text = ky.text.replace(/[a-zA-Z]{1,3}\d+/g, function (kD) { - return expr2expr(kD, (kk - 1) * kp, 0, function (kE) { - return kE >= km; - }); - }); - kw[kz] = kC; - } else { - kw[kz] = ky; - } - } else { - kw[kz] = ky; - } - } - }); - kv.cells = kw; - }); - kd.repeatColumn(km, kp, kk - 1); - } - } - } - }, { - key: "getColIndex", - value: function (k8) { - if (this.start >= k8) { - return k8; - } - if (!this.columns || 0 === this.columns.length) { - return k8 + this.len; - } - var k9 = this.columns.length * this.len; - return k8 <= this.start + k9 ? this.start + (k8 - this.start) % this.len : k8 - k9 + this.len; - } - }, { - key: "getColSize", - value: function () { - var k8 = this.report._dproxy.cols; - return this.columns ? this.columns.length * this.len + k8.len - this.len : k8.len; - } - }]); - }(); - function cT(k7, k8) { - var k9 = "undefined" != typeof Symbol && k7[Symbol.iterator] || k7["@@iterator"]; - if (!k9) { - if (Array.isArray(k7) || (k9 = function (kh, kj) { - if (kh) { - if ("string" == typeof kh) { - return cU(kh, kj); - } - var kk = {}.toString.call(kh).slice(8, -1); - "Object" === kk && kh.constructor && (kk = kh.constructor.name); - return "Map" === kk || "Set" === kk ? Array.from(kh) : "Arguments" === kk || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(kk) ? cU(kh, kj) : undefined; - } - }(k7)) || k8 && k7 && "number" == typeof k7.length) { - k9 && (k7 = k9); - var kb = 0; - var kc = function () {}; - return { - s: kc, - n: function () { - return kb >= k7.length ? { - done: true - } : { - done: false, - value: k7[kb++] - }; - }, - e: function (kh) { - throw kh; - }, - f: kc - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - var kd; - var kf = true; - var kg = false; - return { - s: function () { - k9 = k9.call(k7); - }, - n: function () { - var kh = k9.next(); - kf = kh.done; - return kh; - }, - e: function (kh) { - kg = true; - kd = kh; - }, - f: function () { - try { - kf || null == k9.return || k9.return(); - } finally { - if (kg) { - throw kd; - } - } - } - }; + _0x5e5534.dispatchEvent(_0x230cf4); + await sleep(50 + Math[_0x5734bc(364)]() * 50); } - function cU(k7, k8) { - (null == k8 || k8 > k7.length) && (k8 = k7.length); - for (var k9 = 0, kb = Array(k8); k9 < k8; k9++) { - kb[k9] = k7[k9]; - } - return kb; - } - var cV = {}; - function cW(k7) { - var k8 = this._dataSets; - var k9 = this.defaultDS; - var kb = k7.split("."); - kb.length > 1 && (k9 = kb[0], k7 = kb[1]); - var kc = k8[k9]; - if (!kc) { - return null; - } - var kd; - var kf = cT(kc._table.columns); - try { - for (kf.s(); !(kd = kf.n()).done;) { - var kg = kd.value; - if (kg.name === k7) { - return { - key: k9, - name: k7, - type: kg.type, - values: kg.values - }; - } - } - } catch (kh) { - kf.e(kh); - } finally { - kf.f(); - } - return null; - } - function cX(k7, k8) { - var k9 = arguments.length > 2 && undefined !== arguments[2] ? arguments[2] : 0; - var kb = k7.split("."); - var kc = this.defaultDS; - 1 === kb.length && (kb = [kc, k7]); - var kd = kb; - var kf = a4()(kd, 2); - var kg = kf[0]; - var kh = kf[1]; - var kj = k8[kg]; - if (!kj) { - throw new Error("Cannot evaluate ".concat(k7, ": No value given")); - } - var kk = kj.coreData.primaryData; - var km = k9; - var kp = false; - if (kg !== kc ? km = 0 : this.crossTab.isValid() && (kp = true, kk = this.crossTab.viewData), kk && !(kk.length <= km)) { - var kq = kp ? kk[km][kh] : kk[km].data[kh]; - if (kq && "string" == typeof kq) { - var ku = kj._columns.get(kh); - ku && "datetime" === ku.type && (kq = new Date(kq)); - } - if (undefined === kq) { - if (kj._columns.has(k7)) { - kq = null; - } else { - var kv = this._namedCells[k7]; - kv && (kq = kv.formula ? kv.formula.evaluate(this.evalData, k9) : kv.text); - } - } - return kq; - } - } - function cY(k7) { - var k8 = k7.match(/#{(.+)}\s*$/); - if (null === k8) { - return null; - } - if (!this.dataStore) { - return null; - } - var k9 = k8[1].trim(); - var kb = this.dataStore._table.columns; - return k9 = k9.replace(/#(\d+)/g, function (kc, kd) { - return kd > 0 && kd <= kb.length ? kb[kd - 1].name : kc; - }); - } - function cZ(k7) { - if (k7 && k7.text && "string" == typeof k7.text) { - var k8 = cY.call(this, k7.text); - if (null !== k8) { - var k9 = this; - if (k7.formula = new ay.a(k8, function (kc, kd) { - var kf = arguments.length > 2 && undefined !== arguments[2] ? arguments[2] : 0; - return cX.call(k9, kc, kd, kf); - }), k7.formula.oneExpr) { - var kb = cW.call(this, k8); - kb && (k7.column = kb); - } - } - } - } - function d0(k7) { - var k8 = k7.styleFormula; - k7.visible; - var k9 = this; - if (k8) { - var kb = k8; - kb && kb.trim().length > 0 && (k7.styleExpr = new ay.a(kb, function (kc, kd) { - var kf = arguments.length > 2 && undefined !== arguments[2] ? arguments[2] : 0; - return cX.call(k9, kc, kd, kf); - })); - } - } - function d1(k7, k8) { - if (k7 && "string" == typeof k7[k8]) { - var k9 = cY.call(this, k7[k8]); - if (null !== k9) { - k7.commonExpr || (k7.commonExpr = {}); - var kb = this; - k7.commonExpr[k8] = new ay.a(k9, function (kc, kd) { - var kf = arguments.length > 2 && undefined !== arguments[2] ? arguments[2] : 0; - return cX.call(kb, kc, kd, kf); - }); - } - } - } - function d2(k7) { - k7 && k7.name && (this._namedCells[k7.name] = k7); - cZ.call(this, k7); - d0.call(this, k7); - var k8; - var k9 = cT(aw.a.arrStyle); - try { - for (k9.s(); !(k8 = k9.n()).done;) { - var kb = k8.value; - d1.call(this, k7, kb); - } - } catch (kc) { - k9.e(kc); - } finally { - k9.f(); - } - d1.call(this, k7, "editable"); - } - function d3(k7, k8, k9) { - for (var kb = arguments.length > 3 && undefined !== arguments[3] && arguments[3], kc = k7.height, kd = new ax({ - len: k9, - height: kc - }), kf = 0; kf < k9; kf += 1) { - var kg = k8 + kf; - var kh = k7.get(kg); - if (kh && (kh = aw.a.merge({}, kh), kd.set(kf, kh), undefined !== kh.cells)) { - for (var kj in kh.cells) { - var kk = kh.cells[kj]; - d2.call(this, kk); - kb && kk.column && 0 !== kk.tabsequence && 32766 !== kk.tabsequence && 1 !== kk.protect && this._orderColumns.push({ - cell: kk, - col: parseInt(kj), - row: kf - }); - } - } - } - this._orderColumns.length > 0 && this._orderColumns.sort(function (km, kp) { - return km.cell.tabsequence - kp.cell.tabsequence; - }); - return kd; - } - function d4() { - var k7 = this.crossTab; - var k8 = this.groupTree; - var k9 = this.rowTree; - return k7 && k7.isValid() ? k7.getViewData() : k8 && k8.isValid() ? k8.getViewData() : k9 && k9.isValid() ? k9.getViewData() : []; - } - function d5(k7) { - for (var k8 = this.treeData, k9 = (this.treeNodes, k7.level), kb = k7.expanded, kc = 0, kd = -1, kf = -1, kg = 0; kg < k8.length; ++kg) { - var kh = k8[kg].node; - if (0 !== kc) { - if (1 === kc && kh !== k7) { - kd = kg; - break; - } - } else { - kh === k7 && (kc = 1, kd = kg + 1); - } - } - if (false === kb) { - for (var kj = kd; kj < k8.length; ++kj) { - var kk = k8[kj]; - var km = kk.level; - var kp = kk.dataRow; - if (undefined === km || km < k9 || km === k9 && kp !== k7.firstRow) { - kf = kj; - break; - } - } - if (-1 === kf && (kf = k8.length), kf >= kd) { - var kq = kf - kd; - var ku = k8.splice(kd, kq); - k7.collapseData = ku; - } - } else { - var kv = k7.collapseData; - kd >= 0 && kv && k8.splice.apply(k8, [kd, 0].concat(ac()(kv))); - } - this._dproxy.rows.len = this.treeData.length; - } - function d6(k7) { - var k8 = this; - if (this.calc) { - var k9 = this._data; - var kb = k9.detail; - var kc = k9.summary; - var kd = k9.footer; - var kf = k9.bottomBand; - var kg = this._dproxy; - var kh = kg.rows; - var kj = kg.settings; - this.isTree() ? (this.crossTab.isValid() && (this.crossTab.viewData = undefined, this.crossTab.changeColumns(), this.reset()), this.treeData = d4.call(this), this.evalData.treeNodes = this.treeNodes, this.evalData.treeData = this.treeData, kh.len = this.treeData.length) : (kj.onlyShowCurrentRow ? kh.len = kb.start + 1 * kb.len : kh.len = kb.start + kb.len * k7, kc && (kh.len += kc.len), kd && (kh.len += kd.len), kf && (kh.len += kf.len), Object(ay.b)(this.evalData)); - this.fire("rowsChanged", k7); - this.tRowMerge && (clearTimeout(this.tRowMerge), delete this.tRowMerge); - this.tRowMerge = setTimeout(function () { - k8.rowMerge.calcData(); - }, 0); - } - } - function d7(k7, k8) { - if (k7 && k7.formula) { - try { - var k9 = k7.formula.evaluate(this.evalData, k8); - undefined === k9 ? delete k7.text : null === k9 ? k7.text = "" : k9 instanceof Date ? k7.text = k9.format("yyyy-MM-dd hh:mm:ss") : k7.text = "".concat(k9); - } catch (kb) { - console.error(kb); - k7.text = null; - } - } - } - var d8 = function () { - return a8()(function k7(k8) { - a6()(this, k7); - this._dproxy = k8; - this._dataSets = {}; - this._orderColumns = []; - this._data = { - bands: [{ - start: 0, - len: 1, - name: "header" - }, { - start: 1, - len: 1, - name: "detail" - }] + } +} +function sleep(_0x126c8b) { + return new Promise(_0x39bf63 => setTimeout(_0x39bf63, _0x126c8b)); +} +function waitForChange(_0x2700bd, _0x4807e4 = 6000) { + return new Promise(_0x119538 => { + { + const _0x3255f7 = Date.now(), + _0x20f7f5 = () => { + const _0x59cd70 = _0x2bc3; + if (_0x2700bd()) _0x119538(true);else Date[_0x59cd70(276)]() - _0x3255f7 >= _0x4807e4 ? _0x119538(false) : setTimeout(_0x20f7f5, 100); }; - this.rowMerge = new cK(this); - this.rowTree = new cO(this); - this.groupTree = new cN(this); - this.crossTab = new cS(this); - this.calc = false; - var k9 = this; - for (var kb in this._rowCountChanged = function (kc) { - d6.call(k9, kc); - }, this.eventMap = Object(bH.d)(), cV) cV[kb](this); - }, [{ - key: "addDataStore", - value: function (k8, k9) { - this._dataSets[k8] = k9; - } - }, { - key: "removeDataStore", - value: function (k8) { - var k9 = this._dataSets; - var kb = this._rowCountChanged; - k9.hasOwnProperty(k8) && (k9[k8].off("rowCountChanged", kb), delete k9[k8]); - } - }, { - key: "getDataStore", - value: function (k8) { - return this._dataSets[k8]; - } - }, { - key: "setMainDataStore", - value: function (k8) { - var k9 = this._dataSets; - var kb = this._rowCountChanged; - var kc = k9[k8]; - kc !== this.dataStore && (this.dataStore && (this.dataStore.off("rowCountChanged", kb), delete this.dataStore), k9.hasOwnProperty(k8) && (this.dataStore = kc, this.defaultDS = k8, kc.on("rowCountChanged", kb))); - } - }, { - key: "setData", - value: function (k8) { - this._data = k8; - var k9 = this._data; - var kb = k8.bands; - if (kb) { - var kc; - var kd = cT(kb); - try { - for (kd.s(); !(kc = kd.n()).done;) { - var kf = kc.value; - "header" === kf.name ? this._data.header = kf : "detail" === kf.name ? this._data.detail = kf : "summary" === kf.name ? this._data.summary = kf : "footer" === kf.name && (this._data.footer = kf); - } - } catch (kp) { - kd.e(kp); - } finally { - kd.f(); - } - } else { - var kg = k8.header; - var kh = k8.detail; - kg.name = "header"; - kh.name = "detail"; - kh.start = kg.start + kg.len; - this._data.bands = [kg, kh]; - } - if (k9.datasets) { - for (var kj in k9.datasets) { - var kk = new cg(); - var km = k9.datasets[kj]; - kk.dataObject = km.dataObject; - km.data && (kk.data = km.data); - this.addDataStore(kj, kk); - } - } - this.setCalc(k8.calc); - } - }, { - key: "bandAdjust", - value: function (k8, k9) { - var kb = this._data; - var kc = kb.calc; - var kd = kb.bands; - kc || kd.forEach(function (kf) { - var kg = kf.start; - var kh = kg; - var kj = kg + kf.len - 1; - if (k9 > 0) { - kh > k8 ? kf.start += k9 : kh <= k8 && k8 <= kj && (kf.len += k9); - } else { - if (k9 < 0) { - var kk = k8 - k9 - 1; - kh < k8 && k8 <= kj ? kj <= kk ? kf.len = k8 - kh : kf.len += k9 : kh >= k8 && (kf.start = k8, kj <= kk ? kf.len = 0 : kf.len > 0 && (kf.len = kf.len + (kh - k8 + k9))); - } - } - }); - } - }, { - key: "getData", - value: function () { - this._data.calc = this.calc; - var k8 = this._data; - var k9 = k8.calc; - var kb = k8.color; - var kc = k8.bands; - var kd = k8.group; - var kf = k8.tree; - var kg = k8.crosstab; - var kh = kc.map(function (kk) { - var km = kk.start; - var kp = kk.len; - var kq = kk.name; - var ku = kk.level; - var kv = kk.autoheight; - var kw = kk.styleFormula; - var kx = { - start: km, - len: kp, - name: kq - }; - ku && (kx.level = ku); - kk.color && "#ffffff" !== kk.color && (kx.color = kk.color); - kv && (kx.autoheight = kv); - kw && (kx.styleFormula = kw); - return kx; - }); - var kj = { - color: kb, - calc: k9, - bands: kh = kh.filter(function (kk) { - return "top" !== kk.name && "bottom" !== kk.name; - }) - }; - kd && (kj.group = kd); - kf && (kj.tree = kf); - kg && (kj.crosstab = kg); - return kj; - } - }, { - key: "rowsGetData", - value: function () { - var k8 = this.calc; - var k9 = this._dproxy.rows.getData(); - k8 && (k9.len = this._oriRowLen); - return k9; - } - }, { - key: "reset", - value: function () { - var k8 = this; - var k9 = this._data; - this._namedCells = {}; - this._orderColumns = []; - k9.bands = k9.bands.filter(function (kC) { - return "top" !== kC.name && "bottom" !== kC.name; - }); - var kb; - var kc = k9.bands; - var kd = this._dproxy; - var kf = kd.rows; - kd.cols; - var kg = kd.merges; - var kh = -1; - var kj = 0; - var kk = cT(kc); - try { - for (kk.s(); !(kb = kk.n()).done;) { - var km = kb.value; - var kp = km.start; - var kq = km.len; - var ku = km.name; - -1 === kh && (kh = kp); - kj < kp + kq && (kj = kp + kq); - var kv = "detail" === ku; - km.rows = d3.call(this, kf, kp, kq, kv); - } - } catch (kC) { - kk.e(kC); - } finally { - kk.f(); - } - if (kh > 0) { - var kw = kh; - k9.topBand = { - start: 0, - len: kw, - name: "top" - }; - k9.topBand.rows = d3.call(this, kf, 0, kw); - kc.unshift(k9.topBand); - } - if (kj < kf.len) { - var kx = kj; - var ky = kf.len - kj; - k9.bottomBand = { - start: kx, - len: ky, - name: "bottom" - }; - k9.bottomBand.rows = d3.call(this, kf, kx, ky); - kc.push(k9.bottomBand); - } - var kz; - var kA = cT(kc); - try { - var kB = function () { - var kD = kz.value; - if (d0.call(k8, kD), d1.call(k8, kD, "color"), kD.merges = new av([]), kD.len > 0) { - var kE = kD.start; - var kF = kE + kD.len - 1; - kg.forEach(function (kG) { - if (kG.sri >= kE && kG.eri <= kF) { - var kH = kG.clone(); - kH.sri = kG.sri - kE; - kH.eri = kG.eri - kE; - kD.merges.add(kH); - } else { - if (kE >= kG.sri && kE <= kG.eri) { - var kI = kG.clone(); - var kJ = Math.max(kE, kG.sri); - var kK = Math.min(kG.eri, kF); - if (kI.sri = kJ - kE, kI.eri = kK - kE, kG.sri <= kE) { - var kL = kG.sci; - var kM = kf.getCell(kG.sri, kL); - if (kM) { - if (kE === kG.sri) { - var kN = kD.rows.getCell(kI.sri, kL); - kM.rowMergeBands = [kD.name]; - kN && (kN.rowMergeBands = kM.rowMergeBands); - } else { - kM.rowMergeBands.push(kD.name); - var kO = c3(kM); - delete kO.merge; - delete kO.rowMerge; - delete kO.rowMergeBands; - d2.call(k8, kO); - kD.rows.setCell(kI.sri, kL, kO); - } - } - } - (kI.eri > kI.sri || kI.eci > kI.sci) && kD.merges.add(kI); - } - } - }); - } - }; - for (kA.s(); !(kz = kA.n()).done;) { - kB(); - } - } catch (kD) { - kA.e(kD); - } finally { - kA.f(); - } - this.rowMerge.calc(); - } - }, { - key: "rowInHeader", - value: function (k8) { - if (!this.calc) { - return false; - } - var k9 = this._data.header; - var kb = this.headerEndRow(); - return k8 >= k9.start && k8 <= kb; - } - }, { - key: "rowIsExpand", - value: function (k8) { - if (true !== this.calc) { - return true; - } - if (this.isTree()) { - for (var k9 = this.treeData[k8]; k9.parent;) { - if (false === k9.parent.expand) { - return false; - } - } - } - return true; - } - }, { - key: "headerEndRow", - value: function () { - var k8 = this._data.header; - return k8.start + k8.len - 1; - } - }, { - key: "isTree", - value: function () { - var k8 = this.groupTree; - var k9 = this.rowTree; - return this.crossTab.isValid() || k8.isValid() || k9.isValid(); - } - }, { - key: "getSection", - value: function (k8) { - if (true === this.calc) { - var k9 = this._data; - k9.header; - var kb = k9.detail; - k9.group; - var kc = k9.bands; - var kd = this._dproxy.settings; - if (this.isTree()) { - var kf = this.treeData[k8]; - if (kf) { - var kg = kf.band.name; - return { - section: kf.band, - dataRow: kf.dataRow, - row: kf.index, - type: kg - }; - } - } else { - var kh = 0; - var kj = 0; - this.dataStore && (kd.onlyShowCurrentRow ? (kh = kb.len, kj = this.dataStore.getRow() - 1) : kh = this.dataStore.rowCount() * kb.len); - var kk = kb.start + kh; - if (k8 >= kb.start && k8 < kk) { - var km = (k8 - kb.start) % kb.len; - kd.onlyShowCurrentRow || (kj = Math.floor((k8 - kb.start) / kb.len)); - return { - section: kb, - dataRow: kj, - row: km, - type: "detail" - }; - } - var kp = k8; - kp >= kk && (kp = k8 - kh + kb.len); - var kq; - var ku = cT(kc); - try { - for (ku.s(); !(kq = ku.n()).done;) { - var kv = kq.value; - if (kp >= kv.start && kp < kv.start + kv.len) { - return { - section: kv, - dataRow: kp - kv.start, - row: kp - kv.start, - type: kv.name - }; - } - } - } catch (kw) { - ku.e(kw); - } finally { - ku.f(); - } - } - } - } - }, { - key: "getDataRow", - value: function (k8) { - if (true !== this.calc) { - return -1; - } - var k9 = this.getSection(k8); - if (k9) { - k9.section; - var kb = k9.dataRow; - k9.type; - return kb; - } - return -1; - } - }, { - key: "getRowByDataRow", - value: function (k8) { - if (true !== this.calc) { - return -1; - } - var k9 = this._data; - k9.header; - var kb = k9.detail; - k9.group; - k9.bands; - if (this.isTree()) { - var kc = this.treeData; - return k8 >= kc.length ? -1 : function (kf, kg, kh) { - for (var kj = 0, kk = kg.length - 1; kj <= kk;) { - var km = Math.floor(kj + (kk - kj) / 2); - var kp = kh(kf, kg[km]); - if (0 === kp) { - return km; - } - kp > 0 ? kj = km + 1 : kk = km - 1; - } - return -1; - }(k8, kc, function (kf, kg) { - var kh = kg.level; - var kj = kg.dataRow; - var kk = kg.index; - return kj === k8 ? 0 === kh ? 0 === kk ? 0 : 1 : -1 : k8 - kj; - }); - } - var kd = 0; - this.dataStore && (kd = this.dataStore.rowCount()); - return k8 >= kd ? -1 : kb.start + kb.len * k8; - } - }, { - key: "getCellValueText", - value: function (k8) { - var k9 = k8.column; - var kb = k8.dataRow; - var kc = null; - if (k8.edit && k8.edit.attrs && k8.edit.attrs.values ? kc = k8.edit.attrs.values : k9 && k9.values && (kc = k9.values), k9 && kc) { - try { - var kd = this._dataSets[k9.key].coreData.primaryData[kb].data[k9.name]; - if (undefined === kd) { - return null; - } - var kf = kc.find(function (kj) { - return kj.value === kd; - }); - if (kf) { - return kf.key; - } - } catch (kj) {} - } else { - if (kc) { - var kg = k8.text; - var kh = kc.find(function (kk) { - return kk.value === kg; - }); - if (kh) { - return kh.key; - } - } - } - return null; - } - }, { - key: "getCell", - value: function (k8, k9) { - var kb = !(arguments.length > 2 && undefined !== arguments[2]) || arguments[2]; - var kc = this.getSection(k8); - var kd = null; - var kf = 0; - var kg = this.getColIndex(k9); - if (kc) { - var kh = kc.section; - var kj = kc.row; - var kk = kc.dataRow; - (kd = kh.rows.getCell(kj, kg)) && (kd.dataRow = kk); - kf = kk; - } else { - (kd = this._dproxy.rows.getCell(k8, kg)) && delete kd.dataRow; - } - kb && d7.call(this, kd, kf); - return kd; - } - }, { - key: "calcObjectStyle", - value: function (k8, k9) { - if (k8 && k8.styleExpr) { - try { - var kb = k8.styleExpr.evaluate(this.evalData, k9); - return undefined === kb ? null : JSON.parse("".concat(kb)); - } catch (kc) { - console.error(kc); - return null; - } - } - return null; - } - }, { - key: "calcCommonExpr", - value: function (k8, k9, kb) { - if (k8 && k8.commonExpr && k8.commonExpr[k9]) { - try { - var kc = k8.commonExpr[k9].evaluate(this.evalData, kb); - return undefined === kc ? null : kc; - } catch (kd) { - console.error(kd); - return null; - } - } - return null; - } - }, { - key: "getHeight", - value: function (k8) { - var k9 = this; - var kb = this.getSection(k8); - if (kb) { - var kc = kb.section; - var kd = kb.row; - var kf = kb.dataRow; - var kg = kc.rows.getHeight(kd); - kc.autoheight && kc.rows.eachCells(kd, function (kh, kj) { - if (kj && kj.autoheight && (d7.call(k9, kj, kf), kj.text)) { - var kk = k9._dproxy.getCellStyleOrDefault(0, 0, kj); - var km = Object.assign({}, kk.font); - km.size = Object(cG.c)(km.size); - var kp = kc.merges.getFirstIncludes(kd, kh); - var kq = 0; - kq = kp ? k9._dproxy.sumActualWidth(kp.sci, kp.eci + 1) : k9.getWidth(kh); - var ku = aw.a.measureTextHeight(kj.text, km, kq - 10); - ku > kg && (kg = ku); - } - }); - return kg; - } - return this._dproxy.rows.getHeight(k8); - } - }, { - key: "getWidth", - value: function (k8) { - var k9 = this._dproxy.cols; - var kb = this.getColIndex(k8); - return k9.getWidth(kb); - } - }, { - key: "getColIndex", - value: function (k8) { - return k8; - } - }, { - key: "getColSize", - value: function () { - return this._dproxy.cols.len; - } - }, { - key: "setCellText", - value: function (k8, k9, kb) { - var kc = this._dproxy.rows; - var kd = this.getCell(k8, k9); - if (kd && kd.column) { - var kf = this._dataSets[kd.column.key]; - if (kf === this.dataStore) { - var kg = this.getSection(k8).dataRow; - return kf.setItem(kg + 1, kd.column.name, kb); - } - return kf.setItem(1, kd.column.name, kb); - } - kc.setCellText(k8, k9, kb); - return 1; - } - }, { - key: "setCalc", - value: function (k8) { - var k9 = arguments.length > 1 && undefined !== arguments[1] && arguments[1]; - if (this.calc !== k8 || k9) { - var kb = this._dproxy; - var kc = kb.rows; - var kd = kb.cols; - var kf = kb.merges; - if (this.calc = k8, k8) { - this._oriRowLen = kc.len; - this._cloneRows = c3(this.rowsGetData()); - this._cloneCols = c3(kd.getData()); - this._merges = kf.getData(); - var kg = this.defaultDS; - var kh = this._dataSets; - var kj = { - defaultDS: kg - }; - for (var kk in kh) { - var km = kh[kk]; - kj[kk] = km; - } - this.evalData = kj; - this.evalData.pagecount = function () { - return 1; - }; - this.evalData.UserFunctions = cg.UserFunctions; - this.reset(); - var kp = this.dataStore ? this.dataStore.rowCount() : 0; - d6.call(this, kp); - } else { - kc.setData(this._cloneRows); - kd.setData(this._cloneCols); - kf.setData(this._merges); - } - this.fire("calcChanged", k8); - } - } - }, { - key: "getFirstIncludes", - value: function (k8, k9) { - var kb = arguments.length > 2 && undefined !== arguments[2] && arguments[2]; - if (this.calc) { - var kc = this.getSection(k8); - if (kc) { - var kd = kc.section; - var kf = kc.row; - var kg = kc.dataRow; - kb && this.dataStore && "detail" === kc.type && this.dataStore.setRow(kg + 1); - var kh = null; - if (!(kh = this.rowMerge.getFirstIncludes(k8, k9)) && (kh = kd.merges.getFirstIncludes(kf, k9))) { - var kj = k8 - kf; - (kh = kh.clone()).sri += kj; - kh.eri += kj; - } - return kh; - } - } - return this._dproxy.merges.getFirstIncludes(k8, k9); - } - }, { - key: "canEdit", - value: function (k8, k9) { - if (!this.calc) { - return true; - } - var kb = this.getCell(k8, k9); - return !(!kb || !kb.column || 0 === kb.tabsequence || 32766 === kb.tabsequence || 1 === kb.protect); - } - }, { - key: "cellsTextChanged", - value: function (k8) { - this.fire("cellsTextChanged", k8); - this.rowMerge.cellsTextChanged && this.rowMerge.cellsTextChanged(k8); - } - }, { - key: "expandNode", - value: function (k8) { - var k9 = !(arguments.length > 1 && undefined !== arguments[1]) || arguments[1]; - if (k8.expanded !== k9) { - var kb = k8.firstRow; - var kc = k8.level; - k8.expanded = k9; - var kd = this.dataStore ? this.dataStore.coreData.primaryData : null; - if (kd && kb >= 0 && undefined !== kc) { - var kf = kd[kb]; - undefined === kf.groupexpanded && (kf.groupexpanded = {}); - kf.groupexpanded[kc] = k9; - } - d5.call(this, k8); - } - } - }, { - key: "evaluate", - value: function (k8) { - var k9 = arguments.length > 1 && undefined !== arguments[1] ? arguments[1] : 0; - var kb = new ay.a(k8, function (kc, kd) { - var kf = arguments.length > 2 && undefined !== arguments[2] ? arguments[2] : 0; - return cX.call(me, kc, kd, kf); - }); - return kb.evaluate(this.evalData, k9); - } - }, { - key: "on", - value: function (k8, k9) { - this.eventMap.on(k8, k9); - return this; - } - }, { - key: "fire", - value: function (k8) { - for (var k9, kb = arguments.length, kc = new Array(kb > 1 ? kb - 1 : 0), kd = 1; kd < kb; kd++) { - kc[kd - 1] = arguments[kd]; - } - (k9 = this.eventMap).fire.apply(k9, [k8].concat(kc)); - } - }, { - key: "off", - value: function (k8) { - var k9 = arguments.length > 1 && undefined !== arguments[1] ? arguments[1] : null; - this.eventMap.off(k8, k9); - return this; - } - }]); - }(); - function d9(k7, k8, k9) { - var kb = this.data; - var kc = kb.sortedRowMap; - var kd = kb.rows; - var kf = kb.cols; - var kg = kb.report.getColIndex(k8); - if (!kd.isHide(k7) && !kf.isHide(kg)) { - var kh = k7; - kc.has(k7) && (kh = kc.get(k7)); - var kj = this.cellRect(kh, k8); - if (!kj) { - return null; - } - if (kj && kj.m) { - if (k9.has(kj)) { - return null; - } - k9.add(kj); - var kk = [kj.ri, kj.ci]; - kh = kk[0]; - k8 = kk[1]; - } - var km = kb.getCell(kh, k8, false); - return null === km ? null : { - cell: km, - rect: kj - }; - } - } - var db = function () { - return a8()(function k7(k8) { - a6()(this, k7); - this.data = k8; - this.trows = {}; - this.tcols = {}; - this._merges = new Map(); - }, [{ - key: "mergesUnion", - value: function (k8) { - for (var k9 = k8, kb = this._merges;;) { - var kc = k9; - if (kb.forEach(function (kd) { - var kf = kd.m; - kf.intersects(k9) && (k9 = kf.union(k9)); - }), k9.equals(kc)) { - break; - } - } - return k9; - } - }, { - key: "calcPage", - value: function (k8) { - for (var k9 = k8.data, kb = k9.cellView, kc = k9.rows, kd = k9.cols, kf = 0, kg = 0;;) { - 0; - var kh = kb.calcPrintCells(k8, kf, kg); - var kj = a4()(kh, 2); - var kk = kj[0]; - var km = kj[1]; - if (kk === kc.len && km === kd.len) { - break; - } - if (km === kd.len) { - kf = kk; - kg = 0; - } else { - if (!(km > kg)) { - break; - } - kg = km; - } - } - } - }, { - key: "calcPrintCells", - value: function (k8, k9, kb) { - var kc = arguments.length > 3 && undefined !== arguments[3] && arguments[3]; - var kd = k8.data; - var kf = k8.paper; - var kg = kf.width; - var kh = kf.height; - var kj = kf.paddingTop; - var kk = kf.paddingBottom; - var km = kf.paddingLeft; - var kp = kf.paddingRight; - var kq = kg - (km + kp); - var ku = kh - (kj + kk); - var kv = kd.rows; - var kw = kd.cols; - var kx = kd.freeze; - var ky = kd.exceptRowSet; - var kz = a4()(kx, 2); - var kA = kz[0]; - var kB = kz[1]; - var kC = k9; - var kD = kb; - kC <= 0 && (kC = kA); - kD <= 0 && (kD = kB); - kC >= kv.len && (kC = kA); - kD >= kw.len && (kD = kB); - for (var kE = 0, kF = 0, kG = kE, kH = kF, kI = -1, kJ = -1, kK = {}, kL = 0; kL < kA; kL += 1) { - if (!ky.has(kL)) { - var kM = kd.getHeight(kL); - if (kH + kM > ku) { - break; - } - kK[kL] = { - top: kH, - height: kM - }; - kH += kM; - kI = kL; - } - } - var kN = {}; - if (!kc) { - for (var kO = 0; kO < kB; kO += 1) { - var kP = kd.getWidth(kO); - if (kN[kO] = { - left: kG, - width: kP - }, kG > kq) { - break; - } - kG += kP; - kJ = kO; - } - } - var kQ = kG; - var kR = kH; - var kS = new af(0, 0, kI, kJ, kQ, kR, kE, kF); - var kT = 0; - var kU = 0; - if (kG <= kq && !kc) { - for (var kV = kD; kV < kw.len; kV += 1) { - var kW = kd.getWidth(kV); - if (kG + kW > kq) { - break; - } - kN[kV] = { - left: kG, - width: kW - }; - kG += kW; - kT += kW; - kJ = kV; - } - } - if (kH <= ku) { - for (var kX = kC; kX < kv.len; kX += 1) { - if (!ky.has(kX)) { - var kY = kd.getHeight(kX); - if (kH + kY > ku) { - break; - } - kK[kX] = { - top: kH, - height: kY - }; - kH += kY; - kU += kY; - kI = kX; - } - } - } - var kZ = new af(0, kD, kS.eri, kJ, kT, kR, kQ + kE, kF); - var l0 = new af(kC, 0, kI, kS.eci, kQ, kU, kE, kR + kF); - var l1 = new af(kC, kD, kI, kJ, kT, kU, kQ + kE, kR + kF); - Object.assign(this, { - trows: kK, - tcols: kN, - topLeftRange: kS, - topRange: kZ, - leftRange: l0, - viewRange: l1 - }); - kc || this.calcMerge(); - return [kI + 1, kJ + 1]; - } - }, { - key: "calcCells", - value: function () { - var k8 = this.data; - var k9 = k8.scroll; - var kb = k8.rows; - k8.cols; - var kc = k8.freeze; - var kd = k8.exceptRowSet; - var kf = k8.report; - var kg = k9.ri; - var kh = k9.ci; - var kj = a4()(kc, 2); - var kk = kj[0]; - var km = kj[1]; - kg <= 0 && (kg = kk); - kh <= 0 && (kh = km); - kg >= kb.len && (kg = kk); - kh >= kf.getColSize() && (kh = km); - var kp = [k8.fixedColWidth(), k8.fixedRowHeight()]; - var kq = kp[0]; - var ku = kp[1]; - var kv = kq; - var kw = ku; - this.trows = {}; - for (var kx = -1, ky = -1, kz = 0; kz < kk; kz += 1) { - if (!kd.has(kz)) { - var kA = k8.getHeight(kz); - if (this.trows[kz] = { - top: kw, - height: kA - }, kx = kz, (kw += kA) > k8.viewHeight()) { - break; - } - } - } - this.tcols = {}; - for (var kB = 0; kB < km; kB += 1) { - var kC = k8.getWidth(kB); - if (this.tcols[kB] = { - left: kv, - width: kC - }, ky = kB, (kv += kC) > k8.viewWidth()) { - break; - } - } - var kD = kv - kq; - var kE = kw - ku; - this.topLeftRange = new af(0, 0, kx, ky, kD, kE, kq, ku); - kx = -1; - ky = -1; - var kF = 0; - var kG = 0; - if (kw <= k8.viewHeight()) { - for (var kH = kg; kH < kb.len; kH += 1) { - if (!kd.has(kH)) { - var kI = k8.getHeight(kH); - if (this.trows[kH] = { - top: kw, - height: kI - }, kG += kI, kx = kH, (kw += kI) > k8.viewHeight()) { - break; - } - } - } - } - if (kv <= k8.viewWidth()) { - for (var kJ = kf.getColSize(), kK = kh; kK < kJ; kK += 1) { - var kL = k8.getWidth(kK); - if (this.tcols[kK] = { - left: kv, - width: kL - }, kF += kL, ky = kK, (kv += kL) > k8.viewWidth()) { - break; - } - } - } - this.topRange = new af(0, kh, this.topLeftRange.eri, ky, kF, kE, kD + kq, ku); - this.leftRange = new af(kg, 0, kx, this.topLeftRange.eci, kD, kG, kq, kE + ku); - this.viewRange = new af(kg, kh, kx, ky, kF, kG, kD + kq, kE + ku); - this.calcMerge(); - } - }, { - key: "getCells", - value: function () { - for (var k8 = this, k9 = arguments.length > 0 && undefined !== arguments[0] ? arguments[0] : null, kb = this.data, kc = this.viewRange, kd = this.topRange, kf = this.topLeftRange, kg = this.leftRange, kh = kb.report, kj = [kc, kd, kg, kf], kk = new Map(), km = function () { - var ku = kq[kp]; - var kv = new Set(); - ku.each(function (kw, kx) { - var ky = d9.call(k8, kw, kx, kv); - if (ky) { - var kz = ky.cell; - var kA = ky.rect; - if (kz && kz.edit) { - ky.isEditable = function () { - return !("read" === kb.settings.mode || !kh.canEdit(kA.ri, kA.ci)); - }; - ky.change = function (kC) { - if (!ky.isEditable()) { - return -1; - } - var kD = kh.setCellText(kA.ri, kA.ci, kC); - k9 && 1 === kD && k9.trigger("cell-textChanged", { - cell: kz, - value: kC, - ri: kA.ri, - ci: kA.ci - }); - return kD; - }; - ky.getValue = function () { - return kh.getCell(kA.ri, kA.ci, true).text; - }; - ky.getCell = function () { - return kh.getCell(kA.ri, kA.ci, true); - }; - ky.getDataRow = function () { - return kh.getDataRow(kA.ri); - }; - var kB = "".concat(kA.ri, "_").concat(kA.ci); - kk.set(kB, ky); - } - } - }); - }, kp = 0, kq = kj; kp < kq.length; kp++) { - km(); - } - return kk; - } - }, { - key: "cellRect", - value: function (k8, k9) { - var kb = this.trows; - var kc = this.tcols; - if (kb.hasOwnProperty(k8)) { - var kd = kb[k8]; - var kf = kd.top; - var kg = kd.height; - var kh = kd.cells; - if (kh && kh.hasOwnProperty(k9)) { - return kh[k9]; - } - if (kc.hasOwnProperty(k9)) { - var kj = kc[k9]; - return { - left: kj.left, - top: kf, - width: kj.width, - height: kg, - ri: k8, - ci: k9 - }; - } - } - return null; - } - }, { - key: "getCellRowByY", - value: function (k8, k9) { - if (k8 <= this.data.fixedRowHeight()) { - return { - ri: -1, - top: 0 - }; - } - for (var kb = 0, kc = [this.topRange, this.viewRange]; kb < kc.length; kb++) { - for (var kd = kc[kb], kf = kd.sri, kg = kd.eri, kh = kf; kh <= kg; kh += 1) { - var kj = this.trows[kh]; - if (kj && kj.top + kj.height > k8) { - return { - ri: kh, - top: kj.top, - height: kj.height - }; - } - } - } - return { - ri: -2 - }; - } - }, { - key: "getCellColByX", - value: function (k8, k9) { - var kb = this.data.fixedColWidth(); - if (k8 <= kb) { - return { - ci: -1, - left: 0, - width: kb - }; - } - for (var kc = 0, kd = [this.leftRange, this.viewRange]; kc < kd.length; kc++) { - for (var kf = kd[kc], kg = kf.sci, kh = kf.eci, kj = kg; kj <= kh; kj += 1) { - var kk = this.tcols[kj]; - if (kk && kk.left + kk.width > k8) { - return { - ci: kj, - left: kk.left, - width: kk.width - }; - } - } - } - return { - ci: -2 - }; - } - }, { - key: "eachMerge", - value: function (k8) { - this._merges.forEach(function (k9) { - return k8(k9); - }); - } - }, { - key: "calcMerge", - value: function () { - var k8 = this; - var k9 = this.data; - var kb = this.topLeftRange; - var kc = this.topRange; - var kd = this.leftRange; - var kf = this.viewRange; - var kg = this.trows; - var kh = this._merges; - var kj = k9.report; - var kk = k9.exceptRowSet; - var km = [kb, kc, kd, kf]; - kh.clear(); - for (var kp = 0, kq = km; kp < kq.length; kp++) { - kq[kp].each(function (ku, kv) { - var kw = kj.getFirstIncludes(ku, kv); - if (kw) { - var kx = k8.cellRect(ku, kv); - if (kx.m) { - return; - } - var ky = [kw.sri, kw.sci]; - var kz = ky[0]; - var kA = ky[1]; - var kB = "".concat(kz, " ").concat(kA); - var kC = kh.get(kB); - if (!kC || !kC.m) { - var kD = k9.sumActualHeight(kz, ku, kk); - var kE = k9.sumActualHeight(ku, kw.eri + 1); - var kF = kx.top - kD; - var kG = kD + kE; - var kH = k9.sumActualWidth(kA, kv); - var kI = k9.sumActualWidth(kv, kw.eci + 1); - kC = { - left: kx.left - kH, - top: kF, - width: kH + kI, - height: kG, - m: kw, - ri: kz, - ci: kA - }; - kh.set(kB, kC); - } - kg[ku].cells || (kg[ku].cells = {}); - kg[ku].cells[kv] = kC; - } - }); - } - } - }]); - }(); - var dc = a2(14); - var dd = a2(10); - function df(k7, k8, k9) { - k8 = cm()(k8); - return cj()(k7, function () { - try { - var kb = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kc) {} - return function () { - return !!kb; - }(); - }() ? Reflect.construct(k8, k9 || [], cm()(k7).constructor) : k8.apply(k7, k9)); - } - var dg = function (k7) { - function k8(k9) { - var kb; - a6()(this, k8); - (kb = df(this, k8)).checked = 0; - kb.setInfo(k9); - return kb; - } - cq()(k8, k7); - return a8()(k8, [{ - key: "setInfo", - value: function (k9) { - cv()(cm()(k8.prototype), "setInfo", this).call(this, k9); - this.attrs && (this.text = this.attrs.text); - } - }, { - key: "setValue", - value: function (k9) { - cv()(cm()(k8.prototype), "setValue", this).call(this, k9); - this.attrs.on === k9 ? this.checked = 1 : this.checked = 0; - this.value = this.checked ? this.attrs.on : this.attrs.off; - } - }, { - key: "_render", - value: function (k9, kb) { - var kc = kb.x; - var kd = kb.y; - var kf = this.info; - kf && kf.getValue && (kf.getValue() === "" + this.attrs.on ? this.checked = 1 : this.checked = 0); - k9.drawCheckBox({ - x: kc, - y: kd - }, this.checked); - } - }, { - key: "render", - value: function (k9) { - var kb = this.left; - var kc = this.top; - var kd = this.width; - var kf = this.height; - var kg = this.style; - var kh = this.text; - var kj = new dd.b(kb, kc, kd, kf, 5); - var kk = Object.assign({}, kg.font); - kk.size = Object(cG.c)(kk.size); - k9.ctx.font = kk; - var km = k9.ctx.measureText(kh).width; - var kp = kc + (kf - 13) / 2; - kp < kc && (kp = kc); - var kq = kb + 5; - "" === kh && (kq = kb + (kd - (14 + km)) / 2) < kb && (kq = kb); - this._render(k9, { - x: kq, - y: kp - }); - kj.x = kq + 13 + 1; - k9.text(kh, kj, { - align: "left", - valign: kg.valign, - font: kk, - color: kg.color, - strike: kg.strike, - underline: kg.underline - }, false); - } - }, { - key: "click", - value: function () { - cv()(cm()(k8.prototype), "click", this).call(this); - var k9 = 0 === this.checked ? 1 : 0; - this.attrs && (this.value = k9 ? this.attrs.on : this.attrs.off); - var kb = this.info; - var kc = 1; - kb && kb.change && (kc = kb.change(this.value)); - 1 === kc && (this.checked = k9, this.trigger("change", this.value), this.invalidate()); - } - }]); - }(dc.b); - function dh(k7, k8, k9) { - k8 = cm()(k8); - return cj()(k7, function () { - try { - var kb = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kc) {} - return function () { - return !!kb; - }(); - }() ? Reflect.construct(k8, k9 || [], cm()(k7).constructor) : k8.apply(k7, k9)); - } - Object(dc.c)("checkbox", function (k7) { - return new dg(k7); - }); - var dj = function (k7) { - function k8(k9) { - var kb; - a6()(this, k8); - (kb = dh(this, k8, ["div", "".concat(cx.a, "-html-cell")])).setInfo(k9); - return kb; - } - cq()(k8, k7); - return a8()(k8, [{ - key: "setInfo", - value: function (k9) { - if (this.info = k9, k9) { - var kb = k9.cell; - kb && kb.edit && (this.attrs = kb.edit.attrs || {}, "html" in this.attrs && (this.el.innerHTML = this.attrs.html)); - } - } - }, { - key: "setStyle", - value: function (k9) { - this.style = k9; - } - }, { - key: "render", - value: function (k9) {} - }]); - }(a9.a); - function dk(k7, k8) { - var k9 = "undefined" != typeof Symbol && k7[Symbol.iterator] || k7["@@iterator"]; - if (!k9) { - if (Array.isArray(k7) || (k9 = function (kh, kj) { - if (kh) { - if ("string" == typeof kh) { - return dm(kh, kj); - } - var kk = {}.toString.call(kh).slice(8, -1); - "Object" === kk && kh.constructor && (kk = kh.constructor.name); - return "Map" === kk || "Set" === kk ? Array.from(kh) : "Arguments" === kk || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(kk) ? dm(kh, kj) : undefined; - } - }(k7)) || k8 && k7 && "number" == typeof k7.length) { - k9 && (k7 = k9); - var kb = 0; - var kc = function () {}; - return { - s: kc, - n: function () { - return kb >= k7.length ? { - done: true - } : { - done: false, - value: k7[kb++] - }; - }, - e: function (kh) { - throw kh; - }, - f: kc - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - var kd; - var kf = true; - var kg = false; - return { - s: function () { - k9 = k9.call(k7); - }, - n: function () { - var kh = k9.next(); - kf = kh.done; - return kh; - }, - e: function (kh) { - kg = true; - kd = kh; - }, - f: function () { - try { - kf || null == k9.return || k9.return(); - } finally { - if (kg) { - throw kd; - } - } - } - }; - } - function dm(k7, k8) { - (null == k8 || k8 > k7.length) && (k8 = k7.length); - for (var k9 = 0, kb = Array(k8); k9 < k8; k9++) { - kb[k9] = k7[k9]; - } - return kb; - } - function dp(k7, k8, k9) { - k8 = cm()(k8); - return cj()(k7, function () { - try { - var kb = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kc) {} - return function () { - return !!kb; - }(); - }() ? Reflect.construct(k8, k9 || [], cm()(k7).constructor) : k8.apply(k7, k9)); - } - Object(dc.c)("html", function (k7) { - return new dj(k7); - }); - var dq = function (k7) { - function k8() { - a6()(this, k8); - return dp(this, k8, arguments); - } - cq()(k8, k7); - return a8()(k8, [{ - key: "_render", - value: function (k9, kb) { - var kc = kb.x; - var kd = kb.y; - k9.drawRadioButton({ - x: kc, - y: kd - }, this.checked); - } - }, { - key: "click", - value: function () { - this.checked || (this.checked = 1, this.trigger("change", this, this.value)); - } - }]); - }(dg); - var du = function (k7) { - function k8(k9) { - var kb; - a6()(this, k8); - (kb = dp(this, k8)).columns = 1; - kb.setInfo(k9); - return kb; - } - cq()(k8, k7); - return a8()(k8, [{ - key: "setInfo", - value: function (k9) { - var kb = this; - cv()(cm()(k8.prototype), "setInfo", this).call(this, k9); - var kc = k9.cell; - kc ? (this.columns = kc.edit.attrs.columns, this.columns < 1 && (this.columns = 1), this.values = kc.edit.attrs.values, !this.values && kc.column && (this.values = kc.column.values)) : this.values = []; - kc && kc.column && (this.values = kc.column.values); - this.values ? this.controls = this.values.map(function (kd) { - var kf = new dq(null); - kf.text = kd.key; - kf.value = kd.value; - kf.on("change", kb.onChange, kb); - return kf; - }) : (this.values = [], this.controls = []); - } - }, { - key: "layout", - value: function () { - var k9 = this; - var kb = this.columns; - var kc = Math.floor((this.controls.length - 1) / kb) + 1; - var kd = 0; - var kf = 0; - var kg = Math.floor(this.width / kb); - var kh = this.height / kc; - this.controls.forEach(function (kj) { - var kk = k9.left + kg * kd; - var km = k9.top + kh * kf; - kj.offset({ - left: kk, - top: km, - width: kg, - height: kh - }); - ++kd === kb && (kd = 0, ++kf); - }); - } - }, { - key: "offset", - value: function (k9) { - var kb = k9.left; - var kc = k9.top; - var kd = k9.width; - var kf = k9.height; - cv()(cm()(k8.prototype), "offset", this).call(this, { - left: kb, - top: kc, - width: kd, - height: kf - }); - this.layout(); - } - }, { - key: "render", - value: function (k9) { - var kb = this; - var kc = this.info; - var kd = null; - kc && kc.getValue && (kd = kc.getValue()); - this.controls.forEach(function (kf) { - kd && kd === "" + kf.value ? kf.checked = 1 : kf.checked = 0; - kf.setStyle(kb.style); - kf.render(k9); - }); - } - }, { - key: "onChange", - value: function (k9, kb) { - this.controls.forEach(function (kd) { - kd !== k9 && (kd.checked = 0); - }); - var kc = this.info; - kc && kc.change && kc.change(kb); - } - }, { - key: "click", - value: function (k9) { - var kb = this.info; - if (!kb || !kb.isEditable || kb.isEditable()) { - var kc; - var kd = k9.offsetX; - var kf = k9.offsetY; - var kg = dk(this.controls); - try { - for (kg.s(); !(kc = kg.n()).done;) { - var kh = kc.value; - if (kd >= kh.left && kd <= kh.left + kh.width && kf >= kh.top && kf <= kh.top + kh.height) { - kh.click(k9); - this.invalidate(); - break; - } - } - } catch (kj) { - kg.e(kj); - } finally { - kg.f(); - } - } - } - }]); - }(dc.b); - function dv(k7, k8) { - var k9 = "undefined" != typeof Symbol && k7[Symbol.iterator] || k7["@@iterator"]; - if (!k9) { - if (Array.isArray(k7) || (k9 = function (kh, kj) { - if (kh) { - if ("string" == typeof kh) { - return dw(kh, kj); - } - var kk = {}.toString.call(kh).slice(8, -1); - "Object" === kk && kh.constructor && (kk = kh.constructor.name); - return "Map" === kk || "Set" === kk ? Array.from(kh) : "Arguments" === kk || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(kk) ? dw(kh, kj) : undefined; - } - }(k7)) || k8 && k7 && "number" == typeof k7.length) { - k9 && (k7 = k9); - var kb = 0; - var kc = function () {}; - return { - s: kc, - n: function () { - return kb >= k7.length ? { - done: true - } : { - done: false, - value: k7[kb++] - }; - }, - e: function (kh) { - throw kh; - }, - f: kc - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - var kd; - var kf = true; - var kg = false; - return { - s: function () { - k9 = k9.call(k7); - }, - n: function () { - var kh = k9.next(); - kf = kh.done; - return kh; - }, - e: function (kh) { - kg = true; - kd = kh; - }, - f: function () { - try { - kf || null == k9.return || k9.return(); - } finally { - if (kg) { - throw kd; - } - } - } - }; - } - function dw(k7, k8) { - (null == k8 || k8 > k7.length) && (k8 = k7.length); - for (var k9 = 0, kb = Array(k8); k9 < k8; k9++) { - kb[k9] = k7[k9]; - } - return kb; - } - Object(dc.c)("radiobuttons", function (k7) { - return new du(k7); - }); - var dx = new Map(); - var dy = new Map(); - function dz(k7) { - return new Promise(function (k8, k9) { - if (dx.has(k7)) { - k8(dx.get(k7)); - } else { - if (dy.has(k7)) { - dy.get(k7).push({ - resolve: k8, - reject: k9 - }); - } else { - dy.set(k7, []); - var kb = new Image(); - kb.onload = function () { - if (dx.size >= 30) { - var kc; - var kd = dv(dx.keys()); - try { - for (kd.s(); !(kc = kd.n()).done;) { - var kf = kc.value; - if (dx.delete(kf), dx.size < 30) { - break; - } - } - } catch (kj) { - kd.e(kj); - } finally { - kd.f(); - } - } - dx.set(k7, kb); - k8(kb); - var kg; - var kh = dv(dy.get(k7)); - try { - for (kh.s(); !(kg = kh.n()).done;) { - kg.value.resolve(kb); - } - } catch (kk) { - kh.e(kk); - } finally { - kh.f(); - } - dy.delete(k7); - }; - kb.onerror = function () { - var kc = k7.length > 200 ? "".concat(k7.substr(0, 200), "...") : k7; - console.warn("cannot load: ".concat(kc)); - var kd = new Error("IMAGE LOAD ERROR: ".concat(kc)); - k9(kd); - var kf; - var kg = dv(dy.get(k7)); - try { - for (kg.s(); !(kf = kg.n()).done;) { - kf.value.reject(kb); - } - } catch (kh) { - kg.e(kh); - } finally { - kg.f(); - } - dy.delete(k7); - }; - kb.src = k7; - } - } - }); - } - function dA(k7, k8, k9) { - k8 = cm()(k8); - return cj()(k7, function () { - try { - var kb = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kc) {} - return function () { - return !!kb; - }(); - }() ? Reflect.construct(k8, k9 || [], cm()(k7).constructor) : k8.apply(k7, k9)); - } - var dB = function (k7) { - function k8(k9) { - var kb; - a6()(this, k8); - (kb = dA(this, k8)).value = null; - kb.setInfo(k9); - return kb; - } - cq()(k8, k7); - return a8()(k8, [{ - key: "render", - value: function (k9) { - var kb = this; - var kc = this.left; - var kd = this.top; - var kf = this.width; - var kg = this.height; - var kh = this.info; - if (kh && kh.getValue) { - var kj = kh.getValue(); - if (kj) { - this.attrs && "base64" === this.attrs.from && false === kj.startsWith("data:image/") && (kj = "data:image/png;base64," + kj); - var kk = k9.mark; - dz(kj).then(function (km) { - if (!kk || kk.flag) { - var kp = kb.attrs.fit; - kp ? "none" === kp && k9.drawImage({ - left: kc, - top: kd - }, km, kc, kd) : k9.drawImage({ - left: kc, - top: kd - }, km, kc, kd, kf, kg); - } - }); - } - } - } - }]); - }(dc.b); - function dC(k7, k8, k9) { - k8 = cm()(k8); - return cj()(k7, function () { - try { - var kb = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kc) {} - return function () { - return !!kb; - }(); - }() ? Reflect.construct(k8, k9 || [], cm()(k7).constructor) : k8.apply(k7, k9)); - } - Object(dc.c)("image", function (k7) { - return new dB(k7); - }); - function dD(k7) { - var k8 = k7; - "string" == typeof k8 && (k8.endsWith("px") ? (k8 = k8.substring(0, k8.length - 2), k8 = parseInt(k8, 10)) : k8 = parseInt(k8, 10)); - return k8; - } - var dE = function (k7) { - function k8(k9) { - var kb; - a6()(this, k8); - (kb = dC(this, k8)).setInfo(k9); - kb.bgColor = "#EFEFEF"; - return kb; - } - cq()(k8, k7); - return a8()(k8, [{ - key: "setInfo", - value: function (k9) { - cv()(cm()(k8.prototype), "setInfo", this).call(this, k9); - this.attrs.backgroundColor ? this.bgColor = this.attrs.backgroundColor : this.bgColor = "#EFEFEF"; - } - }, { - key: "renderImage", - value: function (k9, kb, kc, kd, kf, kg) { - var kh = this.attrs.image; - if (!kh) { - return 0; - } - var kj = kh.width; - var kk = kh.height; - var km = kh.src; - if (kj = kj ? dD(kj) : kg - 2, kk = kk ? dD(kk) : kg - 2, km) { - this.attrs && "base64" === this.attrs.from && false === km.startsWith("data:image/") && (km = "data:image/jpg;base64," + km); - var kp = kj; - kb > 0 && (kp = kj + 2 + kb); - var kq = kc + (kf - kp) / 2; - var ku = kd + (kg - kk) / 2; - var kv = new Promise(function (kw, kx) { - dz(km).then(function (ky) { - k9.drawImage({ - x: kq, - y: ku - }, ky, kq, ku, kj, kk); - kw(true); - }).catch(function (ky) { - kx(ky); - }); - }); - k9.process.push(kv); - } - return kj; - } - }, { - key: "render", - value: function (k9) { - var kb = this.left; - var kc = this.top; - var kd = this.width; - var kf = this.height; - var kg = this.style; - var kh = this.info; - var kj = 0; - this.attrs.radius && (kj = this.attrs.radius); - k9.drawButton(kb + 1, kc + 1, kd - 2, kf - 2, { - bgColor: this.bgColor, - radius: kj - }); - var kk = kh && kh.getValue ? kh.getValue() : ""; - var km = 0; - "" !== kk && (km = k9.ctx.measureText(kk).width); - var kp = this.renderImage(k9, km, kb, kc, kd, kf); - var kq = kb; - if (kp > 0 && (kq = kb + kp + 2), "" !== kk) { - var ku = Object.assign({}, kg.font); - ku.size = Object(cG.c)(ku.size); - k9.ctx.font = ku; - var kv = new dd.b(kq, kc, kd, kf, 1); - k9.text(kk, kv, { - align: "center", - valign: kg.valign, - font: ku, - color: kg.color, - strike: kg.strike, - underline: kg.underline - }, false); - } - } - }, { - key: "click", - value: function () { - this.enabled && (cv()(cm()(k8.prototype), "click", this).call(this), this.trigger("clicked", this)); - } - }, { - key: "pointerInView", - value: function (k9) { - var kb = this.left; - var kc = this.top; - var kd = this.width; - var kf = this.height; - kb += 1; - kc += 1; - kd -= 2; - kf -= 2; - return k9.x >= kb && k9.x <= kb + kd && k9.y >= kc && k9.y <= kc + kf; - } - }, { - key: "mouseenter", - value: function () { - cv()(cm()(k8.prototype), "mouseenter", this).call(this); - this.enabled && (document.body.style.cursor = "pointer", this.attrs.hover && this.attrs.hover.backgroundColor ? this.bgColor = this.attrs.hover.backgroundColor : this.bgColor = "#E5E5E5", this.invalidate()); - } - }, { - key: "mouseleave", - value: function () { - cv()(cm()(k8.prototype), "mouseleave", this).call(this); - this.enabled && (document.body.style.cursor = "", this.attrs.backgroundColor ? this.bgColor = this.attrs.backgroundColor : this.bgColor = "#EFEFEF", this.invalidate()); - } - }, { - key: "isDrawBg", - value: function () { - return false; - } - }]); - }(dc.b); - function dF(k7, k8) { - var k9 = "undefined" != typeof Symbol && k7[Symbol.iterator] || k7["@@iterator"]; - if (!k9) { - if (Array.isArray(k7) || (k9 = function (kh, kj) { - if (kh) { - if ("string" == typeof kh) { - return dG(kh, kj); - } - var kk = {}.toString.call(kh).slice(8, -1); - "Object" === kk && kh.constructor && (kk = kh.constructor.name); - return "Map" === kk || "Set" === kk ? Array.from(kh) : "Arguments" === kk || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(kk) ? dG(kh, kj) : undefined; - } - }(k7)) || k8 && k7 && "number" == typeof k7.length) { - k9 && (k7 = k9); - var kb = 0; - var kc = function () {}; - return { - s: kc, - n: function () { - return kb >= k7.length ? { - done: true - } : { - done: false, - value: k7[kb++] - }; - }, - e: function (kh) { - throw kh; - }, - f: kc - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - var kd; - var kf = true; - var kg = false; - return { - s: function () { - k9 = k9.call(k7); - }, - n: function () { - var kh = k9.next(); - kf = kh.done; - return kh; - }, - e: function (kh) { - kg = true; - kd = kh; - }, - f: function () { - try { - kf || null == k9.return || k9.return(); - } finally { - if (kg) { - throw kd; - } - } - } - }; - } - function dG(k7, k8) { - (null == k8 || k8 > k7.length) && (k8 = k7.length); - for (var k9 = 0, kb = Array(k8); k9 < k8; k9++) { - kb[k9] = k7[k9]; - } - return kb; - } - function dH(k7) { - k7.preventDefault(); - k7.stopPropagation(); - var k8 = this.dropdowndw; - if (k8) { - var k9 = k8.rowCount(); - if (k9 > 0) { - var kb = k8.getRow(); - 1 === kb ? k8.scrollToRow(k9) : k8.scrollToRow(kb - 1); - } - } - } - function dI(k7) { - k7.stopPropagation(); - var k8 = this.dropdowndw; - if (k8) { - var k9 = k8.rowCount(); - if (k9 > 0) { - var kb = k8.getRow(); - kb === k9 ? k8.scrollToRow(1) : k8.scrollToRow(kb + 1); - } - } - } - function dJ(k7) { - k7.preventDefault(); - var k8 = this.dropdowndw; - k8 ? 0 !== k8.rowCount() && (k7.stopPropagation(), this.itemClick(k8, k8.getRow()), this.hide(), k8.setFilter(""), k8.filter()) : this.hide(); - } - function dK(k7) { - var k8 = k7.keyCode; - switch (k7.ctrlKey && k7.stopPropagation(), k8) { - case 37: - k7.stopPropagation(); - break; - case 38: - dH.call(this, k7); - break; - case 39: - k7.stopPropagation(); - break; - case 40: - dI.call(this, k7); - break; - case 13: - dJ.call(this, k7); - break; - case 27: - this.hide(); - break; - case 9: - k7.preventDefault(); - break; - default: - k7.stopPropagation(); - } - } - function dL(k7, k8, k9) { - var kb = this.dropdowndw; - kb && k8 > 0 && k8 <= kb.rowCount() && (this.itemClick(kb, k8, k9), this.hide(), kb.setFilter(""), kb.filter()); - } - Object(dc.c)("button", function (k7) { - return new dE(k7); - }); - function dM(k7, k8, k9, kb) { - var kc = k7._columns.get(k8); - return kc ? (kb && k9 && (k9 = k9.toLowerCase()), "string" === kc.type || "datetime" === kc.type ? "lower(".concat(k8, ") like '%").concat(k9, "%'") : "string(".concat(k8, ") like '%").concat(k9, "%'")) : (console.warn("".concat(k8, " not exists!")), ""); - } - var dN = function () { - return a8()(function k7(k8, k9) { - var kb = arguments.length > 2 && undefined !== arguments[2] ? arguments[2] : "300px"; - a6()(this, k7); - this.info = k8; - this.el = Object(a9.c)("div", "".concat(cx.a, "-suggest")).css({ - width: kb, - overflow: "hidden", - paddingRight: "0px", - paddingBottom: "0px" - }).hide(); - this.el.attr("tabindex", "-1"); - this.itemClick = k9; - this.itemIndex = -1; - this.dropdowndw = null; - }, [{ - key: "setOffset", - value: function (k8) { - this.el.cssRemoveKeys("top", "bottom").offset(k8); - } - }, { - key: "hide", - value: function () { - var k8 = this.el; - this.filterItems = []; - this.itemIndex = -1; - k8.hide(); - Object(bH.g)(this.inputel); - this.dropdowndw && (this.dropdowndw.off("Focus"), this.dropdowndw = null); - } - }, { - key: "setItems", - value: function (k8) { - this.items = k8; - } - }, { - key: "search", - value: function (k8) { - var k9 = this.dropdowndw; - if (null === k9) { - var kb = this.info; - var kc = kb.data; - var kd = kb.cell; - var kf = kc.report.dataStore.childDW; - if (kd && kd.edit && (this.attrs = kd.edit.attrs, "enabled" in this.attrs && (this.enabled = this.attrs.enabled)), k9 = kf.get(this.attrs.name)) { - k9.setOption({ - mode: "read", - currentRowSelected: true, - isChildDataWindow: true - }); - k9.off("Clicked"); - k9.on("Clicked", dL.bind(this)); - this.el.html("").children(k9.getTargetEl()).show(); - (function (kz, kA) { - var kB = document.createElement("div"); - var kC = kz; - kC.appendChild(kB); - kB.style.cursor = "se-resize"; - kB.style.position = "absolute"; - kB.style.height = "10px"; - kB.style.width = "10px"; - kB.style.right = "0px"; - kB.style.bottom = "0px"; - kB.style.zIndex = "99"; - kB.onmousedown = function (kD) { - var kE = kD.clientX; - var kF = kD.clientY; - var kG = kC.clientWidth; - var kH = kC.clientHeight; - document.onmousemove = function (kI) { - kI.preventDefault(); - var kJ = kG + (kI.clientX - kE); - var kK = kH + (kI.clientY - kF); - var kL = "".concat(kK > 100 ? kK : 100, "px"); - kC.style.width = "".concat(kJ > 200 ? kJ : 200, "px"); - kC.style.height = kL; - kA && (kA.style.height = kL); - }; - document.onmouseup = function (kI) { - document.onmousemove = null; - document.onmouseup = null; - }; - }; - })(this.el.el, k9.getTargetEl()); - this.dropdowndw = k9; - } - } - if (k9) { - if (/^\s*$/.test(k8)) { - k9.setFilter(""); - k9.filter(); - } else { - var kg = this.attrs; - var kh = kg.displayColumn; - var kj = kg.dataColumn; - var kk = kg.filterColumns; - var km = kk; - if (kk) { - if (0 === kk.length) { - return; - } - } else { - km = kh === kj ? [kj] : [kh, kj]; - } - var kp; - var kq = []; - var ku = dF(km); - try { - for (ku.s(); !(kp = ku.n()).done;) { - var kv = kp.value; - var kw = kv; - var kx = false; - "object" === aK()(kv) && (kw = kv.name, kx = !!kv.nocase); - var ky = dM(k9, kw, k8, kx); - ky && kq.push(ky); - } - } catch (kz) { - ku.e(kz); - } finally { - ku.f(); - } - k9.setFilter(kq.join(" or ")); - k9.filter(); - } - } - } - }, { - key: "dropShow", - value: function (k8) { - var k9 = this; - var kb = k8.el.getBoundingClientRect(); - var kc = document.documentElement.scrollTop || document.body.scrollTop; - var kd = document.documentElement.scrollLeft || document.body.scrollLeft; - var kf = kb.bottom + kc + 5; - var kg = kb.left + kd; - document.body.appendChild(this.el.el); - this.setOffset({ - left: kg, - top: kf - }); - this.el.show(); - this.inputel = k8; - this.dropdowndw && this.dropdowndw.on("Focus", function () { - k8.focus(); - }); - Object(bH.b)(k8, function () { - k9.hide(); - }, this.el); - } - }, { - key: "bindInputEvents", - value: function (k8) { - var k9 = this; - k8.on("keydown", function (kb) { - return dK.call(k9, kb); - }); - } - }, { - key: "onInputKeydown", - value: function (k8) { - dK.call(this, k8); - } - }]); - }(); - function dO(k7, k8) { - var k9 = "undefined" != typeof Symbol && k7[Symbol.iterator] || k7["@@iterator"]; - if (!k9) { - if (Array.isArray(k7) || (k9 = function (kh, kj) { - if (kh) { - if ("string" == typeof kh) { - return dP(kh, kj); - } - var kk = {}.toString.call(kh).slice(8, -1); - "Object" === kk && kh.constructor && (kk = kh.constructor.name); - return "Map" === kk || "Set" === kk ? Array.from(kh) : "Arguments" === kk || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(kk) ? dP(kh, kj) : undefined; - } - }(k7)) || k8 && k7 && "number" == typeof k7.length) { - k9 && (k7 = k9); - var kb = 0; - var kc = function () {}; - return { - s: kc, - n: function () { - return kb >= k7.length ? { - done: true - } : { - done: false, - value: k7[kb++] - }; - }, - e: function (kh) { - throw kh; - }, - f: kc - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - var kd; - var kf = true; - var kg = false; - return { - s: function () { - k9 = k9.call(k7); - }, - n: function () { - var kh = k9.next(); - kf = kh.done; - return kh; - }, - e: function (kh) { - kg = true; - kd = kh; - }, - f: function () { - try { - kf || null == k9.return || k9.return(); - } finally { - if (kg) { - throw kd; - } - } - } - }; - } - function dP(k7, k8) { - (null == k8 || k8 > k7.length) && (k8 = k7.length); - for (var k9 = 0, kb = Array(k8); k9 < k8; k9++) { - kb[k9] = k7[k9]; - } - return kb; - } - function dQ(k7, k8, k9) { - k8 = cm()(k8); - return cj()(k7, function () { - try { - var kb = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kc) {} - return function () { - return !!kb; - }(); - }() ? Reflect.construct(k8, k9 || [], cm()(k7).constructor) : k8.apply(k7, k9)); - } - var dR = {}; - var dS = function (k7) { - function k8(k9) { - var kb; - a6()(this, k8); - (kb = dQ(this, k8)).setInfo(k9); - kb.dropDownDW = null; - return kb; - } - cq()(k8, k7); - return a8()(k8, [{ - key: "render", - value: function (k9) { - var kb = this.left; - var kc = this.top; - var kd = this.width; - var kf = this.height; - var kg = this.style; - var kh = this.info; - var kj = this.attrs; - var kk = kh && kh.getValue ? kh.getValue() : ""; - kk = kk || ""; - var km = kj.displayColumn; - var kp = kj.dataColumn; - var kq = kj.name; - if (km !== kp) { - var ku = kh.data.report.dataStore; - if (ku) { - var kv = ku.childDW.get(kq); - if (kv) { - var kw; - var kx = dO(kv.coreData.primaryData); - try { - for (kx.s(); !(kw = kx.n()).done;) { - var ky = kw.value; - if ("".concat(ky.data[kp]) === kk) { - kk = ky.data[km]; - break; - } - } - } catch (kB) { - kx.e(kB); - } finally { - kx.f(); - } - } - } - } - if ("" !== kk) { - var kz = Object.assign({}, kg.font); - kz.size = Object(cG.c)(kz.size); - k9.ctx.font = kz; - var kA = new dd.b(kb, kc, kd, kf, 3); - k9.text(kk, kA, { - align: kg.align, - valign: kg.valign, - font: kz, - color: kg.color, - strike: kg.strike, - underline: kg.underline - }, false); - } - } - }, { - key: "pointerInView", - value: function (k9) { - return false; - } - }, { - key: "showEditor", - value: function (k9) { - var kb = k9.areaEl; - var kc = k9.textEl; - var kd = function (kj) { - var kk = kj.displayColumn; - var km = kj.dataColumn; - var kp = kj.name; - return "".concat(kp, "_").concat(kk, "_").concat(km); - }(this.attrs); - var kf = dR[kd]; - var kg = this.info; - var kh = this.attrs; - kf || (kf = new dN(kg), dR[kd] = kf); - kf.info = kg; - kf.itemClick = function (kj, kk) { - var km = kh.dataColumn; - if (km) { - var kp = kj.getItem(kk, km); - var kq = { - dw: kj, - row: kk, - value: kp = null == kp ? "" : "".concat(kp), - type: "dropdowndw" - }; - k9.dropDownSelected(kp, kq); - } - }; - this.dropDownDW = kf; - kb.children(kf.el); - this.search("", kc); - } - }, { - key: "setOffset", - value: function (k9) { - this.dropDownDW && this.dropDownDW.setOffset(k9); - } - }, { - key: "hideEditor", - value: function () { - this.dropDownDW && (this.dropDownDW.el.removeFromParent(), this.dropDownDW.hide()); - } - }, { - key: "contains", - value: function (k9) { - return !!this.dropDownDW && this.dropDownDW.el.contains(k9); - } - }, { - key: "keydown", - value: function (k9) { - this.dropDownDW && this.dropDownDW.onInputKeydown(k9); - } - }, { - key: "search", - value: function (k9, kb) { - this.dropDownDW && (this.dropDownDW.search(k9), kb && this.dropDownDW.dropShow(kb)); - } - }]); - }(dc.b); - function dT(k7, k8, k9) { - k8 = cm()(k8); - return cj()(k7, function () { - try { - var kb = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kc) {} - return function () { - return !!kb; - }(); - }() ? Reflect.construct(k8, k9 || [], cm()(k7).constructor) : k8.apply(k7, k9)); - } - Object(dc.c)("dropdowndw", function (k7) { - return new dS(k7); - }); - var dU = function (k7) { - function k8(k9) { - var kb; - a6()(this, k8); - (kb = dT(this, k8)).setInfo(k9); - return kb; - } - cq()(k8, k7); - return a8()(k8, [{ - key: "render", - value: function (k9) { - var kb = this.left; - var kc = this.top; - var kd = this.width; - var kf = this.height; - var kg = this.style; - var kh = this.info; - this.attrs; - var kj = kh && kh.getValue ? kh.getValue() : ""; - kj = kj || ""; - var kk = this.info; - var km = kk.data; - var kp = kk.cell; - var kq = km.report.getCellValueText(kp); - if (kq && (kj = kq), "" !== kj) { - var ku = Object.assign({}, kg.font); - ku.size = Object(cG.c)(ku.size); - k9.ctx.font = ku; - var kv = new dd.b(kb, kc, kd, kf, 3); - k9.text(kj, kv, { - align: "center", - valign: kg.valign, - font: ku, - color: kg.color, - strike: kg.strike, - underline: kg.underline - }, false); - } - } - }, { - key: "pointerInView", - value: function (k9) { - return false; - } - }, { - key: "showEditor", - value: function (k9) { - var kb = k9.suggest; - var kc = k9.textEl; - this.suggest = kb; - var kd = this.info; - kd.data; - var kf = kd.cell; - if (kf ? (this.values = null, kf.edit && kf.edit.attrs && (this.values = kf.edit.attrs.values), !this.values && kf.column && (this.values = kf.column.values)) : this.values = [], this.values) { - var kg = this.values.map(function (kh) { - return { - key: "".concat(kh.value), - title: kh.key - }; - }); - kb.setItems(kg); - kb.itemClick = function (kh) { - k9.dropDownSelected(kh.key); - }; - } - this.search("", kc); - } - }, { - key: "setOffset", - value: function (k9) { - this.suggest && this.suggest.setOffset(k9); - } - }, { - key: "hideEditor", - value: function () { - this.suggest && this.suggest.hide(); - } - }, { - key: "keydown", - value: function (k9) { - this.suggest && this.suggest.onInputKeydown(k9); - } - }, { - key: "search", - value: function (k9, kb) { - this.suggest && (this.suggest.search(k9), kb && this.suggest.dropShow(kb)); - } - }]); - }(dc.b); - Object(dc.c)("dropdownlistbox", function (k7) { - return new dU(k7); - }); - var dV = a2(87); - var dW = a2.n(dV); - function dX(k7, k8, k9) { - k8 = cm()(k8); - return cj()(k7, function () { - try { - var kb = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kc) {} - return function () { - return !!kb; - }(); - }() ? Reflect.construct(k8, k9 || [], cm()(k7).constructor) : k8.apply(k7, k9)); - } - var dY = document.createElement("canvas"); - var dZ = function (k7) { - function k8(k9) { - var kb; - a6()(this, k8); - (kb = dX(this, k8)).value = null; - kb.setInfo(k9); - return kb; - } - cq()(k8, k7); - return a8()(k8, [{ - key: "render", - value: function (k9) { - var kb = this.left; - var kc = this.top; - var kd = this.width; - var kf = this.height; - var kg = this.info; - if (kg && kg.getValue) { - var kh = kg.getValue(); - var kj = { - height: Object(dd.c)(kf - 17), - margin: 0 - }; - Object.assign(kj, this.attrs); - dW()(dY, kh, kj); - var kk = Object(dd.c)(kb) + (Object(dd.c)(kd) - dY.width) / 2; - k9.ctx.drawImage(dY, kk, Object(dd.c)(kc)); - } - } - }]); - }(dc.b); - Object(dc.c)("barcode", function (k7) { - return new dZ(k7); - }); - var e0 = a2(88); - var e1 = a2.n(e0); - function e2(k7, k8, k9) { - k8 = cm()(k8); - return cj()(k7, function () { - try { - var kb = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kc) {} - return function () { - return !!kb; - }(); - }() ? Reflect.construct(k8, k9 || [], cm()(k7).constructor) : k8.apply(k7, k9)); - } - var e3 = function (k7) { - function k8(k9) { - var kb; - a6()(this, k8); - (kb = e2(this, k8)).value = null; - kb.setInfo(k9); - return kb; - } - cq()(k8, k7); - return a8()(k8, [{ - key: "render", - value: function (k9) { - var kb = this.left; - var kc = this.top; - var kd = this.width; - var kf = this.height; - var kg = this.info; - if (kg && kg.getValue) { - var kh = kg.getValue(); - var kj = { - text: kh, - width: Object(dd.c)(kd - 1), - height: Object(dd.c)(kf), - errorCorrectionLevel: "H", - margin: 0, - quality: 0.3 - }; - Object.assign(kj, this.attrs); - var kk = document.createElement("canvas"); - e1.a.toCanvas(kk, kh, kj, function (km) { - km || k9.ctx.drawImage(kk, Object(dd.c)(kb), Object(dd.c)(kc)); - }); - } - } - }]); - }(dc.b); - function e4(k7, k8, k9) { - k8 = cm()(k8); - return cj()(k7, function () { - try { - var kb = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kc) {} - return function () { - return !!kb; - }(); - }() ? Reflect.construct(k8, k9 || [], cm()(k7).constructor) : k8.apply(k7, k9)); - } - Object(dc.c)("qrcode", function (k7) { - return new e3(k7); - }); - var e5 = function (k7) { - function k8(k9) { - var kb; - a6()(this, k8); - (kb = e4(this, k8)).setInfo(k9); - kb.bgColor = "#EFEFEF"; - k9.expanded = true; - return kb; - } - cq()(k8, k7); - return a8()(k8, [{ - key: "render", - value: function (k9) { - var kb = this.left; - var kc = this.top; - var kd = this.width; - var kf = this.height; - var kg = this.style; - var kh = this.info; - var kj = kh.rect; - var kk = kh.data; - var km = kk.report.treeData; - if (km[kj.ri]) { - var kp = km[kj.ri].node; - var kq = 20 * (kp.level - 1); - var ku = { - x: kb + kq, - y: kc, - width: 20, - height: kf - }; - kp.isLeaf || (false === kp.expanded ? k9.arrowRight(ku) : k9.arrowDown(ku)); - var kv = kh && kh.getCell ? kh.getCell() : null; - if (kv) { - kq += 20; - var kw = new dd.b(kb + kq, kc, kd - kq, kf, 3); - dc.b.drawCell(kk, k9, kv, kg, kw); - } - } - } - }, { - key: "click", - value: function () { - if (this.enabled) { - cv()(cm()(k8.prototype), "click", this).call(this); - var k9 = this.info; - var kb = k9.rect; - var kc = k9.data; - var kd = kc.report.treeData[kb.ri].node; - undefined === kd.expanded && (kd.expanded = true); - true === kd.expanded ? kc.report.expandNode(kd, false) : kc.report.expandNode(kd, true); - this.invalidate(true); - this.trigger("clicked", this); - } - } - }, { - key: "pointerInView", - value: function (k9) { - var kb = this.left; - var kc = this.top; - var kd = this.width; - var kf = this.height; - if (k9.x >= kb && k9.x <= kb + kd && k9.y >= kc && k9.y <= kc + kf) { - var kg = this.info; - var kh = kg.rect; - var kj = kg.data.report.treeData; - if (!kj || !kj[kh.ri]) { - return false; - } - var kk = kj[kh.ri].node; - if (!kk) { - return false; - } - var km = kb + 20 * (kk.level - 1); - return k9.x >= km && k9.x <= km + 20 && !kk.isLeaf; - } - return false; - } - }, { - key: "mouseenter", - value: function () { - cv()(cm()(k8.prototype), "mouseenter", this).call(this); - this.enabled && (document.body.style.cursor = "pointer"); - } - }, { - key: "mouseleave", - value: function () { - cv()(cm()(k8.prototype), "mouseleave", this).call(this); - this.enabled && (document.body.style.cursor = ""); - } - }, { - key: "isDrawBg", - value: function () { - return false; - } - }]); - }(dc.b); - function e6(k7, k8, k9) { - k8 = cm()(k8); - return cj()(k7, function () { - try { - var kb = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kc) {} - return function () { - return !!kb; - }(); - }() ? Reflect.construct(k8, k9 || [], cm()(k7).constructor) : k8.apply(k7, k9)); - } - Object(dc.c)("tree", function (k7) { - return new e5(k7); - }); - var e7 = function (k7) { - function k8(k9) { - var kb; - a6()(this, k8); - (kb = e6(this, k8)).setInfo(k9); - return kb; - } - cq()(k8, k7); - return a8()(k8, [{ - key: "render", - value: function (k9) { - this.trigger("cell-render", this, k9); - } - }, { - key: "click", - value: function () { - this.enabled && (cv()(cm()(k8.prototype), "click", this).call(this), this.trigger("clicked", this)); - } - }, { - key: "isDrawBg", - value: function () { - return false; - } - }]); - }(dc.b); - function e8(k7, k8) { - var k9 = "undefined" != typeof Symbol && k7[Symbol.iterator] || k7["@@iterator"]; - if (!k9) { - if (Array.isArray(k7) || (k9 = function (kh, kj) { - if (kh) { - if ("string" == typeof kh) { - return e9(kh, kj); - } - var kk = {}.toString.call(kh).slice(8, -1); - "Object" === kk && kh.constructor && (kk = kh.constructor.name); - return "Map" === kk || "Set" === kk ? Array.from(kh) : "Arguments" === kk || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(kk) ? e9(kh, kj) : undefined; - } - }(k7)) || k8 && k7 && "number" == typeof k7.length) { - k9 && (k7 = k9); - var kb = 0; - var kc = function () {}; - return { - s: kc, - n: function () { - return kb >= k7.length ? { - done: true - } : { - done: false, - value: k7[kb++] - }; - }, - e: function (kh) { - throw kh; - }, - f: kc - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - var kd; - var kf = true; - var kg = false; - return { - s: function () { - k9 = k9.call(k7); - }, - n: function () { - var kh = k9.next(); - kf = kh.done; - return kh; - }, - e: function (kh) { - kg = true; - kd = kh; - }, - f: function () { - try { - kf || null == k9.return || k9.return(); - } finally { - if (kg) { - throw kd; - } - } - } - }; - } - function e9(k7, k8) { - (null == k8 || k8 > k7.length) && (k8 = k7.length); - for (var k9 = 0, kb = Array(k8); k9 < k8; k9++) { - kb[k9] = k7[k9]; - } - return kb; - } - Object(dc.c)("paint", function (k7) { - return new e7(k7); - }); - var eb = function () { - return a8()(function k7() { - a6()(this, k7); - this.filters = []; - }, [{ - key: "getFilter", - value: function (k8) { - var k9 = this.filters.find(function (kb) { - return kb.column === k8; - }); - return k9 ? k9.filter : null; - } - }, { - key: "removeFilter", - value: function (k8) { - this.filters = this.filters.filter(function (k9) { - return k9.column !== k8; - }); - } - }, { - key: "addFilter", - value: function (k8, k9) { - var kb = this.filters.find(function (kc) { - return kc.column === k8; - }); - kb ? kb.filter = k9 : this.filters.push({ - column: k8, - filter: k9 - }); - } - }, { - key: "getFilterCondition", - value: function (k8, k9) { - var kb = []; - undefined === k8 && (k8 = this.filters.length); - for (var kc = 0; kc < k8; kc++) { - var kd; - var kf = this.filters[kc]; - var kg = kf.column; - var kh = k9._columns.get(kg); - var kj = []; - var kk = e8(kf.filter); - try { - for (kk.s(); !(kd = kk.n()).done;) { - var km = kd.value; - null == km ? kj.push("null") : "string" === kh.type || "datetime" === kh.type ? kj.push("'".concat(km, "'")) : kj.push(km); - } - } catch (kp) { - kk.e(kp); - } finally { - kk.f(); - } - kb.push("".concat(kg, " in (").concat(kj.join(","), ")")); - } - k9.userFilter && kb.push("(".concat(k9.userFilter, ")")); - return kb.join(" and "); - } - }, { - key: "getFilterData", - value: function (k8, k9) { - var kb = this.filters.findIndex(function (kj) { - return kj.column === k8; - }); - if (kb < 0) { - var kc = k9.coreData.primaryData.map(function (kj) { - return kj.data[k8]; - }); - return ac()(new Set(kc)); - } - var kd = [].concat(ac()(k9.coreData.primaryData), ac()(k9.coreData.filterData)); - var kf = []; - var kg = this.getFilterCondition(kb, k9); - if ("" !== kg) { - var kh = new Formula(kg); - kd.forEach(function (kj) { - kh.evaluate(kj.data) && kf.push(kj.data[k8]); - }); - } else { - kf = kd.map(function (kj) { - return kj.data[k8]; - }); - } - return ac()(new Set(kf)); - } - }, { - key: "setFilter", - value: function (k8) { - var k9 = this.getFilterCondition(undefined, k8); - k8.setFilter(k9, true); - k8.filter(true); - } - }]); - }(); - function ec(k7) { - var k8 = k7 && k7.w + "px" || "100%"; - var k9 = k7 && k7.h + "px" || "100%"; - this.itemHeight = k7.itemHeight; - var kb = this.itemHeight; - this.items = k7.items; - this.generatorFn = k7.generatorFn; - this.totalRows = 0; - k7.items && k7.items.length ? this.totalRows = k7.items.length : undefined !== k7.totalRows && (this.totalRows = k7.totalRows); - this.itemClass = k7.itemClass; - var kc = ec.createScroller(kb * this.totalRows); - this.container = ec.createContainer(k8, k9); - this.container.appendChild(kc); - var kd = Math.ceil(k7.h / kb); - this.cachedItemsLen = 3 * kd; - this._renderChunk(this.container, 0); - var kf; - var kg = this; - var kh = kd * kb; - var kj = 0; - kg.scroller = kc; - kg.itemHeight = kb; - kg.screenItemsLen = kd; - kg.firstIndex = 0; - this.rmNodeInterval = setInterval(function () { - if (Date.now() - kj > 100) { - for (var kk = kg.container.querySelectorAll("[data-rm=\"1\"]"), km = 0, kp = kk.length; km < kp; km++) { - kg.container.removeChild(kk[km]); - } - } - }, 150); - this.container.addEventListener("scroll", function (kk) { - var km = kk.target.scrollTop; - if (!kf || Math.abs(km - kf) > kh) { - var kp = parseInt(km / kb) - kd; - kp < 0 && (kp = 0); - kg.firstIndex = kp; - kg._renderChunk(kg.container, kp); - kf = km; - } - kj = Date.now(); - kk.preventDefault && kk.preventDefault(); - }); - } - ec.prototype.refresh = function () { - this.items && (this.totalRows = this.items.length); - this.scroller.style.height = this.itemHeight * this.totalRows + "px"; - this._renderChunk(this.container, this.firstIndex); - }; - ec.prototype.createRow = function (k7) { - var k8; - if (this.generatorFn) { - k8 = this.generatorFn(k7); - } else { - if (this.items) { - if ("string" == typeof this.items[k7]) { - var k9 = document.createTextNode(this.items[k7]); - (k8 = document.createElement("div")).style.height = this.itemHeight + "px"; - k8.appendChild(k9); - } else { - k8 = this.items[k7]; - } - } - } - this.itemClass ? k8.classList.add(this.itemClass) : k8.classList.add("vrow"); - k8.style.position = "absolute"; - k8.style.top = k7 * this.itemHeight + "px"; - k8.style.height = this.itemHeight + "px"; - return k8; - }; - ec.prototype._renderChunk = function (k7, k8) { - var k9 = k8 + this.cachedItemsLen; - k9 > this.totalRows && (k9 = this.totalRows); - for (var kb = document.createDocumentFragment(), kc = k8; kc < k9; kc++) { - kb.appendChild(this.createRow(kc)); - } - for (var kd = 1, kf = k7.childNodes.length; kd < kf; kd++) { - k7.childNodes[kd].style.display = "none"; - k7.childNodes[kd].setAttribute("data-rm", "1"); - } - k7.appendChild(kb); - }; - ec.createContainer = function (k7, k8) { - var k9 = document.createElement("div"); - k9.style.width = k7; - k9.style.height = k8; - k9.style.overflow = "auto"; - k9.style.position = "relative"; - k9.style.padding = 0; - return k9; - }; - ec.createScroller = function (k7) { - var k8 = document.createElement("div"); - k8.style.opacity = 0; - k8.style.position = "absolute"; - k8.style.top = 0; - k8.style.left = 0; - k8.style.width = "1px"; - k8.style.height = k7 + "px"; - return k8; - }; - var ed = ec; - var ef = a2(52); - var eg = a2.n(ef); - var eh = eg()(function (k7, k8, k9) { - var kb = k8.filter(function (kc, kd) { - if ("" === k9) { - return true; - } - if (0 === kd) { - return true; - } - var kf = aK()(kc.text); - return "number" === kf ? 0 == "".concat(kc.text).indexOf(k9) : "string" === kf && kc.text.indexOf(k9) >= 0; - }); - k7.items = kb; - k7.refresh(); - }, 300); - var ej = function () { - return a8()(function k7() { - var k8 = this; - a6()(this, k7); - this.items = []; - var k9 = this.items; - this.list = new ed({ - items: k9, - h: 200, - itemHeight: 25, - totalRows: k9.length, - itemClass: "".concat(cx.a, "-filter-item"), - generatorFn: function (kg) { - var kh = kb.items; - var kj = document.createElement("div"); - var kk = kh[kg].text; - var km = null == kk ? "(null)" : kk; - kj.innerHTML = "").concat(km, ""); - kj.addEventListener("change", function (kp) { - 0 === kg ? kp.target.checked ? (kh.forEach(function (kq) { - return kq.checked = true; - }), kb.refresh()) : (kh.forEach(function (kq) { - return kq.checked = false; - }), kb.refresh()) : (kh[kg].checked = kp.target.checked, kp.target.checked || (false !== kh[0].checked && (kh[0].checked = false), kb.refresh())); - }); - return kj; - } - }); - var kb = this.list; - this.el = Object(a9.c)("div", "".concat(cx.a, "-sort-filter")).css("width", "220px"); - var kc = this.el; - this.input = Object(a9.c)("input", "bl-input__inner").on("input", function (kg) { - kg.preventDefault(); - k8.filter(kg.target.value); - }).on("keydown.stop", function () {}); - var kd = this.input; - var kf = Object(a9.c)("div", "".concat(cx.a, "-header-filter")).children(Object(a9.c)("div", "bl-input").children(kd, Object(a9.c)("span", "").html("\n \n \n \n ")).css("margin-bottom", "5px"), Object(a9.c)("div", "".concat(cx.a, "-filter-data")).css("height", "200px").children(this.list.container), Object(a9.c)("div", "".concat(cx.a, "-filter-hpane")).children(Object(a9.c)("button", "bl-button bl-button--primary").html("确认").on("click", function () { - k8.ok(); - }), Object(a9.c)("button", "bl-button").html("取消").css("margin-left", "10px").on("click", function () { - k8.cancel(); - }))).css("cursor", "default").on("mousewheel.stop", function (kg) {}); - kc.child(kf); - }, [{ - key: "filter", - value: function (k8) { - eh(this.list, this.items, k8); - } - }, { - key: "init", - value: function (k8, k9, kb) { - this.column = k8; - this.ds = k9; - this.filterManager = kb; - var kc = this.items; - kc.length = 0; - this.input.val(""); - var kd = kb.getFilterData(k8, k9); - var kf = kb.getFilter(k8); - kc.push({ - text: "全选/反选", - checked: !kf - }); - kd.forEach(function (kg) { - if (kf) { - var kh = kf.has(kg); - kc.push({ - checked: kh, - text: kg - }); - } else { - kc.push({ - text: kg, - checked: true - }); - } - }); - this.list.items = kc; - this.list.firstIndex = 0; - this.list.refresh(); - } - }, { - key: "ok", - value: function () { - var k8 = this.filterManager; - var k9 = this.items; - var kb = new Set(); - var kc = 0; - this.list.items.forEach(function (kd, kf) { - kf > 0 && kd.checked && (kc++, kb.add(kd.text)); - }); - kc === k9.length - 1 ? k8.removeFilter(this.column) : k8.addFilter(this.column, kb); - this.hide(); - k8.setFilter(this.ds); - } - }, { - key: "cancel", - value: function () { - this.hide(); - } - }, { - key: "show", - value: function (k8) { - var k9 = this; - var kb = k8.el.getBoundingClientRect(); - var kc = document.documentElement.scrollTop || document.body.scrollTop; - var kd = document.documentElement.scrollLeft || document.body.scrollLeft; - var kf = kb.bottom + kc + 5; - var kg = kb.left + kd; - document.body.appendChild(this.el.el); - this.setOffset({ - left: kg, - top: kf - }); - this.el.show(); - Object(bH.g)(this.el); - Object(bH.b)(this.el, function () { - k9.hide(); - }, k8); - } - }, { - key: "hide", - value: function () { - Object(bH.g)(this.el); - this.el.hide(); - } - }, { - key: "setOffset", - value: function (k8) { - this.el.cssRemoveKeys("top", "bottom").offset(k8); - } - }]); - }(); - function ek(k7, k8) { - var k9 = "undefined" != typeof Symbol && k7[Symbol.iterator] || k7["@@iterator"]; - if (!k9) { - if (Array.isArray(k7) || (k9 = function (kh, kj) { - if (kh) { - if ("string" == typeof kh) { - return em(kh, kj); - } - var kk = {}.toString.call(kh).slice(8, -1); - "Object" === kk && kh.constructor && (kk = kh.constructor.name); - return "Map" === kk || "Set" === kk ? Array.from(kh) : "Arguments" === kk || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(kk) ? em(kh, kj) : undefined; - } - }(k7)) || k8 && k7 && "number" == typeof k7.length) { - k9 && (k7 = k9); - var kb = 0; - var kc = function () {}; - return { - s: kc, - n: function () { - return kb >= k7.length ? { - done: true - } : { - done: false, - value: k7[kb++] - }; - }, - e: function (kh) { - throw kh; - }, - f: kc - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - var kd; - var kf = true; - var kg = false; - return { - s: function () { - k9 = k9.call(k7); - }, - n: function () { - var kh = k9.next(); - kf = kh.done; - return kh; - }, - e: function (kh) { - kg = true; - kd = kh; - }, - f: function () { - try { - kf || null == k9.return || k9.return(); - } finally { - if (kg) { - throw kd; - } - } - } - }; - } - function em(k7, k8) { - (null == k8 || k8 > k7.length) && (k8 = k7.length); - for (var k9 = 0, kb = Array(k8); k9 < k8; k9++) { - kb[k9] = k7[k9]; - } - return kb; - } - var ep = function () { - return a8()(function k7() { - a6()(this, k7); - this.sorts = []; - }, [{ - key: "getSort", - value: function (k8) { - var k9 = this.sorts.find(function (kb) { - return kb.column === k8; - }); - return k9 ? k9.sort : null; - } - }, { - key: "removeSort", - value: function (k8) { - this.sorts = this.sorts.filter(function (k9) { - return k9.column !== k8; - }); - } - }, { - key: "addSort", - value: function (k8, k9) { - this.sorts = [{ - column: k8, - sort: k9 - }]; - } - }, { - key: "sort", - value: function (k8) { - var k9; - var kb = []; - var kc = ek(this.sorts); - try { - for (kc.s(); !(k9 = kc.n()).done;) { - var kd = k9.value; - kb.unshift("".concat(kd.column, " ").concat(kd.sort)); - } - } catch (kf) { - kc.e(kf); - } finally { - kc.f(); - } - k8.setSort(kb.join(",")); - k8.sort(); - } - }]); - }(); - function eq(k7, k8, k9) { - k8 = cm()(k8); - return cj()(k7, function () { - try { - var kb = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kc) {} - return function () { - return !!kb; - }(); - }() ? Reflect.construct(k8, k9 || [], cm()(k7).constructor) : k8.apply(k7, k9)); - } - var eu = null; - var ev = "\n \n"; - var ew = "\n \n"; - var ex = null; - var ey = -1; - var ez = null; - var eA = null; - var eB = function (k7) { - function k8(k9) { - var kb; - a6()(this, k8); - (kb = eq(this, k8)).setInfo(k9); - return kb; - } - cq()(k8, k7); - return a8()(k8, [{ - key: "setInfo", - value: function (k9) { - var kb = this; - cv()(cm()(k8.prototype), "setInfo", this).call(this, k9); - this.attrs && (this.column = this.attrs.column ? this.attrs.column : "", this.sortable = false !== this.attrs.sortable, this.filterable = false !== this.attrs.filterable, this.dragGroup = undefined === this.attrs.draggroup ? -1 : this.attrs.draggroup, "" === this.column && (this.sortable = false, this.filterable = false)); - var kc = k9.data.report.dataStore; - k9.data.report._filter || (k9.data.report._filter = new eb()); - var kd = k9.data.report._filter; - if (this.filterable && (this.elicon = Object(a9.c)("div", "".concat(cx.a, "-icon")).html("\n \n \n ").css("position", "absolute").css("pointerEvents", "auto").css("cursor", "pointer").on("click", function () { - console.log("icon clicked"); - eu || (eu = new ej()); - eu.init(kb.column, kc, kd); - eu.show(kb.elicon); - }).on("mousedown.stop", function () {})), k9.data.report._sorter || (k9.data.report._sorter = new ep()), this.sortable) { - var kf = k9.data.report._sorter.getSort(this.column); - this.sortIcon = Object(a9.c)("div", "".concat(cx.a, "-icon")).css("position", "absolute").css("pointerEvents", "none"); - null === kf ? (this.sortflag = "", this.sortIcon.html("")) : "a" === kf ? (this.sortflag = "a", this.sortIcon.html(ev)) : (this.sortflag = "d", this.sortIcon.html(ew)); - } - this.dragGroup >= 0 && (ex || (ex = Object(a9.c)("div", "".concat(cx.a, "-drag-image")).css({ - position: "absolute", - width: "100px", - color: "white", - height: "20px", - display: "hide", - top: "-100px", - "justify-content": "center", - "align-items": "center" - })), eA || (eA = Object(a9.c)("div", "".concat(cx.a, "-drag-line")).css({ - position: "absolute", - width: "0px", - height: "0px", - "border-left": "2px dashed #4b89ff", - display: "hide" - })), this.dragDiv = Object(a9.c)("div", "".concat(cx.a, "-drag-div")).css({ - position: "absolute" - }).attr("draggable", true).on("dragstart", function (kg) { - kb.width > 200 || kb.width; - document.body.appendChild(ex.el); - ex.css({ - width: "".concat(kb.width, "px"), - height: "".concat(kb.height, "px"), - background: "rgba(75, 137, 255, 0.25)" - }); - ex.html(kb.text); - ex.show(true); - kg.dataTransfer.setDragImage(ex.el, 0, 0); - kg.dataTransfer.setData("application/json", JSON.stringify({ - rect: k9.rect, - dragGroup: kb.dragGroup - })); - ey = kb.dragGroup; - ez = k9.rect; - }).on("dragover", function (kg) { - if (ey === kg.target.dragGroup && kg.target.info.rect !== ez) { - kg.preventDefault(); - var kh = ez.ci; - var kj = kg.target.info.rect; - var kk = kj.ci; - var km = kj.left; - var kp = kj.top; - var kq = kj.width; - var ku = kj.height; - kb.dragDiv.parent().child(eA); - kh > kk ? eA.offset({ - left: km, - top: kp, - height: ku - }) : eA.offset({ - left: km + kq, - top: kp, - height: ku - }); - eA.show(); - } else { - eA.hide(); - } - }).on("drop", function (kg) { - var kh = kg.dataTransfer.getData("application/json"); - if (kh) { - var kj = (kh = (kh = JSON.parse(kh)).rect).ci; - var kk = kj; - kh.m && (kj = [kh.m.sci, kh.m.eci], kk = kh.m.eci); - var km = kg.target.info.rect; - var kp = km.ci; - var kq = kp; - if (kk < kp && (km.m && (kq = km.m.eci), kp = kq + 1), kk + 1 !== kp) { - var ku = kg.target.info.data; - ku.report.setCalc(false); - ku.moveColumn(kj, kp, kh.ri); - ku.report.setCalc(true); - kg.target.info.render(true); - } - } - }).on("dragend", function (kg) { - ex.hide(); - ex.removeFromParent(); - eA.hide(); - eA.removeFromParent(); - ey = -1; - ez = null; - }), this.dragDiv.el.info = k9, this.dragDiv.el.dragGroup = this.dragGroup); - } - }, { - key: "render", - value: function (k9) { - var kb = this.info; - if (kb && kb.getValue && (this.text = kb.getValue()), cv()(cm()(k8.prototype), "render", this).call(this, k9), this.filterable) { - var kc = kb.data.report._filter; - if (kc) { - kc.getFilter(this.column) && this.elicon.css("color", "#409eff"); - } - } - } - }, { - key: "mouseenter", - value: function () { - this.sortable && (document.body.style.cursor = "pointer"); - } - }, { - key: "mouseleave", - value: function () { - this.sortable && (document.body.style.cursor = ""); - } - }, { - key: "click", - value: function () { - if (this.sortable) { - var k9 = this.info.data.report; - var kb = k9._sorter; - var kc = kb.getSort(this.column); - null === kc ? (kb.addSort(this.column, "a"), this.sortIcon.html(ev)) : "a" === kc ? (kb.addSort(this.column, "d"), this.sortIcon.html(ew)) : (kb.removeSort(this.column), this.sortIcon.html("")); - var kd = k9.dataStore; - kb.sort(kd); - } - } - }, { - key: "attach", - value: function (k9, kb) { - var kc = kb.left; - var kd = kb.top; - var kf = kb.width; - var kg = kb.height; - this.dragGroup >= 0 && (k9.child(this.dragDiv), this.dragDiv.offset(kb)); - this.filterable && kf > 24 && (k9.child(this.elicon), this.elicon.offset({ - top: kd + (kg - 20) / 2, - left: kc + kf - 24, - width: 20 - })); - this.sortable && kf > 58 && (k9.child(this.sortIcon), this.sortIcon.offset({ - top: kd + (kg - 20) / 2, - left: kc + 3, - width: 20 - })); - } - }, { - key: "detach", - value: function () { - this.dragable && this.dragDiv.removeFromParent(); - this.filterable && this.elicon.removeFromParent(); - this.sortIcon && this.sortIcon.removeFromParent(); - } - }]); - }(dc.b); - function eC(k7, k8) { - var k9 = "undefined" != typeof Symbol && k7[Symbol.iterator] || k7["@@iterator"]; - if (!k9) { - if (Array.isArray(k7) || (k9 = function (kh, kj) { - if (kh) { - if ("string" == typeof kh) { - return eD(kh, kj); - } - var kk = {}.toString.call(kh).slice(8, -1); - "Object" === kk && kh.constructor && (kk = kh.constructor.name); - return "Map" === kk || "Set" === kk ? Array.from(kh) : "Arguments" === kk || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(kk) ? eD(kh, kj) : undefined; - } - }(k7)) || k8 && k7 && "number" == typeof k7.length) { - k9 && (k7 = k9); - var kb = 0; - var kc = function () {}; - return { - s: kc, - n: function () { - return kb >= k7.length ? { - done: true - } : { - done: false, - value: k7[kb++] - }; - }, - e: function (kh) { - throw kh; - }, - f: kc - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - var kd; - var kf = true; - var kg = false; - return { - s: function () { - k9 = k9.call(k7); - }, - n: function () { - var kh = k9.next(); - kf = kh.done; - return kh; - }, - e: function (kh) { - kg = true; - kd = kh; - }, - f: function () { - try { - kf || null == k9.return || k9.return(); - } finally { - if (kg) { - throw kd; - } - } - } - }; - } - function eD(k7, k8) { - (null == k8 || k8 > k7.length) && (k8 = k7.length); - for (var k9 = 0, kb = Array(k8); k9 < k8; k9++) { - kb[k9] = k7[k9]; - } - return kb; - } - Object(dc.c)("columnheader", function (k7) { - return new eB(k7); - }); - var eE = "checkbox"; - var eF = function () { - return a8()(function k7() { - a6()(this, k7); - this.mAttahedView = new Map(); - this.mCachedView = new Map(); - this.mMaxCached = 30; - this.mLastMouseView = null; - this.viewClicked = null; - this.cellRender = null; - this.cellRender = null; - this.dddws = new Map(); - }, [{ - key: "getView", - value: function (k8) { - return this.mAttahedView.has(k8) ? this.mAttahedView.get(k8) : null; - } - }, { - key: "getViewByRowCol", - value: function (k8, k9) { - var kb = "".concat(k8, "_").concat(k9); - return this.getView(kb); - } - }, { - key: "getOrCreateView", - value: function (k8) { - var k9 = arguments.length > 1 && undefined !== arguments[1] ? arguments[1] : eE; - var kb = arguments.length > 2 && undefined !== arguments[2] ? arguments[2] : null; - var kc = null; - if (this.mAttahedView.has(k8)) { - (kc = this.mAttahedView.get(k8)).setInfo && kc.setInfo(kb); - return kc; - } - var kd = this.mCachedView.get(k9); - kd && kd.length > 0 ? (kc = kd.pop()).setInfo && kc.setInfo(kb) : kc = this.createView(k9, kb); - return kc; - } - }, { - key: "removeView", - value: function (k8) { - var k9 = this.mAttahedView.get(k8); - if (k9) { - this.mAttahedView.delete(k8); - k9.detach && k9.detach(); - k9 instanceof a9.a && k9.removeFromParent(); - var kb = k9.viewData.viewType; - if (undefined !== kb) { - var kc = this.mCachedView.get(kb); - kc || (kc = [], this.mCachedView.set(kb, kc)); - this.mMaxCached > kc.length && kc.push(k9); - } - } - } - }, { - key: "createView", - value: function (k8) { - for (var k9 = arguments.length, kb = new Array(k9 > 1 ? k9 - 1 : 0), kc = 1; kc < k9; kc++) { - kb[kc - 1] = arguments[kc]; - } - var kd = [k8].concat(kb); - var kf = dc.a.apply(this, kd); - kf && (kf.viewData = { - viewType: k8 - }); - return kf; - } - }, { - key: "clearViews", - value: function () { - var k8; - var k9 = eC(this.mAttahedView.keys()); - try { - for (k9.s(); !(k8 = k9.n()).done;) { - var kb = k8.value; - this.removeView(kb); - } - } catch (kc) { - k9.e(kc); - } finally { - k9.f(); - } - } - }, { - key: "resetViews", - value: function (k8, k9, kb, kc) { - var kd; - var kf = this; - var kg = arguments.length > 4 && undefined !== arguments[4] ? arguments[4] : null; - var kh = this.mAttahedView.keys(); - var kj = eC(kh); - try { - for (kj.s(); !(kd = kj.n()).done;) { - var kk = kd.value; - this.removeView(kk); - } - } catch (kG) { - kj.e(kG); - } finally { - kj.f(); - } - if (kb.report.calc) { - this.targertView = k9; - var km; - var kp = k8.keys(); - var kq = eC(kp); - try { - for (kq.s(); !(km = kq.n()).done;) { - var ku = km.value; - var kv = k8.get(ku); - var kw = kv.cell; - var kx = kv.rect; - kv.data = kb; - kv.render = kg; - var ky = kx.ri; - var kz = kx.ci; - kw.layout && kc && kc.trigger("cell-layout", { - ri: ky, - ci: kz, - parent: k9, - info: kv - }); - var kA = this.getOrCreateView(ku, kw.edit.style, kv); - if (kA) { - this.mAttahedView.set(ku, kA); - kA instanceof a9.a && k9 && k9.child(kA); - var kB = kx.left; - var kC = kx.top; - var kD = kx.width; - var kE = kx.height; - var kF = { - left: kB, - top: kC, - width: kD, - height: kE - }; - kA.attach && k9 && kA.attach(k9, kF); - kA instanceof a9.a ? (kA.el.celldata = { - ri: ky, - ci: kz - }, kx ? (kA.show(true), kA.offset(kF)) : kA.hide()) : (kA.offset(kx), kA.removeAllListeners(), this.viewClicked && kA.on("clicked", function (kH) { - kf.viewClicked(kH); - }, this), this.cellRender && kA.on("cell-render", function (kH, kI) { - kf.cellRender(kH, kI); - }, this)); - } - } - } catch (kH) { - kq.e(kH); - } finally { - kq.f(); - } - } - } - }, { - key: "mousemove", - value: function (k8) { - var k9; - var kb = eC(this.mAttahedView.values()); - try { - for (kb.s(); !(k9 = kb.n()).done;) { - var kc = k9.value; - if (kc.pointerInView && kc.pointerInView(Object(a9.b)(this.targertView.el, k8))) { - this.mLastMouseView !== kc && (this.mLastMouseView && (this.mLastMouseView.mouseleave(), this.mLastMouseView = null), kc.mouseenter(k8), this.mLastMouseView = kc); - kc.mousemove(k8); - return true; - } - } - } catch (kd) { - kb.e(kd); - } finally { - kb.f(); - } - this.mLastMouseView && (this.mLastMouseView.mouseleave(), this.mLastMouseView = null); - return false; - } - }]); - }(); - function eG(k7, k8) { - var k9 = "undefined" != typeof Symbol && k7[Symbol.iterator] || k7["@@iterator"]; - if (!k9) { - if (Array.isArray(k7) || (k9 = function (kh, kj) { - if (kh) { - if ("string" == typeof kh) { - return eH(kh, kj); - } - var kk = {}.toString.call(kh).slice(8, -1); - "Object" === kk && kh.constructor && (kk = kh.constructor.name); - return "Map" === kk || "Set" === kk ? Array.from(kh) : "Arguments" === kk || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(kk) ? eH(kh, kj) : undefined; - } - }(k7)) || k8 && k7 && "number" == typeof k7.length) { - k9 && (k7 = k9); - var kb = 0; - var kc = function () {}; - return { - s: kc, - n: function () { - return kb >= k7.length ? { - done: true - } : { - done: false, - value: k7[kb++] - }; - }, - e: function (kh) { - throw kh; - }, - f: kc - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - var kd; - var kf = true; - var kg = false; - return { - s: function () { - k9 = k9.call(k7); - }, - n: function () { - var kh = k9.next(); - kf = kh.done; - return kh; - }, - e: function (kh) { - kg = true; - kd = kh; - }, - f: function () { - try { - kf || null == k9.return || k9.return(); - } finally { - if (kg) { - throw kd; - } - } - } - }; - } - function eH(k7, k8) { - (null == k8 || k8 > k7.length) && (k8 = k7.length); - for (var k9 = 0, kb = Array(k8); k9 < k8; k9++) { - kb[k9] = k7[k9]; - } - return kb; - } - var eI = { - mode: "edit", - view: { - height: function () { - return document.documentElement.clientHeight; - }, - width: function () { - return document.documentElement.clientWidth; - } - }, - showGrid: true, - showToolbar: true, - showContextmenu: true, - showBottombar: true, - showFixedRowHeader: true, - showFixedColHeader: true, - currentRowSelected: false, - selectedRowColor: "#e6f7ff", - isChildDataWindow: false, - showSelector: false, - onlyShowCurrentRow: false, - showHScrollBar: true, - showVScrollBar: true, - row: { - len: 100, - height: 25, - minHeight: 5 - }, - col: { - len: 26, - width: 100, - indexWidth: 60, - minWidth: 5 - }, - style: { - bgcolor: null, - align: "left", - valign: "middle", - textwrap: false, - strike: false, - underline: false, - color: "#0a0a0a", - font: { - name: "Arial", - size: 10, - bold: false, - italic: false - }, - format: "normal" - } - }; - function eJ(k7, k8) { - var k9 = arguments.length > 2 && undefined !== arguments[2] ? arguments[2] : function () {}; - var kb = this.merges; - var kc = k8.clone(); - var kd = k7.size(); - var kf = a4()(kd, 2); - var kg = kf[0]; - var kh = kf[1]; - var kj = k8.size(); - var kk = a4()(kj, 2); - var km = kk[0]; - var kp = kk[1]; - kg > km && (kc.eri = k8.sri + kg - 1); - kh > kp && (kc.eci = k8.sci + kh - 1); - return !kb.intersects(kc) || (k9(Object(aB.b)("error.pasteForMergedCell")), false); - } - function eK(k7, k8, k9) { - var kb = arguments.length > 3 && undefined !== arguments[3] && arguments[3]; - var kc = this.rows; - var kd = this.merges; - "all" !== k9 && "format" !== k9 || (kc.deleteCells(k8, k9), kd.deleteWithin(k8)); - kc.copyPaste(k7, k8, k9, kb, function (kf, kg, kh) { - if (kh && kh.merge) { - var kj = a4()(kh.merge, 2); - var kk = kj[0]; - var km = kj[1]; - if (kk <= 0 && km <= 0) { - return; - } - kd.add(new af(kf, kg, kf + kk, kg + km)); - } - }); - } - function eL(k7, k8) { - var k9 = this.clipboard; - var kb = this.rows; - var kc = this.merges; - kb.cutPaste(k7, k8); - kc.move(k7, k8.sri - k7.sri, k8.sci - k7.sci); - k9.clear(); - } - function eM(k7, k8, k9) { - var kb = this.styles; - var kc = this.rows.getCellOrNew(k7, k8); - var kd = {}; - undefined !== kc.style && (kd = aw.a.cloneDeep(kb[kc.style])); - kd = aw.a.merge(kd, { - border: k9 - }); - kc.style = this.addStyle(kd); - } - function eN(k7) { - var k8 = this; - var k9 = k7.mode; - var kb = k7.style; - var kc = k7.color; - var kd = this.styles; - var kf = this.selector; - var kg = this.rows; - var kh = kf.range; - var kj = kh.sri; - var kk = kh.sci; - var km = kh.eri; - var kp = kh.eci; - var kq = !this.isSingleSelected(); - if (kq || "inside" !== k9 && "horizontal" !== k9 && "vertical" !== k9) { - if ("outside" !== k9 || kq) { - if ("none" === k9) { - kf.range.each(function (kO, kP) { - var kQ = kg.getCell(kO, kP); - if (kQ && undefined !== kQ.style) { - var kR = aw.a.cloneDeep(kd[kQ.style]); - delete kR.border; - kQ.style = k8.addStyle(kR); - } - }); - } else { - if ("all" === k9 || "inside" === k9 || "outside" === k9 || "horizontal" === k9 || "vertical" === k9) { - for (var ku = [], kv = kj; kv <= km; kv += 1) { - for (var kw = kk; kw <= kp; kw += 1) { - for (var kx = [], ky = 0; ky < ku.length; ky += 1) { - var kz = a4()(ku[ky], 4); - var kA = kz[0]; - var kB = kz[1]; - var kC = kz[2]; - var kD = kz[3]; - if (kv === kA + kC + 1 && kx.push(ky), kA <= kv && kv <= kA + kC && kw === kB) { - kw += kD + 1; - break; - } - } - if (kx.forEach(function (kO) { - return ku.splice(kO, 1); - }), kw > kp) { - break; - } - var kE = kg.getCell(kv, kw); - var kF = 0; - var kG = 0; - if (kE && kE.merge) { - var kH = a4()(kE.merge, 2); - kF = kH[0]; - kG = kH[1]; - ku.push([kv, kw, kF, kG]); - } - var kI = kF > 0 && kv + kF === km; - var kJ = kG > 0 && kw + kG === kp; - var kK = {}; - "all" === k9 ? kK = { - bottom: [kb, kc], - top: [kb, kc], - left: [kb, kc], - right: [kb, kc] - } : "inside" === k9 ? (!kJ && kw < kp && (kK.right = [kb, kc]), !kI && kv < km && (kK.bottom = [kb, kc])) : "horizontal" === k9 ? !kI && kv < km && (kK.bottom = [kb, kc]) : "vertical" === k9 ? !kJ && kw < kp && (kK.right = [kb, kc]) : "outside" === k9 && kq && (kj === kv && (kK.top = [kb, kc]), (kI || km === kv) && (kK.bottom = [kb, kc]), kk === kw && (kK.left = [kb, kc]), (kJ || kp === kw) && (kK.right = [kb, kc])); - Object.keys(kK).length > 0 && eM.call(this, kv, kw, kK); - kw += kG; - } - } - } else { - if ("top" === k9 || "bottom" === k9) { - for (var kL = kk; kL <= kp; kL += 1) { - "top" === k9 && (eM.call(this, kj, kL, { - top: [kb, kc] - }), kL += kg.getCellMerge(kj, kL)[1]); - "bottom" === k9 && (eM.call(this, km, kL, { - bottom: [kb, kc] - }), kL += kg.getCellMerge(km, kL)[1]); - } - } else { - if ("left" === k9 || "right" === k9) { - for (var kM = kj; kM <= km; kM += 1) { - if ("left" === k9 && (eM.call(this, kM, kk, { - left: [kb, kc] - }), kM += kg.getCellMerge(kM, kk)[0]), "right" === k9) { - var kN = this.cellView.cellRect(kM, kp); - kN && kN.m ? eM.call(this, kM, kN.m.sci, { - right: [kb, kc] - }) : eM.call(this, kM, kp, { - right: [kb, kc] - }); - kM += kg.getCellMerge(kM, kk)[0]; - } - } - } - } - } - } - } else { - eM.call(this, kj, kk, { - top: [kb, kc], - bottom: [kb, kc], - left: [kb, kc], - right: [kb, kc] - }); - } - } - } - function eO(k7, k8, k9) { - var kb = k8.match(/[A-Z]/); - if (kb) { - var kc = k8.substring(0, kb.index); - var kd = k8.substring(kb.index).toLowerCase(); - k7[kc][kd] = k9; - } else { - k7[k8] = k9; - } - } - function eP(k7, k8) { - this.rows; - this.scroll; - return this.cellView.getCellRowByY(k7, k8); - } - function eQ(k7, k8) { - return this.cellView.getCellColByX(k7, k8); - } - var eR = function () { - return a8()(function k7(k8, k9) { - a6()(this, k7); - this.settings = aw.a.merge(eI, k9 || {}); - this.name = k8 || "sheet"; - this.freeze = [0, 0]; - this.styles = []; - this.merges = new av(); - this.rows = new ax(this.settings.row); - this.cols = new aA(this.settings.col, this); - this.validations = new aG(); - this.hyperlinks = {}; - this.comments = {}; - this.report = new d8(this); - this.selector = new ah(); - this.scroll = new aj(); - this.history = new ak(); - this.clipboard = new am(); - this.autoFilter = new au(); - this.change = function () {}; - this.exceptRowSet = new Set(); - this.sortedRowMap = new Map(); - this.unsortedRowMap = new Map(); - this.saveChange = true; - this.cellView = new db(this); - this.viewManager = new eF(); - }, [{ - key: "addValidation", - value: function (k8, k9, kb) { - var kc = this; - this.changeData(function () { - kc.validations.add(k8, k9, kb); - }); - } - }, { - key: "removeValidation", - value: function () { - var k8 = this; - var k9 = this.selector.range; - this.changeData(function () { - k8.validations.remove(k9); - }); - } - }, { - key: "getSelectedValidator", - value: function () { - var k8 = this.selector; - var k9 = k8.ri; - var kb = k8.ci; - var kc = this.validations.get(k9, kb); - return kc ? kc.validator : null; - } - }, { - key: "getSelectedValidation", - value: function () { - var k8 = this.selector; - var k9 = k8.ri; - var kb = k8.ci; - var kc = k8.range; - var kd = this.validations.get(k9, kb); - var kf = { - ref: kc.toString() - }; - null !== kd && (kf.mode = kd.mode, kf.validator = kd.validator); - return kf; - } - }, { - key: "canUndo", - value: function () { - return this.history.canUndo(); - } - }, { - key: "canRedo", - value: function () { - return this.history.canRedo(); - } - }, { - key: "undo", - value: function () { - var k8 = this; - this.history.undo(this.getData(), function (k9) { - k8.setData(k9); - }); - } - }, { - key: "redo", - value: function () { - var k8 = this; - this.history.redo(this.getData(), function (k9) { - k8.setData(k9); - }); - } - }, { - key: "copy", - value: function () { - this.clipboard.copy(this.selector.range); - } - }, { - key: "copyToSystemClipboard", - value: function () { - if (null != navigator.clipboard) { - for (var k8 = "", k9 = this.rows.getData(), kb = this.selector.range.sri; kb <= this.selector.range.eri; kb++) { - if (k9.hasOwnProperty(kb)) { - for (var kc = this.selector.range.sci; kc <= this.selector.range.eci; kc++) { - if (kc > this.selector.range.sci && (k8 += "\t"), k9[kb].cells.hasOwnProperty(kc)) { - var kd = String(k9[kb].cells[kc].text); - -1 == kd.indexOf("\n") && -1 == kd.indexOf("\t") && -1 == kd.indexOf("\"") ? k8 += kd : k8 += "\"".concat(kd, "\""); - } - } - } else { - for (var kf = this.selector.range.sci; kf <= this.selector.range.eci; kf++) { - k8 += "\t"; - } - } - k8 += "\n"; - } - navigator.clipboard.writeText(k8).then(function () {}, function (kg) { - console.log("text copy to the system clipboard error ", k8, kg); - }); - } - } - }, { - key: "cut", - value: function () { - this.clipboard.cut(this.selector.range); - } - }, { - key: "paste", - value: function () { - var k8 = this; - var k9 = arguments.length > 0 && undefined !== arguments[0] ? arguments[0] : "all"; - var kb = arguments.length > 1 && undefined !== arguments[1] ? arguments[1] : function () {}; - var kc = this.clipboard; - var kd = this.selector; - return !kc.isClear() && !!eJ.call(this, kc.range, kd.range, kb) && (this.changeData(function () { - kc.isCopy() ? eK.call(k8, kc.range, kd.range, k9) : kc.isCut() && eL.call(k8, kc.range, kd.range); - }), true); - } - }, { - key: "pasteFromText", - value: function (k8) { - var k9 = k8.split("\r\n").map(function (kd) { - return kd.replace(/"/g, "").split("\t"); - }); - k9.length > 0 && (k9.length -= 1); - var kb = this.rows; - var kc = this.selector; - this.changeData(function () { - kb.paste(k9, kc.range); - }); - } - }, { - key: "autofill", - value: function (k8, k9) { - var kb = this; - var kc = arguments.length > 2 && undefined !== arguments[2] ? arguments[2] : function () {}; - var kd = this.selector.range; - return !!eJ.call(this, kd, k8, kc) && (this.changeData(function () { - eK.call(kb, kd, k8, k9, true); - }), true); - } - }, { - key: "clearClipboard", - value: function () { - this.clipboard.clear(); - } - }, { - key: "calSelectedRangeByEnd", - value: function (k8, k9) { - var kb = this.selector; - var kc = this.rows; - var kd = this.cols; - var kf = this.merges; - var kg = this.report; - var kh = this.cellView; - var kj = kb.range; - var kk = kj.sri; - var km = kj.sci; - var kp = kj.eri; - var kq = kj.eci; - var ku = kb.ri; - var kv = kb.ci; - var kw = k8; - var kx = k9; - if (k8 < 0 && (kw = kc.len - 1), k9 < 0 && (kx = kd.len - 1), kw > ku ? (kk = ku, kp = kw) : (kk = kw, kp = ku), kx > kv ? (km = kv, kq = kx) : (km = kx, kq = kv), kg.calc) { - kb.range = kh.mergesUnion(new af(kk, km, kp, kq)); - } else { - for (kb.range = new af(kk, km, kp, kq);;) { - var ky = kb.range; - if (kb.range = kf.union(ky), ky.equals(kb.range)) { - break; - } - } - } - return kb.range; - } - }, { - key: "calSelectedRangeByStart", - value: function (k8, k9) { - var kb = this.selector; - var kc = this.rows; - var kd = this.cols; - var kf = this.report; - this.merges; - var kg = kf.getFirstIncludes(k8, k9, true); - null === kg && (kg = new af(k8, k9, k8, k9), -1 === k8 && (kg.sri = 0, kg.eri = kc.len - 1), -1 === k9 && (kg.sci = 0, kg.eci = kd.len - 1)); - kb.range = kg; - return kg; - } - }, { - key: "setSelectedCellAttr", - value: function (k8, k9) { - var kb = this; - this.changeData(function () { - var kc = kb.selector; - var kd = kb.styles; - var kf = kb.rows; - if ("merge" === k8) { - k9 ? kb.merge() : kb.unmerge(); - } else { - if ("border" === k8) { - eN.call(kb, k9); - } else { - if ("getCell" === k8) { - var kg = kc.ri; - var kh = kc.ci; - var kj = kc.range; - if (kc.multiple()) { - var kk = kc.size(); - var km = a4()(kk, 2); - var kp = km[0]; - var kq = km[1]; - var ku = kj.sri; - var kv = kj.sci; - var kw = kj.eri; - var kx = kj.eci; - if (kp > 1) { - for (var ky = kv; ky <= kx; ky += 1) { - kf.getCellOrNew(kw + 1, ky).text = "=".concat(k9, "(").concat(Object(ad.d)(ky, ku), ":").concat(Object(ad.d)(ky, kw), ")"); - } - } else { - kq > 1 && (kf.getCellOrNew(kg, kx + 1).text = "=".concat(k9, "(").concat(Object(ad.d)(kv, kg), ":").concat(Object(ad.d)(kx, kg), ")")); - } - } else { - kf.getCellOrNew(kg, kh).text = "=".concat(k9, "()"); - } - } else { - kc.range.each(function (kz, kA) { - var kB = kf.getCellOrNew(kz, kA); - var kC = {}; - if (undefined !== kB.style && (kC = aw.a.cloneDeep(kd[kB.style])), "format" === k8) { - kC.format = k9; - kB.style = kb.addStyle(kC); - } else { - if ("font-bold" === k8 || "font-italic" === k8 || "font-name" === k8 || "font-size" === k8) { - var kD = {}; - kD[k8.split("-")[1]] = k9; - kC.font = Object.assign(kC.font || {}, kD); - kB.style = kb.addStyle(kC); - } else { - "strike" === k8 || "textwrap" === k8 || "underline" === k8 || "align" === k8 || "valign" === k8 || "color" === k8 || "bgcolor" === k8 ? (kC[k8] = k9, kB.style = kb.addStyle(kC)) : kB[k8] = k9; - } - } - }); - } - } - } - }); - } - }, { - key: "setSelectedCellText", - value: function (k8) { - var k9 = arguments.length > 1 && undefined !== arguments[1] ? arguments[1] : "input"; - var kb = this.autoFilter; - var kc = this.selector; - this.rows; - var kd = this.report; - var kf = kc.ri; - var kg = kc.ci; - var kh = kf; - this.unsortedRowMap.has(kf) && (kh = this.unsortedRowMap.get(kf)); - var kj = kd.getCell(kh, kg); - var kk = kj ? kj.text : ""; - var km = this.setCellText(kh, kg, k8, k9); - if (kb.active()) { - var kp = kb.getFilter(kg); - if (kp) { - var kq = kp.value.findIndex(function (ku) { - return ku === kk; - }); - kq >= 0 && kp.value.splice(kq, 1, k8); - } - } - return km; - } - }, { - key: "getSelectedCell", - value: function () { - var k8 = this.selector; - var k9 = k8.ri; - var kb = k8.ci; - var kc = k9; - this.unsortedRowMap.has(k9) && (kc = this.unsortedRowMap.get(k9)); - return this.getCell(kc, kb); - } - }, { - key: "xyInSelectedRect", - value: function (k8, k9) { - var kb = this.getSelectedRect(); - var kc = kb.left; - var kd = kb.top; - var kf = kb.width; - var kg = kb.height; - var kh = k8 - this.fixedColWidth(); - var kj = k9 - this.fixedRowHeight(); - return kh >= kc && kh <= kc + kf && kj >= kd && kj <= kd + kg; - } - }, { - key: "getSelectedRect", - value: function () { - return this.getRect(this.selector.range); - } - }, { - key: "getClipboardRect", - value: function () { - var k8 = this.clipboard; - return k8.isClear() ? { - left: -100, - top: -100 - } : this.getRect(k8.range); - } - }, { - key: "sumHeight", - value: function (k8, k9, kb) { - var kc = this; - var kd = this.scroll; - var kf = this.rows; - var kg = a4()(this.freeze, 1)[0]; - var kh = kd.ri; - var kj = 0; - var kk = 0; - var km = Math.min(kg, k9); - var kp = 0; - (kg > 0 && k8 < kg && (kp = km - k8, kj = aw.a.rangeSum(k8, km, function (kw) { - return kb && kb.has(kw) ? 0 : kc.getHeight(kw); - })), kh > kg && k8 < kh) && (kk = 5 * (Math.min(kh, k9) - k8 - kp)); - for (var kq = 0, ku = kf.len, kv = Math.max(kh, k8); kv < k9 && (kb && kb.has(kv) || (ku = kv, !((kq += this.getHeight(kv)) > this.viewHeight()))); kv += 1) {} - return kj + kk + 5 * Math.max(0, k9 - ku - 1) + kq; - } - }, { - key: "sumActualHeight", - value: function (k8, k9, kb) { - var kc = this; - return aw.a.rangeSum(k8, k9, function (kd) { - return kb && kb.has(kd) ? 0 : kc.getHeight(kd); - }); - } - }, { - key: "sumActualWidth", - value: function (k8, k9) { - var kb = this; - return aw.a.rangeSum(k8, k9, function (kc) { - return kb.getWidth(kc); - }); - } - }, { - key: "getRect", - value: function (k8) { - var k9 = this.scroll; - this.rows; - this.cols; - var kb = this.exceptRowSet; - var kc = k8.sri; - var kd = k8.sci; - var kf = k8.eri; - var kg = k8.eci; - if (kc < 0 && kd < 0) { - return { - left: 0, - l: 0, - top: 0, - t: 0, - scroll: k9 - }; - } - var kh = this.sumActualWidth(0, kd); - var kj = this.sumHeight(0, kc, kb); - var kk = this.sumHeight(kc, kf + 1, kb); - var km = this.sumActualWidth(kd, kg + 1); - var kp = kh - k9.x; - var kq = kj - k9.y; - var ku = this.freezeTotalHeight(); - var kv = this.freezeTotalWidth(); - kv > 0 && kv > kh && (kp = kh); - ku > 0 && ku > kj && (kq = kj); - return { - l: kh, - t: kj, - left: kp, - top: kq, - height: kk, - width: km, - scroll: k9 - }; - } - }, { - key: "getCellRowByY", - value: function (k8, k9) { - return eP.call(this, k8, k9); - } - }, { - key: "getCellRectByXY", - value: function (k8, k9) { - var kb = this.scroll; - this.merges; - var kc = this.rows; - var kd = this.cols; - var kf = this.report; - var kg = this.cellView; - var kh = eP.call(this, k9, kb.y); - var kj = kh.ri; - var kk = kh.top; - var km = kh.height; - var kp = eQ.call(this, k8, kb.x); - var kq = kp.ci; - var ku = kp.left; - var kv = kp.width; - -1 === kq && (kv = kd.totalWidth()); - var kw = kf.rowInHeader(kj); - (-1 === kj || kw && -1 !== kq) && (km = kc.totalHeight()); - var kx = null; - if (kj >= 0 && kq >= 0) { - var ky = kg.cellRect(kj, kq); - ku = ky.left; - kk = ky.top; - kv = ky.width; - km = ky.height; - kj = ky.ri; - kq = ky.ci; - kx = ky.m; - } - return { - ri: kj, - ci: kq, - left: ku, - top: kk, - width: kv, - height: km, - m: kx - }; - } - }, { - key: "isSingleSelected", - value: function () { - var k8 = this.selector.range; - var k9 = k8.sri; - var kb = k8.sci; - var kc = k8.eri; - var kd = k8.eci; - var kf = this.getCell(k9, kb); - if (kf && kf.merge) { - var kg = a4()(kf.merge, 2); - var kh = kg[0]; - var kj = kg[1]; - if (k9 + kh === kc && kb + kj === kd) { - return true; - } - } - return !this.selector.multiple(); - } - }, { - key: "canUnmerge", - value: function () { - var k8 = this.selector.range; - var k9 = k8.sri; - var kb = k8.sci; - var kc = k8.eri; - var kd = k8.eci; - var kf = this.getCell(k9, kb); - if (kf && kf.merge) { - var kg = a4()(kf.merge, 2); - var kh = kg[0]; - var kj = kg[1]; - if (k9 + kh === kc && kb + kj === kd) { - return true; - } - } - return false; - } - }, { - key: "merge", - value: function () { - var k8 = this; - var k9 = this.selector; - var kb = this.rows; - if (!this.isSingleSelected()) { - var kc = k9.size(); - var kd = a4()(kc, 2); - var kf = kd[0]; - var kg = kd[1]; - if (kf > 1 || kg > 1) { - var kh = k9.range; - var kj = kh.sri; - var kk = kh.sci; - this.changeData(function () { - var km = kb.getCellOrNew(kj, kk); - km.merge = [kf - 1, kg - 1]; - k8.merges.add(k9.range); - k8.rows.deleteCells(k9.range); - k8.rows.setCell(kj, kk, km); - }); - } - } - } - }, { - key: "unmerge", - value: function () { - var k8 = this; - var k9 = this.selector; - if (this.isSingleSelected()) { - var kb = k9.range; - var kc = kb.sri; - var kd = kb.sci; - this.changeData(function () { - k8.rows.deleteCell(kc, kd, "merge"); - k8.merges.deleteWithin(k9.range); - }); - } - } - }, { - key: "canAutofilter", - value: function () { - return !this.autoFilter.active(); - } - }, { - key: "autofilter", - value: function () { - var k8 = this; - var k9 = this.autoFilter; - var kb = this.selector; - this.changeData(function () { - k9.active() ? (k9.clear(), k8.exceptRowSet = new Set(), k8.sortedRowMap = new Map(), k8.unsortedRowMap = new Map()) : k9.ref = kb.range.toString(); - }); - } - }, { - key: "setAutoFilter", - value: function (k8, k9, kb, kc) { - var kd = this.autoFilter; - kd.addFilter(k8, kb, kc); - kd.setSort(k8, k9); - this.resetAutoFilter(); - } - }, { - key: "resetAutoFilter", - value: function () { - var k8 = this; - var k9 = this.autoFilter; - var kb = this.rows; - if (k9.active()) { - var kc = k9.sort; - var kd = k9.filteredRows(function (kk, km) { - return kb.getCell(kk, km); - }); - var kf = kd.rset; - var kg = kd.fset; - var kh = Array.from(kg); - var kj = Array.from(kg); - kc && kh.sort(function (kk, km) { - return "asc" === kc.order ? kk - km : "desc" === kc.order ? km - kk : 0; - }); - this.exceptRowSet = kf; - this.sortedRowMap = new Map(); - this.unsortedRowMap = new Map(); - kh.forEach(function (kk, km) { - k8.sortedRowMap.set(kj[km], kk); - k8.unsortedRowMap.set(kk, kj[km]); - }); - } - } - }, { - key: "deleteCell", - value: function () { - var k8 = this; - var k9 = arguments.length > 0 && undefined !== arguments[0] ? arguments[0] : "all"; - var kb = this.selector; - this.changeData(function () { - k8.rows.deleteCells(kb.range, k9); - "all" !== k9 && "format" !== k9 || k8.merges.deleteWithin(kb.range); - }); - } - }, { - key: "insert", - value: function (k8) { - var k9 = this; - var kb = arguments.length > 1 && undefined !== arguments[1] ? arguments[1] : 1; - var kc = arguments.length > 2 && undefined !== arguments[2] ? arguments[2] : -2; - this.changeData(function () { - var kd = k9.selector.range; - var kf = kd.sri; - var kg = kd.sci; - var kh = k9.rows; - var kj = k9.merges; - var kk = k9.cols; - var km = k9.report; - var kp = a4()(k9.freeze, 2); - var kq = kp[0]; - var ku = kp[1]; - var kv = kf; - var kw = true; - "row" === k8 ? (-2 !== kc && (kv = kc), -2 === kv || kv >= kh.len ? (kw = false, kh.insert(kv, kb)) : kh.insert(kv, kb), kv >= 0 && kv <= kq && (k9.freeze[0] = kq + kb, k9.scrolly(0, function () {}))) : "column" === k8 && (kv = kg, -2 !== kc && (kv = kc), -2 === kv || kv >= kk.len ? kw = false : (kh.insertColumn(kv, kb), kk.insertColumn(kv, kb)), kv >= 0 && kv <= ku && (k9.freeze[1] = ku + kb, k9.scrollx(0, function () {}))); - kw && (kj.shift(k8, kv, kb, function (kx, ky, kz, kA) {}), "row" === k8 && km.bandAdjust(kv, kb)); - }); - } - }, { - key: "delete", - value: function (k8) { - var k9 = this; - var kb = arguments.length > 1 && undefined !== arguments[1] ? arguments[1] : 1; - var kc = arguments.length > 2 && undefined !== arguments[2] ? arguments[2] : -2; - this.changeData(function () { - var kd = a4()(k9.freeze, 2); - var kf = kd[0]; - var kg = kd[1]; - var kh = k9.rows; - var kj = k9.merges; - var kk = k9.selector; - var km = k9.cols; - var kp = k9.report; - var kq = kk.range; - var ku = kk.range; - var kv = ku.sri; - var kw = ku.sci; - var kx = ku.eri; - var ky = ku.eci; - var kz = kk.range.size(); - var kA = a4()(kz, 2); - var kB = kA[0]; - var kC = kA[1]; - var kD = kv; - var kE = kB; - if ("row" === k8) { - if (-2 !== kc) { - if (kD = kc, !(kc >= 0 && kc < kh.len)) { - return; - } - (kx = (kv = kc) + kb - 1) >= kh.len && (kx = kh.len - 1); - kE = kx - kv + 1; - } - if (!(kv >= 0 && kx >= 0)) { - return; - } - if (kj.deleteRow(kv, kx), kh.delete(kv, kx), kv < kf) { - if (kx > kf) { - k9.freeze[0] = kv; - } else { - var kF = kx - kv + 1; - k9.freeze[0] = kf - kF; - } - k9.scrolly(0, function () {}); - } - } else { - if ("column" === k8) { - if (kD = kq.sci, kE = kC, -2 !== kc) { - if (kD = kc, !(kc >= 0 && kc < km.len)) { - return; - } - (ky = (kw = kc) + kb - 1) >= km.len && (ky = km.len - 1); - kE = ky - kw + 1; - } - if (kv < 0 || kx < 0) { - return; - } - if (kj.deleteColumn(kw, ky), kh.deleteColumn(kw, ky), km.len -= kE, kw < kg) { - if (ky > kg) { - k9.freeze[1] = kw; - } else { - var kG = ky - kw + 1; - k9.freeze[1] = kg - kG; - } - k9.scrollx(0, function () {}); - } - } - } - kj.shift(k8, kD, -kE, function (kH, kI, kJ, kK) {}); - "row" === k8 && kp.bandAdjust(kD, -kE); - }); - } - }, { - key: "moveColumn", - value: function (k8, k9) { - var kb = arguments.length > 2 && undefined !== arguments[2] ? arguments[2] : 0; - var kc = this.rows; - var kd = this.merges; - var kf = this.cols; - this.report; - var kg = kf.getMoveColumns(k8, k9); - if (0 !== kg.size) { - kf.moveColumn(k8, k9); - kc.each(function (kj, kk) { - var km = {}; - kc.eachCells(kj, function (kp, kq) { - var ku = parseInt(kp, 10); - kj >= kb && kg.has(ku) && (ku = kg.get(ku)); - km[ku] = kq; - }); - kk.cells = km; - }); - var kh = ac()(kd._); - kg.forEach(function (kj, kk) { - for (var km = 0; km < kh.length; km++) { - var kp = kh[km]; - if (kp.sci === kk && kp.sri >= kb) { - var kq = kp.eci - kp.sci; - kp.sci = kj; - kp.eci = kj + kq; - kh.splice(km, 1); - km--; - } - } - }); - } - } - }, { - key: "scrollx", - value: function (k8, k9) { - var kb = this.scroll; - var kc = this.freeze; - var kd = this.cols; - this.cellView; - var kf = a4()(kc, 2)[1]; - var kg = aw.a.rangeReduceIf(kf, kd.len, 0, 0, k8, function (kq) { - return kd.getWidth(kq); - }); - var kh = a4()(kg, 3); - var kj = kh[0]; - var kk = kh[1]; - var km = kh[2]; - var kp = kk; - k8 > 0 && (kp += km); - kb.x !== kp && (kb.ci = k8 > 0 ? kj : 0, kb.x = kp, k9()); - } - }, { - key: "scrolly", - value: function (k8, k9) { - var kb = arguments.length > 2 && undefined !== arguments[2] && arguments[2]; - var kc = this.scroll; - var kd = this.freeze; - this.rows; - this.cellView; - var kf = a4()(kd, 1); - var kg = kf[0]; - var kh = (k8 = Math.floor(k8)) <= 0 ? 0 : Math.round(k8 / 5); - var kj = 5 * kh; - kh += kg; - var kk = k8 > 0 ? kh : kg; - (kb || kc.y !== kj || kc.ri !== kk) && (kc.y = kj, kc.ri = kk, k9()); - } - }, { - key: "cellRect", - value: function (k8, k9) { - this.cols; - var kb = this.scroll; - var kc = this.freeze; - var kd = this.sumActualWidth(0, k9); - var kf = this.sumHeight(0, k8); - var kg = this.getCell(k8, k9); - var kh = this.getWidth(k9); - var kj = this.getHeight(k8); - var kk = a4()(kc, 2); - var km = kk[0]; - kk[1]; - if (null !== kg && kg.merge) { - var kp = a4()(kg.merge, 2); - var kq = kp[0]; - var ku = kp[1]; - if (k8 < kb.ri && k8 > km - 1 && (kf -= kj - 5), kq > 0 && k8 > km - 1) { - for (var kv = 1; kv <= kq; kv += 1) { - var kw = this.getHeight(k8 + kv); - kj += kw; - k8 + kv < kb.ri && (kf -= kw - 5); - } - } - if (ku > 0) { - for (var kx = 1; kx <= ku; kx += 1) { - kh += this.getWidth(k9 + kx); - } - } - } - return { - left: kd, - top: kf, - width: kh, - height: kj, - cell: kg - }; - } - }, { - key: "getCell", - value: function (k8, k9) { - var kb = arguments.length > 2 && undefined !== arguments[2] && arguments[2]; - return this.report.getCell(k8, k9, kb); - } - }, { - key: "getCellTextOrDefault", - value: function (k8, k9) { - var kb = this.getCell(k8, k9, true); - return kb && kb.text ? kb.text : ""; - } - }, { - key: "getCellStyle", - value: function (k8, k9) { - var kb = this.getCell(k8, k9); - return kb && undefined !== kb.style ? this.styles[kb.style] : null; - } - }, { - key: "getCellStyleOrDefault", - value: function (k8, k9) { - var kb = arguments.length > 2 && undefined !== arguments[2] ? arguments[2] : null; - var kc = this.styles; - var kd = this.report; - null === kb && (kb = this.getCell(k8, k9, false)); - var kf = kb && undefined !== kb.style ? kc[kb.style] : {}; - if (kf || (kf = {}), kf = aw.a.merge(this.defaultStyle(), kf), kb && kb.styleExpr && kd.calc) { - var kg = 0 | kb.dataRow; - var kh = kd.calcObjectStyle(kb, kg); - kh && Object.assign(kf, kh); - } - if (kb) { - var kj; - var kk = eG(aw.a.arrStyle); - try { - for (kk.s(); !(kj = kk.n()).done;) { - var km = kj.value; - var kp = kb[km]; - if (undefined !== kp) { - if (kd.calc && kb.commonExpr && kb.commonExpr[km]) { - var kq = 0 | kb.dataRow; - eO(kf, km, kd.calcCommonExpr(kb, km, kq)); - } else { - "string" != typeof kp || kp.trim().startsWith("#{") || eO(kf, km, kp); - } - } - } - } catch (ku) { - kk.e(ku); - } finally { - kk.f(); - } - } - return kf; - } - }, { - key: "getSelectedCellStyle", - value: function () { - var k8 = this.selector; - var k9 = k8.ri; - var kb = k8.ci; - return this.getCellStyleOrDefault(k9, kb); - } - }, { - key: "setCellText", - value: function (k8, k9, kb, kc) { - this.rows; - var kd = this.history; - var kf = this.validations; - return "finished" === kc ? (kd.add(this.getData()), this.report.setCellText(k8, k9, kb)) : (kf.validate(k8, k9, kb), 1); - } - }, { - key: "freezeIsActive", - value: function () { - var k8 = a4()(this.freeze, 2); - var k9 = k8[0]; - var kb = k8[1]; - return k9 > 0 || kb > 0; - } - }, { - key: "setFreeze", - value: function (k8, k9) { - var kb = this; - this.changeData(function () { - kb.freeze = [k8, k9]; - }); - } - }, { - key: "calcIsActive", - value: function () { - var k8 = this.report.calc; - return k8 && true === k8; - } - }, { - key: "freezeTotalWidth", - value: function () { - return this.cellView.topLeftRange.w; - } - }, { - key: "freezeTotalHeight", - value: function () { - return this.cellView.topLeftRange.h; - } - }, { - key: "setRowHeight", - value: function (k8, k9) { - var kb = this; - this.changeData(function () { - kb.rows.setHeight(k8, k9); - }); - } - }, { - key: "setColWidth", - value: function (k8, k9) { - var kb = this; - this.changeData(function () { - kb.cols.setWidth(k8, k9); - }); - } - }, { - key: "viewHeight", - value: function () { - var k8 = this.settings; - var k9 = k8.view; - var kb = k8.showToolbar; - var kc = k8.showBottombar; - var kd = k9.height(); - kc && (kd -= 41); - kb && (kd -= 41); - return kd; - } - }, { - key: "viewWidth", - value: function () { - return this.settings.view.width(); - } - }, { - key: "freezeViewRange", - value: function () { - var k8 = a4()(this.freeze, 2); - var k9 = k8[0]; - var kb = k8[1]; - return new af(0, 0, k9 - 1, kb - 1, this.freezeTotalWidth(), this.freezeTotalHeight()); - } - }, { - key: "getHeight", - value: function (k8) { - return this.report.getHeight(k8); - } - }, { - key: "getWidth", - value: function (k8) { - return this.report.getWidth(k8); - } - }, { - key: "contentRange", - value: function () { - var k8 = this.rows; - this.cols; - var k9 = k8.maxCell(); - var kb = a4()(k9, 2); - var kc = kb[0]; - var kd = kb[1]; - var kf = this.sumActualHeight(0, kc + 1); - var kg = this.sumActualWidth(0, kd + 1); - return new af(0, 0, kc, kd, kg, kf); - } - }, { - key: "lastRowsHeight", - value: function (k8) { - for (var k9 = this.rows, kb = (this.freeze, this.exceptRowSet), kc = 0, kd = 0, kf = k9.len - 1; kf >= 0; --kf) { - if (!kb.has(kf)) { - var kg = this.getHeight(kf); - if (kc + kg > k8) { - break; - } - kd += 1; - kc += kg; - } - } - return { - height: k8, - len: kd - }; - } - }, { - key: "exceptRowTotalHeight", - value: function (k8, k9) { - var kb = this; - var kc = this.exceptRowSet; - this.rows; - var kd = Array.from(kc); - var kf = 0; - kd.forEach(function (kg) { - if (kg < k8 || kg > k9) { - var kh = kb.getHeight(kg); - kf += kh; - } - }); - return kf; - } - }, { - key: "viewRange", - value: function () { - var k8 = this.scroll; - var k9 = this.rows; - var kb = this.cols; - var kc = this.freeze; - var kd = this.exceptRowSet; - var kf = k8.ri; - var kg = k8.ci; - kf <= 0 && (kf = a4()(kc, 1)[0]); - kg <= 0 && (kg = a4()(kc, 2)[1]); - for (var kh = 0, kj = 0, kk = [k9.len, kb.len], km = kk[0], kp = kk[1], kq = kf; kq < k9.len && (kd.has(kq) || (kj += this.getHeight(kq), km = kq), !(kj > this.viewHeight())); kq += 1) {} - for (var ku = kg; ku < kb.len && (kp = ku, !((kh += kb.getWidth(ku)) > this.viewWidth())); ku += 1) {} - return new af(kf, kg, km, kp, kh, kj); - } - }, { - key: "eachMergesInView", - value: function (k8, k9) { - this.merges.filterIntersects(k8).forEach(function (kb) { - return k9(kb); - }); - } - }, { - key: "hideRowsOrCols", - value: function () { - var k8 = this.rows; - var k9 = this.cols; - var kb = this.selector; - var kc = kb.size(); - var kd = a4()(kc, 2); - var kf = kd[0]; - var kg = kd[1]; - var kh = kb.range; - var kj = kh.sri; - var kk = kh.sci; - var km = kh.eri; - var kp = kh.eci; - if (kf === k8.len) { - for (var kq = kk; kq <= kp; kq += 1) { - k9.setHide(kq, true); - } - } else { - if (kg === k9.len) { - for (var ku = kj; ku <= km; ku += 1) { - k8.setHide(ku, true); - } - } - } - } - }, { - key: "unhideRowsOrCols", - value: function (k8, k9) { - this["".concat(k8, "s")].unhide(k9); - } - }, { - key: "rowEach", - value: function (k8, k9, kb) { - for (var kc = 0, kd = (this.rows, this.exceptRowSet), kf = ac()(kd), kg = 0, kh = 0; kh < kf.length; kh += 1) { - kf[kh] < k8 && (kg += 1); - } - for (var kj = k8 + kg; kj <= k9 + kg; kj += 1) { - if (kd.has(kj)) { - kg += 1; - } else { - var kk = this.getHeight(kj); - if (kk > 0 && (kb(kj, kc, kk), (kc += kk) > this.viewHeight())) { - break; - } - } - } - } - }, { - key: "colEach", - value: function (k8, k9, kb) { - for (var kc = 0, kd = this.cols, kf = k8; kf <= k9; kf += 1) { - var kg = kd.getWidth(kf); - if (kg > 0 && (kb(kf, kc, kg), (kc += kg) > this.viewWidth())) { - break; - } - } - } - }, { - key: "defaultStyle", - value: function () { - return this.settings.style; - } - }, { - key: "addStyle", - value: function (k8) { - for (var k9 = this.styles, kb = 0; kb < k9.length; kb += 1) { - var kc = k9[kb]; - if (aw.a.equals(kc, k8)) { - return kb; - } - } - k9.push(k8); - return k9.length - 1; - } - }, { - key: "changeData", - value: function (k8) { - this.saveChange && this.history.add(this.getData()); - k8(); - this.saveChange && this.change(this.getData()); - } - }, { - key: "setData", - value: function (k8) { - var k9 = this; - this.report.setCalc(false); - Object.keys(k8).forEach(function (kb) { - if ("merges" === kb || "rows" === kb || "cols" === kb || "validations" === kb) { - k9[kb].setData(k8[kb]); - } else { - if ("freeze" === kb) { - var kc = Object(ad.b)(k8[kb]); - var kd = a4()(kc, 2); - var kf = kd[0]; - var kg = kd[1]; - k9.freeze = [kg, kf]; - k9.scroll.ri = kg; - k9.scroll.y = 0; - } else { - "autofilter" === kb ? k9.autoFilter.setData(k8[kb]) : undefined !== k8[kb] && (k9[kb] && "function" == typeof k9[kb].setData ? k9[kb].setData(k8[kb]) : k9[kb] = k8[kb]); - } - } - }); - return this; - } - }, { - key: "getData", - value: function () { - var k8 = this.processing; - var k9 = this.name; - var kb = this.freeze; - var kc = this.styles; - var kd = this.merges; - var kf = this.rows; - var kg = this.cols; - var kh = this.validations; - var kj = this.autoFilter; - var kk = this.report; - var km = this.child; - var kp = []; - if (kk.calc) { - kp = this.styles; - } else { - var kq = new Map(); - kf.each(function (kv, kw) { - kf.eachCells(kv, function (kx, ky) { - if (ky && undefined !== ky.style) { - var kz = ky.style; - if (kq.has(kz)) { - var kA = kq.get(kz); - ky.style = kA; - } else { - var kB = kp.push(kc[kz]) - 1; - kq.set(kz, kB); - ky.style = kB; - } - } - }); - }); - this.styles = kp; - } - var ku = kk.rowsGetData(); - return { - name: k9, - processing: k8, - freeze: Object(ad.d)(kb[1], kb[0]), - styles: kp, - merges: kd.getData(), - rows: ku, - cols: kg.getData(), - child: km, - report: kk.getData(), - validations: kh.getData(), - autofilter: kj.getData() - }; - } - }, { - key: "fixedRowHeight", - value: function () { - return this.settings.showFixedColHeader ? this.rows.height : 0; - } - }, { - key: "fixedColWidth", - value: function () { - return this.settings.showFixedRowHeader ? this.cols.indexWidth : 0; - } - }, { - key: "getSelectedEditable", - value: function () { - var k8 = this.selector; - var k9 = k8.ri; - var kb = k8.ci; - return this.report.canEdit(k9, kb); - } - }], [{ - key: "virtualHeight", - get: function () { - return 5; - } - }]); - }(); - var eS = function () { - return a8()(function k7() { - var k8 = this; - var k9 = arguments.length > 0 && undefined !== arguments[0] && arguments[0]; - var kb = arguments.length > 1 ? arguments[1] : undefined; - var kc = arguments.length > 2 ? arguments[2] : undefined; - a6()(this, k7); - this.moving = false; - this.vertical = k9; - this.el = Object(a9.c)("div", "".concat(cx.a, "-resizer ").concat(k9 ? "vertical" : "horizontal")).children(this.unhideHoverEl = Object(a9.c)("div", "".concat(cx.a, "-resizer-hover")).on("dblclick.stop", function (kd) { - return k8.mousedblclickHandler(kd); - }).css("position", "absolute").hide(), this.hoverEl = Object(a9.c)("div", "".concat(cx.a, "-resizer-hover")).on("mousedown.stop", function (kd) { - return k8.mousedownHandler(kd); - }), this.lineEl = Object(a9.c)("div", "".concat(cx.a, "-resizer-line")).hide()).hide(); - this.cRect = null; - this.finishedFn = null; - this.minDistance = kb; - this.freeMove = !!kc; - this.unhideFn = function () {}; - }, [{ - key: "showUnhide", - value: function (k8) { - this.unhideIndex = k8; - this.unhideHoverEl.show(); - } - }, { - key: "hideUnhide", - value: function () { - this.unhideHoverEl.hide(); - } - }, { - key: "show", - value: function (k8, k9) { - var kb = this.moving; - var kc = this.vertical; - var kd = this.hoverEl; - var kf = this.lineEl; - var kg = this.el; - var kh = this.unhideHoverEl; - if (!kb) { - this.cRect = k8; - var kj = k8.left; - var kk = k8.top; - var km = k8.width; - var kp = k8.height; - kg.offset({ - left: kc ? kj + km - 5 : kj, - top: kc ? kk : kk + kp - 5 - }).show(); - kd.offset({ - width: kc ? 5 : km, - height: kc ? kp : 5 - }); - kf.offset({ - width: kc ? 0 : k9.width, - height: kc ? k9.height : 0 - }); - kh.offset({ - left: kc ? 5 - km : kj, - top: kc ? kk : 5 - kp, - width: kc ? 5 : km, - height: kc ? kp : 5 - }); - } - } - }, { - key: "hide", - value: function () { - this.el.offset({ - left: 0, - top: 0 - }).hide(); - this.hideUnhide(); - } - }, { - key: "mousedblclickHandler", - value: function () { - this.unhideIndex && this.unhideFn(this.unhideIndex); - } - }, { - key: "mousedownHandler", - value: function (k8) { - var k9 = this; - var kb = k8; - var kc = this.el; - var kd = this.lineEl; - var kf = this.cRect; - var kg = this.vertical; - var kh = this.minDistance; - var kj = this.hoverEl; - var kk = this.freeMove; - var km = kg ? kf.width : kf.height; - var kp = 0; - kd.show(); - Object(bH.e)(window, function (kq) { - if (k9.moving = true, null !== kb && 1 === kq.buttons) { - if (kq.target === kd.el || kq.target === kj.el) { - return; - } - kg ? ((km += kq.movementX) > kh || kk) && (kc.css("left", "".concat(kf.left + km - 5, "px")), kp = kq.offsetX) : ((km = kq.offsetY - (kf.top - 5)) > kh || kk) && (kp = kq.offsetY, kc.css("top", "".concat(kq.offsetY, "px"))); - kb = kq; - } - }, function () { - kb = null; - kd.hide(); - k9.moving = false; - k9.hide(); - k9.finishedFn && (km < kh && (km = kh), k9.finishedFn(kf, km, kp)); - }); - } - }]); - }(); - var eT = function () { - return a8()(function k7(k8) { - var k9 = this; - a6()(this, k7); - this.vertical = k8; - this.moveFn = null; - this.el = Object(a9.c)("div", "".concat(cx.a, "-scrollbar ").concat(k8 ? "vertical" : "horizontal")).child(this.contentEl = Object(a9.c)("div", "")).on("mousemove.stop", function () {}).on("scroll.stop", function (kb) { - var kc = kb.target; - var kd = kc.scrollTop; - var kf = kc.scrollLeft; - k9.moveFn && k9.moveFn(k9.vertical ? kd : kf, kb); - }); - }, [{ - key: "move", - value: function (k8) { - this.el.scroll(k8); - return this; - } - }, { - key: "scroll", - value: function () { - return this.el.scroll(); - } - }, { - key: "set", - value: function (k8, k9) { - var kb = k8; - if (k9 > kb) { - var kc = this.vertical ? "height" : "width"; - this.el.css(kc, "".concat(kb - 15, "px")).show(); - this.contentEl.css(this.vertical ? "width" : "height", "1px").css(kc, "".concat(k9, "px")); - } else { - this.el.scroll(this.vertical ? { - top: 0 - } : { - left: 0 - }); - this.el.hide(); - } - return this; - } - }]); - }(); - var eU = 10; - var eV = function () { - return a8()(function k7() { - var k8 = this; - var k9 = arguments.length > 0 && undefined !== arguments[0] && arguments[0]; - a6()(this, k7); - this.useHideInput = k9; - this.inputChange = function () {}; - this.cornerEl = Object(a9.c)("div", "".concat(cx.a, "-selector-corner")); - this.areaEl = Object(a9.c)("div", "".concat(cx.a, "-selector-area")).child(this.cornerEl).hide(); - this.clipboardEl = Object(a9.c)("div", "".concat(cx.a, "-selector-clipboard")).hide(); - this.autofillEl = Object(a9.c)("div", "".concat(cx.a, "-selector-autofill")).hide(); - this.el = Object(a9.c)("div", "".concat(cx.a, "-selector")).css("z-index", "".concat(eU)).children(this.areaEl, this.clipboardEl, this.autofillEl).hide(); - k9 && (this.hideInput = Object(a9.c)("input").on("compositionend", function (kb) { - k8.inputChange(kb.target.value); - }), this.el.child(this.hideInputDiv = Object(a9.c)("div", "hide-input").child(this.hideInput))); - eU += 1; - }, [{ - key: "setOffset", - value: function (k8) { - this.el.offset(k8).show(); - return this; - } - }, { - key: "hide", - value: function () { - this.el.hide(); - return this; - } - }, { - key: "setAreaOffset", - value: function (k8) { - var k9 = k8.left; - var kb = k8.top; - var kc = { - width: k8.width - 3 + 0.8, - height: k8.height - 3 + 0.8, - left: k9 - 0.8, - top: kb - 0.8 - }; - this.areaEl.offset(kc).show(); - this.useHideInput && (this.hideInputDiv.offset(kc), this.hideInput.val("").focus()); - } - }, { - key: "setClipboardOffset", - value: function (k8) { - var k9 = k8.left; - var kb = k8.top; - var kc = k8.width; - var kd = k8.height; - this.clipboardEl.offset({ - left: k9, - top: kb, - width: kc - 5, - height: kd - 5 - }); - } - }, { - key: "showAutofill", - value: function (k8) { - var k9 = k8.left; - var kb = k8.top; - var kc = k8.width; - var kd = k8.height; - this.autofillEl.offset({ - width: kc - 3, - height: kd - 3, - left: k9, - top: kb - }).show(); - } - }, { - key: "hideAutofill", - value: function () { - this.autofillEl.hide(); - } - }, { - key: "showClipboard", - value: function () { - this.clipboardEl.show(); - } - }, { - key: "hideClipboard", - value: function () { - this.clipboardEl.hide(); - } - }]); - }(); - function eW(k7) { - var k8 = this.data; - var k9 = k7.left; - var kb = k7.top; - var kc = k7.width; - var kd = k7.height; - var kf = k7.scroll; - var kg = k7.l; - var kh = k7.t; - var kj = k8.freezeTotalWidth(); - var kk = k8.freezeTotalHeight(); - var km = k9 - kj; - kj > kg && (km -= kf.x); - var kp = kb - kk; - kk > kh && (kp -= kf.y); - return { - left: km, - top: kp, - width: kc, - height: kd - }; - } - function eX(k7) { - var k8 = this.data; - var k9 = k7.left; - var kb = k7.width; - var kc = k7.height; - var kd = k7.l; - var kf = k7.t; - var kg = k7.scroll; - var kh = k8.freezeTotalWidth(); - var kj = k9 - kh; - kh > kd && (kj -= kg.x); - return { - left: kj, - top: kf, - width: kb, - height: kc - }; - } - function eY(k7) { - var k8 = this.data; - var k9 = k7.top; - var kb = k7.width; - var kc = k7.height; - var kd = k7.l; - var kf = k7.t; - var kg = k7.scroll; - var kh = k8.freezeTotalHeight(); - var kj = k9 - kh; - kh > kf && (kj -= kg.y); - return { - left: kd, - top: kj, - width: kb, - height: kc - }; - } - function eZ(k7) { - this.br.setAreaOffset(eW.call(this, k7)); - } - function f0(k7) { - this.tl.setAreaOffset(k7); - } - function f1(k7) { - this.t.setAreaOffset(eX.call(this, k7)); - } - function f2(k7) { - this.l.setAreaOffset(eY.call(this, k7)); - } - function f3(k7) { - this.l.setClipboardOffset(eY.call(this, k7)); - } - function f4(k7) { - this.br.setClipboardOffset(eW.call(this, k7)); - } - function f5(k7) { - this.tl.setClipboardOffset(k7); - } - function f6(k7) { - this.t.setClipboardOffset(eX.call(this, k7)); - } - function f7(k7) { - eZ.call(this, k7); - f0.call(this, k7); - f1.call(this, k7); - f2.call(this, k7); - } - function f8(k7) { - f4.call(this, k7); - f5.call(this, k7); - f6.call(this, k7); - f3.call(this, k7); - } - var f9 = function () { - return a8()(function k7(k8, k9) { - var kb = this; - a6()(this, k7); - this.inputChange = function () {}; - this.data = k8; - this.br = new eV(true); - this.t = new eV(); - this.l = new eV(); - this.tl = new eV(); - this.br.inputChange = function (kc) { - kb.inputChange(kc); - }; - this.br.hideInput.on("blur", function (kc) { - k9 && k9.blur(); - }).on("focus", function (kc) { - k9 && k9.focus(); - }); - this.br.el.show(); - this.offset = null; - this.areaOffset = null; - this.indexes = null; - this.range = null; - this.arange = null; - this.el = Object(a9.c)("div", "".concat(cx.a, "-selectors")).children(this.tl.el, this.t.el, this.l.el, this.br.el).hide(); - this.lastri = -1; - this.lastci = -1; - eU += 1; - }, [{ - key: "resetData", - value: function (k8) { - this.data = k8; - this.range = k8.selector.range; - this.resetAreaOffset(); - } - }, { - key: "hide", - value: function () { - this.el.hide(); - } - }, { - key: "resetOffset", - value: function () { - var k8 = this.data; - var k9 = this.tl; - var kb = this.t; - var kc = this.l; - var kd = this.br; - var kf = k8.freezeTotalHeight(); - var kg = k8.freezeTotalWidth(); - kf > 0 || kg > 0 ? (k9.setOffset({ - width: kg, - height: kf - }), kb.setOffset({ - left: kg, - height: kf - }), kc.setOffset({ - top: kf, - width: kg - }), kd.setOffset({ - left: kg, - top: kf - })) : (k9.hide(), kb.hide(), kc.hide(), kd.setOffset({ - left: 0, - top: 0 - })); - } - }, { - key: "resetAreaOffset", - value: function () { - var k8 = this.data.getSelectedRect(); - var k9 = this.data.getClipboardRect(); - f7.call(this, k8); - f8.call(this, k9); - this.resetOffset(); - } - }, { - key: "resetBRTAreaOffset", - value: function () { - var k8 = this.data.getSelectedRect(); - var k9 = this.data.getClipboardRect(); - eZ.call(this, k8); - f1.call(this, k8); - f4.call(this, k9); - f6.call(this, k9); - this.resetOffset(); - } - }, { - key: "resetBRLAreaOffset", - value: function () { - var k8 = this.data.getSelectedRect(); - var k9 = this.data.getClipboardRect(); - eZ.call(this, k8); - f2.call(this, k8); - f4.call(this, k9); - f3.call(this, k9); - this.resetOffset(); - } - }, { - key: "set", - value: function (k8, k9) { - var kb = !(arguments.length > 2 && undefined !== arguments[2]) || arguments[2]; - var kc = !(arguments.length > 3 && undefined !== arguments[3]) || arguments[3]; - var kd = this.data; - var kf = kd.calSelectedRangeByStart(k8, k9); - var kg = kf.sri; - var kh = kf.sci; - if (kb) { - var kj = kg; - var kk = kh; - k8 < 0 && (kj = 0); - k9 < 0 && (kk = 0); - kd.selector.setIndexes(kj, kk); - this.indexes = [kj, kk]; - } - (-2 !== k8 || -2 !== k9 || kc) && (this.moveIndexes = [kg, kh], this.range = kf); - -2 !== k8 && -2 !== k9 && kc ? (this.resetAreaOffset(), kd.settings.showSelector && this.el.show()) : this.el.hide(); - } - }, { - key: "setEnd", - value: function (k8, k9) { - var kb = !(arguments.length > 2 && undefined !== arguments[2]) || arguments[2]; - var kc = this.data; - var kd = this.lastri; - var kf = this.lastci; - if (kb) { - if (k8 === kd && k9 === kf) { - return; - } - this.lastri = k8; - this.lastci = k9; - } - this.range = kc.calSelectedRangeByEnd(k8, k9); - f7.call(this, this.data.getSelectedRect()); - } - }, { - key: "reset", - value: function () { - var k8 = this.data.selector.range; - var k9 = k8.eri; - var kb = k8.eci; - this.setEnd(k9, kb); - } - }, { - key: "showAutofill", - value: function (k8, k9) { - if (-1 !== k8 || -1 !== k9) { - var kb = this.range; - var kc = kb.sri; - var kd = kb.sci; - var kf = kb.eri; - var kg = kb.eci; - var kh = k8; - var kj = k9; - var kk = kc - k8; - var km = kf - k8; - var kp = kg - k9; - if (kd - k9 > 0) { - this.arange = new af(kc, kj, kf, kd - 1); - } else { - if (kk > 0) { - this.arange = new af(kh, kd, kc - 1, kg); - } else { - if (kp < 0) { - this.arange = new af(kc, kg + 1, kf, kj); - } else { - if (!(km < 0)) { - return void (this.arange = null); - } - this.arange = new af(kf + 1, kd, kh, kg); - } - } - } - if (null !== this.arange) { - var kq = this.data.getRect(this.arange); - kq.width += 2; - kq.height += 2; - var ku = this.br; - var kv = this.l; - var kw = this.t; - var kx = this.tl; - ku.showAutofill(eW.call(this, kq)); - kv.showAutofill(eY.call(this, kq)); - kw.showAutofill(eX.call(this, kq)); - kx.showAutofill(kq); - } - } - } - }, { - key: "hideAutofill", - value: function () { - var k8 = this; - ["br", "l", "t", "tl"].forEach(function (k9) { - k8[k9].hideAutofill(); - }); - } - }, { - key: "showClipboard", - value: function () { - var k8 = this; - var k9 = this.data.getClipboardRect(); - f8.call(this, k9); - ["br", "l", "t", "tl"].forEach(function (kb) { - k8[kb].showClipboard(); - }); - } - }, { - key: "hideClipboard", - value: function () { - var k8 = this; - ["br", "l", "t", "tl"].forEach(function (k9) { - k8[k9].hideClipboard(); - }); - } - }]); - }(); - function fb(k7) { - k7.preventDefault(); - k7.stopPropagation(); - var k8 = this.filterItems; - k8.length <= 0 || (this.itemIndex >= 0 && k8[this.itemIndex].toggle(), this.itemIndex -= 1, this.itemIndex < 0 && (this.itemIndex = k8.length - 1), k8[this.itemIndex].toggle()); - } - function fc(k7) { - k7.stopPropagation(); - var k8 = this.filterItems; - k8.length <= 0 || (this.itemIndex >= 0 && k8[this.itemIndex].toggle(), this.itemIndex += 1, this.itemIndex > k8.length - 1 && (this.itemIndex = 0), k8[this.itemIndex].toggle()); - } - function fd(k7) { - k7.preventDefault(); - var k8 = this.filterItems; - k8.length <= 0 || (k7.stopPropagation(), this.itemIndex < 0 && (this.itemIndex = 0), k8[this.itemIndex].el.click(), this.hide()); - } - function ff(k7) { - var k8 = k7.keyCode; - switch (k7.ctrlKey && k7.stopPropagation(), k8) { - case 37: - k7.stopPropagation(); - break; - case 38: - fb.call(this, k7); - break; - case 39: - k7.stopPropagation(); - break; - case 40: - fc.call(this, k7); - break; - case 13: - fd.call(this, k7); - break; - case 27: - this.hide(); - break; - case 9: - k7.preventDefault(); - break; - default: - k7.stopPropagation(); - } - } - var fg = function () { - return a8()(function k7(k8, k9) { - var kb = arguments.length > 2 && undefined !== arguments[2] ? arguments[2] : "200px"; - a6()(this, k7); - this.filterItems = []; - this.items = k8; - this.el = Object(a9.c)("div", "".concat(cx.a, "-suggest")).css("width", kb).hide(); - this.itemClick = k9; - this.itemIndex = -1; - }, [{ - key: "setOffset", - value: function (k8) { - this.el.cssRemoveKeys("top", "bottom").offset(k8); - } - }, { - key: "hide", - value: function () { - var k8 = this.el; - this.filterItems = []; - this.itemIndex = -1; - k8.hide(); - this.inputel && Object(bH.g)(this.inputel); - } - }, { - key: "dropShow", - value: function (k8) { - var k9 = this; - this.itemIndex = -1; - var kb = k8.el.getBoundingClientRect(); - var kc = document.documentElement.scrollTop || document.body.scrollTop; - var kd = document.documentElement.scrollLeft || document.body.scrollLeft; - var kf = kb.bottom + kc + 5; - var kg = kb.left + kd; - document.body.appendChild(this.el.el); - this.setOffset({ - left: kg, - top: kf - }); - this.el.show(); - this.inputel = k8; - Object(bH.b)(k8, function () { - k9.hide(); - }); - } - }, { - key: "setItems", - value: function (k8) { - this.items = k8; - } - }, { - key: "search", - value: function (k8) { - var k9 = this; - var kb = this.items; - /^\s*$/.test(k8) || (kb = kb.filter(function (kf) { - return (kf.key || kf).startsWith(k8); - })); - kb = kb.map(function (kf) { - var kg = kf.title; - kg ? "function" == typeof kg && (kg = kg()) : kg = kf; - var kh = Object(a9.c)("div", "".concat(cx.a, "-item")).child(kg).on("click.stop", function () { - k9.itemClick(kf); - k9.hide(); - }); - kf.label && kh.child(Object(a9.c)("div", "label").html(kf.label)); - return kh; - }); - this.filterItems = kb; - var kc; - var kd = this.el; - kb.length > 0 ? (kc = kd.html("")).children.apply(kc, ac()(kb)).show() : kd.html("").show(); - } - }, { - key: "bindInputEvents", - value: function (k8) { - var k9 = this; - k8.on("keydown", function (kb) { - return ff.call(k9, kb); - }); - } - }, { - key: "onInputKeydown", - value: function (k8) { - ff.call(this, k8); - } - }]); - }(); - function fh(k7, k8) { - k7.setMonth(k7.getMonth() + k8); - } - function fj(k7, k8) { - var k9 = new Date(k7); - k9.setDate(k8 - k7.getDay() + 1); - return k9; - } - var fk = function () { - return a8()(function k7(k8) { - var k9; - var kb = this; - a6()(this, k7); - this.value = k8; - this.cvalue = new Date(k8); - this.headerLeftEl = Object(a9.c)("div", "calendar-header-left"); - this.bodyEl = Object(a9.c)("tbody", ""); - this.buildAll(); - this.el = Object(a9.c)("div", "".concat(cx.a, "-calendar")).children(Object(a9.c)("div", "calendar-header").children(this.headerLeftEl, Object(a9.c)("div", "calendar-header-right").children(Object(a9.c)("a", "calendar-prev").on("click.stop", function () { - return kb.prev(); - }).child(new cz("chevron-left")), Object(a9.c)("a", "calendar-next").on("click.stop", function () { - return kb.next(); - }).child(new cz("chevron-right")))), Object(a9.c)("table", "calendar-body").children(Object(a9.c)("thead", "").child((k9 = Object(a9.c)("tr", "")).children.apply(k9, ac()(Object(aB.b)("calendar.weeks").map(function (kc) { - return Object(a9.c)("th", "cell").child(kc); - })))), this.bodyEl)); - this.selectChange = function () {}; - }, [{ - key: "setValue", - value: function (k8) { - this.value = k8; - this.cvalue = new Date(k8); - this.buildAll(); - } - }, { - key: "prev", - value: function () { - fh(this.value, -1); - this.buildAll(); - } - }, { - key: "next", - value: function () { - fh(this.value, 1); - this.buildAll(); - } - }, { - key: "buildAll", - value: function () { - this.buildHeaderLeft(); - this.buildBody(); - } - }, { - key: "buildHeaderLeft", - value: function () { - var k8 = this.value; - this.headerLeftEl.html("".concat(Object(aB.b)("calendar.months")[k8.getMonth()], " ").concat(k8.getFullYear())); - } - }, { - key: "buildBody", - value: function () { - var k8; - var k9 = this; - var kb = this.value; - var kc = this.cvalue; - var kd = this.bodyEl; - var kf = function (kg, kh, kj) { - for (var kk = new Date(kg, kh, 1, 23, 59, 59), km = [[], [], [], [], [], []], kp = 0; kp < 6; kp += 1) { - for (var kq = 0; kq < 7; kq += 1) { - var ku = fj(kk, 7 * kp + kq); - var kv = ku.getMonth() !== kh; - var kw = ku.getMonth() === kj.getMonth() && ku.getDate() === kj.getDate(); - km[kp][kq] = { - d: ku, - disabled: kv, - active: kw - }; - } - } - return km; - }(kb.getFullYear(), kb.getMonth(), kc).map(function (kg) { - var kh; - var kj = kg.map(function (kk) { - var km = "cell"; - kk.disabled && (km += " disabled"); - kk.active && (km += " active"); - return Object(a9.c)("td", "").child(Object(a9.c)("div", km).on("click.stop", function () { - k9.selectChange(kk.d); - }).child(kk.d.getDate().toString())); - }); - return (kh = Object(a9.c)("tr", "")).children.apply(kh, ac()(kj)); - }); - (k8 = kd.html("")).children.apply(k8, ac()(kf)); - } - }]); - }(); - var fm = function () { - return a8()(function k7() { - a6()(this, k7); - this.calendar = new fk(new Date()); - this.el = Object(a9.c)("div", "".concat(cx.a, "-datepicker")).child(this.calendar.el).hide(); - }, [{ - key: "setValue", - value: function (k8) { - var k9 = this.calendar; - "string" == typeof k8 ? /^\d{4}-\d{1,2}-\d{1,2}$/.test(k8) && k9.setValue(new Date(k8.replace(new RegExp("-", "g"), "/"))) : k8 instanceof Date && k9.setValue(k8); - return this; - } - }, { - key: "change", - value: function (k8) { - var k9 = this; - this.calendar.selectChange = function (kb) { - k8(kb); - k9.hide(); - }; - } - }, { - key: "show", - value: function () { - this.el.show(); - } - }, { - key: "hide", - value: function () { - this.el.hide(); - } - }]); - }(); - var fp = a2(53); - var fq = a2.n(fp); - function fu() { - var k7 = this.inputText; - if (!/^\s*$/.test(k7)) { - var k8 = this.textlineEl; - var k9 = this.textEl; - var kb = this.areaOffset; - var kc = k7.split("\n"); - var kd = Math.max.apply(Math, ac()(kc.map(function (km) { - return km.length; - }))); - var kf = k8.offset().width / k7.length; - var kg = (kd + 1) * kf + 5; - var kh = this.viewFn().width - kb.left - kf; - var kj = kc.length; - if (kg > kb.width) { - var kk = kg; - kg > kh && (kk = kh, kj += parseInt(kg / kh, 10), kj += kg % kh > 0 ? 1 : 0); - k9.css("width", "".concat(kk, "px")); - } - (kj *= this.rowHeight) > kb.height && k9.css("height", "".concat(kj, "px")); - } - } - function fv(k7, k8) { - var k9 = k7.target; - var kb = k9.value; - var kc = k9.selectionEnd; - var kd = "".concat(kb.slice(0, kc)).concat(k8).concat(kb.slice(kc)); - k9.value = kd; - k9.getAttribute("type") || k9.setSelectionRange(kc + 1, kc + 1); - this.inputText = kd; - this.textlineEl.html(kd); - fu.call(this); - } - function fw(k7) { - var k8 = k7.keyCode; - var k9 = k7.altKey; - 13 !== k8 && 9 !== k8 && (k7.editorInput = true); - 13 === k8 && k9 && (fv.call(this, k7, "\n"), k7.stopPropagation()); - 13 !== k8 || k9 || k7.preventDefault(); - 38 !== k8 && 40 !== k8 || k9 || k7.preventDefault(); - var kb = this.view; - kb && kb.keydown && kb.keydown(k7); - } - function fx(k7) {} - function fy(k7) { - if (this.inputmask && fq.a.remove(this.textInputEl.el), k7 && k7.column) { - var k8 = k7.column; - var k9 = k8.type; - var kb = k8.format; - k8.editFormat; - "datetime" === k9 ? (this.textEl = this.inputEl, this.textEl.attr("type", "datetime-local"), this.textEl.attr("step", 1)) : "long" === k9 ? (this.inputmask = fq()("integer"), this.inputmask.mask(this.textEl.el)) : "number" === k9 && (this.inputmask = fq()("numeric"), this.inputmask.mask(this.textEl.el)); - } - } - function fz(k7) { - var k8 = k7.target.value; - var k9 = this.suggest; - var kb = this.textlineEl; - var kc = this.validator; - var kd = this.textEl; - var kf = this.cell; - var kg = this.view; - if (null !== kf) { - "editable" in kf && true === kf.editable || undefined === kf.editable ? (this.inputText = k8, kg && kg.search && kg.search(k8, kd), kb.html(k8), fu.call(this), this.isInput = true, this.change("input", k8)) : k7.target.value = ""; - } else { - if (this.inputText = k8, kc) { - "list" === kc.type ? k9.search(k8) : k9.hide(); - } else { - var kh = k8.lastIndexOf("="); - -1 !== kh ? k9.search(k8.substring(kh + 1)) : k9.hide(); - } - kb.html(k8); - fu.call(this); - this.isInput = true; - this.change("input", k8); - } - } - function fA(k7, k8) { - var k9 = this.textEl.el; - setTimeout(function () { - k9.focus(); - k9.getAttribute("type") || k9.setSelectionRange(k7, k8); - }, 0); - } - function fB(k7, k8, k9) { - var kb = this.textEl; - var kc = this.textlineEl; - kb.el.blur(); - kb.val(k7); - kc.html(k7); - undefined === k9 && (k9 = k8); - fA.call(this, k8, k9); - } - function fC(k7) { - var k8 = this.inputText; - var k9 = this.validator; - var kb = 0; - if (k9 && "list" === k9.type) { - this.inputText = k7; - kb = this.inputText.length; - } else { - var kc = k8.lastIndexOf("="); - var kd = k8.substring(0, kc + 1); - var kf = k8.substring(kc + 1); - kf = -1 !== kf.indexOf(")") ? kf.substring(kf.indexOf(")")) : ""; - this.inputText = "".concat(kd + k7.key, "("); - kb = this.inputText.length; - this.inputText += ")".concat(kf); - } - fB.call(this, this.inputText, kb); - } - function fD() { - this.suggest.setItems(this.formulas); - } - var fE = function () { - return a8()(function k7(k8, k9, kb, kc) { - var kd = this; - a6()(this, k7); - this.viewFn = k9; - this.focusObject = kc; - this.rowHeight = kb; - this.formulas = k8; - this.suggest = new fg(k8, function (kf) { - fC.call(kd, kf); - }); - this.datepicker = new fm(); - this.datepicker.change(function (kf) { - kd.setText(function (kg) { - var kh = kg.getMonth() + 1; - var kj = kg.getDate(); - kh < 10 && (kh = "0".concat(kh)); - kj < 10 && (kj = "0".concat(kj)); - return "".concat(kg.getFullYear(), "-").concat(kh, "-").concat(kj); - }(kf)); - kd.clear(); - }); - this.areaEl = Object(a9.c)("div", "".concat(cx.a, "-editor-area")).children(this.textEl = Object(a9.c)("textarea", "input").on("input", function (kf) { - return fz.call(kd, kf); - }).on("contextmenu", function (kf) { - kf.stopPropagation(); - }).on("change", function (kf) { - return fx.call(kd, kf); - }).on("paste.stop", function () {}).on("keydown", function (kf) { - return fw.call(kd, kf); - }), this.inputEl = Object(a9.c)("input", "input").on("input", function (kf) { - return fz.call(kd, kf); - }).on("contextmenu", function (kf) { - kf.stopPropagation(); - }).on("change", function (kf) { - return fx.call(kd, kf); - }).on("paste.stop", function () {}).on("keydown", function (kf) { - return fw.call(kd, kf); - }), this.textlineEl = Object(a9.c)("div", "textline"), this.datepicker.el).on("mousemove.stop", function () {}).on("mousedown.stop", function () {}); - this.el = Object(a9.c)("div", "".concat(cx.a, "-editor")).child(this.areaEl).hide(); - this.textInputEl = this.textEl; - this.textEl.on("blur", function (kf) { - kd.focusObject && kd.focusObject.blur(); - }).on("focus", function (kf) { - kd.focusObject && kd.focusObject.focus(); - }); - this.textInputEl.hide(); - this.textEl = this.inputEl; - this.inputEl.show(); - this.areaOffset = null; - this.freeze = { - w: 0, - h: 0 - }; - this.cell = null; - this.inputText = ""; - this.change = function () {}; - this.ddSelected = function (kf) {}; - }, [{ - key: "setFreezeLengths", - value: function (k8, k9) { - this.freeze.w = k8; - this.freeze.h = k9; - } - }, { - key: "clear", - value: function () { - this.isInput && this.change("finished", this.inputText); - this.isInput = false; - this.cell = null; - this.areaOffset = null; - this.inputText = ""; - this.el.hide(); - this.textEl.val(""); - this.textlineEl.html(""); - fD.call(this); - this.datepicker.hide(); - this.view && (this.view.hideEditor(), delete this.view); - } - }, { - key: "setOffset", - value: function (k8) { - var k9 = arguments.length > 1 && undefined !== arguments[1] ? arguments[1] : "top"; - var kb = this.textInputEl; - var kc = this.inputEl; - var kd = this.areaEl; - this.suggest; - var kf = this.freeze; - var kg = this.el; - if (k8) { - this.areaOffset = k8; - var kh = k8.left; - var kj = k8.top; - var kk = k8.width; - var km = k8.height; - var kp = k8.l; - var kq = k8.t; - var ku = { - left: 0, - top: 0 - }; - kf.w > kp && kf.h > kq || (kf.w < kp && kf.h < kq ? (ku.left = kf.w, ku.top = kf.h) : kf.w > kp ? ku.top = kf.h : kf.h > kq && (ku.left = kf.w)); - kg.offset(ku); - kd.offset({ - left: kh - ku.left - 0.8, - top: kj - ku.top - 0.8 - }); - kb.offset({ - width: kk - 9 + 0.8, - height: km - 3 + 0.8 - }); - kc.offset({ - top: 0, - left: 0, - width: kk - 9 + 0.8, - height: km - 3 + 0.8 - }); - var kv = { - left: 0, - k9: km - }; - this.view && this.view.setOffset && this.view.setOffset(kv); - } - } - }, { - key: "dropDownSelected", - value: function (k8, k9) { - this.inputText = k8; - var kb = this.inputText.length; - fB.call(this, this.inputText, 0, kb); - this.ddSelected(k9); - this.change("finished", this.inputText); - } - }, { - key: "setCell", - value: function (k8, k9, kb) { - var kc = this.el; - this.datepicker; - this.suggest; - kc.show(); - this.cell = k8; - var kd = null; - var kf = kb.selector; - var kg = kf.ri; - var kh = kf.ci; - k8 && k8.edit && kb.report.calc && (kd = kb.viewManager.getViewByRowCol(kg, kh)); - this.textEl.hide(); - this.textEl = this.textInputEl; - !kd && kb.report.calc ? fy.call(this, k8) : fq.a.remove(this.textEl.el); - this.textEl.show(); - var kj = k8 && k8.text || ""; - this.setText(kj); - k8 && k8.limit && kb.report.calc ? this.textEl.attr("maxLength", k8.limit) : this.textEl.removeAttr("maxLength"); - kd ? (kd.showEditor(this), this.view = kd) : delete this.view; - } - }, { - key: "contains", - value: function (k8) { - return !(!this.view || !this.view.contains) && this.view.contains(k8); - } - }, { - key: "setText", - value: function (k8) { - this.inputText = k8; - fB.call(this, k8, k8.length); - fu.call(this); - } - }, { - key: "selectText", - value: function (k8, k9) { - var kb = this.textEl.el; - kb.getAttribute("type") || kb.setSelectionRange(k8, k8 + k9); - } - }]); - }(); - var fF = a2(32); - function fG(k7, k8, k9) { - k8 = cm()(k8); - return cj()(k7, function () { - try { - var kb = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kc) {} - return function () { - return !!kb; - }(); - }() ? Reflect.construct(k8, k9 || [], cm()(k7).constructor) : k8.apply(k7, k9)); - } - var fH = function (k7) { - function k8(k9) { - var kb; - a6()(this, k8); - (kb = fG(this, k8, ["button", "".concat(cx.a, "-image-button")])).html("\n \n ")); - return kb; - } - cq()(k8, k7); - return a8()(k8); - }(a9.a); - function fI(k7, k8) { - var k9 = "undefined" != typeof Symbol && k7[Symbol.iterator] || k7["@@iterator"]; - if (!k9) { - if (Array.isArray(k7) || (k9 = function (kh, kj) { - if (kh) { - if ("string" == typeof kh) { - return fJ(kh, kj); - } - var kk = {}.toString.call(kh).slice(8, -1); - "Object" === kk && kh.constructor && (kk = kh.constructor.name); - return "Map" === kk || "Set" === kk ? Array.from(kh) : "Arguments" === kk || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(kk) ? fJ(kh, kj) : undefined; - } - }(k7)) || k8 && k7 && "number" == typeof k7.length) { - k9 && (k7 = k9); - var kb = 0; - var kc = function () {}; - return { - s: kc, - n: function () { - return kb >= k7.length ? { - done: true - } : { - done: false, - value: k7[kb++] - }; - }, - e: function (kh) { - throw kh; - }, - f: kc - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - var kd; - var kf = true; - var kg = false; - return { - s: function () { - k9 = k9.call(k7); - }, - n: function () { - var kh = k9.next(); - kf = kh.done; - return kh; - }, - e: function (kh) { - kg = true; - kd = kh; - }, - f: function () { - try { - kf || null == k9.return || k9.return(); - } finally { - if (kg) { - throw kd; - } - } - } - }; - } - function fJ(k7, k8) { - (null == k8 || k8 > k7.length) && (k8 = k7.length); - for (var k9 = 0, kb = Array(k8); k9 < k8; k9++) { - kb[k9] = k7[k9]; - } - return kb; - } - var fK = [["A3", 11.69, 16.54], ["A4", 8.27, 11.69], ["A5", 5.83, 8.27], ["B4", 9.84, 13.9], ["B5", 6.93, 9.84], ["Custom", 8.27, 11.69]]; - var fL = ["portrait", "landscape"]; - function fM(k7) { - return parseInt(96 * k7, 10); - } - function fN(k7) { - "cancel" === k7 ? this.hide() : "search" === k7 ? (this.page.range = this.pageRange.val(), this.preview()) : this.toPrint(); - } - function fO(k7, k8) { - var k9 = window.localStorage.getItem("printOption"); - var kb = { - k7: k8 - }; - k9 && (kb = Object.assign(JSON.parse(k9), kb)); - window.localStorage.setItem("printOption", JSON.stringify(kb)); - } - function fP(k7) { - var k8 = this.paper; - var k9 = k7.target.value; - var kb = fK[k9]; - 5 == k9 ? (k8.w = kb[1], k8.h = kb[2]) : (k8.w = fM(kb[1]), k8.h = fM(kb[2])); - fO("paperSize", kb[0]); - this.preview(); - } - function fQ(k7) { - var k8 = this.paper; - var k9 = k7.target.value; - var kb = fL[k9]; - k8.orientation = kb; - fO("orientation", kb); - this.preview(); - } - function fR(k7, k8) { - var k9 = document.createElement("div"); - k9.style.width = k7; - k9.style.height = k8; - k9.style.display = "hidden"; - document.body.appendChild(k9); - var kb = k9.getBoundingClientRect(); - document.body.removeChild(k9); - return { - x: kb.width, - y: kb.height - }; - } - var fS = function () { - return a8()(function k7(k8, k9) { - a6()(this, k7); - this.paper = { - w: fM(fK[1][1]), - h: fM(fK[1][2]), - paddingLeft: 50, - paddingRight: 50, - paddingTop: 50, - paddingBottom: 50, - orientation: fL[0], - get width() { - return "landscape" === this.orientation ? this.h : this.w; - }, - get height() { - return "landscape" === this.orientation ? this.w : this.h; - }, - get drawWidth() { - return this.width - this.paddingRight - this.paddingLeft; - }, - get drawHeight() { - return this.height - this.paddingTop - this.paddingBottom; - } - }; - this.data = k8; - this.sheet = k9; - this.page = { - range: "1-20", - count: 0 - }; - }, [{ - key: "createEl", - value: function () { - var k8; - var k9; - var kb = (k8 = Object(a9.c)("select", "")).children.apply(k8, ac()(fK.map(function (kd, kf) { - return Object(a9.c)("option", "").attr("value", kf).child("".concat(kd[0], " ( ").concat(kd[1], "''x").concat(kd[2], "'' )")); - }))); - kb.el.selectedIndex = 1; - kb.on("change", fP.bind(this)); - this.pageSelect = kb; - var kc = (k9 = Object(a9.c)("select", "")).children.apply(k9, ac()(fL.map(function (kd, kf) { - return Object(a9.c)("option", "").attr("value", kf).child("".concat(Object(aB.b)("print.orientations")[kf])); - }))).on("change", fQ.bind(this)); - this.pageOrientation = kc; - this.pageCount = Object(a9.c)("p"); - this.pageRange = Object(a9.c)("input").attr("placeholder", "例如:1,3,5-10"); - this.pageSearch = Object(a9.c)("button", "".concat(cx.a, "-image-button btnSearch")).html("\n \n \n \n "); - this.pageSearch.on("click", fN.bind(this, "search")); - this.pageRange.val(this.page.range); - this.el = Object(a9.c)("div", "".concat(cx.a, "-print")).children(Object(a9.c)("div", "".concat(cx.a, "-print-bar")).children(Object(a9.c)("div", "-title").child(Object(aB.b)("print.settings")), Object(a9.c)("div", "center").children(Object(a9.c)("p").html("页码范围:"), Object(a9.c)("div", "searchbar").children(this.pageRange, this.pageSearch), this.pageCount), Object(a9.c)("div", "".concat(cx.a, "-buttons")).children(new fH("print").on("click", fN.bind(this, "next")), new fH("close").on("click", fN.bind(this, "cancel")))), Object(a9.c)("div", "".concat(cx.a, "-print-content")).children(this.contentEl = Object(a9.c)("div", "-content"), Object(a9.c)("div", "-sider").child(Object(a9.c)("form", "").children(Object(a9.c)("fieldset", "").children(Object(a9.c)("label", "").child("".concat(Object(aB.b)("print.size"))), kb), Object(a9.c)("fieldset", "").children(Object(a9.c)("label", "").child("".concat(Object(aB.b)("print.orientation"))), kc))))).hide(); - } - }, { - key: "resetData", - value: function (k8) { - this.data = k8; - } - }, { - key: "setOption", - value: function (k8) { - var k9 = this.paper; - k8 || (k8 = {}); - var kb = window.localStorage.getItem("printOption"); - kb && (k8 = Object.assign(JSON.parse(kb), k8)); - var kc = k8; - var kd = kc.orientation; - var kf = kc.paperSize; - var kg = kc.paperUser; - var kh = kc.margin; - var kj = kc.range; - if (kd && (k9.orientation = kd, this.pageOrientation.el.selectedIndex = "landscape" === kd ? 1 : 0), kf && "" !== kf) { - for (var kk = 0; kk < fK.length; ++kk) { - var km = fK[kk]; - if (km[0] === kf) { - if (5 === kk && kg) { - var kp = fR(kg.width, kg.height); - var kq = kp.x; - var ku = kp.y; - k9.w = kq; - k9.h = ku; - } else { - k9.w = fM(km[1]); - k9.h = fM(km[2]); - } - this.pageSelect.el.selectedIndex = kk; - } - } - } - if (kg) { - var kv = fR(kg.width, kg.height); - var kw = kv.x; - var kx = kv.y; - this.pageSelect.el.selectedIndex = 5; - this.pageSelect.el.options[5].innerHTML = "".concat(kg.width, "x").concat(kg.height); - k9.w = kw; - k9.h = kx; - var ky = fK[5]; - ky[1] = kw; - ky[2] = kx; - } - if (kh) { - var kz = kh.left; - var kA = kh.right; - var kB = kh.top; - var kC = kh.bottom; - var kD = fR(kz, kB); - var kE = kD.x; - var kF = kD.y; - kz && "" !== kz && (k9.paddingLeft = kE); - kB && "" !== kB && (k9.paddingTop = kF); - var kG = fR(kA, kC); - var kH = kG.x; - var kI = kG.y; - kA && "" !== kA && (k9.paddingRight = kH); - kC && "" !== kC && (k9.paddingBottom = kI); - } - kj && (this.page.range = kj); - } - }, { - key: "show", - value: function () { - this.el.removeFromParent(); - document.body.appendChild(this.el.el); - this.el.show(); - this.pageCount.html("显示".concat(this.page.showCount, "页,共 ").concat(this.page.count, " 页")); - } - }, { - key: "hide", - value: function () { - this.el.hide(); - this.el.removeFromParent(); - this.sheet && this.sheet.reload(); - } - }, { - key: "preview", - value: function (k8) { - var k9 = this.data; - this.paper; - this.el || this.createEl(); - this.setOption(k8); - var kb = k9.cellView; - var kc = k9.viewManager; - var kd = k9.rows; - var kf = k9.cols; - this.contentEl.html(""); - this.canvases = []; - var kg = function (kw) { - var kx = {}; - if (!kw || "" === kw.trim()) { - return kx; - } - var ky; - var kz = fI(kw.split(",")); - try { - for (kz.s(); !(ky = kz.n()).done;) { - var kA = ky.value; - if (kA.indexOf("-") > 0) { - for (var kB = kA.split("-"), kC = parseInt(kB[0]), kD = parseInt(kB[1]), kE = kC; kE <= kD; ++kE) { - kx[kE] = 1; - } - } else { - var kF = parseInt(kA); - isNaN(kF) || (kx[kF] = 1); - } - } - } catch (kG) { - kz.e(kG); - } finally { - kz.f(); - } - return kx; - }(this.page.range); - var kh = 0; - var kj = 0; - var kk = 0; - for (this.page.count = 0, this.page.showCount = 0;;) { - ++kk; - var km = kb.calcPrintCells(this, kh, kj); - var kp = a4()(km, 2); - var kq = kp[0]; - var ku = kp[1]; - if (kg[kk]) { - ++this.page.showCount; - var kv = kb.getCells(); - kc.resetViews(kv, null, k9, null, function () {}); - this.render(); - } - if (this.page.count = kk, kq === kd.len && ku === kf.len) { - break; - } - if (ku === kf.len) { - kh = kq; - kj = 0; - } else { - if (!(ku > kj)) { - break; - } - kj = ku; - } - } - this.show(); - } - }, { - key: "render", - value: function () { - var k8 = this.data; - var k9 = this.paper; - var kb = k9.width; - var kc = k9.height; - var kd = k9.paddingLeft; - var kf = k9.paddingTop; - var kg = Object(a9.c)("div", "".concat(cx.a, "-canvas-card")); - var kh = Object(a9.c)("canvas", "".concat(cx.a, "-canvas")); - this.canvases.push(kh.el); - var kj = new dd.a(kh.el, kb, kc); - var kk = kd; - var km = kf; - kj.save(); - kj.translate(kk, km); - for (var kp = k8.cellView, kq = kp.viewRange, ku = kp.topRange, kv = kp.leftRange, kw = kp.topLeftRange, kx = function () { - var kB = kz[ky]; - var kC = new Set(); - kB === kq && (kj.save(), kj.ctx.rect(Object(dd.c)(kB.left) - 0.5, Object(dd.c)(kB.top) - 0.5, Object(dd.c)(kB.w) + 1.5, Object(dd.c)(kB.h) + 1.5), kj.ctx.clip()); - kB.each(function (kD, kE) { - Object(fF.b)(kj, k8, kD, kE, 0, kC); - }); - kB === kq && kj.restore(); - }, ky = 0, kz = [kq, ku, kv, kw]; ky < kz.length; ky++) { - kx(); - } - var kA = Object(a9.c)("div", "".concat(cx.a, "-canvas-card-wraper")); - kg.offset({ - width: kb, - height: kc - }); - kA.offset({ - width: kb + 20 - }); - this.contentEl.child(kA.child(kg.child(kh))); - } - }, { - key: "preview1", - value: function () { - var k8 = this; - var k9 = this.data; - var kb = this.paper; - var kc = kb.width; - var kd = kb.height; - var kf = kb.padding; - var kg = kc - 2 * kf; - var kh = kd - 2 * kf; - var kj = k9.contentRange(); - var kk = parseInt(kj.h / kh, 10) + 1; - var km = kg / kj.w; - var kp = kf; - var kq = kf; - km > 1 && (kp += (kg - kj.w) / 2); - var ku = 0; - var kv = 0; - this.contentEl.html(""); - this.canvases = []; - for (var kw = { - sri: 0, - sci: 0, - eri: 0, - eci: 0 - }, kx = function () { - var kz = 0; - var kA = 0; - var kB = Object(a9.c)("div", "".concat(cx.a, "-canvas-card")); - var kC = Object(a9.c)("canvas", "".concat(cx.a, "-canvas")); - k8.canvases.push(kC.el); - var kD = new dd.a(kC.el, kc, kd); - for (kD.save(), kD.translate(kp, kq), km < 1 && kD.scale(km, km); ku <= kj.eri; ku += 1) { - var kE = k9.getHeight(ku); - if (!((kz += kE) < kh)) { - kA = -(kz - kE); - break; - } - for (var kF = 0; kF <= kj.eci; kF += 1) { - Object(fF.b)(kD, k9, ku, kF, kv); - kw.eci = kF; - } - } - kw.eri = ku; - kD.restore(); - kD.save(); - kD.translate(kp, kq); - km < 1 && kD.scale(km, km); - var kG = kv; - k9.eachMergesInView(kw, function (kI) { - var kJ = kI.sri; - var kK = kI.sci; - Object(fF.b)(kD, k9, kJ, kK, kG); - }); - kD.restore(); - kw.sri = kw.eri; - kw.sci = kw.eci; - kv += kA; - var kH = Object(a9.c)("div", "".concat(cx.a, "-canvas-card-wraper")); - kB.offset({ - width: kc, - height: kd - }); - kH.offset({ - width: kc + 20 - }); - k8.contentEl.child(kH.child(kB.child(kC))); - }, ky = 0; ky < kk; ky += 1) { - kx(); - } - this.show(); - } - }, { - key: "toPrint", - value: function () { - this.el.hide(); - var k8 = this.paper; - var k9 = Object(a9.c)("iframe", "").hide(); - var kb = k8.drawHeight; - var kc = k8.drawWidth; - var kd = k8.width; - var kf = k8.height; - var kg = k8.orientation; - var kh = k9.el; - var kj = function () { - var kq = document.createElement("div"); - kq.style.width = "1cm"; - kq.style.height = "1cm"; - kq.style.display = "hidden"; - document.body.appendChild(kq); - var ku = kq.getBoundingClientRect(); - document.body.removeChild(kq); - return { - width: ku.width, - height: ku.height - }; - }(); - window.document.body.appendChild(kh); - var kk = kh.contentWindow; - var km = kk.document; - var kp = document.createElement("style"); - kp.innerHTML = "\n @page { \n size: ".concat((kd / kj.width).toFixed(2), "cm ").concat((kf / kj.height).toFixed(2), "cm ").concat(kg, "; \n margin: 0cm 0cm 0cm 0cm;\n };\n canvas {\n page-break-before: avoid; \n page-break-after: avoid;\n image-rendering: pixelated;\n };\n "); - km.head.appendChild(kp); - this.canvases.forEach(function (kq) { - var ku = kq.cloneNode(false); - new dd.a(ku, kc - 10, kb - 10).drawImage({}, kq, 0, 0); - km.body.appendChild(ku); - }); - kk.print(); - } - }]); - }(); - var fT = [{ - key: "copy", - title: Object(aB.c)("contextmenu.copy"), - label: "Ctrl+C" - }, { - key: "cut", - title: Object(aB.c)("contextmenu.cut"), - label: "Ctrl+X" - }, { - key: "paste", - title: Object(aB.c)("contextmenu.paste"), - label: "Ctrl+V" - }, { - key: "paste-value", - title: Object(aB.c)("contextmenu.pasteValue"), - label: "Ctrl+Shift+V" - }, { - key: "paste-format", - title: Object(aB.c)("contextmenu.pasteFormat"), - label: "Ctrl+Alt+V" - }, { - key: "divider" - }, { - key: "insert-row", - title: Object(aB.c)("contextmenu.insertRow") - }, { - key: "insert-column", - title: Object(aB.c)("contextmenu.insertColumn") - }, { - key: "divider" - }, { - key: "delete-row", - title: Object(aB.c)("contextmenu.deleteRow") - }, { - key: "delete-column", - title: Object(aB.c)("contextmenu.deleteColumn") - }, { - key: "delete-cell-text", - title: Object(aB.c)("contextmenu.deleteCellText") - }, { - key: "hide", - title: Object(aB.c)("contextmenu.hide") - }, { - key: "divider" - }, { - key: "code", - title: Object(aB.c)("contextmenu.code") - }, { - key: "datasource", - title: Object(aB.c)("contextmenu.datasource") - }]; - function fU(k7) { - var k8 = this; - return "divider" === k7.key ? Object(a9.c)("div", "".concat(cx.a, "-item divider")) : Object(a9.c)("div", "".concat(cx.a, "-item")).on("click.stop", function (k9) { - k8.itemClick(k7.key); - k8.hide(); - }).on("mousedown.stop", function (k9) { - k9.preventDefault(); - }).on("mouseup.stop", function (k9) { - k9.preventDefault(); - }).on("contextmenu.stop", function (k9) { - k9.preventDefault(); - }).children("function" == typeof k7.title ? k7.title() : k7.title, Object(a9.c)("div", "label").child(k7.label || "")); - } - function fV(k7) { - var k8 = this; - return k7.map(function (k9) { - return fU.call(k8, k9); - }); - } - function fW(k7) { - k7.instance && (k7.instance.hide(), k7.instance.el.removeFromParent(), delete k7.instance); - } - var fX = function () { - function k7(k8) { - var k9; - var kb = arguments.length > 1 && undefined !== arguments[1] && arguments[1]; - var kc = arguments.length > 2 && undefined !== arguments[2] ? arguments[2] : fT; - a6()(this, k7); - this.menuItems = fV.call(this, kc); - this.el = (k9 = Object(a9.c)("div", "".concat(cx.a, "-contextmenu ").concat(cx.a))).children.apply(k9, ac()(this.menuItems)).hide(); - this.viewFn = k8; - k8 || (this.viewFn = function () { - return { - width: document.documentElement.clientWidth, - height: document.documentElement.clientHeight - }; - }); - this.itemClick = function () {}; - this.isHide = kb; - this.setMode("range"); - this.hideFn = null; - } - return a8()(k7, [{ - key: "setMode", - value: function (k8) {} - }, { - key: "hide", - value: function () { - var k8 = this.el; - k8.hide(); - Object(bH.g)(k8); - k8.removeFromParent(); - } - }, { - key: "show", - value: function (k8) { - document.body.appendChild(this.el.el); - var k9 = k8.pageX - document.body.offsetLeft; - var kb = k8.pageY - document.body.offsetTop; - this.setPosition(k9 + 5, kb); - } - }, { - key: "setPosition", - value: function (k8, k9) { - var kb = this; - if (!this.isHide) { - var kc = this.el; - var kd = kc.show().offset().width; - var kf = this.viewFn(); - var kg = kf.height / 2; - var kh = k8; - kf.width - k8 <= kd && (kh -= kd); - kc.css("left", "".concat(kh, "px")); - k9 > kg ? kc.css("bottom", "".concat(kf.height - k9, "px")).css("max-height", "".concat(k9, "px")).css("top", "auto") : kc.css("top", "".concat(k9, "px")).css("max-height", "".concat(kf.height - k9, "px")).css("bottom", "auto"); - this.hideFn ? Object(bH.b)(kc, function () { - kb.hideFn(k7); - }) : Object(bH.b)(kc); - } - } - }], [{ - key: "showMenu", - value: function (k8, k9, kb) { - fW(k7); - var kc = new k7(null, false, k9); - "function" == typeof kb && (kc.itemClick = kb); - kc.hideFn = function () { - fW(k7); - }; - document.body.appendChild(kc.el.el); - var kd = k8.pageX - document.body.offsetLeft; - var kf = k8.pageY - document.body.offsetTop; - kc.setPosition(kd + 5, kf); - k7.instance = kc; - } - }]); - }(); - var fY = a2(20); - var fZ = a2(21); - function g0(k7, k8, k9) { - k8 = cm()(k8); - return cj()(k7, function () { - try { - var kb = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kc) {} - return function () { - return !!kb; - }(); - }() ? Reflect.construct(k8, k9 || [], cm()(k7).constructor) : k8.apply(k7, k9)); - } - var g1 = function (k7) { - function k8(k9, kb) { - var kc; - a6()(this, k8); - var kd = new cz("align-".concat(kb)); - var kf = k9.map(function (kg) { - return (kh = "align-".concat(kg), Object(a9.c)("div", "".concat(cx.a, "-item")).child(new cz(kh))).on("click", function () { - kc.setTitle(kg); - kc.change(kg); - }); - var kh; - }); - return kc = g0(this, k8, [kd, "auto", true, "bottom-left"].concat(ac()(kf))); - } - cq()(k8, k7); - return a8()(k8, [{ - key: "setTitle", - value: function (k9) { - this.title.setName("align-".concat(k9)); - this.hide(); - } - }]); - }(fZ.a); - function g2(k7, k8, k9) { - k8 = cm()(k8); - return cj()(k7, function () { - try { - var kb = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kc) {} - return function () { - return !!kb; - }(); - }() ? Reflect.construct(k8, k9 || [], cm()(k7).constructor) : k8.apply(k7, k9)); - } - var g3 = function (k7) { - function k8(k9) { - a6()(this, k8); - return g2(this, k8, ["align", "", k9]); - } - cq()(k8, k7); - return a8()(k8, [{ - key: "dropdown", - value: function () { - var k9 = this.value; - return new g1(["left", "center", "right"], k9); - } - }]); - }(fY.a); - function g4(k7, k8, k9) { - k8 = cm()(k8); - return cj()(k7, function () { - try { - var kb = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kc) {} - return function () { - return !!kb; - }(); - }() ? Reflect.construct(k8, k9 || [], cm()(k7).constructor) : k8.apply(k7, k9)); - } - var g5 = function (k7) { - function k8(k9) { - a6()(this, k8); - return g4(this, k8, ["valign", "", k9]); - } - cq()(k8, k7); - return a8()(k8, [{ - key: "dropdown", - value: function () { - var k9 = this.value; - return new g1(["top", "middle", "bottom"], k9); - } - }]); - }(fY.a); - function g6(k7, k8, k9) { - k8 = cm()(k8); - return cj()(k7, function () { - try { - var kb = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kc) {} - return function () { - return !!kb; - }(); - }() ? Reflect.construct(k8, k9 || [], cm()(k7).constructor) : k8.apply(k7, k9)); - } - var g7 = function (k7) { - function k8() { - a6()(this, k8); - return g6(this, k8, ["autofilter"]); - } - cq()(k8, k7); - return a8()(k8, [{ - key: "setState", - value: function () {} - }]); - }(cD); - function g8(k7, k8, k9) { - k8 = cm()(k8); - return cj()(k7, function () { - try { - var kb = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kc) {} - return function () { - return !!kb; - }(); - }() ? Reflect.construct(k8, k9 || [], cm()(k7).constructor) : k8.apply(k7, k9)); - } - var g9 = function (k7) { - function k8() { - a6()(this, k8); - return g8(this, k8, ["font-bold", "Ctrl+B"]); - } - cq()(k8, k7); - return a8()(k8); - }(cD); - function gb(k7, k8, k9) { - k8 = cm()(k8); - return cj()(k7, function () { - try { - var kb = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kc) {} - return function () { - return !!kb; - }(); - }() ? Reflect.construct(k8, k9 || [], cm()(k7).constructor) : k8.apply(k7, k9)); - } - var gc = function (k7) { - function k8() { - a6()(this, k8); - return gb(this, k8, ["font-italic", "Ctrl+I"]); - } - cq()(k8, k7); - return a8()(k8); - }(cD); - function gd(k7, k8, k9) { - k8 = cm()(k8); - return cj()(k7, function () { - try { - var kb = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kc) {} - return function () { - return !!kb; - }(); - }() ? Reflect.construct(k8, k9 || [], cm()(k7).constructor) : k8.apply(k7, k9)); - } - var gf = function (k7) { - function k8() { - a6()(this, k8); - return gd(this, k8, ["strike", "Ctrl+U"]); - } - cq()(k8, k7); - return a8()(k8); - }(cD); - function gg(k7, k8, k9) { - k8 = cm()(k8); - return cj()(k7, function () { - try { - var kb = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kc) {} - return function () { - return !!kb; - }(); - }() ? Reflect.construct(k8, k9 || [], cm()(k7).constructor) : k8.apply(k7, k9)); - } - var gh = function (k7) { - function k8() { - a6()(this, k8); - return gg(this, k8, ["underline", "Ctrl+U"]); - } - cq()(k8, k7); - return a8()(k8); - }(cD); - var gj = ["#ffffff", "#000100", "#e7e5e6", "#445569", "#5b9cd6", "#ed7d31", "#a5a5a5", "#ffc001", "#4371c6", "#71ae47"]; - var gk = [["#f7f7f7", "#7f7f7f", "#d0cecf", "#d5dce4", "#deeaf6", "#fce5d5", "#ededed", "#fff2cd", "#d9e2f3", "#e3efd9"], ["#d3d3d3", "#595959", "#afabac", "#adb8ca", "#bdd7ee", "#f7ccac", "#dbdbdb", "#ffe59a", "#b3c6e7", "#c5e0b3"], ["#bfbfbf", "#3f3f3f", "#756f6f", "#6988b4", "#9cc2e6", "#f4b184", "#c9c9c9", "#fed964", "#8eaada", "#a7d08c"], ["#a5a5a5", "#262626", "#3a3839", "#333f4f", "#2e75b5", "#c45a10", "#7b7b7b", "#bf8e01", "#2f5596", "#538136"], ["#7f7f7f", "#0c0c0c", "#171516", "#222a35", "#1f4e7a", "#843c0a", "#525252", "#7e6000", "#203864", "#365624"]]; - var gm = ["#c00000", "#fe0000", "#fdc101", "#ffff01", "#93d051", "#00b04e", "#01b0f1", "#0170c1", "#012060", "#7030a0"]; - function gp(k7) { - var k8 = this; - return Object(a9.c)("td", "").child(Object(a9.c)("div", "".concat(cx.a, "-color-palette-cell")).on("click.stop", function () { - return k8.change(k7); - }).css("background-color", k7)); - } - var gq = a8()(function k7() { - var k8; - var k9; - var kb; - var kc = this; - a6()(this, k7); - this.el = Object(a9.c)("div", "".concat(cx.a, "-color-palette")); - this.change = function () {}; - var kd = Object(a9.c)("table", "").children((k8 = Object(a9.c)("tbody", "")).children.apply(k8, [(k9 = Object(a9.c)("tr", "".concat(cx.a, "-theme-color-placeholders"))).children.apply(k9, ac()(gj.map(function (kf) { - return gp.call(kc, kf); - })))].concat(ac()(gk.map(function (kf) { - var kg; - return (kg = Object(a9.c)("tr", "".concat(cx.a, "-theme-colors"))).children.apply(kg, ac()(kf.map(function (kh) { - return gp.call(kc, kh); - }))); - })), [(kb = Object(a9.c)("tr", "".concat(cx.a, "-standard-colors"))).children.apply(kb, ac()(gm.map(function (kf) { - return gp.call(kc, kf); - })))]))); - this.el.child(kd); - }); - function gu(k8, k9, kb) { - k9 = cm()(k9); - return cj()(k8, function () { - try { - var kc = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kd) {} - return function () { - return !!kc; - }(); - }() ? Reflect.construct(k9, kb || [], cm()(k8).constructor) : k9.apply(k8, kb)); - } - var gv = function (k8) { - function k9(kb, kc) { - var kd; - a6()(this, k9); - var kf = new cz(kb).css("height", "16px").css("border-bottom", "3px solid ".concat(kc)); - var kg = new gq(); - kg.change = function (kh) { - kd.setTitle(kh); - kd.change(kh); - }; - return kd = gu(this, k9, [kf, "auto", false, "bottom-left", kg.el]); - } - cq()(k9, k8); - return a8()(k9, [{ - key: "setTitle", - value: function (kb) { - this.title.css("border-color", kb); - this.hide(); - } - }]); - }(fZ.a); - function gw(k8, k9, kb) { - k9 = cm()(k9); - return cj()(k8, function () { - try { - var kc = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kd) {} - return function () { - return !!kc; - }(); - }() ? Reflect.construct(k9, kb || [], cm()(k8).constructor) : k9.apply(k8, kb)); - } - var gx = [["thin", ""], ["medium", ""], ["thick", ""], ["dashed", ""], ["dotted", ""]]; - var gy = function (k8) { - function k9(kb) { - var kc; - a6()(this, k9); - var kd = new cz("line-type"); - var kf = 0; - var kg = gx.map(function (kh, kj) { - return Object(a9.c)("div", "".concat(cx.a, "-item state ").concat(kb === kh[0] ? "checked" : "")).on("click", function () { - kg[kf].toggle("checked"); - kg[kj].toggle("checked"); - kf = kj; - kc.hide(); - kc.change(kh); - }).child(Object(a9.c)("div", "".concat(cx.a, "-line-type")).html(kh[1])); - }); - return kc = gw(this, k9, [kd, "auto", false, "bottom-left"].concat(ac()(kg))); - } - cq()(k9, k8); - return a8()(k9); - }(fZ.a); - function gz() { - var k8; - return Object(a9.c)("table", "").child((k8 = Object(a9.c)("tbody", "")).children.apply(k8, arguments)); - } - function gA(k8) { - var k9 = this; - return Object(a9.c)("td", "").child(Object(a9.c)("div", "".concat(cx.a, "-border-palette-cell")).child(new cz("border-".concat(k8))).on("click", function () { - k9.mode = k8; - var kb = k9.mode; - var kc = k9.style; - var kd = k9.color; - k9.change({ - mode: kb, - style: kc, - color: kd - }); - })); - } - var gB = a8()(function k8() { - var k9; - var kb; - var kc = this; - a6()(this, k8); - this.color = "#bfbfbf"; - this.style = "thin"; - this.mode = "all"; - this.change = function () {}; - this.ddColor = new gv("line-color", this.color); - this.ddColor.change = function (kf) { - kc.color = kf; - }; - this.ddType = new gy(this.style); - this.ddType.change = function (kf) { - var kg = a4()(kf, 1)[0]; - kc.style = kg; - }; - this.el = Object(a9.c)("div", "".concat(cx.a, "-border-palette")); - var kd = gz(Object(a9.c)("tr", "").children(Object(a9.c)("td", "".concat(cx.a, "-border-palette-left")).child(gz((k9 = Object(a9.c)("tr", "")).children.apply(k9, ac()(["all", "inside", "horizontal", "vertical", "outside"].map(function (kf) { - return gA.call(kc, kf); - }))), (kb = Object(a9.c)("tr", "")).children.apply(kb, ac()(["left", "top", "right", "bottom", "none"].map(function (kf) { - return gA.call(kc, kf); - }))))), Object(a9.c)("td", "".concat(cx.a, "-border-palette-right")).children(Object(a9.c)("div", "".concat(cx.a, "-toolbar-btn")).child(this.ddColor.el), Object(a9.c)("div", "".concat(cx.a, "-toolbar-btn")).child(this.ddType.el)))); - this.el.child(kd); - }); - function gC(k9, kb, kc) { - kb = cm()(kb); - return cj()(k9, function () { - try { - var kd = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kf) {} - return function () { - return !!kd; - }(); - }() ? Reflect.construct(kb, kc || [], cm()(k9).constructor) : kb.apply(k9, kc)); - } - var gD = function (k9) { - function kb() { - var kc; - a6()(this, kb); - var kd = new cz("border-all"); - var kf = new gB(); - kf.change = function (kg) { - kc.change(kg); - kc.hide(); - }; - return kc = gC(this, kb, [kd, "auto", false, "bottom-left", kf.el]); - } - cq()(kb, k9); - return a8()(kb); - }(fZ.a); - function gE(k9, kb, kc) { - kb = cm()(kb); - return cj()(k9, function () { - try { - var kd = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kf) {} - return function () { - return !!kd; - }(); - }() ? Reflect.construct(kb, kc || [], cm()(k9).constructor) : kb.apply(k9, kc)); - } - var gF = function (k9) { - function kb() { - a6()(this, kb); - return gE(this, kb, ["border"]); - } - cq()(kb, k9); - return a8()(kb, [{ - key: "dropdown", - value: function () { - return new gD(); - } - }]); - }(fY.a); - function gG(k9, kb, kc) { - kb = cm()(kb); - return cj()(k9, function () { - try { - var kd = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kf) {} - return function () { - return !!kd; - }(); - }() ? Reflect.construct(kb, kc || [], cm()(k9).constructor) : kb.apply(k9, kc)); - } - var gH = function (k9) { - function kb() { - a6()(this, kb); - return gG(this, kb, arguments); - } - cq()(kb, k9); - return a8()(kb, [{ - key: "element", - value: function () { - var kc = this; - return cv()(cm()(kb.prototype), "element", this).call(this).child(new cz(this.tag)).on("click", function () { - return kc.change(kc.tag); - }); - } - }, { - key: "setState", - value: function (kc) { - this.el.disabled(kc); - } - }]); - }(cw.a); - function gI(k9, kb, kc) { - kb = cm()(kb); - return cj()(k9, function () { - try { - var kd = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kf) {} - return function () { - return !!kd; - }(); - }() ? Reflect.construct(kb, kc || [], cm()(k9).constructor) : kb.apply(k9, kc)); - } - var gJ = function (k9) { - function kb() { - a6()(this, kb); - return gI(this, kb, ["clearformat"]); - } - cq()(kb, k9); - return a8()(kb); - }(gH); - function gK(k9, kb, kc) { - kb = cm()(kb); - return cj()(k9, function () { - try { - var kd = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kf) {} - return function () { - return !!kd; - }(); - }() ? Reflect.construct(kb, kc || [], cm()(k9).constructor) : kb.apply(k9, kc)); - } - var gL = function (k9) { - function kb() { - a6()(this, kb); - return gK(this, kb, ["paintformat"]); - } - cq()(kb, k9); - return a8()(kb, [{ - key: "setState", - value: function () {} - }]); - }(cD); - function gM(k9, kb, kc) { - kb = cm()(kb); - return cj()(k9, function () { - try { - var kd = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kf) {} - return function () { - return !!kd; - }(); - }() ? Reflect.construct(kb, kc || [], cm()(k9).constructor) : kb.apply(k9, kc)); - } - var gN = function (k9) { - function kb(kc) { - a6()(this, kb); - return gM(this, kb, ["color", undefined, kc]); - } - cq()(kb, k9); - return a8()(kb, [{ - key: "dropdown", - value: function () { - var kc = this.tag; - var kd = this.value; - return new gv(kc, kd); - } - }]); - }(fY.a); - function gO(k9, kb, kc) { - kb = cm()(kb); - return cj()(k9, function () { - try { - var kd = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kf) {} - return function () { - return !!kd; - }(); - }() ? Reflect.construct(kb, kc || [], cm()(k9).constructor) : kb.apply(k9, kc)); - } - var gP = function (k9) { - function kb(kc) { - a6()(this, kb); - return gO(this, kb, ["bgcolor", undefined, kc]); - } - cq()(kb, k9); - return a8()(kb, [{ - key: "dropdown", - value: function () { - var kc = this.tag; - var kd = this.value; - return new gv(kc, kd); - } - }]); - }(fY.a); - function gQ(k9, kb, kc) { - kb = cm()(kb); - return cj()(k9, function () { - try { - var kd = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kf) {} - return function () { - return !!kd; - }(); - }() ? Reflect.construct(kb, kc || [], cm()(k9).constructor) : kb.apply(k9, kc)); - } - var gR = function (k9) { - function kb() { - var kc; - a6()(this, kb); - var kd = cG.b.map(function (kf) { - return Object(a9.c)("div", "".concat(cx.a, "-item")).on("click", function () { - kc.setTitle("".concat(kf.pt)); - kc.change(kf); - }).child("".concat(kf.pt)); - }); - return kc = gQ(this, kb, ["10", "60px", true, "bottom-left"].concat(ac()(kd))); - } - cq()(kb, k9); - return a8()(kb); - }(fZ.a); - function gS(k9, kb, kc) { - kb = cm()(kb); - return cj()(k9, function () { - try { - var kd = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kf) {} - return function () { - return !!kd; - }(); - }() ? Reflect.construct(kb, kc || [], cm()(k9).constructor) : kb.apply(k9, kc)); - } - var gT = function (k9) { - function kb() { - a6()(this, kb); - return gS(this, kb, ["font-size"]); - } - cq()(kb, k9); - return a8()(kb, [{ - key: "getValue", - value: function (kc) { - return kc.pt; - } - }, { - key: "dropdown", - value: function () { - return new gR(); - } - }]); - }(fY.a); - var gU = a2(51); - var gV = a2(28); - function gW(k9, kb, kc) { - kb = cm()(kb); - return cj()(k9, function () { - try { - var kd = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kf) {} - return function () { - return !!kd; - }(); - }() ? Reflect.construct(kb, kc || [], cm()(k9).constructor) : kb.apply(k9, kc)); - } - var gX = function (k9) { - function kb() { - var kc; - a6()(this, kb); - var kd = gV.a.slice(0); - kd.splice(2, 0, { - key: "divider" - }); - kd.splice(9, 0, { - key: "divider" - }); - kd = kd.map(function (kf) { - var kg = Object(a9.c)("div", "".concat(cx.a, "-item")); - "divider" === kf.key ? kg.addClass("divider") : (kg.child(kf.title()).on("click", function () { - kc.setTitle(kf.title()); - kc.change(kf); - }), kf.label && kg.child(Object(a9.c)("div", "label").html(kf.label))); - return kg; - }); - return kc = gW(this, kb, ["Normal", "220px", true, "bottom-left"].concat(ac()(kd))); - } - cq()(kb, k9); - return a8()(kb, [{ - key: "setTitle", - value: function (kc) { - for (var kd = 0; kd < gV.a.length; kd += 1) { - gV.a[kd].key === kc && this.title.html(gV.a[kd].title()); - } - this.hide(); - } - }]); - }(fZ.a); - function gY(k9, kb, kc) { - kb = cm()(kb); - return cj()(k9, function () { - try { - var kd = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kf) {} - return function () { - return !!kd; - }(); - }() ? Reflect.construct(kb, kc || [], cm()(k9).constructor) : kb.apply(k9, kc)); - } - var gZ = function (k9) { - function kb() { - a6()(this, kb); - return gY(this, kb, ["format"]); - } - cq()(kb, k9); - return a8()(kb, [{ - key: "getValue", - value: function (kc) { - return kc.key; - } - }, { - key: "dropdown", - value: function () { - return new gX(); - } - }]); - }(fY.a); - var h0 = a2(29); - function h1(k9, kb, kc) { - kb = cm()(kb); - return cj()(k9, function () { - try { - var kd = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kf) {} - return function () { - return !!kd; - }(); - }() ? Reflect.construct(kb, kc || [], cm()(k9).constructor) : kb.apply(k9, kc)); - } - var h2 = function (k9) { - function kb() { - var kc; - a6()(this, kb); - var kd = h0.a.map(function (kf) { - return Object(a9.c)("div", "".concat(cx.a, "-item")).on("click", function () { - kc.hide(); - kc.change(kf); - }).child(kf.key); - }); - return kc = h1(this, kb, [new cz("formula"), "180px", true, "bottom-left"].concat(ac()(kd))); - } - cq()(kb, k9); - return a8()(kb); - }(fZ.a); - function h3(k9, kb, kc) { - kb = cm()(kb); - return cj()(k9, function () { - try { - var kd = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kf) {} - return function () { - return !!kd; - }(); - }() ? Reflect.construct(kb, kc || [], cm()(k9).constructor) : kb.apply(k9, kc)); - } - var h4 = function (k9) { - function kb() { - a6()(this, kb); - return h3(this, kb, ["formula"]); - } - cq()(kb, k9); - return a8()(kb, [{ - key: "getValue", - value: function (kc) { - return kc.key; - } - }, { - key: "dropdown", - value: function () { - return new h2(); - } - }]); - }(fY.a); - function h5(k9, kb, kc) { - kb = cm()(kb); - return cj()(k9, function () { - try { - var kd = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kf) {} - return function () { - return !!kd; - }(); - }() ? Reflect.construct(kb, kc || [], cm()(k9).constructor) : kb.apply(k9, kc)); - } - var h6 = function (k9) { - function kb() { - a6()(this, kb); - return h5(this, kb, ["freeze"]); - } - cq()(kb, k9); - return a8()(kb); - }(cD); - function h7(k9, kb, kc) { - kb = cm()(kb); - return cj()(k9, function () { - try { - var kd = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kf) {} - return function () { - return !!kd; - }(); - }() ? Reflect.construct(kb, kc || [], cm()(k9).constructor) : kb.apply(k9, kc)); - } - var h8 = function (k9) { - function kb() { - a6()(this, kb); - return h7(this, kb, ["redo", "Ctrl+Y"]); - } - cq()(kb, k9); - return a8()(kb); - }(gH); - function h9(k9, kb, kc) { - kb = cm()(kb); - return cj()(k9, function () { - try { - var kd = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kf) {} - return function () { - return !!kd; - }(); - }() ? Reflect.construct(kb, kc || [], cm()(k9).constructor) : kb.apply(k9, kc)); - } - var hb = function (k9) { - function kb() { - a6()(this, kb); - return h9(this, kb, ["undo", "Ctrl+Z"]); - } - cq()(kb, k9); - return a8()(kb); - }(gH); - function hc(k9, kb, kc) { - kb = cm()(kb); - return cj()(k9, function () { - try { - var kd = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kf) {} - return function () { - return !!kd; - }(); - }() ? Reflect.construct(kb, kc || [], cm()(k9).constructor) : kb.apply(k9, kc)); - } - var hd = function (k9) { - function kb() { - a6()(this, kb); - return hc(this, kb, ["print", "Ctrl+P"]); - } - cq()(kb, k9); - return a8()(kb); - }(gH); - function hf(k9, kb, kc) { - kb = cm()(kb); - return cj()(k9, function () { - try { - var kd = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kf) {} - return function () { - return !!kd; - }(); - }() ? Reflect.construct(kb, kc || [], cm()(k9).constructor) : kb.apply(k9, kc)); - } - var hg = function (k9) { - function kb() { - a6()(this, kb); - return hf(this, kb, ["textwrap"]); - } - cq()(kb, k9); - return a8()(kb); - }(cD); - function hh(k9, kb, kc) { - kb = cm()(kb); - return cj()(k9, function () { - try { - var kd = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kf) {} - return function () { - return !!kd; - }(); - }() ? Reflect.construct(kb, kc || [], cm()(k9).constructor) : kb.apply(k9, kc)); - } - var hj = function (k9) { - function kb() { - var kc; - a6()(this, kb); - var kd = new cz("ellipsis"); - var kf = Object(a9.c)("div", "".concat(cx.a, "-toolbar-more")); - (kc = hh(this, kb, [kd, "auto", false, "bottom-right", kf])).moreBtns = kf; - kc.contentEl.css("max-width", "420px"); - return kc; - } - cq()(kb, k9); - return a8()(kb); - }(fZ.a); - var hk = function (k9) { - function kb() { - var kc; - a6()(this, kb); - (kc = hh(this, kb, ["more"])).el.hide(); - return kc; - } - cq()(kb, k9); - return a8()(kb, [{ - key: "dropdown", - value: function () { - return new hj(); - } - }, { - key: "show", - value: function () { - this.el.show(); - } - }, { - key: "hide", - value: function () { - this.el.hide(); - } - }]); - }(fY.a); - function hm(k9, kb, kc) { - kb = cm()(kb); - return cj()(k9, function () { - try { - var kd = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kf) {} - return function () { - return !!kd; - }(); - }() ? Reflect.construct(kb, kc || [], cm()(k9).constructor) : kb.apply(k9, kc)); - } - var hp = function (k9) { - function kb() { - a6()(this, kb); - return hm(this, kb, arguments); - } - cq()(kb, k9); - return a8()(kb, [{ - key: "element", - value: function () { - var kc = this; - return cv()(cm()(kb.prototype), "element", this).call(this).child(new cB(this.tag)).on("click", function () { - return kc.change(kc.tag); - }); - } - }, { - key: "setState", - value: function (kc) { - this.el.disabled(kc); - } - }]); - }(cw.a); - function hq() { - return Object(a9.c)("div", "".concat(cx.a, "-toolbar-divider")); - } - function hu() { - var k9 = this; - this.btns2 = []; - this.items.forEach(function (kb) { - if (Array.isArray(kb)) { - kb.forEach(function (kh) { - var kj = kh.el; - var kk = kj.box(); - var km = kj.computedStyle(); - var kp = km.marginLeft; - var kq = km.marginRight; - k9.btns2.push([kj, kk.width + parseInt(kp, 10) + parseInt(kq, 10)]); - }); - } else { - var kc = kb.box(); - var kd = kb.computedStyle(); - var kf = kd.marginLeft; - var kg = kd.marginRight; - k9.btns2.push([kb, kc.width + parseInt(kf, 10) + parseInt(kg, 10)]); - } - }); - } - function hv() { - var k9; - var kb; - var kc = this.el; - var kd = this.btns; - var kf = this.moreEl; - var kg = this.btns2; - var kh = kf.dd; - var kj = kh.moreBtns; - var kk = kh.contentEl; - kc.css("width", "".concat(this.widthFn() - 60, "px")); - var km = kc.box(); - var kp = 160; - var kq = 12; - var ku = []; - var kv = []; - kg.forEach(function (kw, kx) { - var ky = a4()(kw, 2); - var kz = ky[0]; - var kA = ky[1]; - kp += kA; - kx === kg.length - 1 || kp < km.width ? ku.push(kz) : (kq += kA, kv.push(kz)); - }); - (k9 = kd.html("")).children.apply(k9, ku); - (kb = kj.html("")).children.apply(kb, kv); - kk.css("width", "".concat(kq, "px")); - kv.length > 0 ? kf.show() : kf.hide(); - } - var hw = function () { - return a8()(function k9(kb, kc) { - var kd = this; - a6()(this, k9); - this.data = kb; - this.change = function () {}; - this.widthFn = kc; - this.isHide = !kb.settings.showToolbar; - var kf = kb.defaultStyle(); - this.items = [[this.saveEl = new gH("save"), this.calcEl = new cD("calc"), this.dbEl = new hp("db")], hq(), [this.undoEl = new hb(), this.redoEl = new h8(), new hd(), this.paintformatEl = new gL(), this.clearformatEl = new gJ()], hq(), [this.formatEl = new gZ()], hq(), [this.fontEl = new gU.a(), this.fontSizeEl = new gT()], hq(), [this.boldEl = new g9(), this.italicEl = new gc(), this.underlineEl = new gh(), this.strikeEl = new gf(), this.textColorEl = new gN(kf.color)], hq(), [this.fillColorEl = new gP(kf.bgcolor), this.borderEl = new gF(), this.mergeEl = new cF()], hq(), [this.alignEl = new g3(kf.align), this.valignEl = new g5(kf.valign), this.textwrapEl = new hg()], hq(), [this.freezeEl = new h6(), this.moreEl = new hk()]]; - this.autofilterEl = new g7(); - this.formulaEl = new h4(); - this.el = Object(a9.c)("div", "".concat(cx.a, "-toolbar")); - this.btns = Object(a9.c)("div", "".concat(cx.a, "-toolbar-btns")); - this.items.forEach(function (kg) { - Array.isArray(kg) ? kg.forEach(function (kh) { - kd.btns.child(kh.el); - kh.change = function () { - kd.change.apply(kd, arguments); - }; - }) : kd.btns.child(kg.el); - }); - this.el.child(this.btns); - this.reset(); - setTimeout(function () { - hu.call(kd); - hv.call(kd); - }, 0); - Object(bH.a)(window, "resize", function () { - hv.call(kd); - }); - this.isHide && this.el.hide(); - }, [{ - key: "paintformatActive", - value: function () { - return this.paintformatEl.active(); - } - }, { - key: "paintformatToggle", - value: function () { - this.paintformatEl.toggle(); - } - }, { - key: "trigger", - value: function (kb) { - this["".concat(kb, "El")].click(); - } - }, { - key: "resetData", - value: function (kb) { - var kc = this; - this.data = kb; - this.isHide = !kb.settings.showToolbar; - this.isHide ? this.el.hide() : (this.el.show(), hu.call(this), hv.call(this), setTimeout(function () { - hu.call(kc); - hv.call(kc); - }, 0)); - this.reset(); - } - }, { - key: "reset", - value: function () { - if (!this.isHide) { - var kb = this.data; - var kc = kb.getSelectedCellStyle(); - this.undoEl.setState(!kb.canUndo()); - this.redoEl.setState(!kb.canRedo()); - this.mergeEl.setState(kb.canUnmerge(), !kb.selector.multiple()); - this.autofilterEl.setState(!kb.canAutofilter()); - var kd = kc.font; - var kf = kc.format; - this.formatEl.setState(kf); - this.fontEl.setState(kd.name); - this.fontSizeEl.setState(kd.size); - this.boldEl.setState(kd.bold); - this.italicEl.setState(kd.italic); - this.underlineEl.setState(kc.underline); - this.strikeEl.setState(kc.strike); - this.textColorEl.setState(kc.color); - this.fillColorEl.setState(kc.bgcolor); - this.alignEl.setState(kc.align); - this.valignEl.setState(kc.valign); - this.textwrapEl.setState(kc.textwrap); - this.freezeEl.setState(kb.freezeIsActive()); - this.calcEl.setState(kb.calcIsActive()); - } - } - }]); - }(); - var hx = function () { - return a8()(function k9(kb, kc) { - var kd; - var kf = this; - var kg = arguments.length > 2 && undefined !== arguments[2] ? arguments[2] : {}; - a6()(this, k9); - this.title = kb; - var kh = undefined === kg.titlebar || !!kg.titlebar; - var kj = undefined === kg.resizeAble ? kh : kg.resizeAble; - var kk = !!kg.maximized; - var km = undefined === kg.width ? "600px" : kg.width; - var kp = Object(a9.c)("div", "".concat(cx.a, "-modal-header")).children(new cz("close").on("click.stop", function () { - return kf.hide(); - }), this.title); - this.el = Object(a9.c)("div", "".concat(cx.a, "-modal")).css("width", km).children(kp, (kd = Object(a9.c)("div", "".concat(cx.a, "-modal-content"))).children.apply(kd, ac()(kc))).hide(); - kk && (this.el.css("width", document.documentElement.clientWidth - 2 + "px"), this.el.css("height", document.documentElement.clientHeight - 2 + "px")); - kh || kp.hide(); - hy(this.el.el, kj); - }, [{ - key: "resize", - value: function (kb, kc) { - this.el.offset({ - width: kb, - height: kc - }); - } - }, { - key: "move", - value: function (kb, kc) { - this.el.offset({ - left: kb, - top: kc - }); - } - }, { - key: "show", - value: function (kb) { - var kc = this; - this.callback = kb; - this.dimmer = Object(a9.c)("div", "".concat(cx.a, "-dimmer active")); - document.body.appendChild(this.dimmer.el); - this.el.removeFromParent(); - this.dimmer.child(this.el); - var kd = this.el.show(true).box(); - var kf = kd.width; - var kg = kd.height; - var kh = document.documentElement; - var kj = kh.clientHeight; - var kk = kh.clientWidth; - this.el.offset({ - left: (kk - kf) / 2, - top: (kj - kg) / 3 - }); - setTimeout(function () { - var km = kc.el.el.clientWidth; - var kp = kc.el.el.clientHeight; - kc.el.offset({ - left: (kk - km) / 2, - top: (kj - kp) / 3, - height: kp - }); - }, 10); - } - }, { - key: "hide", - value: function (kb) { - this.el.hide(); - document.body.removeChild(this.dimmer.el); - Object(bH.f)(window, "keydown", window.xkeydownEsc); - delete window.xkeydownEsc; - this.dimmer = null; - this.callback && (undefined !== kb ? this.callback(kb) : this.callback(true)); - } - }]); - }(); - function hy(k9) { - var kb = !(arguments.length > 1 && undefined !== arguments[1]) || arguments[1]; - var kc = 200; - var kd = 100; - var kf = k9.querySelector(".".concat(cx.a, "-modal-header")); - var kg = k9; - kf.style.cssText += ";cursor:move;"; - window.document.currentStyle; - if (kf.onmousedown = function (kv) { - var kw = kg.offsetTop; - var kx = kg.offsetLeft; - var ky = kv.clientX; - var kz = kv.clientY; - document.onmousemove = function (kA) { - var kB = kw + kA.clientY - kz; - var kC = kx + kA.clientX - ky; - kB < 0 && (kB = 0); - kg.style.top = "".concat(kB, "px"); - kg.style.left = "".concat(kC, "px"); - }; - document.onmouseup = function () { - document.onmousemove = null; - document.onmouseup = null; - }; - }, kb) { - var kh = document.createElement("div"); - kg.appendChild(kh); - kh.style.cursor = "se-resize"; - kh.style.position = "absolute"; - kh.style.height = "10px"; - kh.style.width = "10px"; - kh.style.right = "0px"; - kh.style.bottom = "0px"; - kh.style.zIndex = "99"; - kh.onmousedown = function (kv) { - var kw = kv.clientX; - var kx = kv.clientY; - var ky = kg.clientWidth; - var kz = kg.clientHeight; - document.onmousemove = function (kA) { - kA.preventDefault(); - var kB = ky + (kA.clientX - kw); - var kC = kz + (kA.clientY - kx); - kg.style.width = "".concat(kB > kc ? kB : kc, "px"); - kg.style.height = "".concat(kC > kd ? kC : kd, "px"); - }; - document.onmouseup = function (kA) { - document.onmousemove = null; - document.onmouseup = null; - }; - }; - var kj = document.createElement("div"); - kg.appendChild(kj); - kj.style.cursor = "sw-resize"; - kj.style.position = "absolute"; - kj.style.height = "10px"; - kj.style.width = "10px"; - kj.style.left = "0px"; - kj.style.bottom = "0px"; - kj.style.zIndex = "99"; - kj.onmousedown = function (kv) { - var kw = kv.clientX; - var kx = kv.clientY; - var ky = kg.clientWidth; - var kz = kg.clientHeight; - document.onmousemove = function (kA) { - kA.preventDefault(); - var kB = ky - (kA.clientX - kw); - var kC = kz + (kA.clientY - kx); - kg.style.width = "".concat(kB > kc ? kB : kc, "px"); - kg.style.height = "".concat(kC > kd ? kC : kd, "px"); - kg.style.left = "".concat(kA.clientX, "px"); - }; - document.onmouseup = function (kA) { - document.onmousemove = null; - document.onmouseup = null; - }; - }; - var kk = document.createElement("div"); - kg.appendChild(kk); - kk.style.cursor = "nw-resize"; - kk.style.position = "absolute"; - kk.style.height = "10px"; - kk.style.width = "10px"; - kk.style.left = "0px"; - kk.style.Top = "0px"; - kk.style.zIndex = "99"; - kk.onmousedown = function (kv) { - var kw = kv.clientX; - var kx = kv.clientY; - var ky = kg.clientWidth; - var kz = kg.clientHeight; - document.onmousemove = function (kA) { - kA.preventDefault(); - var kB = ky - (kA.clientX - kw); - var kC = kz - (kA.clientY - kx); - kg.style.width = "".concat(kB > kc ? kB : kc, "px"); - kg.style.height = "".concat(kC > kd ? kC : kd, "px"); - kg.style.left = "".concat(kB > kc ? kA.clientX : ky + kw - kc, "px"); - kg.style.top = "".concat(kC > kd ? kA.clientY : kz + kx - kd, "px"); - }; - document.onmouseup = function (kA) { - document.onmousemove = null; - document.onmouseup = null; - }; - }; - var km = document.createElement("div"); - kg.appendChild(km); - km.style.cursor = "ne-resize"; - km.style.position = "absolute"; - km.style.height = "10px"; - km.style.width = "10px"; - km.style.right = "0px"; - km.style.Top = "0px"; - km.style.zIndex = "99"; - km.onmousedown = function (kv) { - var kw = kv.clientX; - var kx = kv.clientY; - var ky = kg.clientWidth; - var kz = kg.clientHeight; - document.onmousemove = function (kA) { - kA.preventDefault(); - var kB = ky + (kA.clientX - kw); - var kC = kz - (kA.clientY - kx); - kg.style.width = "".concat(kB > kc ? kB : kc, "px"); - kg.style.height = "".concat(kC > kd ? kC : kd, "px"); - kg.style.top = "".concat(kC > kd ? kA.clientY : kz + kx - kd, "px"); - }; - document.onmouseup = function (kA) { - document.onmousemove = null; - document.onmouseup = null; - }; - }; - var kp = document.createElement("div"); - kg.appendChild(kp); - kp.style.cursor = "w-resize"; - kp.style.position = "absolute"; - kp.style.height = "100%"; - kp.style.width = "3px"; - kp.style.right = "0px"; - kp.style.top = "0px"; - kp.onmousedown = function (kv) { - var kw = kg.clientWidth; - var kx = kg.offsetLeft; - var ky = kv.clientX; - document.onmousemove = function (kz) { - kz.preventDefault(); - ky > kx + kw - 10 && ky < kx + kw && (ky > kz.clientX && (kg.clientWidth < kc || (kg.style.width = "".concat(kw - (ky - kz.clientX), "px"))), ky < kz.clientX && (kg.style.width = "".concat(kw + (kz.clientX - ky), "px"))); - }; - document.onmouseup = function (kz) { - document.onmousemove = null; - document.onmouseup = null; - }; - }; - var kq = document.createElement("div"); - kg.appendChild(kq); - kq.style.cursor = "w-resize"; - kq.style.position = "absolute"; - kq.style.height = "100%"; - kq.style.width = "3px"; - kq.style.left = "0px"; - kq.style.top = "0px"; - kq.onmousedown = function (kv) { - var kw = kv.clientX; - var kx = kg.clientWidth; - document.onmousemove = function (ky) { - ky.preventDefault(); - var kz = kx - (ky.clientX - kw); - kz > kc && (kg.style.width = "".concat(kz, "px"), kg.style.left = "".concat(ky.clientX, "px")); - }; - document.onmouseup = function (ky) { - document.onmousemove = null; - document.onmouseup = null; - }; - }; - var ku = document.createElement("div"); - kg.appendChild(ku); - ku.style.cursor = "n-resize"; - ku.style.position = "absolute"; - ku.style.height = "3px"; - ku.style.width = "100%"; - ku.style.left = "0px"; - ku.style.bottom = "0px"; - ku.onmousedown = function (kv) { - var kw = kg.offsetTop; - var kx = k9.scrollTop; - var ky = kv.clientY; - var kz = kg.clientHeight; - document.onmousemove = function (kA) { - kA.preventDefault(); - kx + ky > kw + kz - 20 && kx + ky < kw + kz && (ky > kA.clientY && (kg.clientHeight < kd || (kg.style.height = "".concat(kz - (ky - kA.clientY), "px"))), ky < kA.clientY && (kg.style.height = "".concat(kz + (kA.clientY - ky), "px"))); - }; - document.onmouseup = function (kA) { - document.onmousemove = null; - document.onmouseup = null; - }; - }; - } - } - var hz = function () { - return a8()(function k9(kb, kc) { - var kd = this; - a6()(this, k9); - this.vchange = function () {}; - this.el = Object(a9.c)("div", "".concat(cx.a, "-form-input")); - this.input = Object(a9.c)("input").css("width", kb).on("input", function (kf) { - return kd.vchange(kf); - }).attr("placeholder", kc); - this.el.child(this.input); - }, [{ - key: "focus", - value: function () { - var kb = this; - setTimeout(function () { - kb.input.el.focus(); - }, 10); - } - }, { - key: "hint", - value: function (kb) { - this.input.attr("placeholder", kb); - } - }, { - key: "val", - value: function (kb) { - return this.input.val(kb); - } - }]); - }(); - var hA = function () { - return a8()(function k9(kb, kc, kd) { - var kf = this; - var kg = arguments.length > 3 && undefined !== arguments[3] ? arguments[3] : function (kj) { - return kj; - }; - var kh = arguments.length > 4 && undefined !== arguments[4] ? arguments[4] : function () {}; - a6()(this, k9); - this.key = kb; - this.getTitle = kg; - this.vchange = function () {}; - this.el = Object(a9.c)("div", "".concat(cx.a, "-form-select")); - this.suggest = new fg(kc.map(function (kj) { - return { - key: kj, - title: kf.getTitle(kj) - }; - }), function (kj) { - kf.itemClick(kj.key); - kh(kj.key); - kf.vchange(kj.key); - }, kd, this.el); - this.el.children(this.itemEl = Object(a9.c)("div", "input-text").html(this.getTitle(kb)), this.suggest.el).on("click", function () { - return kf.show(); - }); - }, [{ - key: "show", - value: function () { - this.suggest.search(""); - } - }, { - key: "itemClick", - value: function (kb) { - this.key = kb; - this.itemEl.html(this.getTitle(kb)); - } - }, { - key: "val", - value: function (kb) { - return undefined !== kb ? (this.key = kb, this.itemEl.html(this.getTitle(kb)), this) : this.key; - } - }]); - }(); - var hB = { - number: /(^\d+$)|(^\d+(\.\d{0,4})?$)/, - date: /^\d{4}-\d{1,2}-\d{1,2}$/ - }; - var hC = function () { - return a8()(function k9(kb, kc, kd, kf) { - var kg = this; - a6()(this, k9); - this.label = ""; - this.rule = kc; - kd && (this.label = Object(a9.c)("label", "label").css("width", "".concat(kf, "px")).html(kd)); - this.tip = Object(a9.c)("div", "tip").child("tip").hide(); - this.input = kb; - this.input.vchange = function () { - return kg.validate(); - }; - this.el = Object(a9.c)("div", "".concat(cx.a, "-form-field")).children(this.label, kb.el, this.tip); - }, [{ - key: "isShow", - value: function () { - return "none" !== this.el.css("display"); - } - }, { - key: "show", - value: function () { - this.el.show(); - } - }, { - key: "hide", - value: function () { - this.el.hide(); - return this; - } - }, { - key: "val", - value: function (kb) { - return this.input.val(kb); - } - }, { - key: "hint", - value: function (kb) { - this.input.hint(kb); - } - }, { - key: "validate", - value: function () { - var kb = this.input; - var kc = this.rule; - var kd = this.tip; - var kf = this.el; - var kg = kb.val(); - if (kc.required && /^\s*$/.test(kg)) { - kd.html(Object(aB.b)("validation.required")); - kf.addClass("error"); - return false; - } - if ((kc.type || kc.pattern) && !(kc.pattern || hB[kc.type]).test(kg)) { - kd.html(Object(aB.b)("validation.notMatch")); - kf.addClass("error"); - return false; - } - kf.removeClass("error"); - return true; - } - }]); - }(); - function hD(k9, kb, kc) { - kb = cm()(kb); - return cj()(k9, function () { - try { - var kd = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kf) {} - return function () { - return !!kd; - }(); - }() ? Reflect.construct(kb, kc || [], cm()(k9).constructor) : kb.apply(k9, kc)); - } - var hE = function (k9) { - function kb(kc) { - var kd; - var kf = arguments.length > 1 && undefined !== arguments[1] ? arguments[1] : ""; - a6()(this, kb); - (kd = hD(this, kb, ["div", "".concat(cx.a, "-button ").concat(kf)])).child(Object(aB.b)("button.".concat(kc))); - return kd; - } - cq()(kb, k9); - return a8()(kb); - }(a9.a); - function hF(k9, kb, kc) { - kb = cm()(kb); - return cj()(k9, function () { - try { - var kd = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kf) {} - return function () { - return !!kd; - }(); - }() ? Reflect.construct(kb, kc || [], cm()(k9).constructor) : kb.apply(k9, kc)); - } - var hG = function (k9) { - function kb() { - var kc; - a6()(this, kb); - var kd = new hC(new hA("cell", ["cell"], "100%", function (kq) { - return Object(aB.b)("dataValidation.modeType.".concat(kq)); - }), { - required: true - }, "".concat(Object(aB.b)("dataValidation.range"), ":"), 100); - var kf = new hC(new hz("120px", "E3 or E3:F12"), { - required: true, - pattern: /^([A-Z]{1,2}[1-9]\d*)(:[A-Z]{1,2}[1-9]\d*)?$/ - }); - var kg = new hC(new hA("list", ["list", "number", "date", "phone", "email"], "100%", function (kq) { - return Object(aB.b)("dataValidation.type.".concat(kq)); - }, function (kq) { - return kc.criteriaSelected(kq); - }), { - required: true - }, "".concat(Object(aB.b)("dataValidation.criteria"), ":"), 100); - var kh = new hC(new hA("be", ["be", "nbe", "eq", "neq", "lt", "lte", "gt", "gte"], "160px", function (kq) { - return Object(aB.b)("dataValidation.operator.".concat(kq)); - }, function (kq) { - return kc.criteriaOperatorSelected(kq); - }), { - required: true - }).hide(); - var kj = new hC(new hz("70px", "10"), { - required: true - }).hide(); - var kk = new hC(new hz("70px", "100"), { - required: true, - type: "number" - }).hide(); - var km = new hC(new hz("120px", "a,b,c"), { - required: true - }); - var kp = new hC(new hz("70px", "10"), { - required: true, - type: "number" - }).hide(); - (kc = hF(this, kb, [Object(aB.b)("contextmenu.validation"), [Object(a9.c)("div", "".concat(cx.a, "-form-fields")).children(kd.el, kf.el), Object(a9.c)("div", "".concat(cx.a, "-form-fields")).children(kg.el, kh.el, kj.el, kk.el, kp.el, km.el), Object(a9.c)("div", "".concat(cx.a, "-buttons")).children(new hE("cancel").on("click", function () { - return kc.btnClick("cancel"); - }), new hE("remove").on("click", function () { - return kc.btnClick("remove"); - }), new hE("save", "primary").on("click", function () { - return kc.btnClick("save"); - }))]])).mf = kd; - kc.rf = kf; - kc.cf = kg; - kc.of = kh; - kc.minvf = kj; - kc.maxvf = kk; - kc.vf = kp; - kc.svf = km; - kc.change = function () {}; - return kc; - } - cq()(kb, k9); - return a8()(kb, [{ - key: "showVf", - value: function (kc) { - var kd = "date" === kc ? "2018-11-12" : "10"; - var kf = this.vf; - kf.input.hint(kd); - kf.show(); - } - }, { - key: "criteriaSelected", - value: function (kc) { - var kd = this.of; - var kf = this.minvf; - var kg = this.maxvf; - var kh = this.vf; - var kj = this.svf; - "date" === kc || "number" === kc ? (kd.show(), kf.rule.type = kc, kg.rule.type = kc, "date" === kc ? (kf.hint("2018-11-12"), kg.hint("2019-11-12")) : (kf.hint("10"), kg.hint("100")), kf.show(), kg.show(), kh.hide(), kj.hide()) : ("list" === kc ? kj.show() : kj.hide(), kh.hide(), kd.hide(), kf.hide(), kg.hide()); - } - }, { - key: "criteriaOperatorSelected", - value: function (kc) { - if (kc) { - var kd = this.minvf; - var kf = this.maxvf; - var kg = this.vf; - if ("be" === kc || "nbe" === kc) { - kd.show(); - kf.show(); - kg.hide(); - } else { - var kh = this.cf.val(); - kg.rule.type = kh; - "date" === kh ? kg.hint("2018-11-12") : kg.hint("10"); - kg.show(); - kd.hide(); - kf.hide(); - } - } - } - }, { - key: "btnClick", - value: function (kc) { - if ("cancel" === kc) { - this.hide(); - } else { - if ("remove" === kc) { - this.change("remove"); - this.hide(); - } else { - if ("save" === kc) { - for (var kd = ["mf", "rf", "cf", "of", "svf", "vf", "minvf", "maxvf"], kf = 0; kf < kd.length; kf += 1) { - var kg = this[kd[kf]]; - if (kg.isShow() && !kg.validate()) { - return; - } - } - var kh = this.mf.val(); - var kj = this.rf.val(); - var kk = this.cf.val(); - var km = this.of.val(); - var kp = this.svf.val(); - "number" !== kk && "date" !== kk || (kp = "be" === km || "nbe" === km ? [this.minvf.val(), this.maxvf.val()] : this.vf.val()); - this.change("save", kh, kj, { - type: kk, - operator: km, - required: false, - value: kp - }); - this.hide(); - } - } - } - } - }, { - key: "setValue", - value: function (kc) { - if (kc) { - var kd = this.mf; - var kf = this.rf; - var kg = this.cf; - var kh = this.of; - var kj = this.svf; - var kk = this.vf; - var km = this.minvf; - var kp = this.maxvf; - var kq = kc.mode; - var ku = kc.ref; - var kv = kc.validator || { - type: "list" - }; - var kw = kv.type; - var kx = kv.operator; - var ky = kv.value; - kd.val(kq || "cell"); - kf.val(ku); - kg.val(kw); - kh.val(kx); - Array.isArray(ky) ? (km.val(ky[0]), kp.val(ky[1])) : (kj.val(ky || ""), kk.val(ky || "")); - this.criteriaSelected(kw); - this.criteriaOperatorSelected(kx); - } - this.show(); - } - }]); - }(hx); - function hH(k9) { - return Object(a9.c)("div", "".concat(cx.a, "-item ").concat(k9)); - } - function hI(k9) { - var kb = this; - return hH("state").child(Object(aB.b)("sort.".concat(k9))).on("click.stop", function () { - return kb.itemClick(k9); - }); - } - function hJ(k9) { - var kb = this; - var kc = this.filterbEl; - var kd = this.filterValues; - kc.html(""); - Object.keys(k9).forEach(function (kf, kg) { - var kh = k9[kf]; - var kj = kd.includes(kf) ? "checked" : ""; - kc.child(Object(a9.c)("div", "".concat(cx.a, "-item state ").concat(kj)).on("click.stop", function () { - return kb.filterClick(kg, kf); - }).children("" === kf ? Object(aB.b)("filter.empty") : kf, Object(a9.c)("div", "label").html("(".concat(kh, ")")))); - }); - } - function hK() { - var k9 = this.filterhEl; - var kb = this.filterValues; - var kc = this.values; - k9.html("".concat(kb.length, " / ").concat(kc.length)); - k9.checked(kb.length === kc.length); - } - var hL = function () { - return a8()(function k9() { - var kb = this; - a6()(this, k9); - this.filterbEl = Object(a9.c)("div", "".concat(cx.a, "-body")); - this.filterhEl = Object(a9.c)("div", "".concat(cx.a, "-header state")).on("click.stop", function () { - return kb.filterClick(0, "all"); - }); - this.el = Object(a9.c)("div", "".concat(cx.a, "-sort-filter")).children(this.sortAscEl = hI.call(this, "asc"), this.sortDescEl = hI.call(this, "desc"), hH("divider"), Object(a9.c)("div", "".concat(cx.a, "-filter")).children(this.filterhEl, this.filterbEl), Object(a9.c)("div", "".concat(cx.a, "-buttons")).children(new hE("cancel").on("click", function () { - return kb.btnClick("cancel"); - }), new hE("ok", "primary").on("click", function () { - return kb.btnClick("ok"); - }))).hide(); - this.ci = null; - this.sortDesc = null; - this.values = null; - this.filterValues = []; - }, [{ - key: "btnClick", - value: function (kb) { - if ("ok" === kb) { - var kc = this.ci; - var kd = this.sort; - var kf = this.filterValues; - this.ok && this.ok(kc, kd, "in", kf); - } - this.hide(); - } - }, { - key: "itemClick", - value: function (kb) { - this.sort = kb; - var kc = this.sortAscEl; - var kd = this.sortDescEl; - kc.checked("asc" === kb); - kd.checked("desc" === kb); - } - }, { - key: "filterClick", - value: function (kb, kc) { - var kd = this.filterbEl; - var kf = this.filterValues; - var kg = this.values; - var kh = kd.children(); - "all" === kc ? kh.length === kf.length ? (this.filterValues = [], kh.forEach(function (kj) { - return Object(a9.c)(kj).checked(false); - })) : (this.filterValues = Array.from(kg), kh.forEach(function (kj) { - return Object(a9.c)(kj).checked(true); - })) : Object(a9.c)(kh[kb]).toggle("checked") ? kf.push(kc) : kf.splice(kf.findIndex(function (kj) { - return kj === kc; - }), 1); - hK.call(this); - } - }, { - key: "set", - value: function (kb, kc, kd, kf) { - this.ci = kb; - var kg = this.sortAscEl; - var kh = this.sortDescEl; - null !== kf ? (this.sort = kf.order, kg.checked(kf.asc()), kh.checked(kf.desc())) : (this.sortDesc = null, kg.checked(false), kh.checked(false)); - this.values = Object.keys(kc); - this.filterValues = kd ? Array.from(kd.value) : Object.keys(kc); - hJ.call(this, kc, kd); - hK.call(this); - } - }, { - key: "setOffset", - value: function (kb) { - var kc = this; - this.el.offset(kb).show(); - var kd = 1; - Object(bH.b)(this.el, function () { - kd <= 0 && kc.hide(); - kd -= 1; - }); - } - }, { - key: "show", - value: function () { - this.el.show(); - } - }, { - key: "hide", - value: function () { - this.el.hide(); - Object(bH.g)(this.el); - } - }]); - }(); - function hM(k9, kb) { - var kc = Object(a9.c)("div", "".concat(cx.a, "-toast")); - var kd = Object(a9.c)("div", "".concat(cx.a, "-dimmer active")); - kc.children(Object(a9.c)("div", "".concat(cx.a, "-toast-header")).children(new cz("close").on("click.stop", function () { - document.body.removeChild(kc.el); - return void document.body.removeChild(kd.el); - }), k9), Object(a9.c)("div", "".concat(cx.a, "-toast-content")).html(kb)); - document.body.appendChild(kc.el); - document.body.appendChild(kd.el); - var kf = kc.box(); - var kg = kf.width; - var kh = kf.height; - var kj = document.documentElement; - var kk = kj.clientHeight; - var km = kj.clientWidth; - kc.offset({ - left: (km - kg) / 2, - top: (kk - kh) / 3 - }); - } - function hN(k9) { - var kb = this.data; - var kc = kb.fixedRowHeight(); - var kd = 0; - var kf = kc; - if (k9 < 0) { - return { - left: 0, - top: kd, - width: 25, - height: kf - }; - } - var kg = kb.freeze; - kb.report; - var kh = kb.scroll; - return k9 < a4()(kg, 1)[0] ? { - left: 0, - top: kd = kc + kb.sumActualHeight(0, k9), - width: 25, - height: kf = kb.getHeight(k9) - } : k9 < kh.ri ? { - left: 0, - top: -100, - width: 25, - height: kf - } : { - left: 0, - top: kd = kc + kb.freezeTotalHeight() + kb.sumActualHeight(kh.ri, k9), - width: 25, - height: kf = kb.getHeight(k9) - }; - } - function hO() { - var k9 = this; - var kb = this.parentEL; - kb && this.resizer.forEach(function (kk) { - kb.removeChild(kk.el); - }); - this.resizer = []; - var kc = this.data.report._data.bands; - kc = kc.filter(function (kk) { - return "top" !== kk.name && "bottom" !== kk.name; - }); - for (var kd = function () { - var kk = 0 === kf ? null : kc[kf - 1]; - var km = kc[kf]; - k9.resizer[kf] = new eS(false, k9.data.rows.minHeight, true); - k9.resizer[kf].finishedFn = function (kp, kq, ku) { - if (k9.finishedFn) { - var kv = km.name; - var kw = k9.data.getCellRowByY(ku, 0).ri; - var kx = null === kk ? 0 : kk.start; - var ky = km.start + km.len; - kw < kx ? kw = kx : kw > ky && (kw = ky); - km.start = kw; - km.len = ky - kw; - kk && (kk.len = kw - kx); - k9.finishedFn(kv, ku); - } - }; - }, kf = 0; kf < kc.length; ++kf) { - kd(); - } - var kg = kc.length; - if (kg > 0) { - var kh = kc[kg - 1]; - var kj = new eS(false, this.data.rows.minHeight, true); - this.resizer[kg] = kj; - kj.finishedFn = function (kk, km, kp) { - var kq = kh.name; - var ku = k9.data.getCellRowByY(kp, 0).ri; - var kv = kh.start; - var kw = k9.data.rows.len; - -2 === ku ? ku = kw : ku < kv ? ku = kv : ku > kw && (ku = kw); - kh.len = ku - kv; - k9.finishedFn(kq, kp); - }; - } - kb && this.resizer.forEach(function (kk) { - kb.children(kk.el); - }); - } - var hP = function () { - return a8()(function k9(kb) { - a6()(this, k9); - this.data = kb; - kb.report._data.bands; - this.resizer = []; - this.finishedFn = null; - hO.call(this); - }, [{ - key: "addTo", - value: function (kb) { - this.parentEL = kb; - this.resizer.forEach(function (kc) { - kb.children(kc.el); - }); - } - }, { - key: "resetData", - value: function (kb) { - this.data = kb; - hO.call(this); - } - }, { - key: "show", - value: function () { - var kb = this.resizer; - var kc = this.data; - var kd = kc.settings.showFixedRowHeader; - var kf = kc.report; - kc.scroll; - kc.freeze; - if (kd && kf && !kc.calcIsActive()) { - var kg = { - width: kc.viewWidth() - }; - var kh = kc.report._data.bands; - kh = kh.filter(function (kw) { - return "top" !== kw.name && "bottom" !== kw.name; - }); - for (var kj = 0; kj < kh.length; kj++) { - var kk = kh[kj]; - var km = kk.len; - var kp = kk.start; - if (km > 0) { - var kq = hN.call(this, kp - 1); - this.resizer[kj].show(kq, kg); - } else { - this.resizer[kj].hide(); - } - } - if (kh.length > 0) { - var ku = kh[kh.length - 1]; - var kv = hN.call(this, ku.start + ku.len - 1); - this.resizer[kh.length].show(kv, kg); - } - } else { - kb.forEach(function (kw) { - kw.hide(); - }); - } - } - }]); - }(); - function hQ(k9, kb) { - var kc = "undefined" != typeof Symbol && k9[Symbol.iterator] || k9["@@iterator"]; - if (!kc) { - if (Array.isArray(k9) || (kc = function (kk, km) { - if (kk) { - if ("string" == typeof kk) { - return hR(kk, km); - } - var kp = {}.toString.call(kk).slice(8, -1); - "Object" === kp && kk.constructor && (kp = kk.constructor.name); - return "Map" === kp || "Set" === kp ? Array.from(kk) : "Arguments" === kp || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(kp) ? hR(kk, km) : undefined; - } - }(k9)) || kb && k9 && "number" == typeof k9.length) { - kc && (k9 = kc); - var kd = 0; - var kf = function () {}; - return { - s: kf, - n: function () { - return kd >= k9.length ? { - done: true - } : { - done: false, - value: k9[kd++] - }; - }, - e: function (kk) { - throw kk; - }, - f: kf - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - var kg; - var kh = true; - var kj = false; - return { - s: function () { - kc = kc.call(k9); - }, - n: function () { - var kk = kc.next(); - kh = kk.done; - return kk; - }, - e: function (kk) { - kj = true; - kg = kk; - }, - f: function () { - try { - kh || null == kc.return || kc.return(); - } finally { - if (kj) { - throw kg; - } - } - } - }; - } - function hR(k9, kb) { - (null == kb || kb > k9.length) && (kb = k9.length); - for (var kc = 0, kd = Array(kb); kc < kb; kc++) { - kd[kc] = k9[kc]; - } - return kd; - } - function hS(k9, kb, kc) { - kb = cm()(kb); - return cj()(k9, function () { - try { - var kd = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kf) {} - return function () { - return !!kd; - }(); - }() ? Reflect.construct(kb, kc || [], cm()(k9).constructor) : kb.apply(k9, kc)); - } - var hT = { - processing: 1, - table: { - retrieve: "test1", - update: "test1", - columns: [{ - name: "name", - dbname: "name", - type: "string", - update: true - }, { - name: "label", - dbname: "label", - type: "string", - update: true - }, { - name: "type", - dbname: "type", - type: "string", - update: true, - values: [{ - key: "string", - value: "string" - }, { - key: "long", - value: "long" - }, { - key: "number", - value: "number" - }, { - key: "datetime", - value: "datetime" - }, { - key: "blob", - value: "blob" - }] - }, { - name: "initvalue", - dbname: "dbname", - type: "string", - update: true - }, { - name: "dbname", - dbname: "dbname", - type: "string", - update: true - }, { - name: "uniquekey", - dbname: "uniquekey", - type: "long", - update: true, - values: [{ - key: "是", - value: 1 - }, { - key: "否", - value: 0 - }] - }, { - name: "updateable", - dbname: "updateable", - type: "long", - update: true, - values: [{ - key: "是", - value: 1 - }, { - key: "否", - value: 0 - }] - }] - }, - reportData: { - name: "sheet1", - freeze: "A2", - styles: [{ - border: { - bottom: ["thin", "#bfbfbf"], - top: ["thin", "#bfbfbf"], - left: ["thin", "#bfbfbf"], - right: ["thin", "#bfbfbf"] - }, - align: "center" - }, { - border: { - bottom: ["thin", "#bfbfbf"], - top: ["thin", "#bfbfbf"], - left: ["thin", "#bfbfbf"], - right: ["thin", "#bfbfbf"] - } - }], - merges: [], - rows: { - 0: { - height: 36, - cells: { - 0: { - text: "name", - style: 0 - }, - 1: { - text: "lable", - style: 0 - }, - 2: { - text: "type", - style: 0 - }, - 3: { - text: "initvalue", - style: 0 - }, - 4: { - text: "dbname", - style: 0 - }, - 5: { - text: "uniquekey", - style: 0 - }, - 6: { - text: "updateable", - style: 0 - } - } - }, - 1: { - height: 28, - cells: { - 0: { - text: "#{name}", - style: 1 - }, - 1: { - text: "#{label}", - style: 1 - }, - 2: { - text: "#{type}", - style: 1, - edit: { - style: "dropdownlistbox" - } - }, - 3: { - text: "#{initvalue}", - style: 1 - }, - 4: { - text: "#{dbname}", - style: 1 - }, - 5: { - text: "#{uniquekey}", - style: 1, - edit: { - style: "checkbox", - attrs: { - text: "", - on: 1, - off: 0 - } - } - }, - 6: { - text: "#{updateable}", - style: 1, - edit: { - style: "checkbox", - attrs: { - text: "", - on: 1, - off: 0 - } - } - } - } - }, - len: 2, - height: 25, - minHeight: 5 - }, - cols: { - len: 6 - }, - report: { - calc: false, - bands: [{ - start: 0, - len: 1, - name: "header" - }, { - start: 1, - len: 1, - name: "detail" - }] - }, - validations: [], - autofilter: {} - } - }; - var hU = JSON.stringify({ - processing: 1, - table: { - retrieve: "test1", - update: "test1", - columns: [] - } - }); - var hV = function (k9) { - function kb(kd) { - var kf; - a6()(this, kb); - var kg = Object(a9.c)("textarea"); - kg.css("width", "100%"); - kg.css("height", "100px"); - kg.css("border", "1.5px solid lightgray"); - var kh = Object(a9.c)("div"); - kh.css("width", "100%"); - kh.css("height", "300px"); - kh.css("border", "1.5px solid lightgray"); - kh.css("overflow", "hidden"); - kh.css("margin-bottom", "5px"); - var kj = new hC(new hz("70px", ""), { - required: false - }, "Table to Update", 100); - var kk = new hC(new hz("70px", ""), { - required: false - }, "CreateCols", 70); - kk.val(0); - var km = new DataWindow(kh.el); - if ((kf = hS(this, kb, [Object(aB.b)("contextmenu.datasource"), [kg, Object(a9.c)("div", "".concat(cx.a, "-form-fields")).children(kj.el, kk.el), kh, Object(a9.c)("div", "".concat(cx.a, "-buttons")).children(new hE("query").on("click", function () { - return kf.btnQuery(); - }), new hE("reset").on("click", function () { - return kf.btnReset(); - }), new hE("apply", "primary").on("click", function () { - return kf.btnApply(); - }))], { - width: "700px" - }])).sqlInput = kg, kf.fCols = kk, kf.dwEdit = km, kf.dwEdit.dataObject = hT, kf.fTable = kj, kf.dw = kd, kd) { - var kp = kd.dataObject; - var kq = kp.table.retrieve; - kf.sql = kq; - kf.sqlInput.val(kq); - kf.dataobject = kp; - kf.parseObject(kp); - } - return kf; - } - cq()(kb, k9); - return a8()(kb, [{ - key: "parseObject", - value: function (kd) { - var kf = this.dwEdit; - kf.reset(); - kd.table.update && this.fTable.input.val(kd.table.update); - var kg; - var kh = hQ(kd.table.columns); - try { - for (kh.s(); !(kg = kh.n()).done;) { - var kj = kg.value; - var kk = kf.insertRow(0); - var km = kj.name; - var kp = kj.label; - var kq = kj.type; - var ku = kj.initvalue; - var kv = kj.dbname; - var kw = kj.update; - var kx = kj.key ? 1 : 0; - var ky = kw ? 1 : 0; - var kz = kp || km; - kf.setItem(kk, { - name: km, - label: kz, - type: kq, - initvalue: ku, - dbname: kv, - uniquekey: kx, - updateable: ky - }); - } - } catch (kA) { - kh.e(kA); - } finally { - kh.f(); - } - } - }, { - key: "setObject", - value: function (kd) { - var kf = this.dw; - var kg = this.sqlInput.val(); - kd.table.retrieve = kg; - var kh = this.fTable.input.val(); - kd.table.update = kh; - var kj = this.getColumns(); - kd.table.columns = kj; - kd.createCols = parseInt(this.fCols.val()); - kf.dataObject = kd; - } - }, { - key: "btnQuery", - value: (kc = aM()(aO.a.mark(function kd() { - var kf; - var kg; - return aO.a.wrap(function (kh) { - for (;;) { - switch (kh.prev = kh.next) { - case 0: - kf = this.sqlInput.val(); - kh.prev = 1; - kh.next = 4; - return dwSyntaxFromSQL(kf); - case 4: - kg = kh.sent; - this.dataobject = kg; - this.parseObject(kg); - kh.next = 12; - break; - case 9: - kh.prev = 9; - kh.t0 = kh.catch(1); - alert(kh.t0); - case 12: - case "end": - return kh.stop(); - } - } - }, kd, this, [[1, 9]]); - })), function () { - return kc.apply(this, arguments); - }) - }, { - key: "btnReset", - value: function () { - var kf = JSON.parse(hU); - this.setObject(kf); - } - }, { - key: "btnApply", - value: function () { - var kf = this.dw.dataObject; - this.setObject(kf); - } - }, { - key: "getColumns", - value: function () { - for (var kf = this.dwEdit, kg = [], kh = kf.rowCount(), kj = 1; kj <= kh; ++kj) { - var kk = kf.getItem(kj, "name"); - var km = kf.getItem(kj, "label"); - var kp = kf.getItem(kj, "type"); - var kq = kf.getItem(kj, "initvalue"); - var ku = kf.getItem(kj, "dbname"); - var kv = kf.getItem(kj, "uniquekey") ? 1 : 0; - var kw = kf.getItem(kj, "updateable") ? 1 : 0; - undefined !== kq && "string" == typeof kq && ("long" === kp ? kq = parseInt(kq) : "number" === kp && (kq = Number(kq))); - kg.push({ - name: kk, - label: km, - type: kp, - initvalue: kq, - dbname: ku, - key: kv, - update: kw - }); - } - return kg; - } - }]); - var kc; - }(hx); - function hW(k9, kb, kc) { - kb = cm()(kb); - return cj()(k9, function () { - try { - var kd = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kf) {} - return function () { - return !!kd; - }(); - }() ? Reflect.construct(kb, kc || [], cm()(k9).constructor) : kb.apply(k9, kc)); - } - var hX = function (k9) { - function kb(kc) { - var kd; - a6()(this, kb); - var kf = Object(a9.c)("textarea"); - if (kf.css("width", "100%"), kf.css("height", "500px"), kf.css("border", "1.5px solid lightgray"), kf.css("wrap", "off"), (kd = hW(this, kb, [Object(aB.b)("contextmenu.code"), [kf, Object(a9.c)("div", "".concat(cx.a, "-buttons")).children(new hE("cancel").on("click", function () { - return kd.hide(); - }), new hE("apply", "primary").on("click", function () { - return kd.btnClick("apply"); - }))], { - width: "800px" - }])).input = kf, kd.dw = kc, kd.dw) { - var kg = JSON.stringify(kc.dataObject, null, 4); - kf.el.value = kg; - } - return kd; - } - cq()(kb, k9); - return a8()(kb, [{ - key: "btnClick", - value: function (kc) { - this.dw && (this.dw.dataObject = JSON.parse(this.input.el.value)); - } - }]); - }(hx); - function hY(k9, kb) { - var kc; - var kd = this; - return function () { - for (var kf = kd, kg = arguments.length, kh = new Array(kg), kj = 0; kj < kg; kj++) { - kh[kj] = arguments[kj]; - } - var kk = kh; - kc || (kc = setTimeout(function () { - kc = null; - k9.apply(kf, kk); - }, kb)); - }; - } - function hZ() { - var k9 = this.data; - var kb = this.verticalScrollbar; - var kc = this.horizontalScrollbar; - var kd = k9.getSelectedRect(); - var kf = kd.l; - var kg = kd.t; - var kh = kd.left; - var kj = kd.top; - var kk = kd.width; - var km = kd.height; - var kp = this.getTableOffset(); - if (Math.abs(kh) + kk > kp.width) { - kc.move({ - left: kf + kk - kp.width - }); - } else { - var kq = k9.freezeTotalWidth(); - kh < kq && kc.move({ - left: kf - 1 - kq - }); - } - if (Math.abs(kj) + km > kp.height) { - kb.move({ - top: kg + km - kp.height - 1 - }); - } else { - var ku = k9.freezeTotalHeight(); - kj < ku && kb.move({ - top: kg - 1 - ku - }); - } - } - function i0(k9, kb, kc) { - var kd = !(arguments.length > 3 && undefined !== arguments[3]) || arguments[3]; - var kf = arguments.length > 4 && undefined !== arguments[4] && arguments[4]; - var kg = !(arguments.length > 5 && undefined !== arguments[5]) || arguments[5]; - if (-1 !== kb || -1 !== kc) { - this.table; - var kh = this.selector; - var kj = this.toolbar; - var kk = this.data; - var km = this.contextMenu; - this.sectionResizer.show(kk); - km.setMode(-1 === kb || -1 === kc ? "row-col" : "range"); - var kp = kk.getCell(kb, kc); - k9 ? (kh.setEnd(kb, kc, kf), this.trigger("cells-selected", kp, kh.range)) : (kk.settings.isChildDataWindow ? kh.set(kb, -2, kd, true) : kh.set(kb, kc, kd, kg), this.trigger("cell-selected", kp, kb, kc)); - kj.reset(); - this.render(); - } - } - function i1() { - var k9 = this.selector; - var kb = this.data.report; - if (!kb.calc) { - return false; - } - var kc = a4()(k9.indexes, 2); - var kd = kc[0]; - var kf = kc[1]; - var kg = -1; - var kh = kb._orderColumns; - if (0 === kh.length) { - return true; - } - var kj = kb.getDataRow(kd); - if (-1 === kj) { - return true; - } - for (var kk = kb.getRowByDataRow(kj), km = 0; km < kh.length; km++) { - var kp = kh[km]; - if (kp.col === kf && kp.row + kk === kd) { - kg = km; - break; - } - } - if (kg >= 0 && kg < kh.length - 1 ? kg += 1 : kg === kh.length - 1 ? (kj += 1, kg = 0) : kg = 0, (kk = kb.getRowByDataRow(kj)) < 0 && (kk = 0), kg >= 0) { - var kq = kh[kg]; - this.selectCell(kq.row + kk, kq.col); - } - return true; - } - function i2(k9, kb) { - var kc = this.selector; - var kd = this.data; - var kf = kd.rows; - var kg = kd.cols; - var kh = a4()(kc.indexes, 2); - var kj = kh[0]; - var kk = kh[1]; - var km = kc.range; - var kp = km.eri; - var kq = km.eci; - if (k9) { - var ku = a4()(kc.moveIndexes, 2); - kj = ku[0]; - kk = ku[1]; - } - "left" === kb ? kk > 0 && (kk -= 1) : "right" === kb ? (kq !== kk && (kk = kq), kk < kg.len - 1 && (kk += 1)) : "up" === kb ? kj > 0 && (kj -= 1) : "down" === kb ? (kp !== kj && (kj = kp), kj < kf.len - 1 && (kj += 1)) : "row-first" === kb ? kk = 0 : "row-last" === kb ? kk = kg.len - 1 : "col-first" === kb ? kj = 0 : "col-last" === kb && (kj = kf.len - 1); - k9 && (kc.moveIndexes = [kj, kk]); - i0.call(this, k9, kj, kk); - hZ.call(this); - } - function i3(k9) { - if (0 === k9.buttons && k9.target.className !== "".concat(cx.a, "-resizer-hover")) { - var kb = this.overlayerEl.el.getBoundingClientRect(); - var kc = k9.clientX - kb.left; - var kd = k9.clientY - kb.top; - var kf = this.rowResizer; - var kg = this.colResizer; - var kh = this.tableEl; - var kj = this.data; - var kk = kj.rows; - var km = kj.cols; - kj.viewManager.mousemove(k9); - var kp = kh.box(); - var kq = kj.getCellRectByXY(kc, kd); - var ku = kj.report.rowInHeader(kq.ri); - kq.ri >= 0 && -1 === kq.ci ? (kq.width = kj.fixedColWidth(), kf.show(kq, { - width: kp.width - }), kk.isHide(kq.ri - 1) ? kf.showUnhide(kq.ri) : kf.hideUnhide()) : kf.hide(); - (-1 === kq.ri || ku) && kq.ci >= 0 ? (ku || (kq.height = kj.fixedRowHeight()), kg.show(kq, { - height: kp.height - }), km.isHide(kq.ci - 1) ? kg.showUnhide(kq.ci) : kg.hideUnhide()) : kg.hide(); - } - } - var i4 = new Date().getTime(); - function i5(k9) { - k9.returnValue = false; - var kb = this.verticalScrollbar; - var kc = this.horizontalScrollbar; - var kd = this.data; - kb.scroll().top; - var kf = kc.scroll().left; - var kg = kd.rows; - var kh = kd.cols; - var kj = k9.deltaY; - var kk = k9.deltaX; - var km = function (ky, kz) { - var kA = ky; - var kB = 0; - do { - kB = kz(kA); - kA += 1; - } while (kB <= 0); - return kB; - }; - var kp = function (ky) { - var kz = a4()(kd.freeze, 1)[0]; - if (kd.scroll.ri < kz && (kd.scroll.ri = kz), ky > 0) { - var kA = kd.scroll.ri + 1; - if (kA < kg.len) { - var kB = eR.virtualHeight * (kA - kz); - kb.move({ - top: kB - }); - } - } else { - var kC = kd.scroll.ri - 1; - if (kC >= kz) { - var kD = eR.virtualHeight * (kC - kz); - kb.move({ - top: kD - }); - } - } - }; - var kq = 40; - var ku = new Date().getTime(); - ku - i4 < 80 && (kj > 200 ? kq = 2 : kj > 100 ? kq = 10 : kj > 50 && (kq = 30)); - i4 = ku; - var kv = Math.abs(kj); - var kw = Math.abs(kk); - var kx = Math.max(kv, kw); - /Firefox/i.test(window.navigator.userAgent) && hY(kp(k9.detail), kq); - kx === kw && hY(function (ky) { - if (ky > 0) { - var kz = kd.scroll.ci + 1; - if (kz < kh.len) { - var kA = km(kz, function (kD) { - return kd.getWidth(kD); - }); - kc.move({ - left: kf + kA - 1 - }); - } - } else { - var kB = kd.scroll.ci - 1; - if (kB >= 0) { - var kC = km(kB, function (kD) { - return kd.getWidth(kD); - }); - kc.move({ - left: 0 === kB ? 0 : kf - kC - }); - } - } - }(kk), kq); - kx === kv && hY(kp(kj), kq); - } - function i6(k9, kb) { - var kc = this.verticalScrollbar; - var kd = this.horizontalScrollbar; - var kf = kc.scroll().top; - var kg = kd.scroll().left; - "left" === k9 || "right" === k9 ? kd.move({ - left: kg - kb - }) : "up" !== k9 && "down" !== k9 || kc.move({ - top: kf - kb - }); - } - function i7() { - var k9 = !(arguments.length > 0 && undefined !== arguments[0]) || arguments[0]; - var kb = this.data; - var kc = this.verticalScrollbar; - var kd = this.sectionResizer; - var kf = this.getTableOffset(); - var kg = kf.height; - var kh = kb.exceptRowTotalHeight(0, -1); - var kj = kb.lastRowsHeight(kg - 1); - var kk = kb.rows.totalHeight(kj) - kh; - kb.settings.showVScrollBar || !kb.calcIsActive() ? kc.set(kg, kk) : kc.set(kg, kg); - k9 && ic.call(this); - kd.show(); - } - function i8() { - var k9 = !(arguments.length > 0 && undefined !== arguments[0]) || arguments[0]; - var kb = this.data; - var kc = this.horizontalScrollbar; - var kd = this.getTableOffset(); - var kf = kd.width; - kb && (kb.settings.showHScrollBar || !kb.calcIsActive() ? kc.set(kf, kb.cols.totalWidth()) : kc.set(kf, kf)); - k9 && ic.call(this); - } - function i9() { - var k9 = this.selector; - var kb = this.data; - var kc = this.editor; - var kd = a4()(kb.freeze, 2); - var kf = kd[0]; - var kg = kd[1]; - if (kf > 0 || kg > 0) { - var kh = kb.freezeTotalWidth(); - var kj = kb.freezeTotalHeight(); - kc.setFreezeLengths(kh, kj); - } - k9.resetAreaOffset(); - } - function ib() { - var k9 = this.tableEl; - var kb = this.overlayerEl; - var kc = this.overlayerCEl; - var kd = this.table; - var kf = this.toolbar; - var kg = this.selector; - var kh = this.el; - this.stage; - var kj = this.getTableOffset(); - var kk = this.getRect(); - k9.offset(kk); - kb.offset(kk); - kc.offset(kj); - kh.css("width", "".concat(kk.width, "px")); - i7.call(this, false); - i8.call(this); - i9.call(this); - kd.render(); - kf.reset(); - kg.reset(); - } - function ic() { - var k9 = this; - var kb = this.data; - var kc = kb.cellView; - kb.report; - kc.calcCells(); - var kd = kc.getCells(this); - var kf = this.data.viewManager; - kf.viewClicked = function (kg) { - k9.trigger("viewClicked", kg.info); - }; - kf.cellRender = function (kg, kh) { - k9.trigger("cell-render", kg, kh); - }; - this.trigger("layoutViews"); - kf.resetViews(kd, this.overlayerEl, this.data, this, function () { - var kg = arguments.length > 0 && undefined !== arguments[0] && arguments[0]; - kg ? ib.call(k9) : k9.render(); - }); - } - function id() { - var k9 = this.data; - var kb = this.selector; - k9.clearClipboard(); - kb.hideClipboard(); - } - function ig() { - var k9 = this.data; - var kb = this.selector; - k9.copy(); - k9.copyToSystemClipboard(); - kb.showClipboard(); - } - function ih() { - var k9 = this.data; - var kb = this.selector; - k9.cut(); - kb.showClipboard(); - } - function ij(k9, kb) { - var kc = this.data; - if ("read" !== kc.settings.mode) { - if (kc.paste(k9, function (kf) { - return hM("Tip", kf); - })) { - ib.call(this); - } else { - if (kb) { - var kd = kb.clipboardData.getData("text/plain"); - this.data.pasteFromText(kd); - ib.call(this); - } - } - } - } - function ik() { - this.data.hideRowsOrCols(); - ib.call(this); - } - function im(k9, kb) { - this.data.unhideRowsOrCols(k9, kb); - ib.call(this); - } - function ip() { - this.data.autofilter(); - ib.call(this); - } - function iq() { - var k9 = this.toolbar; - k9.paintformatActive() && (ij.call(this, "format"), id.call(this), k9.paintformatToggle()); - } - function iu(k9) { - this.selector; - var kb = this.data; - this.table; - this.sortFilter; - var kc = this.overlayerEl; - var kd = k9.offsetX; - var kf = k9.offsetY; - var kg = null; - if (k9.target === kc.el) { - kg = kb.getCellRectByXY(kd, kf); - } else { - var kh = k9.target.celldata; - if (kh) { - var kj = kh.ri; - var kk = kh.ci; - kg = kb.cellView.cellRect(kj, kk); - } else { - var km = k9.target.getBoundingClientRect(); - var kp = kc.el.getBoundingClientRect(); - var kq = km.left - kp.left; - var ku = km.top - kp.top; - kg = kb.getCellRectByXY(kq + kd, ku + kf); - } - } - var kv = kg; - var kw = kv.ri; - var kx = kv.ci; - var ky = null; - if (k9.target === kc.el) { - var kz = "".concat(kw, "_").concat(kx); - var kA = kb.viewManager; - var kB = kb.report; - var kC = kA.getView(kz); - if (kC && kB.calc) { - var kD = Object(a9.b)(kc.el, k9); - kC.pointerInView({ - x: kD.offsetX, - y: kD.offsetY - }) && (ky = kC); - } - } - ky || 2 !== k9.detail || iy.call(this); - var kE = kb.report.rowInHeader(kw); - 2 === k9.detail ? this.trigger("cell-doubleClicked", k9, kw, kx, kE) : this.trigger("cell-clicked", k9, kw, kx, kE); - } - function iv(k9) { - var kb = this.data; - var kc = this.overlayerEl; - var kd = Object(a9.b)(kc.el, k9); - var kf = kd.x; - var kg = kd.y; - return kb.getCellRectByXY(kf, kg); - } - function iw(k9) { - var kb = this; - var kc = this.selector; - var kd = this.data; - this.table; - this.sortFilter; - var kf = this.overlayerEl; - k9.offsetX; - k9.offsetY; - var kg = k9.target.className === "".concat(cx.a, "-selector-corner"); - var kh = iv.call(this, k9); - if (kh) { - var kj = kh.ri; - var kk = kh.ci; - var km = null; - var kp = "".concat(kj, "_").concat(kk); - var kq = kd.viewManager; - var ku = kd.report; - var kv = kq.getView(kp); - if (kv && ku.calc) { - if (kv.pointerInView) { - var kw = Object(a9.b)(kf.el, k9); - var kx = kw.x; - var ky = kw.y; - kv.pointerInView({ - x: kx, - y: ky - }) && (km = kv); - } else { - km = kv; - } - } - var kz = kd.report.rowInHeader(kj); - kz && (kj = -1); - k9.shiftKey || (kg ? kc.showAutofill(kj, kk) : i0.call(this, false, kj, kk, true, false, !km), (this.exMouseMove || this.exMouseUp) && (Object(bH.f)(window, "mousemove", this.exMouseMove), Object(bH.f)(window, "mouseup", this.exMouseUp), this.exMouseUp = null, this.exMouseMove = null), this.exMouseMove = function (kA) { - if (!km) { - var kB = kA.target.celldata; - if (kA.target === kb.overlayerEl.el) { - var kC = kd.getCellRectByXY(kA.offsetX, kA.offsetY); - kj = kC.ri; - kk = kC.ci; - } else { - if (!kB) { - return; - } - kj = kB.ri; - kk = kB.ci; - } - (kz = kd.report.rowInHeader(kj)) && (kj = -1); - kg ? kc.showAutofill(kj, kk) : 1 !== kA.buttons || kA.shiftKey || kb.data.settings.showSelector && i0.call(kb, true, kj, kk, true, true); - } - }, this.exMouseUp = function (kA) { - if (km) { - var kB = Object(a9.b)(kf.el, k9); - var kC = kB.x; - var kD = kB.y; - km.pointerInView && km.pointerInView({ - x: kC, - y: kD - }) && km.click(kA); - } else { - if (1 !== kA.buttons && 2 !== kA.detail && !kb.data.settings.showSelector) { - var kE = iv.call(kb, kA); - kE.ri === kb.data.selector.ri && kE.ci === kb.data.selector.ci && setTimeout(function () { - iy.call(kb); - }, 0); - } - kg && kc.arange && "read" !== kd.settings.mode && kd.autofill(kc.arange, "all", function (kF) { - return hM("Tip", kF); - }) && kb.render(); - kc.hideAutofill(); - iq.call(kb); - } - }, Object(bH.e)(window, this.exMouseMove, this.exMouseUp)); - kg || 1 !== k9.buttons || k9.shiftKey && i0.call(this, true, kj, kk); - } - } - function ix() { - var k9 = this.editor; - var kb = this.data.getSelectedRect(); - var kc = this.getTableOffset(); - var kd = "top"; - kb.top > kc.height / 2 && (kd = "bottom"); - k9.setOffset(kb, kd); - } - function iy(k9) { - var kb = this.editor; - var kc = this.data; - var kd = this.selector; - if ("read" !== kc.settings.mode && kc.getSelectedEditable()) { - kd.el.hide(); - ix.call(this); - var kf = kc.getSelectedCell(); - k9 && kf && (kf.text = k9); - kb.setCell(kf, kc.getSelectedValidator(), kc); - k9 && kf && (kb.isInput = true); - id.call(this); - } - } - function iz(k9) { - var kb = this; - var kc = this.data; - var kd = this.table; - var kf = this.selector; - var kg = this.sectionResizer; - kc.scrolly(k9, function () { - ic.call(kb); - kf.resetBRLAreaOffset(); - ix.call(kb); - kd.render(); - kg.show(); - }); - } - function iA(k9) { - var kb = this; - var kc = this.data; - var kd = this.table; - var kf = this.selector; - kc.scrollx(k9, function () { - ic.call(kb); - kf.resetBRTAreaOffset(); - ix.call(kb); - kd.render(); - }); - } - function iB(k9, kb) { - var kc = k9.ri; - this.table; - var kd = this.selector; - var kf = this.data; - this.sectionResizer; - kf.rows.setHeight(kc, kb); - kd.resetAreaOffset(); - i7.call(this); - ix.call(this); - this.trigger("rowResized", kc, kb); - this.render(); - } - function iC(k9, kb) { - var kc = k9.ci; - var kd = k9.m; - this.table; - var kf = this.selector; - var kg = this.data; - var kh = kb; - var kj = kc; - kd && (kh = kb - kg.sumActualWidth(kd.sci, kd.eci), kj = kd.eci); - kg.cols.setWidth(kj, kh); - kf.resetAreaOffset(); - i8.call(this); - ix.call(this); - this.trigger("colResized", kj, kh); - this.render(); - } - function iD(k9) { - this.data.report.cellsTextChanged(k9); - this.trigger("cell-textChanged", k9); - } - function iE(k9) { - var kb = arguments.length > 1 && undefined !== arguments[1] ? arguments[1] : "finished"; - var kc = this.data; - this.table; - if ("read" !== kc.settings.mode && kc.getSelectedEditable()) { - var kd = kc.setSelectedCellText(k9, kb); - var kf = kc.selector; - var kg = kf.ri; - var kh = kf.ci; - var kj = kc.getCell(kg, kh); - if ("finished" === kb) { - if (this.trigger("cell-edited", { - cell: kj, - text: k9, - ri: kg, - ci: kh - }), -1 !== kd && iD.call(this, { - cell: kj, - text: k9, - ri: kg, - ci: kh - }), kj && (kj.autoheight || kj.rowMerge)) { - var kk = this.selector; - kk.resetAreaOffset(); - i7.call(this); - ix.call(this); - this.render(); - } else { - this.render(); - } - } else { - this.trigger("cell-edited", { - cell: kj, - text: k9, - ri: kg, - ci: kh - }); - } - } - } - function iF(k9) { - var kb = this.data; - "read" !== kb.settings.mode && ("insert-row" === k9 ? kb.insert("row") : "delete-row" === k9 ? kb.delete("row") : "insert-column" === k9 ? kb.insert("column") : "delete-column" === k9 ? kb.delete("column") : "delete-cell" === k9 ? kb.deleteCell() : "delete-cell-format" === k9 ? kb.deleteCell("format") : "delete-cell-text" === k9 ? kb.deleteCell("text") : "cell-printable" === k9 ? kb.setSelectedCellAttr("printable", true) : "cell-non-printable" === k9 ? kb.setSelectedCellAttr("printable", false) : "cell-editable" === k9 ? kb.setSelectedCellAttr("editable", true) : "cell-non-editable" === k9 && kb.setSelectedCellAttr("editable", false), id.call(this), ib.call(this)); - } - function iG(k9, kb) { - var kc = this.verticalScrollbar; - var kd = this.data; - if ("undo" === k9) { - this.undo(); - } else { - if ("redo" === k9) { - this.redo(); - } else { - if ("print" === k9) { - this.print.preview(); - } else { - if ("paintformat" === k9) { - true === kb ? ig.call(this) : id.call(this); - } else { - if ("clearformat" === k9) { - iF.call(this, "delete-cell-format"); - } else { - if ("db" === k9) { - var kf = null; - this.getDataWindow && (kf = this.getDataWindow()); - new hV(kf).show(); - } else { - if (!("link" === k9)) { - if (!("chart" === k9)) { - if ("autofilter" === k9) { - ip.call(this); - } else { - if ("freeze" === k9) { - if (kb) { - var kg = kd.selector; - var kh = kg.ri; - var kj = kg.ci; - this.freeze(kh, kj); - } else { - this.freeze(0, 0); - } - } else { - "calc" === k9 ? (kb ? this.data.report.setCalc(true) : this.data.report.setCalc(false), kc.move({ - top: 0 - }), i0.call(this, false, -2, -2, true), ib.call(this)) : "save" === k9 || (kd.setSelectedCellAttr(k9, kb), "formula" !== k9 || kd.selector.multiple() || iy.call(this), ib.call(this)); - } - } - } - } - } - } - } - } - } - } - this.trigger("toolbarChange", k9, kb); - } - function iH(k9, kb, kc, kd) { - this.data.setAutoFilter(k9, kb, kc, kd); - ib.call(this); - } - function iI() { - var k9 = this; - var kb = this.selector; - var kc = this.overlayerEl; - var kd = this.rowResizer; - var kf = this.colResizer; - var kg = this.sectionResizer; - var kh = this.verticalScrollbar; - var kj = this.horizontalScrollbar; - var kk = this.editor; - var km = this.contextMenu; - var kp = this.toolbar; - var kq = this.modalValidation; - var ku = this.sortFilter; - kc.on("mousemove", function (kv) { - i3.call(k9, kv); - }).on("mousedown", function (kv) { - if (true, kk.clear(), km.hide(), 2 === kv.buttons) { - if (k9.data.xyInSelectedRect(kv.offsetX, kv.offsetY) || iw.call(k9, kv), k9.data.report.calc || (km.show(kv), kv.preventDefault()), kv.stopPropagation(), k9.data.report.calc) { - var kw = iv.call(k9, kv); - if (kw) { - var kx = kw.ri; - var ky = kw.ci; - k9.trigger("RightButtonClicked", kv, kx, ky); - } - } - } else { - 2 === kv.detail || iw.call(k9, kv); - } - }).on("mouseup", function (kv) { - iu.call(k9, kv); - false; - }).on("mousewheel.stop", function (kv) { - i5.call(k9, kv); - }).on("mouseout", function (kv) { - var kw = kv.offsetX; - kv.offsetY <= 0 && kf.hide(); - kw <= 0 && kd.hide(); - }).on("blur", function () { - k9.focusObject.blur(); - }).on("focus", function () { - k9.focusObject.focus(); - }); - this.targetEl.on("blur", function () { - k9.focusObject.blur(); - }).on("focus", function () { - k9.focusObject.focus(); - k9.overlayerEl.focus(); - }); - kb.inputChange = function (kv) { - iE.call(k9, kv, "input"); - iy.call(k9); - }; - Object(bH.c)(kc.el, { - move: function (kv, kw) { - i6.call(k9, kv, kw); - } - }); - kp.change = function (kv, kw) { - return iG.call(k9, kv, kw); - }; - ku.ok = function (kv, kw, kx, ky) { - return iH.call(k9, kv, kw, kx, ky); - }; - kd.finishedFn = function (kv, kw) { - iB.call(k9, kv, kw); - }; - kf.finishedFn = function (kv, kw) { - iC.call(k9, kv, kw); - }; - kg.finishedFn = function () { - kg.show(); - k9.render(); - }; - kd.unhideFn = function (kv) { - im.call(k9, "row", kv); - }; - kf.unhideFn = function (kv) { - im.call(k9, "col", kv); - }; - kh.moveFn = function (kv, kw) { - iz.call(k9, kv, kw); - }; - kj.moveFn = function (kv, kw) { - iA.call(k9, kv, kw); - }; - kk.change = function (kv, kw) { - iE.call(k9, kw, kv); - }; - kk.ddSelected = function (kv) { - k9.trigger("DropDownSelected", kv); - }; - kq.change = function (kv) { - if ("save" === kv) { - for (var kw, kx = arguments.length, ky = new Array(kx > 1 ? kx - 1 : 0), kz = 1; kz < kx; kz++) { - ky[kz - 1] = arguments[kz]; - } - (kw = k9.data).addValidation.apply(kw, ky); - } else { - k9.data.removeValidation(); - } - }; - km.itemClick = function (kv) { - if ("validation" === kv) { - kq.setValue(k9.data.getSelectedValidation()); - } else { - if ("copy" === kv) { - ig.call(k9); - } else { - if ("cut" === kv) { - ih.call(k9); - } else { - if ("paste" === kv) { - ij.call(k9, "all"); - } else { - if ("paste-value" === kv) { - ij.call(k9, "text"); - } else { - if ("paste-format" === kv) { - ij.call(k9, "format"); - } else { - if ("hide" === kv) { - ik.call(k9); - } else { - if ("code" === kv) { - var kw = null; - k9.getDataWindow && (kw = k9.getDataWindow()); - new hX(kw).show(); - } else { - if ("datasource" === kv) { - var kx = null; - k9.getDataWindow && (kx = k9.getDataWindow()); - new hV(kx).show(); - } else { - iF.call(k9, kv); - } - } - } - } - } - } - } - } - } - }; - Object(bH.a)(window, "paste", function (kv) { - k9.focusing && kv.preventDefault(); - }); - Object(bH.a)(kc.el, "keydown", function (kv) { - if (k9.focusing) { - if (k9.trigger("keyDown", kv), kv.editorInput || kv.stopprocessing) { - kv.stopPropagation(); - } else { - var kw = kv.keyCode || kv.which; - var kx = kv.key; - var ky = kv.ctrlKey; - var kz = kv.shiftKey; - var kA = kv.metaKey; - if (ky || kA) { - switch (kw) { - case 90: - k9.undo(); - kv.preventDefault(); - break; - case 89: - k9.redo(); - kv.preventDefault(); - break; - case 67: - ig.call(k9); - kv.preventDefault(); - break; - case 88: - ih.call(k9); - kv.preventDefault(); - break; - case 85: - kp.trigger("underline"); - kv.preventDefault(); - break; - case 86: - break; - case 37: - i2.call(k9, kz, "row-first"); - kv.preventDefault(); - break; - case 38: - i2.call(k9, kz, "col-first"); - kv.preventDefault(); - break; - case 39: - i2.call(k9, kz, "row-last"); - kv.preventDefault(); - break; - case 40: - i2.call(k9, kz, "col-last"); - kv.preventDefault(); - break; - case 32: - i0.call(k9, false, -1, k9.data.selector.ci, false); - kv.preventDefault(); - break; - case 66: - kp.trigger("bold"); - break; - case 73: - kp.trigger("italic"); - } - } else { - switch (kw) { - case 32: - kz && i0.call(k9, false, k9.data.selector.ri, -1, false); - break; - case 27: - km.hide(); - id.call(k9); - break; - case 37: - i2.call(k9, kz, "left"); - kv.preventDefault(); - break; - case 38: - i2.call(k9, kz, "up"); - kv.preventDefault(); - break; - case 39: - i2.call(k9, kz, "right"); - kv.preventDefault(); - break; - case 40: - i2.call(k9, kz, "down"); - kv.preventDefault(); - break; - case 9: - kk.clear(); - i1.call(k9) || i2.call(k9, false, kz ? "left" : "right"); - kv.preventDefault(); - break; - case 13: - if (k9.trigger("cell-enter", kv), !kv.stopprocessing) { - kk.clear(); - var kB = null; - k9.data.settings.showSelector || (kB = i1.call(k9)); - kB || i2.call(k9, false, kz ? "up" : "down"); - } - kv.preventDefault(); - break; - case 8: - iF.call(k9, "delete-cell-text"); - kv.preventDefault(); - } - "Delete" === kx ? (iF.call(k9, "delete-cell-text"), kv.preventDefault()) : kw >= 65 && kw <= 90 || kw >= 48 && kw <= 57 || kw >= 96 && kw <= 105 || "=" === kv.key ? (iE.call(k9, kv.key, "input"), iy.call(k9, kv.key)) : 113 === kw && iy.call(k9); - } - } - } - }); - } - var iJ = function () { - return a8()(function k9(kb, kc) { - var kd = this; - a6()(this, k9); - this.eventMap = Object(bH.d)(); - var kf = kc.settings; - var kg = kf.view; - kf.showToolbar; - var kh = kf.showContextmenu; - this.el = Object(a9.c)("div", "".concat(cx.a, "-sheet")); - kb.attr("tabindex", "-1"); - this.targetEl = kb; - this.toolbar = new hw(kc, kg.width); - this.print = new fS(kc, this); - kb.children(this.toolbar.el, this.el); - this.data = kc; - this.tableEl = Object(a9.c)("canvas", "".concat(cx.a, "-table")); - this.rowResizer = new eS(false, kc.rows.minHeight); - this.colResizer = new eS(true, kc.cols.minWidth); - this.sectionResizer = new hP(kc); - this.colResizer.el.css("background-color", "rgba(0,0,0,0)"); - this.verticalScrollbar = new eT(true); - this.horizontalScrollbar = new eT(false); - var kj = this; - this._tableRender = eg()(function () { - kd.table.render(); - }, 100); - var kk = eg()(function () { - var km = document.activeElement; - var kp = kb.contains(km); - kp || (kp = kj.editor.contains(km)); - kd.focusing = kp; - kj.focusing || (kj.trigger("loseFocus"), kj.editor.clear(), i0.call(kj, false, -2, -2, false, false, false)); - }, 200); - this.focusObject = { - focus: function () { - kj.focusing || (kj.focusing = true, kj.trigger("focus")); - }, - blur: function () { - kk(); - } - }; - this.editor = new fE(h0.c, function () { - return kd.getTableOffset(); - }, kc.rows.height, this.focusObject); - this.modalValidation = new hG(); - this.contextMenu = new fX(null, !kh); - this.selector = new f9(kc, this.focusObject); - this.overlayerCEl = Object(a9.c)("div", "".concat(cx.a, "-overlayer-content")).children(this.editor.el, this.selector.el); - this.overlayerEl = Object(a9.c)("div", "".concat(cx.a, "-overlayer")).child(this.overlayerCEl); - this.overlayerEl.attr("tabindex", "-1"); - this.sortFilter = new hL(); - this.el.children(this.tableEl, this.overlayerEl.el, this.rowResizer.el, this.colResizer.el, this.verticalScrollbar.el, this.horizontalScrollbar.el, this.modalValidation.el, this.sortFilter.el); - this.sectionResizer.addTo(this.el); - this.table = new fF.a(this.tableEl.el, kc); - iI.call(this); - ib.call(this); - i0.call(this, false, -2, -2); - this.getDataWindow = null; - }, [{ - key: "on", - value: function (kb, kc) { - this.eventMap.on(kb, kc); - return this; - } - }, { - key: "trigger", - value: function (kb) { - for (var kc = this.eventMap, kd = arguments.length, kf = new Array(kd > 1 ? kd - 1 : 0), kg = 1; kg < kd; kg++) { - kf[kg - 1] = arguments[kg]; - } - kc.fire.apply(kc, [kb].concat(kf)); - } - }, { - key: "resetData", - value: function (kb) { - this.editor.clear(); - i0.call(this, false, -2, -2, false, false, false); - this.data = kb; - i7.call(this, false); - i8.call(this); - this.sectionResizer.resetData(kb); - this.toolbar.resetData(kb); - this.print.resetData(kb); - this.selector.resetData(kb); - this.table.resetData(kb); - } - }, { - key: "loadData", - value: function (kb) { - this.data.setData(kb); - ib.call(this); - return this; - } - }, { - key: "freeze", - value: function (kb, kc) { - this.data.setFreeze(kb, kc); - iz.call(this, 0); - return this; - } - }, { - key: "undo", - value: function () { - this.data.undo(); - ib.call(this); - } - }, { - key: "redo", - value: function () { - this.data.redo(); - ib.call(this); - } - }, { - key: "reload", - value: function () { - ib.call(this); - return this; - } - }, { - key: "getRect", - value: function () { - var kb = this.data; - return { - width: kb.viewWidth(), - height: kb.viewHeight() - }; - } - }, { - key: "getTableOffset", - value: function () { - var kb = this.getRect(); - var kc = kb.width; - var kd = kb.height; - var kf = this.data.fixedColWidth(); - var kg = this.data.fixedRowHeight(); - return { - width: kc - kf, - height: kd - kg, - left: kf, - top: kg - }; - } - }, { - key: "scrollToRow", - value: function (kb) { - i0.call(this, false, kb, -2); - hZ.call(this); - } - }, { - key: "selectCell", - value: function (kb, kc) { - i0.call(this, false, kb, kc); - hZ.call(this); - this.data.settings.showSelector || iy.call(this); - } - }, { - key: "setFocus", - value: function () { - this.overlayerEl.el.focus(); - } - }, { - key: "render", - value: function () { - this._tableRender(); - } - }]); - }(); - function iK(k9, kb, kc) { - kb = cm()(kb); - return cj()(k9, function () { - try { - var kd = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kf) {} - return function () { - return !!kd; - }(); - }() ? Reflect.construct(kb, kc || [], cm()(k9).constructor) : kb.apply(k9, kc)); - } - var iL = function (k9) { - function kb(kc) { - var kd; - a6()(this, kb); - (kd = iK(this, kb, [new cz("ellipsis"), "auto", false, "top-left"])).contentClick = kc; - return kd; - } - cq()(kb, k9); - return a8()(kb, [{ - key: "reset", - value: function (kc) { - var kd = this; - var kf = kc.map(function (kg, kh) { - return Object(a9.c)("div", "".concat(cx.a, "-item")).css("width", "150px").css("font-weight", "normal").on("click", function () { - kd.contentClick(kh); - kd.hide(); - }).child(kg); - }); - this.setContentChildren.apply(this, ac()(kf)); - } - }, { - key: "setTitle", - value: function () {} - }]); - }(fZ.a); - var iM = [{ - key: "delete", - title: Object(aB.c)("contextmenu.deleteSheet") - }]; - function iN(k9) { - var kb = this; - return Object(a9.c)("div", "".concat(cx.a, "-item")).child(k9.title()).on("click", function () { - kb.itemClick(k9.key); - kb.hide(); - }); - } - function iO() { - var k9 = this; - return iM.map(function (kb) { - return iN.call(k9, kb); - }); - } - var iP = function () { - return a8()(function k9() { - var kb; - a6()(this, k9); - this.el = (kb = Object(a9.c)("div", "".concat(cx.a, "-contextmenu")).css("width", "160px")).children.apply(kb, ac()(iO.call(this))).hide(); - this.itemClick = function () {}; - }, [{ - key: "hide", - value: function () { - var kb = this.el; - kb.hide(); - Object(bH.g)(kb); - } - }, { - key: "setOffset", - value: function (kb) { - var kc = this.el; - kc.offset(kb); - kc.show(); - Object(bH.b)(kc); - } - }]); - }(); - var iQ = function () { - return a8()(function k9() { - var kb = this; - var kc = arguments.length > 0 && undefined !== arguments[0] ? arguments[0] : function () {}; - var kd = arguments.length > 1 && undefined !== arguments[1] ? arguments[1] : function () {}; - var kf = arguments.length > 2 && undefined !== arguments[2] ? arguments[2] : function () {}; - var kg = arguments.length > 3 && undefined !== arguments[3] ? arguments[3] : function () {}; - var kh = arguments.length > 4 && undefined !== arguments[4] && arguments[4]; - a6()(this, k9); - this.swapFunc = kd; - this.updateFunc = kg; - this.dataNames = []; - this.activeEl = null; - this.deleteEl = null; - this.items = []; - this.moreEl = new iL(function (kj) { - kb.clickSwap2(kb.items[kj]); - }); - this.contextMenu = new iP(); - this.contextMenu.itemClick = kf; - this.el = Object(a9.c)("div", "".concat(cx.a, "-bottombar")).children(this.contextMenu.el, this.menuEl = Object(a9.c)("ul", "".concat(cx.a, "-menu")).child(Object(a9.c)("li", "").children(new cz("add").on("click", function () { - kb.dataNames.length < 10 ? kc() : hM("tip", "it less than or equal to 10"); - }), Object(a9.c)("span", "").child(this.moreEl)))); - kh && this.el.hide(); - }, [{ - key: "addItem", - value: function (kb, kc) { - var kd = this; - this.dataNames.push(kb); - var kf = Object(a9.c)("li", kc ? "active" : "").child(kb); - kf.on("click", function () { - kd.clickSwap2(kf); - }).on("contextmenu", function (kg) { - var kh = kg.target; - var kj = kh.offsetLeft; - var kk = kh.offsetHeight; - kd.contextMenu.setOffset({ - left: kj, - bottom: kk + 1 - }); - kd.deleteEl = kf; - }).on("dblclick", function () { - var kg = kf.html(); - var kh = new hz("auto", ""); - kh.val(kg); - kh.input.on("blur", function (kj) { - var kk = kj.target.value; - var km = kd.dataNames.findIndex(function (kp) { - return kp === kg; - }); - kd.renameItem(km, kk); - }); - kf.html("").child(kh.el); - kh.focus(); - }); - kc && this.clickSwap(kf); - this.items.push(kf); - this.menuEl.child(kf); - this.moreEl.reset(this.dataNames); - } - }, { - key: "renameItem", - value: function (kb, kc) { - this.dataNames.splice(kb, 1, kc); - this.moreEl.reset(this.dataNames); - this.items[kb].html("").child(kc); - this.updateFunc(kb, kc); - } - }, { - key: "clear", - value: function () { - var kb = this; - this.items.forEach(function (kc) { - kb.menuEl.removeChild(kc.el); - }); - this.items = []; - this.dataNames = []; - this.moreEl.reset(this.dataNames); - } - }, { - key: "deleteItem", - value: function () { - var kb = this.activeEl; - var kc = this.deleteEl; - if (this.items.length > 1) { - var kd = this.items.findIndex(function (kg) { - return kg === kc; - }); - if (this.items.splice(kd, 1), this.dataNames.splice(kd, 1), this.menuEl.removeChild(kc.el), this.moreEl.reset(this.dataNames), kb === kc) { - var kf = a4()(this.items, 1)[0]; - this.activeEl = kf; - this.activeEl.toggle(); - return [kd, 0]; - } - return [kd, -1]; - } - return [-1]; - } - }, { - key: "clickSwap2", - value: function (kb) { - var kc = this.items.findIndex(function (kd) { - return kd === kb; - }); - this.clickSwap(kb); - this.activeEl.toggle(); - this.swapFunc(kc); - } - }, { - key: "clickSwap", - value: function (kb) { - null !== this.activeEl && this.activeEl.toggle(); - this.activeEl = kb; - } - }]); - }(); - a2(147); - a2(148); - var iR = a2(89); - var iS = a2.n(iR); - var iT = "undefined" != typeof window ? window : null; - var iU = null === iT; - var iV = iU ? undefined : iT.document; - var iW = "addEventListener"; - var iX = "removeEventListener"; - var iY = function () { - return false; - }; - var iZ = iU ? "calc" : "".concat(["", "-webkit-", "-moz-", "-o-"].filter(function (k9) { - var kb = iV.createElement("div"); - kb.style.cssText = "width:".concat(k9, "calc(9px)"); - return !!kb.style.length; - }).shift(), "calc"); - var j0 = function (k9) { - return "string" == typeof k9 || k9 instanceof String; - }; - var j1 = function (k9) { - if (j0(k9)) { - var kb = iV.querySelector(k9); - if (!kb) { - throw new Error("Selector ".concat(k9, " did not match a DOM element")); - } - return kb; - } - return k9; - }; - var j2 = function (k9, kb, kc) { - var kd = k9[kb]; - return undefined !== kd ? kd : kc; - }; - var j3 = function (k9, kb, kc, kd) { - if (kb) { - if ("end" === kd) { - return 0; - } - if ("center" === kd) { - return k9 / 2; - } - } else { - if (kc) { - if ("start" === kd) { - return 0; - } - if ("center" === kd) { - return k9 / 2; - } - } - } - return k9; - }; - var j4 = function (k9, kb) { - var kc = iV.createElement("div"); - kc.className = "gutter gutter-".concat(kb); - return kc; - }; - var j5 = function (k9, kb, kc) { - var kd = {}; - j0(kb) ? kd[k9] = kb : kd[k9] = "".concat(iZ, "(").concat(kb, "% - ").concat(kc, "px)"); - return kd; - }; - var j6 = function (k9, kb) { - return aI()({}, k9, "".concat(kb, "px")); - }; - var j7 = function (k9) { - var kb = arguments.length > 1 && undefined !== arguments[1] ? arguments[1] : {}; - if (iU) { - return {}; - } - var kc; - var kd; - var kf; - var kg; - var kh; - var kj; - var kk = k9; - Array.from && (kk = Array.from(kk)); - var km = j1(kk[0]); - var kp = km.parentNode; - var kq = getComputedStyle ? getComputedStyle(kp) : null; - var ku = kq ? kq.flexDirection : null; - var kv = j2(kb, "sizes") || kk.map(function () { - return 100 / kk.length; - }); - var kw = j2(kb, "minSize", 100); - var kx = Array.isArray(kw) ? kw : kk.map(function () { - return kw; - }); - var ky = j2(kb, "maxSize", Infinity); - var kz = Array.isArray(ky) ? ky : kk.map(function () { - return ky; - }); - var kA = j2(kb, "expandToMin", false); - var kB = j2(kb, "gutterSize", 10); - var kC = j2(kb, "gutterAlign", "center"); - var kD = j2(kb, "snapOffset", 30); - var kE = Array.isArray(kD) ? kD : kk.map(function () { - return kD; - }); - var kF = j2(kb, "dragInterval", 1); - var kG = j2(kb, "direction", "horizontal"); - var kH = j2(kb, "cursor", "horizontal" === kG ? "col-resize" : "row-resize"); - var kI = j2(kb, "gutter", j4); - var kJ = j2(kb, "elementStyle", j5); - var kK = j2(kb, "gutterStyle", j6); - function kL(l0, l1, l2, l3) { - var l4 = kJ(kc, l1, l2, l3); - Object.keys(l4).forEach(function (l5) { - l0.style[l5] = l4[l5]; - }); - } - function kM(l0, l1, l2) { - var l3 = kK(kc, l1, l2); - Object.keys(l3).forEach(function (l4) { - l0.style[l4] = l3[l4]; - }); - } - function kN() { - return kj.map(function (l0) { - return l0.size; - }); - } - function kO(l0) { - return "touches" in l0 ? l0.touches[0][kd] : l0[kd]; - } - function kP(l0) { - var l1 = kj[this.a]; - var l2 = kj[this.b]; - var l3 = l1.size + l2.size; - l1.size = l0 / this.size * l3; - l2.size = l3 - l0 / this.size * l3; - kL(l1.element, l1.size, this._b, l1.i); - kL(l2.element, l2.size, this._c, l2.i); - } - function kQ(l0) { - var l1; - var l2 = kj[this.a]; - var l3 = kj[this.b]; - this.dragging && (l1 = kO(l0) - this.start + (this._b - this.dragOffset), kF > 1 && (l1 = Math.round(l1 / kF) * kF), l1 <= l2.minSize + l2.snapOffset + this._b ? l1 = l2.minSize + this._b : l1 >= this.size - (l3.minSize + l3.snapOffset + this._c) && (l1 = this.size - (l3.minSize + this._c)), l1 >= l2.maxSize - l2.snapOffset + this._b ? l1 = l2.maxSize + this._b : l1 <= this.size - (l3.maxSize - l3.snapOffset + this._c) && (l1 = this.size - (l3.maxSize + this._c)), kP.call(this, l1), j2(kb, "onDrag", iY)(kN())); - } - function kR() { - var l0 = kj[this.a].element; - var l1 = kj[this.b].element; - var l2 = l0.getBoundingClientRect(); - var l3 = l1.getBoundingClientRect(); - this.size = l2[kc] + l3[kc] + this._b + this._c; - this.start = l2[kf]; - this.end = l2[kg]; - } - function kS(l0) { - if (!getComputedStyle) { - return null; - } - var l1 = getComputedStyle(l0); - if (!l1) { - return null; - } - var l2 = l0[kh]; - return 0 === l2 ? null : l2 -= "horizontal" === kG ? parseFloat(l1.paddingLeft) + parseFloat(l1.paddingRight) : parseFloat(l1.paddingTop) + parseFloat(l1.paddingBottom); - } - function kT(l0) { - var l1 = kS(kp); - if (null === l1) { - return l0; - } - if (kx.reduce(function (l5, l6) { - return l5 + l6; - }, 0) > l1) { - return l0; - } - var l2 = 0; - var l3 = []; - var l4 = l0.map(function (l5, l6) { - var l7 = l1 * l5 / 100; - var l8 = j3(kB, 0 === l6, l6 === l0.length - 1, kC); - var l9 = kx[l6] + l8; - return l7 < l9 ? (l2 += l9 - l7, l3.push(0), l9) : (l3.push(l7 - l9), l7); - }); - return 0 === l2 ? l0 : l4.map(function (l5, l6) { - var l7 = l5; - if (l2 > 0 && l3[l6] - l2 > 0) { - var l8 = Math.min(l2, l3[l6] - l2); - l2 -= l8; - l7 = l5 - l8; - } - return l7 / l1 * 100; - }); - } - function kU() { - var l0 = kj[this.a].element; - var l1 = kj[this.b].element; - this.dragging && j2(kb, "onDragEnd", iY)(kN()); - this.dragging = false; - iT[iX]("mouseup", this.stop); - iT[iX]("touchend", this.stop); - iT[iX]("touchcancel", this.stop); - iT[iX]("mousemove", this.move); - iT[iX]("touchmove", this.move); - this.stop = null; - this.move = null; - l0[iX]("selectstart", iY); - l0[iX]("dragstart", iY); - l1[iX]("selectstart", iY); - l1[iX]("dragstart", iY); - l0.style.userSelect = ""; - l0.style.webkitUserSelect = ""; - l0.style.MozUserSelect = ""; - l0.style.pointerEvents = ""; - l1.style.userSelect = ""; - l1.style.webkitUserSelect = ""; - l1.style.MozUserSelect = ""; - l1.style.pointerEvents = ""; - this.parent.style.cursor = ""; - iV.body.style.cursor = ""; - } - function kV(l0) { - if (!("button" in l0) || 0 === l0.button) { - var l1 = kj[this.a].element; - var l2 = kj[this.b].element; - this.dragging || j2(kb, "onDragStart", iY)(kN()); - l0.preventDefault(); - this.dragging = true; - this.move = kQ.bind(this); - this.stop = kU.bind(this); - iT[iW]("mouseup", this.stop); - iT[iW]("touchend", this.stop); - iT[iW]("touchcancel", this.stop); - iT[iW]("mousemove", this.move); - iT[iW]("touchmove", this.move); - l1[iW]("selectstart", iY); - l1[iW]("dragstart", iY); - l2[iW]("selectstart", iY); - l2[iW]("dragstart", iY); - l1.style.userSelect = "none"; - l1.style.webkitUserSelect = "none"; - l1.style.MozUserSelect = "none"; - l1.style.pointerEvents = "none"; - l2.style.userSelect = "none"; - l2.style.webkitUserSelect = "none"; - l2.style.MozUserSelect = "none"; - l2.style.pointerEvents = "none"; - this.gutter.style.cursor = kH; - this.parent.style.cursor = kH; - iV.body.style.cursor = kH; - kR.call(this); - this.dragOffset = kO(l0) - this.end; - } - } - "horizontal" === kG ? (kc = "width", kd = "clientX", kf = "left", kg = "right", kh = "clientWidth") : "vertical" === kG && (kc = "height", kd = "clientY", kf = "top", kg = "bottom", kh = "clientHeight"); - kv = kT(kv); - var kW = []; - function kX(l0) { - var l1 = l0.i === kW.length; - var l2 = l1 ? kW[l0.i - 1] : kW[l0.i]; - kR.call(l2); - var l3 = l1 ? l2.size - l0.minSize - l2._c : l0.minSize + l2._b; - kP.call(l2, l3); - } - function kY(l0) { - var l1 = kT(l0); - l1.forEach(function (l2, l3) { - if (l3 > 0) { - var l4 = kW[l3 - 1]; - var l5 = kj[l4.a]; - var l6 = kj[l4.b]; - l5.size = l1[l3 - 1]; - l6.size = l2; - kL(l5.element, l5.size, l4._b, l5.i); - kL(l6.element, l6.size, l4._c, l6.i); - } - }); - } - function kZ(l0, l1) { - kW.forEach(function (l2) { - if (true !== l1 ? l2.parent.removeChild(l2.gutter) : (l2.gutter[iX]("mousedown", l2._a), l2.gutter[iX]("touchstart", l2._a)), true !== l0) { - var l3 = kJ(kc, l2.a.size, l2._b); - Object.keys(l3).forEach(function (l4) { - kj[l2.a].element.style[l4] = ""; - kj[l2.b].element.style[l4] = ""; - }); - } - }); - } - (kj = kk.map(function (l0, l1) { - var l2; - var l3 = { - element: j1(l0), - size: kv[l1], - minSize: kx[l1], - maxSize: kz[l1], - snapOffset: kE[l1], - i: l1 - }; - if (l1 > 0 && ((l2 = { - a: l1 - 1, - b: l1, - dragging: false, - direction: kG, - parent: kp - })._b = j3(kB, l1 - 1 == 0, false, kC), l2._c = j3(kB, false, l1 === kk.length - 1, kC), "row-reverse" === ku || "column-reverse" === ku)) { - var l4 = l2.a; - l2.a = l2.b; - l2.b = l4; - } - if (l1 > 0) { - var l5 = kI(l1, kG, l3.element); - kM(l5, kB, l1); - l2._a = kV.bind(l2); - l5[iW]("mousedown", l2._a); - l5[iW]("touchstart", l2._a); - kp.insertBefore(l5, l3.element); - l2.gutter = l5; - } - kL(l3.element, l3.size, j3(kB, 0 === l1, l1 === kk.length - 1, kC), l1); - l1 > 0 && kW.push(l2); - return l3; - })).forEach(function (l0) { - var l1 = l0.element.getBoundingClientRect()[kc]; - l1 < l0.minSize && (kA ? kX(l0) : l0.minSize = l1); - }); - return { - setSizes: kY, - getSizes: kN, - collapse: function (l0) { - kX(kj[l0]); - }, - destroy: kZ, - parent: kp, - pairs: kW - }; - }; - a2(149); - function j8(k9, kb) { - var kc = "undefined" != typeof Symbol && k9[Symbol.iterator] || k9["@@iterator"]; - if (!kc) { - if (Array.isArray(k9) || (kc = function (kk, km) { - if (kk) { - if ("string" == typeof kk) { - return j9(kk, km); - } - var kp = {}.toString.call(kk).slice(8, -1); - "Object" === kp && kk.constructor && (kp = kk.constructor.name); - return "Map" === kp || "Set" === kp ? Array.from(kk) : "Arguments" === kp || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(kp) ? j9(kk, km) : undefined; - } - }(k9)) || kb && k9 && "number" == typeof k9.length) { - kc && (k9 = kc); - var kd = 0; - var kf = function () {}; - return { - s: kf, - n: function () { - return kd >= k9.length ? { - done: true - } : { - done: false, - value: k9[kd++] - }; - }, - e: function (kk) { - throw kk; - }, - f: kf - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - var kg; - var kh = true; - var kj = false; - return { - s: function () { - kc = kc.call(k9); - }, - n: function () { - var kk = kc.next(); - kh = kk.done; - return kk; - }, - e: function (kk) { - kj = true; - kg = kk; - }, - f: function () { - try { - kh || null == kc.return || kc.return(); - } finally { - if (kj) { - throw kg; - } - } - } - }; - } - function j9(k9, kb) { - (null == kb || kb > k9.length) && (kb = k9.length); - for (var kc = 0, kd = Array(kb); kc < kb; kc++) { - kd[kc] = k9[kc]; - } - return kd; - } - var jb = { - processing: 1, - table: { - retrieve: "datasource", - update: "datasource", - columns: [{ - name: "id", - type: "long", - dbname: "id", - key: 1, - update: 1 - }, { - name: "parentId", - type: "long", - dbname: "parent_id", - key: 0, - update: 1 - }, { - name: "name", - type: "string", - dbname: "name", - key: 0, - update: 1 - }, { - name: "orderNum", - type: "long", - dbname: "ordernum", - key: 0, - update: 1 - }, { - name: "dbname", - type: "string", - dbname: "dbname", - key: 0, - update: 1 - }, { - name: "flag", - type: "string", - dbname: "flag", - key: 0, - update: 1 - }] - }, - reportData: { - name: "sheet1", - freeze: "A1", - styles: [{}], - merges: [], - rows: { - 0: { - height: 28, - cells: { - 0: { - text: "#{name}", - layout: true, - style: 0, - edit: { - style: "tree" - } - } - } - }, - len: 1, - height: 25, - minHeight: 5 - }, - cols: { - 0: { - width: "98%" - }, - len: 1 - }, - report: { - calc: false, - bands: [{ - start: 0, - len: 0, - name: "header" - }, { - start: 0, - len: 1, - name: "detail" - }], - tree: { - parentId: "parentId", - id: "id" - } - }, - validations: [], - autofilter: {} - } - }; - function jc(k9) { - if ("cancel" === k9) { - this.hide(); - } else { - if (!("search" === k9)) { - if ("db" === k9) { - var kb = !this.dbBtn.hasClass("active"); - this.dbBtn.active(kb); - kb ? this.dbPane.show() : this.dbPane.hide(); - } else { - if ("prop" === k9) { - var kc = !this.propBtn.hasClass("active"); - this.propBtn.active(kc); - kc ? this.propPane.show() : this.propPane.hide(); - } - } - } - } - } - function jd(k9) { - var kb = []; - kb[0] = { - id: 1, - parentId: 0, - name: "数据源" - }; - kb[1] = { - id: 2, - parentId: 1, - name: "主数据源" - }; - var kc; - var kd = 2; - var kf = j8(k9.table.columns); - try { - for (kf.s(); !(kc = kf.n()).done;) { - var kg = kc.value; - var kh = kg.name; - var kj = kg.dbname; - var kk = { - id: ++kd, - parentId: 2, - name: kh, - dbname: kj, - flag: 1 - }; - kb.push(kk); - } - } catch (km) { - kf.e(km); - } finally { - kf.f(); - } - this.dwDB.data = kb; - } - var jf = null; - function jg() { - this.dwPane; - var k9 = this.dwDB; - var kb = this.dwMain; - var kc = k9.getTargetEl(); - kc.draggable = true; - kc.ondragstart = function (kg) { - var kh = k9.getSelectedRows(); - var kj = Array.from(kh.keys()); - if (kj.length > 0) { - var kk = kj[0] + 1; - var km = k9.getItem(kk, "name"); - if (kg.dataTransfer.setData("name", km), !jf) { - var kp = document.createElement("label"); - document.body.appendChild(kp); - kp.style.position = "absolute"; - kp.style.top = "-200px"; - jf = kp; - } - jf.textContent = km; - kg.dataTransfer.setDragImage(jf, 0, 0); - } else { - kg.preventDefault(); - } - }; - var kd = kb.getTargetEl(); - kd.ondragenter = function (kg) { - console.log("dragenter", kg); - }; - kd.ondragleave = function (kg) { - console.log("dragleave", kg); - }; - kd.ondragover = function (kg) { - kg.preventDefault(); - }; - kd.ondrop = function (kg) { - var kh = kb.getSpread().getCellRectByXY(kg.offsetX, kg.offsetY); - if (kh.ri >= 0 && kh.ci >= 0) { - var kj = kg.dataTransfer.getData("name"); - kj && (kb.getSpread().cellText(kh.ri, kh.ci, "#{" + kj + "}"), kb.setRedraw(true)); - } - }; - var kf = []; - k9.on("LayoutViews", function (kg) { - console.log("LayoutViews", kg); - kf.forEach(function (kh) { - kh.removeFromParent(); - }); - kf.length = 0; - }); - k9.on("CellLayout", function (kg) { - kg.dw; - var kh = kg.ri; - var kj = kg.ci; - kg.parent; - var kk = kg.info; - 0 === kh && (console.log("celllayout", kh, kj, JSON.stringify(kk.rect)), function (km, kp) { - kp.dw; - kp.ri; - kp.ci; - var kq = kp.parent; - var ku = kp.info; - var kv = ku.rect; - var kw = Object(a9.c)("div", "".concat(cx.a, "-designer-btns")).children(new fH("db").on("click", function () { - console.log("info", ku); - }), new fH("pdf")); - km.push(kw); - kq.child(kw); - kw.offset(kv); - }(kf, kg)); - }); - } - var jh = function () { - return a8()(function k9() { - a6()(this, k9); - this.el = Object(a9.c)("div", "".concat(cx.a, "-designer")).children(Object(a9.c)("div", "".concat(cx.a, "-designer-bar")).children(Object(a9.c)("div", "".concat(cx.a, "-buttons")).children(this.dbBtn = new fH("db").on("click", jc.bind(this, "db")), this.propBtn = new fH("property").on("click", jc.bind(this, "prop"))), Object(a9.c)("div", "-title").child(Object(aB.b)("design.designer")), Object(a9.c)("div", "center"), Object(a9.c)("div", "".concat(cx.a, "-buttons")).children(new fH("close").on("click", jc.bind(this, "cancel")))), Object(a9.c)("div", "content").children(this.dbPane = Object(a9.c)("div", "left-pane"), this.dwPane = Object(a9.c)("div", "center-pane"), this.propPane = Object(a9.c)("div", "right-pane"))); - this.dbBtn.active(true); - this.propBtn.active(true); - this.dwDB = new DataWindow(this.dbPane.el); - this.dwMain = new DataWindow(this.dwPane.el); - this.dwProp = new DataWindow(this.propPane.el); - this.dwDB.dataObject = jb; - this.dwDB.setOption({ - mode: "read", - currentRowSelected: true, - showSelector: false - }); - this.dwMain.setOption({ - showSelector: true - }); - j7([this.dbPane.el, this.dwPane.el, this.propPane.el], { - sizes: [15, 65, 20], - minSize: [100, 300, 100], - gutterSize: 5 - }); - jg.call(this); - }, [{ - key: "setDW", - value: function (kb) { - this.dwMain.dataObject = kb; - this.dwMain.design(true); - jd.call(this, kb); - } - }, { - key: "show", - value: function () { - this.el.removeFromParent(); - document.body.appendChild(this.el.el); - this.el.show(); - } - }, { - key: "hide", - value: function () { - this.el.hide(); - this.el.removeFromParent(); - } - }]); - }(); - var jj = a2(24); - var jk = a2.n(jj); - function jm(k9, kb, kc) { - kb = cm()(kb); - return cj()(k9, function () { - try { - var kd = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (kf) {} - return function () { - return !!kd; - }(); - }() ? Reflect.construct(kb, kc || [], cm()(k9).constructor) : kb.apply(k9, kc)); - } - var jp = { - freeze: "A2", - styles: [{ - border: { - bottom: ["thin", "#bfbfbf"], - top: ["thin", "#bfbfbf"], - left: ["thin", "#bfbfbf"], - right: ["thin", "#bfbfbf"] - } - }, { - border: { - bottom: ["thin", "#bfbfbf"], - top: ["thin", "#bfbfbf"], - left: ["thin", "#bfbfbf"], - right: ["thin", "#bfbfbf"] - }, - align: "center" - }], - rows: { - 0: { - height: 32, - cells: { - 0: { - text: "id", - style: 1 - }, - 1: { - text: "name", - style: 1 - }, - 2: { - text: "price", - style: 1 - }, - 3: { - text: "format", - style: 1 - } - } - }, - 1: { - height: 30, - cells: { - 0: { - text: "#{#1}", - style: 0 - }, - 1: { - text: "#{name}", - style: 0 - }, - 2: { - text: "#{price}", - style: 0 - }, - 3: { - text: "#{price + 5}", - style: 0 - } - } - }, - len: 1000 - }, - cols: { - len: 14 - }, - report: { - calc: true, - bands: [{ - start: 0, - len: 1, - name: "header" - }, { - start: 1, - len: 1, - name: "detail" - }] - } - }; - var jq = { - processing: 1, - table: { - retrieve: "", - update: "", - columns: [] - }, - reportData: { - styles: [], - merges: [], - rows: { - len: 0, - height: 25, - minHeight: 5 - }, - cols: { - len: 0 - }, - report: { - calc: false, - bands: [{ - start: 0, - len: 0, - name: "header" - }, { - start: 0, - len: 0, - name: "detail" - }] - }, - validations: [], - autofilter: {} - } - }; - function ju(k9, kb) { - var kc = k9.table.columns; - kb || (kb = 2); - for (var kd = { - len: 2 * kb - }, kf = 0; kf < kd.len; kf++) { - kd[kf] = kf % 2 == 0 ? { - width: 126 - } : { - width: "100% / ".concat(kb, " - 126") - }; - } - for (var kg = { - len: Math.ceil(kc.length / kb) - }, kh = 0; kh < kc.length; kh++) { - var kj = Math.floor(kh / kb); - kg[kj] || (kg[kj] = { - height: 28, - cells: {} - }); - var kk = kc[kh]; - var km = kh % kb * 2; - var kp = undefined === kk.label ? kk.name : kk.label; - kg[kj].cells[km] = { - name: "".concat(kk.name, "_t"), - text: kp, - style: 1 - }; - kg[kj].cells[km + 1] = { - name: "".concat(kk.name), - text: "#{".concat(kk.name, "}"), - style: 0 - }; - } - var kq = c3(jp); - delete kq.freeze; - kq.styles[1].bgcolor = "#E3E6EA"; - kq.report.bands = [{ - start: 0, - len: 0, - name: "header" - }, { - start: 0, - len: kg.len, - name: "detail" - }]; - return Object.assign(kq, { - rows: kg, - cols: kd - }); - } - function jv(k9) { - for (var kb = k9.table.columns, kc = { - len: 2, - 0: { - height: 36, - cells: {} - }, - 1: { - height: 28, - cells: {} - } - }, kd = { - len: kb.length - }, kf = 0; kf < kb.length; kf++) { - var kg = kb[kf]; - var kh = undefined === kg.label ? kg.name : kg.label; - kc[0].cells[kf] = { - name: "".concat(kg.name, "_t"), - text: kh, - style: 1 - }; - kc[1].cells[kf] = { - name: "".concat(kg.name), - text: "#{".concat(kg.name, "}"), - style: 0 - }; - } - var kj = c3(jp); - return Object.assign(kj, { - rows: kc, - cols: kd - }); - } - function jw(k9, kb, kc) { - var kd = arguments.length > 3 && undefined !== arguments[3] && arguments[3]; - var kf = this._.sheet.data.report; - var kg = kf.getDataRow(kb); - var kh = null; - null === k9 && kd && (k9 = kf.getCell(kb, kc, false)); - k9 && k9.column && (kh = k9.column.name); - return { - row: kg, - colName: kh, - cell: k9 - }; - } - function jx(k9, kb, kc) { - var kd = jw.call(this, k9, kb, kc); - var kf = kd.row; - var kg = kd.colName; - var kh = this._prop; - var kj = kh.lastRow; - var kk = kh.lastColName; - var km = { - dw: this, - ri: kb, - ci: kc, - row: kf + 1, - cell: k9, - colName: kg - }; - if (kj === kf && kk === kg || this.fire("ItemFocusChanged", km, kf + 1, k9), kj !== kf && -1 !== kf) { - var kp = this._redraw; - this._redraw = false; - this.setRow(kf + 1); - this._redraw = kp; - this._prop.lastRow = kf; - } - this._prop.lastColName = kg; - } - function jy(k9) { - k9 ? Object.assign(k9, { - dw: this - }) : k9 = { - dw: this - }; - this.fire("Enter", k9); - } - var jz = { - ArrowUp: "keyuparrow!", - ArrowDown: "keydownarrow!", - ArrowLeft: "keyleftarrow!", - ArrowRight: "keyrightarrow!", - Backspace: "keyback!", - Tab: "keytab!", - Enter: "keyenter!" - }; - function jA(k9) { - var kb = k9.key; - var kc = k9.ctrlKey; - var kd = k9.shiftKey; - k9.metaKey; - Object.assign(k9, { - dw: this - }); - var kf = kd ? 1 : 0; - kf = kf + kc ? 2 : 0; - var kg = function (kh) { - var kj = jz[kh]; - return kj || "key".concat(kh, "!").toLowerCase(); - }(kb); - this.fire("KeyDown", k9, kg, kf); - } - function jB(k9) { - var kb = k9.cell; - var kc = k9.text; - var kd = k9.ri; - var kf = k9.ci; - var kg = jw.call(this, kb, kd, kf, true); - var kh = kg.row; - var kj = kg.colName; - Object.assign(k9, { - dw: this, - row: kh + 1, - colName: kj, - text: kc, - cell: kb, - ri: kd, - ci: kf - }); - this.fire("ItemChanged", k9, kh + 1, kb, kc); - } - function jC(k9) { - var kb = k9.cell; - var kc = k9.text; - var kd = k9.ri; - var kf = k9.ci; - var kg = jw.call(this, kb, kd, kf, true); - var kh = kg.row; - var kj = kg.colName; - Object.assign(k9, { - dw: this, - row: kh + 1, - colName: kj, - text: kc, - cell: kb, - ri: kd, - ci: kf - }); - this.fire("EditChanged", k9, kh + 1, kb, kc); - } - function jD() { - var k9 = { - dw: this - }; - this.fire("LoseFocus", k9); - } - function jE() { - var k9 = { - dw: this - }; - this.fire("Focus", k9); - } - function jF(k9, kb, kc, kd) { - var kf = jw.call(this, null, kb, kc, true); - var kg = kf.row; - var kh = kf.colName; - var kj = kf.cell; - var kk = kg + 1; - kd && (kk = 0); - undefined === kj && (kj = {}); - Object.assign(k9, { - dw: this, - row: kk, - colName: kh, - cell: kj, - ri: kb, - ci: kc - }); - this.fire("Clicked", k9, kk, kj); - } - function jG(k9, kb, kc, kd) { - var kf = jw.call(this, null, kb, kc, true); - var kg = kf.row; - var kh = kf.colName; - var kj = kf.cell; - var kk = kg + 1; - kd && (kk = 0); - undefined === kj && (kj = {}); - Object.assign(k9, { - dw: this, - row: kk, - colName: kh, - cell: kj, - ri: kb, - ci: kc - }); - this.fire("DoubleClicked", k9, kk, kj); - } - function jH(k9, kb, kc) { - var kd = jw.call(this, null, kb, kc, true); - var kf = kd.row; - var kg = kd.colName; - var kh = kd.cell; - Object.assign(k9, { - dw: this, - row: kf + 1, - colName: kg, - cell: kh, - ri: kb, - ci: kc - }); - this.fire("RightButtonClicked", k9, kf + 1, kh); - } - function jI() { - var k9 = { - dw: this - }; - this.fire("LayoutViews", k9); - } - function jJ(k9) { - Object.assign(k9, { - dw: this - }); - this.fire("CellLayout", k9); - } - function jK(k9, kb) { - var kc = { - dw: this, - row: k9, - rowHeight: kb - }; - this.fire("RowResized", kc); - } - function jL(k9, kb) { - var kc = { - dw: this, - col: k9, - colWidth: kb - }; - this.fire("ColResized", kc); - } - function jM(k9, kb) { - var kc = { - type: k9, - value: kb, - dw: this - }; - this.fire("ToolbarChanged", kc, k9, kb); - } - function jN(k9) { - var kb = k9.cell; - var kc = kb ? kb.edit : null; - if (kc && "button" === kc.style) { - var kd = kc.attrs.name; - var kf = k9.getDataRow(); - var kg = { - cell: kb, - dw: this, - row: kf, - name: kd - }; - this.fire("ButtonClicked", kg, kf, 0, kd); - } - } - function jO(k9, kb) { - var kc = k9.info; - var kd = kc.cell; - var kf = kd ? kd.edit : null; - if (kf && "paint" === kf.style) { - var kg = kd.name; - var kh = kc.getDataRow(); - var kj = { - view: k9, - cell: kd, - dw: this, - draw: kb - }; - this.fire("CellRender", kj, kh, kg, kb); - } - } - function jP() { - var k9 = { - dw: this - }; - this.fire("DataObjectChanged", k9); - } - var jQ = function (k9) { - function kb(kd) { - var kf; - a6()(this, kb); - var kg = { - mode: "", - view: { - height: function () { - return 200; - }, - width: function () { - return 300; - } - }, - showToolbar: false, - showGrid: false, - showBottombar: false, - showFixedColHeader: false, - showFixedRowHeader: false, - row: { - len: 0, - height: 25 - }, - col: { - len: 0, - width: 90, - indexWidth: 60, - minWidth: 1 - } - }; - (kf = jm(this, kb))._ = new k3(kd, kg); - kf.option = kg; - kf._redraw = true; - kf._prop = {}; - kf._design = false; - kf._.sheet.getDataWindow = function () { - return kf; - }; - kf._.on("cell-selected", jx.bind(kf)); - kf._.on("cell-enter", jy.bind(kf)); - kf._.on("cell-textChanged", jB.bind(kf)); - kf._.on("cell-edited", jC.bind(kf)); - kf._.on("loseFocus", jD.bind(kf)); - kf._.on("focus", jE.bind(kf)); - kf._.on("keyDown", jA.bind(kf)); - kf._.on("toolbarChange", jM.bind(kf)); - kf._.on("viewClicked", jN.bind(kf)); - kf._.on("cell-render", jO.bind(kf)); - kf._.on("cell-clicked", jF.bind(kf)); - kf._.on("cell-doubleClicked", jG.bind(kf)); - kf._.on("layoutViews", jI.bind(kf)); - kf._.on("cell-layout", jJ.bind(kf)); - kf._.on("rowResized", jK.bind(kf)); - kf._.on("colResized", jL.bind(kf)); - kf._.on("DropDownSelected", function (kh) { - kf.fire("DropDownSelected", kh); - }); - kf._.on("RightButtonClicked", jH.bind(kf)); - return kf; - } - cq()(kb, k9); - return a8()(kb, [{ - key: "createNew", - value: function () { - var kd = Object(a9.c)("div"); - kd.css("width", "100%"); - kd.css("height", "200px"); - kd.css("border", "1.5px solid lightgray"); - return new kb(kd.el); - } - }, { - key: "getTargetEl", - value: function () { - return this._.targetEl; - } - }, { - key: "getSpread", - value: function () { - return this._; - } - }, { - key: "getEventEl", - value: function () { - return this._.sheet.overlayerEl.el; - } - }, { - key: "dataObject", - get: function () { - var kd = cv()(cm()(kb.prototype), "dataObject", this); - kd && (kd.reportData = this._.sheet.data.getData()); - return kd; - }, - set: function (kd) { - iS()(cm()(kb.prototype), "dataObject", kd, this, true); - } - }, { - key: "setDataObject", - value: (kc = aM()(aO.a.mark(function kd(kf) { - var kg; - var kh; - return aO.a.wrap(function (kj) { - for (;;) { - switch (kj.prev = kj.next) { - case 0: - kj.next = 2; - return cv()(cm()(kb.prototype), "setDataObject", this).call(this, kf); - case 2: - (kg = null === this._dataObject ? jq : this._dataObject) && (kg.reportData ? this.loadData(kg.reportData) : (kh = null, kh = kg.createCols > 0 ? ju(kg, kg.createCols) : jv(kg), this.loadData(kh))); - this._.sheet.selector.set(-2, -2); - jP.call(this); - case 6: - case "end": - return kj.stop(); - } - } - }, kd, this); - })), function (kf) { - return kc.apply(this, arguments); - }) - }, { - key: "getReport", - value: function () { - return this._.sheet.data.report; - } - }, { - key: "groupCalc", - value: function () { - cv()(cm()(kb.prototype), "groupCalc", this).call(this); - } - }, { - key: "loadData", - value: function (kf) { - var kg = this._.sheet.data.report; - this._.sheet.data.viewManager && this._.sheet.data.viewManager.clearViews(); - this._.loadData(kf); - var kh = this._.sheet.data; - this._design && (kh.settings.showFixedColHeader = true, kh.settings.showFixedRowHeader = true, kh.settings.showToolbar = true, kh.settings.showGrid = true, kh.settings.showSelector = true, kh.report.setCalc(false), this._.sheet.resetData(kh)); - var kj = this._.sheet.data.report; - kg && Object.keys(kg._dataSets).length > 0 && (kj._dataSets = kg._dataSets); - kj.addDataStore("dw", this); - kj.setMainDataStore("dw"); - kj.processing = this._dataObject.processing; - this._design || (kj.setCalc(false), kj.setCalc(true)); - this.groupCalc(); - this._.reload(); - } - }, { - key: "_rowCountChanged", - value: function () { - var kf = this; - cv()(cm()(kb.prototype), "_rowCountChanged", this).call(this); - var kg = this._.sheet.data; - Object(ay.b)(kg.report.evalData); - kg.settings.currentRowSelected && (this._selectedRows.clear(), this.selectRow(this._currentRow, true)); - this._t && (clearTimeout(this._t), delete this._t); - this._t = setTimeout(function () { - kf._redraw && kf._.reload(); - }, 15); - } - }, { - key: "setRedraw", - value: function (kf) { - if (this._redraw = kf, kf) { - var kg = this._.sheet.data; - kg.report.calc && (kg.report.setCalc(false), kg.report.setCalc(true)); - this._.reload(); - } - } - }, { - key: "design", - value: function (kf) { - var kg = this._.sheet.data; - this._design !== kf && (kf ? (kg.settings.showFixedColHeader = true, kg.settings.showFixedRowHeader = true, kg.settings.showSelector = true) : (kg.settings.showFixedColHeader = this.option.showFixedColHeader, kg.settings.showFixedRowHeader = this.option.showFixedRowHeader, kg.settings.showSelector = this.option.showSelector), kg.settings.showToolbar = kf, kg.settings.showGrid = kf, kg.report.setCalc(!kf), this._.sheet.resetData(kg), this._.reload(), this._design = kf); - } - }, { - key: "showDesigner", - value: function (kf) { - kf ? (this.designer || (this.designer = new jh()), this.designer.setDW(this.dataObject), this.designer.show()) : this.designer && this.designer.hide(); - } - }, { - key: "isDesign", - value: function () { - return this._design; - } - }, { - key: "setRow", - value: function (kf) { - if (this._currentRow === kf) { - return kf; - } - var kg = cv()(cm()(kb.prototype), "setRow", this).call(this, kf); - var kh = this._.sheet.data; - var kj = kh.settings; - var kk = kj.currentRowSelected; - var km = kj.onlyShowCurrentRow; - var kp = false; - if (kk && (this._selectedRows.clear(), this.selectRow(kf, true), kp = true), km) { - var kq = a4()(kh.freeze, 1)[0]; - kh.scroll.ri = 0; - kh.scroll.ri < kq && (kh.scroll.ri = kq); - kp = true; - } - this.fire("RowFocusChanged", { - dw: this - }, kf); - this._redraw && kp && this._.render(); - return kg; - } - }, { - key: "scrollToRow", - value: function (kf) { - var kg = this._redraw; - kg && (this._redraw = false); - var kh = cv()(cm()(kb.prototype), "scrollToRow", this).call(this, kf); - (this._redraw = kg, kh >= 1) && (kh = this._.sheet.data.report.getRowByDataRow(kh - 1), this._.sheet.scrollToRow(kh)); - return kh; - } - }, { - key: "selectRow", - value: function (kf, kg) { - cv()(cm()(kb.prototype), "selectRow", this).call(this, kf, kg) && this._redraw && this._.render(); - } - }, { - key: "setOption", - value: function (kf) { - var kg = arguments.length > 1 && undefined !== arguments[1] ? arguments[1] : null; - var kh = this._.sheet.data; - "string" == typeof kf ? (this.option[kf] = kg, kh.settings[kf] = kg) : (Object.assign(this.option, kf), Object.assign(kh.settings, kf)); - this._.sheet.resetData(kh); - this._redraw && this._.reload(); - return true; - } - }, { - key: "print", - value: function (kf) { - this._.sheet.print.preview(kf); - this._.reload(); - return 1; - } - }, { - key: "acceptText", - value: function () { - this._.sheet.editor.clear(); - } - }, { - key: "hScrollBar", - get: function () { - return this._.sheet.data.settings.showHScrollBar; - }, - set: function (kf) { - this.setOption("showHScrollBar", kf); - } - }, { - key: "vScrollBar", - get: function () { - return this._.sheet.data.settings.showVScrollBar; - }, - set: function (kf) { - this.setOption("showVScrollBar", kf); - } - }, { - key: "border", - get: function () { - return "none" !== this.getTargetEl().style.border; - }, - set: function (kf) { - this.getTargetEl().style.border = kf ? "1.5px solid #e9e9e9" : "none"; - } - }, { - key: "getColumn", - value: function () { - var kf = this.getColumnName(); - var kg = 0; - if (kf) { - for (var kh = this._table.columns, kj = 0; kj < kh.length; kj++) { - if (kh[kj].name === kf) { - kg = kj + 1; - break; - } - } - } - return kg; - } - }, { - key: "getColumnName", - value: function () { - return this._prop.lastColName; - } - }, { - key: "setColumn", - value: function (kf) { - var kg = this._.sheet.data.report; - if (kg.calc) { - var kh = this._currentRow - 1; - kh = kg.getRowByDataRow(kh); - var kj = kg._orderColumns.find(function (kk) { - return kk.cell.name === kf; - }); - kj && this._.sheet.selectCell(kh + kj.row, kj.col); - } - } - }, { - key: "setFocus", - value: function () { - this._.sheet.setFocus(); - } - }, { - key: "selectText", - value: function (kf, kg) { - this._.sheet.editor.selectText(kf, kg); - } - }, { - key: "sort", - value: function () { - var kf = !(arguments.length > 0 && undefined !== arguments[0]) || arguments[0]; - cv()(cm()(kb.prototype), "sort", this).call(this); - kf && this.invalidate(); - } - }, { - key: "invalidate", - value: function () { - this._.reload(); - } - }, { - key: "evaluate", - value: function (kf, kg) { - return this._.sheet.data.report.evaluate(kf, kg); - } - }, { - key: "_dataChanged", - value: function (kf, kg) { - var kh = this._.sheet.data; - undefined === kf && (kh.report._filter = undefined); - Object(ay.b)(kh.report.evalData); - this._redraw && this._.render(); - } - }]); - var kc; - }(cg); - jk.a.enc.Uint8Array = { - stringify: function (k9) { - for (var kb = k9.words, kc = k9.sigBytes, kd = new Uint8Array(kc), kf = 0; kf < kc; kf++) { - var kg = kb[kf >>> 2] >>> 24 - kf % 4 * 8 & 255; - kd[kf] = kg; - } - return kd; - }, - parse: function (k9) { - for (var kb = k9.length, kc = [], kd = 0; kd < kb; kd++) { - kc[kd >>> 2] |= (255 & k9[kd]) << 24 - kd % 4 * 8; - } - return new jk.a.lib.WordArray.init(kc, kb); - } - }; - var jR; - function jS() { - return (jS = aM()(aO.a.mark(function k9(kb, kc) { - return aO.a.wrap(function (kd) { - for (;;) { - switch (kd.prev = kd.next) { - case 0: - kd.next = 2; - break; - case 2: - case "end": - return kd.stop(); - } - } - }, k9); - }))).apply(this, arguments); - } - jR = function (k9) { - k9.columnService = new jT(k9); - }; - cV.ColumnService = jR; - var jT = function () { - return a8()(function k9(kb) { - a6()(this, k9); - this.report = kb; - kb.on("calcChanged", this.calcChanged.bind(this)); - }, [{ - key: "rowsChanged", - value: function (kb) {} - }, { - key: "calcChanged", - value: function (kb) { - var kc = this.report._data.bands; - var kd = this.report._dproxy; - var kf = kc.find(function (kC) { - return "detail" === kC.name; - }); - if (kf) { - for (var kg = kd.cols, kh = 0; kh < kg.len; kh += 1) { - kg.isHide(kh) && kg.setHide(kh, false); - } - if (kb) { - for (var kj = kf.len, kk = kf.rows, km = kf.merges, kp = 0; kp < kj; kp += 1) { - var kq = kp; - var ku = kk.get(kq); - if (ku) { - for (var kv in ku.cells) { - var kw = ku.cells[kv]; - var kx = parseInt(kv, 10); - if (kw && false === kw.visible) { - var ky = kx; - var kz = kx; - var kA = km.getFirstIncludes(kq, kx); - kA && (ky = kA.sci, kz = kA.eci); - for (var kB = ky; kB <= kz; kB += 1) { - kd.cols.setHide(kB, true); - } - } - } - } - } - } - } - } - }]); - }(); - function jU(k9, kb) { - var kc = "undefined" != typeof Symbol && k9[Symbol.iterator] || k9["@@iterator"]; - if (!kc) { - if (Array.isArray(k9) || (kc = function (kk, km) { - if (kk) { - if ("string" == typeof kk) { - return jV(kk, km); - } - var kp = {}.toString.call(kk).slice(8, -1); - "Object" === kp && kk.constructor && (kp = kk.constructor.name); - return "Map" === kp || "Set" === kp ? Array.from(kk) : "Arguments" === kp || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(kp) ? jV(kk, km) : undefined; - } - }(k9)) || kb && k9 && "number" == typeof k9.length) { - kc && (k9 = kc); - var kd = 0; - var kf = function () {}; - return { - s: kf, - n: function () { - return kd >= k9.length ? { - done: true - } : { - done: false, - value: k9[kd++] - }; - }, - e: function (kk) { - throw kk; - }, - f: kf - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - var kg; - var kh = true; - var kj = false; - return { - s: function () { - kc = kc.call(k9); - }, - n: function () { - var kk = kc.next(); - kh = kk.done; - return kk; - }, - e: function (kk) { - kj = true; - kg = kk; - }, - f: function () { - try { - kh || null == kc.return || kc.return(); - } finally { - if (kj) { - throw kg; - } - } - } - }; - } - function jV(k9, kb) { - (null == kb || kb > k9.length) && (kb = k9.length); - for (var kc = 0, kd = Array(kb); kc < kb; kc++) { - kd[kc] = k9[kc]; - } - return kd; - } - function jW(k9, kb) { - if ("[]" === k9.substr(-2, 2)) { - return function (kc, kd) { - return (kd = (kd = kd.trim()).substr(1, kd.length - 2)).split(",").map(function (kf) { - return bd(kf); - }); - }(0, kb); - } - switch (k9) { - case "width": - case "x": - return bh(kb, true, 0); - case "height": - case "y": - return bh(kb, false, 0); - case "text": - case "title": - return bd(kb); - case "backcolor": - return bg(kb); - case "textsize": - case "increment": - return bb(kb); - case "spin": - return function (kc) { - return "true" === kc; - }(kb); - default: - return kb; - } - } - function jX(k9, kb) { - var kc; - var kd; - var kf = { - id: k9.name, - name: k9.name, - style: { - left: k9.x, - top: k9.y, - width: k9.width, - height: k9.height, - position: "absolute" - } - }; - var kg = k9.from; - var kh = k9.text ? k9.text : ""; - if ("window" === kg) { - kf.type = "wrapper"; - delete kf.style.left; - delete kf.style.top; - kc = kf.body = []; - kf.style.position = "relative"; - } else { - if ("tab" === kg) { - kf.type = "tabs"; - kc = kf.tabs = []; - } else { - if ("userobject" === kg && "tab" === k9.parent.from) { - var kj = kf; - (kf = {}).title = k9.text; - kf.tab = { - type: "wrapper", - body: [] - }; - Object.assign(kf.tab, kj); - kc = kf.tab.body; - } else { - if ("singlelineedit" === kg) { - kf.type = "input-text"; - kf.value = kh; - } else { - if ("commandbutton" === kg) { - kf.type = "button"; - kf.label = kh; - } else { - if ("statictext" === kg) { - kf.type = "tpl"; - kf.tpl = kh; - } else { - if ("datawindow" === kg) { - kf.type = "tpl"; - kf.tpl = kh; - } else { - if ("dropdownlistbox" === kg) { - kf.type = "select"; - kf.name = k9.name; - kf.options = []; - var kk; - var km = jU(k9["item[]"]); - try { - for (km.s(); !(kk = km.n()).done;) { - var kp = kk.value; - kf.options.push({ - label: kp, - value: kp - }); - } - } catch (kx) { - km.e(kx); - } finally { - km.f(); - } - } else { - if ("editmask" === kg) { - if (!(kf.name = k9.name, "datemask!" === k9.maskdatatype)) { - if (kf.type = "input-number", kf.showSteps = k9.spin, kf.showSteps) { - var kq = (kd = (kd = k9.minmax).substr(1, kd.length - 2)).split("~~").map(function (ky) { - return parseInt(ky); - }); - kf.min = kq[0]; - kf.max = kq[1]; - kf.step = k9.increment; - } - } - } else { - "checkbox" === kg ? (kf.type = "checkbox", kf.option = kh) : (kf.type = "tpl", kf.className = "b", kf.tpl = "".concat(k9.name, " '继承自' ").concat(kg, " 没有发现控件")); - } - } - } - } - } - } - } - } - } - if (k9.controls) { - var ku; - var kv = jU(k9.controls); - try { - for (kv.s(); !(ku = kv.n()).done;) { - var kw = jX(ku.value, kb); - "tab" === kg ? kc.push(kw) : kc.unshift(kw); - } - } catch (ky) { - kv.e(ky); - } finally { - kv.f(); - } - } - return kf; - } - var jY = function () { - return a8()(function k9(kb) { - a6()(this, k9); - this.syntax = "string" == typeof kb ? JSON.parse(kb) : kb; - var kc; - var kd; - var kf = {}; - var kg = jU(this.syntax); - try { - for (kg.s(); !(kd = kg.n()).done;) { - var kh = kd.value; - kf[kh.name] || (kf[kh.name] = {}); - var kj = kf[kh.name]; - for (var kk in kh) kj[kk] = jW(kk, kh[kk]); - if ("" === kj.within) { - kc = kj; - } else { - var km = kf[kj.within]; - km || (km = kf[kj.within] = {}); - km.controls || (km.controls = []); - km.controls.push(kj); - kj.parent = km; - } - } - } catch (kp) { - kg.e(kp); - } finally { - kg.f(); - } - this.window = kc; - }, [{ - key: "toAmis", - value: function () { - var kb = { - type: "page", - body: {} - }; - return this.window ? (kb.body = jX(this.window), console.log(kb), kb) : kb; - } - }]); - }(); - var jZ = a2(90); - var k0 = a2.n(jZ); - var k1 = function () { - return a8()(function k9(kb) { - var kc = this; - var kd = arguments.length > 1 && undefined !== arguments[1] ? arguments[1] : {}; - a6()(this, k9); - var kf = kb; - this.options = kd; - this.sheetIndex = 1; - this.datas = []; - "string" == typeof kb && (kf = document.querySelector(kb)); - this.lastWidth = kf.clientWidth; - this.lastHeight = kf.clientHeight; - var kg = this; - this.options.view = { - height: function () { - return kg.lastHeight; - }, - width: function () { - return kg.lastWidth; - } - }; - kf.style.overflow = "hidden"; - var kh = new ResizeObserver(function (km, kp) { - km[0]; - kc.rt && clearTimeout(kc.rt); - kc.lastHeight === kf.clientHeight && kc.lastWidth === kf.clientWidth || (kc.rt = setTimeout(function () { - kc.lastHeight = kf.clientHeight; - kc.lastWidth = kf.clientWidth; - kc.reload(); - delete kc.rt; - }, 15)); - }); - kh.observe(kf); - var kj = this.options.showBottombar; - undefined === kj && (kj = false); - this.bottombar = new iQ(function () { - var km = kc.addSheet(); - kc.sheet.resetData(km); - }, function (km) { - var kp = kc.datas[km]; - kc.sheet.resetData(kp); - }, function () { - kc.deleteSheet(); - }, function (km, kp) { - kc.datas[km].name = kp; - }, !kj); - this.data = this.addSheet(); - var kk = Object(a9.c)("div", "".concat(cx.a)).on("contextmenu", function (km) { - km.preventDefault(); - }); - kf.appendChild(kk.el); - this.sheet = new iJ(kk, this.data); - kk.child(this.bottombar.el); - this.targetEl = kf; - }, [{ - key: "addSheet", - value: function (kb) { - var kc = this; - var kd = !(arguments.length > 1 && undefined !== arguments[1]) || arguments[1]; - var kf = kb || "sheet".concat(this.sheetIndex); - var kg = new eR(kf, this.options); - kg.change = function () { - for (var kh, kj = arguments.length, kk = new Array(kj), km = 0; km < kj; km++) { - kk[km] = arguments[km]; - } - (kh = kc.sheet).trigger.apply(kh, ["change"].concat(kk)); - }; - this.datas.push(kg); - this.bottombar.addItem(kf, kd); - this.sheetIndex += 1; - return kg; - } - }, { - key: "deleteSheet", - value: function () { - var kb = this.bottombar.deleteItem(); - var kc = a4()(kb, 2); - var kd = kc[0]; - var kf = kc[1]; - kd >= 0 && (this.datas.splice(kd, 1), kf >= 0 && this.sheet.resetData(this.datas[kf])); - } - }, { - key: "loadData", - value: function (kb) { - var kc = Array.isArray(kb) ? kb : [kb]; - if (this.bottombar.clear(), this.sheetIndex = 1, this.datas = [], kc.length > 0) { - for (var kd = 0; kd < kc.length; kd += 1) { - var kf = kc[kd]; - var kg = this.addSheet(kf.name, 0 === kd); - kg.setData(kf); - 0 === kd && this.sheet.resetData(kg); - } - } - return this; - } - }, { - key: "getData", - value: function () { - return this.datas.map(function (kb) { - return kb.getData(); - }); - } - }, { - key: "getReport", - value: function () { - var kb = arguments.length > 0 && undefined !== arguments[0] ? arguments[0] : 0; - var kc = this.datas[kb].report; - return kc; - } - }, { - key: "cellText", - value: function (kb, kc, kd) { - var kf = arguments.length > 3 && undefined !== arguments[3] ? arguments[3] : 0; - this.datas[kf].setCellText(kb, kc, kd, "finished"); - return this; - } - }, { - key: "cell", - value: function (kb, kc) { - var kd = arguments.length > 2 && undefined !== arguments[2] ? arguments[2] : 0; - return this.datas[kd].getCell(kb, kc); - } - }, { - key: "cellStyle", - value: function (kb, kc) { - var kd = arguments.length > 2 && undefined !== arguments[2] ? arguments[2] : 0; - return this.datas[kd].getCellStyle(kb, kc); - } - }, { - key: "getCellRectByXY", - value: function (kb, kc) { - var kd = arguments.length > 2 && undefined !== arguments[2] ? arguments[2] : 0; - return this.datas[kd].getCellRectByXY(kb, kc); - } - }, { - key: "render", - value: function () { - this.sheet.render(); - return this; - } - }, { - key: "reload", - value: function () { - this.sheet.reload(); - return this; - } - }, { - key: "on", - value: function (kb, kc) { - this.sheet.on(kb, kc); - return this; - } - }, { - key: "validate", - value: function () { - return this.data.validations.errors.size <= 0; - } - }, { - key: "change", - value: function (kb) { - this.sheet.on("change", kb); - return this; - } - }], [{ - key: "locale", - value: function (kb, kc) { - Object(aB.a)(kb, kc); - } - }]); - }(); - var k2 = function (k9) { - var kb = arguments.length > 1 && undefined !== arguments[1] ? arguments[1] : {}; - return new k1(k9, kb); - }; - window && (window.DataWindow = jQ, window.Formula = ay.a, window.DWBuffer = bQ, window.DWItemStatus = bO, window.DWEvent = bR, window.DataStore = cg, window.parseDW = bq, window.parsePB = function (k9) { - return new jY(k9).toAmis(); - }, window.registerUserFunction = cf, window.Split = j7, window.dwInit = function (k9, kb) { - return jS.apply(this, arguments); - }, window.H5UI = { - ContextMenu: fX, - DataWindow: jQ, - DataStore: cg, - Split: j7, - Modal: hx, - Element: a9.a, - h: a9.c, - Button: hE, - ElementResizeDetectorMaker: k0.a - }); - a1.default = k1; - var k3 = a1.default; - }]); -}); \ No newline at end of file + _0x20f7f5(); + } + }); +} +async function isSpinnerVisible() { + const _0x3a080a = _0x30b83a, + _0x576174 = document.querySelector(".root-2tSNO.Picture-spinner, .root-2tSNO.SemanticsVerify-spinner"); + if (!_0x576174) return false; + const _0x5f3c55 = window[_0x3a080a(335)](_0x576174); + return _0x5f3c55[_0x3a080a(406)] !== _0x3a080a(439) && _0x5f3c55[_0x3a080a(324)] !== _0x3a080a(345); +} +async function waitForSpinnerToDisappear(_0x2359ce = 10000) { + const _0x202c8a = _0x30b83a, + _0x5935c6 = Date[_0x202c8a(276)](); + while (Date[_0x202c8a(276)]() - _0x5935c6 < _0x2359ce) { + if (!(await isSpinnerVisible())) return; + await new Promise(_0x3b557c => setTimeout(_0x3b557c, 200)); + } + console[_0x202c8a(376)]("[加载检测] 等待加载动画超时"); +} +function waitForImageLoad(_0x515208) { + return new Promise(_0x21c5b7 => { + const _0xfaea01 = _0x2bc3; + _0x515208[_0xfaea01(349)] ? _0x21c5b7() : (_0x515208[_0xfaea01(286)] = () => _0x21c5b7(), _0x515208[_0xfaea01(301)] = () => _0x21c5b7()); + }); +} +function initCaptchaAutoSolverWithCheck() { + const _0x3b07cd = _0x30b83a; + document[_0x3b07cd(421)] !== _0x3b07cd(349) ? window.addEventListener(_0x3b07cd(387), () => { + setTimeout(conditionalInit, 3000); + }) : setTimeout(conditionalInit, 3000); +} +function conditionalInit() { + const _0x56d230 = _0x30b83a; + try { + { + const _0x3168bf = document[_0x56d230(354)]("#temu-log-container"); + if (!_0x3168bf) return; + initCaptchaAutoSolver(); + } + } catch (_0x1b4845) { + console.error("[系统启动] 初始化检查时出错:", _0x1b4845); + } +} +initCaptchaAutoSolverWithCheck(); \ No newline at end of file diff --git a/output.py b/output.py index 3a1a44e68a85dcf8ecda2271deeab8cf057b3247..2764f0abfb1df40064ddc1d5c8c2659390033890 100644 GIT binary patch delta 31 mcmX?cit)rLMiFHr10z#i19M#iBLxF9D+5a_Q-h5nCaD0Ixd?Co delta 31 mcmX?cit)rLMiFHr10z#i19M#iLj?m1D